openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 3 kB
JavaScript
import{t as e}from"./openclaw-state-read-subsystem-Dwoo5bcz.mjs";import{randomUUID as t}from"node:crypto";import"node:util/types";import"typebox/value";import{Type as n}from"typebox";t(),e(`audit/events`);const boundedRef=()=>n.String({minLength:1,maxLength:256}),rawRef=()=>n.String({minLength:1,maxLength:4096}),evidenceState=()=>n.Union([n.Literal(`present`),n.Literal(`absent`),n.Literal(`unknown`),n.Literal(`unsupported`)]),closedObject=e=>n.Object(e,{additionalProperties:!1}),ingressKind=()=>n.Union([n.Literal(`local-cli`),n.Literal(`gateway-client`),n.Literal(`channel`),n.Literal(`api`),n.Literal(`schedule`),n.Literal(`webhook`),n.Literal(`task`),n.Literal(`subagent`),n.Literal(`acp`),n.Literal(`worker`),n.Literal(`plugin`),n.Literal(`recovery`),n.Literal(`system`)]),runtimeKind=()=>n.Union([n.Literal(`gateway`),n.Literal(`embedded`),n.Literal(`worker`),n.Literal(`plugin-harness`),n.Literal(`acp`)]),admissionGrant=()=>closedObject({rawGrantRef:rawRef(),state:evidenceState()}),admissionGrants=()=>n.Array(admissionGrant(),{maxItems:16}),admissionAssurance=()=>n.Array(closedObject({kind:n.Union([n.Literal(`durable-profile`),n.Literal(`trusted-proxy`),n.Literal(`tailscale-whois`),n.Literal(`device-proof`),n.Literal(`channel-admission`),n.Literal(`local-process`),n.Literal(`spawn-lineage`),n.Literal(`worker-admission`),n.Literal(`runtime-binding`),n.Literal(`other`)]),rawEvidenceRef:rawRef(),strength:n.Union([n.Literal(`self-asserted`),n.Literal(`boundary-verified`),n.Literal(`cryptographic`)])}),{maxItems:16}),r=n.Union([closedObject({state:n.Literal(`present`),kind:n.Union([n.Literal(`person`),n.Literal(`agent`),n.Literal(`service`),n.Literal(`schedule`),n.Literal(`webhook`),n.Literal(`system`),n.Literal(`local-account`),n.Literal(`runtime`)]),rawPrincipalRef:rawRef(),displayLabel:n.Optional(n.String({maxLength:128}))}),closedObject({state:n.Literal(`unknown`)})]),i=closedObject({state:n.Literal(`present`),kind:n.Literal(`person`),rawPrincipalRef:rawRef()});closedObject({envelopeVersion:n.Literal(1),contextId:boundedRef(),executionId:boundedRef(),runId:boundedRef(),createdAt:n.Integer({minimum:0}),runtimeInstanceId:rawRef(),agentId:boundedRef(),ingress:closedObject({kind:ingressKind(),boundary:boundedRef(),state:evidenceState(),rawSourceRef:n.Optional(rawRef())}),runtime:closedObject({kind:runtimeKind()}),invoker:n.Optional(r),representedSubject:n.Optional(i),applicableGrants:admissionGrants(),assurance:admissionAssurance()}),closedObject({runId:boundedRef(),agentId:boundedRef(),ingress:closedObject({kind:ingressKind(),boundary:boundedRef(),state:n.Optional(evidenceState()),rawSourceRef:n.Optional(rawRef())}),runtime:closedObject({kind:runtimeKind()}),invoker:n.Optional(r),representedSubject:n.Optional(i),applicableGrants:n.Optional(admissionGrants()),assurance:n.Optional(admissionAssurance())}),closedObject({tokenVersion:n.Literal(1),contextId:boundedRef(),executionId:boundedRef(),runId:boundedRef(),createdAt:n.Integer({minimum:0})});export{};