wicked-crew 0.16.11 → 0.16.13
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 +28 -8
- package/dist/api/artifact-outline.d.ts +64 -0
- package/dist/api/artifact-outline.d.ts.map +1 -0
- package/dist/api/artifact-outline.js +254 -0
- package/dist/api/artifact-outline.js.map +1 -0
- package/dist/api/beneath.d.ts +76 -0
- package/dist/api/beneath.d.ts.map +1 -0
- package/dist/api/beneath.js +214 -0
- package/dist/api/beneath.js.map +1 -0
- package/dist/api/capture.d.ts +2 -2
- package/dist/api/chat-citations.d.ts +25 -1
- package/dist/api/chat-citations.d.ts.map +1 -1
- package/dist/api/chat-citations.js +186 -61
- package/dist/api/chat-citations.js.map +1 -1
- package/dist/api/chat-context.d.ts +236 -0
- package/dist/api/chat-context.d.ts.map +1 -0
- package/dist/api/chat-context.js +808 -0
- package/dist/api/chat-context.js.map +1 -0
- package/dist/api/chat-history.d.ts +20 -0
- package/dist/api/chat-history.d.ts.map +1 -1
- package/dist/api/chat-history.js +46 -1
- package/dist/api/chat-history.js.map +1 -1
- package/dist/api/chat-proposals.d.ts +534 -0
- package/dist/api/chat-proposals.d.ts.map +1 -0
- package/dist/api/chat-proposals.js +1562 -0
- package/dist/api/chat-proposals.js.map +1 -0
- package/dist/api/chat-scope.d.ts +41 -0
- package/dist/api/chat-scope.d.ts.map +1 -1
- package/dist/api/chat-scope.js +87 -15
- package/dist/api/chat-scope.js.map +1 -1
- package/dist/api/chat-transcripts.d.ts +27 -2
- package/dist/api/chat-transcripts.d.ts.map +1 -1
- package/dist/api/chat-transcripts.js +105 -4
- package/dist/api/chat-transcripts.js.map +1 -1
- package/dist/api/diagnostics.d.ts +15 -0
- package/dist/api/diagnostics.d.ts.map +1 -1
- package/dist/api/diagnostics.js +56 -0
- package/dist/api/diagnostics.js.map +1 -1
- package/dist/api/elicitation-cache.d.ts +13 -0
- package/dist/api/elicitation-cache.d.ts.map +1 -1
- package/dist/api/elicitation-cache.js +12 -0
- package/dist/api/elicitation-cache.js.map +1 -1
- package/dist/api/eval-sample.d.ts +12 -12
- package/dist/api/frame-guard.d.ts +62 -0
- package/dist/api/frame-guard.d.ts.map +1 -0
- package/dist/api/frame-guard.js +97 -0
- package/dist/api/frame-guard.js.map +1 -0
- package/dist/api/governance-steering.d.ts +4 -4
- package/dist/api/multiscope.d.ts +3 -0
- package/dist/api/multiscope.d.ts.map +1 -1
- package/dist/api/multiscope.js +13 -0
- package/dist/api/multiscope.js.map +1 -1
- package/dist/api/needs.d.ts +6 -0
- package/dist/api/needs.d.ts.map +1 -1
- package/dist/api/needs.js +31 -4
- package/dist/api/needs.js.map +1 -1
- package/dist/api/product.d.ts.map +1 -1
- package/dist/api/product.js +13 -2
- package/dist/api/product.js.map +1 -1
- package/dist/api/project-aggregates.d.ts +6 -6
- package/dist/api/project-aggregates.d.ts.map +1 -1
- package/dist/api/project-aggregates.js +16 -24
- package/dist/api/project-aggregates.js.map +1 -1
- package/dist/api/requirements.d.ts +261 -6
- package/dist/api/requirements.d.ts.map +1 -1
- package/dist/api/requirements.js +344 -64
- package/dist/api/requirements.js.map +1 -1
- package/dist/api/routes.d.ts +156 -4
- package/dist/api/routes.d.ts.map +1 -1
- package/dist/api/routes.js +851 -78
- package/dist/api/routes.js.map +1 -1
- package/dist/api/run-brief.d.ts +78 -0
- package/dist/api/run-brief.d.ts.map +1 -0
- package/dist/api/run-brief.js +318 -0
- package/dist/api/run-brief.js.map +1 -0
- package/dist/api/run-files.d.ts.map +1 -1
- package/dist/api/run-files.js +5 -1
- package/dist/api/run-files.js.map +1 -1
- package/dist/api/run-timing-index.d.ts +27 -0
- package/dist/api/run-timing-index.d.ts.map +1 -1
- package/dist/api/run-timing-index.js +65 -0
- package/dist/api/run-timing-index.js.map +1 -1
- package/dist/api/seat-images.d.ts +102 -0
- package/dist/api/seat-images.d.ts.map +1 -0
- package/dist/api/seat-images.js +333 -0
- package/dist/api/seat-images.js.map +1 -0
- package/dist/api/server.d.ts +3 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +265 -2
- package/dist/api/server.js.map +1 -1
- package/dist/api/steering-landing.d.ts +48 -1
- package/dist/api/steering-landing.d.ts.map +1 -1
- package/dist/api/steering-landing.js +116 -42
- package/dist/api/steering-landing.js.map +1 -1
- package/dist/api/system-snapshot.d.ts +51 -2
- package/dist/api/system-snapshot.d.ts.map +1 -1
- package/dist/api/system-snapshot.js +151 -15
- package/dist/api/system-snapshot.js.map +1 -1
- package/dist/api/testing.d.ts +4 -4
- package/dist/api/testing.js +2 -2
- package/dist/api/testing.js.map +1 -1
- package/dist/apps/spec.d.ts +3009 -0
- package/dist/apps/spec.d.ts.map +1 -0
- package/dist/apps/spec.js +870 -0
- package/dist/apps/spec.js.map +1 -0
- package/dist/campaigns/routes.js +1 -1
- package/dist/campaigns/routes.js.map +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/core/adapter.d.ts +12 -0
- package/dist/core/adapter.d.ts.map +1 -1
- package/dist/core/adapter.js +36 -1
- package/dist/core/adapter.js.map +1 -1
- package/dist/core/deliver-text.d.ts.map +1 -1
- package/dist/core/deliver-text.js +22 -10
- package/dist/core/deliver-text.js.map +1 -1
- package/dist/core/estate-mcp-client.d.ts +7 -1
- package/dist/core/estate-mcp-client.d.ts.map +1 -1
- package/dist/core/estate-mcp-client.js +10 -2
- package/dist/core/estate-mcp-client.js.map +1 -1
- package/dist/core/exec.d.ts +12 -0
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +23 -0
- package/dist/core/exec.js.map +1 -1
- package/dist/core/reassign-refusal.d.ts.map +1 -1
- package/dist/core/reassign-refusal.js +23 -3
- package/dist/core/reassign-refusal.js.map +1 -1
- package/dist/core/repoPaths.d.ts +32 -7
- package/dist/core/repoPaths.d.ts.map +1 -1
- package/dist/core/repoPaths.js +56 -9
- package/dist/core/repoPaths.js.map +1 -1
- package/dist/core/requirements-graph-setting.d.ts +32 -0
- package/dist/core/requirements-graph-setting.d.ts.map +1 -0
- package/dist/core/requirements-graph-setting.js +84 -0
- package/dist/core/requirements-graph-setting.js.map +1 -0
- package/dist/core/run-boot-resume.d.ts +4 -1
- package/dist/core/run-boot-resume.d.ts.map +1 -1
- package/dist/core/run-boot-resume.js +6 -1
- package/dist/core/run-boot-resume.js.map +1 -1
- package/dist/core/run-identity.d.ts.map +1 -1
- package/dist/core/run-identity.js +6 -0
- package/dist/core/run-identity.js.map +1 -1
- package/dist/core/types.d.ts +14 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/decisions/chat-recorder.d.ts +14 -3
- package/dist/decisions/chat-recorder.d.ts.map +1 -1
- package/dist/decisions/chat-recorder.js +54 -9
- package/dist/decisions/chat-recorder.js.map +1 -1
- package/dist/editors/csp.d.ts +24 -4
- package/dist/editors/csp.d.ts.map +1 -1
- package/dist/editors/csp.js +35 -8
- package/dist/editors/csp.js.map +1 -1
- package/dist/editors/registry.d.ts +46 -21
- package/dist/editors/registry.d.ts.map +1 -1
- package/dist/editors/registry.js +13 -2
- package/dist/editors/registry.js.map +1 -1
- package/dist/editors/routes.d.ts +4 -1
- package/dist/editors/routes.d.ts.map +1 -1
- package/dist/editors/routes.js +30 -3
- package/dist/editors/routes.js.map +1 -1
- package/dist/editors/visuals.d.ts +51 -0
- package/dist/editors/visuals.d.ts.map +1 -0
- package/dist/editors/visuals.js +164 -0
- package/dist/editors/visuals.js.map +1 -0
- package/dist/editors/webrtc-guard.d.ts +94 -0
- package/dist/editors/webrtc-guard.d.ts.map +1 -0
- package/dist/editors/webrtc-guard.js +506 -0
- package/dist/editors/webrtc-guard.js.map +1 -0
- package/dist/inspect/reading.d.ts +110 -0
- package/dist/inspect/reading.d.ts.map +1 -0
- package/dist/inspect/reading.js +325 -0
- package/dist/inspect/reading.js.map +1 -0
- package/dist/inspect/routes.d.ts +14 -0
- package/dist/inspect/routes.d.ts.map +1 -0
- package/dist/inspect/routes.js +44 -0
- package/dist/inspect/routes.js.map +1 -0
- package/dist/inspect/service.d.ts +161 -0
- package/dist/inspect/service.d.ts.map +1 -0
- package/dist/inspect/service.js +466 -0
- package/dist/inspect/service.js.map +1 -0
- package/dist/interactive/bridge-pool.d.ts +11 -2
- package/dist/interactive/bridge-pool.d.ts.map +1 -1
- package/dist/interactive/bridge-pool.js +10 -1
- package/dist/interactive/bridge-pool.js.map +1 -1
- package/dist/interactive/doc-binding.d.ts +156 -0
- package/dist/interactive/doc-binding.d.ts.map +1 -0
- package/dist/interactive/doc-binding.js +277 -0
- package/dist/interactive/doc-binding.js.map +1 -0
- package/dist/interactive/doc-delete-routes.d.ts +3 -0
- package/dist/interactive/doc-delete-routes.d.ts.map +1 -1
- package/dist/interactive/doc-delete-routes.js +4 -0
- package/dist/interactive/doc-delete-routes.js.map +1 -1
- package/dist/interactive/draft-events.d.ts +89 -3
- package/dist/interactive/draft-events.d.ts.map +1 -1
- package/dist/interactive/draft-events.js +441 -30
- package/dist/interactive/draft-events.js.map +1 -1
- package/dist/interactive/draft-skill.d.ts +7 -0
- package/dist/interactive/draft-skill.d.ts.map +1 -1
- package/dist/interactive/draft-skill.js +10 -3
- package/dist/interactive/draft-skill.js.map +1 -1
- package/dist/interactive/edit-events.d.ts +2 -0
- package/dist/interactive/edit-events.d.ts.map +1 -1
- package/dist/interactive/edit-events.js +11 -0
- package/dist/interactive/edit-events.js.map +1 -1
- package/dist/interactive/proposal-create.d.ts +143 -0
- package/dist/interactive/proposal-create.d.ts.map +1 -0
- package/dist/interactive/proposal-create.js +318 -0
- package/dist/interactive/proposal-create.js.map +1 -0
- package/dist/interactive/proxy-routes.d.ts +60 -3
- package/dist/interactive/proxy-routes.d.ts.map +1 -1
- package/dist/interactive/proxy-routes.js +217 -3
- package/dist/interactive/proxy-routes.js.map +1 -1
- package/dist/interactive/source-packet.d.ts +126 -0
- package/dist/interactive/source-packet.d.ts.map +1 -0
- package/dist/interactive/source-packet.js +482 -0
- package/dist/interactive/source-packet.js.map +1 -0
- package/dist/learnings/estate.d.ts +16 -0
- package/dist/learnings/estate.d.ts.map +1 -0
- package/dist/learnings/estate.js +68 -0
- package/dist/learnings/estate.js.map +1 -0
- package/dist/learnings/extract.d.ts +56 -0
- package/dist/learnings/extract.d.ts.map +1 -0
- package/dist/learnings/extract.js +252 -0
- package/dist/learnings/extract.js.map +1 -0
- package/dist/learnings/recall.d.ts +43 -0
- package/dist/learnings/recall.d.ts.map +1 -0
- package/dist/learnings/recall.js +104 -0
- package/dist/learnings/recall.js.map +1 -0
- package/dist/learnings/service.d.ts +183 -0
- package/dist/learnings/service.d.ts.map +1 -0
- package/dist/learnings/service.js +571 -0
- package/dist/learnings/service.js.map +1 -0
- package/dist/mcp/ask-server.d.ts.map +1 -1
- package/dist/mcp/ask-server.js +37 -4
- package/dist/mcp/ask-server.js.map +1 -1
- package/dist/mcp/broker.d.ts +12 -1
- package/dist/mcp/broker.d.ts.map +1 -1
- package/dist/mcp/broker.js +24 -5
- package/dist/mcp/broker.js.map +1 -1
- package/dist/mcp/invoke.d.ts +26 -2
- package/dist/mcp/invoke.d.ts.map +1 -1
- package/dist/mcp/invoke.js +51 -5
- package/dist/mcp/invoke.js.map +1 -1
- package/dist/persona/routes.d.ts +92 -0
- package/dist/persona/routes.d.ts.map +1 -0
- package/dist/persona/routes.js +69 -0
- package/dist/persona/routes.js.map +1 -0
- package/dist/persona/store.d.ts +104 -0
- package/dist/persona/store.d.ts.map +1 -0
- package/dist/persona/store.js +176 -0
- package/dist/persona/store.js.map +1 -0
- package/dist/persona/voice.d.ts +4 -0
- package/dist/persona/voice.d.ts.map +1 -0
- package/dist/persona/voice.js +58 -0
- package/dist/persona/voice.js.map +1 -0
- package/dist/projects/routes.d.ts +2 -2
- package/dist/setup/known.d.ts +56 -0
- package/dist/setup/known.d.ts.map +1 -0
- package/dist/setup/known.js +159 -0
- package/dist/setup/known.js.map +1 -0
- package/dist/setup/routes.d.ts +13 -0
- package/dist/setup/routes.d.ts.map +1 -0
- package/dist/setup/routes.js +20 -0
- package/dist/setup/routes.js.map +1 -0
- package/dist/standing-orders/history.d.ts +2 -0
- package/dist/standing-orders/history.d.ts.map +1 -1
- package/dist/standing-orders/history.js +1 -0
- package/dist/standing-orders/history.js.map +1 -1
- package/dist/studio/assets/WickedSans-Regular-fb698rcD.woff2 +0 -0
- package/dist/studio/assets/WickedSans-SemiBold-CD53n1AC.woff2 +0 -0
- package/dist/studio/assets/WickedScript-Regular-CY5juO6I.woff2 +0 -0
- package/dist/studio/assets/WickedSerif-Regular-mdPEjaVZ.woff2 +0 -0
- package/dist/studio/assets/index-BUZ_-Syk.css +32 -0
- package/dist/studio/assets/index-u4O_7N-b.js +986 -0
- package/dist/studio/editors/wicked-deck/editor.json +6 -1
- package/dist/studio/editors/wicked-deck/icon.svg +1 -0
- package/dist/studio/editors/wicked-deck/index.html +1 -1
- package/dist/studio/editors/wicked-doc/editor.json +6 -1
- package/dist/studio/editors/wicked-doc/icon.svg +1 -0
- package/dist/studio/editors/wicked-doc/index.html +1 -1
- package/dist/studio/editors/wicked-insights/editor.json +6 -1
- package/dist/studio/editors/wicked-insights/icon.svg +1 -0
- package/dist/studio/editors/wicked-insights/index.html +1 -1
- package/dist/studio/editors/wicked-page/editor.json +6 -1
- package/dist/studio/editors/wicked-page/icon.svg +1 -0
- package/dist/studio/editors/wicked-page/index.html +1 -1
- package/dist/studio/editors/wicked-video/editor.json +6 -1
- package/dist/studio/editors/wicked-video/icon.svg +1 -0
- package/dist/studio/editors/wicked-video/index.html +1 -1
- package/dist/studio/index.html +2 -2
- package/dist/studio/testid-inventory.json +5155 -2707
- package/dist/voice/dashboard.d.ts +376 -0
- package/dist/voice/dashboard.d.ts.map +1 -0
- package/dist/voice/dashboard.js +92 -0
- package/dist/voice/dashboard.js.map +1 -0
- package/dist/voice/inject-input.d.ts +51 -0
- package/dist/voice/inject-input.d.ts.map +1 -0
- package/dist/voice/inject-input.js +126 -0
- package/dist/voice/inject-input.js.map +1 -0
- package/dist/voice/routes.d.ts +41 -0
- package/dist/voice/routes.d.ts.map +1 -0
- package/dist/voice/routes.js +116 -0
- package/dist/voice/routes.js.map +1 -0
- package/dist/voice/service.d.ts +177 -0
- package/dist/voice/service.d.ts.map +1 -0
- package/dist/voice/service.js +400 -0
- package/dist/voice/service.js.map +1 -0
- package/dist/workflow-catalog/build.d.ts +35 -0
- package/dist/workflow-catalog/build.d.ts.map +1 -0
- package/dist/workflow-catalog/build.js +229 -0
- package/dist/workflow-catalog/build.js.map +1 -0
- package/dist/workflow-catalog/catalog-data.d.ts +36 -0
- package/dist/workflow-catalog/catalog-data.d.ts.map +1 -0
- package/dist/workflow-catalog/catalog-data.js +430 -0
- package/dist/workflow-catalog/catalog-data.js.map +1 -0
- package/dist/working-doc/event-lines.d.ts +76 -0
- package/dist/working-doc/event-lines.d.ts.map +1 -0
- package/dist/working-doc/event-lines.js +247 -0
- package/dist/working-doc/event-lines.js.map +1 -0
- package/dist/working-doc/routes.d.ts +1 -1
- package/dist/working-doc/routes.d.ts.map +1 -1
- package/dist/working-doc/routes.js +2 -1
- package/dist/working-doc/routes.js.map +1 -1
- package/dist/working-doc/sections.d.ts +3 -1
- package/dist/working-doc/sections.d.ts.map +1 -1
- package/dist/working-doc/sections.js +4 -2
- package/dist/working-doc/sections.js.map +1 -1
- package/dist/working-doc/service.d.ts +66 -1
- package/dist/working-doc/service.d.ts.map +1 -1
- package/dist/working-doc/service.js +298 -22
- package/dist/working-doc/service.js.map +1 -1
- package/dist/working-doc/store.d.ts +8 -2
- package/dist/working-doc/store.d.ts.map +1 -1
- package/dist/working-doc/store.js.map +1 -1
- package/endpoint-manifest.json +205 -2
- package/package.json +5 -4
- package/workflows/distill-learnings.json +27 -0
- package/workflows/inspect-unit.json +27 -0
- package/dist/studio/assets/index-B-f_VEL2.css +0 -32
- package/dist/studio/assets/index-DhkxIK-0.js +0 -845
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The voice dashboard, saved per person (operator 2026-10-31: "users can create, add and remove widgets on the
|
|
3
|
+
* voice dashboard").
|
|
4
|
+
*
|
|
5
|
+
* Studio frames voice mode's transcript with widgets. Each widget is a plugin that registers one section in the
|
|
6
|
+
* `voice-dashboard` panel slot, the same `panels[]` manifest shape as a run plugin's `run.details` sections. The
|
|
7
|
+
* built-in ones ship in studio's bundle; a person makes more with the metric-widget builder, and those are
|
|
8
|
+
* USER PLUGINS: declarative manifests (no code, nothing framed) that read one field of `GET /system` or
|
|
9
|
+
* `GET /diagnostics` and show it as a number or a chart. This store keeps, per actor id, which widgets are on the
|
|
10
|
+
* dashboard in which order (`layout`) and the user plugins that person made (`widgets`).
|
|
11
|
+
*
|
|
12
|
+
* ONE file, `<state home>/daemon-voice-dashboard.json`, under the `daemon-` prefix the state-home fence already
|
|
13
|
+
* classifies (as `daemon-editors.json`). Written whole through a temp file and a rename.
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
export declare const VOICE_DASHBOARD_FILENAME = "daemon-voice-dashboard.json";
|
|
17
|
+
export declare const VOICE_DASHBOARD_SLOT = "voice-dashboard";
|
|
18
|
+
export declare const VOICE_DASHBOARD_MAX_LAYOUT = 24;
|
|
19
|
+
export declare const VOICE_DASHBOARD_MAX_WIDGETS = 16;
|
|
20
|
+
/** A field path into the source's JSON: `infra[key=load].details.load1`, `runs.length`, `toReview`. */
|
|
21
|
+
export declare const METRIC_PATH: RegExp;
|
|
22
|
+
export declare const VoicePanelDeclSchema: z.ZodObject<{
|
|
23
|
+
slot: z.ZodLiteral<"voice-dashboard">;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
title: z.ZodEffects<z.ZodString, string, string>;
|
|
26
|
+
order: z.ZodNumber;
|
|
27
|
+
}, "strict", z.ZodTypeAny, {
|
|
28
|
+
title: string;
|
|
29
|
+
id: string;
|
|
30
|
+
slot: "voice-dashboard";
|
|
31
|
+
order: number;
|
|
32
|
+
}, {
|
|
33
|
+
title: string;
|
|
34
|
+
id: string;
|
|
35
|
+
slot: "voice-dashboard";
|
|
36
|
+
order: number;
|
|
37
|
+
}>;
|
|
38
|
+
/** A user-made metric widget: a declarative plugin manifest (api-types `VoiceWidgetManifest`). */
|
|
39
|
+
export declare const VoiceWidgetManifestSchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
title: z.ZodEffects<z.ZodString, string, string>;
|
|
42
|
+
version: z.ZodLiteral<1>;
|
|
43
|
+
kind: z.ZodLiteral<"metric">;
|
|
44
|
+
panels: z.ZodArray<z.ZodObject<{
|
|
45
|
+
slot: z.ZodLiteral<"voice-dashboard">;
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
title: z.ZodEffects<z.ZodString, string, string>;
|
|
48
|
+
order: z.ZodNumber;
|
|
49
|
+
}, "strict", z.ZodTypeAny, {
|
|
50
|
+
title: string;
|
|
51
|
+
id: string;
|
|
52
|
+
slot: "voice-dashboard";
|
|
53
|
+
order: number;
|
|
54
|
+
}, {
|
|
55
|
+
title: string;
|
|
56
|
+
id: string;
|
|
57
|
+
slot: "voice-dashboard";
|
|
58
|
+
order: number;
|
|
59
|
+
}>, "many">;
|
|
60
|
+
metric: z.ZodObject<{
|
|
61
|
+
source: z.ZodEnum<["system", "diagnostics"]>;
|
|
62
|
+
path: z.ZodString;
|
|
63
|
+
display: z.ZodEnum<["number", "chart"]>;
|
|
64
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, "strict", z.ZodTypeAny, {
|
|
66
|
+
source: "system" | "diagnostics";
|
|
67
|
+
path: string;
|
|
68
|
+
display: "number" | "chart";
|
|
69
|
+
unit?: string | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
source: "system" | "diagnostics";
|
|
72
|
+
path: string;
|
|
73
|
+
display: "number" | "chart";
|
|
74
|
+
unit?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, "strict", z.ZodTypeAny, {
|
|
78
|
+
title: string;
|
|
79
|
+
id: string;
|
|
80
|
+
kind: "metric";
|
|
81
|
+
version: 1;
|
|
82
|
+
panels: {
|
|
83
|
+
title: string;
|
|
84
|
+
id: string;
|
|
85
|
+
slot: "voice-dashboard";
|
|
86
|
+
order: number;
|
|
87
|
+
}[];
|
|
88
|
+
metric: {
|
|
89
|
+
source: "system" | "diagnostics";
|
|
90
|
+
path: string;
|
|
91
|
+
display: "number" | "chart";
|
|
92
|
+
unit?: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
createdAt?: string | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
title: string;
|
|
97
|
+
id: string;
|
|
98
|
+
kind: "metric";
|
|
99
|
+
version: 1;
|
|
100
|
+
panels: {
|
|
101
|
+
title: string;
|
|
102
|
+
id: string;
|
|
103
|
+
slot: "voice-dashboard";
|
|
104
|
+
order: number;
|
|
105
|
+
}[];
|
|
106
|
+
metric: {
|
|
107
|
+
source: "system" | "diagnostics";
|
|
108
|
+
path: string;
|
|
109
|
+
display: "number" | "chart";
|
|
110
|
+
unit?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
createdAt?: string | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
export declare const PutVoiceDashboardSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
115
|
+
layout: z.ZodArray<z.ZodString, "many">;
|
|
116
|
+
widgets: z.ZodArray<z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
title: z.ZodEffects<z.ZodString, string, string>;
|
|
119
|
+
version: z.ZodLiteral<1>;
|
|
120
|
+
kind: z.ZodLiteral<"metric">;
|
|
121
|
+
panels: z.ZodArray<z.ZodObject<{
|
|
122
|
+
slot: z.ZodLiteral<"voice-dashboard">;
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
title: z.ZodEffects<z.ZodString, string, string>;
|
|
125
|
+
order: z.ZodNumber;
|
|
126
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
|
+
title: string;
|
|
128
|
+
id: string;
|
|
129
|
+
slot: "voice-dashboard";
|
|
130
|
+
order: number;
|
|
131
|
+
}, {
|
|
132
|
+
title: string;
|
|
133
|
+
id: string;
|
|
134
|
+
slot: "voice-dashboard";
|
|
135
|
+
order: number;
|
|
136
|
+
}>, "many">;
|
|
137
|
+
metric: z.ZodObject<{
|
|
138
|
+
source: z.ZodEnum<["system", "diagnostics"]>;
|
|
139
|
+
path: z.ZodString;
|
|
140
|
+
display: z.ZodEnum<["number", "chart"]>;
|
|
141
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, "strict", z.ZodTypeAny, {
|
|
143
|
+
source: "system" | "diagnostics";
|
|
144
|
+
path: string;
|
|
145
|
+
display: "number" | "chart";
|
|
146
|
+
unit?: string | undefined;
|
|
147
|
+
}, {
|
|
148
|
+
source: "system" | "diagnostics";
|
|
149
|
+
path: string;
|
|
150
|
+
display: "number" | "chart";
|
|
151
|
+
unit?: string | undefined;
|
|
152
|
+
}>;
|
|
153
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, "strict", z.ZodTypeAny, {
|
|
155
|
+
title: string;
|
|
156
|
+
id: string;
|
|
157
|
+
kind: "metric";
|
|
158
|
+
version: 1;
|
|
159
|
+
panels: {
|
|
160
|
+
title: string;
|
|
161
|
+
id: string;
|
|
162
|
+
slot: "voice-dashboard";
|
|
163
|
+
order: number;
|
|
164
|
+
}[];
|
|
165
|
+
metric: {
|
|
166
|
+
source: "system" | "diagnostics";
|
|
167
|
+
path: string;
|
|
168
|
+
display: "number" | "chart";
|
|
169
|
+
unit?: string | undefined;
|
|
170
|
+
};
|
|
171
|
+
createdAt?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
title: string;
|
|
174
|
+
id: string;
|
|
175
|
+
kind: "metric";
|
|
176
|
+
version: 1;
|
|
177
|
+
panels: {
|
|
178
|
+
title: string;
|
|
179
|
+
id: string;
|
|
180
|
+
slot: "voice-dashboard";
|
|
181
|
+
order: number;
|
|
182
|
+
}[];
|
|
183
|
+
metric: {
|
|
184
|
+
source: "system" | "diagnostics";
|
|
185
|
+
path: string;
|
|
186
|
+
display: "number" | "chart";
|
|
187
|
+
unit?: string | undefined;
|
|
188
|
+
};
|
|
189
|
+
createdAt?: string | undefined;
|
|
190
|
+
}>, "many">;
|
|
191
|
+
}, "strict", z.ZodTypeAny, {
|
|
192
|
+
layout: string[];
|
|
193
|
+
widgets: {
|
|
194
|
+
title: string;
|
|
195
|
+
id: string;
|
|
196
|
+
kind: "metric";
|
|
197
|
+
version: 1;
|
|
198
|
+
panels: {
|
|
199
|
+
title: string;
|
|
200
|
+
id: string;
|
|
201
|
+
slot: "voice-dashboard";
|
|
202
|
+
order: number;
|
|
203
|
+
}[];
|
|
204
|
+
metric: {
|
|
205
|
+
source: "system" | "diagnostics";
|
|
206
|
+
path: string;
|
|
207
|
+
display: "number" | "chart";
|
|
208
|
+
unit?: string | undefined;
|
|
209
|
+
};
|
|
210
|
+
createdAt?: string | undefined;
|
|
211
|
+
}[];
|
|
212
|
+
}, {
|
|
213
|
+
layout: string[];
|
|
214
|
+
widgets: {
|
|
215
|
+
title: string;
|
|
216
|
+
id: string;
|
|
217
|
+
kind: "metric";
|
|
218
|
+
version: 1;
|
|
219
|
+
panels: {
|
|
220
|
+
title: string;
|
|
221
|
+
id: string;
|
|
222
|
+
slot: "voice-dashboard";
|
|
223
|
+
order: number;
|
|
224
|
+
}[];
|
|
225
|
+
metric: {
|
|
226
|
+
source: "system" | "diagnostics";
|
|
227
|
+
path: string;
|
|
228
|
+
display: "number" | "chart";
|
|
229
|
+
unit?: string | undefined;
|
|
230
|
+
};
|
|
231
|
+
createdAt?: string | undefined;
|
|
232
|
+
}[];
|
|
233
|
+
}>, {
|
|
234
|
+
layout: string[];
|
|
235
|
+
widgets: {
|
|
236
|
+
title: string;
|
|
237
|
+
id: string;
|
|
238
|
+
kind: "metric";
|
|
239
|
+
version: 1;
|
|
240
|
+
panels: {
|
|
241
|
+
title: string;
|
|
242
|
+
id: string;
|
|
243
|
+
slot: "voice-dashboard";
|
|
244
|
+
order: number;
|
|
245
|
+
}[];
|
|
246
|
+
metric: {
|
|
247
|
+
source: "system" | "diagnostics";
|
|
248
|
+
path: string;
|
|
249
|
+
display: "number" | "chart";
|
|
250
|
+
unit?: string | undefined;
|
|
251
|
+
};
|
|
252
|
+
createdAt?: string | undefined;
|
|
253
|
+
}[];
|
|
254
|
+
}, {
|
|
255
|
+
layout: string[];
|
|
256
|
+
widgets: {
|
|
257
|
+
title: string;
|
|
258
|
+
id: string;
|
|
259
|
+
kind: "metric";
|
|
260
|
+
version: 1;
|
|
261
|
+
panels: {
|
|
262
|
+
title: string;
|
|
263
|
+
id: string;
|
|
264
|
+
slot: "voice-dashboard";
|
|
265
|
+
order: number;
|
|
266
|
+
}[];
|
|
267
|
+
metric: {
|
|
268
|
+
source: "system" | "diagnostics";
|
|
269
|
+
path: string;
|
|
270
|
+
display: "number" | "chart";
|
|
271
|
+
unit?: string | undefined;
|
|
272
|
+
};
|
|
273
|
+
createdAt?: string | undefined;
|
|
274
|
+
}[];
|
|
275
|
+
}>, {
|
|
276
|
+
layout: string[];
|
|
277
|
+
widgets: {
|
|
278
|
+
title: string;
|
|
279
|
+
id: string;
|
|
280
|
+
kind: "metric";
|
|
281
|
+
version: 1;
|
|
282
|
+
panels: {
|
|
283
|
+
title: string;
|
|
284
|
+
id: string;
|
|
285
|
+
slot: "voice-dashboard";
|
|
286
|
+
order: number;
|
|
287
|
+
}[];
|
|
288
|
+
metric: {
|
|
289
|
+
source: "system" | "diagnostics";
|
|
290
|
+
path: string;
|
|
291
|
+
display: "number" | "chart";
|
|
292
|
+
unit?: string | undefined;
|
|
293
|
+
};
|
|
294
|
+
createdAt?: string | undefined;
|
|
295
|
+
}[];
|
|
296
|
+
}, {
|
|
297
|
+
layout: string[];
|
|
298
|
+
widgets: {
|
|
299
|
+
title: string;
|
|
300
|
+
id: string;
|
|
301
|
+
kind: "metric";
|
|
302
|
+
version: 1;
|
|
303
|
+
panels: {
|
|
304
|
+
title: string;
|
|
305
|
+
id: string;
|
|
306
|
+
slot: "voice-dashboard";
|
|
307
|
+
order: number;
|
|
308
|
+
}[];
|
|
309
|
+
metric: {
|
|
310
|
+
source: "system" | "diagnostics";
|
|
311
|
+
path: string;
|
|
312
|
+
display: "number" | "chart";
|
|
313
|
+
unit?: string | undefined;
|
|
314
|
+
};
|
|
315
|
+
createdAt?: string | undefined;
|
|
316
|
+
}[];
|
|
317
|
+
}>, {
|
|
318
|
+
layout: string[];
|
|
319
|
+
widgets: {
|
|
320
|
+
title: string;
|
|
321
|
+
id: string;
|
|
322
|
+
kind: "metric";
|
|
323
|
+
version: 1;
|
|
324
|
+
panels: {
|
|
325
|
+
title: string;
|
|
326
|
+
id: string;
|
|
327
|
+
slot: "voice-dashboard";
|
|
328
|
+
order: number;
|
|
329
|
+
}[];
|
|
330
|
+
metric: {
|
|
331
|
+
source: "system" | "diagnostics";
|
|
332
|
+
path: string;
|
|
333
|
+
display: "number" | "chart";
|
|
334
|
+
unit?: string | undefined;
|
|
335
|
+
};
|
|
336
|
+
createdAt?: string | undefined;
|
|
337
|
+
}[];
|
|
338
|
+
}, {
|
|
339
|
+
layout: string[];
|
|
340
|
+
widgets: {
|
|
341
|
+
title: string;
|
|
342
|
+
id: string;
|
|
343
|
+
kind: "metric";
|
|
344
|
+
version: 1;
|
|
345
|
+
panels: {
|
|
346
|
+
title: string;
|
|
347
|
+
id: string;
|
|
348
|
+
slot: "voice-dashboard";
|
|
349
|
+
order: number;
|
|
350
|
+
}[];
|
|
351
|
+
metric: {
|
|
352
|
+
source: "system" | "diagnostics";
|
|
353
|
+
path: string;
|
|
354
|
+
display: "number" | "chart";
|
|
355
|
+
unit?: string | undefined;
|
|
356
|
+
};
|
|
357
|
+
createdAt?: string | undefined;
|
|
358
|
+
}[];
|
|
359
|
+
}>;
|
|
360
|
+
export type VoiceWidgetManifest = z.infer<typeof VoiceWidgetManifestSchema>;
|
|
361
|
+
export type PutVoiceDashboardBody = z.infer<typeof PutVoiceDashboardSchema>;
|
|
362
|
+
/** `GET /voice/dashboard` (api-types `VoiceDashboard`): `layout: null` = never saved (studio's default). */
|
|
363
|
+
export interface VoiceDashboardBody {
|
|
364
|
+
layout: string[] | null;
|
|
365
|
+
widgets: VoiceWidgetManifest[];
|
|
366
|
+
updatedAt: string | null;
|
|
367
|
+
}
|
|
368
|
+
export declare class VoiceDashboardStore {
|
|
369
|
+
private readonly path;
|
|
370
|
+
constructor(path: string);
|
|
371
|
+
static under(stateHome: string): VoiceDashboardStore;
|
|
372
|
+
private read;
|
|
373
|
+
get(actorId: string): VoiceDashboardBody;
|
|
374
|
+
put(actorId: string, body: PutVoiceDashboardBody): VoiceDashboardBody;
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/voice/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB,gCAAgC,CAAC;AACtE,eAAO,MAAM,oBAAoB,oBAAoB,CAAC;AACtD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAI9C,uGAAuG;AACvG,eAAO,MAAM,WAAW,QAAyK,CAAC;AAElM,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAKtB,CAAC;AAEZ,kGAAkG;AAClG,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa3B,CAAC;AAIZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYnC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE5E,4GAA4G;AAC5G,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAOD,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAEzC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB;IAIpD,OAAO,CAAC,IAAI;IAgBZ,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB;IAKxC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,GAAG,kBAAkB;CAUtE"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The voice dashboard, saved per person (operator 2026-10-31: "users can create, add and remove widgets on the
|
|
3
|
+
* voice dashboard").
|
|
4
|
+
*
|
|
5
|
+
* Studio frames voice mode's transcript with widgets. Each widget is a plugin that registers one section in the
|
|
6
|
+
* `voice-dashboard` panel slot, the same `panels[]` manifest shape as a run plugin's `run.details` sections. The
|
|
7
|
+
* built-in ones ship in studio's bundle; a person makes more with the metric-widget builder, and those are
|
|
8
|
+
* USER PLUGINS: declarative manifests (no code, nothing framed) that read one field of `GET /system` or
|
|
9
|
+
* `GET /diagnostics` and show it as a number or a chart. This store keeps, per actor id, which widgets are on the
|
|
10
|
+
* dashboard in which order (`layout`) and the user plugins that person made (`widgets`).
|
|
11
|
+
*
|
|
12
|
+
* ONE file, `<state home>/daemon-voice-dashboard.json`, under the `daemon-` prefix the state-home fence already
|
|
13
|
+
* classifies (as `daemon-editors.json`). Written whole through a temp file and a rename.
|
|
14
|
+
*/
|
|
15
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
16
|
+
import { dirname, join } from 'node:path';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
export const VOICE_DASHBOARD_FILENAME = 'daemon-voice-dashboard.json';
|
|
19
|
+
export const VOICE_DASHBOARD_SLOT = 'voice-dashboard';
|
|
20
|
+
export const VOICE_DASHBOARD_MAX_LAYOUT = 24;
|
|
21
|
+
export const VOICE_DASHBOARD_MAX_WIDGETS = 16;
|
|
22
|
+
const plainTitle = z.string().trim().min(1).max(40).refine((s) => !/[\r\n<>]/u.test(s), 'no line breaks or angle brackets');
|
|
23
|
+
/** A field path into the source's JSON: `infra[key=load].details.load1`, `runs.length`, `toReview`. */
|
|
24
|
+
export const METRIC_PATH = /^[A-Za-z_][A-Za-z0-9_]*(?:\[[A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_.:-]{1,64}\])?(?:\.[A-Za-z_][A-Za-z0-9_]*(?:\[[A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_.:-]{1,64}\])?){0,7}$/u;
|
|
25
|
+
export const VoicePanelDeclSchema = z.object({
|
|
26
|
+
slot: z.literal(VOICE_DASHBOARD_SLOT),
|
|
27
|
+
id: z.string().regex(/^[a-z][a-z0-9-]{0,31}$/u),
|
|
28
|
+
title: plainTitle,
|
|
29
|
+
order: z.number().int().min(1).max(99),
|
|
30
|
+
}).strict();
|
|
31
|
+
/** A user-made metric widget: a declarative plugin manifest (api-types `VoiceWidgetManifest`). */
|
|
32
|
+
export const VoiceWidgetManifestSchema = z.object({
|
|
33
|
+
id: z.string().regex(/^user\.[a-z0-9][a-z0-9-]{0,39}$/u, 'a user widget id is `user.<slug>`'),
|
|
34
|
+
title: plainTitle,
|
|
35
|
+
version: z.literal(1),
|
|
36
|
+
kind: z.literal('metric'),
|
|
37
|
+
panels: z.array(VoicePanelDeclSchema).length(1),
|
|
38
|
+
metric: z.object({
|
|
39
|
+
source: z.enum(['system', 'diagnostics']),
|
|
40
|
+
path: z.string().max(160).regex(METRIC_PATH, 'a field path like `infra[key=load].details.load1`'),
|
|
41
|
+
display: z.enum(['number', 'chart']),
|
|
42
|
+
unit: z.string().trim().max(12).optional(),
|
|
43
|
+
}).strict(),
|
|
44
|
+
createdAt: z.string().max(40).optional(),
|
|
45
|
+
}).strict();
|
|
46
|
+
const LAYOUT_ID = /^(?:builtin|user)\.[a-z0-9][a-z0-9-]{0,39}$/u;
|
|
47
|
+
export const PutVoiceDashboardSchema = z.object({
|
|
48
|
+
layout: z.array(z.string().regex(LAYOUT_ID)).max(VOICE_DASHBOARD_MAX_LAYOUT),
|
|
49
|
+
widgets: z.array(VoiceWidgetManifestSchema).max(VOICE_DASHBOARD_MAX_WIDGETS),
|
|
50
|
+
}).strict().refine((b) => new Set(b.widgets.map((w) => w.id)).size === b.widgets.length, { message: 'two user widgets share an id', path: ['widgets'] }).refine((b) => new Set(b.layout).size === b.layout.length, { message: 'a widget is on the layout twice', path: ['layout'] }).refine((b) => b.layout.every((id) => id.startsWith('builtin.') || b.widgets.some((w) => w.id === id)), { message: 'the layout names a user widget that is not in `widgets`', path: ['layout'] });
|
|
51
|
+
export class VoiceDashboardStore {
|
|
52
|
+
path;
|
|
53
|
+
constructor(path) {
|
|
54
|
+
this.path = path;
|
|
55
|
+
}
|
|
56
|
+
static under(stateHome) {
|
|
57
|
+
return new VoiceDashboardStore(join(stateHome, VOICE_DASHBOARD_FILENAME));
|
|
58
|
+
}
|
|
59
|
+
read() {
|
|
60
|
+
if (!existsSync(this.path))
|
|
61
|
+
return { version: 1, byActor: {} };
|
|
62
|
+
try {
|
|
63
|
+
const raw = JSON.parse(readFileSync(this.path, 'utf8'));
|
|
64
|
+
const byActor = {};
|
|
65
|
+
for (const [actor, v] of Object.entries(raw.byActor ?? {})) {
|
|
66
|
+
// A record that no longer validates is dropped whole, never half-read.
|
|
67
|
+
const ok = PutVoiceDashboardSchema.safeParse({ layout: v?.layout, widgets: v?.widgets });
|
|
68
|
+
if (ok.success)
|
|
69
|
+
byActor[actor] = { ...ok.data, updatedAt: typeof v?.updatedAt === 'string' ? v.updatedAt : new Date(0).toISOString() };
|
|
70
|
+
}
|
|
71
|
+
return { version: 1, byActor };
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return { version: 1, byActor: {} };
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
get(actorId) {
|
|
78
|
+
const mine = this.read().byActor[actorId];
|
|
79
|
+
return mine === undefined ? { layout: null, widgets: [], updatedAt: null } : { layout: mine.layout, widgets: mine.widgets, updatedAt: mine.updatedAt };
|
|
80
|
+
}
|
|
81
|
+
put(actorId, body) {
|
|
82
|
+
const file = this.read();
|
|
83
|
+
const updatedAt = new Date().toISOString();
|
|
84
|
+
file.byActor[actorId] = { layout: body.layout, widgets: body.widgets, updatedAt };
|
|
85
|
+
mkdirSync(dirname(this.path), { recursive: true });
|
|
86
|
+
const tmp = `${this.path}.tmp-${process.pid}`;
|
|
87
|
+
writeFileSync(tmp, `${JSON.stringify(file, null, 2)}\n`);
|
|
88
|
+
renameSync(tmp, this.path);
|
|
89
|
+
return { layout: body.layout, widgets: body.widgets, updatedAt };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/voice/dashboard.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,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IACzJ,CAAC;IAED,GAAG,CAAC,OAAe,EAAE,IAA2B;QAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC;QAClF,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACnD,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC;QAC9C,aAAa,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACzD,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which operator notes were SPOKEN (program DES-VOICE §3 "Talking to a running job"; api-types 0.161.0).
|
|
3
|
+
*
|
|
4
|
+
* Studio's voice mode sends a confirmed spoken steer through the same `POST /runs/:id/inject` as a typed one, with
|
|
5
|
+
* `input: "voice"`. The engine's `workerMessageQueued` / `workerMessageInjected` frames carry the message and target
|
|
6
|
+
* but not how it was given, so crew remembers each spoken SEND (an occurrence: run, message, target, when) and stamps
|
|
7
|
+
* `input: "voice"` on the frames that send produced: on `/ws` as they pass, and on `GET /runs/:id/events` for a page
|
|
8
|
+
* that reloads. The thread then says "You (by voice)". The label grants nothing; the audit line (`run.injected`)
|
|
9
|
+
* carries it too.
|
|
10
|
+
*
|
|
11
|
+
* One occurrence stamps at most one queued frame and one injected frame, the first of each with its message and
|
|
12
|
+
* target at or after it was sent (the injected frame ends it). So a typed note with the same words, sent before or
|
|
13
|
+
* after, is never labelled voice (xreview on crew#1242).
|
|
14
|
+
*
|
|
15
|
+
* In memory and bounded (at most {@link PER_RUN} spoken sends per run, {@link RUNS} runs, oldest dropped): a note
|
|
16
|
+
* spoken before the daemon restarted reads as typed on the thread, and its audit line still says voice. Only a send the
|
|
17
|
+
* engine took counts toward the bounds ({@link VoiceInjectInputs.settle}); a refused one is forgotten and evicts nothing.
|
|
18
|
+
*/
|
|
19
|
+
export declare const PER_RUN = 32;
|
|
20
|
+
export declare const RUNS = 256;
|
|
21
|
+
/** How far a recorded frame's capture time may sit before the send it belongs to (clock and capture skew, ms). */
|
|
22
|
+
export declare const SKEW_MS = 2000;
|
|
23
|
+
export declare class VoiceInjectInputs {
|
|
24
|
+
private readonly now;
|
|
25
|
+
/** run id → its spoken sends, oldest first. Map order is insertion order: the first key is the oldest run. */
|
|
26
|
+
private readonly runs;
|
|
27
|
+
private next;
|
|
28
|
+
constructor(now?: () => number);
|
|
29
|
+
/**
|
|
30
|
+
* A note is being sent by voice to `runId` (before the engine call: its queued frame can arrive first). Nothing is
|
|
31
|
+
* evicted yet: {@link settle} once the engine took it, {@link forget} if it refused.
|
|
32
|
+
*/
|
|
33
|
+
remember(runId: string, message: string, target?: string): number;
|
|
34
|
+
/** The engine took the send: the run becomes the newest, and the oldest sends and runs past the bounds go. */
|
|
35
|
+
settle(runId: string): void;
|
|
36
|
+
/** The engine refused the send: it never happened, so it stamps nothing and evicted nothing. */
|
|
37
|
+
forget(runId: string, token: number): void;
|
|
38
|
+
/** A live frame: stamped when it is the next unstamped frame of a spoken send. */
|
|
39
|
+
stamp<E extends {
|
|
40
|
+
type: string;
|
|
41
|
+
}>(event: E): E;
|
|
42
|
+
/**
|
|
43
|
+
* A run's recorded history (`GET /runs/:id/events`), in capture order: each spoken send claims the first queued and
|
|
44
|
+
* the first injected frame with its message and target captured at or after it was sent. Pure over the history: the
|
|
45
|
+
* live claims are not touched, and the same history always reads the same.
|
|
46
|
+
*/
|
|
47
|
+
stampHistory<E extends {
|
|
48
|
+
type: string;
|
|
49
|
+
}>(runId: string, events: readonly E[]): E[];
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=inject-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-input.d.ts","sourceRoot":"","sources":["../../src/voice/inject-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,eAAO,MAAM,IAAI,MAAM,CAAC;AACxB,kHAAkH;AAClH,eAAO,MAAM,OAAO,OAAQ,CAAC;AAiB7B,qBAAa,iBAAiB;IAKhB,OAAO,CAAC,QAAQ,CAAC,GAAG;IAJhC,8GAA8G;IAC9G,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmC;IACxD,OAAO,CAAC,IAAI,CAAK;gBAEY,GAAG,GAAE,MAAM,MAAyB;IAEjE;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAQ,GAAG,MAAM;IAQhE,8GAA8G;IAC9G,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAa3B,gGAAgG;IAChG,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ1C,kFAAkF;IAClF,KAAK,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC;IAW9C;;;;OAIG;IACH,YAAY,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE;CA2BnF"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which operator notes were SPOKEN (program DES-VOICE §3 "Talking to a running job"; api-types 0.161.0).
|
|
3
|
+
*
|
|
4
|
+
* Studio's voice mode sends a confirmed spoken steer through the same `POST /runs/:id/inject` as a typed one, with
|
|
5
|
+
* `input: "voice"`. The engine's `workerMessageQueued` / `workerMessageInjected` frames carry the message and target
|
|
6
|
+
* but not how it was given, so crew remembers each spoken SEND (an occurrence: run, message, target, when) and stamps
|
|
7
|
+
* `input: "voice"` on the frames that send produced: on `/ws` as they pass, and on `GET /runs/:id/events` for a page
|
|
8
|
+
* that reloads. The thread then says "You (by voice)". The label grants nothing; the audit line (`run.injected`)
|
|
9
|
+
* carries it too.
|
|
10
|
+
*
|
|
11
|
+
* One occurrence stamps at most one queued frame and one injected frame, the first of each with its message and
|
|
12
|
+
* target at or after it was sent (the injected frame ends it). So a typed note with the same words, sent before or
|
|
13
|
+
* after, is never labelled voice (xreview on crew#1242).
|
|
14
|
+
*
|
|
15
|
+
* In memory and bounded (at most {@link PER_RUN} spoken sends per run, {@link RUNS} runs, oldest dropped): a note
|
|
16
|
+
* spoken before the daemon restarted reads as typed on the thread, and its audit line still says voice. Only a send the
|
|
17
|
+
* engine took counts toward the bounds ({@link VoiceInjectInputs.settle}); a refused one is forgotten and evicts nothing.
|
|
18
|
+
*/
|
|
19
|
+
export const PER_RUN = 32;
|
|
20
|
+
export const RUNS = 256;
|
|
21
|
+
/** How far a recorded frame's capture time may sit before the send it belongs to (clock and capture skew, ms). */
|
|
22
|
+
export const SKEW_MS = 2_000;
|
|
23
|
+
const QUEUED = 'workerMessageQueued';
|
|
24
|
+
const INJECTED = 'workerMessageInjected';
|
|
25
|
+
export class VoiceInjectInputs {
|
|
26
|
+
now;
|
|
27
|
+
/** run id → its spoken sends, oldest first. Map order is insertion order: the first key is the oldest run. */
|
|
28
|
+
runs = new Map();
|
|
29
|
+
next = 1;
|
|
30
|
+
constructor(now = () => Date.now()) {
|
|
31
|
+
this.now = now;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A note is being sent by voice to `runId` (before the engine call: its queued frame can arrive first). Nothing is
|
|
35
|
+
* evicted yet: {@link settle} once the engine took it, {@link forget} if it refused.
|
|
36
|
+
*/
|
|
37
|
+
remember(runId, message, target = 'all') {
|
|
38
|
+
const id = this.next++;
|
|
39
|
+
const list = this.runs.get(runId) ?? [];
|
|
40
|
+
list.push({ id, message, target, at: this.now(), queued: false, injected: false });
|
|
41
|
+
if (!this.runs.has(runId))
|
|
42
|
+
this.runs.set(runId, list);
|
|
43
|
+
return id;
|
|
44
|
+
}
|
|
45
|
+
/** The engine took the send: the run becomes the newest, and the oldest sends and runs past the bounds go. */
|
|
46
|
+
settle(runId) {
|
|
47
|
+
const list = this.runs.get(runId);
|
|
48
|
+
if (list === undefined)
|
|
49
|
+
return;
|
|
50
|
+
this.runs.delete(runId);
|
|
51
|
+
this.runs.set(runId, list);
|
|
52
|
+
while (list.length > PER_RUN)
|
|
53
|
+
list.shift();
|
|
54
|
+
while (this.runs.size > RUNS) {
|
|
55
|
+
const oldest = this.runs.keys().next().value;
|
|
56
|
+
if (oldest === undefined || oldest === runId)
|
|
57
|
+
break;
|
|
58
|
+
this.runs.delete(oldest);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** The engine refused the send: it never happened, so it stamps nothing and evicted nothing. */
|
|
62
|
+
forget(runId, token) {
|
|
63
|
+
const list = this.runs.get(runId);
|
|
64
|
+
if (list === undefined)
|
|
65
|
+
return;
|
|
66
|
+
const i = list.findIndex((o) => o.id === token);
|
|
67
|
+
if (i >= 0)
|
|
68
|
+
list.splice(i, 1);
|
|
69
|
+
if (list.length === 0)
|
|
70
|
+
this.runs.delete(runId);
|
|
71
|
+
}
|
|
72
|
+
/** A live frame: stamped when it is the next unstamped frame of a spoken send. */
|
|
73
|
+
stamp(event) {
|
|
74
|
+
const f = event;
|
|
75
|
+
if ((f.type !== QUEUED && f.type !== INJECTED) || f.input !== undefined || typeof f.session !== 'string' || typeof f.message !== 'string')
|
|
76
|
+
return event;
|
|
77
|
+
const target = typeof f.target === 'string' ? f.target : 'all';
|
|
78
|
+
const o = this.runs.get(f.session)?.find((x) => !x.injected && x.message === f.message && x.target === target && (f.type === INJECTED || !x.queued));
|
|
79
|
+
if (o === undefined)
|
|
80
|
+
return event;
|
|
81
|
+
if (f.type === QUEUED)
|
|
82
|
+
o.queued = true;
|
|
83
|
+
else
|
|
84
|
+
o.injected = true;
|
|
85
|
+
return { ...event, input: 'voice' };
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A run's recorded history (`GET /runs/:id/events`), in capture order: each spoken send claims the first queued and
|
|
89
|
+
* the first injected frame with its message and target captured at or after it was sent. Pure over the history: the
|
|
90
|
+
* live claims are not touched, and the same history always reads the same.
|
|
91
|
+
*/
|
|
92
|
+
stampHistory(runId, events) {
|
|
93
|
+
const sends = this.runs.get(runId);
|
|
94
|
+
if (sends === undefined || sends.length === 0)
|
|
95
|
+
return [...events];
|
|
96
|
+
const claimed = new Set();
|
|
97
|
+
const stampAt = new Set();
|
|
98
|
+
for (const o of sends) {
|
|
99
|
+
let queuedDone = false;
|
|
100
|
+
for (let i = 0; i < events.length; i++) {
|
|
101
|
+
if (claimed.has(i))
|
|
102
|
+
continue;
|
|
103
|
+
const f = events[i];
|
|
104
|
+
if ((f.type !== QUEUED && f.type !== INJECTED) || f.message !== o.message)
|
|
105
|
+
continue;
|
|
106
|
+
if ((typeof f.target === 'string' ? f.target : 'all') !== o.target)
|
|
107
|
+
continue;
|
|
108
|
+
if (typeof f.ts === 'number' && f.ts < o.at - SKEW_MS)
|
|
109
|
+
continue;
|
|
110
|
+
if (f.type === QUEUED) {
|
|
111
|
+
if (queuedDone)
|
|
112
|
+
continue;
|
|
113
|
+
queuedDone = true;
|
|
114
|
+
claimed.add(i);
|
|
115
|
+
stampAt.add(i);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
claimed.add(i);
|
|
119
|
+
stampAt.add(i);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return events.map((e, i) => (stampAt.has(i) && e.input === undefined ? { ...e, input: 'voice' } : e));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=inject-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-input.js","sourceRoot":"","sources":["../../src/voice/inject-input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAC1B,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAC;AACxB,kHAAkH;AAClH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC;AAE7B,MAAM,MAAM,GAAG,qBAAqB,CAAC;AACrC,MAAM,QAAQ,GAAG,uBAAuB,CAAC;AAczC,MAAM,OAAO,iBAAiB;IAKC;IAJ7B,8GAA8G;IAC7F,IAAI,GAAG,IAAI,GAAG,EAAwB,CAAC;IAChD,IAAI,GAAG,CAAC,CAAC;IAEjB,YAA6B,MAAoB,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;QAApC,QAAG,GAAH,GAAG,CAAiC;IAAG,CAAC;IAErE;;;OAGG;IACH,QAAQ,CAAC,KAAa,EAAE,OAAe,EAAE,MAAM,GAAG,KAAK;QACrD,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE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