@north-light/crouter-api 0.3.190 → 0.3.192
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.
|
@@ -141,10 +141,15 @@ export type BrokerGeneratedNameRequest = {
|
|
|
141
141
|
kind: string;
|
|
142
142
|
};
|
|
143
143
|
};
|
|
144
|
-
/** A daemon-selected Pi editor-label directive. No handler calls a broker.
|
|
144
|
+
/** A daemon-selected Pi editor-label directive. No handler calls a broker.
|
|
145
|
+
* `description`/`icon` are the values as STORED (an empty icon is left unset),
|
|
146
|
+
* so the broker announces what the node now carries rather than what it asked
|
|
147
|
+
* for. All three are present exactly when `applied`. */
|
|
145
148
|
export interface BrokerGeneratedNameResultDTO {
|
|
146
149
|
applied: boolean;
|
|
147
150
|
editorLabel?: string;
|
|
151
|
+
description?: string;
|
|
152
|
+
icon?: string;
|
|
148
153
|
}
|
|
149
154
|
export interface BrokerPersonaAckRequest {
|
|
150
155
|
from: {
|
package/dist/api/dto/broker.d.ts
CHANGED
|
@@ -30,12 +30,34 @@ export interface BrokerWelcomeFrame<M = unknown> {
|
|
|
30
30
|
snapshot?: BrokerWelcomeSnapshot<M>;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* The broker
|
|
34
|
-
*
|
|
33
|
+
* The crtrd broker `node_named` control frame — the node's generated name at the
|
|
34
|
+
* instant crtrd committed it.
|
|
35
|
+
*
|
|
36
|
+
* A node names itself off its first real message: the naming extension asks a
|
|
37
|
+
* headless model for a handle, commits it through crtrd's guarded compare-and-set,
|
|
38
|
+
* and pushes this frame down the attach stream in the same callback. It is sent
|
|
39
|
+
* ONLY when that guarded commit APPLIED, so a name a human already set is never
|
|
40
|
+
* announced as generated.
|
|
41
|
+
*
|
|
42
|
+
* It exists because the name lands SECONDS AFTER the turn that triggered it — a
|
|
43
|
+
* consumer that settles its own display state on turn-end reads an unnamed node and
|
|
44
|
+
* has nothing left to re-read on. This frame is the push: `description` is the
|
|
45
|
+
* 3-8 word kebab-case handle, `icon` the Nerd Font glyph the namer chose (empty
|
|
46
|
+
* when it chose none), and `editorLabel` crtrd's own rendered label for the node.
|
|
47
|
+
*/
|
|
48
|
+
export interface BrokerNodeNamedFrame {
|
|
49
|
+
type: 'node_named';
|
|
50
|
+
description: string;
|
|
51
|
+
icon: string;
|
|
52
|
+
editorLabel: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The broker-control frames a relay consumer reads: `welcome` (catch-up snapshot),
|
|
56
|
+
* `error`, and `node_named`. The broker interleaves others (display_*, ack, …)
|
|
35
57
|
* under non-colliding `type` discriminants; a relay mapper drops those through its
|
|
36
58
|
* `default` arm untyped, so they are not enumerated here.
|
|
37
59
|
*/
|
|
38
|
-
export type BrokerControlFrame<M = unknown> = BrokerWelcomeFrame<M> | BrokerErrorFrame;
|
|
60
|
+
export type BrokerControlFrame<M = unknown> = BrokerWelcomeFrame<M> | BrokerErrorFrame | BrokerNodeNamedFrame;
|
|
39
61
|
/**
|
|
40
62
|
* What the crtrd broker attach delivers to a relay consumer: the live engine
|
|
41
63
|
* event stream (`E` — pi's `AgentSessionEvent`, relayed verbatim) unioned with the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/crouter-api",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.192",
|
|
4
4
|
"description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, and the CrtrClient. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/api/index.js",
|