@econ-v1/rpc 7.6.13 → 7.6.16

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/index.d.ts CHANGED
@@ -123,17 +123,8 @@ export type L402EnforcementSource = import("./l402-enforcement-contract.js").L40
123
123
  export type L402EnforcementSetPayload = import("./l402-enforcement-contract.js").L402EnforcementSetPayload;
124
124
  export type ModelPick = import("./model-picker-contract.js").ModelPick;
125
125
  export type ModelPickRequest = import("./model-picker-contract.js").ModelPickRequest;
126
- export type ModelPickerCatalog = import("./model-picker-contract.js").ModelPickerCatalog;
127
- export type ModelPickerCatalogRow = import("./model-picker-contract.js").ModelPickerCatalogRow;
128
- export type ModelPickerRefreshRow = import("./model-picker-contract.js").ModelPickerRefreshRow;
129
126
  export type ModelPickerCenter = import("./model-picker-contract.js").ModelPickerCenter;
130
127
  export type ModelRef = import("./model-picker-contract.js").ModelRef;
131
- export type PickerModel = import("./model-picker-contract.js").PickerModel;
132
- export type PickerNotice = import("./model-picker-contract.js").PickerNotice;
133
- export type PickerProvider = import("./model-picker-contract.js").PickerProvider;
134
- export type PickerRecent = import("./model-picker-contract.js").PickerRecent;
135
- export type PickerSearchOption = import("./model-picker-contract.js").PickerSearchOption;
136
- export type PickerStore = import("./model-picker-contract.js").PickerStore;
137
128
  export type RouteMode = import("./model-picker-contract.js").RouteMode;
138
129
  export type WebSearchChoice = import("./model-picker-contract.js").WebSearchChoice;
139
130
  export type ClientUpdateHost = import("./client-update-contract.js").ClientUpdateHost;
@@ -224,7 +215,7 @@ export { BROWSER_TURN_RECORD_CAPABILITY, BROWSER_TURN_RECORD_COMMAND, parseBrows
224
215
  export { REPORT_REDACT_COMMAND, REPORT_REDACT_MAX_TEXT_LENGTH, REPORT_REDACT_MAX_TEXTS, parseReportRedactPayload } from "./report-contract.js";
225
216
  export { HOST_CONTEXT_MAX_BYTES, validateHostContextView } from "./host-context-contract.js";
226
217
  export { L402_ENFORCEMENT_QUERY, L402_ENFORCEMENT_ROW_ID, L402_ENFORCEMENT_SET_COMMAND } from "./l402-enforcement-contract.js";
227
- export { isRouteMode, MODEL_PICKER_CATALOG_QUERY, MODEL_PICKER_CATALOG_ROW_ID, MODEL_PICKER_RECENTS_LIMIT, MODEL_PICKER_RECENTS_SETTING, MODEL_PICKER_REFRESH_COMMAND, MODEL_PICKER_REFRESH_QUERY, MODEL_PICKER_REFRESH_ROW_ID, MODEL_PICKER_STAGE_ID, parseModelPickerRefreshPayload, ROUTE_MODES, WEB_SEARCH_AUTO } from "./model-picker-contract.js";
218
+ export { isRouteMode, ROUTE_MODES } from "./model-picker-contract.js";
228
219
  export { FACTORY_RESET_ARM_COMMAND, FACTORY_RESET_CANCEL_COMMAND, FACTORY_RESET_CHALLENGE_COMMAND, FACTORY_RESET_ROW_ID, FACTORY_RESET_STATUS_QUERY } from "./factory-reset-contract.js";
229
220
  export { PEER_INTENTS, PEERS_ASK_CANCEL_COMMAND, PEERS_COMPOSE_CANCEL_COMMAND, PEERS_COMPOSE_PREPARE_COMMAND, PEERS_COMPOSE_SEND_COMMAND, PEERS_MENTIONABLE_QUERY } from "./peers-contract.js";
230
221
  export { CLIENT_DEVICE_PAIRING_STATUS_QUERY, CLIENT_DEVICE_WIRE_ERROR_DELEGATION_REVOKED, CLIENT_DEVICE_WIRE_ERROR_DEVICE_LIMIT_EXCEEDED, CLIENT_DEVICE_WIRE_ERROR_DEVICE_NOT_REGISTERED, CLIENT_DEVICE_WIRE_ERROR_LAST_DEVICE, CLIENT_DEVICE_WIRE_ERROR_LAST_DEVICE_PROTECTED, CLIENT_DEVICE_WIRE_ERROR_NAME_TAKEN, CLIENT_DEVICE_WIRE_ERROR_REVOKED } from "./pairing-status-contract.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;8BAEc,OAAO,aAAa,EAAE,eAAe;mCACrC,OAAO,4BAA4B,EAAE,oBAAoB;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AAwB;qCAChE,OAAO,+BAA+B,EAAE,sBAAsB"}
@@ -1,191 +1,35 @@
1
- /** The kernel row: the catalog without the owner's recents (those live in
2
- * `client-settings`, per device) and without `state` (a row that exists IS ready;
3
- * the shell composes `loading`/`error` itself). */
4
- /** @typedef {Omit<ModelPickerCatalog, "state" | "error" | "recents"> & { readonly id: string }} ModelPickerCatalogRow */
5
- /** @param {unknown} value @returns {value is RouteMode} */
6
- export function isRouteMode(value: unknown): value is RouteMode;
7
- /** @typedef {{
8
- * readonly id: string,
9
- * readonly state: "idle" | "running" | "done" | "error",
10
- * readonly total: number,
11
- * readonly done: number,
12
- * readonly updated: number,
13
- * readonly started_at: string | null,
14
- * readonly finished_at: string | null,
15
- * readonly error: string | null
16
- * }} ModelPickerRefreshRow
17
- * `done` counts every finished peer call; `updated` only those answered `refreshed`. */
18
- /**
19
- * The refresh command carries no input: only an empty record is valid.
20
- * @param {unknown} payload
21
- * @returns {Record<string, never>}
22
- */
23
- export function parseModelPickerRefreshPayload(payload: unknown): Record<string, never>;
24
- /**
25
- * The shared model picker — ONE overlay every stage opens through the host.
26
- *
27
- * Two stages used to draw their own model dropdown (the room chat's, and a
28
- * 1:1 port of it inside Agent Builder). This contract replaces both with a
29
- * door on the stage context, `ctx.host.modelPicker`, beside `host.dialogs`:
30
- * the stage asks, the shell opens the design drop's "Switch model" overlay
31
- * (`stages/model-selector/`, fed through `NodeOS.feedView`), and hands back
32
- * the pick. A stage never sees the catalog and never draws a model list.
33
- *
34
- * Plan: `docs/superpowers/specs/2026-09-18-shared-model-selector-plan.md`.
35
- * Design side: `docs/design/DESIGN_HANDOFF_CONTRACT.md` Ask 16.
36
- */
37
- /** The kernel's one-row live query the shell draws the overlay from. */
38
- export const MODEL_PICKER_CATALOG_QUERY: "model-picker.catalog.v1";
39
- /** The single row's id — the catalog is one screen's worth of data, not a row set. */
40
- export const MODEL_PICKER_CATALOG_ROW_ID: "catalog";
41
- /** The kernel's one-row live query of the "Update models" run (see the refresh section below). */
42
- export const MODEL_PICKER_REFRESH_QUERY: "model-picker.refresh.v1";
43
- /** The refresh row's id — one run at a time, so one row. */
44
- export const MODEL_PICKER_REFRESH_ROW_ID: "refresh";
45
- /** Shell → kernel. Starts a run and returns its row; does not wait for it. Not exposed to stages. */
46
- export const MODEL_PICKER_REFRESH_COMMAND: "model-picker.refresh-stores.v1";
47
- /** The `client-settings` key the shell keeps the owner's usage counts under. */
48
- export const MODEL_PICKER_RECENTS_SETTING: "model-picker.recents";
49
- /** The design drop's stage id: the `NodeOS.feedView` / launcher target. */
50
- export const MODEL_PICKER_STAGE_ID: "model-selector";
51
- /** How many distinct models the recents ledger remembers. */
52
- export const MODEL_PICKER_RECENTS_LIMIT: 24;
53
- /** Same three words the room chat's route pills already send (`route_mode`). */
54
- export const ROUTE_MODES: readonly ["auto", "public", "private"];
55
1
  /** @typedef {(typeof ROUTE_MODES)[number]} RouteMode */
56
- /** `"auto"` (the node routes — Exa over Brave, or an explicit `provider`), or a
57
- * web-search option id from the catalog (`"brave"`, `"exa"`, …) to force one. An
58
- * open string because the option list is data, not a closed enum. An "off" choice
59
- * is deliberately NOT part of this contract yet (decided 2026-09-19). */
2
+ /** `"auto"` (the node routes), or a web-search option id (`"brave"`, `"exa"`, …) to force one.
3
+ * An open string because the option list is data, not a closed enum. */
60
4
  /** @typedef {string} WebSearchChoice */
61
- /** The model the stage puts on the wire — exactly the pick shape the room chat
62
- * already sends (`{ model, peerNodeId }` on `room.send.v1`; `model`/`peer_node_id`
63
- * on `agent.prompt`). `name` is the vendor id the execution path calls;
64
- * `peerNodeId` present means the model is bought from that peer (its store),
65
- * absent means this node runs it on its own key ("My Store"). */
5
+ /** The model a stage puts on the wire (`{ model, peerNodeId }` on `room.send.v1`;
6
+ * `model`/`peer_node_id` on `agent.prompt`). `name` is the vendor id the execution path calls;
7
+ * `peerNodeId` present means the model is bought from that peer, absent means this node runs it
8
+ * on its own key ("My Store"). */
66
9
  /** @typedef {{ readonly name: string, readonly peerNodeId?: string }} ModelRef */
67
- /** What the stage already knows, so the overlay opens on it instead of a default.
68
- * `onSelect` hears each Select at once, while the overlay stays open for the chips:
69
- * the pick carries `model` and the chips as they stand. The promise still resolves
70
- * when the overlay closes, with the final pick, so a stage that applies both must
71
- * treat the same model twice as one choice. A host before it ignores `onSelect`. */
10
+ /** What the stage already knows, so a picker opens on it instead of a default. `onSelect`
11
+ * hears each Select at once. */
72
12
  /** @typedef {{ readonly current?: ModelRef, readonly routeMode?: RouteMode, readonly webSearch?: WebSearchChoice, readonly onSelect?: (pick: ModelPick) => void }} ModelPickRequest */
73
- /** A Select is resolved once, when it is heard, against the catalog the overlay is
74
- * drawing, and frozen: a catalog that changes afterwards never changes or drops it.
75
- * Resolution is strict — the row is found by its id and the store the overlay named
76
- * must really sell it; otherwise there is no pick (never another store). The chips
77
- * are tracked apart and always arrive, from every event.
78
- *
79
- * `model` is present only when the owner pressed Select on a row; absent means
80
- * "keep whatever model the stage already had" — the owner changed only the
81
- * web-search chip (or nothing but still closed with a chip change). `label` is
82
- * the catalog's `picker_label ?? name`, so a pill or chip shows the same words
83
- * the overlay did. `storeName` is the seller's store as the overlay named it
84
- * (this node's own `mine.name`, or the peer's), so a chip can say whose store
85
- * sells the model. */
13
+ /** `model` is present only when a row was selected; absent means "keep the model the stage
14
+ * already had". `label` is what the picker showed for the row, and `storeName` the seller's store
15
+ * as the picker named it. */
86
16
  /** @typedef {{ readonly model?: ModelRef, readonly label?: string, readonly storeName?: string, readonly routeMode: RouteMode, readonly webSearch: WebSearchChoice }} ModelPick */
87
- /** Resolves `undefined` when the owner closes without choosing, and always when the
88
- * host cancels the open (the asking stage went away) — a cancel never carries a pick.
89
- * Rejects with a
90
- * `DomainError` `conflict` while another `open()` is still pending — the overlay
91
- * is one surface — and `capability_unavailable` when this host has no design
92
- * drop to draw it with, the drop refuses the feed or launch, or the overlay never announces
93
- * it is open (`nodeos:model-open`). The host dismisses an overlay that opens after its open
94
- * was given up on, so none is ever left on screen with nobody listening. */
17
+ /** The door. This host's `open()` always rejects with a `DomainError`
18
+ * `capability_unavailable`; an older host resolved a pick, or `undefined` when nothing was chosen. */
95
19
  /** @typedef {{ open(request: ModelPickRequest): Promise<ModelPick | undefined> }} ModelPickerCenter */
96
- /** @typedef {{ readonly city?: string, readonly lat: number, readonly lon: number }} PickerGeo */
97
- /** A peer node that sells models. `fee` stays `null` until offerings carry a
98
- * markup (today every node charges the same one and advertises the base price). */
99
- /** @typedef {{ readonly id: string, readonly name: string, readonly tag: string | null, readonly fee: number | null, readonly reliability: number | null, readonly geo: PickerGeo | null }} PickerStore */
100
- /** @typedef {{ readonly id: string, readonly name: string, readonly brand_hex: string | null, readonly popularity: number, readonly featured: boolean, readonly store_ids: readonly string[], readonly status: string, readonly local: boolean }} PickerProvider */
101
- /** @typedef {{ readonly peer_node_id: string, readonly cost_in: number | null, readonly cost_out: number | null }} PickerOffer */
102
- /** A vendor's notice the overlay repeats verbatim under "About" (a data-retention
103
- * clause, a preview caveat). Nothing serves one yet. */
104
- /** @typedef {{ readonly text: string, readonly url: string | null }} PickerNotice */
20
+ /** @param {unknown} value @returns {value is RouteMode} */
21
+ export function isRouteMode(value: unknown): value is RouteMode;
105
22
  /**
106
- * A model row. Every field the overlay draws is here, and the overlay draws a
107
- * field ONLY when it is non-null — a missing value hides its cell, it never
108
- * shows as a zero, a guess or a demo constant. The `details` block names what
109
- * no source serves today; when one does, the overlay lights up without a change.
23
+ * The model picker door, `ctx.host.modelPicker` (uiApi 2).
110
24
  *
111
- * Data gaps (2026-09-21) — who would fill each, and what the overlay does meanwhile:
112
- * ttft_ms api-store: measured from llm_call_log (not backfilled yet) → speed cell hidden, sorts last
113
- * ctx_k api-store: context_window from discovery when a provider reports it → Context stat hidden
114
- * cost_in/out api-store list_available (unpriced peer offers) → "—", sorts last, no graph dot
115
- * cache_read_cost no source (vendor price sheets) → "More pricing" hidden
116
- * cache_write_cost no source → "More pricing" hidden
117
- * modalities_in/out, max_output_k, reasoning, tool_calling, supported_params
118
- * no source (vendor model cards) → those "Model details" rows hidden
119
- * notice no source → no notice block
120
- * provider.popularity api-store llm_platforms.popularity, DEFAULT 0 = unknown → "daily users" hidden, "popular" filter disabled
121
- * store.fee by design null (every node charges the same markup) → fee row/toggle hidden
122
- * store.geo, mine.geo no source → no globe marker
123
- * store.reliability api-store peer_metrics.list (served) → drawn on the store card
124
- */
125
- /** @typedef {{
126
- * readonly id: string,
127
- * readonly provider_id: string,
128
- * readonly vendor_id: string,
129
- * readonly name: string,
130
- * readonly picker_label: string | null,
131
- * readonly tier: string | null,
132
- * readonly specialty: string | null,
133
- * readonly latest: boolean,
134
- * readonly intel: number,
135
- * readonly cost_in: number | null,
136
- * readonly cost_out: number | null,
137
- * readonly ttft_ms: number | null,
138
- * readonly ctx_k: number | null,
139
- * readonly description: string | null,
140
- * readonly released: string | null,
141
- * readonly released_day: string | null,
142
- * readonly local: boolean,
143
- * readonly store_ids: readonly string[],
144
- * readonly offers: readonly PickerOffer[],
145
- * readonly cache_read_cost: number | null,
146
- * readonly cache_write_cost: number | null,
147
- * readonly modalities_in: readonly string[] | null,
148
- * readonly modalities_out: readonly string[] | null,
149
- * readonly max_output_k: number | null,
150
- * readonly reasoning: boolean | null,
151
- * readonly tool_calling: boolean | null,
152
- * readonly supported_params: readonly string[] | null,
153
- * readonly notice: PickerNotice | null
154
- * }} PickerModel */
155
- /** @typedef {{ readonly id: string, readonly name: string, readonly subtitle: string | null, readonly icon: string | null, readonly color: string | null, readonly auto: boolean }} PickerSearchOption */
156
- /** @typedef {{ readonly id: string, readonly count: number }} PickerRecent */
157
- /** `state` is the host's word for the whole payload — the same vocabulary the
158
- * app-lifecycle view uses — so the overlay can say "still asking" or "the API
159
- * Store did not answer" instead of drawing an empty table. */
160
- /** @typedef {{
161
- * readonly state: "ready" | "loading" | "error",
162
- * readonly error: string | null,
163
- * readonly mine: { readonly name: string, readonly geo: PickerGeo | null },
164
- * readonly stores: readonly PickerStore[],
165
- * readonly providers: readonly PickerProvider[],
166
- * readonly models: readonly PickerModel[],
167
- * readonly web_search_options: readonly PickerSearchOption[],
168
- * readonly recents: readonly PickerRecent[]
169
- * }} ModelPickerCatalog */
170
- /** The web-search chip the node routes with. Not a vendor, so api-store has no row
171
- * for it unless an owner curated one; the catalog adapter guarantees it is present. */
172
- export const WEB_SEARCH_AUTO: "auto";
173
- export type ModelPickerCatalogRow = Omit<ModelPickerCatalog, "state" | "error" | "recents"> & {
174
- readonly id: string;
175
- };
176
- /**
177
- * `done` counts every finished peer call; `updated` only those answered `refreshed`.
25
+ * The picker itself belongs to node-app-agent (ADR-139): the `agent-chat` widget draws it
26
+ * in-process, and other apps compose node-app-agent's `agent-model-picker` widget. This host
27
+ * draws no picker any more, so `open()` always rejects with a `DomainError`
28
+ * `capability_unavailable`. The member stays so `uiApi` stays 2, and these types stay so apps
29
+ * that still call the door, or reuse the pick shape, keep compiling.
178
30
  */
179
- export type ModelPickerRefreshRow = {
180
- readonly id: string;
181
- readonly state: "idle" | "running" | "done" | "error";
182
- readonly total: number;
183
- readonly done: number;
184
- readonly updated: number;
185
- readonly started_at: string | null;
186
- readonly finished_at: string | null;
187
- readonly error: string | null;
188
- };
31
+ /** Same three words the room chat's route pills already send (`route_mode`). */
32
+ export const ROUTE_MODES: readonly ["auto", "public", "private"];
189
33
  export type RouteMode = (typeof ROUTE_MODES)[number];
190
34
  export type WebSearchChoice = string;
191
35
  export type ModelRef = {
@@ -208,91 +52,4 @@ export type ModelPick = {
208
52
  export type ModelPickerCenter = {
209
53
  open(request: ModelPickRequest): Promise<ModelPick | undefined>;
210
54
  };
211
- export type PickerGeo = {
212
- readonly city?: string;
213
- readonly lat: number;
214
- readonly lon: number;
215
- };
216
- export type PickerStore = {
217
- readonly id: string;
218
- readonly name: string;
219
- readonly tag: string | null;
220
- readonly fee: number | null;
221
- readonly reliability: number | null;
222
- readonly geo: PickerGeo | null;
223
- };
224
- export type PickerProvider = {
225
- readonly id: string;
226
- readonly name: string;
227
- readonly brand_hex: string | null;
228
- readonly popularity: number;
229
- readonly featured: boolean;
230
- readonly store_ids: readonly string[];
231
- readonly status: string;
232
- readonly local: boolean;
233
- };
234
- export type PickerOffer = {
235
- readonly peer_node_id: string;
236
- readonly cost_in: number | null;
237
- readonly cost_out: number | null;
238
- };
239
- export type PickerNotice = {
240
- readonly text: string;
241
- readonly url: string | null;
242
- };
243
- export type PickerModel = {
244
- readonly id: string;
245
- readonly provider_id: string;
246
- readonly vendor_id: string;
247
- readonly name: string;
248
- readonly picker_label: string | null;
249
- readonly tier: string | null;
250
- readonly specialty: string | null;
251
- readonly latest: boolean;
252
- readonly intel: number;
253
- readonly cost_in: number | null;
254
- readonly cost_out: number | null;
255
- readonly ttft_ms: number | null;
256
- readonly ctx_k: number | null;
257
- readonly description: string | null;
258
- readonly released: string | null;
259
- readonly released_day: string | null;
260
- readonly local: boolean;
261
- readonly store_ids: readonly string[];
262
- readonly offers: readonly PickerOffer[];
263
- readonly cache_read_cost: number | null;
264
- readonly cache_write_cost: number | null;
265
- readonly modalities_in: readonly string[] | null;
266
- readonly modalities_out: readonly string[] | null;
267
- readonly max_output_k: number | null;
268
- readonly reasoning: boolean | null;
269
- readonly tool_calling: boolean | null;
270
- readonly supported_params: readonly string[] | null;
271
- readonly notice: PickerNotice | null;
272
- };
273
- export type PickerSearchOption = {
274
- readonly id: string;
275
- readonly name: string;
276
- readonly subtitle: string | null;
277
- readonly icon: string | null;
278
- readonly color: string | null;
279
- readonly auto: boolean;
280
- };
281
- export type PickerRecent = {
282
- readonly id: string;
283
- readonly count: number;
284
- };
285
- export type ModelPickerCatalog = {
286
- readonly state: "ready" | "loading" | "error";
287
- readonly error: string | null;
288
- readonly mine: {
289
- readonly name: string;
290
- readonly geo: PickerGeo | null;
291
- };
292
- readonly stores: readonly PickerStore[];
293
- readonly providers: readonly PickerProvider[];
294
- readonly models: readonly PickerModel[];
295
- readonly web_search_options: readonly PickerSearchOption[];
296
- readonly recents: readonly PickerRecent[];
297
- };
298
55
  //# sourceMappingURL=model-picker-contract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-picker-contract.d.ts","sourceRoot":"","sources":["../src/model-picker-contract.js"],"names":[],"mappings":"AA2LA;;mDAEmD;AACnD,yHAAyH;AAEzH,2DAA2D;AAC3D,mCADY,OAAO,GAAkB,KAAK,IAAI,SAAS,CAGtD;AAID;;;;;;;;;;wFAUwF;AAExF;;;;GAIG;AACH,wDAHW,OAAO,GACL,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAOjC;AA1ND;;;;;;;;;;;;GAYG;AAEH,wEAAwE;AACxE,yCAA0C,yBAAyB,CAAC;AAEpE,sFAAsF;AACtF,0CAA2C,SAAS,CAAC;AAErD,kGAAkG;AAClG,yCAA0C,yBAAyB,CAAC;AAEpE,4DAA4D;AAC5D,0CAA2C,SAAS,CAAC;AAErD,qGAAqG;AACrG,2CAA4C,gCAAgC,CAAC;AAE7E,gFAAgF;AAChF,2CAA4C,sBAAsB,CAAC;AAEnE,2EAA2E;AAC3E,oCAAqC,gBAAgB,CAAC;AAEtD,6DAA6D;AAC7D,yCAA0C,EAAE,CAAC;AAI7C,gFAAgF;AAChF,iEAAgF;AAChF,wDAAwD;AAExD;;;yEAGyE;AACzE,wCAAwC;AAExC;;;;iEAIiE;AACjE,kFAAkF;AAElF;;;;oFAIoF;AACpF,uLAAuL;AAEvL;;;;;;;;;;;;sBAYsB;AACtB,mLAAmL;AAEnL;;;;;;;4EAO4E;AAC5E,uGAAuG;AAUvG,kGAAkG;AAElG;mFACmF;AACnF,2MAA2M;AAE3M,oQAAoQ;AAEpQ,kIAAkI;AAElI;yDACyD;AACzD,qFAAqF;AAErF;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA6BoB;AAEpB,0MAA0M;AAE1M,8EAA8E;AAE9E;;8DAE8D;AAC9D;;;;;;;;;2BAS2B;AAE3B;uFACuF;AACvF,8BAA+B,MAAM,CAAC;oCAK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{"version":3,"file":"model-picker-contract.d.ts","sourceRoot":"","sources":["../src/model-picker-contract.js"],"names":[],"mappings":"AAgBA,wDAAwD;AAExD;wEACwE;AACxE,wCAAwC;AAExC;;;kCAGkC;AAClC,kFAAkF;AAElF;gCACgC;AAChC,uLAAuL;AAEvL;;6BAE6B;AAC7B,mLAAmL;AAEnL;sGACsG;AACtG,uGAAuG;AAEvG,2DAA2D;AAC3D,mCADY,OAAO,GAAkB,KAAK,IAAI,SAAS,CAGtD;AA1CD;;;;;;;;GAQG;AAIH,gFAAgF;AAChF,iEAAgF;wBAClE,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC;8BAI5B,MAAM;uBAMN;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE;+BAIvD;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAA;CAAE;wBAKpJ;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;CAAE;gCAIvJ;IAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAAA;CAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@econ-v1/rpc",
3
- "version": "7.6.13",
3
+ "version": "7.6.16",
4
4
  "description": "Typed runtime and contracts for Node client stage-to-kernel RPC",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Node contributors",
@@ -56,7 +56,7 @@
56
56
  "access": "public"
57
57
  },
58
58
  "dependencies": {
59
- "@econ-v1/domain": "7.6.13",
60
- "@econ-v1/ports": "7.6.13"
59
+ "@econ-v1/domain": "7.6.16",
60
+ "@econ-v1/ports": "7.6.16"
61
61
  }
62
62
  }
package/src/index.js CHANGED
@@ -116,17 +116,8 @@
116
116
  /** @typedef {import("./l402-enforcement-contract.js").L402EnforcementSetPayload} L402EnforcementSetPayload */
117
117
  /** @typedef {import("./model-picker-contract.js").ModelPick} ModelPick */
118
118
  /** @typedef {import("./model-picker-contract.js").ModelPickRequest} ModelPickRequest */
119
- /** @typedef {import("./model-picker-contract.js").ModelPickerCatalog} ModelPickerCatalog */
120
- /** @typedef {import("./model-picker-contract.js").ModelPickerCatalogRow} ModelPickerCatalogRow */
121
- /** @typedef {import("./model-picker-contract.js").ModelPickerRefreshRow} ModelPickerRefreshRow */
122
119
  /** @typedef {import("./model-picker-contract.js").ModelPickerCenter} ModelPickerCenter */
123
120
  /** @typedef {import("./model-picker-contract.js").ModelRef} ModelRef */
124
- /** @typedef {import("./model-picker-contract.js").PickerModel} PickerModel */
125
- /** @typedef {import("./model-picker-contract.js").PickerNotice} PickerNotice */
126
- /** @typedef {import("./model-picker-contract.js").PickerProvider} PickerProvider */
127
- /** @typedef {import("./model-picker-contract.js").PickerRecent} PickerRecent */
128
- /** @typedef {import("./model-picker-contract.js").PickerSearchOption} PickerSearchOption */
129
- /** @typedef {import("./model-picker-contract.js").PickerStore} PickerStore */
130
121
  /** @typedef {import("./model-picker-contract.js").RouteMode} RouteMode */
131
122
  /** @typedef {import("./model-picker-contract.js").WebSearchChoice} WebSearchChoice */
132
123
  /** @typedef {import("./client-update-contract.js").ClientUpdateHost} ClientUpdateHost */
@@ -222,7 +213,7 @@ export { DEVTOOLS_GRANT } from "./grants-contract.js";
222
213
  export { HOST_CONTEXT_MAX_BYTES, validateHostContextView } from "./host-context-contract.js";
223
214
  export { createStageContextPublisher } from "./stage-context-publisher.js";
224
215
  export { L402_ENFORCEMENT_QUERY, L402_ENFORCEMENT_ROW_ID, L402_ENFORCEMENT_SET_COMMAND } from "./l402-enforcement-contract.js";
225
- export { isRouteMode, MODEL_PICKER_CATALOG_QUERY, MODEL_PICKER_CATALOG_ROW_ID, MODEL_PICKER_RECENTS_LIMIT, MODEL_PICKER_RECENTS_SETTING, MODEL_PICKER_REFRESH_COMMAND, MODEL_PICKER_REFRESH_QUERY, MODEL_PICKER_REFRESH_ROW_ID, MODEL_PICKER_STAGE_ID, parseModelPickerRefreshPayload, ROUTE_MODES, WEB_SEARCH_AUTO } from "./model-picker-contract.js";
216
+ export { isRouteMode, ROUTE_MODES } from "./model-picker-contract.js";
226
217
  export {
227
218
  FACTORY_RESET_ARM_COMMAND,
228
219
  FACTORY_RESET_CANCEL_COMMAND,
@@ -1,222 +1,45 @@
1
1
  // @ts-check
2
- import { DomainError } from "@econ-v1/domain";
3
2
 
4
3
  /**
5
- * The shared model picker — ONE overlay every stage opens through the host.
4
+ * The model picker door, `ctx.host.modelPicker` (uiApi 2).
6
5
  *
7
- * Two stages used to draw their own model dropdown (the room chat's, and a
8
- * 1:1 port of it inside Agent Builder). This contract replaces both with a
9
- * door on the stage context, `ctx.host.modelPicker`, beside `host.dialogs`:
10
- * the stage asks, the shell opens the design drop's "Switch model" overlay
11
- * (`stages/model-selector/`, fed through `NodeOS.feedView`), and hands back
12
- * the pick. A stage never sees the catalog and never draws a model list.
13
- *
14
- * Plan: `docs/superpowers/specs/2026-09-18-shared-model-selector-plan.md`.
15
- * Design side: `docs/design/DESIGN_HANDOFF_CONTRACT.md` Ask 16.
6
+ * The picker itself belongs to node-app-agent (ADR-139): the `agent-chat` widget draws it
7
+ * in-process, and other apps compose node-app-agent's `agent-model-picker` widget. This host
8
+ * draws no picker any more, so `open()` always rejects with a `DomainError`
9
+ * `capability_unavailable`. The member stays so `uiApi` stays 2, and these types stay so apps
10
+ * that still call the door, or reuse the pick shape, keep compiling.
16
11
  */
17
12
 
18
- /** The kernel's one-row live query the shell draws the overlay from. */
19
- export const MODEL_PICKER_CATALOG_QUERY = "model-picker.catalog.v1";
20
-
21
- /** The single row's id — the catalog is one screen's worth of data, not a row set. */
22
- export const MODEL_PICKER_CATALOG_ROW_ID = "catalog";
23
-
24
- /** The kernel's one-row live query of the "Update models" run (see the refresh section below). */
25
- export const MODEL_PICKER_REFRESH_QUERY = "model-picker.refresh.v1";
26
-
27
- /** The refresh row's id — one run at a time, so one row. */
28
- export const MODEL_PICKER_REFRESH_ROW_ID = "refresh";
29
-
30
- /** Shell → kernel. Starts a run and returns its row; does not wait for it. Not exposed to stages. */
31
- export const MODEL_PICKER_REFRESH_COMMAND = "model-picker.refresh-stores.v1";
32
-
33
- /** The `client-settings` key the shell keeps the owner's usage counts under. */
34
- export const MODEL_PICKER_RECENTS_SETTING = "model-picker.recents";
35
-
36
- /** The design drop's stage id: the `NodeOS.feedView` / launcher target. */
37
- export const MODEL_PICKER_STAGE_ID = "model-selector";
38
-
39
- /** How many distinct models the recents ledger remembers. */
40
- export const MODEL_PICKER_RECENTS_LIMIT = 24;
41
-
42
13
  // ── The pick ─────────────────────────────────────────────────────────────────
43
14
 
44
15
  /** Same three words the room chat's route pills already send (`route_mode`). */
45
16
  export const ROUTE_MODES = /** @type {const} */ (["auto", "public", "private"]);
46
17
  /** @typedef {(typeof ROUTE_MODES)[number]} RouteMode */
47
18
 
48
- /** `"auto"` (the node routes — Exa over Brave, or an explicit `provider`), or a
49
- * web-search option id from the catalog (`"brave"`, `"exa"`, …) to force one. An
50
- * open string because the option list is data, not a closed enum. An "off" choice
51
- * is deliberately NOT part of this contract yet (decided 2026-09-19). */
19
+ /** `"auto"` (the node routes), or a web-search option id (`"brave"`, `"exa"`, …) to force one.
20
+ * An open string because the option list is data, not a closed enum. */
52
21
  /** @typedef {string} WebSearchChoice */
53
22
 
54
- /** The model the stage puts on the wire — exactly the pick shape the room chat
55
- * already sends (`{ model, peerNodeId }` on `room.send.v1`; `model`/`peer_node_id`
56
- * on `agent.prompt`). `name` is the vendor id the execution path calls;
57
- * `peerNodeId` present means the model is bought from that peer (its store),
58
- * absent means this node runs it on its own key ("My Store"). */
23
+ /** The model a stage puts on the wire (`{ model, peerNodeId }` on `room.send.v1`;
24
+ * `model`/`peer_node_id` on `agent.prompt`). `name` is the vendor id the execution path calls;
25
+ * `peerNodeId` present means the model is bought from that peer, absent means this node runs it
26
+ * on its own key ("My Store"). */
59
27
  /** @typedef {{ readonly name: string, readonly peerNodeId?: string }} ModelRef */
60
28
 
61
- /** What the stage already knows, so the overlay opens on it instead of a default.
62
- * `onSelect` hears each Select at once, while the overlay stays open for the chips:
63
- * the pick carries `model` and the chips as they stand. The promise still resolves
64
- * when the overlay closes, with the final pick, so a stage that applies both must
65
- * treat the same model twice as one choice. A host before it ignores `onSelect`. */
29
+ /** What the stage already knows, so a picker opens on it instead of a default. `onSelect`
30
+ * hears each Select at once. */
66
31
  /** @typedef {{ readonly current?: ModelRef, readonly routeMode?: RouteMode, readonly webSearch?: WebSearchChoice, readonly onSelect?: (pick: ModelPick) => void }} ModelPickRequest */
67
32
 
68
- /** A Select is resolved once, when it is heard, against the catalog the overlay is
69
- * drawing, and frozen: a catalog that changes afterwards never changes or drops it.
70
- * Resolution is strict — the row is found by its id and the store the overlay named
71
- * must really sell it; otherwise there is no pick (never another store). The chips
72
- * are tracked apart and always arrive, from every event.
73
- *
74
- * `model` is present only when the owner pressed Select on a row; absent means
75
- * "keep whatever model the stage already had" — the owner changed only the
76
- * web-search chip (or nothing but still closed with a chip change). `label` is
77
- * the catalog's `picker_label ?? name`, so a pill or chip shows the same words
78
- * the overlay did. `storeName` is the seller's store as the overlay named it
79
- * (this node's own `mine.name`, or the peer's), so a chip can say whose store
80
- * sells the model. */
33
+ /** `model` is present only when a row was selected; absent means "keep the model the stage
34
+ * already had". `label` is what the picker showed for the row, and `storeName` the seller's store
35
+ * as the picker named it. */
81
36
  /** @typedef {{ readonly model?: ModelRef, readonly label?: string, readonly storeName?: string, readonly routeMode: RouteMode, readonly webSearch: WebSearchChoice }} ModelPick */
82
37
 
83
- /** Resolves `undefined` when the owner closes without choosing, and always when the
84
- * host cancels the open (the asking stage went away) — a cancel never carries a pick.
85
- * Rejects with a
86
- * `DomainError` `conflict` while another `open()` is still pending — the overlay
87
- * is one surface — and `capability_unavailable` when this host has no design
88
- * drop to draw it with, the drop refuses the feed or launch, or the overlay never announces
89
- * it is open (`nodeos:model-open`). The host dismisses an overlay that opens after its open
90
- * was given up on, so none is ever left on screen with nobody listening. */
38
+ /** The door. This host's `open()` always rejects with a `DomainError`
39
+ * `capability_unavailable`; an older host resolved a pick, or `undefined` when nothing was chosen. */
91
40
  /** @typedef {{ open(request: ModelPickRequest): Promise<ModelPick | undefined> }} ModelPickerCenter */
92
41
 
93
- // ── The catalog (the shell's read model; stages never see it) ───────────────
94
- //
95
- // Field names are api-store's `core.api_store.selector.catalog` (ADR-001) kept
96
- // verbatim, plus what the host adds: stores are PEER NODES selling models
97
- // (`mine` is this node), and each model says whether this node runs it
98
- // (`local`) and which peers offer it (`store_ids`, `offers`). Blended price and
99
- // age in days are derived by the drawing side, never served.
100
-
101
- /** @typedef {{ readonly city?: string, readonly lat: number, readonly lon: number }} PickerGeo */
102
-
103
- /** A peer node that sells models. `fee` stays `null` until offerings carry a
104
- * markup (today every node charges the same one and advertises the base price). */
105
- /** @typedef {{ readonly id: string, readonly name: string, readonly tag: string | null, readonly fee: number | null, readonly reliability: number | null, readonly geo: PickerGeo | null }} PickerStore */
106
-
107
- /** @typedef {{ readonly id: string, readonly name: string, readonly brand_hex: string | null, readonly popularity: number, readonly featured: boolean, readonly store_ids: readonly string[], readonly status: string, readonly local: boolean }} PickerProvider */
108
-
109
- /** @typedef {{ readonly peer_node_id: string, readonly cost_in: number | null, readonly cost_out: number | null }} PickerOffer */
110
-
111
- /** A vendor's notice the overlay repeats verbatim under "About" (a data-retention
112
- * clause, a preview caveat). Nothing serves one yet. */
113
- /** @typedef {{ readonly text: string, readonly url: string | null }} PickerNotice */
114
-
115
- /**
116
- * A model row. Every field the overlay draws is here, and the overlay draws a
117
- * field ONLY when it is non-null — a missing value hides its cell, it never
118
- * shows as a zero, a guess or a demo constant. The `details` block names what
119
- * no source serves today; when one does, the overlay lights up without a change.
120
- *
121
- * Data gaps (2026-09-21) — who would fill each, and what the overlay does meanwhile:
122
- * ttft_ms api-store: measured from llm_call_log (not backfilled yet) → speed cell hidden, sorts last
123
- * ctx_k api-store: context_window from discovery when a provider reports it → Context stat hidden
124
- * cost_in/out api-store list_available (unpriced peer offers) → "—", sorts last, no graph dot
125
- * cache_read_cost no source (vendor price sheets) → "More pricing" hidden
126
- * cache_write_cost no source → "More pricing" hidden
127
- * modalities_in/out, max_output_k, reasoning, tool_calling, supported_params
128
- * no source (vendor model cards) → those "Model details" rows hidden
129
- * notice no source → no notice block
130
- * provider.popularity api-store llm_platforms.popularity, DEFAULT 0 = unknown → "daily users" hidden, "popular" filter disabled
131
- * store.fee by design null (every node charges the same markup) → fee row/toggle hidden
132
- * store.geo, mine.geo no source → no globe marker
133
- * store.reliability api-store peer_metrics.list (served) → drawn on the store card
134
- */
135
- /** @typedef {{
136
- * readonly id: string,
137
- * readonly provider_id: string,
138
- * readonly vendor_id: string,
139
- * readonly name: string,
140
- * readonly picker_label: string | null,
141
- * readonly tier: string | null,
142
- * readonly specialty: string | null,
143
- * readonly latest: boolean,
144
- * readonly intel: number,
145
- * readonly cost_in: number | null,
146
- * readonly cost_out: number | null,
147
- * readonly ttft_ms: number | null,
148
- * readonly ctx_k: number | null,
149
- * readonly description: string | null,
150
- * readonly released: string | null,
151
- * readonly released_day: string | null,
152
- * readonly local: boolean,
153
- * readonly store_ids: readonly string[],
154
- * readonly offers: readonly PickerOffer[],
155
- * readonly cache_read_cost: number | null,
156
- * readonly cache_write_cost: number | null,
157
- * readonly modalities_in: readonly string[] | null,
158
- * readonly modalities_out: readonly string[] | null,
159
- * readonly max_output_k: number | null,
160
- * readonly reasoning: boolean | null,
161
- * readonly tool_calling: boolean | null,
162
- * readonly supported_params: readonly string[] | null,
163
- * readonly notice: PickerNotice | null
164
- * }} PickerModel */
165
-
166
- /** @typedef {{ readonly id: string, readonly name: string, readonly subtitle: string | null, readonly icon: string | null, readonly color: string | null, readonly auto: boolean }} PickerSearchOption */
167
-
168
- /** @typedef {{ readonly id: string, readonly count: number }} PickerRecent */
169
-
170
- /** `state` is the host's word for the whole payload — the same vocabulary the
171
- * app-lifecycle view uses — so the overlay can say "still asking" or "the API
172
- * Store did not answer" instead of drawing an empty table. */
173
- /** @typedef {{
174
- * readonly state: "ready" | "loading" | "error",
175
- * readonly error: string | null,
176
- * readonly mine: { readonly name: string, readonly geo: PickerGeo | null },
177
- * readonly stores: readonly PickerStore[],
178
- * readonly providers: readonly PickerProvider[],
179
- * readonly models: readonly PickerModel[],
180
- * readonly web_search_options: readonly PickerSearchOption[],
181
- * readonly recents: readonly PickerRecent[]
182
- * }} ModelPickerCatalog */
183
-
184
- /** The web-search chip the node routes with. Not a vendor, so api-store has no row
185
- * for it unless an owner curated one; the catalog adapter guarantees it is present. */
186
- export const WEB_SEARCH_AUTO = "auto";
187
-
188
- /** The kernel row: the catalog without the owner's recents (those live in
189
- * `client-settings`, per device) and without `state` (a row that exists IS ready;
190
- * the shell composes `loading`/`error` itself). */
191
- /** @typedef {Omit<ModelPickerCatalog, "state" | "error" | "recents"> & { readonly id: string }} ModelPickerCatalogRow */
192
-
193
42
  /** @param {unknown} value @returns {value is RouteMode} */
194
43
  export function isRouteMode(value) {
195
44
  return typeof value === "string" && (/** @type {readonly string[]} */ (ROUTE_MODES)).includes(value);
196
45
  }
197
-
198
- // ── Update models ────────────────────────────────────────────────────────────
199
-
200
- /** @typedef {{
201
- * readonly id: string,
202
- * readonly state: "idle" | "running" | "done" | "error",
203
- * readonly total: number,
204
- * readonly done: number,
205
- * readonly updated: number,
206
- * readonly started_at: string | null,
207
- * readonly finished_at: string | null,
208
- * readonly error: string | null
209
- * }} ModelPickerRefreshRow
210
- * `done` counts every finished peer call; `updated` only those answered `refreshed`. */
211
-
212
- /**
213
- * The refresh command carries no input: only an empty record is valid.
214
- * @param {unknown} payload
215
- * @returns {Record<string, never>}
216
- */
217
- export function parseModelPickerRefreshPayload(payload) {
218
- if (typeof payload !== "object" || payload === null || Array.isArray(payload) || Object.keys(payload).length > 0) {
219
- throw new DomainError({ code: "invalid_request", message: "The model refresh command takes no input" });
220
- }
221
- return {};
222
- }