@agentdeck/shared 0.2.0 → 1.0.0
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/adapter.d.ts +3 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +24 -0
- package/dist/adapter.js.map +1 -1
- package/dist/command-builders.d.ts +8 -2
- package/dist/command-builders.d.ts.map +1 -1
- package/dist/command-builders.js +20 -2
- package/dist/command-builders.js.map +1 -1
- 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/creature-layout.d.ts +18 -0
- package/dist/creature-layout.d.ts.map +1 -0
- package/dist/creature-layout.js +131 -0
- package/dist/creature-layout.js.map +1 -0
- package/dist/d200h-layout.d.ts +146 -0
- package/dist/d200h-layout.d.ts.map +1 -0
- package/dist/d200h-layout.js +808 -0
- package/dist/d200h-layout.js.map +1 -0
- package/dist/design-tokens.d.ts +261 -0
- package/dist/design-tokens.d.ts.map +1 -0
- package/dist/design-tokens.js +157 -0
- package/dist/design-tokens.js.map +1 -0
- package/dist/eval-schema.d.ts +32 -2
- package/dist/eval-schema.d.ts.map +1 -1
- package/dist/eval-schema.js.map +1 -1
- package/dist/format-utils.d.ts +38 -0
- package/dist/format-utils.d.ts.map +1 -1
- package/dist/format-utils.js +70 -0
- package/dist/format-utils.js.map +1 -1
- package/dist/gateway-protocol.d.ts +1 -1
- package/dist/gateway-protocol.js +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/llm-settings.d.ts +3 -3
- package/dist/llm-settings.d.ts.map +1 -1
- package/dist/llm-settings.js +3 -3
- package/dist/llm-settings.js.map +1 -1
- 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 +220 -5
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +11 -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 +82 -2
- package/dist/session-utils.d.ts.map +1 -1
- package/dist/session-utils.js +205 -10
- package/dist/session-utils.js.map +1 -1
- package/dist/state-colors.d.ts.map +1 -1
- package/dist/state-colors.js +2 -0
- package/dist/state-colors.js.map +1 -1
- package/dist/states.d.ts +1 -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 +20 -12
- package/dist/svg-renderers/agent-logos.d.ts.map +1 -1
- package/dist/svg-renderers/agent-logos.js +154 -46
- package/dist/svg-renderers/agent-logos.js.map +1 -1
- package/dist/svg-renderers/session-slot-renderer.d.ts +71 -6
- package/dist/svg-renderers/session-slot-renderer.d.ts.map +1 -1
- package/dist/svg-renderers/session-slot-renderer.js +429 -209
- package/dist/svg-renderers/session-slot-renderer.js.map +1 -1
- package/dist/svg-renderers/text-utils.d.ts +14 -0
- package/dist/svg-renderers/text-utils.d.ts.map +1 -1
- package/dist/svg-renderers/text-utils.js +34 -0
- package/dist/svg-renderers/text-utils.js.map +1 -1
- package/dist/telemetry-envelope.d.ts +1 -1
- package/dist/telemetry-envelope.d.ts.map +1 -1
- package/dist/terrarium-rules.d.ts +46 -0
- package/dist/terrarium-rules.d.ts.map +1 -0
- package/dist/terrarium-rules.js +63 -0
- package/dist/terrarium-rules.js.map +1 -0
- package/dist/timeline-icons.d.ts +80 -0
- package/dist/timeline-icons.d.ts.map +1 -0
- package/dist/timeline-icons.js +174 -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 +24 -0
- package/dist/timeline-summarizer.d.ts.map +1 -1
- package/dist/timeline-summarizer.js +55 -13
- package/dist/timeline-summarizer.js.map +1 -1
- package/dist/timeline-task-display.d.ts +66 -0
- package/dist/timeline-task-display.d.ts.map +1 -0
- package/dist/timeline-task-display.js +94 -0
- package/dist/timeline-task-display.js.map +1 -0
- package/dist/timeline.d.ts +101 -2
- package/dist/timeline.d.ts.map +1 -1
- package/dist/timeline.js +249 -11
- package/dist/timeline.js.map +1 -1
- package/dist/trmnl-layout.d.ts.map +1 -0
- package/dist/trmnl-layout.js.map +1 -0
- package/package.json +2 -1
package/dist/adapter.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ 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' | 'opencode' | 'monitor';
|
|
5
|
+
export type AgentType = 'claude-code' | 'openclaw' | 'codex-cli' | 'codex-app' | 'opencode' | 'antigravity' | 'monitor';
|
|
6
6
|
export interface AgentCapabilities {
|
|
7
7
|
type: AgentType;
|
|
8
8
|
displayName: string;
|
|
@@ -132,7 +132,9 @@ export declare const CLAUDE_CODE_CAPABILITIES: AgentCapabilities;
|
|
|
132
132
|
export declare const OPENCLAW_CAPABILITIES: AgentCapabilities;
|
|
133
133
|
export declare const MONITOR_CAPABILITIES: AgentCapabilities;
|
|
134
134
|
export declare const CODEX_CLI_CAPABILITIES: AgentCapabilities;
|
|
135
|
+
export declare const CODEX_APP_CAPABILITIES: AgentCapabilities;
|
|
135
136
|
export declare const OPENCODE_CAPABILITIES: AgentCapabilities;
|
|
137
|
+
export declare const ANTIGRAVITY_CAPABILITIES: AgentCapabilities;
|
|
136
138
|
/** Default OpenClaw Gateway port */
|
|
137
139
|
export declare const OPENCLAW_GATEWAY_PORT = 18789;
|
|
138
140
|
/** Default OpenCode server port (0 = random) */
|
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;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;
|
|
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;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,CAAC;AAExH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,WAAW,EAAE,OAAO,CAAC;IACrB,8CA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wB;IACxB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAID,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IACnC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAID,eAAO,MAAM,wBAAwB,EAAE,iBAWtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAWnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAWlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAWpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,iBAWpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,iBAWnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAWtC,CAAC;AAEF,oCAAoC;AACpC,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,gDAAgD;AAChD,eAAO,MAAM,qBAAqB,IAAI,CAAC"}
|
package/dist/adapter.js
CHANGED
|
@@ -47,6 +47,18 @@ export const CODEX_CLI_CAPABILITIES = {
|
|
|
47
47
|
hasApiUsage: false,
|
|
48
48
|
hasModelCatalog: false,
|
|
49
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
|
+
};
|
|
50
62
|
export const OPENCODE_CAPABILITIES = {
|
|
51
63
|
type: 'opencode',
|
|
52
64
|
displayName: 'OpenCode',
|
|
@@ -59,6 +71,18 @@ export const OPENCODE_CAPABILITIES = {
|
|
|
59
71
|
hasApiUsage: false,
|
|
60
72
|
hasModelCatalog: false,
|
|
61
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
|
+
};
|
|
62
86
|
/** Default OpenClaw Gateway port */
|
|
63
87
|
export const OPENCLAW_GATEWAY_PORT = 18789;
|
|
64
88
|
/** Default OpenCode server port (0 = random) */
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,WAAW,EAAE,KAAK;IAClB,gBAAgB,EAAE,KAAK;IACvB,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,IAAI;IACpB,mBAAmB,EAAE,KAAK;IAC1B,mBAAmB,EAAE,KAAK;IAC1B,WAAW,EAAE,KAAK;I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AAW,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,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,IAAI;IACjB,gBAAgB,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ResponseCommand, SelectOptionCommand, NavigateOptionCommand, SendPromptCommand, SwitchModeCommand, InterruptCommand, EscapeCommand, VoiceCommand, QueryUsageCommand, DiagCommand, UtilityCommand, SwitchAgentCommand, FocusSessionCommand, SessionCommand, ClientRegisterCommand, ApmeVibeFeedbackCommand, ApmeRecommendCommand } from "./protocol.js";
|
|
1
|
+
import type { ResponseCommand, SelectOptionCommand, NavigateOptionCommand, SendPromptCommand, SwitchModeCommand, InterruptCommand, EscapeCommand, VoiceCommand, QueryUsageCommand, QuerySessionTimelineCommand, DiagCommand, UtilityCommand, SwitchAgentCommand, FocusSessionCommand, ClearSessionFocusCommand, SessionCommand, ClientRegisterCommand, ApmeVibeFeedbackCommand, ApmeRecommendCommand, PermissionDecisionCommand, ReviewRunCommand, Esp32OtaAckCommand, Esp32OtaErrorCommand } from "./protocol.js";
|
|
2
2
|
export declare const agentCommand: {
|
|
3
3
|
readonly respond: (value: string) => ResponseCommand;
|
|
4
|
-
readonly selectOption: (index: number) => SelectOptionCommand;
|
|
4
|
+
readonly selectOption: (index: number, sessionId?: string) => SelectOptionCommand;
|
|
5
5
|
readonly navigateOption: (direction: "up" | "down") => NavigateOptionCommand;
|
|
6
6
|
readonly sendPrompt: (text: string) => SendPromptCommand;
|
|
7
7
|
readonly switchMode: (mode?: "plan" | "acceptEdits" | "default") => SwitchModeCommand;
|
|
@@ -9,10 +9,12 @@ export declare const agentCommand: {
|
|
|
9
9
|
readonly escape: () => EscapeCommand;
|
|
10
10
|
readonly voice: (action: "start" | "stop" | "cancel") => VoiceCommand;
|
|
11
11
|
readonly queryUsage: () => QueryUsageCommand;
|
|
12
|
+
readonly querySessionTimeline: (sessionId: string) => QuerySessionTimelineCommand;
|
|
12
13
|
readonly diag: (action: "dump" | "analyze") => DiagCommand;
|
|
13
14
|
readonly utility: (action: "adjust_volume" | "toggle_mute" | "adjust_brightness" | "media_play_pause" | "media_next" | "media_prev", value?: number) => UtilityCommand;
|
|
14
15
|
readonly switchAgent: (agent: "openclaw" | "claude-code") => SwitchAgentCommand;
|
|
15
16
|
readonly focusSession: (sessionId: string) => FocusSessionCommand;
|
|
17
|
+
readonly clearSessionFocus: () => ClearSessionFocusCommand;
|
|
16
18
|
readonly sessionCommand: (sessionId: string, command: {
|
|
17
19
|
type: string;
|
|
18
20
|
[key: string]: unknown;
|
|
@@ -26,5 +28,9 @@ export declare const agentCommand: {
|
|
|
26
28
|
}>) => ClientRegisterCommand;
|
|
27
29
|
readonly apmeVibe: (runId: string, verdict: "approve" | "reject" | "neutral", note?: string) => ApmeVibeFeedbackCommand;
|
|
28
30
|
readonly apmeRecommend: (taskKind?: string, budgetUsd?: number, latencyBudgetMs?: number, preferLocal?: boolean) => ApmeRecommendCommand;
|
|
31
|
+
readonly permissionDecision: (requestId: string, decision: "allow" | "deny") => PermissionDecisionCommand;
|
|
32
|
+
readonly reviewRun: (sessionId: string) => ReviewRunCommand;
|
|
33
|
+
readonly esp32OtaAck: (otaId: string, stage: "begin" | "chunk" | "end" | "abort", seq?: number, offset?: number, written?: number) => Esp32OtaAckCommand;
|
|
34
|
+
readonly esp32OtaError: (error: string, otaId?: string, stage?: string) => Esp32OtaErrorCommand;
|
|
29
35
|
};
|
|
30
36
|
//# sourceMappingURL=command-builders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-builders.d.ts","sourceRoot":"","sources":["../src/command-builders.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,YAAY;8BACR,MAAM,KAAG,eAAe;mCAGnB,MAAM,KAAG,mBAAmB;
|
|
1
|
+
{"version":3,"file":"command-builders.d.ts","sourceRoot":"","sources":["../src/command-builders.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,WAAW,E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,gBAAgB,OAAO,KAAG,oBAAoB;6CAG7F,MAAM,YAAY,OAAO,GAAG,MAAM,KAAG,yBAAyB;oCAGvE,MAAM,KAAG,gBAAgB;kCAG3B,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"}
|
package/dist/command-builders.js
CHANGED
|
@@ -8,8 +8,8 @@ export const agentCommand = {
|
|
|
8
8
|
respond(value) {
|
|
9
9
|
return { type: "respond", value };
|
|
10
10
|
},
|
|
11
|
-
selectOption(index) {
|
|
12
|
-
return { type: "select_option", index };
|
|
11
|
+
selectOption(index, sessionId) {
|
|
12
|
+
return { type: "select_option", index, sessionId };
|
|
13
13
|
},
|
|
14
14
|
navigateOption(direction) {
|
|
15
15
|
return { type: "navigate_option", direction };
|
|
@@ -32,6 +32,9 @@ export const agentCommand = {
|
|
|
32
32
|
queryUsage() {
|
|
33
33
|
return { type: "query_usage" };
|
|
34
34
|
},
|
|
35
|
+
querySessionTimeline(sessionId) {
|
|
36
|
+
return { type: "query_session_timeline", sessionId };
|
|
37
|
+
},
|
|
35
38
|
diag(action) {
|
|
36
39
|
return { type: "diag", action };
|
|
37
40
|
},
|
|
@@ -44,6 +47,9 @@ export const agentCommand = {
|
|
|
44
47
|
focusSession(sessionId) {
|
|
45
48
|
return { type: "focus_session", sessionId };
|
|
46
49
|
},
|
|
50
|
+
clearSessionFocus() {
|
|
51
|
+
return { type: "clear_session_focus" };
|
|
52
|
+
},
|
|
47
53
|
sessionCommand(sessionId, command) {
|
|
48
54
|
return { type: "session_command", sessionId, command };
|
|
49
55
|
},
|
|
@@ -56,5 +62,17 @@ export const agentCommand = {
|
|
|
56
62
|
apmeRecommend(taskKind, budgetUsd, latencyBudgetMs, preferLocal) {
|
|
57
63
|
return { type: "apme_recommend", taskKind, budgetUsd, latencyBudgetMs, preferLocal };
|
|
58
64
|
},
|
|
65
|
+
permissionDecision(requestId, decision) {
|
|
66
|
+
return { type: "permission_decision", requestId, decision };
|
|
67
|
+
},
|
|
68
|
+
reviewRun(sessionId) {
|
|
69
|
+
return { type: "review_run", sessionId };
|
|
70
|
+
},
|
|
71
|
+
esp32OtaAck(otaId, stage, seq, offset, written) {
|
|
72
|
+
return { type: "esp32_ota_ack", otaId, stage, seq, offset, written };
|
|
73
|
+
},
|
|
74
|
+
esp32OtaError(error, otaId, stage) {
|
|
75
|
+
return { type: "esp32_ota_error", error, otaId, stage };
|
|
76
|
+
},
|
|
59
77
|
};
|
|
60
78
|
//# sourceMappingURL=command-builders.js.map
|
|
@@ -1 +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;
|
|
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;AA4B7E,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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AAW,EAAE,OAAO,EAAE,CAAC;IACvE,CAAC;IACD,QAAQ,CAAC,KAAa,EAAE,OAAyC,EAAE,IAAa;QAC9E,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC;IACD,aAAa,CAAC,QAAiB,EAAE,SAAkB,EAAE,eAAwB,EAAE,WAAqB;QAClG,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;IACvF,CAAC;IACD,kBAAkB,CAAC,SAAiB,EAAE,QAA0B;QAC9D,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;IAC9D,CAAC;IACD,SAAS,CAAC,SAAiB;QACzB,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;IAC3C,CAAC;IACD,WAAW,CAAC,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,18 @@
|
|
|
1
|
+
/** One creature's placement within its agent-type band. */
|
|
2
|
+
export interface CreatureSlot {
|
|
3
|
+
/** Center X as a fraction of world width. */
|
|
4
|
+
x: number;
|
|
5
|
+
/** Center Y as a fraction of world height. */
|
|
6
|
+
y: number;
|
|
7
|
+
/** Crowd-driven size multiplier — shrinks as a row fills up. */
|
|
8
|
+
scale: number;
|
|
9
|
+
}
|
|
10
|
+
/** Coding agents (Claude Code) — left-center band. */
|
|
11
|
+
export declare function layoutOctopuses(count: number): CreatureSlot[];
|
|
12
|
+
/** Codex clouds — float in the upper-center, above the octopuses. */
|
|
13
|
+
export declare function layoutCloudCreatures(count: number): CreatureSlot[];
|
|
14
|
+
/** OpenCode rings — mid-center band. */
|
|
15
|
+
export declare function layoutOpenCodeCreatures(count: number): CreatureSlot[];
|
|
16
|
+
/** Antigravity peak/arc marks — upper-right band. */
|
|
17
|
+
export declare function layoutAntigravityCreatures(count: number): CreatureSlot[];
|
|
18
|
+
//# sourceMappingURL=creature-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creature-layout.d.ts","sourceRoot":"","sources":["../src/creature-layout.ts"],"names":[],"mappings":"AAYA,2DAA2D;AAC3D,MAAM,WAAW,YAAY;IAC3B,6CAA6C;IAC7C,CAAC,EAAE,MAAM,CAAC;IACV,8CAA8C;IAC9C,CAAC,EAAE,MAAM,CAAC;IACV,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAY7D;AAED,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAYlE;AAED,wCAAwC;AACxC,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAYrE;AAED,qDAAqD;AACrD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAYxE"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
// creature-layout.ts — Multi-session creature positioning.
|
|
2
|
+
//
|
|
3
|
+
// Third mirror of the canonical band layout. The other two:
|
|
4
|
+
// android/app/src/main/kotlin/dev/agentdeck/terrarium/CreatureLayout.kt
|
|
5
|
+
// apple/AgentDeck/Terrarium/CreatureLayout.swift
|
|
6
|
+
// Keep the band constants, row rules, and the overlap cap identical across all
|
|
7
|
+
// three — a divergence shows up as the same session set drawn in different
|
|
8
|
+
// places on the Pixoo depending on which daemon is driving it.
|
|
9
|
+
//
|
|
10
|
+
// Kotlin/Swift compute in Float and this mirror in double; the sub-1e-7 drift
|
|
11
|
+
// that introduces cannot survive the rounding to a 64px device grid.
|
|
12
|
+
/** Coding agents (Claude Code) — left-center band. */
|
|
13
|
+
export function layoutOctopuses(count) {
|
|
14
|
+
return layoutBand({
|
|
15
|
+
count,
|
|
16
|
+
xMin: 0.20,
|
|
17
|
+
xMax: 0.50,
|
|
18
|
+
frontY: 0.42,
|
|
19
|
+
backY: 0.52,
|
|
20
|
+
singleRowLimit: 4,
|
|
21
|
+
baseScale: 1.0,
|
|
22
|
+
minScale: 0.58,
|
|
23
|
+
creatureWidth: 0.11,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** Codex clouds — float in the upper-center, above the octopuses. */
|
|
27
|
+
export function layoutCloudCreatures(count) {
|
|
28
|
+
return layoutBand({
|
|
29
|
+
count,
|
|
30
|
+
xMin: 0.30,
|
|
31
|
+
xMax: 0.55,
|
|
32
|
+
frontY: 0.16,
|
|
33
|
+
backY: 0.28,
|
|
34
|
+
singleRowLimit: 3,
|
|
35
|
+
baseScale: 0.98,
|
|
36
|
+
minScale: 0.56,
|
|
37
|
+
creatureWidth: 0.080,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** OpenCode rings — mid-center band. */
|
|
41
|
+
export function layoutOpenCodeCreatures(count) {
|
|
42
|
+
return layoutBand({
|
|
43
|
+
count,
|
|
44
|
+
xMin: 0.45,
|
|
45
|
+
xMax: 0.68,
|
|
46
|
+
frontY: 0.34,
|
|
47
|
+
backY: 0.46,
|
|
48
|
+
singleRowLimit: 3,
|
|
49
|
+
baseScale: 0.96,
|
|
50
|
+
minScale: 0.56,
|
|
51
|
+
creatureWidth: 0.078,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/** Antigravity peak/arc marks — upper-right band. */
|
|
55
|
+
export function layoutAntigravityCreatures(count) {
|
|
56
|
+
return layoutBand({
|
|
57
|
+
count,
|
|
58
|
+
xMin: 0.58,
|
|
59
|
+
xMax: 0.82,
|
|
60
|
+
frontY: 0.22,
|
|
61
|
+
backY: 0.34,
|
|
62
|
+
singleRowLimit: 3,
|
|
63
|
+
baseScale: 0.96,
|
|
64
|
+
minScale: 0.56,
|
|
65
|
+
creatureWidth: 0.096,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Hard floor for the crowd-driven shrink. Below the per-band `minScale` so
|
|
70
|
+
* tightly packed bands can still shrink enough to honor the overlap cap before
|
|
71
|
+
* we give up and accept brief overlap.
|
|
72
|
+
*/
|
|
73
|
+
const CROWDED_MIN_SCALE = 0.40;
|
|
74
|
+
/**
|
|
75
|
+
* Max fraction of a creature's width that two neighbors may overlap. 0.5 →
|
|
76
|
+
* centers stay at least half a body-width apart (≤50% overlap).
|
|
77
|
+
*/
|
|
78
|
+
const MAX_OVERLAP_FRACTION = 0.5;
|
|
79
|
+
function layoutBand(spec) {
|
|
80
|
+
const { count, xMin, xMax, frontY, backY, singleRowLimit, baseScale, minScale, creatureWidth } = spec;
|
|
81
|
+
if (count <= 0)
|
|
82
|
+
return [];
|
|
83
|
+
const rows = count <= singleRowLimit ? 1 : count <= singleRowLimit * 2 ? 2 : 3;
|
|
84
|
+
const scale = Math.max(minScale, baseScale - Math.max(0, count - 1) * 0.055);
|
|
85
|
+
const rowCounts = distribute(count, rows);
|
|
86
|
+
const slots = [];
|
|
87
|
+
let absoluteIndex = 0;
|
|
88
|
+
for (let row = 0; row < rows; row++) {
|
|
89
|
+
const rowCount = rowCounts[row];
|
|
90
|
+
if (rowCount <= 0)
|
|
91
|
+
continue;
|
|
92
|
+
const rowT = rows === 1 ? 0 : row / (rows - 1);
|
|
93
|
+
const rowY = frontY + (backY - frontY) * rowT;
|
|
94
|
+
const rowInset = 0.015 + row * 0.02;
|
|
95
|
+
const rowMinX = xMin + rowInset;
|
|
96
|
+
const rowMaxX = xMax - rowInset;
|
|
97
|
+
// Alternating jitter magnitude — constant within a row.
|
|
98
|
+
const spread = Math.max(0.003, Math.min(0.012, (rowMaxX - rowMinX) / Math.max(rowCount * 5, 1)));
|
|
99
|
+
// Overlap cap: keep neighbor center-spacing ≥ MAX_OVERLAP_FRACTION of the
|
|
100
|
+
// on-screen body width so creatures never overlap by more than ~half. When
|
|
101
|
+
// the band is too tight to honor that at the count-based scale, shrink every
|
|
102
|
+
// creature in the row by the same ratio (down to CROWDED_MIN_SCALE) instead
|
|
103
|
+
// of letting them pile up.
|
|
104
|
+
let rowScale = Math.max(minScale, scale - row * 0.04);
|
|
105
|
+
if (rowCount >= 2) {
|
|
106
|
+
// Worst-case gap after the alternating jitter squeezes a pair.
|
|
107
|
+
const spacing = (rowMaxX - rowMinX) / (rowCount - 1) - 2 * spread;
|
|
108
|
+
const overlapCapScale = Math.max(0, spacing) / (MAX_OVERLAP_FRACTION * creatureWidth);
|
|
109
|
+
rowScale = Math.max(CROWDED_MIN_SCALE, Math.min(rowScale, overlapCapScale));
|
|
110
|
+
}
|
|
111
|
+
for (let col = 0; col < rowCount; col++) {
|
|
112
|
+
const t = rowCount === 1 ? 0.5 : col / (rowCount - 1);
|
|
113
|
+
const baseX = rowMinX + (rowMaxX - rowMinX) * t;
|
|
114
|
+
const phase = (absoluteIndex + row) % 2 === 0 ? -1 : 1;
|
|
115
|
+
const x = Math.min(xMax, Math.max(xMin, baseX + spread * phase));
|
|
116
|
+
const yJitter = ((absoluteIndex % 3) - 1) * 0.008;
|
|
117
|
+
slots.push({ x, y: rowY + yJitter, scale: rowScale });
|
|
118
|
+
absoluteIndex += 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return slots;
|
|
122
|
+
}
|
|
123
|
+
function distribute(count, rows) {
|
|
124
|
+
if (rows <= 0)
|
|
125
|
+
return [];
|
|
126
|
+
const result = new Array(rows).fill(Math.floor(count / rows));
|
|
127
|
+
for (let index = 0; index < count % rows; index++)
|
|
128
|
+
result[index] += 1;
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=creature-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creature-layout.js","sourceRoot":"","sources":["../src/creature-layout.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,4DAA4D;AAC5D,0EAA0E;AAC1E,mDAAmD;AACnD,+EAA+E;AAC/E,2EAA2E;AAC3E,+DAA+D;AAC/D,EAAE;AACF,8EAA8E;AAC9E,qEAAqE;AAYrE,sDAAsD;AACtD,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,OAAO,UAAU,CAAC;QAChB,KAAK;QACL,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC;QACjB,SAAS,EAAE,GAAG;QACd,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;KACpB,CAAC,CAAC;AACL,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,UAAU,CAAC;QAChB,KAAK;QACL,IAAI,EAAE,IAAI;QACV,IAAI,E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,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;YACtD,aAAa,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,IAAY;IAC7C,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,IAAI,KAAK,CAAS,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;IACtE,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE;QAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
/**
|
|
57
|
+
* Compact label for a rolling-window length in minutes, mirroring the Swift
|
|
58
|
+
* `TopologyRail.windowLabel`: whole days → "Nd" (10080 → "7D"), whole hours →
|
|
59
|
+
* "Nh" (300 → "5H"), else "Nm". Codex now sometimes reports the weekly window
|
|
60
|
+
* in the `primary` slot with `secondary` null, so usage gauges MUST label by a
|
|
61
|
+
* window's own length, never by its slot position — otherwise the 7D gauge
|
|
62
|
+
* silently vanishes and the weekly window is mislabelled "5H".
|
|
63
|
+
*/
|
|
64
|
+
export declare function usageWindowLabel(windowMinutes: number | undefined): string;
|
|
65
|
+
/**
|
|
66
|
+
* Which gauge bucket ('5h' short vs '7d' long) a rolling window belongs to,
|
|
67
|
+
* derived from its length (≥ a day → long) so the clip id / styling is right
|
|
68
|
+
* regardless of whether the window arrived in the primary or secondary slot.
|
|
69
|
+
*/
|
|
70
|
+
export declare function usageWindowKind(windowMinutes: number | undefined): '5h' | '7d';
|
|
71
|
+
export interface UsageTankData {
|
|
72
|
+
agent: 'claude' | 'codex';
|
|
73
|
+
/** Rolling window this tile represents (drives the clip id + label fallback). */
|
|
74
|
+
window: '5h' | '7d';
|
|
75
|
+
/** Tile label, e.g. "5H", "7D". Agent identity rides the brand dot, not a prefix. */
|
|
76
|
+
label: string;
|
|
77
|
+
/** Percent of the window already CONSUMED (0–100). Fill rises with this. */
|
|
78
|
+
usedPercent: number;
|
|
79
|
+
/** ISO-8601 reset instant for the countdown. */
|
|
80
|
+
resetsAt?: string;
|
|
81
|
+
/** False → no live quota: dark tile + dim label + "—" instead of a gauge. */
|
|
82
|
+
known?: boolean;
|
|
83
|
+
/** Codex snapshot expired: keep last-known % but desaturate the fill and show
|
|
84
|
+
* a "stale" marker instead of a (misleading) "now" countdown. */
|
|
85
|
+
stale?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export declare function renderUsageGauge(data: UsageTankData): string;
|
|
88
|
+
/**
|
|
89
|
+
* Codex credit-based plans (e.g. `limit_id: "premium"`) report null 5h/7d
|
|
90
|
+
* windows and convey usage via a credits balance instead. Render a flat readout
|
|
91
|
+
* tile — limit label + balance (or ∞ when unlimited) — matching the gauge frame
|
|
92
|
+
* so it sits alongside the Claude gauges without a false "%" affordance.
|
|
93
|
+
*/
|
|
94
|
+
export declare function renderCreditsTile(data: {
|
|
95
|
+
limitId?: string;
|
|
96
|
+
balance?: string;
|
|
97
|
+
unlimited?: boolean;
|
|
98
|
+
}): string;
|
|
99
|
+
export declare function computeLayout(state: DashState, animFrame?: number, animated?: boolean): KeySlot[];
|
|
100
|
+
/** Physical-key-index → command map (index = row*GRID_COLS+col). Direct-HID input. */
|
|
101
|
+
export declare function buildButtonCommandMap(stateEvt: any): Map<number, ButtonCommand>;
|
|
102
|
+
export interface DeckCell {
|
|
103
|
+
svg: string;
|
|
104
|
+
command: ButtonCommand | null;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* `col_row` → {svg, command} map for the WHOLE grid, for plugins that address
|
|
108
|
+
* keys by position (Ulanzi Studio). Unlike direct-HID, slot 3_2 is a normal
|
|
109
|
+
* per-key usage tile (no hardware merge), and 4_2 mirrors it.
|
|
110
|
+
*/
|
|
111
|
+
export declare function buildLayoutMap(stateEvt: any, animFrame?: number, animated?: boolean): Map<string, DeckCell>;
|
|
112
|
+
/** A press resolves to a daemon command and/or a local view change. */
|
|
113
|
+
export type DeckAction = {
|
|
114
|
+
kind: 'open';
|
|
115
|
+
sessionId: string;
|
|
116
|
+
} | {
|
|
117
|
+
kind: 'back';
|
|
118
|
+
} | {
|
|
119
|
+
kind: 'page';
|
|
120
|
+
delta: number;
|
|
121
|
+
} | {
|
|
122
|
+
kind: 'command';
|
|
123
|
+
command: ButtonCommand;
|
|
124
|
+
} | {
|
|
125
|
+
kind: 'launch';
|
|
126
|
+
} | null;
|
|
127
|
+
export interface SessionDeckCell {
|
|
128
|
+
svg: string;
|
|
129
|
+
action: DeckAction;
|
|
130
|
+
}
|
|
131
|
+
export interface DeckView {
|
|
132
|
+
mode: 'list' | 'detail';
|
|
133
|
+
openSessionId?: string;
|
|
134
|
+
page?: number;
|
|
135
|
+
animFrame?: number;
|
|
136
|
+
animated?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Opt-in: pin the last two list-view positions to 5H/7D subscription-usage
|
|
139
|
+
* tiles (the global quota gauges). Used by surfaces with no encoder LCD to
|
|
140
|
+
* carry usage (Ulanzi D200H, classic Stream Deck). Off by default so other
|
|
141
|
+
* consumers keep the full grid for sessions.
|
|
142
|
+
*/
|
|
143
|
+
showUsage?: boolean;
|
|
144
|
+
}
|
|
145
|
+
export declare function buildSessionDeck(stateEvt: any, view: DeckView, positions: string[]): Map<string, SessionDeckCell>;
|
|
146
|
+
//# sourceMappingURL=d200h-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d200h-layout.d.ts","sourceRoot":"","sources":["../src/d200h-layout.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKpF,kFAAkF;AAClF,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAEnE,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAChC;AAED,uEAAuE;AACvE,eAAO,MAAM,SAAS,IAAI,CAAC;AAmB3B,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAA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