Approval request
Record a request for an operation requiring approval.
op_sys_command_approval_requestOn this page
Use this capability
op-sys --output json tools call op_sys_command_approval_request \ --arguments '{"action":"<action>","reason":"<reason>","target_id":"<target_id>","target_type":"<target_type>"}'Request template: replace placeholder identities and supply complete contract-specific objects before use. Required arguments are shown; optional arguments are listed below. MCP requests assume an initialized connection.
Named CLI command: op-sys approval request. Use --help for command-specific flag syntax; the CLI/SDK/MCP examples share arguments; HTTP uses the documented route and body.
Parameters
Arguments are a JSON object. The published schema does not permit unknown top-level fields. Some retained CLI JSON flags are strings containing JSON; follow the declared type.
actionstringRequiredactorstringOptionalActor recorded on writes and audit entries.
Schema default:
"operator"allow_legacy_insecurebooleanOptionalHIGH: time-bounded untrusted v1/HMAC recovery; discard keystore.json, never import keys.
Schema default:
falseallow_unsignedbooleanOptionalHIGH: recover deliberately unsigned v2 data using a distinct reasoned one-shot approval.
Schema default:
falseapproval_contextstringOptionalartifact_kindstringOptionalartifact_pathstringOptionalbundlestringOptionalVerified state.import bundle used to build its exact operation intent.
comment_kindstringOptionalentity_typestringOptionalevent_typestringOptionalmax_archive_bytesintegerOptionalLower the ZIP archive bytes limit (1–17179869184; default 17179869184).
Schema default:
17179869184max_compression_ratiointegerOptionalLower the ZIP compression ratio limit (1–200; default 200).
Schema default:
200max_entriesintegerOptionalLower the ZIP entries limit (1–8192; default 8192).
Schema default:
8192max_entry_bytesintegerOptionalLower the ZIP entry bytes limit (1–34359738368; default 34359738368).
Schema default:
34359738368max_filename_bytesintegerOptionalLower the ZIP filename bytes limit (1–1024; default 1024).
Schema default:
1024max_path_depthintegerOptionalLower the ZIP path depth limit (1–16; default 16).
Schema default:
16max_total_bytesintegerOptionalLower the ZIP total bytes limit (1–68719476736; default 68719476736).
Schema default:
68719476736operation_jsonstringOptionalExact operation arguments as JSON; free-form effects are hashed in the review intent.
override_reasonstringOptionalExact non-secret recovery reason (one line, at most 1024 characters); repeat it unchanged for approval and import.
payloadstringOptionalConsumer-defined JSON value validated against the selected admitted contract.
reasonstringRequiredrelation_typestringOptionalsession_idstringOptionaltarget_idstringRequiredtarget_typestringRequiredttl_secondsintegerOptionalworker_idstringOptionalworkflowstringOptionalworkflow_versionstringOptional
Complete input JSON Schema
{ "additionalProperties": false, "properties": { "action": { "type": "string" }, "actor": { "default": "operator", "description": "Actor recorded on writes and audit entries.", "type": "string" }, "allow_legacy_insecure": { "default": false, "description": "HIGH: time-bounded untrusted v1/HMAC recovery; discard keystore.json, never import keys.", "type": "boolean" }, "allow_unsigned": { "default": false, "description": "HIGH: recover deliberately unsigned v2 data using a distinct reasoned one-shot approval.", "type": "boolean" }, "approval_context": { "type": "string" }, "artifact_kind": { "type": "string" }, "artifact_path": { "type": "string" }, "bundle": { "description": "Verified state.import bundle used to build its exact operation intent.", "type": "string" }, "comment_kind": { "type": "string" }, "entity_type": { "type": "string" }, "event_type": { "type": "string" }, "max_archive_bytes": { "default": 17179869184, "description": "Lower the ZIP archive bytes limit (1–17179869184; default 17179869184).", "type": "integer" }, "max_compression_ratio": { "default": 200, "description": "Lower the ZIP compression ratio limit (1–200; default 200).", "type": "integer" }, "max_entries": { "default": 8192, "description": "Lower the ZIP entries limit (1–8192; default 8192).", "type": "integer" }, "max_entry_bytes": { "default": 34359738368, "description": "Lower the ZIP entry bytes limit (1–34359738368; default 34359738368).", "type": "integer" }, "max_filename_bytes": { "default": 1024, "description": "Lower the ZIP filename bytes limit (1–1024; default 1024).", "type": "integer" }, "max_path_depth": { "default": 16, "description": "Lower the ZIP path depth limit (1–16; default 16).", "type": "integer" }, "max_total_bytes": { "default": 68719476736, "description": "Lower the ZIP total bytes limit (1–68719476736; default 68719476736).", "type": "integer" }, "operation_json": { "description": "Exact operation arguments as JSON; free-form effects are hashed in the review intent.", "type": "string" }, "override_reason": { "description": "Exact non-secret recovery reason (one line, at most 1024 characters); repeat it unchanged for approval and import.", "type": "string" }, "payload": { "type": "string" }, "reason": { "type": "string" }, "relation_type": { "type": "string" }, "session_id": { "type": "string" }, "target_id": { "type": "string" }, "target_type": { "type": "string" }, "ttl_seconds": { "type": "integer" }, "worker_id": { "type": "string" }, "workflow": { "type": "string" }, "workflow_version": { "type": "string" } }, "required": [ "action", "reason", "target_id", "target_type" ], "type": "object"}Behavior & authority
Local policy and approver configuration determine permission. Approval is scoped to its operation; it is not a blanket privilege escalation.
Rules shared by optional policies & approvals operations
- Inspect the requested action and current approval before deciding or revoking it.
- An approval record does not automatically execute an action. The consuming operation still performs its checks.
- Keep the original approval ID and operation binding when retrying. Audit history records decisions.
Response
Returns a payload under approval. See the output manual for field semantics and optional fields.
CLI tools/call result: payload.tool.result. Response envelopes across CLI, SDK and MCP ↗
The runtime does not publish a standalone response JSON Schema for this operation. Use the response description and linked output manual; the downloadable input schema is not a response contract.
Errors & retries
This operation uses the shared runtime error contract; no exhaustive operation-specific reason list is published.
For an uncertain write, preserve the original request and retry identity. On conflict, inspect current state before deciding what to change.