Skip to content

feat: richer block context from platform#15

Merged
saurabhjain1592 merged 3 commits intomainfrom
feat/plugin-batch-1
Apr 18, 2026
Merged

feat: richer block context from platform#15
saurabhjain1592 merged 3 commits intomainfrom
feat/plugin-batch-1

Conversation

@saurabhjain1592
Copy link
Copy Markdown
Member

Summary

Codex plugin half of Plugin Batch 1 (ADR-042 + ADR-043). Pre-tool-check hook's stderr message on block now surfaces decision_id, risk_level, and override availability from platform v7.1.0+.

Version: 0.3.0 → 0.4.0

Tests

Full 52-test suite green.

Companion to: axonflow-enterprise PR #1605, sdk-go PR #122, sdk-python PR #141, sdk-typescript PR #175, sdk-java PR #128, openclaw-plugin PR #44, claude-plugin PR #28, cursor-plugin PR #16.

Codex plugin half of ADR-042 + ADR-043 approval-context enrichment.

Hook changes (scripts/pre-tool-check.sh):
- Parse four new optional fields from the platform's check_policy
  response: decision_id, risk_level, override_available,
  override_existing_id. All are omitempty on older platforms.
- When exec_command is blocked (exit 2), the stderr reason now includes
  bracketed context with decision ID, risk level, and either the
  active override ID or a pointer to the explain_decision MCP tool.
- Absent context falls back to the v0.3.0 message shape.

Version: 0.3.0 -> 0.4.0 (.codex-plugin/plugin.json + marketplace.json).

Tests: full 52-test suite green.

Companion to:
- Platform v7.1.0 (axonflow-enterprise PR #1605)
- Go v5.4.0, Python v6.4.0, TypeScript v5.4.0, Java v5.4.0
- OpenClaw v1.3.0 (PR #44), Claude Code v0.5.0 (PR #28), Cursor v0.5.0 (PR #16)
@saurabhjain1592 saurabhjain1592 added the enhancement New feature or request label Apr 17, 2026
Mirrors the fix in claude-plugin + cursor-plugin. setup_telemetry_test()
unsets DO_NOT_TRACK so opt-out tests can exercise the ping path, but
didn't export AXONFLOW_CHECKPOINT_URL — so the subset of telemetry tests
that didn't set the URL themselves fell through to the real production
endpoint and fired live pings on every suite run.

Fix: export AXONFLOW_CHECKPOINT_URL=http://127.0.0.1:$MOCK_PORT/v1/ping
inside setup_telemetry_test(); teardown unsets it.

Full 52-test suite green.
@saurabhjain1592 saurabhjain1592 changed the title Plugin Batch 1: richer block context from platform feat: richer block context from platform Apr 17, 2026
@saurabhjain1592 saurabhjain1592 merged commit 8f74d7f into main Apr 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant