@cygnuxlabs/tracekit 1.7.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/v2/client.d.ts +25 -3
- package/dist/v2/client.js +144 -24
- package/dist/v2/executor.d.ts +11 -2
- package/dist/v2/executor.js +40 -0
- package/dist/v2/rpc_schema.d.ts +1 -1
- package/dist/v2/rpc_schema.js +7 -5
- package/dist/verify/detect.d.ts +2 -0
- package/dist/verify/detect.js +1 -1
- package/dist/verify/explain.js +27 -0
- package/dist/verify/index.d.ts +12 -2
- package/dist/verify/index.js +300 -25
- package/dist/verify/labels.d.ts +46 -0
- package/dist/verify/labels.js +238 -0
- package/dist/verify/rx.d.ts +31 -0
- package/dist/verify/rx.js +355 -0
- package/dist/verify/tracekit.event.v2.json +691 -1
- package/dist/verify/versions.json +2 -1
- package/dist/verify.html +934 -31
- package/package.json +5 -5
package/dist/v2/rpc_schema.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export const RPC_VERSION =
|
|
1
|
+
export const RPC_VERSION = 29;
|
|
2
2
|
export const REQUESTS = {
|
|
3
3
|
"register_run": { "type": "object", "additionalProperties": false, "required": ["request_id", "agent"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "principal": { "type": "string", "maxLength": 256 }, "principal_token": { "type": "string", "maxLength": 16384 }, "source": { "const": "migrated" }, "analyzes": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "replay_of": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "investigation": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "parent": { "type": "object", "additionalProperties": false, "required": ["run_id", "run_token"], "properties": { "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 } } }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "box": { "type": "object", "additionalProperties": false, "required": ["id", "image_digest", "allow"], "properties": { "id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "image_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "channel": { "const": "agent" }, "allow": { "type": "array", "maxItems": 256, "items": { "type": "string", "maxLength": 261, "minLength": 1, "pattern": "^[A-Za-z0-9.*:\\[\\]_-]+(?![\\s\\S])" } } } }, "continues": { "const": true }, "agent": { "type": "object", "additionalProperties": false, "required": ["name"], "properties": { "name": { "type": "string", "maxLength": 128, "minLength": 1 }, "version": { "type": "string", "maxLength": 64 } } } } },
|
|
4
|
-
"decide": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "stream", "client_seq", "tool_call_id", "tool", "args_source", "args"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "tool": { "type": "string", "maxLength": 256, "minLength": 1 }, "tool_class_hint": { "type": "string", "maxLength": 64 }, "args_source": { "enum": ["raw", "parsed", "coerced"] }, "args": {} }, "if": { "properties": { "args_source": { "const": "raw" } } }, "then": { "properties": { "args": { "type": "string", "maxLength": 1048576 } } } },
|
|
4
|
+
"decide": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "stream", "client_seq", "tool_call_id", "tool", "args_source", "args"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "tool": { "type": "string", "maxLength": 256, "minLength": 1 }, "tool_class_hint": { "type": "string", "maxLength": 64 }, "agent_id": { "type": "string", "maxLength": 200, "minLength": 1 }, "args_source": { "enum": ["raw", "parsed", "coerced"] }, "args": {} }, "if": { "properties": { "args_source": { "const": "raw" } } }, "then": { "properties": { "args": { "type": "string", "maxLength": 1048576 } } } },
|
|
5
5
|
"complete": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "stream", "client_seq", "tool_call_id", "decision_id", "args_digest", "status"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "decision_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "args_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "status": { "enum": ["ok", "error"] }, "result": {}, "error": { "type": "string", "maxLength": 4096 }, "redacted": { "const": true }, "redaction": { "type": "object", "additionalProperties": false, "required": [], "properties": { "rules": { "type": "array", "maxItems": 32, "items": { "type": "string", "maxLength": 64 } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } } } },
|
|
6
6
|
"observe": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "stream", "client_seq", "source", "trust", "value"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "source": { "type": "string", "maxLength": 256, "minLength": 1 }, "trust": { "enum": ["trusted", "untrusted"] }, "value": {} } },
|
|
7
7
|
"state_write": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "stream", "client_seq", "key", "value_digest"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "key": { "type": "string", "maxLength": 256, "minLength": 1 }, "value_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "prev_digest": { "oneOf": [{ "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, { "type": "null" }] } } },
|
|
8
8
|
"model_event": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "stream", "client_seq", "provider", "model", "phase"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "provider": { "type": "string", "maxLength": 64 }, "model": { "type": "string", "maxLength": 128 }, "phase": { "enum": ["request", "response"] }, "content_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "exchange_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "streamed": { "type": "boolean" }, "stop_reason": { "type": "string", "maxLength": 100 }, "error": { "type": "string", "maxLength": 1024 }, "usage": { "type": "object", "additionalProperties": false, "required": [], "properties": { "input_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "output_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cache_read_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "cache_write_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "reasoning_tokens": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } }, "tool_uses": { "type": "array", "maxItems": 128, "items": { "type": "object", "additionalProperties": false, "required": ["id", "name", "executed_by"], "properties": { "id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "name": { "type": "string", "maxLength": 256, "minLength": 1 }, "executed_by": { "enum": ["client", "provider"] }, "args_source": { "enum": ["raw", "parsed", "coerced"] }, "args_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "args_unparseable": { "const": true }, "id_synthetic": { "const": true } }, "oneOf": [{ "additionalProperties": false, "properties": { "id": {}, "name": {}, "executed_by": { "const": "provider" }, "id_synthetic": {} } }, { "required": ["args_source", "args_digest"], "additionalProperties": false, "properties": { "id": {}, "name": {}, "executed_by": { "const": "provider" }, "id_synthetic": {}, "args_source": {}, "args_digest": {} } }, { "required": ["args_source", "args_digest"], "properties": { "executed_by": { "const": "client" } } }, { "required": ["args_source", "args_unparseable"], "properties": { "executed_by": { "const": "client" } } }] } }, "said_only": { "const": true }, "tool_results_sent": { "type": "array", "maxItems": 1024, "items": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } }, "tool_results": { "type": "array", "maxItems": 1024, "items": { "type": "object", "additionalProperties": false, "required": ["id", "forms"], "properties": { "id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "forms": { "type": "array", "minItems": 1, "maxItems": 3, "items": { "type": "object", "additionalProperties": false, "required": ["digest", "result_digest"], "properties": { "digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "result_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" } } } } } } }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "amended": { "type": "array", "minItems": 1, "maxItems": 16, "items": { "type": "string", "maxLength": 256, "pattern": "^(/([^~/]|~[01])*)+(?![\\s\\S])" } }, "body": {} } },
|
|
9
|
-
"approval_request": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "tool_call_id"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
10
|
-
"approval_decide": { "type": "object", "additionalProperties": false, "required": ["request_id", "approval_id", "decision"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "decision": { "enum": ["approve", "reject", "escalate"] }, "reason": { "type": "string", "maxLength": 1024 }, "on_behalf": { "type": "object", "additionalProperties": false, "required": ["subject", "person"], "properties": { "subject": { "type": "string", "maxLength": 256, "minLength": 1 }, "person": { "type": "string", "maxLength": 256, "minLength": 1 }, "groups": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } }, "passkey": { "type": "object", "additionalProperties": false, "required": ["credential_id", "client_data_json", "authenticator_data", "signature"], "properties": { "credential_id": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" }, "client_data_json": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" }, "authenticator_data": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" }, "signature": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" } } }, "asserted": { "type": "object", "additionalProperties": false, "required": [], "properties": { "model": { "type": "string", "maxLength": 128 }, "version": { "type": "string", "maxLength": 64 }, "prompt_hash": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" } } } } },
|
|
9
|
+
"approval_request": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "tool_call_id"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "reason": { "type": "string", "maxLength": 1024 }, "project": { "type": "string", "maxLength": 1024, "minLength": 1 } } },
|
|
10
|
+
"approval_decide": { "type": "object", "additionalProperties": false, "required": ["request_id", "approval_id", "decision"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "decision": { "enum": ["approve", "reject", "escalate"] }, "reason": { "type": "string", "maxLength": 1024 }, "on_behalf": { "type": "object", "additionalProperties": false, "required": ["subject", "person"], "properties": { "subject": { "type": "string", "maxLength": 256, "minLength": 1 }, "person": { "type": "string", "maxLength": 256, "minLength": 1 }, "groups": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } }, "passkey": { "type": "object", "additionalProperties": false, "required": ["credential_id", "client_data_json", "authenticator_data", "signature"], "properties": { "credential_id": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" }, "client_data_json": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" }, "authenticator_data": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" }, "signature": { "type": "string", "maxLength": 4096, "minLength": 1, "pattern": "^[A-Za-z0-9_-]+(?![\\s\\S])" } } }, "asserted": { "type": "object", "additionalProperties": false, "required": [], "properties": { "model": { "type": "string", "maxLength": 128 }, "version": { "type": "string", "maxLength": 64 }, "prompt_hash": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" } } }, "ai": { "type": "object", "additionalProperties": false, "required": ["answers"], "properties": { "answers": { "type": "array", "minItems": 1, "maxItems": 2, "items": { "type": "object", "additionalProperties": false, "required": ["model", "decision"], "properties": { "model": { "type": "string", "maxLength": 128, "minLength": 1 }, "decision": { "enum": ["approve", "reject", "escalate"] }, "identity": { "type": "string", "maxLength": 256, "minLength": 1 } } } } } }, "view_digest": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" } } },
|
|
11
11
|
"approval_decide_on_behalf": { "type": "object", "additionalProperties": false, "required": ["request_id", "approval_id", "decision", "approver"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "decision": { "enum": ["approve", "reject"] }, "approver": { "type": "string", "maxLength": 64, "pattern": "^slack:[A-Z0-9]+/[A-Z0-9]+(?![\\s\\S])" }, "groups": { "type": "array", "maxItems": 32, "items": { "type": "string", "maxLength": 64, "pattern": "^slack:[A-Z0-9]+/[A-Z0-9]+(?![\\s\\S])" } } } },
|
|
12
12
|
"approval_wait": { "type": "object", "additionalProperties": false, "required": ["run_id", "run_token", "approval_id"], "properties": { "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "timeout_ms": { "type": "integer", "minimum": 0, "maximum": 300000 } } },
|
|
13
13
|
"approval_consume": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "tool_call_id", "tool", "args_source", "args"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "tool": { "type": "string", "maxLength": 256, "minLength": 1 }, "args_source": { "enum": ["raw", "parsed", "coerced"] }, "args": {}, "approval_id_hint": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } }, "if": { "properties": { "args_source": { "const": "raw" } } }, "then": { "properties": { "args": { "type": "string", "maxLength": 1048576 } } } },
|
|
14
14
|
"approval_get": { "type": "object", "additionalProperties": false, "required": ["approval_id"], "properties": { "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "on_behalf": { "type": "object", "additionalProperties": false, "required": ["subject", "person"], "properties": { "subject": { "type": "string", "maxLength": 256, "minLength": 1 }, "person": { "type": "string", "maxLength": 256, "minLength": 1 }, "groups": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } } } },
|
|
15
|
-
"approval_list": { "type": "object", "additionalProperties": false, "required": [], "properties": { "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "cursor": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "limit": { "type": "integer", "minimum": 1, "maximum": 1000 }, "on_behalf": { "type": "object", "additionalProperties": false, "required": ["subject", "person"], "properties": { "subject": { "type": "string", "maxLength": 256, "minLength": 1 }, "person": { "type": "string", "maxLength": 256, "minLength": 1 }, "groups": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } }, "state": { "enum": ["requested", "approved", "rejected", "expired", "consumed"] }, "escalated": { "type": "boolean" }, "for": { "enum": ["agent", "person"] } } },
|
|
15
|
+
"approval_list": { "type": "object", "additionalProperties": false, "required": [], "properties": { "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "cursor": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "limit": { "type": "integer", "minimum": 1, "maximum": 1000 }, "on_behalf": { "type": "object", "additionalProperties": false, "required": ["subject", "person"], "properties": { "subject": { "type": "string", "maxLength": 256, "minLength": 1 }, "person": { "type": "string", "maxLength": 256, "minLength": 1 }, "groups": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } }, "state": { "enum": ["requested", "approved", "rejected", "expired", "consumed"] }, "escalated": { "type": "boolean" }, "ended": { "type": "boolean" }, "for": { "enum": ["agent", "person"] } } },
|
|
16
16
|
"approval_review": { "type": "object", "additionalProperties": false, "required": ["approval_id"], "properties": { "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } },
|
|
17
17
|
"approval_revoke": { "type": "object", "additionalProperties": false, "required": ["request_id", "approval_id"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "reason": { "type": "string", "maxLength": 1024 }, "on_behalf": { "type": "object", "additionalProperties": false, "required": ["subject", "person"], "properties": { "subject": { "type": "string", "maxLength": 256, "minLength": 1 }, "person": { "type": "string", "maxLength": 256, "minLength": 1 }, "groups": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 256 } }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } } } },
|
|
18
18
|
"approval_agents": { "type": "object", "additionalProperties": false, "required": ["request_id", "enabled"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "enabled": { "type": "boolean" }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
19
|
+
"approver": { "type": "object", "additionalProperties": false, "required": ["action"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "action": { "enum": ["status", "on", "off", "accept", "retire", "drop", "revoke", "enable"] }, "id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "rules": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "type": "string", "maxLength": 64 } }, "reason": { "type": "string", "maxLength": 1024 } }, "oneOf": [{ "properties": { "action": { "const": "status" } } }, { "properties": { "action": { "enum": ["on", "off", "accept", "retire", "drop", "revoke", "enable"] } }, "required": ["request_id"] }] },
|
|
19
20
|
"approval_abandon": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "approval_id"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
20
21
|
"close_run": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "reason": { "type": "string", "maxLength": 256 }, "caller": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "last_client_seq": { "type": "array", "maxItems": 64, "items": { "type": "object", "additionalProperties": false, "required": ["stream", "client_seq"], "properties": { "stream": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "client_seq": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } } } } } },
|
|
21
22
|
"delegate_run": { "type": "object", "additionalProperties": false, "required": ["run_id", "run_token", "identity"], "properties": { "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "identity": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" } } },
|
|
@@ -42,6 +43,7 @@ export const REQUESTS = {
|
|
|
42
43
|
"response_resume": { "type": "object", "additionalProperties": false, "required": ["request_id"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
43
44
|
"suspend": { "type": "object", "additionalProperties": false, "required": ["request_id", "identity"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "identity": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
44
45
|
"unsuspend": { "type": "object", "additionalProperties": false, "required": ["request_id", "identity"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "identity": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
46
|
+
"run_label_clear": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "label"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "label": { "enum": ["secrets_access", "untrusted_content"] }, "reason": { "type": "string", "maxLength": 1024 } } },
|
|
45
47
|
"pcm_sign": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "message"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "message": { "type": "object", "additionalProperties": false, "required": ["from", "to", "intent"], "properties": { "to": { "type": "object", "additionalProperties": false, "required": ["agent"], "properties": { "agent": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" } } }, "intent": { "type": "object", "additionalProperties": false, "required": ["type", "args"], "properties": { "type": { "type": "string", "maxLength": 136, "pattern": "^[a-z][a-z0-9_.-]{0,63}@sha256:[0-9a-f]{64}(?![\\s\\S])" }, "args": {} } }, "claims": { "type": "array", "maxItems": 8, "items": { "type": "object", "additionalProperties": false, "required": ["type", "args"], "properties": { "type": { "enum": ["tests_passed", "approved_by", "reached_host", "file_written"] }, "args": {}, "evidence": { "type": "object", "additionalProperties": false, "required": ["checkpoint", "records"], "properties": { "checkpoint": { "type": "string", "maxLength": 16384, "minLength": 1 }, "records": { "type": "array", "minItems": 1, "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "required": ["event", "hash", "proof"], "properties": { "event": {}, "hash": { "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, "proof": { "type": "array", "maxItems": 64, "items": { "type": "string", "maxLength": 44 } }, "salt": { "type": "string", "maxLength": 64, "pattern": "^[0-9a-f]{64}(?![\\s\\S])" }, "args": {} } } } } } } } }, "grants": { "type": "array", "maxItems": 8, "items": { "type": "object", "additionalProperties": false, "required": ["pcm_grant", "ts", "issuer", "subject", "intent", "caveats", "expires_at", "delegable", "parent", "sig"], "properties": { "pcm_grant": { "type": "integer", "const": 0 }, "ts": { "type": "string", "maxLength": 27, "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z(?![\\s\\S])" }, "issuer": { "type": "object", "additionalProperties": false, "required": ["kind", "id", "run", "tenant"], "properties": { "kind": { "enum": ["person", "agent"] }, "id": { "type": "string", "maxLength": 256 }, "person": { "type": "string", "maxLength": 256 }, "run": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } }, "subject": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "intent": { "type": "string", "maxLength": 136, "pattern": "^[a-z][a-z0-9_.-]{0,63}@sha256:[0-9a-f]{64}(?![\\s\\S])" }, "caveats": { "type": "array", "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "required": ["field", "op", "value"], "properties": { "field": { "type": "string", "maxLength": 64, "pattern": "^[a-z][a-z0-9_]*(?![\\s\\S])" }, "op": { "enum": ["==", "<=", ">=", "<", ">", "in"] }, "value": {} } } }, "expires_at": { "type": "string", "maxLength": 27, "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z(?![\\s\\S])" }, "delegable": { "type": "boolean" }, "parent": { "oneOf": [{ "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, { "type": "null" }] }, "sig": { "type": "object", "additionalProperties": false, "required": ["key", "sig"], "properties": { "key": { "type": "string", "maxLength": 300, "minLength": 1 }, "sig": { "type": "string", "maxLength": 88 } } } } } }, "payload": { "oneOf": [{ "type": "object", "additionalProperties": false, "required": ["kind", "text"], "properties": { "kind": { "const": "text" }, "text": { "type": "string", "maxLength": 65536 } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "data"], "properties": { "kind": { "const": "data" }, "data": {} } }] }, "from": { "type": "object", "additionalProperties": false, "required": ["agent", "run", "tenant"], "properties": { "agent": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "run": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } } } } } },
|
|
46
48
|
"pcm_grant": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "tool_call_id", "args"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "tool_call_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "attempt": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "args": { "type": "object", "additionalProperties": false, "required": ["subject", "intent", "expires_at", "delegable"], "properties": { "subject": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "intent": { "type": "string", "maxLength": 136, "pattern": "^[a-z][a-z0-9_.-]{0,63}@sha256:[0-9a-f]{64}(?![\\s\\S])" }, "caveats": { "type": "array", "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "required": ["field", "op", "value"], "properties": { "field": { "type": "string", "maxLength": 64, "pattern": "^[a-z][a-z0-9_]*(?![\\s\\S])" }, "op": { "enum": ["==", "<=", ">=", "<", ">", "in"] }, "value": {} } } }, "expires_at": { "type": "string", "maxLength": 27, "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z(?![\\s\\S])" }, "delegable": { "type": "boolean" } } } } },
|
|
47
49
|
"pcm_delegate": { "type": "object", "additionalProperties": false, "required": ["request_id", "run_id", "run_token", "parent", "subject", "expires_at", "delegable"], "properties": { "request_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "run_token": { "type": "string", "maxLength": 1024, "minLength": 1 }, "parent": { "type": "object", "additionalProperties": false, "required": ["pcm_grant", "ts", "issuer", "subject", "intent", "caveats", "expires_at", "delegable", "parent", "sig"], "properties": { "pcm_grant": { "type": "integer", "const": 0 }, "ts": { "type": "string", "maxLength": 27, "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z(?![\\s\\S])" }, "issuer": { "type": "object", "additionalProperties": false, "required": ["kind", "id", "run", "tenant"], "properties": { "kind": { "enum": ["person", "agent"] }, "id": { "type": "string", "maxLength": 256 }, "person": { "type": "string", "maxLength": 256 }, "run": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "tenant": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" }, "approval_id": { "type": "string", "maxLength": 128, "minLength": 1, "pattern": "^[A-Za-z0-9._:-]+(?![\\s\\S])" } } }, "subject": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "intent": { "type": "string", "maxLength": 136, "pattern": "^[a-z][a-z0-9_.-]{0,63}@sha256:[0-9a-f]{64}(?![\\s\\S])" }, "caveats": { "type": "array", "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "required": ["field", "op", "value"], "properties": { "field": { "type": "string", "maxLength": 64, "pattern": "^[a-z][a-z0-9_]*(?![\\s\\S])" }, "op": { "enum": ["==", "<=", ">=", "<", ">", "in"] }, "value": {} } } }, "expires_at": { "type": "string", "maxLength": 27, "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z(?![\\s\\S])" }, "delegable": { "type": "boolean" }, "parent": { "oneOf": [{ "type": "string", "maxLength": 71, "pattern": "^sha256:[0-9a-f]{64}(?![\\s\\S])" }, { "type": "null" }] }, "sig": { "type": "object", "additionalProperties": false, "required": ["key", "sig"], "properties": { "key": { "type": "string", "maxLength": 300, "minLength": 1 }, "sig": { "type": "string", "maxLength": 88 } } } } }, "subject": { "type": "string", "maxLength": 256, "pattern": "^[a-z0-9_]+:[^\\n]+(?![\\s\\S])" }, "caveats": { "type": "array", "maxItems": 16, "items": { "type": "object", "additionalProperties": false, "required": ["field", "op", "value"], "properties": { "field": { "type": "string", "maxLength": 64, "pattern": "^[a-z][a-z0-9_]*(?![\\s\\S])" }, "op": { "enum": ["==", "<=", ">=", "<", ">", "in"] }, "value": {} } } }, "expires_at": { "type": "string", "maxLength": 27, "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z(?![\\s\\S])" }, "delegable": { "type": "boolean" } } },
|
package/dist/verify/detect.d.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* for the verifier's `incidents` check. A port kept in step with the reference by tests/test_ts_verifier.py.
|
|
4
4
|
*/
|
|
5
5
|
type J = any;
|
|
6
|
+
/** fnmatch.fnmatchcase's pattern as a RegExp: `*`, `?` and `[...]` (`[!...]` negated). */
|
|
7
|
+
export declare function glob(pat: string): RegExp;
|
|
6
8
|
type Fired = [string, string[], string, {
|
|
7
9
|
kind: string;
|
|
8
10
|
id: string;
|
package/dist/verify/detect.js
CHANGED
|
@@ -10,7 +10,7 @@ function ts(t) {
|
|
|
10
10
|
return (Date.parse(m[1] + "Z") / 1000 * 1e6 + Number((m[2] ?? "").padEnd(6, "0"))) / 1e6;
|
|
11
11
|
}
|
|
12
12
|
/** fnmatch.fnmatchcase's pattern as a RegExp: `*`, `?` and `[...]` (`[!...]` negated). */
|
|
13
|
-
function glob(pat) {
|
|
13
|
+
export function glob(pat) {
|
|
14
14
|
let out = "";
|
|
15
15
|
for (let i = 0; i < pat.length; i++) {
|
|
16
16
|
const c = pat[i], end = c === "[" ? pat.indexOf("]", i + 2) : -1;
|
package/dist/verify/explain.js
CHANGED
|
@@ -212,6 +212,14 @@ export const MEANING = {
|
|
|
212
212
|
},
|
|
213
213
|
"incident policies": { warn: "Policies an incident cites that aren't in the bundle: those incidents are the "
|
|
214
214
|
+ "signer's word." },
|
|
215
|
+
"run labels": {
|
|
216
|
+
pass: "What each run had done that its run conditions read (a secret read, untrusted content), replayed from its "
|
|
217
|
+
+ "records under its policy, and what it inherited from another run of the same requester.",
|
|
218
|
+
fail: "A run label was added without a record that sets it, left out after one, or cleared by the run's own owner, "
|
|
219
|
+
+ "or a call was held under a label the run didn't carry.",
|
|
220
|
+
},
|
|
221
|
+
"label policies": { warn: "Policies runs were decided under that neither the bundle nor the trust config carries: "
|
|
222
|
+
+ "their labels are the signer's word, and one it left out wouldn't show." },
|
|
215
223
|
"content vault": { pass: "Who read or erased retained content, as the signer recorded it." },
|
|
216
224
|
"tiers": {
|
|
217
225
|
pass: "Tool calls by how they were captured: T2 gateway or executor, T1 adapter, T3 import (receipt only).",
|
|
@@ -236,6 +244,20 @@ export const MEANING = {
|
|
|
236
244
|
+ "lacks the policy they were held under.",
|
|
237
245
|
fail: "An agent approved a call the rules for agent approvals don't let it approve.",
|
|
238
246
|
},
|
|
247
|
+
"AI approvals": {
|
|
248
|
+
pass: "Held calls an AI approver answered, each yes with two model answers that agree and a person's earlier yes "
|
|
249
|
+
+ "to a call like it, checked where the bundle holds that yes.",
|
|
250
|
+
fail: "An AI approver's yes decided a call without two answers that agree, without a person's earlier yes to a "
|
|
251
|
+
+ "call like it, with a person's rejection of a call like it, or on an earlier yes that doesn't hold: another "
|
|
252
|
+
+ "kind of call, a self-approval or break-glass answer, a run that wasn't clean, given after it or over 30 days "
|
|
253
|
+
+ "before it, or revoked before it.",
|
|
254
|
+
},
|
|
255
|
+
"AI run bound": {
|
|
256
|
+
pass: "AI approvals in runs that carried a label (a secret read, say), each checked against the run bound of the "
|
|
257
|
+
+ "policy it was decided under: none of those labels closed the run to the AI approver.",
|
|
258
|
+
fail: "An AI approver's yes in a run whose label the policy's run bound names, or one whose policy snapshot the "
|
|
259
|
+
+ "bundle doesn't hold, so nothing shows the run bound allowed it. Export with the policy snapshots.",
|
|
260
|
+
},
|
|
239
261
|
"break-glass approvals": { warn: "Approvals given under the break-glass role, with who and why." },
|
|
240
262
|
"not interpreted": { warn: "Records carry an extension this verifier doesn't read. They verified like every other "
|
|
241
263
|
+ "record." },
|
|
@@ -247,6 +269,11 @@ export const MEANING = {
|
|
|
247
269
|
warn: "A record carries a gateway amendment where or how the signer never writes one. The record verified like "
|
|
248
270
|
+ "every other.",
|
|
249
271
|
},
|
|
272
|
+
"approval decision": {
|
|
273
|
+
pass: "Each used approval names the decision it ran under: one of the same call and attempt, signed before the use.",
|
|
274
|
+
warn: "A used approval names a decision the bundle doesn't hold before it, of another call or attempt, or no "
|
|
275
|
+
+ "decision at all: the signer never writes that. The record verified like every other.",
|
|
276
|
+
},
|
|
250
277
|
"openshell policy": {
|
|
251
278
|
pass: "Changes of the sandbox's policy or configuration that NVIDIA OpenShell reported, signed into the run as "
|
|
252
279
|
+ "OpenShell's report.",
|
package/dist/verify/index.d.ts
CHANGED
|
@@ -23,10 +23,10 @@ import { type Floats } from "./jcs.js";
|
|
|
23
23
|
export { MAX_ENTRIES, MAX_ENTRY, MAX_TOTAL, Unusable, readZip } from "./zip.js";
|
|
24
24
|
export { StrictJSONError, canonicalize, strictParse, strictParseBytes } from "./jcs.js";
|
|
25
25
|
/** This verifier's release (the package's). */
|
|
26
|
-
export declare const VERSION = "1.
|
|
26
|
+
export declare const VERSION = "1.8.0";
|
|
27
27
|
/** The newest bundle format version this verifier reads: the reference's VERSIONS' newest row (tracekit/bundle_v2.py),
|
|
28
28
|
* or VERSION when later (tracekit/verify/v2.py READS); a bundle needing a later one is UNVERIFIABLE. */
|
|
29
|
-
export declare const READS = "1.
|
|
29
|
+
export declare const READS = "1.8.0";
|
|
30
30
|
export declare const EXIT_OK = 0, EXIT_FAIL = 1, EXIT_BAD = 2, EXIT_WARN = 3;
|
|
31
31
|
/** The integrity of a trust config that can't be used: nothing in the bundle was checked. */
|
|
32
32
|
export declare const TRUST_UNUSABLE = "UNVERIFIABLE (the trust file can't be used)";
|
|
@@ -83,12 +83,22 @@ export declare function verify(bundle: Uint8Array, trust: Uint8Array | null, nam
|
|
|
83
83
|
* number.
|
|
84
84
|
*/
|
|
85
85
|
export declare function checkGrants(rep: Report, events: J[], floats: Floats): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* ext.approval.decision (1.8.0): each approval.consumed names a policy.decision of its own run, tool_call_id and attempt
|
|
88
|
+
* that comes before it. The signer writes the decision it checked the approval's use against; the check is a warning,
|
|
89
|
+
* not a failure, when the bundle doesn't hold it (an ext name is non-critical).
|
|
90
|
+
*/
|
|
91
|
+
export declare function checkApprovalDecision(rep: Report, events: J[]): void;
|
|
86
92
|
/**
|
|
87
93
|
* A line per ext name the records carry: its EXT_CHECKS check, or a `not interpreted` warning. The records were checked
|
|
88
94
|
* like every other (signature, chain, inclusion); `full`: the manifest's advisory verifier_version; `floats`: the
|
|
89
95
|
* parser's.
|
|
90
96
|
*/
|
|
91
97
|
export declare function checkExt(rep: Report, events: J[], full: J, floats: Floats): Promise<void>;
|
|
98
|
+
/** The rules an operator's approval_agent may list (tracekit/policy2/compile.py APPROVER_RULES). */
|
|
99
|
+
export declare const APPROVER_RULES: J[];
|
|
100
|
+
/** How long a person's answer counts as a precedent (tracekit/signer/pipeline.py PRECEDENT_S). */
|
|
101
|
+
export declare const PRECEDENT_S: number;
|
|
92
102
|
/** §4: null when `r` is a v2 record signed by one of `keys` (SPKI DER) with an allowed algorithm that is the key's own,
|
|
93
103
|
* else why not. `floats`: where the parser read number tokens with a fraction or exponent (`v` is the integer 2). */
|
|
94
104
|
export declare function verifyRecord(r: J, keys: Uint8Array[], algs: string[], floats?: Floats): Promise<string | null>;
|