actions/action_spec.ts view source
ZodUnion<readonly [ZodLiteral<"public">, ZodLiteral<"authenticated">, ZodLiteral<"keeper">, ZodObject<{ role: ZodString; }, $strict>]> Action spec types — the canonical source of truth for action contracts.
Extracted from zzz's action system. Action specs define method, kind,
auth, side effects, and input/output schemas. Bridge functions in
action_bridge.ts derive RouteSpec and SseEventSpec from them.
TODO @action-system-review The action system (action_spec, action_registry,
action_codegen, action_bridge) will evolve significantly with the saes-rpc quest.
Current state: bridge is stable, registry and codegen are partially stub API.
Search for @action-system-review across the actions/ and routes/ modules.
11 declarations
actions/action_spec.ts view source
ZodUnion<readonly [ZodLiteral<"public">, ZodLiteral<"authenticated">, ZodLiteral<"keeper">, ZodObject<{ role: ZodString; }, $strict>]> actions/action_spec.ts view source
ZodEnum<{ send_request: "send_request"; receive_request: "receive_request"; send_response: "send_response"; receive_response: "receive_response"; send_error: "send_error"; receive_error: "receive_error"; send: "send"; receive: "receive"; execute: "execute"; }> actions/action_spec.ts view source
ZodEnum<{ frontend: "frontend"; backend: "backend"; both: "both"; }> actions/action_spec.ts view source
ZodEnum<{ request_response: "request_response"; remote_notification: "remote_notification"; local_call: "local_call"; }> actions/action_spec.ts view source
ZodUnion<readonly [ZodLiteral<true>, ZodNull]> actions/action_spec.ts view source
ZodObject<{ method: ZodString; kind: ZodEnum<{ request_response: "request_response"; remote_notification: "remote_notification"; local_call: "local_call"; }>; initiator: ZodEnum<...>; ... 5 more ...; description: ZodString; }, $strict> actions/action_spec.ts view source
ZodUnion<readonly [ZodObject<{ method: ZodString; initiator: ZodEnum<{ frontend: "frontend"; backend: "backend"; both: "both"; }>; side_effects: ZodUnion<readonly [ZodLiteral<true>, ZodNull]>; ... 5 more ...; async: ZodDefault<...>; }, $strict>, ZodObject<...>, ZodObject<...>]> actions/action_spec.ts view source
(value: unknown): value is { method: string; initiator: "frontend" | "backend" | "both"; side_effects: true | null; input: ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; output: ZodType<...>; description: string; kind: "request_response"; auth: "public" | ... 2 more ... | { ...; }; async: true; } | { ...; } | { ...; } valueunknownboolean actions/action_spec.ts view source
ZodObject<{ method: ZodString; initiator: ZodEnum<{ frontend: "frontend"; backend: "backend"; both: "both"; }>; side_effects: ZodUnion<readonly [ZodLiteral<true>, ZodNull]>; ... 5 more ...; auth: ZodDefault<...>; }, $strict> Local calls can wrap synchronous or asynchronous actions, and are the escape hatch for remote APIs that do not support SAES.
actions/action_spec.ts view source
ZodObject<{ method: ZodString; initiator: ZodEnum<{ frontend: "frontend"; backend: "backend"; both: "both"; }>; input: ZodCustom<ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>, ZodType<...>>; ... 5 more ...; async: ZodDefault<...>; }, $strict> actions/action_spec.ts view source
ZodObject<{ method: ZodString; initiator: ZodEnum<{ frontend: "frontend"; backend: "backend"; both: "both"; }>; side_effects: ZodUnion<readonly [ZodLiteral<true>, ZodNull]>; ... 5 more ...; async: ZodDefault<...>; }, $strict>