Variable: ClientRuntimeObserveSchema
Makaio Framework / contracts/client / ClientRuntimeObserveSchema
Variable: ClientRuntimeObserveSchema
Section titled “Variable: ClientRuntimeObserveSchema”
constClientRuntimeObserveSchema: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).
Type Declaration
Section titled “Type Declaration”request
Section titled “request”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
Section titled “response”response:
ZodObject<{clientRuntimeId:ZodString;created:ZodBoolean;promoted:ZodBoolean; },$strip>