@requence/service 0.8.2-edge.1151 → 0.8.2-edge.1155
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/README.md +258 -0
- package/build/{chunk-974rc2jy.js → chunk-gpyt51xn.js} +164 -3
- package/build/{chunk-974rc2jy.js.map → chunk-gpyt51xn.js.map} +7 -4
- package/build/cli.js +17 -30
- package/build/cli.js.map +3 -3
- package/build/index.js +538 -94
- package/build/index.js.map +18 -10
- package/build/types/helpers/src/index.d.ts +5 -0
- package/build/types/helpers/src/index.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/NodeTree.d.ts +29 -0
- package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/command.d.ts +859 -7
- package/build/types/helpers/src/protocol/command.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/index.d.ts +1 -0
- package/build/types/helpers/src/protocol/index.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/sliceTreeList.d.ts +81 -0
- package/build/types/helpers/src/protocol/sliceTreeList.d.ts.map +1 -0
- package/build/types/helpers/src/protocol/treeNodes.d.ts +577 -2
- package/build/types/helpers/src/protocol/treeNodes.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/update.d.ts +128 -10
- package/build/types/helpers/src/protocol/update.d.ts.map +1 -1
- package/build/types/helpers/src/utils/amqpPublishRetry.d.ts +113 -18
- package/build/types/helpers/src/utils/amqpPublishRetry.d.ts.map +1 -1
- package/build/types/helpers/src/utils/matchSchema.d.ts +14 -0
- package/build/types/helpers/src/utils/matchSchema.d.ts.map +1 -1
- package/build/types/helpers/src/utils/serviceRender.d.ts +73 -0
- package/build/types/helpers/src/utils/serviceRender.d.ts.map +1 -0
- package/build/types/helpers/src/utils/sliceClock.d.ts +61 -0
- package/build/types/helpers/src/utils/sliceClock.d.ts.map +1 -0
- package/build/types/helpers/src/utils/surfaceComponent.d.ts +116 -0
- package/build/types/helpers/src/utils/surfaceComponent.d.ts.map +1 -0
- package/build/types/helpers/src/utils/surfaceHandler.d.ts +171 -0
- package/build/types/helpers/src/utils/surfaceHandler.d.ts.map +1 -0
- package/build/types/helpers/src/utils/uiRebuild.d.ts +48 -0
- package/build/types/helpers/src/utils/uiRebuild.d.ts.map +1 -0
- package/build/types/service/src/boundary.d.ts +14 -1
- package/build/types/service/src/boundary.d.ts.map +1 -1
- package/build/types/service/src/createAmqpConnection.d.ts +55 -0
- package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
- package/build/types/service/src/errors.d.ts +11 -0
- package/build/types/service/src/errors.d.ts.map +1 -1
- package/build/types/service/src/helpers.d.ts +68 -0
- package/build/types/service/src/helpers.d.ts.map +1 -1
- package/build/types/service/src/index.d.ts +2 -0
- package/build/types/service/src/index.d.ts.map +1 -1
- package/build/types/service/src/surfaceHandler.d.ts +36 -0
- package/build/types/service/src/surfaceHandler.d.ts.map +1 -0
- package/build/types/service/src/surfaceUi.d.ts +141 -0
- package/build/types/service/src/surfaceUi.d.ts.map +1 -0
- package/build/types/service/src/transformer.d.ts +14 -0
- package/build/types/service/src/transformer.d.ts.map +1 -1
- package/build/types/service/src/ui.d.ts +247 -0
- package/build/types/service/src/ui.d.ts.map +1 -0
- package/build/types/service/src/uiWatch.d.ts +68 -0
- package/build/types/service/src/uiWatch.d.ts.map +1 -0
- package/package.json +10 -4
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a **surface component** is handed, declared once (#113).
|
|
3
|
+
*
|
|
4
|
+
* These types have three readers and no natural owner among them: the service
|
|
5
|
+
* SDK ships them to the component author (`@requence/service`), the frame
|
|
6
|
+
* protocol describes the object the bootstrap actually builds
|
|
7
|
+
* (`ui/frontend/src/routes/tasks/Show/surface/protocol.ts`), and the shared
|
|
8
|
+
* runtime's facade *implements* them in `createSurface`
|
|
9
|
+
* (`ui/frontend/surface-runtime/ui.tsx`). They lived in the SDK and were mirrored
|
|
10
|
+
* in the protocol, which was survivable while the mirror was two fields wide; a
|
|
11
|
+
* third copy in the facade is not, because the drift would land as a helper whose
|
|
12
|
+
* signature promises state the frame does not deliver — and the author's types
|
|
13
|
+
* would be the last thing to find out.
|
|
14
|
+
*
|
|
15
|
+
* So they live here, beside the render wire shape (`serviceRender.ts`) and the
|
|
16
|
+
* handler reference (`surfaceHandler.ts`), which is the seam both verticals
|
|
17
|
+
* already share for exactly this reason.
|
|
18
|
+
*
|
|
19
|
+
* Nothing here has a runtime half: the props themselves cross as
|
|
20
|
+
* `serviceRender`'s payload, and the rest is the browser's own object.
|
|
21
|
+
*/
|
|
22
|
+
/** The viewer's app theme, as the surface host reports it. */
|
|
23
|
+
export type SurfaceTheme = 'dark' | 'light';
|
|
24
|
+
/**
|
|
25
|
+
* Everything about a surface that can change while the component is mounted —
|
|
26
|
+
* what `ctx` carries at mount and what `onUpdate` hands over afterwards. Named
|
|
27
|
+
* once so the two cannot drift.
|
|
28
|
+
*
|
|
29
|
+
* There is no surface-wide liveness flag on it (#106). Reachability rides on
|
|
30
|
+
* each handler prop instead — `props.onSubmit.reachable` — because a surface can
|
|
31
|
+
* carry a durable handler and a connection-bound one at once and one flag over
|
|
32
|
+
* both necessarily lies about one of them.
|
|
33
|
+
*
|
|
34
|
+
* It is also what a component written with `createSurface` receives as its own
|
|
35
|
+
* props (#113), which is why the three fields are named for a component and not
|
|
36
|
+
* for the message that carries them.
|
|
37
|
+
*/
|
|
38
|
+
export interface SurfaceState<Props> {
|
|
39
|
+
props: Props;
|
|
40
|
+
canInvoke: boolean;
|
|
41
|
+
theme: SurfaceTheme;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The context a mounted component is handed. `props` is the object the service
|
|
45
|
+
* sent (handlers invokable, each carrying its own `reachable`); `canInvoke` is
|
|
46
|
+
* the viewer's `task: UPDATE` verdict; `theme` is the viewer's app theme;
|
|
47
|
+
* `onUpdate` fires on every re-render and returns an unsubscribe.
|
|
48
|
+
*
|
|
49
|
+
* A React component rarely touches this: `createSurface` subscribes for it and
|
|
50
|
+
* hands the state down as props. It is the layer underneath — what a component
|
|
51
|
+
* written without the helper, or in another framework, works against.
|
|
52
|
+
*
|
|
53
|
+
* `canInvoke` is an **affordance signal only** — disable the control, label it
|
|
54
|
+
* read-only. It is not the check: a viewer without the permission has their
|
|
55
|
+
* invocation refused by the parent frame, and ui/backend enforces it again on
|
|
56
|
+
* the mutation, so a component that ignores the flag cannot grant anything.
|
|
57
|
+
*
|
|
58
|
+
* **Reachability is separate, and per prop.** AND the two: `canInvoke` says
|
|
59
|
+
* whether this viewer may drive the surface, `reachable` says whether there is
|
|
60
|
+
* anything at the other end of that particular prop. The flag a form used to get
|
|
61
|
+
* this wrong with — one `live` for the whole surface — is gone, because a
|
|
62
|
+
* **durable** handler is reachable with no live message at all (which is the whole
|
|
63
|
+
* point of the kind: the service renders a form and exits within seconds while
|
|
64
|
+
* the node waits for days) while a connection-bound one on the same surface is
|
|
65
|
+
* not.
|
|
66
|
+
*
|
|
67
|
+
* There is no `submit` here. A form answers its node by calling a handler its own
|
|
68
|
+
* service put in the props — an ordinary function like every other interaction —
|
|
69
|
+
* rather than through a channel Requence defines. Write that handler in the UI's
|
|
70
|
+
* **defaults** so it is durable, and let it `act()` on the key the props carry.
|
|
71
|
+
*
|
|
72
|
+
* **A failed interaction is not reported here either** (#143). Calling a handler
|
|
73
|
+
* prop is *accepted* and nothing more: no return value, no promise, no request.
|
|
74
|
+
* When one could not run — it threw, nothing was registered under it, the version
|
|
75
|
+
* is gone — Requence records a generic sentence and renders it itself, beside the
|
|
76
|
+
* surface, in the same place as a refused click. Nothing arrives in this context,
|
|
77
|
+
* and a component must not try to render it.
|
|
78
|
+
*
|
|
79
|
+
* To say something better than the generic sentence, catch the error **in the
|
|
80
|
+
* handler** and **re-render** the surface with a prop of your own
|
|
81
|
+
* (`{ error: 'unknown address' }`). That statement is in the props, so no generic
|
|
82
|
+
* report can overwrite it, and both can be shown at once — the handler said
|
|
83
|
+
* something *and* it threw.
|
|
84
|
+
*
|
|
85
|
+
* **A `<form>` works, and it must call `preventDefault()`** (D31). The frame is
|
|
86
|
+
* sandboxed with `allow-scripts allow-forms`, so `<form onSubmit>` fires normally
|
|
87
|
+
* and Enter-to-submit comes with it. What the sandbox does *not* grant is
|
|
88
|
+
* `allow-top-navigation` or `allow-popups`, so a submission can only ever navigate
|
|
89
|
+
* **this frame** — which unloads the component. Call `preventDefault()` and invoke
|
|
90
|
+
* the handler prop instead. Forget it and the frame reloads; the surface
|
|
91
|
+
* re-initialises and remounts with its current props rather than going blank, but
|
|
92
|
+
* whatever the component held in local state is gone. A plain `onClick` button is
|
|
93
|
+
* still fine and needs none of this.
|
|
94
|
+
*
|
|
95
|
+
* A component that paints its own colours can follow a theme switch through
|
|
96
|
+
* `onUpdate` — but it rarely has to: the surface host also writes the theme onto
|
|
97
|
+
* `<html data-theme>`, which is what the shared runtime's CSS keys off, so a
|
|
98
|
+
* component drawn with the primitives facade follows the app for free.
|
|
99
|
+
*/
|
|
100
|
+
export interface SurfaceContext<Props> {
|
|
101
|
+
readonly props: Props;
|
|
102
|
+
readonly canInvoke: boolean;
|
|
103
|
+
readonly theme: SurfaceTheme;
|
|
104
|
+
onUpdate(callback: (next: SurfaceState<Props>) => void): () => void;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The component contract: one default-exported `mount(element, ctx)` that
|
|
108
|
+
* optionally returns a teardown. Typing the export with `Mount<PropsOf<typeof
|
|
109
|
+
* ui>>` checks the component against exactly what the service sends.
|
|
110
|
+
*
|
|
111
|
+
* A React component does not write one by hand — `createSurface` returns one
|
|
112
|
+
* (#113) — but it is still what the frame calls, and what any other framework
|
|
113
|
+
* exports.
|
|
114
|
+
*/
|
|
115
|
+
export type Mount<Props> = (element: HTMLElement, ctx: SurfaceContext<Props>) => (() => void) | void;
|
|
116
|
+
//# sourceMappingURL=surfaceComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceComponent.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/surfaceComponent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAA;AAE3C;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,YAAY,CAAC,KAAK;IACjC,KAAK,EAAE,KAAK,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,YAAY,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,WAAW,cAAc,CAAC,KAAK;IACnC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CACpE;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,KAAK,CAAC,KAAK,IAAI,CACzB,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,KACvB,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* The reference tag of a **surface handler** — a function a service put in a
|
|
4
|
+
* surface's props, which a viewer's interaction runs back in the service that
|
|
5
|
+
* issued the render (#103).
|
|
6
|
+
*
|
|
7
|
+
* Deliberately not a `RequenceCallback`, even though the connection-bound arm
|
|
8
|
+
* is routed the same way today. The two answer different questions and address
|
|
9
|
+
* different things: a callback reference is a peer-to-peer control-flow handle
|
|
10
|
+
* whose `outputName`/`propertyPath` address a position in the node's declared
|
|
11
|
+
* *output schema*, while a handler reference addresses a **prop of a UI**, has
|
|
12
|
+
* no output behind it, and — in its durable arm — names no connection at all.
|
|
13
|
+
* Merging them would put a lifetime on every callback in the fabric and make a
|
|
14
|
+
* durable reference look like something the operator should route by `sourceId`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SURFACE_HANDLER_TAG = "RequenceHandler";
|
|
17
|
+
/**
|
|
18
|
+
* How long a handler can be reached, decided by **where the function was
|
|
19
|
+
* written** — which is the only thing that actually bounds the closure's life:
|
|
20
|
+
*
|
|
21
|
+
* - `durable` — a function in the UI's default props. It closes over module
|
|
22
|
+
* scope, so *any* instance of the service version can run it, now or after a
|
|
23
|
+
* redeploy, and an invocation waits in the version's handler queue when none
|
|
24
|
+
* is running. Addressed by `(uiId, path)`, because that pair is what survives
|
|
25
|
+
* a rebuild and a restart; the component's content hash does not.
|
|
26
|
+
* - `connection` — a function written inline at `context.render(...)`. It closes
|
|
27
|
+
* over the running handler, so only that process can serve it and it dies when
|
|
28
|
+
* the handler returns. Addressed by the registering connection plus an id in
|
|
29
|
+
* its registry, exactly as a callback is.
|
|
30
|
+
*
|
|
31
|
+
* `uiId`/`path` ride on both arms: the connection-bound arm does not need them
|
|
32
|
+
* to be *routed*, but they are what says which prop of which component this
|
|
33
|
+
* handle belongs to, which is what the row-level `live` flag could never say
|
|
34
|
+
* (#106).
|
|
35
|
+
*/
|
|
36
|
+
export declare const surfaceHandlerObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
__REQUENCE_type: z.ZodLiteral<"RequenceHandler">;
|
|
38
|
+
lifetime: z.ZodLiteral<"durable">;
|
|
39
|
+
uiId: z.ZodString;
|
|
40
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
__REQUENCE_type: z.ZodLiteral<"RequenceHandler">;
|
|
43
|
+
lifetime: z.ZodLiteral<"connection">;
|
|
44
|
+
uiId: z.ZodString;
|
|
45
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
|
|
46
|
+
connectionId: z.ZodString;
|
|
47
|
+
handlerId: z.ZodUUID;
|
|
48
|
+
}, z.core.$strip>], "lifetime">;
|
|
49
|
+
export type SurfaceHandlerObject = z.infer<typeof surfaceHandlerObjectSchema>;
|
|
50
|
+
export type SurfaceHandlerLifetime = SurfaceHandlerObject['lifetime'];
|
|
51
|
+
export declare function isSurfaceHandlerObject(data: unknown): data is SurfaceHandlerObject;
|
|
52
|
+
/**
|
|
53
|
+
* The per-version **handler queue**: where a durable invocation waits until
|
|
54
|
+
* some instance of that service version consumes it.
|
|
55
|
+
*
|
|
56
|
+
* Derived from the version's dispatch queue rather than composed from the
|
|
57
|
+
* service and version names, so the two can never drift and a dev-overlay
|
|
58
|
+
* connection — which consumes a rewritten dispatch queue — gets a handler queue
|
|
59
|
+
* of its own for free.
|
|
60
|
+
*/
|
|
61
|
+
export declare function serviceHandlerQueueName(dispatchQueue: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* How long a durable invocation may wait in the handler queue before the broker
|
|
64
|
+
* drops it (#116).
|
|
65
|
+
*
|
|
66
|
+
* The queue is **not a mailbox**. Reachability is checked before the click — a
|
|
67
|
+
* version with no consumers reports `reachable: false` and the control is
|
|
68
|
+
* withheld — so all this has to bridge is the seconds between that check and the
|
|
69
|
+
* consume: a rolling redeploy, a scale-to-zero that started a moment ago, a
|
|
70
|
+
* replica that took the invocation and died. Long enough that a normal restart
|
|
71
|
+
* still serves the click, short enough that nobody is surprised by an effect
|
|
72
|
+
* they pressed for hours ago.
|
|
73
|
+
*
|
|
74
|
+
* That is the half the flag cannot do on its own: the flag only makes the click
|
|
75
|
+
* harder to fire, and a click that IS fired into an empty queue must expire and
|
|
76
|
+
* be *reported* rather than sit there waiting for whoever deploys next.
|
|
77
|
+
*
|
|
78
|
+
* Expiry is not a drop: the queue dead-letters to `error`, so an expired
|
|
79
|
+
* invocation comes back to the operator carrying its own `taskId` and surface
|
|
80
|
+
* row, and is recorded as an `interactionError` (#107).
|
|
81
|
+
*/
|
|
82
|
+
export declare const SURFACE_HANDLER_INVOCATION_TTL_MS = 60000;
|
|
83
|
+
/**
|
|
84
|
+
* The handler queue's declaration arguments, as **one** object, because two
|
|
85
|
+
* parties declare that queue — ui/backend's provisioner and the service SDK on
|
|
86
|
+
* connect — and a broker answers a mismatch with a 406 that kills the declaring
|
|
87
|
+
* channel. Anything short of a shared literal is a service that will not start.
|
|
88
|
+
*
|
|
89
|
+
* `deadLetterExchange` is what turns expiry into a *report*: `error` fans back
|
|
90
|
+
* into the operator's own shard family, so an expired invocation arrives at the
|
|
91
|
+
* error consumer still carrying its `taskId`, its surface row and its
|
|
92
|
+
* `surfaceHandlerInvocation` marker. Without it the broker would simply drop the
|
|
93
|
+
* message, which is the silent outcome #116 replaced.
|
|
94
|
+
*
|
|
95
|
+
* Note for whoever changes this: declaring a queue with a dead-letter exchange
|
|
96
|
+
* needs WRITE permission on that exchange, so the service AMQP user is granted
|
|
97
|
+
* it (`assertService`). It costs nothing — `error` is an internal exchange and
|
|
98
|
+
* the broker refuses a client publish to one however the permissions read.
|
|
99
|
+
*/
|
|
100
|
+
export declare const SURFACE_HANDLER_QUEUE_ARGUMENTS: {
|
|
101
|
+
readonly messageTtl: 60000;
|
|
102
|
+
readonly deadLetterExchange: 'error';
|
|
103
|
+
};
|
|
104
|
+
export declare function isDevOverlayHandlerQueue(queueName: string): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The header a durable invocation is stamped with, so the party that has to
|
|
107
|
+
* answer an **unroutable** one can tell it from a dispatch (#104).
|
|
108
|
+
*
|
|
109
|
+
* A durable invocation is published `mandatory` into the `service` exchange, so
|
|
110
|
+
* one whose queue is gone comes back to the operator looking like any other
|
|
111
|
+
* undeliverable service message — and every other arm there fails the task's
|
|
112
|
+
* node, which a viewer's click must never do.
|
|
113
|
+
*
|
|
114
|
+
* A header rather than the routing key's `-handlers` suffix, which is *nearly*
|
|
115
|
+
* unambiguous and therefore worse: a version named `…-handlers` gives a dispatch
|
|
116
|
+
* queue that ends the same way, and the failure that buys is a real service
|
|
117
|
+
* dispatch silently swallowed instead of failing its node. This is exact, and it
|
|
118
|
+
* is set by the only publisher there is.
|
|
119
|
+
*/
|
|
120
|
+
export declare const SURFACE_HANDLER_INVOCATION_HEADER = "surfaceHandlerInvocation";
|
|
121
|
+
/**
|
|
122
|
+
* One durable handler invocation, as it travels on the queue above.
|
|
123
|
+
*
|
|
124
|
+
* The pair `(uiId, path)` is the whole address: the consuming instance looks the
|
|
125
|
+
* UI up in its own registry and resolves the path against that UI's default
|
|
126
|
+
* props. `taskId` is not part of the address — it is what makes the failure of
|
|
127
|
+
* an invocation that names nothing say *which run* it belonged to.
|
|
128
|
+
*/
|
|
129
|
+
export declare const surfaceHandlerInvocationSchema: z.ZodObject<{
|
|
130
|
+
taskId: z.ZodUUID;
|
|
131
|
+
surface: z.ZodUUID;
|
|
132
|
+
uiId: z.ZodString;
|
|
133
|
+
path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
|
|
134
|
+
arg: z.ZodOptional<z.ZodUnknown>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
export type SurfaceHandlerInvocation = z.infer<typeof surfaceHandlerInvocationSchema>;
|
|
137
|
+
/**
|
|
138
|
+
* How long a recorded interaction failure may be (#107).
|
|
139
|
+
*
|
|
140
|
+
* A thrown error's message is author-supplied text of no bounded length, and it
|
|
141
|
+
* ends up on a row that is pushed to every viewer of the task on every render.
|
|
142
|
+
* Truncated rather than rejected: a long message is still the most useful thing
|
|
143
|
+
* anyone has about the failure, and its first characters are where the cause is.
|
|
144
|
+
*/
|
|
145
|
+
export declare const MAX_SURFACE_INTERACTION_ERROR_CHARS = 500;
|
|
146
|
+
/**
|
|
147
|
+
* The header a **surface interaction failure report** is stamped with (#107), so
|
|
148
|
+
* the operator can tell it from an ordinary service result.
|
|
149
|
+
*
|
|
150
|
+
* A report carries no message id and no index: the handler that failed was not
|
|
151
|
+
* running for any message of the operator's — that is the whole of what makes a
|
|
152
|
+
* durable handler durable — so it cannot ride the ordered dispatch buffer, and
|
|
153
|
+
* every other arm of the result path would fail the node the surface is painted
|
|
154
|
+
* on. It names a task, a surface row and what went wrong, and the operator
|
|
155
|
+
* forwards it as a task update.
|
|
156
|
+
*/
|
|
157
|
+
export declare const SURFACE_INTERACTION_ERROR_HEADER = "surfaceInteractionError";
|
|
158
|
+
/**
|
|
159
|
+
* One interaction failure, as a service reports it back to the operator (#107).
|
|
160
|
+
*
|
|
161
|
+
* The failing party writes the sentence: only it knows whether the component was
|
|
162
|
+
* unregistered, the prop held nothing invokable, or the handler threw — and only
|
|
163
|
+
* it can quote the error. The operator forwards the text verbatim; ui/backend
|
|
164
|
+
* masks it and stores it on the row.
|
|
165
|
+
*/
|
|
166
|
+
export declare const surfaceInteractionErrorReportSchema: z.ZodObject<{
|
|
167
|
+
surface: z.ZodUUID;
|
|
168
|
+
message: z.ZodString;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
export type SurfaceInteractionErrorReport = z.infer<typeof surfaceInteractionErrorReportSchema>;
|
|
171
|
+
//# sourceMappingURL=surfaceHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceHandler.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/surfaceHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,oBAAoB,CAAA;AAIpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;+BAiBrC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC7E,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,CAAC,UAAU,CAAC,CAAA;AAErE,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,GACZ,IAAI,IAAI,oBAAoB,CAE9B;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iCAAiC,QAAS,CAAA;AAEvD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,+BAA+B;aAC1C,UAAU;aACV,kBAAkB,EAAE,OAAO;CACnB,CAAA;AAmBV,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iCAAiC,6BAA6B,CAAA;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B;;;;;;iBA0BzC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,MAAM,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,4BAA4B,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC;;;iBAG9C,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
/**
|
|
3
|
+
* Marks a service message as a **dev-loop bundle swap** (#108) rather than a
|
|
4
|
+
* result for one of the operator's dispatches.
|
|
5
|
+
*
|
|
6
|
+
* A rebuild changes which bytes the frame imports and nothing else — not the
|
|
7
|
+
* props, not the handlers, not the node — so it is deliberately not a render. A
|
|
8
|
+
* render would need the registering message to be unsettled and its registry
|
|
9
|
+
* alive, which is what took the dev loop away from a deferred form: the handler
|
|
10
|
+
* that drew it returned at the defer, so there is nothing left to re-render
|
|
11
|
+
* through. A swap needs none of that, and so works identically for a live panel,
|
|
12
|
+
* a deferred form, and a surface on a task that has already finished.
|
|
13
|
+
*
|
|
14
|
+
* Read on the same path as a result, and answered before it — like
|
|
15
|
+
* `SURFACE_INTERACTION_ERROR_HEADER`, this message has no correlation id, no
|
|
16
|
+
* index and no place in the ordered dispatch buffer, because it belongs to no
|
|
17
|
+
* message of the operator's.
|
|
18
|
+
*/
|
|
19
|
+
export declare const UI_REBUILD_HEADER = "uiRebuild";
|
|
20
|
+
/**
|
|
21
|
+
* What a rebuild says: *this component of this dev session is now these bytes*.
|
|
22
|
+
*
|
|
23
|
+
* `devSession` is opaque here and produced by the service SDK, which is the only
|
|
24
|
+
* party that can: it is the one identity that survives the process being
|
|
25
|
+
* restarted (a dev token plus the service version it is overlaying), so the
|
|
26
|
+
* surfaces a session drew before a restart are still the same session's
|
|
27
|
+
* afterwards. It deliberately carries no dev token in the clear — the token is
|
|
28
|
+
* hashed into it — because it comes to rest in `task_surface`.
|
|
29
|
+
*
|
|
30
|
+
* `uiId` is the component's stable id (#103), which is what makes the swap
|
|
31
|
+
* addressable at all: the hash is the thing that changed, so it cannot be the
|
|
32
|
+
* thing looked up. A surface repoints when it belongs to this session AND shows
|
|
33
|
+
* this component, whatever hash it is currently on — which is why a swap reaches
|
|
34
|
+
* a surface that has sat through several rebuilds unseen.
|
|
35
|
+
*
|
|
36
|
+
* `source` always travels. The render payload's per-task dedup does not apply: a
|
|
37
|
+
* swap is the first anyone has heard of this hash, and the surfaces it repoints
|
|
38
|
+
* are precisely the ones that would otherwise be left naming a bundle nobody
|
|
39
|
+
* stored.
|
|
40
|
+
*/
|
|
41
|
+
export declare const uiRebuildSchema: z.ZodObject<{
|
|
42
|
+
devSession: z.ZodString;
|
|
43
|
+
uiId: z.ZodString;
|
|
44
|
+
hash: z.ZodString;
|
|
45
|
+
source: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type UiRebuild = z.infer<typeof uiRebuildSchema>;
|
|
48
|
+
//# sourceMappingURL=uiRebuild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiRebuild.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/uiRebuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,cAAc,CAAA;AAE5C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe;;;;;iBAK1B,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CallbackEgressContext, CallbackIngressContext } from '@requence/callbacks';
|
|
2
2
|
import type { WireCodec } from '@requence/helpers/msgpack';
|
|
3
|
+
import type { SurfaceHandlerEgressContext } from './surfaceHandler.ts';
|
|
3
4
|
import { transformer } from './transformer.ts';
|
|
4
5
|
type InboundCtx = Parameters<typeof transformer.inbound>[1];
|
|
5
6
|
export interface OutboundBoundaryOptions {
|
|
@@ -22,7 +23,7 @@ export interface OutboundBoundaryOptions {
|
|
|
22
23
|
wireCodec?: WireCodec;
|
|
23
24
|
signal?: AbortSignal;
|
|
24
25
|
fetch?: typeof globalThis.fetch;
|
|
25
|
-
/** Sink for best-effort degradation notices. Defaults to `
|
|
26
|
+
/** Sink for best-effort degradation notices. Defaults to `logger.warn`. */
|
|
26
27
|
warn?(message: string, error?: unknown): void;
|
|
27
28
|
}
|
|
28
29
|
export interface OutboundSendOptions {
|
|
@@ -30,6 +31,18 @@ export interface OutboundSendOptions {
|
|
|
30
31
|
outputName?: string | null;
|
|
31
32
|
/** Callback registrar for this emission; absent ⇒ functions fail loud. */
|
|
32
33
|
onCallback?: CallbackEgressContext['onCallback'];
|
|
34
|
+
/**
|
|
35
|
+
* Surface-handler registrar (#103). Supplying it switches this send to the
|
|
36
|
+
* **render** egress chain, on which a function is a handler prop rather than
|
|
37
|
+
* a peer callback — the render payload is the only place that is true, and
|
|
38
|
+
* this option is what says so.
|
|
39
|
+
*/
|
|
40
|
+
onSurfaceHandler?: SurfaceHandlerEgressContext['onSurfaceHandler'];
|
|
41
|
+
/**
|
|
42
|
+
* Top-level keys of a record payload the claim-check must leave inline (the
|
|
43
|
+
* render payload's `component`, whose hash the operator parses).
|
|
44
|
+
*/
|
|
45
|
+
inlineKeys?: readonly string[];
|
|
33
46
|
/**
|
|
34
47
|
* Log policy: sanitize the payload first (functions/opaque instances become
|
|
35
48
|
* labels), degrade offload failures to warnings, and never reject — a log
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../src/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../src/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAI1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,EAAqB,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAcjE,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CA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,EAAE,WAAW,CAAA;IACpB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAA;IAC7D;;;;OAIG;IACH,WAAW,CAAC,EAAE;QAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAA;CAC5E;AAED,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,CAAA;CAC9D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,GAAE,sBAA2B,UAE7D,OAAO,SACP,qBAAqB,KAC1B,OAAO,CAAC,OAAO,CAAC,CAiBpB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type MaybePromise } from '../../helpers/src/index.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
import { type ContextHelper, type JSONValue } from './helpers.ts';
|
|
4
|
+
import type { RenderProps, RequenceUI } from './ui.ts';
|
|
4
5
|
type InternalNamedOutput = '__internal_named_output__';
|
|
5
6
|
type Input<V extends keyof RequenceService.Version> = RequenceService.Version[V]['input'];
|
|
6
7
|
type Configuration<V extends keyof RequenceService.Version> = RequenceService.Version[V]['configuration'];
|
|
@@ -21,11 +22,65 @@ interface ActorApi<V> {
|
|
|
21
22
|
overwrite?: boolean;
|
|
22
23
|
}): void;
|
|
23
24
|
sendState(state: unknown): void;
|
|
25
|
+
/**
|
|
26
|
+
* Renders a UI component on the deferred node, for as long as this `act()`
|
|
27
|
+
* call runs — the `act()` re-attach of
|
|
28
|
+
* `knowledge/service-ui-surfaces.md`.
|
|
29
|
+
*
|
|
30
|
+
* Identical in contract to `context.render`: `props` is a plain object, and
|
|
31
|
+
* functions inside it arrive in the component as invokable callbacks. The
|
|
32
|
+
* difference is *whose* they are — they register in this `act()` call's own
|
|
33
|
+
* registry, so they live exactly as long as the call. A deferring LINEAR
|
|
34
|
+
* handler cannot hold one at all (its callbacks die when it returns), which is
|
|
35
|
+
* why a live surface on a deferred node has to be rendered from here.
|
|
36
|
+
*
|
|
37
|
+
* That is also what makes it survive a restart: reload the pending keys,
|
|
38
|
+
* `act()` again, and this render — fresh connection, fresh callbacks —
|
|
39
|
+
* replaces the stale surface through the last-write-wins surface row. Nothing
|
|
40
|
+
* about the component or the browser has to know it happened.
|
|
41
|
+
*
|
|
42
|
+
* **You own the double-attach lock.** See {@link ConnectionApi.act}: two
|
|
43
|
+
* replicas that both load the same pending key will both render, and the
|
|
44
|
+
* second one silently takes the surface over. Requence cannot hold that lock
|
|
45
|
+
* for you — it warns loudly instead.
|
|
46
|
+
*
|
|
47
|
+
* A render is a patch here exactly as on the main path (#102), which is what
|
|
48
|
+
* makes a re-attach cheap: restate what this process knows and let the fold
|
|
49
|
+
* keep the rest.
|
|
50
|
+
*
|
|
51
|
+
* A function written *here* is connection-bound: it closes over this `act()`
|
|
52
|
+
* call, so it dies with it. A function in the UI's own defaults is durable
|
|
53
|
+
* whoever renders it (#103) — which is what an actor should reach for when it
|
|
54
|
+
* wants a control to keep working after it has gone.
|
|
55
|
+
*/
|
|
56
|
+
render<Props>(ui: RequenceUI<Props>, props: RenderProps<Props>, options?: {
|
|
57
|
+
surfaceId?: string;
|
|
58
|
+
}): void;
|
|
24
59
|
abort(error: string | Error): void;
|
|
25
60
|
}
|
|
26
61
|
export interface ConnectionApi<V> {
|
|
27
62
|
close(): Promise<void>;
|
|
28
63
|
open(): Promise<ConnectionApi<V>>;
|
|
64
|
+
/**
|
|
65
|
+
* Deliver the result of a deferred message, later and from anywhere: pass the
|
|
66
|
+
* key `context.defer()` returned and the actor runs with a send API for that
|
|
67
|
+
* message. It is also the only live window a deferred node has — see
|
|
68
|
+
* {@link ActorApi.render}.
|
|
69
|
+
*
|
|
70
|
+
* **Double-attach is YOUR lock to hold.** You own the pending-key storage, so
|
|
71
|
+
* you own the exclusivity. This connection refuses a key it is already acting
|
|
72
|
+
* on, but that check is per-connection and in memory: two replicas that both
|
|
73
|
+
* load the pending keys on boot will both `act()` the same key, both register
|
|
74
|
+
* callbacks, and both render — and the second render replaces the first one's
|
|
75
|
+
* surface, so clicks silently go to whichever instance rendered last. Requence
|
|
76
|
+
* does not arbitrate this (that would need cross-replica holder state plus a
|
|
77
|
+
* takeover path so a dead holder cannot block a key forever); it makes the
|
|
78
|
+
* symptom loud instead, by warning when a render replaces a surface that is
|
|
79
|
+
* still live on another connection.
|
|
80
|
+
*
|
|
81
|
+
* Take a lease on the key in your own store before acting, and only act on
|
|
82
|
+
* keys you hold.
|
|
83
|
+
*/
|
|
29
84
|
act(messageKey: string, actor: (api: ActorApi<V>) => ApiOutputValue<V, null> | Promise<ApiOutputValue<V, null>> | void | Promise<void> | AsyncGenerator<ApiOutputValue<V, null>> | Generator<ApiOutputValue<V, null>>): Promise<void>;
|
|
30
85
|
}
|
|
31
86
|
export declare const messageKeySchema: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodTuple<[z.ZodUUID, z.ZodUUID], z.ZodString>>, z.ZodTransform<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAmqpConnection.d.ts","sourceRoot":"","sources":["../../../../src/createAmqpConnection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createAmqpConnection.d.ts","sourceRoot":"","sources":["../../../../src/createAmqpConnection.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,YAAY,EAYlB,MAAM,mBAAmB,CAAA;AAiB1B,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAY1B,OAA4B,EAE1B,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,cAAc,CAAA;AAGrB,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAOtD,KAAK,m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c,EAAE,cAAc,CAAC,CAAC,CAAC,oBA8qDlC"}
|
|
@@ -26,6 +26,17 @@ export declare function assertReachable(response: Response): void;
|
|
|
26
26
|
* response is guaranteed not to be a gateway-error response.
|
|
27
27
|
*/
|
|
28
28
|
export declare function reachableFetch(input: Parameters<typeof fetch>[0], init?: Parameters<typeof fetch>[1]): Promise<Response>;
|
|
29
|
+
/**
|
|
30
|
+
* A UI component bundle exceeded the hard cap. Thrown by `createUI` at
|
|
31
|
+
* registration: the source travels inline in every first render of its hash, so
|
|
32
|
+
* an oversized bundle is a deploy-time mistake, not a runtime condition.
|
|
33
|
+
*/
|
|
34
|
+
export declare class UITooLargeError extends Error {
|
|
35
|
+
readonly path: string;
|
|
36
|
+
readonly size: number;
|
|
37
|
+
readonly maxSize: number;
|
|
38
|
+
constructor(path: string, size: number, maxSize: number);
|
|
39
|
+
}
|
|
29
40
|
/**
|
|
30
41
|
* The dispatch declared a capability (`requires` header) this build cannot
|
|
31
42
|
* satisfy, so it was refused before its body was ever decoded.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,uBAAwB,SAAQ,KAAK;CAAG;AAOrD;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,MAAM,CAAC,EAAE,MAAM;IADjC,YACkB,MAAM,CAAC,EAAE,MAAM,YAAA,EAC/B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAO9B;CACF;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAIxD;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAClC,I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AQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAExB,YAAY,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAUtD;CACF;AAED;;;;;;;;;GASG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAA;IAE/B,YAAY,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,EAI7C;CACF;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IAExB,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EASxC;CACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
2
|
import type { CallbackObject } from '../../helpers/src/index.js';
|
|
3
|
+
import type { RenderProps, RequenceUI } from './ui.ts';
|
|
3
4
|
export type JSONValue = string | number | boolean | {
|
|
4
5
|
[x: string]: JSONValue;
|
|
5
6
|
} | Array<JSONValue> | null | undefined;
|
|
@@ -56,6 +57,11 @@ export default function createContextHelper(options: {
|
|
|
56
57
|
propertyPath: (string | number)[];
|
|
57
58
|
arg: unknown;
|
|
58
59
|
}) => void;
|
|
60
|
+
onRender: (params: {
|
|
61
|
+
ui: RequenceUI;
|
|
62
|
+
props: unknown;
|
|
63
|
+
surfaceId: string;
|
|
64
|
+
}) => void;
|
|
59
65
|
sends: PrivilegedSends;
|
|
60
66
|
}): Promise<readonly [{
|
|
61
67
|
taskId: string;
|
|
@@ -63,6 +69,37 @@ export default function createContextHelper(options: {
|
|
|
63
69
|
configuration: unknown;
|
|
64
70
|
toOutput(name: string | null, value: unknown): OutputValue;
|
|
65
71
|
defer: (reason?: string) => string;
|
|
72
|
+
/**
|
|
73
|
+
* Renders a UI component on this node in the task canvas. `props` is a
|
|
74
|
+
* plain object and that is the entire contract — functions inside it arrive
|
|
75
|
+
* in the component as invokable handlers, through the same transform a
|
|
76
|
+
* peer service's payload goes through.
|
|
77
|
+
*
|
|
78
|
+
* Fire-and-forget, like a data send: the publish is enrolled in the
|
|
79
|
+
* message's ledger, so a failure fails the node at the settle gate rather
|
|
80
|
+
* than at this call site.
|
|
81
|
+
*
|
|
82
|
+
* **Where you write a function decides how long it can be pressed** (#103).
|
|
83
|
+
* One written here closes over this handler, so it is connection-bound: it
|
|
84
|
+
* needs a generator handler (a non-generator's registry goes the moment it
|
|
85
|
+
* returns) and it dies with the message. One written in the UI's own
|
|
86
|
+
* defaults — `createUI(url, { onSubmit })` — closes over module scope, so
|
|
87
|
+
* any instance of this version can run it, and an invocation waits in the
|
|
88
|
+
* version's handler queue when none is up. That is the honest answer to a
|
|
89
|
+
* wait measured in days: a form's `onSubmit` belongs in the defaults, and
|
|
90
|
+
* the handler that renders it is free to defer and exit.
|
|
91
|
+
*
|
|
92
|
+
* `props` is type-checked against the `ui`'s declared props
|
|
93
|
+
* (`createUI<Props>`) — but every prop is optional, because **a render is a
|
|
94
|
+
* patch** (#102). What the surface shows is the fold of the UI's defaults,
|
|
95
|
+
* everything previously rendered onto that surface, and this render, so a
|
|
96
|
+
* redraw carries only what changed and a prop nobody restates simply stays.
|
|
97
|
+
* The flip side is that TypeScript can no longer tell a patch from a first
|
|
98
|
+
* render that forgot half its props: the fold is the service's to complete.
|
|
99
|
+
*/
|
|
100
|
+
render<Props>(ui: RequenceUI<Props>, props: RenderProps<Props>, renderOptions?: {
|
|
101
|
+
surfaceId?: string;
|
|
102
|
+
}): void;
|
|
66
103
|
debug: {
|
|
67
104
|
log(...data: any[]): void;
|
|
68
105
|
info(...data: any[]): void;
|
|
@@ -84,6 +121,37 @@ export declare const handlerStorage: AsyncLocalStorage<{
|
|
|
84
121
|
configuration: unknown;
|
|
85
122
|
toOutput(name: string | null, value: unknown): OutputValue;
|
|
86
123
|
defer: (reason?: string) => string;
|
|
124
|
+
/**
|
|
125
|
+
* Renders a UI component on this node in the task canvas. `props` is a
|
|
126
|
+
* plain object and that is the entire contract — functions inside it arrive
|
|
127
|
+
* in the component as invokable handlers, through the same transform a
|
|
128
|
+
* peer service's payload goes through.
|
|
129
|
+
*
|
|
130
|
+
* Fire-and-forget, like a data send: the publish is enrolled in the
|
|
131
|
+
* message's ledger, so a failure fails the node at the settle gate rather
|
|
132
|
+
* than at this call site.
|
|
133
|
+
*
|
|
134
|
+
* **Where you write a function decides how long it can be pressed** (#103).
|
|
135
|
+
* One written here closes over this handler, so it is connection-bound: it
|
|
136
|
+
* needs a generator handler (a non-generator's registry goes the moment it
|
|
137
|
+
* returns) and it dies with the message. One written in the UI's own
|
|
138
|
+
* defaults — `createUI(url, { onSubmit })` — closes over module scope, so
|
|
139
|
+
* any instance of this version can run it, and an invocation waits in the
|
|
140
|
+
* version's handler queue when none is up. That is the honest answer to a
|
|
141
|
+
* wait measured in days: a form's `onSubmit` belongs in the defaults, and
|
|
142
|
+
* the handler that renders it is free to defer and exit.
|
|
143
|
+
*
|
|
144
|
+
* `props` is type-checked against the `ui`'s declared props
|
|
145
|
+
* (`createUI<Props>`) — but every prop is optional, because **a render is a
|
|
146
|
+
* patch** (#102). What the surface shows is the fold of the UI's defaults,
|
|
147
|
+
* everything previously rendered onto that surface, and this render, so a
|
|
148
|
+
* redraw carries only what changed and a prop nobody restates simply stays.
|
|
149
|
+
* The flip side is that TypeScript can no longer tell a patch from a first
|
|
150
|
+
* render that forgot half its props: the fold is the service's to complete.
|
|
151
|
+
*/
|
|
152
|
+
render<Props>(ui: RequenceUI<Props>, props: RenderProps<Props>, renderOptions?: {
|
|
153
|
+
surfaceId?: string;
|
|
154
|
+
}): void;
|
|
87
155
|
debug: {
|
|
88
156
|
log(...data: any[]): void;
|
|
89
157
|
info(...data: any[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.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GAAG,EAAE;;kBAIR,MAAM;mBAGL,MAAM;;;;;kCAcxB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAM9E,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,eAAe,CAAA;AAE/D,eAAO,MAAM,cAAc;;;;mBAzFR,MAAM,GAAG,IAAI,SAAS,OAAO,GAAG,WAAW;qBA/CzC,MAAM,KAAK,MAAM;IAuDlC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACI,KAAK,MACN,UAAU,CAAC,KAAK,CAAC,SACd,WAAW,CAAC,KAAK,CAAC,kBACT;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;QAUtC,GAAG,UAAU,GAAG,EAAE;QAGlB,IAAI,UAAU,GAAG,EAAE;QAGnB,IAAI,UAAU,GAAG,EAAE;QAGnB,KAAK,UAAU,GAAG,EAAE;;kBAIR,MAAM;mBAGL,MAAM;;;;;EAwB2C,CAAA"}
|
|
@@ -3,6 +3,8 @@ import { type ConnectionApi, type ConnectionStateListener, type MessageHandler }
|
|
|
3
3
|
export { RequenceFile, RequenceStream } from '@requence/files';
|
|
4
4
|
export { createCallback, type RequenceCallback, type WrappedRequenceCallback, } from '../../helpers/src/index.js';
|
|
5
5
|
export * from './errors.ts';
|
|
6
|
+
export type { ButtonProps, CheckboxProps, SelectOption, SelectProps, StackProps, SurfaceSpace, TextFieldProps, TextProps, } from './surfaceUi.ts';
|
|
7
|
+
export * from './ui.ts';
|
|
6
8
|
export * from './utils.ts';
|
|
7
9
|
export { type ConnectionState, type ConnectionStateListener, MessageHandler, } from './createAmqpConnection.ts';
|
|
8
10
|
export type { PrivilegedContext, PrivilegedSends } from './helpers.ts';
|