Skip to content

Windows portability fixes + interact with agents from the office window - #302

Open
paulocabrito620 wants to merge 4 commits into
pixel-agents-hq:mainfrom
paulocabrito620:feat/windows-portability-and-window-interaction
Open

Windows portability fixes + interact with agents from the office window#302
paulocabrito620 wants to merge 4 commits into
pixel-agents-hq:mainfrom
paulocabrito620:feat/windows-portability-and-window-interaction

Conversation

@paulocabrito620

Copy link
Copy Markdown

Summary

Two Windows portability fixes (the build was broken on Windows) plus two opt-in features for interacting with agents from the office window instead of only observing them.

Fixes

  • generate-messages quote() cross-platformquote() wrapped the path in single quotes, which cmd.exe (used by execSync on Windows) does not strip, so the spawned prettier/eslint never found the file and process.exit(1) aborted the whole build. Now uses double quotes (works in POSIX shells and cmd.exe).
  • copyHookScript path in standalone CLIcli.ts passed distRoot (the dist/ dir) to copyHookScript(), which appends dist/hooks itself, yielding dist/dist/hooks. The hook script was never copied to ~/.pixel-agents/hooks/, leaving the global settings.json hooks pointing at a missing file. Now passes the package root.

Features

  • Send messages/prompts to an agent from the window — a text input under the selected agent's overlay writes to that agent's terminal (terminal.sendText) as if typed and submits it. VS Code mode only (the extension owns the terminal); no-op for external/standalone agents.
  • Approve tool use from the window (opt-in) — new Approve Tools from Window setting. When enabled, a PreToolUse for a non-exempt tool blocks until the user clicks Allow/Deny on the agent's character; the decision is returned to Claude via the hook's permissionDecision. The server holds the hook response and resolves it on the window's decision (or times out after 9 min, under Claude's 10-min hook cap). Works in both standalone and VS Code modes.
    • Protocol additions: AgentApprovalRequest/AgentApprovalResolved (server→client), RespondApproval/SetApprovalsFromWindow (client→server), approvalsFromWindow in SettingsLoaded.

Testing

  • npm run build passes end-to-end on Windows.
  • Server test suite: 200 pass (the 9 pre-existing failures in fileStateAdapter/migrateVsCodeState are unrelated — they mock HOME, which os.homedir() ignores on Windows in favour of USERPROFILE; identical on main).
  • Approval flow verified end-to-end: the server held a PreToolUse until Allow was clicked in the real webview, then returned {"decision":"allow"} to the hook.

Notes

  • The approval mode is intentionally opt-in: PreToolUse fires for every tool, so when on, every non-exempt tool asks for approval.

🤖 Generated with Claude Code

RSBLisboa and others added 4 commits June 7, 2026 00:58
quote() wrapped the file path in single quotes, which cmd.exe (used by
execSync on Windows) does not strip. The spawned prettier/eslint then
received a literal-quoted path, failed to find the file, and aborted the
whole build via process.exit(1). Use double quotes so the path survives
both POSIX shells and cmd.exe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cli.ts passed distRoot (__dirname, i.e. the dist/ dir) to copyHookScript(),
which appends dist/hooks itself — yielding dist/dist/hooks. The hook
script was never found, so it was not copied to ~/.pixel-agents/hooks/,
leaving the 14 hook entries in the global settings.json pointing at a
missing file and breaking hook delivery for every Claude session. Pass
the package root (parent of dist/) so the path resolves to dist/hooks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a message input under the selected agent's overlay. Submitting writes
the text to that agent's terminal (terminalRef.sendText) as if typed and
presses Enter, so you can prompt/redirect a Claude agent without switching
to its terminal. Teammates route to the lead's terminal. External/standalone
agents (no terminal owned by the extension) are a no-op.

- core/asyncapi.yaml: new SendAgentMessage client message (regenerated messages.ts)
- adapters/vscode: handle sendAgentMessage -> terminal.show() + sendText
- webview-ui: AgentMessageBar input in ToolOverlay + wiring in App

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New opt-in setting (Approve Tools from Window). When enabled, a PreToolUse
for a non-exempt tool blocks until the user clicks Allow/Deny on the agent
in the window; the decision is returned to Claude via the hook.

- hook script reads the HTTP response and, for PreToolUse, forwards the
  decision to Claude as a permissionDecision (longer socket timeout).
- httpServer holds the PreToolUse response and awaits a decision;
  hookEventHandler tracks pending approvals, broadcasts agentApprovalRequest,
  and resolves on RespondApproval (or times out after 9 min).
- works in both standalone and VS Code modes; webview shows Allow/Deny;
  toggle in Settings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

@RSBLisboa is attempting to deploy a commit to the pablodelucca's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants