feat(agent-v1): add pre_bash_call/post_bash_call types for shell comm…#1312
feat(agent-v1): add pre_bash_call/post_bash_call types for shell comm…#1312blanet wants to merge 1 commit into
Conversation
6258a06 to
6e72b75
Compare
|
Hey @blanet thank you so much for the contribution! This was on my todo list, so extra appreciate it! Quick question, do you mind also adding |
@svarlamov Done! Added optional |
…and attribution The agent-v1 protocol previously only supported file-edit attribution (human/ai_agent types). This left a gap: when third-party agents execute shell commands (e.g. cargo fmt, npm install) that modify files, those changes were invisible to git-ai. Add two new payload types to the agent-v1 protocol: - pre_bash_call: triggers a filesystem stat snapshot before command execution - post_bash_call: diffs against the pre-snapshot to discover changed files These map directly to the existing PreBashCall/PostBashCall events that all built-in presets (claude, codex, cursor, etc.) already use. The orchestrator, bash_tool stat-diff engine, and daemon require no changes. Note: The public docs at usegitai.com/docs/cli/add-your-agent should be updated to document the new types. Change-Id: I5786f59a4db94d5b9ec7716ec1cae9d1e3512fcd Reported-By: gujunxi@bytedance.com
The agent-v1 protocol previously only supported file-edit attribution (human/ai_agent types). This left a gap: when third-party agents execute shell commands (e.g. cargo fmt, npm install) that modify files, those changes were invisible to git-ai.
Add two new payload types to the agent-v1 protocol:
These map directly to the existing PreBashCall/PostBashCall events that all built-in presets (claude, codex, cursor, etc.) already use. The orchestrator, bash_tool stat-diff engine, and daemon require no changes.
Note: The public docs at usegitai.com/docs/cli/add-your-agent should be updated to document the new types.
Closes #1313