Commit graph

6 commits

Author SHA1 Message Date
Mario Zechner
0a26db53ef fix(coding-agent): align ToolDefinition.execute signature with AgentTool
BREAKING CHANGE: ToolDefinition.execute parameter order changed from
(id, params, onUpdate, ctx, signal) to (id, params, signal, onUpdate, ctx).

This aligns with AgentTool.execute so wrapping built-in tools no longer
requires parameter reordering. Update extensions by swapping signal and
onUpdate parameters.
2026-02-02 00:29:47 +01:00
Mario Zechner
121823c74d feat(coding-agent): add user_bash event and theme API extensions
- user_bash event for intercepting ! and !! commands (#528)
- Extensions can return { operations } or { result } to redirect/replace
- executeBashWithOperations() for custom BashOperations execution
- session.recordBashResult() for extensions handling bash themselves
- Theme API: getAllThemes(), getTheme(), setTheme() on ctx.ui
- mac-system-theme.ts example: sync with macOS dark/light mode
- Updated ssh.ts to use user_bash event
2026-01-08 21:50:56 +01:00
Mario Zechner
dc54c308a9 SSH extension: evaluate pwd on remote when no path given, use accent color for status 2026-01-08 20:37:56 +01:00
Mario Zechner
b0e5954cf8 feat(coding-agent): default ssh extension remote cwd to ~ 2026-01-08 20:27:09 +01:00
Mario Zechner
17cb328ca1 Allow extensions to modify system prompt in before_agent_start
- Add systemPrompt to BeforeAgentStartEvent so extensions can see current prompt
- Change systemPromptAppend to systemPrompt in BeforeAgentStartEventResult for full replacement
- Extensions can now chain modifications (each sees the result of previous)
- Update ssh.ts to replace local cwd with remote cwd in system prompt
- Update pirate.ts, claude-rules.ts, preset.ts to use new API

fixes #575
2026-01-08 19:54:34 +01:00
Mario Zechner
9ed88646a8 feat(coding-agent): add pluggable operations for remote tool execution
Adds optional operations parameter to create*Tool functions enabling
delegation to remote systems (SSH, containers, etc.):

- ReadOperations: readFile, access, detectImageMimeType
- WriteOperations: writeFile, mkdir
- EditOperations: readFile, writeFile, access
- BashOperations: exec (with streaming, signal, timeout)

Add ssh.ts example demonstrating --ssh flag for remote execution.
Built-in renderers used automatically for overrides without custom renderers.

fixes #564
2026-01-08 19:32:25 +01:00