{ "argumentSchema": { "$defs": { "AgentRun": { "properties": { "attempts": { "type": "number" }, "cancelRequestedAt": { "type": "string" }, "claim": { "properties": { "leaseUntil": { "type": "string" }, "runner": { "type": "string" } }, "required": [ "runner", "leaseUntil" ], "type": "object" }, "errorCode": { "$ref": "#/$defs/AgentRunErrorCode" }, "finishedAt": { "type": "string" }, "inputs": { "additionalProperties": { "type": "unknown" }, "properties": {}, "type": "object" }, "maxConfidentiality": { "items": { "type": "unknown" }, "type": "array" }, "modelTurns": { "type": "number" }, "outcome": { "$ref": "#/$defs/AgentRunOutcome" }, "piece": { "type": "unknown" }, "request": { "type": "unknown" }, "requestHash": { "type": "string" }, "result": { "type": "unknown" }, "resultSchema": { "type": "unknown" }, "runRef": { "type": "string" }, "space": { "type": "unknown" }, "startedAt": { "type": "string" }, "state": { "$ref": "#/$defs/AgentRunState" }, "stateSince": { "type": "string" }, "submittedAt": { "type": "string" }, "task": { "type": "string" }, "toolCalls": { "type": "number" }, "tools": { "items": { "type": "string" }, "type": "array" }, "usage": { "$ref": "#/$defs/AgentRunUsage" }, "usageCoverage": { "enum": [ "direct", "including-descendants" ] } }, "required": [ "requestHash", "request", "piece", "space", "task", "inputs", "resultSchema", "submittedAt", "state", "stateSince" ], "type": "object" }, "AgentRunErrorCode": { "enum": [ "INVALID_INPUT", "LIMIT_REACHED", "PROVIDER_FAILURE", "RUNNER_LOST", "CANCELLED", "REFUSED" ] }, "AgentRunOutcome": { "enum": [ "completed", "failed", "refused", "cancelled" ] }, "AgentRunRecord": { "$ref": "#/$defs/AgentRun" }, "AgentRunState": { "enum": [ "queued", "claimed", "running", "completed", "failed", "refused", "cancelled" ] }, "AgentRunUsage": { "properties": { "cacheWriteTokens": { "type": "number" }, "cachedInputTokens": { "type": "number" }, "costUsd": { "type": "number" }, "estimateWithheldReason": { "type": "string" }, "estimatedCostUsd": { "type": "number" }, "inputTokens": { "type": "number" }, "outputTokens": { "type": "number" }, "reasoningTokens": { "type": "number" }, "totalTokens": { "type": "number" } }, "type": "object" } }, "properties": { "nowMs": { "description": "The shared observation time for relative age, in epoch milliseconds.", "type": "number" }, "run": { "$ref": "#/$defs/AgentRunRecord", "asCell": [ "cell" ] } }, "required": [ "run" ], "type": "object" }, "pattern": "system/agent-run.tsx", "resultSchema": { "$defs": { "AgentRun": { "properties": { "attempts": { "type": "number" }, "cancelRequestedAt": { "type": "string" }, "claim": { "properties": { "leaseUntil": { "type": "string" }, "runner": { "type": "string" } }, "required": [ "runner", "leaseUntil" ], "type": "object" }, "errorCode": { "$ref": "#/$defs/AgentRunErrorCode" }, "finishedAt": { "type": "string" }, "inputs": { "additionalProperties": { "type": "unknown" }, "properties": {}, "type": "object" }, "maxConfidentiality": { "items": { "type": "unknown" }, "type": "array" }, "modelTurns": { "type": "number" }, "outcome": { "$ref": "#/$defs/AgentRunOutcome" }, "piece": { "type": "unknown" }, "request": { "type": "unknown" }, "requestHash": { "type": "string" }, "result": { "type": "unknown" }, "resultSchema": { "type": "unknown" }, "runRef": { "type": "string" }, "space": { "type": "unknown" }, "startedAt": { "type": "string" }, "state": { "$ref": "#/$defs/AgentRunState" }, "stateSince": { "type": "string" }, "submittedAt": { "type": "string" }, "task": { "type": "string" }, "toolCalls": { "type": "number" }, "tools": { "items": { "type": "string" }, "type": "array" }, "usage": { "$ref": "#/$defs/AgentRunUsage" }, "usageCoverage": { "enum": [ "direct", "including-descendants" ] } }, "required": [ "requestHash", "request", "piece", "space", "task", "inputs", "resultSchema", "submittedAt", "state", "stateSince" ], "type": "object" }, "AgentRunErrorCode": { "enum": [ "INVALID_INPUT", "LIMIT_REACHED", "PROVIDER_FAILURE", "RUNNER_LOST", "CANCELLED", "REFUSED" ] }, "AgentRunOutcome": { "enum": [ "completed", "failed", "refused", "cancelled" ] }, "AgentRunRecord": { "$ref": "#/$defs/AgentRun" }, "AgentRunState": { "enum": [ "queued", "claimed", "running", "completed", "failed", "refused", "cancelled" ] }, "AgentRunUsage": { "properties": { "cacheWriteTokens": { "type": "number" }, "cachedInputTokens": { "type": "number" }, "costUsd": { "type": "number" }, "estimateWithheldReason": { "type": "string" }, "estimatedCostUsd": { "type": "number" }, "inputTokens": { "type": "number" }, "outputTokens": { "type": "number" }, "reasoningTokens": { "type": "number" }, "totalTokens": { "type": "number" } }, "type": "object" } }, "properties": { "$NAME": { "type": "string" }, "$UI": { "$ref": "https://commonfabric.org/schemas/vnode.json" }, "cancel": { "asCell": [ "stream", "opaque" ] }, "run": { "$ref": "#/$defs/AgentRunRecord" }, "terminal": { "type": "boolean" } }, "required": [ "run", "terminal", "cancel", "$NAME", "$UI" ], "type": "object" } }