@agentdeck/shared 0.1.0 → 0.2.3
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/LICENSE +21 -0
- package/dist/adapter.d.ts +18 -3
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +62 -0
- package/dist/adapter.js.map +1 -1
- package/dist/command-builders.d.ts +35 -0
- package/dist/command-builders.d.ts.map +1 -0
- package/dist/command-builders.js +75 -0
- package/dist/command-builders.js.map +1 -0
- package/dist/connection-status.d.ts +42 -0
- package/dist/connection-status.d.ts.map +1 -0
- package/dist/connection-status.js +52 -0
- package/dist/connection-status.js.map +1 -0
- package/dist/d200h-layout.d.ts +131 -0
- package/dist/d200h-layout.d.ts.map +1 -0
- package/dist/d200h-layout.js +627 -0
- package/dist/d200h-layout.js.map +1 -0
- package/dist/design-tokens.d.ts +259 -0
- package/dist/design-tokens.d.ts.map +1 -0
- package/dist/design-tokens.js +156 -0
- package/dist/design-tokens.js.map +1 -0
- package/dist/eval-schema.d.ts +235 -0
- package/dist/eval-schema.d.ts.map +1 -0
- package/dist/eval-schema.js +23 -0
- package/dist/eval-schema.js.map +1 -0
- package/dist/format-utils.d.ts +52 -0
- package/dist/format-utils.d.ts.map +1 -0
- package/dist/format-utils.js +165 -0
- package/dist/format-utils.js.map +1 -0
- package/dist/gateway-protocol.d.ts +391 -0
- package/dist/gateway-protocol.d.ts.map +1 -0
- package/dist/gateway-protocol.js +19 -0
- package/dist/gateway-protocol.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/llm-settings.d.ts +52 -0
- package/dist/llm-settings.d.ts.map +1 -0
- package/dist/llm-settings.js +118 -0
- package/dist/llm-settings.js.map +1 -0
- package/dist/net-utils.d.ts +2 -1
- package/dist/net-utils.d.ts.map +1 -1
- package/dist/net-utils.js +100 -3
- package/dist/net-utils.js.map +1 -1
- package/dist/pricing.d.ts +45 -0
- package/dist/pricing.d.ts.map +1 -0
- package/dist/pricing.js +93 -0
- package/dist/pricing.js.map +1 -0
- package/dist/protocol.d.ts +496 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +30 -1
- package/dist/protocol.js.map +1 -1
- package/dist/sample.d.ts +152 -0
- package/dist/sample.d.ts.map +1 -0
- package/dist/sample.js +22 -0
- package/dist/sample.js.map +1 -0
- package/dist/session-utils.d.ts +142 -0
- package/dist/session-utils.d.ts.map +1 -0
- package/dist/session-utils.js +304 -0
- package/dist/session-utils.js.map +1 -0
- package/dist/state-colors.d.ts +16 -0
- package/dist/state-colors.d.ts.map +1 -0
- package/dist/state-colors.js +48 -0
- package/dist/state-colors.js.map +1 -0
- package/dist/states.d.ts +2 -0
- package/dist/states.d.ts.map +1 -1
- package/dist/states.js +6 -1
- package/dist/states.js.map +1 -1
- package/dist/svg-renderers/agent-logos.d.ts +45 -0
- package/dist/svg-renderers/agent-logos.d.ts.map +1 -0
- package/dist/svg-renderers/agent-logos.js +238 -0
- package/dist/svg-renderers/agent-logos.js.map +1 -0
- package/dist/svg-renderers/index.d.ts +4 -0
- package/dist/svg-renderers/index.d.ts.map +1 -0
- package/dist/svg-renderers/index.js +4 -0
- package/dist/svg-renderers/index.js.map +1 -0
- package/dist/svg-renderers/session-slot-renderer.d.ts +78 -0
- package/dist/svg-renderers/session-slot-renderer.d.ts.map +1 -0
- package/dist/svg-renderers/session-slot-renderer.js +506 -0
- package/dist/svg-renderers/session-slot-renderer.js.map +1 -0
- package/dist/svg-renderers/text-utils.d.ts +29 -0
- package/dist/svg-renderers/text-utils.d.ts.map +1 -0
- package/dist/svg-renderers/text-utils.js +122 -0
- package/dist/svg-renderers/text-utils.js.map +1 -0
- package/dist/telemetry-envelope.d.ts +108 -0
- package/dist/telemetry-envelope.d.ts.map +1 -0
- package/dist/telemetry-envelope.js +34 -0
- package/dist/telemetry-envelope.js.map +1 -0
- package/dist/timeline-icons.d.ts +70 -0
- package/dist/timeline-icons.d.ts.map +1 -0
- package/dist/timeline-icons.js +161 -0
- package/dist/timeline-icons.js.map +1 -0
- package/dist/timeline-label.d.ts +38 -0
- package/dist/timeline-label.d.ts.map +1 -0
- package/dist/timeline-label.js +95 -0
- package/dist/timeline-label.js.map +1 -0
- package/dist/timeline-markdown.d.ts +80 -0
- package/dist/timeline-markdown.d.ts.map +1 -0
- package/dist/timeline-markdown.js +221 -0
- package/dist/timeline-markdown.js.map +1 -0
- package/dist/timeline-summarizer.d.ts +37 -0
- package/dist/timeline-summarizer.d.ts.map +1 -0
- package/dist/timeline-summarizer.js +125 -0
- package/dist/timeline-summarizer.js.map +1 -0
- package/dist/timeline.d.ts +135 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +633 -0
- package/dist/timeline.js.map +1 -0
- package/dist/voice-paths.d.ts +4 -0
- package/dist/voice-paths.d.ts.map +1 -1
- package/dist/voice-paths.js +5 -0
- package/dist/voice-paths.js.map +1 -1
- package/package.json +9 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 SerendipityBound
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/adapter.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import type { Server } from 'http';
|
|
3
3
|
import type { PluginCommand } from './protocol.js';
|
|
4
|
-
|
|
4
|
+
import type { TimelineEntry } from './timeline.js';
|
|
5
|
+
export type AgentType = 'claude-code' | 'openclaw' | 'codex-cli' | 'codex-app' | 'opencode' | 'antigravity' | 'monitor';
|
|
5
6
|
export interface AgentCapabilities {
|
|
6
7
|
type: AgentType;
|
|
7
8
|
displayName: string;
|
|
@@ -45,7 +46,7 @@ export interface AdapterParserEvent {
|
|
|
45
46
|
/** Metadata update (cursor, usage, user prompt, model catalog — no state transition) */
|
|
46
47
|
export interface AdapterMetadataEvent {
|
|
47
48
|
source: 'metadata';
|
|
48
|
-
event: 'cursor_update' | 'usage_info' | 'user_prompt' | 'model_catalog';
|
|
49
|
+
event: 'cursor_update' | 'usage_info' | 'user_prompt' | 'model_catalog' | 'gateway_health';
|
|
49
50
|
data: Record<string, unknown>;
|
|
50
51
|
}
|
|
51
52
|
/** Activity signal — resets stuck timer */
|
|
@@ -57,7 +58,14 @@ export interface AdapterConnectionEvent {
|
|
|
57
58
|
source: 'connection';
|
|
58
59
|
status: 'connected' | 'disconnected';
|
|
59
60
|
}
|
|
60
|
-
|
|
61
|
+
/** Timeline event (OpenClaw rich events for Android relay) */
|
|
62
|
+
export interface AdapterTimelineEvent {
|
|
63
|
+
source: 'timeline';
|
|
64
|
+
entry: TimelineEntry;
|
|
65
|
+
/** If true, update existing entry with same ts+type instead of adding new */
|
|
66
|
+
upsert?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export type AdapterEvent = AdapterHookEvent | AdapterParserEvent | AdapterMetadataEvent | AdapterActivityEvent | AdapterConnectionEvent | AdapterTimelineEvent;
|
|
61
69
|
/**
|
|
62
70
|
* Agent adapter interface.
|
|
63
71
|
*
|
|
@@ -122,6 +130,13 @@ export interface AgentAdapterEvents {
|
|
|
122
130
|
}
|
|
123
131
|
export declare const CLAUDE_CODE_CAPABILITIES: AgentCapabilities;
|
|
124
132
|
export declare const OPENCLAW_CAPABILITIES: AgentCapabilities;
|
|
133
|
+
export declare const MONITOR_CAPABILITIES: AgentCapabilities;
|
|
134
|
+
export declare const CODEX_CLI_CAPABILITIES: AgentCapabilities;
|
|
135
|
+
export declare const CODEX_APP_CAPABILITIES: AgentCapabilities;
|
|
136
|
+
export declare const OPENCODE_CAPABILITIES: AgentCapabilities;
|
|
137
|
+
export declare const ANTIGRAVITY_CAPABILITIES: AgentCapabilities;
|
|
125
138
|
/** Default OpenClaw Gateway port */
|
|
126
139
|
export declare const OPENCLAW_GATEWAY_PORT = 18789;
|
|
140
|
+
/** Default OpenCode server port (0 = random) */
|
|
141
|
+
export declare const OPENCODE_DEFAULT_PORT = 0;
|
|
127
142
|
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d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 export const OPENCLAW_CAPABILITIES = {
|
|
|
23
23
|
hasApiUsage: false,
|
|
24
24
|
hasModelCatalog: true,
|
|
25
25
|
};
|
|
26
|
+
export const MONITOR_CAPABILITIES = {
|
|
27
|
+
type: 'monitor',
|
|
28
|
+
displayName: 'Monitor',
|
|
29
|
+
hasTerminal: false,
|
|
30
|
+
hasModeSwitching: false,
|
|
31
|
+
hasDiffReview: false,
|
|
32
|
+
hasOptionLists: false,
|
|
33
|
+
hasNavigablePrompts: false,
|
|
34
|
+
hasSuggestedPrompts: false,
|
|
35
|
+
hasApiUsage: true,
|
|
36
|
+
hasModelCatalog: false,
|
|
37
|
+
};
|
|
38
|
+
export const CODEX_CLI_CAPABILITIES = {
|
|
39
|
+
type: 'codex-cli',
|
|
40
|
+
displayName: 'Codex CLI',
|
|
41
|
+
hasTerminal: true,
|
|
42
|
+
hasModeSwitching: false,
|
|
43
|
+
hasDiffReview: false,
|
|
44
|
+
hasOptionLists: true,
|
|
45
|
+
hasNavigablePrompts: false,
|
|
46
|
+
hasSuggestedPrompts: false,
|
|
47
|
+
hasApiUsage: false,
|
|
48
|
+
hasModelCatalog: false,
|
|
49
|
+
};
|
|
50
|
+
export const CODEX_APP_CAPABILITIES = {
|
|
51
|
+
type: 'codex-app',
|
|
52
|
+
displayName: 'Codex App',
|
|
53
|
+
hasTerminal: false,
|
|
54
|
+
hasModeSwitching: false,
|
|
55
|
+
hasDiffReview: false,
|
|
56
|
+
hasOptionLists: false,
|
|
57
|
+
hasNavigablePrompts: false,
|
|
58
|
+
hasSuggestedPrompts: false,
|
|
59
|
+
hasApiUsage: false,
|
|
60
|
+
hasModelCatalog: false,
|
|
61
|
+
};
|
|
62
|
+
export const OPENCODE_CAPABILITIES = {
|
|
63
|
+
type: 'opencode',
|
|
64
|
+
displayName: 'OpenCode',
|
|
65
|
+
hasTerminal: true,
|
|
66
|
+
hasModeSwitching: false,
|
|
67
|
+
hasDiffReview: false,
|
|
68
|
+
hasOptionLists: true,
|
|
69
|
+
hasNavigablePrompts: false,
|
|
70
|
+
hasSuggestedPrompts: false,
|
|
71
|
+
hasApiUsage: false,
|
|
72
|
+
hasModelCatalog: false,
|
|
73
|
+
};
|
|
74
|
+
export const ANTIGRAVITY_CAPABILITIES = {
|
|
75
|
+
type: 'antigravity',
|
|
76
|
+
displayName: 'Antigravity',
|
|
77
|
+
hasTerminal: false,
|
|
78
|
+
hasModeSwitching: false,
|
|
79
|
+
hasDiffReview: false,
|
|
80
|
+
hasOptionLists: false,
|
|
81
|
+
hasNavigablePrompts: false,
|
|
82
|
+
hasSuggestedPrompts: false,
|
|
83
|
+
hasApiUsage: false,
|
|
84
|
+
hasModelCatalog: false,
|
|
85
|
+
};
|
|
26
86
|
/** Default OpenClaw Gateway port */
|
|
27
87
|
export const OPENCLAW_GATEWAY_PORT = 18789;
|
|
88
|
+
/** Default OpenCode server port (0 = random) */
|
|
89
|
+
export const OPENCODE_DEFAULT_PORT = 0;
|
|
28
90
|
//# sourceMappingURL=adapter.js.map
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AA2KA,6CAA6C;AAE7C,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACzD,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,IAAI;IACjB,gBAAgB,EAAE,IAAI;IACtB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAA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gB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,KAAK;IAC1B,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACzD,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,KAAK;IAClB,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,KAAK;IACrB,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,KAAK;IAC1B,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,oCAAoC;AACpC,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAE3C,gDAAgD;AAChD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ResponseCommand, SelectOptionCommand, NavigateOptionCommand, SendPromptCommand, SwitchModeCommand, InterruptCommand, EscapeCommand, VoiceCommand, QueryUsageCommand, QuerySessionTimelineCommand, DiagCommand, UtilityCommand, SwitchAgentCommand, FocusSessionCommand, ClearSessionFocusCommand, SessionCommand, ClientRegisterCommand, ApmeVibeFeedbackCommand, ApmeRecommendCommand, PermissionDecisionCommand, Esp32OtaAckCommand, Esp32OtaErrorCommand } from "./protocol.js";
|
|
2
|
+
export declare const agentCommand: {
|
|
3
|
+
readonly respond: (value: string) => ResponseCommand;
|
|
4
|
+
readonly selectOption: (index: number, sessionId?: string) => SelectOptionCommand;
|
|
5
|
+
readonly navigateOption: (direction: "up" | "down") => NavigateOptionCommand;
|
|
6
|
+
readonly sendPrompt: (text: string) => SendPromptCommand;
|
|
7
|
+
readonly switchMode: (mode?: "plan" | "acceptEdits" | "default") => SwitchModeCommand;
|
|
8
|
+
readonly interrupt: () => InterruptCommand;
|
|
9
|
+
readonly escape: () => EscapeCommand;
|
|
10
|
+
readonly voice: (action: "start" | "stop" | "cancel") => VoiceCommand;
|
|
11
|
+
readonly queryUsage: () => QueryUsageCommand;
|
|
12
|
+
readonly querySessionTimeline: (sessionId: string) => QuerySessionTimelineCommand;
|
|
13
|
+
readonly diag: (action: "dump" | "analyze") => DiagCommand;
|
|
14
|
+
readonly utility: (action: "adjust_volume" | "toggle_mute" | "adjust_brightness" | "media_play_pause" | "media_next" | "media_prev", value?: number) => UtilityCommand;
|
|
15
|
+
readonly switchAgent: (agent: "openclaw" | "claude-code") => SwitchAgentCommand;
|
|
16
|
+
readonly focusSession: (sessionId: string) => FocusSessionCommand;
|
|
17
|
+
readonly clearSessionFocus: () => ClearSessionFocusCommand;
|
|
18
|
+
readonly sessionCommand: (sessionId: string, command: {
|
|
19
|
+
type: string;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}) => SessionCommand;
|
|
22
|
+
readonly clientRegister: (clientType: string, clientLabel?: string, devices?: Array<{
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
family?: string;
|
|
26
|
+
columns?: number;
|
|
27
|
+
rows?: number;
|
|
28
|
+
}>) => ClientRegisterCommand;
|
|
29
|
+
readonly apmeVibe: (runId: string, verdict: "approve" | "reject" | "neutral", note?: string) => ApmeVibeFeedbackCommand;
|
|
30
|
+
readonly apmeRecommend: (taskKind?: string, budgetUsd?: number, latencyBudgetMs?: number, preferLocal?: boolean) => ApmeRecommendCommand;
|
|
31
|
+
readonly permissionDecision: (requestId: string, decision: "allow" | "deny") => PermissionDecisionCommand;
|
|
32
|
+
readonly esp32OtaAck: (otaId: string, stage: "begin" | "chunk" | "end" | "abort", seq?: number, offset?: number, written?: number) => Esp32OtaAckCommand;
|
|
33
|
+
readonly esp32OtaError: (error: string, otaId?: string, stage?: string) => Esp32OtaErrorCommand;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=command-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E,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;KAAE,CAAC,KAAG,qBAAqB;+BAGjK,MAAM,WAAW,SAAS,GAAG,QAAQ,GAAG,SAAS,SAAS,MAAM,KAAG,uBAAuB;wCAGjF,MAAM,cAAc,MAAM,oBAAoB,MAAM,gBAAgB,OAAO,KAAG,oBAAoB;6CAG7F,MAAM,YAAY,OAAO,GAAG,MAAM,KAAG,yBAAyB;kCAGzE,MAAM,SAAS,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,QAAQ,MAAM,WAAW,MAAM,YAAY,MAAM,KAAG,kBAAkB;oCAGtH,MAAM,UAAU,MAAM,UAAU,MAAM,KAAG,oBAAoB;CAG1E,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate-command-builders.mjs — DO NOT EDIT.
|
|
2
|
+
// Source of truth: shared/src/protocol.ts (PluginCommand union).
|
|
3
|
+
//
|
|
4
|
+
// TypeScript already has the typed discriminated union; this file provides
|
|
5
|
+
// matching factory helpers so callers in all three languages share the same
|
|
6
|
+
// API shape (`AgentCommand.respond(value)` / `agentCommand.respond(value)`).
|
|
7
|
+
export const agentCommand = {
|
|
8
|
+
respond(value) {
|
|
9
|
+
return { type: "respond", value };
|
|
10
|
+
},
|
|
11
|
+
selectOption(index, sessionId) {
|
|
12
|
+
return { type: "select_option", index, sessionId };
|
|
13
|
+
},
|
|
14
|
+
navigateOption(direction) {
|
|
15
|
+
return { type: "navigate_option", direction };
|
|
16
|
+
},
|
|
17
|
+
sendPrompt(text) {
|
|
18
|
+
return { type: "send_prompt", text };
|
|
19
|
+
},
|
|
20
|
+
switchMode(mode) {
|
|
21
|
+
return { type: "switch_mode", mode };
|
|
22
|
+
},
|
|
23
|
+
interrupt() {
|
|
24
|
+
return { type: "interrupt" };
|
|
25
|
+
},
|
|
26
|
+
escape() {
|
|
27
|
+
return { type: "escape" };
|
|
28
|
+
},
|
|
29
|
+
voice(action) {
|
|
30
|
+
return { type: "voice", action };
|
|
31
|
+
},
|
|
32
|
+
queryUsage() {
|
|
33
|
+
return { type: "query_usage" };
|
|
34
|
+
},
|
|
35
|
+
querySessionTimeline(sessionId) {
|
|
36
|
+
return { type: "query_session_timeline", sessionId };
|
|
37
|
+
},
|
|
38
|
+
diag(action) {
|
|
39
|
+
return { type: "diag", action };
|
|
40
|
+
},
|
|
41
|
+
utility(action, value) {
|
|
42
|
+
return { type: "utility", action, value };
|
|
43
|
+
},
|
|
44
|
+
switchAgent(agent) {
|
|
45
|
+
return { type: "switch_agent", agent };
|
|
46
|
+
},
|
|
47
|
+
focusSession(sessionId) {
|
|
48
|
+
return { type: "focus_session", sessionId };
|
|
49
|
+
},
|
|
50
|
+
clearSessionFocus() {
|
|
51
|
+
return { type: "clear_session_focus" };
|
|
52
|
+
},
|
|
53
|
+
sessionCommand(sessionId, command) {
|
|
54
|
+
return { type: "session_command", sessionId, command };
|
|
55
|
+
},
|
|
56
|
+
clientRegister(clientType, clientLabel, devices) {
|
|
57
|
+
return { type: "client_register", clientType, clientLabel, devices };
|
|
58
|
+
},
|
|
59
|
+
apmeVibe(runId, verdict, note) {
|
|
60
|
+
return { type: "apme_vibe", runId, verdict, note };
|
|
61
|
+
},
|
|
62
|
+
apmeRecommend(taskKind, budgetUsd, latencyBudgetMs, preferLocal) {
|
|
63
|
+
return { type: "apme_recommend", taskKind, budgetUsd, latencyBudgetMs, preferLocal };
|
|
64
|
+
},
|
|
65
|
+
permissionDecision(requestId, decision) {
|
|
66
|
+
return { type: "permission_decision", requestId, decision };
|
|
67
|
+
},
|
|
68
|
+
esp32OtaAck(otaId, stage, seq, offset, written) {
|
|
69
|
+
return { type: "esp32_ota_ack", otaId, stage, seq, offset, written };
|
|
70
|
+
},
|
|
71
|
+
esp32OtaError(error, otaId, stage) {
|
|
72
|
+
return { type: "esp32_ota_error", error, otaId, stage };
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=command-builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-builders.js","sourceRoot":"","sources":["../src/command-builders.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,iEAAiE;AACjE,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AA2B7E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,CAAC,KAAa;QACnB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACpC,CAAC;IACD,YAAY,CAAC,KAAa,EAAE,SAAkB;QAC5C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IACrD,CAAC;IACD,cAAc,CAAC,SAAwB;QACrC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,CAAC;IAChD,CAAC;IACD,UAAU,CAAC,IAAY;QACrB,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACvC,CAAC;IACD,UAAU,CAAC,IAAyC;QAClD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACvC,CAAC;IACD,SAAS;QACP,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC/B,CAAC;IACD,MAAM;QACJ,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC5B,CAAC;IACD,KAAK,CAAC,MAAmC;QACvC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IACnC,CAAC;IACD,UAAU;QACR,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IACjC,CAAC;IACD,oBAAoB,CAAC,SAAiB;QACpC,OAAO,EAAE,IAAI,EAAE,wBAAwB,EAAE,SAAS,EAAE,CAAC;IACvD,CAAC;I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KAAa,EAAE,KAA0C,EAAE,GAAY,EAAE,MAAe,EAAE,OAAgB;QACpH,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IACvE,CAAC;IACD,aAAa,CAAC,KAAa,EAAE,KAAc,EAAE,KAAc;QACzD,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC1D,CAAC;CACO,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connection-state lexicon — canonical user-facing copy for every surface's
|
|
3
|
+
* daemon-link status. SSOT for the words; per-platform mirrors must match.
|
|
4
|
+
*
|
|
5
|
+
* Two device classes, two vocabularies:
|
|
6
|
+
*
|
|
7
|
+
* 1. Self-connecting clients (Apple app, Android app, ESP32 WiFi panels, TUI)
|
|
8
|
+
* own their link to the daemon: they discover via mDNS, connect, and
|
|
9
|
+
* auto-reconnect. They surface the *phase* they are actually in:
|
|
10
|
+
* - SEARCHING "Searching for AgentDeck..." (mDNS discovery, no target yet)
|
|
11
|
+
* - CONNECTING "Connecting..." (attempt to a known address)
|
|
12
|
+
* - RECONNECTING "Reconnecting..." (established link lost, auto-retry)
|
|
13
|
+
* - NO_NETWORK "No WiFi" (ESP32 only — no link layer at all)
|
|
14
|
+
* Retry affordance (button): "Search Again". Empty-discovery hint:
|
|
15
|
+
* "No AgentDeck found on this network".
|
|
16
|
+
*
|
|
17
|
+
* 2. Daemon-rendered passive displays (Stream Deck keys/encoders, D200H,
|
|
18
|
+
* Pixoo, Timebox, iDotMatrix, TRMNL) are painted BY the daemon/plugin and
|
|
19
|
+
* cannot search on their own. When the link is down they show a single
|
|
20
|
+
* terminal state: "OFFLINE" (optionally with the "Open AgentDeck"
|
|
21
|
+
* call-to-action subtitle). They never claim Connecting/Reconnecting.
|
|
22
|
+
*
|
|
23
|
+
* Mirrors (update together — grep the literal when changing copy):
|
|
24
|
+
* - Swift: apple/AgentDeck/UI/Monitor/ConnectionOverlay.swift (ConnectionLexicon)
|
|
25
|
+
* - Kotlin: android/.../ui/common/ConnectionComponents.kt (ConnectionLexicon)
|
|
26
|
+
* - C++: esp32/src/ui/screens/aquarium.cpp + splash.cpp + main.cpp
|
|
27
|
+
*/
|
|
28
|
+
/** Daemon-link phase of a self-connecting client surface. */
|
|
29
|
+
export type DaemonLinkPhase = 'searching' | 'connecting' | 'reconnecting' | 'no_network' | 'connected';
|
|
30
|
+
/** Canonical labels for self-connecting clients (device class 1). */
|
|
31
|
+
export declare const DAEMON_LINK_LABELS: Record<DaemonLinkPhase, string>;
|
|
32
|
+
/** Compact variants for small panels (ESP32 overlays, tiny widgets). */
|
|
33
|
+
export declare const DAEMON_LINK_LABELS_COMPACT: Record<DaemonLinkPhase, string>;
|
|
34
|
+
/** Retry affordance (button label) after discovery/connect failure. */
|
|
35
|
+
export declare const SEARCH_AGAIN_LABEL = "Search Again";
|
|
36
|
+
/** Hint when mDNS discovery has run for a while with zero results. */
|
|
37
|
+
export declare const NOTHING_DISCOVERED_HINT = "No AgentDeck found on this network";
|
|
38
|
+
/** Terminal label for daemon-rendered passive displays (device class 2). */
|
|
39
|
+
export declare const PASSIVE_OFFLINE_LABEL = "OFFLINE";
|
|
40
|
+
/** Call-to-action subtitle paired with the passive OFFLINE card. */
|
|
41
|
+
export declare const OPEN_AGENTDECK_LABEL = "Open AgentDeck";
|
|
42
|
+
//# sourceMappingURL=connection-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-status.d.ts","sourceRoot":"","sources":["../src/connection-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,6DAA6D;AAC7D,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,WAAW,CAAC;AAEhB,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAM9D,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAMtE,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,uCAAuC,CAAC;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAE/C,oEAAoE;AACpE,eAAO,MAAM,oBAAoB,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connection-state lexicon — canonical user-facing copy for every surface's
|
|
3
|
+
* daemon-link status. SSOT for the words; per-platform mirrors must match.
|
|
4
|
+
*
|
|
5
|
+
* Two device classes, two vocabularies:
|
|
6
|
+
*
|
|
7
|
+
* 1. Self-connecting clients (Apple app, Android app, ESP32 WiFi panels, TUI)
|
|
8
|
+
* own their link to the daemon: they discover via mDNS, connect, and
|
|
9
|
+
* auto-reconnect. They surface the *phase* they are actually in:
|
|
10
|
+
* - SEARCHING "Searching for AgentDeck..." (mDNS discovery, no target yet)
|
|
11
|
+
* - CONNECTING "Connecting..." (attempt to a known address)
|
|
12
|
+
* - RECONNECTING "Reconnecting..." (established link lost, auto-retry)
|
|
13
|
+
* - NO_NETWORK "No WiFi" (ESP32 only — no link layer at all)
|
|
14
|
+
* Retry affordance (button): "Search Again". Empty-discovery hint:
|
|
15
|
+
* "No AgentDeck found on this network".
|
|
16
|
+
*
|
|
17
|
+
* 2. Daemon-rendered passive displays (Stream Deck keys/encoders, D200H,
|
|
18
|
+
* Pixoo, Timebox, iDotMatrix, TRMNL) are painted BY the daemon/plugin and
|
|
19
|
+
* cannot search on their own. When the link is down they show a single
|
|
20
|
+
* terminal state: "OFFLINE" (optionally with the "Open AgentDeck"
|
|
21
|
+
* call-to-action subtitle). They never claim Connecting/Reconnecting.
|
|
22
|
+
*
|
|
23
|
+
* Mirrors (update together — grep the literal when changing copy):
|
|
24
|
+
* - Swift: apple/AgentDeck/UI/Monitor/ConnectionOverlay.swift (ConnectionLexicon)
|
|
25
|
+
* - Kotlin: android/.../ui/common/ConnectionComponents.kt (ConnectionLexicon)
|
|
26
|
+
* - C++: esp32/src/ui/screens/aquarium.cpp + splash.cpp + main.cpp
|
|
27
|
+
*/
|
|
28
|
+
/** Canonical labels for self-connecting clients (device class 1). */
|
|
29
|
+
export const DAEMON_LINK_LABELS = {
|
|
30
|
+
searching: 'Searching for AgentDeck...',
|
|
31
|
+
connecting: 'Connecting...',
|
|
32
|
+
reconnecting: 'Reconnecting...',
|
|
33
|
+
no_network: 'No WiFi',
|
|
34
|
+
connected: 'Connected',
|
|
35
|
+
};
|
|
36
|
+
/** Compact variants for small panels (ESP32 overlays, tiny widgets). */
|
|
37
|
+
export const DAEMON_LINK_LABELS_COMPACT = {
|
|
38
|
+
searching: 'Searching...',
|
|
39
|
+
connecting: 'Connecting...',
|
|
40
|
+
reconnecting: 'Reconnecting...',
|
|
41
|
+
no_network: 'No WiFi',
|
|
42
|
+
connected: 'Connected',
|
|
43
|
+
};
|
|
44
|
+
/** Retry affordance (button label) after discovery/connect failure. */
|
|
45
|
+
export const SEARCH_AGAIN_LABEL = 'Search Again';
|
|
46
|
+
/** Hint when mDNS discovery has run for a while with zero results. */
|
|
47
|
+
export const NOTHING_DISCOVERED_HINT = 'No AgentDeck found on this network';
|
|
48
|
+
/** Terminal label for daemon-rendered passive displays (device class 2). */
|
|
49
|
+
export const PASSIVE_OFFLINE_LABEL = 'OFFLINE';
|
|
50
|
+
/** Call-to-action subtitle paired with the passive OFFLINE card. */
|
|
51
|
+
export const OPEN_AGENTDECK_LABEL = 'Open AgentDeck';
|
|
52
|
+
//# sourceMappingURL=connection-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-status.js","sourceRoot":"","sources":["../src/connection-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAUH,qEAAqE;AACrE,MAAM,CAAC,MAAM,kBAAkB,GAAoC;IACjE,SAAS,EAAE,4BAA4B;IACvC,UAAU,EAAE,eAAe;IAC3B,YAAY,EAAE,iBAAiB;IAC/B,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,0BAA0B,GAAoC;IACzE,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE,eAAe;IAC3B,YAAY,EAAE,iBAAiB;IAC/B,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD,sEAAsE;AACtE,MAAM,CAAC,MAAM,uBAAuB,GAAG,oCAAoC,CAAC;AAE5E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAE/C,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type PromptOption } from './states.js';
|
|
2
|
+
import type { SessionInfo, SubscriptionInfo, CodexRateLimits } from './protocol.js';
|
|
3
|
+
/** Command dispatched when a key is pressed. `null` = inert tile (info/empty). */
|
|
4
|
+
export type ButtonCommand = {
|
|
5
|
+
type: string;
|
|
6
|
+
[k: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export interface KeySlot {
|
|
9
|
+
col: number;
|
|
10
|
+
row: number;
|
|
11
|
+
svg: string;
|
|
12
|
+
label: string;
|
|
13
|
+
/** What pressing this key does. Single source of truth for input. */
|
|
14
|
+
command?: ButtonCommand | null;
|
|
15
|
+
}
|
|
16
|
+
/** 5 columns × 3 rows. Physical key index == row * GRID_COLS + col. */
|
|
17
|
+
export declare const GRID_COLS = 5;
|
|
18
|
+
export interface DashState {
|
|
19
|
+
state: string;
|
|
20
|
+
projectName: string;
|
|
21
|
+
modelName: string;
|
|
22
|
+
mode: string;
|
|
23
|
+
agentType: string;
|
|
24
|
+
fiveHourPercent: number;
|
|
25
|
+
sevenDayPercent: number;
|
|
26
|
+
totalTokens: number;
|
|
27
|
+
totalCost: number;
|
|
28
|
+
options: PromptOption[];
|
|
29
|
+
currentTool: string;
|
|
30
|
+
allSessions: SessionInfo[];
|
|
31
|
+
/** Live PTY option cursor is navigable (❯) — drives select_option vs respond. */
|
|
32
|
+
navigable?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* True when the 5H/7D quota is actually known (subscription data present), so a
|
|
35
|
+
* read-only surface can distinguish "0% used" from "no data" instead of drawing
|
|
36
|
+
* a confident empty gauge. Absent/false on surfaces that don't supply it.
|
|
37
|
+
*/
|
|
38
|
+
usageKnown?: boolean;
|
|
39
|
+
/** ISO timestamp when the 5-hour quota window resets (for a countdown). */
|
|
40
|
+
fiveHourResetsAt?: string;
|
|
41
|
+
/** ISO timestamp when the 7-day quota window resets (for a countdown). */
|
|
42
|
+
sevenDayResetsAt?: string;
|
|
43
|
+
/** Active subscriptions (Claude / ChatGPT plan) with optional expiry. */
|
|
44
|
+
subscriptions?: SubscriptionInfo[];
|
|
45
|
+
/**
|
|
46
|
+
* Codex (ChatGPT) rolling-window usage parsed from local rollout files.
|
|
47
|
+
* `primary` ≈ the 5h window, `secondary` ≈ the weekly window — mirrors the
|
|
48
|
+
* Claude 5H/7D gauges. Absent when the user runs no Codex session.
|
|
49
|
+
*/
|
|
50
|
+
codexRateLimits?: CodexRateLimits;
|
|
51
|
+
}
|
|
52
|
+
export declare function parseState(evt: any): DashState;
|
|
53
|
+
export declare function renderUsageButton(label: string, percent: number, color: string, known?: boolean): string;
|
|
54
|
+
/** Wide merged slot (3_2) — 288×144 SVG. Two columns: 5H | 7D. Direct-HID only. */
|
|
55
|
+
export declare function renderUsageWideSlot(fiveHourPct: number, sevenDayPct: number, known?: boolean): string;
|
|
56
|
+
export interface UsageTankData {
|
|
57
|
+
agent: 'claude' | 'codex';
|
|
58
|
+
/** Rolling window this tile represents (drives the clip id + label fallback). */
|
|
59
|
+
window: '5h' | '7d';
|
|
60
|
+
/** Tile label, e.g. "5H", "7D". Agent identity rides the brand dot, not a prefix. */
|
|
61
|
+
label: string;
|
|
62
|
+
/** Percent of the window already CONSUMED (0–100). Fill rises with this. */
|
|
63
|
+
usedPercent: number;
|
|
64
|
+
/** ISO-8601 reset instant for the countdown. */
|
|
65
|
+
resetsAt?: string;
|
|
66
|
+
/** False → no live quota: dark tile + dim label + "—" instead of a gauge. */
|
|
67
|
+
known?: boolean;
|
|
68
|
+
/** Codex snapshot expired: keep last-known % but desaturate the fill and show
|
|
69
|
+
* a "stale" marker instead of a (misleading) "now" countdown. */
|
|
70
|
+
stale?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export declare function renderUsageGauge(data: UsageTankData): string;
|
|
73
|
+
/**
|
|
74
|
+
* Codex credit-based plans (e.g. `limit_id: "premium"`) report null 5h/7d
|
|
75
|
+
* windows and convey usage via a credits balance instead. Render a flat readout
|
|
76
|
+
* tile — limit label + balance (or ∞ when unlimited) — matching the gauge frame
|
|
77
|
+
* so it sits alongside the Claude gauges without a false "%" affordance.
|
|
78
|
+
*/
|
|
79
|
+
export declare function renderCreditsTile(data: {
|
|
80
|
+
limitId?: string;
|
|
81
|
+
balance?: string;
|
|
82
|
+
unlimited?: boolean;
|
|
83
|
+
}): string;
|
|
84
|
+
export declare function computeLayout(state: DashState, animFrame?: number, animated?: boolean): KeySlot[];
|
|
85
|
+
/** Physical-key-index → command map (index = row*GRID_COLS+col). Direct-HID input. */
|
|
86
|
+
export declare function buildButtonCommandMap(stateEvt: any): Map<number, ButtonCommand>;
|
|
87
|
+
export interface DeckCell {
|
|
88
|
+
svg: string;
|
|
89
|
+
command: ButtonCommand | null;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* `col_row` → {svg, command} map for the WHOLE grid, for plugins that address
|
|
93
|
+
* keys by position (Ulanzi Studio). Unlike direct-HID, slot 3_2 is a normal
|
|
94
|
+
* per-key usage tile (no hardware merge), and 4_2 mirrors it.
|
|
95
|
+
*/
|
|
96
|
+
export declare function buildLayoutMap(stateEvt: any, animFrame?: number, animated?: boolean): Map<string, DeckCell>;
|
|
97
|
+
/** A press resolves to a daemon command and/or a local view change. */
|
|
98
|
+
export type DeckAction = {
|
|
99
|
+
kind: 'open';
|
|
100
|
+
sessionId: string;
|
|
101
|
+
} | {
|
|
102
|
+
kind: 'back';
|
|
103
|
+
} | {
|
|
104
|
+
kind: 'page';
|
|
105
|
+
delta: number;
|
|
106
|
+
} | {
|
|
107
|
+
kind: 'command';
|
|
108
|
+
command: ButtonCommand;
|
|
109
|
+
} | {
|
|
110
|
+
kind: 'launch';
|
|
111
|
+
} | null;
|
|
112
|
+
export interface SessionDeckCell {
|
|
113
|
+
svg: string;
|
|
114
|
+
action: DeckAction;
|
|
115
|
+
}
|
|
116
|
+
export interface DeckView {
|
|
117
|
+
mode: 'list' | 'detail';
|
|
118
|
+
openSessionId?: string;
|
|
119
|
+
page?: number;
|
|
120
|
+
animFrame?: number;
|
|
121
|
+
animated?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Opt-in: pin the last two list-view positions to 5H/7D subscription-usage
|
|
124
|
+
* tiles (the global quota gauges). Used by surfaces with no encoder LCD to
|
|
125
|
+
* carry usage (Ulanzi D200H, classic Stream Deck). Off by default so other
|
|
126
|
+
* consumers keep the full grid for sessions.
|
|
127
|
+
*/
|
|
128
|
+
showUsage?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export declare function buildSessionDeck(stateEvt: any, view: DeckView, positions: string[]): Map<string, SessionDeckCell>;
|
|
131
|
+
//# sourceMappingURL=d200h-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d200h-layout.d.ts","sourceRoot":"","sources":["../src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