Skip to content

feat: report changed files to AIR - #403

Open
ignatov wants to merge 2 commits into
mainfrom
ignatov/air-agent-file-change-report
Open

feat: report changed files to AIR#403
ignatov wants to merge 2 commits into
mainfrom
ignatov/air-agent-file-change-report

Conversation

@ignatov

@ignatov ignatov commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • negotiate the opt-in AIR _meta.jetbrains.air.agentFileChangeReport capability
  • assign a unique requestId to each prompt and return canonical, workspace-bounded changed paths in response metadata
  • collect the report after each turn with an ephemeral read-only fork and strict structured output, covering shell commands, Git operations, and generators

The audit is best-effort and is inactive unless the client advertises the capability.

Safety

  • accept only a report tied to the current turn request
  • canonicalize filesystem aliases, including /tmp to /private/tmp on macOS
  • reject paths outside the session working directory and deduplicate valid paths

Tests

  • npm test
  • npm run typecheck
  • npm run build

Standard ACP diffs miss paths changed through opaque commands, Git operations, and generators.
When AIR negotiates the extension, run a bounded read-only ephemeral Codex audit and publish one correlated terminal report.

Keep report delivery fail-open so audit timeout, cancellation, or provider failure never blocks the user prompt.
macOS agents can report /private/tmp paths while the session cwd uses /tmp.
Canonicalize the nearest existing ancestors before containment checks, while
leaving the path leaf unresolved for deleted files and changed symlink nodes.
report: ReportedAgentFileChangeReport,
): ReportedAgentFileChangeReport {
const paths = [...report.paths];
let truncated = report.truncated;
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.

1 participant