Skip to content

feat(agent-v1): add pre_bash_call/post_bash_call types#1514

Closed
blanet wants to merge 1 commit into
git-ai-project:mainfrom
blanet:main
Closed

feat(agent-v1): add pre_bash_call/post_bash_call types#1514
blanet wants to merge 1 commit into
git-ai-project:mainfrom
blanet:main

Conversation

@blanet

@blanet blanet commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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.

closes #1313


Open in Devin Review

…_use_id handling

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.

Additionally, align tool_use_id handling with other presets:
- Accept both snake_case (tool_use_id) and camelCase (toolUseId) via serde alias
- Pass through tool_use_id from payload for file-edit events; default to "bash" for bash-call events

Change-Id: I5786f59a4db94d5b9ec7716ec1cae9d1e3512fcd
Reported-By: gujunxi@bytedance.com
@blanet blanet changed the title feat(agent-v1): add pre_bash_call/post_bash_call types and align tool… feat(agent-v1): add pre_bash_call/post_bash_call types Jun 8, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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.

agent-v1 protocol lacks support for shell command attribution

1 participant