@fuzdev/fuz_app 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/CLAUDE.md +92 -47
- package/dist/actions/action_codegen.d.ts +199 -29
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +321 -70
- package/dist/actions/action_registry.d.ts +41 -9
- package/dist/actions/action_registry.d.ts.map +1 -1
- package/dist/actions/action_registry.js +109 -32
- package/package.json +1 -1
package/dist/actions/CLAUDE.md
CHANGED
|
@@ -68,11 +68,45 @@ throws on any non-`remote_notification` kind.
|
|
|
68
68
|
|
|
69
69
|
## Registry + codegen (`action_registry.ts`, `action_codegen.ts`)
|
|
70
70
|
|
|
71
|
+
**Symmetric design — universal calling abstraction.** SAES is one spec
|
|
72
|
+
shape that drives dispatch across (a) network boundaries (frontend ⇄
|
|
73
|
+
backend over HTTP / WS) and (b) within the same runtime (`local_call`
|
|
74
|
+
actions). `ActionPeer` is symmetric on both sides (`send` + `receive`).
|
|
75
|
+
The two typed surfaces are paired: `FrontendActionsApi` is "what the
|
|
76
|
+
frontend can call" (typed Proxy from `create_rpc_client`);
|
|
77
|
+
`BackendActionsApi` is "what the backend can call" (typed object from
|
|
78
|
+
`create_broadcast_api` today; broader runtime constructors will join).
|
|
79
|
+
The remaining asymmetry today is runtime: there is no
|
|
80
|
+
`create_backend_rpc_client` and `create_broadcast_api` returns
|
|
81
|
+
`Promise<void>` (fire-and-forget broadcast) rather than the
|
|
82
|
+
`Promise<Result<{value}, {error}>>` shape `FrontendActionsApi` methods
|
|
83
|
+
return. Closing those gaps is captured in the SAES quest's API
|
|
84
|
+
review III deferred set — wait for a second backend runtime case.
|
|
85
|
+
|
|
71
86
|
`ActionRegistry(specs)` is a query/filter wrapper over `ActionSpecUnion[]`.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`
|
|
75
|
-
|
|
87
|
+
Codegen-used getter groups:
|
|
88
|
+
|
|
89
|
+
- Identity: `spec_by_method`, `methods`.
|
|
90
|
+
- Kind-narrow specs + matching `_methods`: `request_response_specs`,
|
|
91
|
+
`remote_notification_specs`, `local_call_specs`.
|
|
92
|
+
- Narrow handler-side (request_response only, `initiator` excludes own
|
|
93
|
+
side, drives the typed `BackendActionHandlers` map):
|
|
94
|
+
`frontend_handled_specs`, `frontend_handled_methods`,
|
|
95
|
+
`backend_handled_specs`, `backend_handled_methods`.
|
|
96
|
+
- Loose "relevant to this side" (everything the side might encounter,
|
|
97
|
+
drives the typed-Proxy method enums `FrontendActionMethod` and
|
|
98
|
+
`BackendActionMethod`): `specs_relevant_to_frontend`,
|
|
99
|
+
`methods_relevant_to_frontend`, `specs_relevant_to_backend`,
|
|
100
|
+
`methods_relevant_to_backend`.
|
|
101
|
+
- Broadcast (kind-narrow `remote_notification`, `initiator !== 'frontend'`,
|
|
102
|
+
excludes `streams` targets): `broadcast_specs`, `broadcast_methods`.
|
|
103
|
+
- Backend-initiated (forward-looking kind-agnostic version of broadcast;
|
|
104
|
+
same content today, will widen when local_calls or backend
|
|
105
|
+
`request_response` join): `backend_initiated_specs`,
|
|
106
|
+
`backend_initiated_methods`.
|
|
107
|
+
|
|
108
|
+
Other getters (auth, initiator-direction) are pre-built stubs flagged
|
|
109
|
+
`@action-system-review`.
|
|
76
110
|
|
|
77
111
|
`action_codegen.ts` provides gen helpers (used by consumer `*.gen.ts` files,
|
|
78
112
|
not the runtime):
|
|
@@ -83,7 +117,7 @@ not the runtime):
|
|
|
83
117
|
- `get_executor_phases(spec, executor)` — phases a given executor (`'frontend' | 'backend'`) participates in for the spec. Deduplicates via `Set` (handles `initiator: 'both'` overlap).
|
|
84
118
|
- `get_handler_return_type(spec, phase, imports, collections_path?)` — the TS type a phase handler must return; triggers the `ActionOutputs` import (sourced from `collections_path`, default `'./action_collections.js'`) as a side effect.
|
|
85
119
|
- `generate_phase_handlers(spec, executor, imports, {action_event_type?, collections_path?})` — emits the typed handler-map fragment for one action; consumers compose these into `ActionHandlers` types.
|
|
86
|
-
- `generate_actions_api_method_signature(spec, {sync_returns_value?})` — single source of truth for the typed `
|
|
120
|
+
- `generate_actions_api_method_signature(spec, {sync_returns_value?})` — single source of truth for the typed `FrontendActionsApi` method shape. Threads `options?: RpcClientCallOptions` (`{signal?, transport_name?, queue?}`) onto every async method — `request_response`, `remote_notification`, and async `local_call` — and wraps the return in `Promise<Result<...>>`. Notifications were previously emitted as `=> void`, mismatching the runtime (`create_remote_notification_method` returns a Promise that resolves to `Result<{value: void}>`); regenerate consumer typed clients to pick up the corrected shape.
|
|
87
121
|
- `create_banner(origin_path)` — gen banner comment.
|
|
88
122
|
- `to_action_spec_identifier(method)` / `to_action_spec_input_identifier` / `to_action_spec_output_identifier` — naming convention helpers (emit `foo_action_spec` / `foo_action_spec.input` / `foo_action_spec.output`).
|
|
89
123
|
- `COMPOSABLE_ACTION_METHODS` (+ `ComposableActionMethod` type) — readonly tuple `['heartbeat', 'cancel']`. Consumers spread when filtering backend `request_response` methods so dispatcher-owned composables don't leak into `BackendRequestResponseMethod` / handler maps.
|
|
@@ -92,51 +126,62 @@ not the runtime):
|
|
|
92
126
|
- `DEFAULT_SPECS_MODULE = './action_specs.js'` — shared default for helpers that emit `specs.{method}_action_spec` and need a `* as specs` namespace import.
|
|
93
127
|
- `DEFAULT_METATYPES_PATH = './action_metatypes.js'` — shared default for the sibling module carrying the generated `ActionMethod` enum.
|
|
94
128
|
|
|
95
|
-
### High-level helpers
|
|
129
|
+
### High-level helpers
|
|
96
130
|
|
|
97
131
|
Each accepts `(specs, imports, options?)` and returns one block of declarations.
|
|
98
132
|
Composed by consumer `*.gen.ts` producers; outputs do not include the banner or
|
|
99
|
-
surrounding `imports.build()`.
|
|
133
|
+
surrounding `imports.build()`. Use `compose_gen_file` to assemble the block
|
|
134
|
+
list + banner + imports into the final file body in one call.
|
|
100
135
|
|
|
101
136
|
**Composables are filtered by default.** Every spec-iterating helper accepts
|
|
102
137
|
`{include_composables?: boolean}` (default `false`) and drops `heartbeat` /
|
|
103
138
|
`cancel` from the emitted output. Composables ship from fuz_app and are
|
|
104
139
|
spread into each consumer's `actions` array at registration time — they
|
|
105
140
|
should not appear in consumer-owned typed surfaces (`ActionMethod`,
|
|
106
|
-
`
|
|
141
|
+
`FrontendActionsApi`, `ActionInputs`, `FrontendActionHandlers`, etc.). Pass
|
|
107
142
|
`include_composables: true` only if a consumer genuinely owns composables
|
|
108
143
|
in their typed API.
|
|
109
144
|
|
|
110
|
-
**Consumer tiers and
|
|
111
|
-
|
|
112
|
-
into the helpers
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
`
|
|
117
|
-
`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
145
|
+
**Consumer tiers and namespace handling.** Single-source consumers (zzz,
|
|
146
|
+
undying — every spec lives in one local `action_specs.ts`) drop straight
|
|
147
|
+
into the helpers and accept the default `* as specs from specs_module`
|
|
148
|
+
namespace import. Multi-source consumers (tx, visiones — which stitch
|
|
149
|
+
local specs together with `all_admin_action_specs` /
|
|
150
|
+
`all_permit_offer_action_specs` / `all_account_action_specs` /
|
|
151
|
+
`all_self_service_role_action_specs` from fuz_app) call
|
|
152
|
+
`create_namespace_qualifier(sources, imports)` once, then pass the
|
|
153
|
+
returned `qualify_spec` callback to the multi-source helpers
|
|
154
|
+
(`generate_action_specs_record`, `generate_action_inputs_outputs`,
|
|
155
|
+
`generate_backend_actions_api`). When `qualify_spec` is set, the helper
|
|
156
|
+
emits the callback's return value (e.g.
|
|
157
|
+
`admin_specs.account_list_action_spec`) and skips the default `* as specs`
|
|
158
|
+
import — the consumer (or the namespace-qualifier helper) owns the
|
|
159
|
+
multi-namespace imports. The helper appends `.input` / `.output` to the
|
|
160
|
+
qualified identifier in `generate_action_inputs_outputs` automatically;
|
|
161
|
+
the callback returns the bare spec identifier.
|
|
124
162
|
|
|
125
163
|
Tier 1 (HTTP-only, e.g. tx/visiones) emits a smaller surface — typically just
|
|
126
|
-
`ActionMethod` + `
|
|
127
|
-
and never calls `generate_typed_action_event_alias` or
|
|
164
|
+
`ActionMethod` + `FrontendActionsApi` + `ActionInputs` / `ActionOutputs`
|
|
165
|
+
interfaces — and never calls `generate_typed_action_event_alias` or
|
|
128
166
|
`generate_frontend_action_handlers`. Tier 2 (`TypedActionEvent`-aware, e.g.
|
|
129
|
-
zzz) emits the full set including `ActionEventDatas`, `TypedActionEvent`,
|
|
130
|
-
`FrontendActionHandlers`.
|
|
167
|
+
zzz) emits the full set including `ActionEventDatas`, `TypedActionEvent`,
|
|
168
|
+
and `FrontendActionHandlers`.
|
|
131
169
|
|
|
132
|
-
- `generate_action_method_enums(specs, imports, {emit?})` — up to
|
|
170
|
+
- `generate_action_method_enums(specs, imports, {emit?, include_composables?})` — up to nine `z.enum` + `z.infer` pairs (`ActionMethod`, `RequestResponseActionMethod`, `RemoteNotificationActionMethod`, `LocalCallActionMethod`, `FrontendActionMethod`, `BackendActionMethod`, `FrontendRequestResponseMethod`, `BackendRequestResponseMethod`, `BroadcastActionMethod`). `emit: ReadonlySet<ActionMethodEnumKind>` restricts to a subset (Tier 1 HTTP-only consumers don't need all nine). Skips kinds whose method list is empty (`z.enum([])` is invalid) and skips the `zod` import when no blocks are emitted. Adds `import {z} from 'zod'` only when at least one block is produced. The `frontend_handled` / `backend_handled` / `broadcast` kinds use the registry's narrow handler-side / streams-aware getters; the loose `frontend` / `backend` kinds preserve the everything-relevant-to-this-side semantic for the typed-Proxy method enum.
|
|
171
|
+
- `generate_action_method_enum_block(specs, imports, {name, jsdoc, predicate, include_composables?})` — lower-level escape hatch for genuinely cross-product enums the discriminator doesn't cover. Caller owns the predicate, name, and jsdoc.
|
|
133
172
|
- `generate_typed_action_event_alias(imports, {collections_path?, metatypes_path?})` — fixed-shape `TypedActionEvent<TMethod, TPhase, TStep>` alias narrowing `ActionEvent.data` against `ActionEventDatas`. Adds the three fuz_app type imports + `ActionEventDatas` (from `collections_path`) + `ActionMethod` (from `metatypes_path`).
|
|
134
|
-
- `generate_action_specs_record(specs, imports, {specs_module?})` — `ActionSpecs` runtime const + interface + `action_specs: Array<ActionSpecUnion>` value. Adds `* as specs` from `specs_module
|
|
135
|
-
- `generate_action_inputs_outputs(specs, imports, {specs_module?})` — `ActionInputs` and `ActionOutputs` runtime consts + interfaces.
|
|
136
|
-
- `generate_action_event_datas(specs, imports, {collections_path?})` — `ActionEventDatas` interface; per-spec variant by kind (`ActionEventRequestResponseData` / `ActionEventRemoteNotificationData` / `ActionEventLocalCallData`).
|
|
137
|
-
- `
|
|
138
|
-
- `generate_frontend_action_handlers(specs, imports, {collections_path?})` — `FrontendActionHandlers` interface (Tier 2 only — wraps `generate_phase_handlers` with `action_event_type: 'TypedActionEvent'`). Pair with `generate_typed_action_event_alias`.
|
|
139
|
-
- `generate_backend_actions_api(specs, imports, {specs_module?, collections_path?})` — `BackendActionsApi` interface AND `broadcast_action_specs: ReadonlyArray<ActionSpecUnion>` array. Filter: `kind === 'remote_notification' && initiator !== 'frontend'
|
|
173
|
+
- `generate_action_specs_record(specs, imports, {specs_module?, qualify_spec?, include_composables?})` — `ActionSpecs` runtime const + interface + `action_specs: Array<ActionSpecUnion>` value. Adds `* as specs` from `specs_module` unless `qualify_spec` is set (then `specs_module` is ignored and the consumer owns namespace imports).
|
|
174
|
+
- `generate_action_inputs_outputs(specs, imports, {specs_module?, qualify_spec?, include_composables?})` — `ActionInputs` and `ActionOutputs` runtime consts + interfaces. Same `qualify_spec` semantics as `generate_action_specs_record`; the helper appends `.input` / `.output` to the qualified identifier.
|
|
175
|
+
- `generate_action_event_datas(specs, imports, {same_file?, collections_path?, include_composables?})` — `ActionEventDatas` interface; per-spec variant by kind (`ActionEventRequestResponseData` / `ActionEventRemoteNotificationData` / `ActionEventLocalCallData`). `same_file` (default `true`) is the file-layout switch: when `true`, assumes `ActionInputs` / `ActionOutputs` are in the same module and adds no import (the zzz pattern); when `false`, adds the type imports from `collections_path` (default `'./action_collections.js'`). `collections_path` alone is a no-op — the surprising omit-vs-default behavior of earlier versions has been replaced.
|
|
176
|
+
- `generate_frontend_actions_api(specs, imports, {interface_name?, method_filter?, collections_path?, sync_returns_value?, include_composables?})` — emits the typed `FrontendActionsApi` interface (configurable via `interface_name`, default `'FrontendActionsApi'`). One method signature per spec via `generate_actions_api_method_signature`. Composables filtered by default; `method_filter: (spec) => boolean` runs after the composable filter. Renamed from `generate_actions_api` in API review III to make the side-of-the-wire intent visible at every consumer site.
|
|
177
|
+
- `generate_frontend_action_handlers(specs, imports, {collections_path?, include_composables?})` — `FrontendActionHandlers` interface (Tier 2 only — wraps `generate_phase_handlers` with `action_event_type: 'TypedActionEvent'`). Pair with `generate_typed_action_event_alias`.
|
|
178
|
+
- `generate_backend_actions_api(specs, imports, {interface_name?, spec_array_name?, specs_module?, collections_path?, qualify_spec?, include_composables?})` — `BackendActionsApi` interface AND `broadcast_action_specs: ReadonlyArray<ActionSpecUnion>` array (both names configurable). Filter: `kind === 'remote_notification' && initiator !== 'frontend'`, with `streams`-target methods (request-scoped progress notifications invoked via `ctx.notify`) excluded — the discriminator is `ActionSpec.streams`, not a manual list. Adds `ActionInputs` (from `collections_path`) + `ActionSpecUnion`, plus `* as specs` from `specs_module` unless `qualify_spec` is set. Method shape today is `(input) => Promise<void>` (matches `create_broadcast_api`'s fire-and-forget runtime); generalizing to per-kind shapes via `generate_actions_api_method_signature` is deferred until a second backend runtime constructor lands (see SAES quest § API review III deferred set).
|
|
179
|
+
- `generate_backend_action_handlers_map(imports, options?)` — emits the `BackendActionHandlers` mapped type (`{[K in BackendRequestResponseMethod]: (input: ActionInputs[K], ctx: BackendHandlerContext) => ActionOutputs[K] | Promise<ActionOutputs[K]>}`). Replaces the hand-maintained `Exclude<>` + parallel mapped-type pattern (zzz had this at `zzz/src/lib/server/zzz_action_handlers.ts:42-66`). Configurable type name, method enum name, and context type name; configurable `collections_path` / `metatypes_path` for the type imports.
|
|
180
|
+
|
|
181
|
+
### Wrapper + multi-source helper
|
|
182
|
+
|
|
183
|
+
- `compose_gen_file({origin_path, imports, blocks})` — encapsulates the per-`*.gen.ts` boilerplate (banner + `imports.build()` + blocks join + template literal). Returns the full file body. Each consumer producer collapses to one `compose_gen_file` call wrapping the helper invocations.
|
|
184
|
+
- `create_namespace_qualifier(sources, imports)` — multi-source consumer helper. Takes `ReadonlyArray<{ns, module, specs}>`, registers `import * as ns from module` for each on `imports`, builds the `method_to_ns` lookup with duplicate-method detection, returns `{qualify_spec, all_specs}` ready to thread through the high-level helpers. Closes the per-file boilerplate gap that kept tx + visiones on hand-rolled template strings even after the `qualify_spec?` callback landed (the per-call callback wasn't enough — the import dance + dup-check was the real boilerplate).
|
|
140
185
|
|
|
141
186
|
## HTTP bridge (`action_bridge.ts`)
|
|
142
187
|
|
|
@@ -640,12 +685,12 @@ zzz's `Actions` cell calls its own `add_from_json` +
|
|
|
640
685
|
`listen_to_action_event` here so the history plumbing stays inside zzz
|
|
641
686
|
instead of leaking onto the rpc_client surface. `event.spec.method` and
|
|
642
687
|
`event.data.method` narrow to `keyof TApi & string` so consumers passing
|
|
643
|
-
a generated `
|
|
644
|
-
`as ActionMethod` cast at the call site.
|
|
688
|
+
a generated `FrontendActionsApi` get the literal method-name union without
|
|
689
|
+
an `as ActionMethod` cast at the call site.
|
|
645
690
|
|
|
646
|
-
Cast the return to a generated `
|
|
647
|
-
codegen via `generate_actions_api_method_signature` keeps the
|
|
648
|
-
consistent. See ../../docs/usage.md §Typed Client Codegen.
|
|
691
|
+
Cast the return to a generated `FrontendActionsApi` interface for full
|
|
692
|
+
typing: codegen via `generate_actions_api_method_signature` keeps the
|
|
693
|
+
shape consistent. See ../../docs/usage.md §Typed Client Codegen.
|
|
649
694
|
|
|
650
695
|
### Throwing variants — `create_throwing_rpc_call` + `create_throwing_api`
|
|
651
696
|
|
|
@@ -656,10 +701,10 @@ is spec-level optional). Same hardening on both: only `{code, data}` cross
|
|
|
656
701
|
onto the Error, leaving `name` / `stack` as the native Error's own so
|
|
657
702
|
attacker-shaped `result.error` payloads cannot overwrite them.
|
|
658
703
|
|
|
659
|
-
| Helper | Shape
|
|
660
|
-
| -------------------------- |
|
|
661
|
-
| `create_throwing_rpc_call` | `(method, input?) => Promise<T>`
|
|
662
|
-
| `create_throwing_api` | typed Proxy over `
|
|
704
|
+
| Helper | Shape | Use at |
|
|
705
|
+
| -------------------------- | ------------------------------------- | -------------------------------------------------------------------------- |
|
|
706
|
+
| `create_throwing_rpc_call` | `(method, input?) => Promise<T>` | adapter wiring (e.g. `ui/admin_rpc_adapters.ts`) — method comes from a map |
|
|
707
|
+
| `create_throwing_api` | typed Proxy over `FrontendActionsApi` | direct call sites — `await api.foo(input)` keeps full inference |
|
|
663
708
|
|
|
664
709
|
**Layered design.** Result is the protocol primitive — `create_rpc_client`
|
|
665
710
|
returns `Result<{value}, {error}>` per call with no Error allocation. The
|
|
@@ -673,12 +718,12 @@ ritual.
|
|
|
673
718
|
|
|
674
719
|
`create_frontend_rpc_client` ships both shapes by default — see
|
|
675
720
|
[Frontend factory](#frontend-factory-frontend_rpc_clientts) below. Direct
|
|
676
|
-
consumers of `create_rpc_client` pass their typed `
|
|
677
|
-
generic to get the typed Result-shaped Proxy without casts, then
|
|
678
|
-
the throwing form on top:
|
|
721
|
+
consumers of `create_rpc_client` pass their typed `FrontendActionsApi`
|
|
722
|
+
as the generic to get the typed Result-shaped Proxy without casts, then
|
|
723
|
+
build the throwing form on top:
|
|
679
724
|
|
|
680
725
|
```ts
|
|
681
|
-
const api_result = create_rpc_client<
|
|
726
|
+
const api_result = create_rpc_client<FrontendActionsApi>({peer, environment});
|
|
682
727
|
const api = create_throwing_api(api_result);
|
|
683
728
|
// hot path: await api.foo(input)
|
|
684
729
|
// rare branch: const r = await api_result.foo(input); if (!r.ok) { … }
|
|
@@ -722,7 +767,7 @@ Returns both Proxy shapes from one factory call:
|
|
|
722
767
|
- `peer`, `environment` — exposed for advanced consumers that want to register more transports or share the environment with a separate dispatcher.
|
|
723
768
|
|
|
724
769
|
```ts
|
|
725
|
-
const {api, api_result} = create_frontend_rpc_client<
|
|
770
|
+
const {api, api_result} = create_frontend_rpc_client<FrontendActionsApi>({
|
|
726
771
|
specs: all_standard_action_specs,
|
|
727
772
|
});
|
|
728
773
|
// hot path: await api.account_verify()
|
|
@@ -9,12 +9,12 @@ export declare const COMPOSABLE_ACTION_METHODS: readonly ["heartbeat", "cancel"]
|
|
|
9
9
|
/** Methods that ship from fuz_app, kept out of consumer-owned method enums + handler maps. */
|
|
10
10
|
export type ComposableActionMethod = (typeof COMPOSABLE_ACTION_METHODS)[number];
|
|
11
11
|
/**
|
|
12
|
-
* Type predicate for filtering composable methods out of a typed `
|
|
12
|
+
* Type predicate for filtering composable methods out of a typed `FrontendActionsApi`
|
|
13
13
|
* `method_filter`. Avoids the `(... as never)` cast required to call
|
|
14
14
|
* `Array.prototype.includes` on the readonly tuple at narrow string types.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
*
|
|
17
|
+
* generate_frontend_actions_api(specs, imports, {
|
|
18
18
|
* method_filter: (s) => !is_composable_action_method(s.method),
|
|
19
19
|
* });
|
|
20
20
|
*/
|
|
@@ -132,10 +132,10 @@ export declare const to_action_spec_identifier: (method: string) => string;
|
|
|
132
132
|
export declare const to_action_spec_input_identifier: (method: string) => string;
|
|
133
133
|
export declare const to_action_spec_output_identifier: (method: string) => string;
|
|
134
134
|
/**
|
|
135
|
-
* Generates one method line of the typed `
|
|
136
|
-
* spec. Encapsulates the input/options/return-type signature shape so
|
|
137
|
-
* surface evolves in one place when fields like `signal` or
|
|
138
|
-
* are added to per-call options.
|
|
135
|
+
* Generates one method line of the typed `FrontendActionsApi` interface for a
|
|
136
|
+
* single spec. Encapsulates the input/options/return-type signature shape so
|
|
137
|
+
* the surface evolves in one place when fields like `signal` or
|
|
138
|
+
* `transport_name` are added to per-call options.
|
|
139
139
|
*
|
|
140
140
|
* Async methods (`request_response`, `remote_notification`, async
|
|
141
141
|
* `local_call`) get an optional second `options?: RpcClientCallOptions` arg
|
|
@@ -156,21 +156,23 @@ export declare const to_action_spec_output_identifier: (method: string) => strin
|
|
|
156
156
|
* @param options.sync_returns_value - when true (default), sync local_call
|
|
157
157
|
* methods return the output value directly; when false they're wrapped in
|
|
158
158
|
* `Result<{value, error}>` like async methods. Set to `false` if your
|
|
159
|
-
*
|
|
159
|
+
* FrontendActionsApi treats every method uniformly.
|
|
160
160
|
* @returns one line like `foo: (input: ActionInputs['foo'], options?: RpcClientCallOptions) => Promise<Result<...>>;`
|
|
161
161
|
*/
|
|
162
162
|
export declare const generate_actions_api_method_signature: (spec: ActionSpecUnion, options?: {
|
|
163
163
|
sync_returns_value?: boolean;
|
|
164
164
|
}) => string;
|
|
165
165
|
/** Discriminator for `generate_action_method_enums` — which method-set enums to emit. */
|
|
166
|
-
export type ActionMethodEnumKind = 'all' | 'request_response' | 'remote_notification' | 'local_call' | 'frontend' | 'backend';
|
|
166
|
+
export type ActionMethodEnumKind = 'all' | 'request_response' | 'remote_notification' | 'local_call' | 'frontend' | 'backend' | 'frontend_handled' | 'backend_handled' | 'broadcast';
|
|
167
167
|
/** Default emit set — every enum kind. */
|
|
168
168
|
export declare const ACTION_METHOD_ENUM_KINDS_ALL: ReadonlySet<ActionMethodEnumKind>;
|
|
169
169
|
/**
|
|
170
170
|
* Emit one or more `z.enum([...])` declarations for action method names —
|
|
171
171
|
* `ActionMethod`, `RequestResponseActionMethod`, `RemoteNotificationActionMethod`,
|
|
172
|
-
* `LocalCallActionMethod`, `FrontendActionMethod`, `BackendActionMethod
|
|
173
|
-
*
|
|
172
|
+
* `LocalCallActionMethod`, `FrontendActionMethod`, `BackendActionMethod`,
|
|
173
|
+
* `FrontendRequestResponseMethod`, `BackendRequestResponseMethod`,
|
|
174
|
+
* `BroadcastActionMethod`. Pairs each runtime const with a `z.infer` type
|
|
175
|
+
* alias under the same identifier.
|
|
174
176
|
*
|
|
175
177
|
* Composable methods (`heartbeat`, `cancel`) are filtered out by default —
|
|
176
178
|
* pass `include_composables: true` if a consumer genuinely wants them on
|
|
@@ -180,7 +182,11 @@ export declare const ACTION_METHOD_ENUM_KINDS_ALL: ReadonlySet<ActionMethodEnumK
|
|
|
180
182
|
* Adds `import {z} from 'zod';` to `imports` only when at least one block
|
|
181
183
|
* is emitted (idempotent).
|
|
182
184
|
*
|
|
183
|
-
*
|
|
185
|
+
* For genuinely cross-product enums the discriminator doesn't cover, use
|
|
186
|
+
* `generate_action_method_enum_block` — caller owns the predicate, name,
|
|
187
|
+
* and jsdoc.
|
|
188
|
+
*
|
|
189
|
+
* @param options.emit - subset of enums to emit; defaults to all nine.
|
|
184
190
|
* @param options.include_composables - when true, retains `heartbeat` /
|
|
185
191
|
* `cancel` in the emitted enums. Default `false`.
|
|
186
192
|
*/
|
|
@@ -188,6 +194,26 @@ export declare const generate_action_method_enums: (specs: ReadonlyArray<ActionS
|
|
|
188
194
|
emit?: ReadonlySet<ActionMethodEnumKind>;
|
|
189
195
|
include_composables?: boolean;
|
|
190
196
|
}) => string;
|
|
197
|
+
/**
|
|
198
|
+
* Emit a single named `z.enum([...])` + `z.infer` block for an arbitrary
|
|
199
|
+
* spec subset. Lower-level escape hatch from `generate_action_method_enums` —
|
|
200
|
+
* for cross-product or domain-specific enums the built-in discriminator
|
|
201
|
+
* doesn't cover.
|
|
202
|
+
*
|
|
203
|
+
* Mirrors the built-in helper's contract: composables filtered by default,
|
|
204
|
+
* empty subsets return `''` (skip rather than emit `z.enum([])`), `zod`
|
|
205
|
+
* import registered idempotently only when at least one method qualifies.
|
|
206
|
+
*
|
|
207
|
+
* The cross-product space is open-ended; rather than grow the
|
|
208
|
+
* `ActionMethodEnumKind` discriminator one cross-product at a time, callers
|
|
209
|
+
* own the subset shape — name, jsdoc, predicate.
|
|
210
|
+
*/
|
|
211
|
+
export declare const generate_action_method_enum_block: (specs: ReadonlyArray<ActionSpecUnion>, imports: ImportBuilder, options: {
|
|
212
|
+
name: string;
|
|
213
|
+
jsdoc: string;
|
|
214
|
+
predicate: (spec: ActionSpecUnion) => boolean;
|
|
215
|
+
include_composables?: boolean;
|
|
216
|
+
}) => string;
|
|
191
217
|
/**
|
|
192
218
|
* Emit the fixed-shape `TypedActionEvent` alias used by `FrontendActionHandlers`
|
|
193
219
|
* to narrow `ActionEvent.data` against the consumer's generated `ActionEventDatas`
|
|
@@ -209,14 +235,16 @@ export declare const generate_typed_action_event_alias: (imports: ImportBuilder,
|
|
|
209
235
|
* Array<ActionSpecUnion>` value bundling every spec. Adds the `* as specs`
|
|
210
236
|
* namespace import + the `ActionSpecUnion` type import.
|
|
211
237
|
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
238
|
+
* @param options.qualify_spec - per-spec qualified identifier callback for
|
|
239
|
+
* multi-source consumers (e.g. ``(s) => `admin_specs.${s.method}_action_spec` ``).
|
|
240
|
+
* When set, the helper emits the callback's return value instead of
|
|
241
|
+
* ``specs.${method}_action_spec`` and skips the default `* as specs`
|
|
242
|
+
* import — the consumer manages its own namespace imports. `specs_module`
|
|
243
|
+
* is ignored when `qualify_spec` is set. Single-source consumers omit it.
|
|
217
244
|
*/
|
|
218
245
|
export declare const generate_action_specs_record: (specs: ReadonlyArray<ActionSpecUnion>, imports: ImportBuilder, options?: {
|
|
219
246
|
specs_module?: string;
|
|
247
|
+
qualify_spec?: (spec: ActionSpecUnion) => string;
|
|
220
248
|
include_composables?: boolean;
|
|
221
249
|
}) => string;
|
|
222
250
|
/**
|
|
@@ -226,11 +254,15 @@ export declare const generate_action_specs_record: (specs: ReadonlyArray<ActionS
|
|
|
226
254
|
*
|
|
227
255
|
* Adds `import {z} from 'zod';` and the `* as specs` namespace import.
|
|
228
256
|
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
257
|
+
* @param options.qualify_spec - per-spec qualified identifier callback for
|
|
258
|
+
* multi-source consumers. The helper appends `.input` / `.output` to the
|
|
259
|
+
* callback's return value. When set, the helper skips the default
|
|
260
|
+
* `* as specs` import — the consumer manages its own namespace imports —
|
|
261
|
+
* and `specs_module` is ignored. Single-source consumers omit it.
|
|
231
262
|
*/
|
|
232
263
|
export declare const generate_action_inputs_outputs: (specs: ReadonlyArray<ActionSpecUnion>, imports: ImportBuilder, options?: {
|
|
233
264
|
specs_module?: string;
|
|
265
|
+
qualify_spec?: (spec: ActionSpecUnion) => string;
|
|
234
266
|
include_composables?: boolean;
|
|
235
267
|
}) => string;
|
|
236
268
|
/**
|
|
@@ -242,26 +274,37 @@ export declare const generate_action_inputs_outputs: (specs: ReadonlyArray<Actio
|
|
|
242
274
|
*
|
|
243
275
|
* Adds the per-kind data type imports (only the kinds that appear in `specs`).
|
|
244
276
|
*
|
|
245
|
-
* @param options.
|
|
246
|
-
* `ActionOutputs`
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
277
|
+
* @param options.same_file - when `true` (default), assumes `ActionInputs` /
|
|
278
|
+
* `ActionOutputs` are in the same module as the emitted `ActionEventDatas`
|
|
279
|
+
* and adds no import (the zzz pattern, where `generate_action_inputs_outputs`
|
|
280
|
+
* and this helper feed the same `action_collections.ts` output). When
|
|
281
|
+
* `false`, adds `ActionInputs` / `ActionOutputs` type imports from
|
|
282
|
+
* `collections_path`.
|
|
283
|
+
* @param options.collections_path - import path used when `same_file: false`.
|
|
284
|
+
* Defaults to `'./action_collections.js'`. Ignored when `same_file: true`
|
|
285
|
+
* — `same_file` is the file-layout switch; `collections_path` is just the
|
|
286
|
+
* path the import resolves to.
|
|
251
287
|
*/
|
|
252
288
|
export declare const generate_action_event_datas: (specs: ReadonlyArray<ActionSpecUnion>, imports: ImportBuilder, options?: {
|
|
289
|
+
same_file?: boolean;
|
|
253
290
|
collections_path?: string;
|
|
254
291
|
include_composables?: boolean;
|
|
255
292
|
}) => string;
|
|
256
293
|
/**
|
|
257
|
-
* Emit the `
|
|
294
|
+
* Emit the `FrontendActionsApi` interface — one method signature per spec via
|
|
258
295
|
* `generate_actions_api_method_signature`. Optionally filter the spec set
|
|
259
296
|
* (e.g. omit composable methods) via `method_filter`.
|
|
260
297
|
*
|
|
261
298
|
* Adds the `Result`, `JsonrpcErrorObject`, and `RpcClientCallOptions` type
|
|
262
299
|
* imports plus `ActionInputs` / `ActionOutputs` (sourced from `collections_path`).
|
|
300
|
+
*
|
|
301
|
+
* The interface name is fixed at `FrontendActionsApi` — the symmetric counterpart
|
|
302
|
+
* of `BackendActionsApi`. Earlier consumer-named variants (`MyActionsApi`,
|
|
303
|
+
* `VisionesActionsApi`) were retired in API review III to make the side-of-the-wire
|
|
304
|
+
* intent visible at every call site. If a consumer needs a different name they
|
|
305
|
+
* hand-roll the interface (the helper's job is the standard symmetric shape).
|
|
263
306
|
*/
|
|
264
|
-
export declare const
|
|
307
|
+
export declare const generate_frontend_actions_api: (specs: ReadonlyArray<ActionSpecUnion>, imports: ImportBuilder, options?: {
|
|
265
308
|
method_filter?: (spec: ActionSpecUnion) => boolean;
|
|
266
309
|
collections_path?: string;
|
|
267
310
|
sync_returns_value?: boolean;
|
|
@@ -284,19 +327,146 @@ export declare const generate_frontend_action_handlers: (specs: ReadonlyArray<Ac
|
|
|
284
327
|
* each `(input) => Promise<void>`. The array bundles the matching specs as a
|
|
285
328
|
* `ReadonlyArray<ActionSpecUnion>`.
|
|
286
329
|
*
|
|
287
|
-
* Filter: `kind === 'remote_notification' && initiator !== 'frontend'
|
|
330
|
+
* Filter: `kind === 'remote_notification' && initiator !== 'frontend'`,
|
|
331
|
+
* additionally excluding methods that are the target of another spec's
|
|
332
|
+
* `streams` field. Streams targets (e.g. `completion_progress`,
|
|
333
|
+
* `ollama_progress`) are request-scoped notifications invoked via
|
|
334
|
+
* `ctx.notify` inside their parent handler — they're never callable through
|
|
335
|
+
* the broadcast API. The discriminator is `ActionSpec.streams`, not a manual
|
|
336
|
+
* exclusion list.
|
|
288
337
|
*
|
|
289
338
|
* Adds the `* as specs` namespace import (from `specs_module`), the
|
|
290
339
|
* `ActionInputs` type import (from `collections_path`), and the
|
|
291
340
|
* `ActionSpecUnion` type import.
|
|
292
341
|
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
342
|
+
* Method signature shape today is `(input) => Promise<void>` — matches the
|
|
343
|
+
* fire-and-forget runtime of `create_broadcast_api`. Generalizing per-kind
|
|
344
|
+
* via `generate_actions_api_method_signature` is deferred until a second
|
|
345
|
+
* backend runtime constructor lands (see SAES quest § API review III).
|
|
346
|
+
*
|
|
347
|
+
* @param options.qualify_spec - per-spec qualified identifier callback for
|
|
348
|
+
* multi-source consumers. When set, the helper emits the callback's return
|
|
349
|
+
* value instead of ``specs.${method}_action_spec`` in the broadcast array
|
|
350
|
+
* and skips the default `* as specs` import — the consumer manages its own
|
|
351
|
+
* namespace imports. `specs_module` is ignored when `qualify_spec` is set.
|
|
352
|
+
* Single-source consumers omit it.
|
|
295
353
|
*/
|
|
296
354
|
export declare const generate_backend_actions_api: (specs: ReadonlyArray<ActionSpecUnion>, imports: ImportBuilder, options?: {
|
|
297
355
|
specs_module?: string;
|
|
298
356
|
collections_path?: string;
|
|
357
|
+
qualify_spec?: (spec: ActionSpecUnion) => string;
|
|
299
358
|
include_composables?: boolean;
|
|
300
359
|
}) => string;
|
|
360
|
+
/**
|
|
361
|
+
* Emit the `BackendActionHandlers` mapped type — one entry per
|
|
362
|
+
* `BackendRequestResponseMethod`, each `(input, ctx) => output | Promise<output>`.
|
|
363
|
+
* Replaces the hand-maintained `Exclude<>` + parallel mapped-type pattern
|
|
364
|
+
* (zzz had this at `zzz/src/lib/server/zzz_action_handlers.ts:42-66`).
|
|
365
|
+
*
|
|
366
|
+
* The context type is consumer-defined (e.g. zzz's `ZzzHandlerContext`). Pass
|
|
367
|
+
* `context_type` to name it; the helper assumes it's importable or defined
|
|
368
|
+
* in the emitted module's scope (consumer's responsibility).
|
|
369
|
+
*
|
|
370
|
+
* Adds `ActionInputs` / `ActionOutputs` type imports from `collections_path`
|
|
371
|
+
* and the `BackendRequestResponseMethod` import from `metatypes_path`.
|
|
372
|
+
*
|
|
373
|
+
* @param options.type_name - default `'BackendActionHandlers'`.
|
|
374
|
+
* @param options.method_enum_name - default `'BackendRequestResponseMethod'`.
|
|
375
|
+
* Pair with `generate_action_method_enums` emitting the `'backend_handled'` kind.
|
|
376
|
+
* @param options.context_type - default `'BackendHandlerContext'`. Caller's
|
|
377
|
+
* handler context type — must be in scope at the emit site.
|
|
378
|
+
* @param options.collections_path - default `'./action_collections.js'`.
|
|
379
|
+
* @param options.metatypes_path - default `'./action_metatypes.js'`.
|
|
380
|
+
*/
|
|
381
|
+
export declare const generate_backend_action_handlers_map: (imports: ImportBuilder, options?: {
|
|
382
|
+
type_name?: string;
|
|
383
|
+
method_enum_name?: string;
|
|
384
|
+
context_type?: string;
|
|
385
|
+
collections_path?: string;
|
|
386
|
+
metatypes_path?: string;
|
|
387
|
+
}) => string;
|
|
388
|
+
/**
|
|
389
|
+
* One source in a multi-source consumer's namespace map. `ns` is the local
|
|
390
|
+
* alias used inside the generated file; `module` is the import path; `specs`
|
|
391
|
+
* is the runtime spec array. `create_namespace_qualifier` consumes a list of
|
|
392
|
+
* these.
|
|
393
|
+
*/
|
|
394
|
+
export interface SpecSource {
|
|
395
|
+
ns: string;
|
|
396
|
+
module: string;
|
|
397
|
+
specs: ReadonlyArray<ActionSpecUnion>;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Multi-source consumer helper. Takes a list of `{ns, module, specs}` rows,
|
|
401
|
+
* registers `import * as ns from module` for each on `imports`, builds the
|
|
402
|
+
* `method_to_ns` lookup with duplicate-method detection, and returns
|
|
403
|
+
* `{qualify_spec, all_specs}` ready to thread through the high-level
|
|
404
|
+
* helpers.
|
|
405
|
+
*
|
|
406
|
+
* Closes the per-file boilerplate gap that kept tx + visiones on hand-rolled
|
|
407
|
+
* template strings even after `qualify_spec?` landed in API review II — the
|
|
408
|
+
* per-call callback wasn't enough; the import dance + dup-check was the
|
|
409
|
+
* real boilerplate.
|
|
410
|
+
*
|
|
411
|
+
* @example
|
|
412
|
+
* ```ts
|
|
413
|
+
* const sources = [
|
|
414
|
+
* {ns: 'tx_specs', module: './action_specs.js', specs: all_tx_action_specs},
|
|
415
|
+
* {ns: 'admin_specs', module: '@fuzdev/fuz_app/auth/admin_action_specs.js', specs: all_admin_action_specs},
|
|
416
|
+
* ];
|
|
417
|
+
*
|
|
418
|
+
* export const gen: Gen = ({origin_path}) => {
|
|
419
|
+
* const imports = new ImportBuilder();
|
|
420
|
+
* const {qualify_spec, all_specs} = create_namespace_qualifier(sources, imports);
|
|
421
|
+
* return compose_gen_file({
|
|
422
|
+
* origin_path,
|
|
423
|
+
* imports,
|
|
424
|
+
* blocks: [
|
|
425
|
+
* generate_action_specs_record(all_specs, imports, {qualify_spec}),
|
|
426
|
+
* generate_action_inputs_outputs(all_specs, imports, {qualify_spec}),
|
|
427
|
+
* ],
|
|
428
|
+
* });
|
|
429
|
+
* };
|
|
430
|
+
* ```
|
|
431
|
+
*
|
|
432
|
+
* @throws if two sources contain the same method name (same-method detection
|
|
433
|
+
* is the consumer's primary debugging signal).
|
|
434
|
+
*/
|
|
435
|
+
export declare const create_namespace_qualifier: (sources: ReadonlyArray<SpecSource>, imports: ImportBuilder) => {
|
|
436
|
+
qualify_spec: (spec: ActionSpecUnion) => string;
|
|
437
|
+
all_specs: ReadonlyArray<ActionSpecUnion>;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Wrap the per-`*.gen.ts` boilerplate (banner + `imports.build()` +
|
|
441
|
+
* blocks join + template literal) into one call. Returns the full file body
|
|
442
|
+
* as a string ready to return from a `Gen` function.
|
|
443
|
+
*
|
|
444
|
+
* Each consumer producer collapses to one `compose_gen_file` call wrapping
|
|
445
|
+
* the helper invocations.
|
|
446
|
+
*
|
|
447
|
+
* @example
|
|
448
|
+
* ```ts
|
|
449
|
+
* export const gen: Gen = ({origin_path}) => {
|
|
450
|
+
* const imports = new ImportBuilder();
|
|
451
|
+
* return compose_gen_file({
|
|
452
|
+
* origin_path,
|
|
453
|
+
* imports,
|
|
454
|
+
* blocks: [
|
|
455
|
+
* generate_action_specs_record(all_action_specs, imports),
|
|
456
|
+
* generate_action_inputs_outputs(all_action_specs, imports),
|
|
457
|
+
* generate_action_event_datas(all_action_specs, imports),
|
|
458
|
+
* ],
|
|
459
|
+
* });
|
|
460
|
+
* };
|
|
461
|
+
* ```
|
|
462
|
+
*
|
|
463
|
+
* Empty blocks (`''`) are filtered out so helpers that short-circuit on
|
|
464
|
+
* empty spec sets don't introduce stray double blank lines.
|
|
465
|
+
*/
|
|
466
|
+
export declare const compose_gen_file: (input: {
|
|
467
|
+
origin_path: string;
|
|
468
|
+
imports: ImportBuilder;
|
|
469
|
+
blocks: ReadonlyArray<string>;
|
|
470
|
+
}) => string;
|
|
301
471
|
export {};
|
|
302
472
|
//# sourceMappingURL=action_codegen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action_codegen.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAGxE;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,kCAAmC,CAAC;AAE1E,8FAA8F;AAC9F,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAIhF;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,GAAI,QAAQ,MAAM,KAAG,MAAM,IAAI,sBACrC,CAAC;
|
|
1
|
+
{"version":3,"file":"action_codegen.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAGxE;;;;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