State import operation
Describe the exact import operation before approval.
op_sys_command_state_import_operationOn this page
Use this capability
op-sys --output json tools call op_sys_command_state_import_operation \ --arguments '{"bundle":"<bundle>"}'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 state import-operation. 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.
actorstringOptionalActor 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:
falsebundlestringRequiredmax_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:
68719476736override_reasonstringOptionalExact non-secret recovery reason (one line, at most 1024 characters); repeat it unchanged for approval and import.
Complete input JSON Schema
{ "additionalProperties": false, "properties": { "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" }, "bundle": { "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" }, "override_reason": { "description": "Exact non-secret recovery reason (one line, at most 1024 characters); repeat it unchanged for approval and import.", "type": "string" } }, "required": [ "bundle" ], "type": "object"}Behavior & authority
Use an owner-private state root. Imports require the applicable policy, trust and approval; verification alone never grants replacement authority.
Rules shared by state portability & schema operations
- Stop every writer before a state import. This replaces state offline; it is not synchronization or a cross-ledger merge.
- Verify provenance and database compatibility before admission. Unsigned or merely cryptographically valid data is not necessarily trusted.
- Schema inspection is read-only; migration requires its explicit confirmation. Unsupported layouts are not silently rewritten.
- On an interrupted restore, preserve receipts and backups, keep writers stopped and follow documented recovery. Do not repeatedly import into an uncertain target.
Response
Returns the command’s structured payload. The runtime output manual documents the payload families; no standalone response JSON Schema is published for this operation.
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
bundle_restore_recovery_required- Keep writers stopped and retain private recovery receipts for explicit recovery.
state_permissions_unsecured- The runtime cannot prove safe ownership or path handling.
schema_migration_busy- Stop competing writers before retrying the bounded migration operation.
The family-level reasons above are representative, not an exhaustive operation error list.
For an uncertain write, preserve the original request and retry identity. On conflict, inspect current state before deciding what to change.