@north-light/crouter 0.3.205 → 0.3.206
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/api/dto/messages.d.ts +22 -1
- package/dist/clients/attach/viewer.js +293 -293
- package/dist/core/__tests__/canvas-inbox-watcher.test.js +2 -2
- package/dist/core/__tests__/context-intro.test.js +7 -8
- package/dist/core/__tests__/kickoff.test.js +6 -6
- package/dist/core/runtime/bearings.js +5 -4
- package/dist/core/runtime/broker/frame-dispatch.js +10 -1
- package/dist/core/runtime/broker/inbox.d.ts +7 -1
- package/dist/core/runtime/broker/inbox.js +19 -3
- package/dist/core/runtime/broker-extension-render.d.ts +3 -0
- package/dist/core/runtime/broker-extension-render.js +3 -0
- package/dist/core/runtime/broker-protocol.d.ts +5 -0
- package/dist/core/runtime/interactive-deliver.d.ts +3 -2
- package/dist/core/runtime/interactive-deliver.js +4 -3
- package/dist/core/runtime/kickoff.js +4 -3
- package/dist/core/runtime/situational-context.d.ts +14 -5
- package/dist/core/runtime/situational-context.js +39 -21
- package/dist/core/runtime/situational-live.d.ts +2 -2
- package/dist/core/runtime/situational-live.js +17 -17
- package/dist/core/runtime/spawn.js +4 -3
- package/dist/daemon/api/handlers/messages.js +101 -17
- package/dist/daemon/api/handlers/nodes.js +2 -1
- package/dist/pi-extensions/canvas-context-intro.js +5 -5
- package/dist/pi-extensions/canvas-inbox-watcher.js +99 -63
- package/dist/shared/generated-context.d.ts +11 -0
- package/dist/shared/generated-context.js +29 -2
- package/package.json +1 -1
- package/runtime.lock.json +2 -2
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { InboxTierDTO, IsoTime, NodeIdDTO } from './common.js';
|
|
2
|
+
/** One runtime card supplied by a caller: the runtime renders and escapes it
|
|
3
|
+
* exactly once, so a caller cannot emit a malformed card or smuggle markup
|
|
4
|
+
* into one. `kind` must be namespaced (contain `:`) — bare kinds are
|
|
5
|
+
* crouter's own closed vocabulary. */
|
|
6
|
+
export interface RuntimeCardRequest {
|
|
7
|
+
kind: string;
|
|
8
|
+
facts?: Record<string, string | number>;
|
|
9
|
+
/** Data, not markup. */
|
|
10
|
+
body?: string;
|
|
11
|
+
}
|
|
2
12
|
/** `POST /v1/nodes/{id}/messages` body. */
|
|
3
13
|
export interface SendMessageRequest {
|
|
4
14
|
body: string;
|
|
@@ -16,6 +26,14 @@ export interface SendMessageRequest {
|
|
|
16
26
|
* a `<situational-context>` block, never visible chat (`--situational-context`).
|
|
17
27
|
* Immediate only; valid alone (no body). */
|
|
18
28
|
situational_context?: string;
|
|
29
|
+
/** A runtime card that REPLACES the target's situational sidecar, delivered
|
|
30
|
+
* ahead of the body in the same turn and re-stated by the session-start
|
|
31
|
+
* bearings after a context refresh. Mutually exclusive with
|
|
32
|
+
* `situational_context`; valid alone (no body) on the durable path. */
|
|
33
|
+
situational_card?: RuntimeCardRequest;
|
|
34
|
+
/** One-shot runtime cards for this turn only — never persisted. Delivered in
|
|
35
|
+
* array order, after `situational_card` and ahead of the body. */
|
|
36
|
+
context_cards?: RuntimeCardRequest[];
|
|
19
37
|
/** Raw JSON-schema string granting a one-off `submit` tool before delivery
|
|
20
38
|
* (`--output-schema`). Immediate only. */
|
|
21
39
|
output_schema?: string;
|
|
@@ -24,7 +42,10 @@ export interface SendMessageRequest {
|
|
|
24
42
|
* instead of the durable inbox; a dormant or mid-revive target falls back to
|
|
25
43
|
* the durable inbox + revive (watcher delivers post-boot). Plain immediate
|
|
26
44
|
* body only — rejected with fresh/reopen/situational_context/
|
|
27
|
-
* output_schema or tier 'deferred'.
|
|
45
|
+
* output_schema or tier 'deferred'. Runtime cards ARE accepted: a
|
|
46
|
+
* card-bearing send is an ordinary human send that happens to carry context,
|
|
47
|
+
* and the live deliver frame places the cards ahead of the body in one turn.
|
|
48
|
+
* Absent → durable inbox (unchanged). */
|
|
28
49
|
delivery?: 'interactive';
|
|
29
50
|
}
|
|
30
51
|
/** Result of an immediate message send. */
|