Skip to content

Variable: ClientRuntimeObserveSchema

Makaio Framework


Makaio Framework / contracts/client / ClientRuntimeObserveSchema

const ClientRuntimeObserveSchema: object

Defined in: ../../../packages/contracts/src/client/runtime-observation.ts:99

Request and response schemas for client.runtime.observe.

Callers send this request when they detect that a client runtime has started. The handler upserts a ClientRuntime record and returns a stable clientRuntimeId together with flags indicating whether the record was created or promoted to a richer state.

Hard-evidence invariant: at least one of supervisorSessionId, pid, or adapterSessionId must be present. Enforced via .refine() on the request schema (not on the shared evidence base, which stays composable).

request: ZodObject<{ adapterSessionId: ZodOptional<ZodString>; argv: ZodOptional<ZodArray<ZodString>>; clientId: ZodString; cwd: ZodOptional<ZodString>; metadata: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; observedAt: ZodNumber; parentPid: ZodOptional<ZodNumber>; pid: ZodOptional<ZodNumber>; sessionId: ZodOptional<ZodString>; source: ZodObject<{ layer: ZodEnum<{ adapter: "adapter"; cli-wrapper: "cli-wrapper"; client-hook: "client-hook"; statusline: "statusline"; supervisor: "supervisor"; }>; producer: ZodString; }, $strip>; supervisorSessionId: ZodOptional<ZodString>; }, $strip>

response: ZodObject<{ clientRuntimeId: ZodString; created: ZodBoolean; promoted: ZodBoolean; }, $strip>