-
Notifications
You must be signed in to change notification settings - Fork 0
feat(events): promote permission/request, permission/denied, stop/failure families (#258 v2 s3) #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat(events): promote permission/request, permission/denied, stop/failure families (#258 v2 s3) #358
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "agent-bundle": patch | ||
| --- | ||
|
|
||
| Promote the `permission/request`, `permission/denied`, and `stop/failure` canonical event-route families. `permission/request` projects allow/deny decisions through the pinned PermissionRequest output contract on Claude Code and Codex (input rewrite stays fail-closed as reserved upstream); `permission/denied` and `stop/failure` are observation-only Claude families with fail-closed rejection of decision or context output. Codex permission-request wire schemas are byte-pinned from the rust-v0.147.0 tag; hosts without a documented native event carry dated `unavailable` capability rows. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...-bundle/src/adapters/schemas/codex/generated/permission-request.command.input.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "additionalProperties": false, | ||
| "definitions": { | ||
| "NullableString": { | ||
| "type": [ | ||
| "string", | ||
| "null" | ||
| ] | ||
| } | ||
| }, | ||
| "properties": { | ||
| "agent_id": { | ||
| "type": "string" | ||
| }, | ||
| "agent_type": { | ||
| "type": "string" | ||
| }, | ||
| "cwd": { | ||
| "type": "string" | ||
| }, | ||
| "hook_event_name": { | ||
| "const": "PermissionRequest", | ||
| "type": "string" | ||
| }, | ||
| "model": { | ||
| "type": "string" | ||
| }, | ||
| "permission_mode": { | ||
| "enum": [ | ||
| "default", | ||
| "acceptEdits", | ||
| "plan", | ||
| "dontAsk", | ||
| "bypassPermissions" | ||
| ], | ||
| "type": "string" | ||
| }, | ||
| "session_id": { | ||
| "type": "string" | ||
| }, | ||
| "tool_input": true, | ||
| "tool_name": { | ||
| "type": "string" | ||
| }, | ||
| "transcript_path": { | ||
| "$ref": "#/definitions/NullableString" | ||
| }, | ||
| "turn_id": { | ||
| "description": "Codex extension: expose the active turn id to internal turn-scoped hooks.", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "cwd", | ||
| "hook_event_name", | ||
| "model", | ||
| "permission_mode", | ||
| "session_id", | ||
| "tool_input", | ||
| "tool_name", | ||
| "transcript_path", | ||
| "turn_id" | ||
| ], | ||
| "title": "permission-request.command.input", | ||
| "type": "object" | ||
| } |
91 changes: 91 additions & 0 deletions
91
...bundle/src/adapters/schemas/codex/generated/permission-request.command.output.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "additionalProperties": false, | ||
| "definitions": { | ||
| "PermissionRequestBehaviorWire": { | ||
| "enum": [ | ||
| "allow", | ||
| "deny" | ||
| ], | ||
| "type": "string" | ||
| }, | ||
| "PermissionRequestDecisionWire": { | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "behavior": { | ||
| "$ref": "#/definitions/PermissionRequestBehaviorWire" | ||
| }, | ||
| "interrupt": { | ||
| "default": false, | ||
| "description": "Reserved for future short-circuiting semantics.\n\nPermissionRequest hooks currently fail closed if this field is `true`.", | ||
| "type": "boolean" | ||
| }, | ||
| "message": { | ||
| "default": null, | ||
| "type": "string" | ||
| }, | ||
| "updatedInput": { | ||
| "default": null, | ||
| "description": "Reserved for a future input-rewrite capability.\n\nPermissionRequest hooks currently fail closed if this field is present." | ||
| }, | ||
| "updatedPermissions": { | ||
| "default": null, | ||
| "description": "Reserved for a future permission-rewrite capability.\n\nPermissionRequest hooks currently fail closed if this field is present." | ||
| } | ||
| }, | ||
| "required": [ | ||
| "behavior" | ||
| ], | ||
| "type": "object" | ||
| }, | ||
| "PermissionRequestHookSpecificOutputWire": { | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "decision": { | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/definitions/PermissionRequestDecisionWire" | ||
| } | ||
| ], | ||
| "default": null | ||
| }, | ||
| "hookEventName": { | ||
| "const": "PermissionRequest", | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "hookEventName" | ||
| ], | ||
| "type": "object" | ||
| } | ||
| }, | ||
| "properties": { | ||
| "continue": { | ||
| "default": true, | ||
| "type": "boolean" | ||
| }, | ||
| "hookSpecificOutput": { | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/definitions/PermissionRequestHookSpecificOutputWire" | ||
| } | ||
| ], | ||
| "default": null | ||
| }, | ||
| "stopReason": { | ||
| "default": null, | ||
| "type": "string" | ||
| }, | ||
| "suppressOutput": { | ||
| "default": false, | ||
| "type": "boolean" | ||
| }, | ||
| "systemMessage": { | ||
| "default": null, | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "title": "permission-request.command.output", | ||
| "type": "object" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an artifact produced before this change is validated after upgrading, Claude, Codex, and the unified plugin still expose their previous
adapterRevisionvalues despite now mapping and generating additional event-route contracts.matchesTargetMetadatauses that revision together with the unchanged observed version/schema metadata as its compatibility check, so the old artifact can be accepted as matching the newly registered adapter contract; bump the affected direct and unified adapter revisions as was done for the preceding event-family promotion.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed on main in #364 (merge 305161a).