SharedOS API / @aicoo/sharedos-contracts
@aicoo/sharedos-contracts
Strict, JSON-safe SharedOS protocol schemas and TypeScript types.
npm install @aicoo/sharedos-contracts
Use this package for addresses, capabilities, messages, resources, tools, runtime manifests/events/outcomes, execution results, audit events, and HTTP wire contracts. External boundaries should parse untrusted values with the exported schemas rather than relying on type casts.
Tool definitions include a logical namespace, source, read/write catalog class,
and exact capability requirement. Access contexts carry the trusted effective
namespace selection; ToolNamespaceUpdateSchema defines portable, idempotent
enable/disable patches.
AuditEventSchema is the durable shape a host persists. What SharedOS itself
states about an event is a field it names; metadata holds what a host port
supplied and the details particular to one event type. It is strict, so a
persisted trail that parses is one the kernel could have written.
SharedOS is currently a 1.0.0 preview.
Interfaces
JsonObject
Defined in: json.ts:4
Indexable
[
key:string]:JsonValue
SharedOSRoute
Defined in: http.ts:85
One HTTP operation: where it lives, its verb, and what crosses the wire each way.
Type Parameters
| Type Parameter | Default type |
|---|---|
Request | unknown |
Response | unknown |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
<a id="property-method"></a> method | readonly | SharedOSHttpMethod | - | http.ts:87 |
<a id="property-path"></a> path | readonly | `/${string}` | - | http.ts:86 |
<a id="property-request"></a> request? | readonly | WireSchema<Request> | Absent for a route that takes no body. | http.ts:89 |
<a id="property-response"></a> response | readonly | WireSchema<Response> | - | http.ts:90 |
WireSchema
Defined in: http.ts:76
What either side of the HTTP boundary needs from a schema: a verdict and a typed value. Structural, so the handler and the client can name a route's schemas without depending on the validation library themselves.
Type Parameters
| Type Parameter |
|---|
T |
Methods
safeParse()
safeParse(
value): {data:T;success:true; } | {success:false; }
Defined in: http.ts:77
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
{ data: T; success: true; } | { success: false; }
Type Aliases
AccessContext
AccessContext =
z.infer<typeofAccessContextSchema>>
Defined in: access.ts:30
Address
Address =
z.infer<typeofAddressSchema>>
Defined in: address.ts:33
AgentAddress
AgentAddress =
z.infer<typeofAgentAddressSchema>>
Defined in: address.ts:13
AgentCard
AgentCard =
z.infer<typeofAgentCardSchema>>
Defined in: card.ts:107
AgentCardView
AgentCardView =
z.infer<typeofAgentCardViewSchema>>
Defined in: card.ts:31
AuditEvent
AuditEvent =
z.infer<typeofAuditEventSchema>>
Defined in: audit.ts:175
AuditEventType
AuditEventType =
z.infer<typeofAuditEventTypeSchema>>
Defined in: audit.ts:30
AuditOutcome
AuditOutcome =
z.infer<typeofAuditOutcomeSchema>>
Defined in: audit.ts:54
AuditSource
AuditSource =
z.infer<typeofAuditSourceSchema>>
Defined in: audit.ts:66
AuthorizationDecision
AuthorizationDecision =
z.infer<typeofAuthorizationDecisionSchema>>
Defined in: access.ts:72
Capability
Capability =
z.infer<typeofCapabilitySchema>>
Defined in: capability.ts:46
CapabilityConstraints
CapabilityConstraints =
z.infer<typeofCapabilityConstraintsSchema>>
Defined in: capability.ts:71
CapabilityGrant
CapabilityGrant =
z.infer<typeofCapabilityGrantSchema>>
Defined in: capability.ts:142
CapabilityRequest
CapabilityRequest =
z.infer<typeofCapabilityRequestSchema>>
Defined in: capability.ts:104
CapabilityRequirement
CapabilityRequirement =
z.infer<typeofCapabilityRequirementSchema>>
Defined in: capability.ts:152
EnabledToolNamespaces
EnabledToolNamespaces =
z.infer<typeofEnabledToolNamespacesSchema>>
Defined in: tool.ts:63
Escalation
Escalation =
z.infer<typeofEscalationSchema>>
Defined in: execution.ts:93
ExecutionEvent
ExecutionEvent =
z.infer<typeofExecutionEventSchema>>
Defined in: execution.ts:56
ExecutionOptions
ExecutionOptions =
z.infer<typeofExecutionOptionsSchema>>
Defined in: execution.ts:23
ExecutionRequest
ExecutionRequest =
z.infer<typeofExecutionRequestSchema>>
Defined in: execution.ts:40
ExecutionResult
ExecutionResult =
z.infer<typeofExecutionResultSchema>>
Defined in: execution.ts:128
GroupAddress
GroupAddress =
z.infer<typeofGroupAddressSchema>>
Defined in: address.ts:18
HumanAddress
HumanAddress =
z.infer<typeofHumanAddressSchema>>
Defined in: address.ts:8
Identifier
Identifier =
z.infer<typeofIdentifierSchema>>
Defined in: common.ts:26
JsonArray
JsonArray =
JsonValue[]
Defined in: json.ts:7
JsonPrimitive
JsonPrimitive =
string|number|boolean|null
Defined in: json.ts:3
JsonValue
JsonValue =
JsonPrimitive|JsonObject|JsonArray
Defined in: json.ts:8
MessageDeliveryResult
MessageDeliveryResult =
z.infer<typeofMessageDeliveryResultSchema>>
Defined in: message.ts:95
MessageEnvelope
MessageEnvelope =
z.infer<typeofMessageEnvelopeSchema>>
Defined in: message.ts:42
MessageProvenance
MessageProvenance =
z.infer<typeofMessageProvenanceSchema>>
Defined in: message.ts:21
MessageRequestArguments
MessageRequestArguments =
z.infer<typeofMessageRequestArgumentsSchema>>
Defined in: message.ts:73
ProtocolError
ProtocolError =
z.infer<typeofProtocolErrorSchema>>
Defined in: protocol-error.ts:16
ProtocolVersion
ProtocolVersion =
z.infer<typeofProtocolVersionSchema>>
Defined in: common.ts:11
PublishedToolAnnotations
PublishedToolAnnotations =
z.infer<typeofPublishedToolAnnotationsSchema>>
Defined in: tool.ts:164
PublishedToolDefinition
PublishedToolDefinition =
z.infer<typeofPublishedToolDefinitionSchema>>
Defined in: tool.ts:200
PublishedToolMetadata
PublishedToolMetadata =
z.infer<typeofPublishedToolMetadataSchema>>
Defined in: tool.ts:173
ReachResult
ReachResult =
z.infer<typeofReachResultSchema>>
Defined in: capability.ts:211
ReachSummary
ReachSummary =
z.infer<typeofReachSummarySchema>>
Defined in: card.ts:49
ReachUnavailableReason
ReachUnavailableReason =
z.infer<typeofReachUnavailableReasonSchema>>
Defined in: capability.ts:196
RemoteExecutionRequest
RemoteExecutionRequest =
z.infer<typeofRemoteExecutionRequestSchema>>
Defined in: http.ts:28
RemoteResourceOperation
RemoteResourceOperation =
z.infer<typeofRemoteResourceOperationSchema>>
Defined in: http.ts:21
ResourceOperation
ResourceOperation =
z.infer<typeofResourceOperationSchema>>
Defined in: resource.ts:21
ResourceReach
ResourceReach =
z.infer<typeofResourceReachSchema>>
Defined in: capability.ts:177
ResourceRef
ResourceRef =
z.infer<typeofResourceRefSchema>>
Defined in: capability.ts:35
ResourceResult
ResourceResult =
z.infer<typeofResourceResultSchema>>
Defined in: resource.ts:44
RuntimeEvent
RuntimeEvent =
z.infer<typeofRuntimeEventSchema>>
Defined in: runtime.ts:27
RuntimeManifest
RuntimeManifest =
z.infer<typeofRuntimeManifestSchema>>
Defined in: runtime.ts:17
RuntimeTurnOutcome
RuntimeTurnOutcome =
z.infer<typeofRuntimeTurnOutcomeSchema>>
Defined in: runtime.ts:59
ServiceAddress
ServiceAddress =
z.infer<typeofServiceAddressSchema>>
Defined in: address.ts:23
SharedOSApiErrorCode
SharedOSApiErrorCode = typeof
SHAREDOS_API_ERROR_CODES[number]
Defined in: http.ts:56
SharedOSApiErrorResponse
SharedOSApiErrorResponse =
z.infer<typeofSharedOSApiErrorResponseSchema>>
Defined in: http.ts:69
SharedOSHealth
SharedOSHealth =
z.infer<typeofSharedOSHealthSchema>>
Defined in: http.ts:36
SharedOSHttpMethod
SharedOSHttpMethod =
"GET"|"POST"|"PUT"
Defined in: http.ts:82
SharedOSRouteName
SharedOSRouteName = keyof typeof
SHAREDOS_ROUTES
Defined in: http.ts:145
SharedOSToolCatalog
SharedOSToolCatalog =
z.infer<typeofSharedOSToolCatalogSchema>>
Defined in: tool.ts:237
Timestamp
Timestamp =
z.infer<typeofTimestampSchema>>
Defined in: common.ts:30
ToolAnnotations
ToolAnnotations =
z.infer<typeofToolAnnotationsSchema>>
Defined in: tool.ts:108
ToolCall
ToolCall =
z.infer<typeofToolCallSchema>>
Defined in: tool.ts:344
ToolDefinition
ToolDefinition =
z.infer<typeofToolDefinitionSchema>>
Defined in: tool.ts:142
ToolName
ToolName =
z.infer<typeofToolNameSchema>>
Defined in: tool.ts:35
ToolNamespace
ToolNamespace =
z.infer<typeofToolNamespaceSchema>>
Defined in: tool.ts:39
ToolNamespaceCatalog
ToolNamespaceCatalog =
z.infer<typeofToolNamespaceCatalogSchema>>
Defined in: tool.ts:332
ToolNamespaceDescriptor
ToolNamespaceDescriptor =
z.infer<typeofToolNamespaceDescriptorSchema>>
Defined in: tool.ts:294
ToolNamespaceUpdate
ToolNamespaceUpdate =
z.infer<typeofToolNamespaceUpdateSchema>>
Defined in: tool.ts:98
ToolPolicy
ToolPolicy =
z.infer<typeofToolPolicySchema>>
Defined in: tool.ts:275
ToolReadWrite
ToolReadWrite =
z.infer<typeofToolReadWriteSchema>>
Defined in: tool.ts:50
ToolResult
ToolResult =
z.infer<typeofToolResultSchema>>
Defined in: tool.ts:368
ToolSource
ToolSource =
z.infer<typeofToolSourceSchema>>
Defined in: tool.ts:46
Variables
AccessContextSchema
constAccessContextSchema:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>
Defined in: access.ts:17
The identity, purpose, time, and tool-namespace inputs to a permission decision.
An access context deliberately carries no authority. Grants are loaded by the
kernel from a trusted GrantSource at the moment of the decision, so a
caller cannot present, extend, or replay authority by constructing a context.
AddressSchema
constAddressSchema:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>
Defined in: address.ts:26
A structured protocol address; no string suffix or prefix parsing is needed.
AGENT_CARD_VIEWS
constAGENT_CARD_VIEWS: readonly ["reach","identity","namespaces"]
Defined in: card.ts:27
The named shapes an agent card is served in.
A card is a view rather than a record, so these are not filters applied to one object on the way out: each name is a separate resource a reader is authorized for, and each answers a different question.
reach— identity together with the resources the subject can be asked about. This is the card the directory exists for.identity— the subject and nothing else. The narrowing that drops reach entirely, for a reader allowed to learn that an agent is addressable without learning what it holds.namespaces— identity together with which namespaces the subject reaches and how many entries in each, with no paths. A coarser answer thanreachand a distinct view for the reason ADR 0021 gives: projection is field-level, so a field that means something different depending on who reads it is the record shape a view exists to refuse.
Every view is bounded the same way. See AgentCardSchema.
AgentAddressSchema
constAgentAddressSchema:ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>
Defined in: address.ts:10
AgentCardSchema
constAgentCardSchema:ZodDiscriminatedUnion<"view", [ZodObject<{namespaceId:ZodString;reach:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;namespace:ZodString;path:ZodArray<ZodString,"many">>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }>,"many">>;readAt:ZodString;subject:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;view:ZodLiteral<"reach">>; },"strict",ZodTypeAny, {namespaceId:string;reach:object[];readAt:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };view:"reach"; }, {namespaceId:string;reach:object[];readAt:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };view:"reach"; }>,ZodObject<{namespaceId:ZodString;readAt:ZodString;subject:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;view:ZodLiteral<"identity">>; },"strict",ZodTypeAny, {namespaceId:string;readAt:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };view:"identity"; }, {namespaceId:string;readAt:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };view:"identity"; }>,ZodObject<{namespaceId:ZodString;namespaces:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;entries:ZodNumber;namespace:ZodString; },"strict",ZodTypeAny, {actions:string[];entries:number;namespace:string; }, {actions:string[];entries:number;namespace:string; }>,"many">>;readAt:ZodString;subject:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;view:ZodLiteral<"namespaces">>; },"strict",ZodTypeAny, {namespaceId:string;namespaces:object[];readAt:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };view:"namespaces"; }, {namespaceId:string;namespaces:object[];readAt:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };view:"namespaces"; }>]>
Defined in: card.ts:89
The kernel's description of one agent: identity, computed reach, and nothing a product would want to put beside them.
Reach is derived when the card is read, from the grants in force at that instant, and is never stored. A stored reach would be the one description of authority in SharedOS that nothing invalidates: revocation, purpose withdrawal, expiry and a spent budget all work by not matching at the next decision, and a column is outside all of them.
A card is bounded by one authority and one world. It shows what the subject reaches under the authority the reader is operating under, inside the reader's namespace — not the subject's whole life. It is therefore a lower bound on truth and never an upper one, which is what makes it safe to serve to a model: it omits authority the reader's authority did not issue, and an over-wide entry permits nothing because every operation is authorized independently.
Display names, avatars, handles, skills and protocol bindings are absent on purpose. The test is not whether a field is useful but whether it is authority: reach is what the kernel decides against, and a display name is not. A host composes those around this answer. See ADR 0021.
AgentCardViewSchema
constAgentCardViewSchema:ZodEnum<["reach","identity","namespaces"]>
Defined in: card.ts:29
AuditEventSchema
constAuditEventSchema:ZodObject<{action:ZodOptional<ZodString>>;actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;at:ZodString;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;authorityHash:ZodOptional<ZodString>>;cause:ZodOptional<ZodString>>;consumed:ZodOptional<ZodBoolean>>;endedBy:ZodOptional<ZodEnum<["envelope","runtime"]>>;failClosed:ZodOptional<ZodBoolean>>;grantId:ZodOptional<ZodString>>;id:ZodString;messageId:ZodOptional<ZodString>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;operationId:ZodOptional<ZodString>>;outcome:ZodEnum<["allowed","denied","succeeded","failed","escalated","interrupted"]>;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;reason:ZodOptional<ZodString>>;receiver:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;requestedAuthority:ZodOptional<ZodObject<{capabilities:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<...>;path:ZodArray<..., ...>; },"strict",ZodTypeAny, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; };scope:"exact"|"descendants"; }, {actions:string[];resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; };scope:"exact"|"descendants"; }>,"many">>;constraints:ZodOptional<ZodEffects<ZodObject<{delegationDepth:ZodOptional<ZodNumber>>;expiresAt:ZodOptional<ZodString>>;maxUses:ZodOptional<ZodNumber>>;notBefore:ZodOptional<ZodString>>;purposes:ZodOptional<ZodArray<..., ...>>; },"strict",ZodTypeAny, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; }>, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>>;id:ZodString;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;requestedAt:ZodString;requester:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>; },"strict",ZodTypeAny, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>>;resource:ZodOptional<ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<...>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<...>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<...>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<...>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>>;source:ZodOptional<ZodEnum<["kernel","envelope"]>>;tool:ZodOptional<ZodString>>;traceId:ZodString;type:ZodEnum<["authority.resolved","authorization.checked","escalation.requested","escalation.auto_decided","resource.invoked","tool.catalog.listed","tool.namespace.catalog.listed","tool.namespace.selection.updated","tool.invoked","message.sent","turn.ended"]>;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {action?:string;actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };at:string;authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authorityHash?:string;cause?:string;consumed?:boolean;endedBy?:"envelope"|"runtime";failClosed?:boolean;grantId?:string;id:string;messageId?:string;metadata?:JsonObject;namespaceId:string;operationId?:string;outcome:"succeeded"|"denied"|"failed"|"allowed"|"escalated"|"interrupted";owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;reason?:string;receiver?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; };resource?: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };source?:"kernel"|"envelope";tool?:string;traceId:string;type:"authority.resolved"|"authorization.checked"|"escalation.requested"|"escalation.auto_decided"|"resource.invoked"|"tool.catalog.listed"|"tool.namespace.catalog.listed"|"tool.namespace.selection.updated"|"tool.invoked"|"message.sent"|"turn.ended";version:"1"; }, {action?:string;actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };at:string;authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authorityHash?:string;cause?:string;consumed?:boolean;endedBy?:"envelope"|"runtime";failClosed?:boolean;grantId?:string;id:string;messageId?:string;metadata?:JsonObject;namespaceId:string;operationId?:string;outcome:"succeeded"|"denied"|"failed"|"allowed"|"escalated"|"interrupted";owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;reason?:string;receiver?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; };resource?: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };source?:"kernel"|"envelope";tool?:string;traceId:string;type:"authority.resolved"|"authorization.checked"|"escalation.requested"|"escalation.auto_decided"|"resource.invoked"|"tool.catalog.listed"|"tool.namespace.catalog.listed"|"tool.namespace.selection.updated"|"tool.invoked"|"message.sent"|"turn.ended";version:"1"; }>
Defined in: audit.ts:89
One audit record, the durable shape a host persists.
The rule for where a fact lives (ADR 0023): what SharedOS itself states about
every event of a kind is a field, typed here; metadata holds what a host
port supplied and the details particular to one event type. The two were one
untyped bag until a port's metadata began to be recorded beside the kernel's
own flags, at which point a port could overwrite a flag the kernel had not
set. Fields cannot be collided with.
The kernel-stated fields, since an inferred type renders here without them:
source (kernel or envelope, who performed or refused the operation;
never on turn.ended), cause (which situation a coarse reason stood in
for, on tool.invoked), failClosed (present and true when SharedOS could
not establish a fact and refused rather than guess), consumed (whether a
bounded use was spent, on authorization.checked), endedBy (envelope or
runtime, who ended a failed turn), requestedAuthority (what an escalation
asks for), and id, the record's identity and the only safe idempotency key.
docs/errors.md, "Audit events", has the table and the metadata keys a host
may rely on per event type.
AuditEventTypeSchema
constAuditEventTypeSchema:ZodEnum<["authority.resolved","authorization.checked","escalation.requested","escalation.auto_decided","resource.invoked","tool.catalog.listed","tool.namespace.catalog.listed","tool.namespace.selection.updated","tool.invoked","message.sent","turn.ended"]>
Defined in: audit.ts:8
AuditOutcomeSchema
constAuditOutcomeSchema:ZodEnum<["allowed","denied","succeeded","failed","escalated","interrupted"]>
Defined in: audit.ts:46
escalated is its own outcome, not a denial.
A denial is a decision SharedOS made. An escalation is a decision it declined to make and handed to a human, and counting the two together would inflate every denial rate by the cases where the system correctly asked for help.
interrupted is its own outcome, not a failure. It is written for an
operation whose port was entered and stopped before it answered -- a turn that
timed out or was cancelled mid-call, or an audit outage under a decision the
port itself asked for -- so any part of its effect may have committed.
failed also covers refusals where nothing ran, and a reader that took an
interrupted call for one of those would retry something already done.
AuditSourceSchema
constAuditSourceSchema:ZodEnum<["kernel","envelope"]>
Defined in: audit.ts:65
Which enforcement boundary performed or refused what an event records.
It was free to infer until the execution envelope began recording as well -- anything in audit was the kernel's, because the envelope wrote nothing -- and the moment that stopped being true it became a fact with nowhere to live. ADR 0012 keeps one refusal vocabulary across both boundaries on purpose: a code says what was refused, and this says who refused it (ADR 0023).
AuthorizationDecisionSchema
constAuthorizationDecisionSchema:ZodObject<{allowed:ZodBoolean;matchedGrantId:ZodOptional<ZodString>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;reasonCode:ZodString;requiredAuthority:ZodOptional<ZodObject<{capabilities:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<...>;path:ZodArray<..., ...>; },"strict",ZodTypeAny, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; };scope:"exact"|"descendants"; }, {actions:string[];resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; };scope:"exact"|"descendants"; }>,"many">>;constraints:ZodOptional<ZodEffects<ZodObject<{delegationDepth:ZodOptional<ZodNumber>>;expiresAt:ZodOptional<ZodString>>;maxUses:ZodOptional<ZodNumber>>;notBefore:ZodOptional<ZodString>>;purposes:ZodOptional<ZodArray<..., ...>>; },"strict",ZodTypeAny, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; }>, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>>;id:ZodString;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;requestedAt:ZodString;requester:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>; },"strict",ZodTypeAny, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>>; },"strict",ZodTypeAny, {allowed:boolean;matchedGrantId?:string;metadata?:JsonObject;reasonCode:string;requiredAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }; }, {allowed:boolean;matchedGrantId?:string;metadata?:JsonObject;reasonCode:string;requiredAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }; }>
Defined in: access.ts:33
A portable explanation of one authorization check.
CapabilityConstraintsSchema
constCapabilityConstraintsSchema:ZodEffects<ZodObject<{delegationDepth:ZodOptional<ZodNumber>>;expiresAt:ZodOptional<ZodString>>;maxUses:ZodOptional<ZodNumber>>;notBefore:ZodOptional<ZodString>>;purposes:ZodOptional<ZodArray<ZodString,"many">>>>; },"strict",ZodTypeAny, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>
Defined in: capability.ts:48
CapabilityGrantSchema
constCapabilityGrantSchema:ZodEffects<ZodObject<{capabilities:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [..., ..., ..., ...]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };scope:"exact"|"descendants"; }, {actions:string[];resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };scope:"exact"|"descendants"; }>,"many">>;constraints:ZodEffects<ZodObject<{delegationDepth:ZodOptional<ZodNumber>>;expiresAt:ZodOptional<ZodString>>;maxUses:ZodOptional<ZodNumber>>;notBefore:ZodOptional<ZodString>>;purposes:ZodOptional<ZodArray<ZodString,"many">>>>; },"strict",ZodTypeAny, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>;id:ZodString;issuedAt:ZodString;issuer:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;parentGrantId:ZodOptional<ZodString>>;revokedAt:ZodOptional<ZodString>>;subject:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>; },"strict",ZodTypeAny, {capabilities:object[];constraints: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;issuedAt:string;issuer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };metadata?:JsonObject;namespaceId:string;parentGrantId?:string;revokedAt?:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;issuedAt:string;issuer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };metadata?:JsonObject;namespaceId:string;parentGrantId?:string;revokedAt?:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>, {capabilities:object[];constraints: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;issuedAt:string;issuer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };metadata?:JsonObject;namespaceId:string;parentGrantId?:string;revokedAt?:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;issuedAt:string;issuer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };metadata?:JsonObject;namespaceId:string;parentGrantId?:string;revokedAt?:string;subject: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>
Defined in: capability.ts:118
Authority issued to one subject and bounded by explicit constraints.
A grant that was derived from another grant names its immediate ancestor in
parentGrantId. The link is a claim, not proof: SharedOS resolves and
validates the complete chain before the grant may authorize anything.
deriveGrant in @aicoo/sharedos-core is the supported way to produce one.
It only ever emits this single link: a chain embedded in the grant would be
provenance the presenter controls, and the ancestors are re-resolved from the
issuing store at every decision instead.
CapabilityRequestSchema
constCapabilityRequestSchema:ZodObject<{capabilities:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };scope:"exact"|"descendants"; }, {actions:string[];resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };scope:"exact"|"descendants"; }>,"many">>;constraints:ZodOptional<ZodEffects<ZodObject<{delegationDepth:ZodOptional<ZodNumber>>;expiresAt:ZodOptional<ZodString>>;maxUses:ZodOptional<ZodNumber>>;notBefore:ZodOptional<ZodString>>;purposes:ZodOptional<ZodArray<ZodString,"many">>>>; },"strict",ZodTypeAny, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>>;id:ZodString;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;requestedAt:ZodString;requester:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>; },"strict",ZodTypeAny, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>
Defined in: capability.ts:90
A request for authority. A request is not itself proof of authority.
Two places produce one and none accepts one as input. A denial that matched no grant describes what would have satisfied it, and an escalation may carry that description on to whoever resolves it. Both are descriptions: turning one into usable authority is the host's issuing workflow, which ends in a grant the next turn loads (ADR 0019).
id, namespaceId, requester, owner, and requestedAt are minted by the
kernel from the trusted access context, whatever a caller wrote: a request
the caller authored would be a caller-chosen correlation for a decision the
kernel made. id is derived from the ask -- namespace, requester, owner,
purpose, constraints, capabilities -- rather than generated, so the same ask
describes itself the same way twice, and requestedAt is left out of it so
the identifier survives across turns.
CapabilityRequirementSchema
constCapabilityRequirementSchema:ZodObject<{action:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>; },"strict",ZodTypeAny, {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }, {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }>
Defined in: capability.ts:145
The exact capability a tool invocation requires.
CapabilitySchema
constCapabilitySchema:ZodObject<{actions:ZodArray<ZodString,"many">>;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };scope:"exact"|"descendants"; }, {actions:string[];resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; };scope:"exact"|"descendants"; }>
Defined in: capability.ts:38
A positive capability. SharedOS is deny-by-default when no grant matches.
EnabledToolNamespacesSchema
constEnabledToolNamespacesSchema:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>
Defined in: tool.ts:52
EscalationSchema
constEscalationSchema:ZodObject<{reason:ZodString;requestedAt:ZodString;requestedAuthority:ZodOptional<ZodObject<{capabilities:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<...>;path:ZodArray<..., ...>; },"strict",ZodTypeAny, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; };scope:"exact"|"descendants"; }, {actions:string[];resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; };scope:"exact"|"descendants"; }>,"many">>;constraints:ZodOptional<ZodEffects<ZodObject<{delegationDepth:ZodOptional<ZodNumber>>;expiresAt:ZodOptional<ZodString>>;maxUses:ZodOptional<ZodNumber>>;notBefore:ZodOptional<ZodString>>;purposes:ZodOptional<ZodArray<..., ...>>; },"strict",ZodTypeAny, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; }>, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }, {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; }>>;id:ZodString;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;requestedAt:ZodString;requester:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>; },"strict",ZodTypeAny, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>>;reviewer:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;status:ZodLiteral<"pending">>; },"strict",ZodTypeAny, {reason:string;requestedAt:string;requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; };reviewer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };status:"pending"; }, {reason:string;requestedAt:string;requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; };reviewer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };status:"pending"; }>
Defined in: execution.ts:70
A stopped turn awaiting a human decision.
This is a stub by design. SharedOS records that authority was asked for, who would decide it, and when -- and nothing else. It does not model review queues, approval tokens, or resumption, because granting authority is host-owned control-plane work and an escalation that could be resolved from inside a turn would be an escalation an agent could grant itself.
reviewer is assumed rather than resolved: it is the owner the turn already
runs on behalf of. A host with a real review roster substitutes its own.
ExecutionEventSchema
constExecutionEventSchema:ZodObject<{data:ZodType<JsonValue,ZodTypeDef,JsonValue>>;eventId:ZodString;executionId:ZodString;occurredAt:ZodString;sequence:ZodNumber;traceId:ZodString;type:ZodString;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {data:JsonValue;eventId:string;executionId:string;occurredAt:string;sequence:number;traceId:string;type:string;version:"1"; }, {data:JsonValue;eventId:string;executionId:string;occurredAt:string;sequence:number;traceId:string;type:string;version:"1"; }>
Defined in: execution.ts:43
An append-only event emitted while executing a request.
ExecutionOptionsSchema
constExecutionOptionsSchema:ZodObject<{maxSteps:ZodOptional<ZodNumber>>;maxToolCalls:ZodOptional<ZodNumber>>;timeoutMs:ZodOptional<ZodNumber>>; },"strict",ZodTypeAny, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }>
Defined in: execution.ts:15
ExecutionRequestSchema
constExecutionRequestSchema:ZodObject<{agent:ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>;context:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>;executionId:ZodString;message:ZodObject<{createdAt:ZodString;id:ZodString;payload:ZodType<JsonValue,ZodTypeDef,JsonValue>>;provenance:ZodOptional<ZodObject<{metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;parentIds:ZodArray<ZodString,"many">>;source:ZodString; },"strict",ZodTypeAny, {metadata?:JsonObject;parentIds:string[];source:string; }, {metadata?:JsonObject;parentIds:string[];source:string; }>>;purpose:ZodString;receiver:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;replyTo:ZodOptional<ZodString>>;sender:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;traceId:ZodString;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;options:ZodOptional<ZodObject<{maxSteps:ZodOptional<ZodNumber>>;maxToolCalls:ZodOptional<ZodNumber>>;timeoutMs:ZodOptional<ZodNumber>>; },"strict",ZodTypeAny, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }>>;state:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;tools:ZodArray<ZodEffects<ZodObject<{annotations:ZodOptional<ZodObject<{destructive:ZodOptional<ZodBoolean>>;idempotent:ZodOptional<ZodBoolean>>;readOnly:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;name:ZodString;namespace:ZodString;outputSchema:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;readWrite:ZodEnum<["read","write"]>;requiredCapability:ZodObject<{action:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<...>;path:ZodArray<..., ...>; },"strict",ZodTypeAny, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }>; },"strict",ZodTypeAny, {action:string;resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; }; }, {action:string;resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; }; }>;source:ZodString; },"strict",ZodTypeAny, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>,"many">>;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {agent: {agentId:string;kind:"agent"; };context: {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; };executionId:string;message: {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; };metadata?:JsonObject;options?: {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; };state?:JsonObject;tools:object[];version:"1"; }, {agent: {agentId:string;kind:"agent"; };context: {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; };executionId:string;message: {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; };metadata?:JsonObject;options?: {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; };state?:JsonObject;tools:object[];version:"1"; }>
Defined in: execution.ts:26
One permission-controlled agent turn. Tick scheduling stays with the host.
ExecutionResultSchema
constExecutionResultSchema:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;events:object[];executionId:string;metadata?:JsonObject;output:JsonValue;startedAt:string;status:"succeeded";traceId:string;version:"1"; }, {completedAt:string;events:object[];executionId:string;metadata?:JsonObject;output:JsonValue;startedAt:string;status:"succeeded";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"denied";traceId:string;version:"1"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"denied";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"failed";traceId:string;version:"1"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"failed";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error?: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"cancelled";traceId:string;version:"1"; }, {completedAt:string;error?: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"cancelled";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;escalation: {reason:string;requestedAt:string;requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; };reviewer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };status:"pending"; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"escalated";traceId:string;version:"1"; }, {completedAt:string;escalation: {reason:string;requestedAt:string;requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; };reviewer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };status:"pending"; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"escalated";traceId:string;version:"1"; }>]>
Defined in: execution.ts:105
GroupAddressSchema
constGroupAddressSchema:ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>
Defined in: address.ts:15
HumanAddressSchema
constHumanAddressSchema:ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>
Defined in: address.ts:5
IdentifierSchema
constIdentifierSchema:ZodString
Defined in: common.ts:25
An opaque identifier. Callers choose its format; SharedOS only requires stability.
JsonObjectSchema
constJsonObjectSchema:z.ZodType<JsonObject>>
Defined in: json.ts:27
JsonValueSchema
constJsonValueSchema:z.ZodType<JsonValue>>
Defined in: json.ts:16
Any value that can round-trip through JSON without custom serialization. In particular, this rejects undefined, bigint, Date, NaN, and Infinity.
MAX_EXECUTION_TIMEOUT_MS
constMAX_EXECUTION_TIMEOUT_MS:600000=600_000
Defined in: execution.ts:12
MAX_EXECUTION_TOOL_CALLS
constMAX_EXECUTION_TOOL_CALLS:10000=10_000
Defined in: execution.ts:13
MessageDeliveryResultSchema
constMessageDeliveryResultSchema:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {messageId:string;metadata?:JsonObject;status:"accepted";timestamp:string; }, {messageId:string;metadata?:JsonObject;status:"accepted";timestamp:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {messageId:string;metadata?:JsonObject;status:"delivered";timestamp:string; }, {messageId:string;metadata?:JsonObject;status:"delivered";timestamp:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"denied";timestamp:string; }, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"denied";timestamp:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"failed";timestamp:string; }, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"failed";timestamp:string; }>]>
Defined in: message.ts:82
The transport-neutral outcome of submitting a message for delivery.
MessageEnvelopeSchema
constMessageEnvelopeSchema:ZodObject<{createdAt:ZodString;id:ZodString;payload:ZodType<JsonValue,ZodTypeDef,JsonValue>>;provenance:ZodOptional<ZodObject<{metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;parentIds:ZodArray<ZodString,"many">>;source:ZodString; },"strict",ZodTypeAny, {metadata?:JsonObject;parentIds:string[];source:string; }, {metadata?:JsonObject;parentIds:string[];source:string; }>>;purpose:ZodString;receiver:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;replyTo:ZodOptional<ZodString>>;sender:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;traceId:ZodString;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }>
Defined in: message.ts:27
A message carries data and one host-bound purpose, never authority. Authority is supplied separately through AccessContext and evaluated at the point of use.
MessageProvenanceSchema
constMessageProvenanceSchema:ZodObject<{metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;parentIds:ZodArray<ZodString,"many">>;source:ZodString; },"strict",ZodTypeAny, {metadata?:JsonObject;parentIds:string[];source:string; }, {metadata?:JsonObject;parentIds:string[];source:string; }>
Defined in: message.ts:13
Hop provenance a host may attach to an envelope. It is host-owned metadata: the kernel checks its shape with the rest of the envelope, neither sets nor reads it, and hands it to the transport as the host sent it.
MessageRequestArgumentsSchema
constMessageRequestArgumentsSchema:ZodObject<{payload:ZodType<JsonValue,ZodTypeDef,JsonValue>>;recipient:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodEffects<ZodEffects<ZodString,string,string>>,string,string>>; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodEffects<ZodEffects<ZodString,string,string>>,string,string>>;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodEffects<ZodEffects<ZodString,string,string>>,string,string>>;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodEffects<ZodEffects<ZodString,string,string>>,string,string>>; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>; },"strict",ZodTypeAny, {payload:JsonValue;recipient: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {payload:JsonValue;recipient: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>
Defined in: message.ts:66
The complete and intentionally narrow message input a model may author.
PathSegmentSchema
constPathSegmentSchema:ZodString
Defined in: capability.ts:15
One opaque resource-path segment.
Separators, traversal markers, and control characters are rejected here so every host receives the same canonical path vocabulary. Filesystem-backed providers must still resolve beneath their configured root and reject symlink escapes.
PROTOCOL_VERSION
constPROTOCOL_VERSION:"1"
Defined in: common.ts:7
The wire protocol version implemented by this package, as the one value every request, event, result, envelope and manifest stamps on itself.
ProtocolErrorSchema
constProtocolErrorSchema:ZodObject<{code:ZodString;details:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;message:ZodString;retryable:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {code:string;details?:JsonObject;message:string;retryable?:boolean; }, {code:string;details?:JsonObject;message:string;retryable?:boolean; }>
Defined in: protocol-error.ts:7
A machine-readable error that is safe to return over npm and HTTP APIs.
ProtocolVersionSchema
constProtocolVersionSchema:ZodLiteral<"1">>
Defined in: common.ts:10
The wire protocol version implemented by this package.
PublishedToolAnnotationsSchema
constPublishedToolAnnotationsSchema:ZodObject<{destructiveHint:ZodOptional<ZodBoolean>>;idempotentHint:ZodOptional<ZodBoolean>>;openWorldHint:ZodOptional<ZodBoolean>>;readOnlyHint:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; }, {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; }>
Defined in: tool.ts:156
MCP tool annotation hints, in the vocabulary a harness receives them in.
These are the same three facts ToolAnnotationsSchema carries, renamed to the MCP wire spelling. They stay a separate type rather than a rename at the edge because they are a hint surface: advisory metadata a model may use to decide how to call a tool, and never an authorization input on either side of the boundary.
openWorldHint has no SharedOS equivalent and is therefore never emitted.
Inventing a value for it would put an unfixed field into catalogHash.
PublishedToolDefinitionSchema
constPublishedToolDefinitionSchema:ZodObject<{annotations:ZodOptional<ZodObject<{destructiveHint:ZodOptional<ZodBoolean>>;idempotentHint:ZodOptional<ZodBoolean>>;openWorldHint:ZodOptional<ZodBoolean>>;readOnlyHint:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; }, {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; }>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodObject<{namespace:ZodOptional<ZodString>>;source:ZodOptional<ZodString>>; },"strict",ZodTypeAny, {namespace?:string;source?:string; }, {namespace?:string;source?:string; }>>;name:ZodString;outputSchema:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>; },"strict",ZodTypeAny, {annotations?: {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; };description:string;inputSchema:JsonObject;metadata?: {namespace?:string;source?:string; };name:string;outputSchema?:JsonObject; }, {annotations?: {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; };description:string;inputSchema:JsonObject;metadata?: {namespace?:string;source?:string; };name:string;outputSchema?:JsonObject; }>
Defined in: tool.ts:190
Everything a model or harness is allowed to see about one tool.
This is the projection SharedOS publishes across the MCP boundary, and it is
defined by what it omits. requiredCapability, resolveRequirement, grants,
issuing authority, namespace settings, credentials, and handler references do
not appear here and never cross the boundary: a harness receives the operation
surface, and SharedOS keeps the authority.
name is the canonical SharedOS tool ID and is simultaneously the raw MCP
Tool.name. There is deliberately no second identity field. A published
catalogue with two names for one tool is a catalogue where authorization and
discovery can disagree, and ToolNameSchema exists precisely so the
canonical name is always carriable as-is.
PublishedToolMetadataSchema
constPublishedToolMetadataSchema:ZodObject<{namespace:ZodOptional<ZodString>>;source:ZodOptional<ZodString>>; },"strict",ZodTypeAny, {namespace?:string;source?:string; }, {namespace?:string;source?:string; }>
Defined in: tool.ts:167
Catalogue provenance a harness may see. Metadata, never proof of authority.
ReachListSchema
constReachListSchema:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;namespace:ZodString;path:ZodArray<ZodString,"many">>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }>,"many">>
Defined in: capability.ts:180
As many entries as one reach may carry, on a card or on the wire.
ReachResultSchema
constReachResultSchema:ZodDiscriminatedUnion<"status", [ZodObject<{reach:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;namespace:ZodString;path:ZodArray<ZodString,"many">>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }>,"many">>;status:ZodLiteral<"computed">>; },"strict",ZodTypeAny, {reach:object[];status:"computed"; }, {reach:object[];status:"computed"; }>,ZodObject<{reasonCode:ZodEnum<["authority_unavailable","usage_store_unavailable"]>;status:ZodLiteral<"unavailable">>; },"strict",ZodTypeAny, {reasonCode:"authority_unavailable"|"usage_store_unavailable";status:"unavailable"; }, {reasonCode:"authority_unavailable"|"usage_store_unavailable";status:"unavailable"; }>]>
Defined in: capability.ts:207
What asking for a reach answers.
computed carries the reachable surface, possibly empty: a context that can
authorize nothing reaches nothing, and that is a true answer. unavailable
means no answer could be established, and says why in the vocabulary a denial
uses. The shape crosses the HTTP boundary unchanged, so a remote caller reads
the same result an embedded host does.
ReachSummarySchema
constReachSummarySchema:ZodObject<{actions:ZodArray<ZodString,"many">>;entries:ZodNumber;namespace:ZodString; },"strict",ZodTypeAny, {actions:string[];entries:number;namespace:string; }, {actions:string[];entries:number;namespace:string; }>
Defined in: card.ts:41
One namespace the subject reaches, and how much of it, without paths.
entries counts the reach entries collapsed into this row, not resources: a
single descendants entry over a whole tree counts once, exactly as it
appears in reach. Counting resources would require asking a provider what
exists, which is the lookup a card must never become.
ReachUnavailableReasonSchema
constReachUnavailableReasonSchema:ZodEnum<["authority_unavailable","usage_store_unavailable"]>
Defined in: capability.ts:192
Why a reach could not be established.
Both are infrastructure codes the decide path already fails closed with: the authority behind the reach could not be loaded, or a bounded grant's budget could not be read. Neither narrows the answer. A reach that silently omitted a live grant because a dependency is down would look exactly like one that is true, so the whole answer is withheld under a code the reader can act on (ADR 0021).
RemoteExecutionRequestSchema
constRemoteExecutionRequestSchema:ZodObject<Omit<{agent:ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>;context:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>;executionId:ZodString;message:ZodObject<{createdAt:ZodString;id:ZodString;payload:ZodType<JsonValue,ZodTypeDef,JsonValue>>;provenance:ZodOptional<ZodObject<{metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;parentIds:ZodArray<ZodString,"many">>;source:ZodString; },"strict",ZodTypeAny, {metadata?:JsonObject;parentIds:string[];source:string; }, {metadata?:JsonObject;parentIds:string[];source:string; }>>;purpose:ZodString;receiver:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;replyTo:ZodOptional<ZodString>>;sender:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;traceId:ZodString;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;options:ZodOptional<ZodObject<{maxSteps:ZodOptional<ZodNumber>>;maxToolCalls:ZodOptional<ZodNumber>>;timeoutMs:ZodOptional<ZodNumber>>; },"strict",ZodTypeAny, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }>>;state:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;tools:ZodArray<ZodEffects<ZodObject<{annotations:ZodOptional<ZodObject<{destructive:ZodOptional<...>;idempotent:ZodOptional<...>;readOnly:ZodOptional<...>; },"strict",ZodTypeAny, {destructive?: ... | ... | ...;idempotent?: ... | ... | ...;readOnly?: ... | ... | ...; }, {destructive?: ... | ... | ...;idempotent?: ... | ... | ...;readOnly?: ... | ... | ...; }>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;name:ZodString;namespace:ZodString;outputSchema:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;readWrite:ZodEnum<["read","write"]>;requiredCapability:ZodObject<{action:ZodString;resource:ZodObject<{namespace: ...;owner: ...;path: ...; },"strict",ZodTypeAny, {namespace: ...;owner?: ...;path: ...; }, {namespace: ...;owner?: ...;path: ...; }>; },"strict",ZodTypeAny, {action:string;resource: {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }; }, {action:string;resource: {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }; }>;source:ZodString; },"strict",ZodTypeAny, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; }; };source:string; }>, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>,"many">>;version:ZodLiteral<"1">>; },"tools"|"context">>,"strict",ZodTypeAny, {agent: {agentId:string;kind:"agent"; };executionId:string;message: {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; };metadata?:JsonObject;options?: {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; };state?:JsonObject;version:"1"; }, {agent: {agentId:string;kind:"agent"; };executionId:string;message: {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; };metadata?:JsonObject;options?: {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; };state?:JsonObject;version:"1"; }>
Defined in: http.ts:24
Turn request accepted over HTTP; authority and visible tools are host-derived.
RemoteResourceOperationSchema
constRemoteResourceOperationSchema:ZodObject<Omit<{action:ZodString;context:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>;input:ZodOptional<ZodType<JsonValue,ZodTypeDef,JsonValue>>>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;operationId:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<...>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<...>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<...>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<...>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>; },"context">>,"strict",ZodTypeAny, {action:string;input?:JsonValue;metadata?:JsonObject;operationId:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }, {action:string;input?:JsonValue;metadata?:JsonObject;operationId:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }>
Defined in: http.ts:18
Resource operation accepted over HTTP; authority is injected by the host.
ResourceOperationSchema
constResourceOperationSchema:ZodObject<{action:ZodString;context:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>;input:ZodOptional<ZodType<JsonValue,ZodTypeDef,JsonValue>>>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;operationId:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>; },"strict",ZodTypeAny, {action:string;context: {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; };input?:JsonValue;metadata?:JsonObject;operationId:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }, {action:string;context: {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; };input?:JsonValue;metadata?:JsonObject;operationId:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }>
Defined in: resource.ts:10
A self-contained request to perform one permission-controlled operation.
ResourceReachSchema
constResourceReachSchema:ZodObject<{actions:ZodArray<ZodString,"many">>;namespace:ZodString;path:ZodArray<ZodString,"many">>;scope:ZodEnum<["exact","descendants"]>; },"strict",ZodTypeAny, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }>
Defined in: capability.ts:168
Where an actor may operate, with the authority stripped out.
A reader needs to know which paths are worth naming — otherwise it guesses
and collects denials — but it must not learn who granted the access, for how
long, or how many uses remain. This carries the shape of the reachable
surface and nothing else. It is descriptive: every call is still authorized
independently, so a stale or over-wide ResourceReach cannot permit
anything.
The owner is deliberately absent as well. Reach is always derived under one access context and describes that context's world; carrying an owner would invite a reader to treat an entry as portable to another.
ResourceRefSchema
constResourceRefSchema:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>
Defined in: capability.ts:27
A host-independent reference to a resource exposed through SharedOS.
ResourceResultSchema
constResourceResultSchema:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;metadata?:JsonObject;operationId:string;output:JsonValue;status:"succeeded"; }, {completedAt:string;metadata?:JsonObject;operationId:string;output:JsonValue;status:"succeeded"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"denied"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"denied"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"failed"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"failed"; }>]>
Defined in: resource.ts:29
RuntimeEventSchema
constRuntimeEventSchema:ZodObject<{data:ZodType<JsonValue,ZodTypeDef,JsonValue>>;type:ZodString; },"strict",ZodTypeAny, {data:JsonValue;type:string; }, {data:JsonValue;type:string; }>
Defined in: runtime.ts:20
A runtime-originated observation. The SharedOS envelope assigns its audit identity.
RuntimeManifestSchema
constRuntimeManifestSchema:ZodObject<{id:ZodString;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;protocolVersion:ZodLiteral<"1">>;version:ZodString; },"strict",ZodTypeAny, {id:string;metadata?:JsonObject;protocolVersion:"1";version:string; }, {id:string;metadata?:JsonObject;protocolVersion:"1";version:string; }>
Defined in: runtime.ts:8
Stable, JSON-safe provenance for one installed runtime implementation.
RuntimeTurnOutcomeSchema
constRuntimeTurnOutcomeSchema:ZodDiscriminatedUnion<"type", [ZodObject<object&object,"strict",ZodTypeAny, {metadata?:JsonObject;output:JsonValue;type:"complete"; }, {metadata?:JsonObject;output:JsonValue;type:"complete"; }>,ZodObject<object&object,"strict",ZodTypeAny, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;type:"fail"; }, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;type:"fail"; }>,ZodObject<object&object,"strict",ZodTypeAny, {metadata?:JsonObject;reason:string;type:"escalate"; }, {metadata?:JsonObject;reason:string;type:"escalate"; }>]>
Defined in: runtime.ts:43
The only terminal outcomes a runtime plugin may return for one bounded turn.
escalate is a third terminal state rather than a flavour of fail. A turn
that stopped because it needed authority it does not hold is a different
event from one that was refused and from one that erred, and collapsing it
into either would make "the agent asked for help" unrecoverable from the
record. It grants nothing: SharedOS records the request, names the reviewer
the host would route it to, and stops.
ServiceAddressSchema
constServiceAddressSchema:ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>
Defined in: address.ts:20
SHAREDOS_API_ERROR_CODES
constSHAREDOS_API_ERROR_CODES: readonly ["invalid_access_context","invalid_json","invalid_request","permission_denied","not_found","method_not_allowed","internal_error"]
Defined in: http.ts:47
The codes the SharedOS HTTP handler itself answers with. A kernel refusal
travels inside a 200 result under its own vocabulary (docs/errors.md);
these are the failures of the request as a request.
The wire schema below keeps code a string so that an older client still
reads a code a newer server added; the union is for the producing side and
for a reader that wants to switch on the known ones.
SHAREDOS_ROUTES
constSHAREDOS_ROUTES:object
Defined in: http.ts:99
The HTTP surface, as one table the handler routes from and the client calls
through. A path with two verbs is two entries; the handler derives the
allowed verbs for a path from the table, so there is no second list to keep
in step. docs/http-api.md describes the same table for a reader.
Type Declaration
authorize
readonlyauthorize:object
authorize.method
readonlymethod:"POST"="POST"
authorize.path
readonlypath:"/v1/authorize"="/v1/authorize"
authorize.request
readonlyrequest:ZodObject<{action:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>; },"strict",ZodTypeAny, {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }, {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }> =CapabilityRequirementSchema
authorize.response
readonlyresponse:ZodObject<{allowed:ZodBoolean;matchedGrantId:ZodOptional<ZodString>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;reasonCode:ZodString;requiredAuthority:ZodOptional<ZodObject<{capabilities:ZodArray<ZodObject<{actions:ZodArray<..., ...>;resource:ZodObject<..., ..., ..., ..., ...>;scope:ZodEnum<...>; },"strict",ZodTypeAny, {actions: ...[];resource: {namespace: ...;owner?: ...;path: ...; };scope: ... | ...; }, {actions: ...[];resource: {namespace: ...;owner?: ...;path: ...; };scope: ... | ...; }>,"many">>;constraints:ZodOptional<ZodEffects<ZodObject<{delegationDepth: ...;expiresAt: ...;maxUses: ...;notBefore: ...;purposes: ...; },"strict",ZodTypeAny, {delegationDepth?: ...;expiresAt?: ...;maxUses?: ...;notBefore?: ...;purposes?: ...; }, {delegationDepth?: ...;expiresAt?: ...;maxUses?: ...;notBefore?: ...;purposes?: ...; }>, {delegationDepth?: ... | ...;expiresAt?: ... | ...;maxUses?: ... | ...;notBefore?: ... | ...;purposes?: ... | ...; }, {delegationDepth?: ... | ...;expiresAt?: ... | ...;maxUses?: ... | ...;notBefore?: ... | ...;purposes?: ... | ...; }>>;id:ZodString;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;namespaceId:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;purpose:ZodString;requestedAt:ZodString;requester:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>; },"strict",ZodTypeAny, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }, {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?: ...[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }>>; },"strict",ZodTypeAny, {allowed:boolean;matchedGrantId?:string;metadata?:JsonObject;reasonCode:string;requiredAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }; }, {allowed:boolean;matchedGrantId?:string;metadata?:JsonObject;reasonCode:string;requiredAuthority?: {capabilities:object[];constraints?: {delegationDepth?:number;expiresAt?:string;maxUses?:number;notBefore?:string;purposes?:string[]; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;requestedAt:string;requester: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; }; }; }> =AuthorizationDecisionSchema
executeTurn
readonlyexecuteTurn:object
executeTurn.method
readonlymethod:"POST"="POST"
executeTurn.path
readonlypath:"/v1/turns"="/v1/turns"
executeTurn.request
readonlyrequest:ZodObject<Omit<{agent:ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>;context:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>;executionId:ZodString;message:ZodObject<{createdAt:ZodString;id:ZodString;payload:ZodType<JsonValue,ZodTypeDef,JsonValue>>;provenance:ZodOptional<ZodObject<{metadata:ZodOptional<...>;parentIds:ZodArray<..., ...>;source:ZodString; },"strict",ZodTypeAny, {metadata?: ... | ...;parentIds: ...[];source:string; }, {metadata?: ... | ...;parentIds: ...[];source:string; }>>;purpose:ZodString;receiver:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;replyTo:ZodOptional<ZodString>>;sender:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;traceId:ZodString;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;options:ZodOptional<ZodObject<{maxSteps:ZodOptional<ZodNumber>>;maxToolCalls:ZodOptional<ZodNumber>>;timeoutMs:ZodOptional<ZodNumber>>; },"strict",ZodTypeAny, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }, {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; }>>;state:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;tools:ZodArray<ZodEffects<ZodObject<{annotations:ZodOptional<ZodObject<..., ..., ..., ..., ...>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodType<..., ..., ...>>;name:ZodString;namespace:ZodString;outputSchema:ZodOptional<ZodType<..., ..., ...>>;readWrite:ZodEnum<[..., ...]>;requiredCapability:ZodObject<{action: ...;resource: ...; },"strict",ZodTypeAny, {action: ...;resource: ...; }, {action: ...;resource: ...; }>;source:ZodString; },"strict",ZodTypeAny, {annotations?: {destructive?: ...;idempotent?: ...;readOnly?: ...; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace: ...;owner?: ...;path: ...; }; };source:string; }, {annotations?: {destructive?: ...;idempotent?: ...;readOnly?: ...; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace: ...;owner?: ...;path: ...; }; };source:string; }>, {annotations?: {destructive?: ... | ... | ...;idempotent?: ... | ... | ...;readOnly?: ... | ... | ...; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }; };source:string; }, {annotations?: {destructive?: ... | ... | ...;idempotent?: ... | ... | ...;readOnly?: ... | ... | ...; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }; };source:string; }>,"many">>;version:ZodLiteral<"1">>; },"tools"|"context">>,"strict",ZodTypeAny, {agent: {agentId:string;kind:"agent"; };executionId:string;message: {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; };metadata?:JsonObject;options?: {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; };state?:JsonObject;version:"1"; }, {agent: {agentId:string;kind:"agent"; };executionId:string;message: {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; };metadata?:JsonObject;options?: {maxSteps?:number;maxToolCalls?:number;timeoutMs?:number; };state?:JsonObject;version:"1"; }> =RemoteExecutionRequestSchema
executeTurn.response
readonlyresponse:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;events:object[];executionId:string;metadata?:JsonObject;output:JsonValue;startedAt:string;status:"succeeded";traceId:string;version:"1"; }, {completedAt:string;events:object[];executionId:string;metadata?:JsonObject;output:JsonValue;startedAt:string;status:"succeeded";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"denied";traceId:string;version:"1"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"denied";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"failed";traceId:string;version:"1"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"failed";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error?: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"cancelled";traceId:string;version:"1"; }, {completedAt:string;error?: {code:string;details?:JsonObject;message:string;retryable?:boolean; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"cancelled";traceId:string;version:"1"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;escalation: {reason:string;requestedAt:string;requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?: ...;expiresAt?: ...;maxUses?: ...;notBefore?: ...;purposes?: ...; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };purpose:string;requestedAt:string;requester: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; }; };reviewer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };status:"pending"; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"escalated";traceId:string;version:"1"; }, {completedAt:string;escalation: {reason:string;requestedAt:string;requestedAuthority?: {capabilities:object[];constraints?: {delegationDepth?: ...;expiresAt?: ...;maxUses?: ...;notBefore?: ...;purposes?: ...; };id:string;metadata?:JsonObject;namespaceId:string;owner: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };purpose:string;requestedAt:string;requester: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; }; };reviewer: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };status:"pending"; };events:object[];executionId:string;metadata?:JsonObject;startedAt:string;status:"escalated";traceId:string;version:"1"; }>]> =ExecutionResultSchema
health
readonlyhealth:object
health.method
readonlymethod:"GET"="GET"
health.path
readonlypath:"/health"="/health"
health.response
readonlyresponse:ZodObject<{protocolVersion:ZodLiteral<"1">>;status:ZodLiteral<"ok">>; },"strict",ZodTypeAny, {protocolVersion:"1";status:"ok"; }, {protocolVersion:"1";status:"ok"; }> =SharedOSHealthSchema
invokeResource
readonlyinvokeResource:object
invokeResource.method
readonlymethod:"POST"="POST"
invokeResource.path
readonlypath:"/v1/resources/invoke"="/v1/resources/invoke"
invokeResource.request
readonlyrequest:ZodObject<Omit<{action:ZodString;context:ZodObject<{actor:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;authority:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;enabledToolNamespaces:ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>;namespaceId:ZodString;now:ZodString;owner:ZodDiscriminatedUnion<"kind", [ZodObject<{kind: ...;userId: ...; },"strict",ZodTypeAny, {kind: ...;userId: ...; }, {kind: ...;userId: ...; }>,ZodObject<{agentId: ...;kind: ...; },"strict",ZodTypeAny, {agentId: ...;kind: ...; }, {agentId: ...;kind: ...; }>,ZodObject<{conversationId: ...;kind: ...; },"strict",ZodTypeAny, {conversationId: ...;kind: ...; }, {conversationId: ...;kind: ...; }>,ZodObject<{kind: ...;serviceId: ...; },"strict",ZodTypeAny, {kind: ...;serviceId: ...; }, {kind: ...;serviceId: ...; }>]>;purpose:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }, {actor: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };authority: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };enabledToolNamespaces:string[];namespaceId:string;now:string;owner: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };purpose:string;traceId:string; }>;input:ZodOptional<ZodType<JsonValue,ZodTypeDef,JsonValue>>>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;operationId:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>; },"context">>,"strict",ZodTypeAny, {action:string;input?:JsonValue;metadata?:JsonObject;operationId:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }, {action:string;input?:JsonValue;metadata?:JsonObject;operationId:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }> =RemoteResourceOperationSchema
invokeResource.response
readonlyresponse:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;metadata?:JsonObject;operationId:string;output:JsonValue;status:"succeeded"; }, {completedAt:string;metadata?:JsonObject;operationId:string;output:JsonValue;status:"succeeded"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"denied"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"denied"; }>,ZodObject<object&object,"strict",ZodTypeAny, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"failed"; }, {completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;operationId:string;status:"failed"; }>]> =ResourceResultSchema
invokeTool
readonlyinvokeTool:object
invokeTool.method
readonlymethod:"POST"="POST"
invokeTool.path
readonlypath:"/v1/tools/invoke"="/v1/tools/invoke"
invokeTool.request
readonlyrequest:ZodObject<{arguments:ZodType<JsonObject,ZodTypeDef,JsonObject>>;id:ZodString;requestedAt:ZodString;tool:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {arguments:JsonObject;id:string;requestedAt:string;tool:string;traceId:string; }, {arguments:JsonObject;id:string;requestedAt:string;tool:string;traceId:string; }> =ToolCallSchema
invokeTool.response
readonlyresponse:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {callId:string;completedAt:string;metadata?:JsonObject;output:JsonValue;status:"succeeded";tool:string; }, {callId:string;completedAt:string;metadata?:JsonObject;output:JsonValue;status:"succeeded";tool:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"denied";tool:string; }, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"denied";tool:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"failed";tool:string; }, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"failed";tool:string; }>]> =ToolResultSchema
listToolNamespaces
readonlylistToolNamespaces:object
listToolNamespaces.method
readonlymethod:"GET"="GET"
listToolNamespaces.path
readonlypath:"/v1/tools/namespaces"="/v1/tools/namespaces"
listToolNamespaces.response
readonlyresponse:ZodEffects<ZodObject<{namespaces:ZodArray<ZodEffects<ZodObject<{enabled:ZodBoolean;namespace:ZodString;sources:ZodArray<ZodString,"many">>;toolCount:ZodNumber; },"strict",ZodTypeAny, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>,"many">>;summary:ZodObject<{disabled:ZodNumber;enabled:ZodNumber;total:ZodNumber; },"strict",ZodTypeAny, {disabled:number;enabled:number;total:number; }, {disabled:number;enabled:number;total:number; }>; },"strict",ZodTypeAny, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }>, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }> =ToolNamespaceCatalogSchema
listTools
readonlylistTools:object
listTools.method
readonlymethod:"GET"="GET"
listTools.path
readonlypath:"/v1/tools"="/v1/tools"
listTools.response
readonlyresponse:ZodArray<ZodEffects<ZodObject<{annotations:ZodOptional<ZodObject<{destructive:ZodOptional<ZodBoolean>>;idempotent:ZodOptional<ZodBoolean>>;readOnly:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;name:ZodString;namespace:ZodString;outputSchema:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;readWrite:ZodEnum<["read","write"]>;requiredCapability:ZodObject<{action:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<...>;path:ZodArray<..., ...>; },"strict",ZodTypeAny, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }, {namespace:string;owner?: ... | ... | ... | ... | ...;path: ...[]; }>; },"strict",ZodTypeAny, {action:string;resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; }; }, {action:string;resource: {namespace:string;owner?: {kind: ...;userId: ...; } | {agentId: ...;kind: ...; } | {conversationId: ...;kind: ...; } | {kind: ...;serviceId: ...; };path:string[]; }; }>;source:ZodString; },"strict",ZodTypeAny, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>,"many">>
reach
readonlyreach:object
reach.method
readonlymethod:"GET"="GET"
reach.path
readonlypath:"/v1/reach"="/v1/reach"
reach.response
readonlyresponse:ZodDiscriminatedUnion<"status", [ZodObject<{reach:ZodArray<ZodObject<{actions:ZodArray<ZodString,"many">>;namespace:ZodString;path:ZodArray<ZodString,"many">>;scope:ZodEnum<[..., ...]>; },"strict",ZodTypeAny, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }, {actions:string[];namespace:string;path:string[];scope:"exact"|"descendants"; }>,"many">>;status:ZodLiteral<"computed">>; },"strict",ZodTypeAny, {reach:object[];status:"computed"; }, {reach:object[];status:"computed"; }>,ZodObject<{reasonCode:ZodEnum<["authority_unavailable","usage_store_unavailable"]>;status:ZodLiteral<"unavailable">>; },"strict",ZodTypeAny, {reasonCode:"authority_unavailable"|"usage_store_unavailable";status:"unavailable"; }, {reasonCode:"authority_unavailable"|"usage_store_unavailable";status:"unavailable"; }>]> =ReachResultSchema
sendMessage
readonlysendMessage:object
sendMessage.method
readonlymethod:"POST"="POST"
sendMessage.path
readonlypath:"/v1/messages"="/v1/messages"
sendMessage.request
readonlyrequest:ZodObject<{createdAt:ZodString;id:ZodString;payload:ZodType<JsonValue,ZodTypeDef,JsonValue>>;provenance:ZodOptional<ZodObject<{metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;parentIds:ZodArray<ZodString,"many">>;source:ZodString; },"strict",ZodTypeAny, {metadata?:JsonObject;parentIds:string[];source:string; }, {metadata?:JsonObject;parentIds:string[];source:string; }>>;purpose:ZodString;receiver:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;replyTo:ZodOptional<ZodString>>;sender:ZodDiscriminatedUnion<"kind", [ZodObject<{kind:ZodLiteral<"human">>;userId:ZodString; },"strict",ZodTypeAny, {kind:"human";userId:string; }, {kind:"human";userId:string; }>,ZodObject<{agentId:ZodString;kind:ZodLiteral<"agent">>; },"strict",ZodTypeAny, {agentId:string;kind:"agent"; }, {agentId:string;kind:"agent"; }>,ZodObject<{conversationId:ZodString;kind:ZodLiteral<"group">>; },"strict",ZodTypeAny, {conversationId:string;kind:"group"; }, {conversationId:string;kind:"group"; }>,ZodObject<{kind:ZodLiteral<"service">>;serviceId:ZodString; },"strict",ZodTypeAny, {kind:"service";serviceId:string; }, {kind:"service";serviceId:string; }>]>;traceId:ZodString;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }, {createdAt:string;id:string;payload:JsonValue;provenance?: {metadata?:JsonObject;parentIds:string[];source:string; };purpose:string;receiver: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };replyTo?:string;sender: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };traceId:string;version:"1"; }> =MessageEnvelopeSchema
sendMessage.response
readonlyresponse:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {messageId:string;metadata?:JsonObject;status:"accepted";timestamp:string; }, {messageId:string;metadata?:JsonObject;status:"accepted";timestamp:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {messageId:string;metadata?:JsonObject;status:"delivered";timestamp:string; }, {messageId:string;metadata?:JsonObject;status:"delivered";timestamp:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"denied";timestamp:string; }, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"denied";timestamp:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"failed";timestamp:string; }, {error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };messageId:string;metadata?:JsonObject;status:"failed";timestamp:string; }>]> =MessageDeliveryResultSchema
updateToolNamespaces
readonlyupdateToolNamespaces:object
updateToolNamespaces.method
readonlymethod:"PUT"="PUT"
updateToolNamespaces.path
readonlypath:"/v1/tools/namespaces"="/v1/tools/namespaces"
updateToolNamespaces.request
readonlyrequest:ZodEffects<ZodObject<{disable:ZodOptional<ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>>;enable:ZodOptional<ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>>; },"strict",ZodTypeAny, {disable?:string[];enable?:string[]; }, {disable?:string[];enable?:string[]; }>, {disable?:string[];enable?:string[]; }, {disable?:string[];enable?:string[]; }> =ToolNamespaceUpdateSchema
updateToolNamespaces.response
readonlyresponse:ZodEffects<ZodObject<{namespaces:ZodArray<ZodEffects<ZodObject<{enabled:ZodBoolean;namespace:ZodString;sources:ZodArray<ZodString,"many">>;toolCount:ZodNumber; },"strict",ZodTypeAny, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>,"many">>;summary:ZodObject<{disabled:ZodNumber;enabled:ZodNumber;total:ZodNumber; },"strict",ZodTypeAny, {disabled:number;enabled:number;total:number; }, {disabled:number;enabled:number;total:number; }>; },"strict",ZodTypeAny, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }>, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }> =ToolNamespaceCatalogSchema
SHAREDOS_VERSION
constSHAREDOS_VERSION:"1.0.0-preview"="1.0.0-preview"
Defined in: common.ts:22
The SharedOS build, as every manifest, MCP server and conformance record names it.
The packages share one version and are published together, so there is one constant. The release gate holds it equal to the synchronized package version, because a record that names the wrong build is evidence attributed to code that never ran.
SharedOSApiErrorResponseSchema
constSharedOSApiErrorResponseSchema:ZodObject<{error:ZodObject<{code:ZodString;message:ZodString;requestId:ZodOptional<ZodString>>; },"strict",ZodTypeAny, {code:string;message:string;requestId?:string; }, {code:string;message:string;requestId?:string; }>; },"strict",ZodTypeAny, {error: {code:string;message:string;requestId?:string; }; }, {error: {code:string;message:string;requestId?:string; }; }>
Defined in: http.ts:58
SharedOSHealthSchema
constSharedOSHealthSchema:ZodObject<{protocolVersion:ZodLiteral<"1">>;status:ZodLiteral<"ok">>; },"strict",ZodTypeAny, {protocolVersion:"1";status:"ok"; }, {protocolVersion:"1";status:"ok"; }>
Defined in: http.ts:30
SharedOSToolCatalogSchema
constSharedOSToolCatalogSchema:ZodEffects<ZodObject<{catalogHash:ZodString;executionId:ZodString;tools:ZodArray<ZodObject<{annotations:ZodOptional<ZodObject<{destructiveHint:ZodOptional<ZodBoolean>>;idempotentHint:ZodOptional<ZodBoolean>>;openWorldHint:ZodOptional<ZodBoolean>>;readOnlyHint:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; }, {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; }>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodObject<{namespace:ZodOptional<ZodString>>;source:ZodOptional<ZodString>>; },"strict",ZodTypeAny, {namespace?:string;source?:string; }, {namespace?:string;source?:string; }>>;name:ZodString;outputSchema:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>; },"strict",ZodTypeAny, {annotations?: {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; };description:string;inputSchema:JsonObject;metadata?: {namespace?:string;source?:string; };name:string;outputSchema?:JsonObject; }, {annotations?: {destructiveHint?:boolean;idempotentHint?:boolean;openWorldHint?:boolean;readOnlyHint?:boolean; };description:string;inputSchema:JsonObject;metadata?: {namespace?:string;source?:string; };name:string;outputSchema?:JsonObject; }>,"many">>;version:ZodLiteral<"1">>; },"strict",ZodTypeAny, {catalogHash:string;executionId:string;tools:object[];version:"1"; }, {catalogHash:string;executionId:string;tools:object[];version:"1"; }>, {catalogHash:string;executionId:string;tools:object[];version:"1"; }, {catalogHash:string;executionId:string;tools:object[];version:"1"; }>
Defined in: tool.ts:211
The effective, permission-filtered catalogue for exactly one turn.
catalogHash covers the tools and nothing else, so two harnesses that were
handed the same semantic tool set produce the same hash even though their
executionIds, transports, and harness-side aliases differ. That is the whole
point of carrying it: an experiment can then prove the harnesses were compared
on equal terms rather than assuming it.
TimestampSchema
constTimestampSchema:ZodString
Defined in: common.ts:29
An RFC 3339 timestamp, represented as a string to remain JSON-safe.
ToolAnnotationsSchema
constToolAnnotationsSchema:ZodObject<{destructive:ZodOptional<ZodBoolean>>;idempotent:ZodOptional<ZodBoolean>>;readOnly:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }>
Defined in: tool.ts:100
ToolCallSchema
constToolCallSchema:ZodObject<{arguments:ZodType<JsonObject,ZodTypeDef,JsonObject>>;id:ZodString;requestedAt:ZodString;tool:ZodString;traceId:ZodString; },"strict",ZodTypeAny, {arguments:JsonObject;id:string;requestedAt:string;tool:string;traceId:string; }, {arguments:JsonObject;id:string;requestedAt:string;tool:string;traceId:string; }>
Defined in: tool.ts:334
ToolDefinitionSchema
constToolDefinitionSchema:ZodEffects<ZodObject<{annotations:ZodOptional<ZodObject<{destructive:ZodOptional<ZodBoolean>>;idempotent:ZodOptional<ZodBoolean>>;readOnly:ZodOptional<ZodBoolean>>; },"strict",ZodTypeAny, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }, {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; }>>;description:ZodString;inputSchema:ZodType<JsonObject,ZodTypeDef,JsonObject>>;metadata:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;name:ZodString;namespace:ZodString;outputSchema:ZodOptional<ZodType<JsonObject,ZodTypeDef,JsonObject>>>>;readWrite:ZodEnum<["read","write"]>;requiredCapability:ZodObject<{action:ZodString;resource:ZodObject<{namespace:ZodString;owner:ZodOptional<ZodDiscriminatedUnion<"kind", [ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>,ZodObject<..., ..., ..., ..., ...>]>>;path:ZodArray<ZodString,"many">>; },"strict",ZodTypeAny, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }, {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }>; },"strict",ZodTypeAny, {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }, {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; }>;source:ZodString; },"strict",ZodTypeAny, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }, {annotations?: {destructive?:boolean;idempotent?:boolean;readOnly?:boolean; };description:string;inputSchema:JsonObject;metadata?:JsonObject;name:string;namespace:string;outputSchema?:JsonObject;readWrite:"read"|"write";requiredCapability: {action:string;resource: {namespace:string;owner?: {kind:"human";userId:string; } | {agentId:string;kind:"agent"; } | {conversationId:string;kind:"group"; } | {kind:"service";serviceId:string; };path:string[]; }; };source:string; }>
Defined in: tool.ts:111
A JSON-Schema-described tool bound to one permission requirement.
ToolNameSchema
constToolNameSchema:ZodString
Defined in: tool.ts:28
A canonical SharedOS tool identity.
Deliberately narrower than IdentifierSchema. A tool name is not an
opaque host identifier: it is published to external harnesses as the raw MCP
Tool.name, so the character set has to be one every harness and transport
carries unchanged. Keeping the two schemas distinct makes the invariant
ToolDefinition.name = SharedOS canonical tool ID = raw MCP Tool.name
enforceable at registration rather than merely documented.
Names are globally unique across namespaces, so a catalogue that brokers two
providers exposing the same underlying operation still publishes two distinct
names -- github.search and notion.search, never search twice.
A harness is free to rewrite this into an alias of its own
(mcp__sharedos__files_search). That alias is presentation, never identity,
and never participates in authorization.
ToolNamespaceCatalogSchema
constToolNamespaceCatalogSchema:ZodEffects<ZodObject<{namespaces:ZodArray<ZodEffects<ZodObject<{enabled:ZodBoolean;namespace:ZodString;sources:ZodArray<ZodString,"many">>;toolCount:ZodNumber; },"strict",ZodTypeAny, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>,"many">>;summary:ZodObject<{disabled:ZodNumber;enabled:ZodNumber;total:ZodNumber; },"strict",ZodTypeAny, {disabled:number;enabled:number;total:number; }, {disabled:number;enabled:number;total:number; }>; },"strict",ZodTypeAny, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }>, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }, {namespaces:object[];summary: {disabled:number;enabled:number;total:number; }; }>
Defined in: tool.ts:296
ToolNamespaceDescriptorSchema
constToolNamespaceDescriptorSchema:ZodEffects<ZodObject<{enabled:ZodBoolean;namespace:ZodString;sources:ZodArray<ZodString,"many">>;toolCount:ZodNumber; },"strict",ZodTypeAny, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }, {enabled:boolean;namespace:string;sources:string[];toolCount:number; }>
Defined in: tool.ts:277
ToolNamespaceSchema
constToolNamespaceSchema:ZodString=IdentifierSchema
Defined in: tool.ts:38
A logical group of tools that a trusted host may enable for one access context.
ToolNamespaceUpdateSchema
constToolNamespaceUpdateSchema:ZodEffects<ZodObject<{disable:ZodOptional<ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>>;enable:ZodOptional<ZodEffects<ZodArray<ZodString,"many">>,string[],string[]>>; },"strict",ZodTypeAny, {disable?:string[];enable?:string[]; }, {disable?:string[];enable?:string[]; }>, {disable?:string[];enable?:string[]; }, {disable?:string[];enable?:string[]; }>
Defined in: tool.ts:71
An idempotent patch to a host-owned tool namespace selection.
The host applies this atomically and returns the authoritative effective selection after product policy ceilings have been enforced.
ToolPolicySchema
constToolPolicySchema:ZodEffects<ZodObject<{externalDirect:ZodArray<ZodString,"many">>;harnessLocal:ZodArray<ZodString,"many">>;managedMcp:ZodArray<ZodString,"many">>;mode:ZodEnum<["strict","hybrid"]>; },"strict",ZodTypeAny, {externalDirect:string[];harnessLocal:string[];managedMcp:string[];mode:"strict"|"hybrid"; }, {externalDirect:string[];harnessLocal:string[];managedMcp:string[];mode:"strict"|"hybrid"; }>, {externalDirect:string[];harnessLocal:string[];managedMcp:string[];mode:"strict"|"hybrid"; }, {externalDirect:string[];harnessLocal:string[];managedMcp:string[];mode:"strict"|"hybrid"; }>
Defined in: tool.ts:251
The declared tool surface of one experiment or runtime configuration.
strict asserts that every effect available to the harness went through
SharedOS. It is checked, not just declared: a strict policy that also lists
externalDirect entries is rejected here rather than producing a run whose
headline claim its own manifest contradicts.
harnessLocal is still permitted under strict, because a harness with no
local tools at all cannot always be produced -- but the entries have to be
named, so a reader can see exactly which effects were outside the kernel.
ToolReadWriteSchema
constToolReadWriteSchema:ZodEnum<["read","write"]>
Defined in: tool.ts:49
A conservative catalog classification. Capabilities remain the authorization source.
ToolResultSchema
constToolResultSchema:ZodDiscriminatedUnion<"status", [ZodObject<object&object,"strict",ZodTypeAny, {callId:string;completedAt:string;metadata?:JsonObject;output:JsonValue;status:"succeeded";tool:string; }, {callId:string;completedAt:string;metadata?:JsonObject;output:JsonValue;status:"succeeded";tool:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"denied";tool:string; }, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"denied";tool:string; }>,ZodObject<object&object,"strict",ZodTypeAny, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"failed";tool:string; }, {callId:string;completedAt:string;error: {code:string;details?:JsonObject;message:string;retryable?:boolean; };metadata?:JsonObject;status:"failed";tool:string; }>]>
Defined in: tool.ts:353
ToolSourceSchema
constToolSourceSchema:ZodString=IdentifierSchema
Defined in: tool.ts:45
The host-defined origin of a tool, for example sharedos, native, mcp,
or composio. This is catalog metadata, never proof of authority.
Functions
isJsonObject()
isJsonObject(
value):value is JsonObject
Defined in: json.ts:36
Whether a value is shaped like a JSON object: a non-null object that is not
an array. It checks the shape of the top level only, which is what a reader
needs before indexing into a value it was handed as unknown or as a
JsonValue; it does not walk the children, so it is not a substitute for
JsonObjectSchema at a trust boundary.
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is JsonObject