@agent-deck/shared 1.2.8 → 1.2.10
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/constants/client-scope.d.ts +2 -2
- package/dist/constants/client-scope.d.ts.map +1 -1
- package/dist/constants/client-scope.js +2 -2
- package/dist/constants/client-scope.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/deck-display.d.ts +29 -77
- package/dist/schemas/deck-display.d.ts.map +1 -1
- package/dist/schemas/deck-display.js +20 -45
- package/dist/schemas/deck-display.js.map +1 -1
- package/dist/utils/agent-deck-home.d.ts +1 -4
- package/dist/utils/agent-deck-home.d.ts.map +1 -1
- package/dist/utils/agent-deck-home.js +1 -19
- package/dist/utils/agent-deck-home.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ export declare const AGENT_DECK_CLIENT_HEADER = "x-agent-deck-client";
|
|
|
4
4
|
export declare const AGENT_DECK_DASHBOARD_CLIENT = "dashboard";
|
|
5
5
|
/** Value sent by MCP and other agent integrations (deck-scoped reads only). */
|
|
6
6
|
export declare const AGENT_DECK_AGENT_CLIENT = "agent";
|
|
7
|
-
/** Workspace root for
|
|
7
|
+
/** Workspace root for session grouping and display (agent clients). */
|
|
8
8
|
export declare const AGENT_DECK_WORKSPACE_HEADER = "x-agent-deck-workspace";
|
|
9
|
-
/**
|
|
9
|
+
/** Session-bound deck id (agent clients). */
|
|
10
10
|
export declare const AGENT_DECK_DECK_ID_HEADER = "x-agent-deck-deck-id";
|
|
11
11
|
//# sourceMappingURL=client-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-scope.d.ts","sourceRoot":"","sources":["../../src/constants/client-scope.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAE9D,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,cAAc,CAAC;AAEvD,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAE/C,
|
|
1
|
+
{"version":3,"file":"client-scope.d.ts","sourceRoot":"","sources":["../../src/constants/client-scope.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAE9D,mEAAmE;AACnE,eAAO,MAAM,2BAA2B,cAAc,CAAC;AAEvD,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAE/C,uEAAuE;AACvE,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAEpE,6CAA6C;AAC7C,eAAO,MAAM,yBAAyB,yBAAyB,CAAC"}
|
|
@@ -7,8 +7,8 @@ exports.AGENT_DECK_CLIENT_HEADER = 'x-agent-deck-client';
|
|
|
7
7
|
exports.AGENT_DECK_DASHBOARD_CLIENT = 'dashboard';
|
|
8
8
|
/** Value sent by MCP and other agent integrations (deck-scoped reads only). */
|
|
9
9
|
exports.AGENT_DECK_AGENT_CLIENT = 'agent';
|
|
10
|
-
/** Workspace root for
|
|
10
|
+
/** Workspace root for session grouping and display (agent clients). */
|
|
11
11
|
exports.AGENT_DECK_WORKSPACE_HEADER = 'x-agent-deck-workspace';
|
|
12
|
-
/**
|
|
12
|
+
/** Session-bound deck id (agent clients). */
|
|
13
13
|
exports.AGENT_DECK_DECK_ID_HEADER = 'x-agent-deck-deck-id';
|
|
14
14
|
//# sourceMappingURL=client-scope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-scope.js","sourceRoot":"","sources":["../../src/constants/client-scope.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AACjE,QAAA,wBAAwB,GAAG,qBAAqB,CAAC;AAE9D,mEAAmE;AACtD,QAAA,2BAA2B,GAAG,WAAW,CAAC;AAEvD,+EAA+E;AAClE,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAE/C,
|
|
1
|
+
{"version":3,"file":"client-scope.js","sourceRoot":"","sources":["../../src/constants/client-scope.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AACjE,QAAA,wBAAwB,GAAG,qBAAqB,CAAC;AAE9D,mEAAmE;AACtD,QAAA,2BAA2B,GAAG,WAAW,CAAC;AAEvD,+EAA+E;AAClE,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAE/C,uEAAuE;AAC1D,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AAEpE,6CAA6C;AAChC,QAAA,yBAAyB,GAAG,sBAAsB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from './schemas/service';
|
|
|
2
2
|
export * from './schemas/deck';
|
|
3
3
|
export * from './schemas/credential';
|
|
4
4
|
export * from './schemas/oauth';
|
|
5
|
-
export * from './schemas/repo-deck';
|
|
6
5
|
export * from './schemas/playbook';
|
|
7
6
|
export * from './schemas/deck-display';
|
|
8
7
|
export * from './types/api';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AAGvC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGrD,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,6 @@ __exportStar(require("./schemas/service"), exports);
|
|
|
20
20
|
__exportStar(require("./schemas/deck"), exports);
|
|
21
21
|
__exportStar(require("./schemas/credential"), exports);
|
|
22
22
|
__exportStar(require("./schemas/oauth"), exports);
|
|
23
|
-
__exportStar(require("./schemas/repo-deck"), exports);
|
|
24
23
|
__exportStar(require("./schemas/playbook"), exports);
|
|
25
24
|
__exportStar(require("./schemas/deck-display"), exports);
|
|
26
25
|
// Additional types not covered by schemas
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wCAAwC;AACxC,oDAAkC;AAClC,iDAA+B;AAC/B,uDAAqC;AACrC,kDAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wCAAwC;AACxC,oDAAkC;AAClC,iDAA+B;AAC/B,uDAAqC;AACrC,kDAAgC;AAChC,qDAAmC;AACnC,yDAAuC;AAEvC,0CAA0C;AAC1C,8CAA4B;AAG5B,QAAQ;AACR,0CAAwB;AACxB,mEAQqC;AAPnC,kIAAA,2BAA2B,OAAA;AAC3B,yHAAA,kBAAkB,OAAA;AAClB,4HAAA,qBAAqB,OAAA;AACrB,0HAAA,mBAAmB,OAAA;AACnB,+HAAA,wBAAwB,OAAA;AAI1B,iEAIoC;AAHlC,oIAAA,8BAA8B,OAAA;AAC9B,+HAAA,yBAAyB,OAAA;AACzB,6HAAA,uBAAuB,OAAA;AAGzB,YAAY;AACZ,yDAMkC;AALhC,wHAAA,wBAAwB,OAAA;AACxB,2HAAA,2BAA2B,OAAA;AAC3B,uHAAA,uBAAuB,OAAA;AACvB,2HAAA,2BAA2B,OAAA;AAC3B,yHAAA,yBAAyB,OAAA;AAE3B,uDAAuH;AAA9G,6GAAA,cAAc,OAAA;AAAE,iHAAA,kBAAkB,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAAE,kHAAA,mBAAmB,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const DeckDisplaySourceSchema: z.ZodEnum<["session_override", "
|
|
2
|
+
export declare const DeckDisplaySourceSchema: z.ZodEnum<["session_override", "env", "unbound"]>;
|
|
3
3
|
export declare const DeckCardCountsSchema: z.ZodObject<{
|
|
4
4
|
mcp: z.ZodNumber;
|
|
5
5
|
credentials: z.ZodNumber;
|
|
@@ -13,11 +13,13 @@ export declare const DeckCardCountsSchema: z.ZodObject<{
|
|
|
13
13
|
credentials: number;
|
|
14
14
|
playbooks: number;
|
|
15
15
|
}>;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const LiveBindingSchema: z.ZodObject<{
|
|
17
|
+
badge: z.ZodString;
|
|
17
18
|
deckId: z.ZodString;
|
|
18
19
|
deckName: z.ZodString;
|
|
19
|
-
source: z.ZodEnum<["session_override", "
|
|
20
|
-
|
|
20
|
+
source: z.ZodEnum<["session_override", "env"]>;
|
|
21
|
+
workspaceRoot: z.ZodString;
|
|
22
|
+
clientName: z.ZodOptional<z.ZodString>;
|
|
21
23
|
cardCounts: z.ZodObject<{
|
|
22
24
|
mcp: z.ZodNumber;
|
|
23
25
|
credentials: z.ZodNumber;
|
|
@@ -31,87 +33,42 @@ export declare const BindingEntrySchema: z.ZodObject<{
|
|
|
31
33
|
credentials: number;
|
|
32
34
|
playbooks: number;
|
|
33
35
|
}>;
|
|
34
|
-
oauthWarningCount: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
/** Workspace at bind time (metadata only; display is keyed by session). */
|
|
36
|
-
workspaceRoot: z.ZodOptional<z.ZodString>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
updatedAt: string;
|
|
39
|
-
deckId: string;
|
|
40
|
-
deckName: string;
|
|
41
|
-
source: "env" | "session_override" | "repo_manifest";
|
|
42
|
-
cardCounts: {
|
|
43
|
-
mcp: number;
|
|
44
|
-
credentials: number;
|
|
45
|
-
playbooks: number;
|
|
46
|
-
};
|
|
47
|
-
oauthWarningCount?: number | undefined;
|
|
48
|
-
workspaceRoot?: string | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
updatedAt: string;
|
|
51
|
-
deckId: string;
|
|
52
|
-
deckName: string;
|
|
53
|
-
source: "env" | "session_override" | "repo_manifest";
|
|
54
|
-
cardCounts: {
|
|
55
|
-
mcp: number;
|
|
56
|
-
credentials: number;
|
|
57
|
-
playbooks: number;
|
|
58
|
-
};
|
|
59
|
-
oauthWarningCount?: number | undefined;
|
|
60
|
-
workspaceRoot?: string | undefined;
|
|
61
|
-
}>;
|
|
62
|
-
/** Keys are host/MCP session ids (see StatusLinePayload.session_id). */
|
|
63
|
-
export declare const BindingsFileSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
64
|
-
deckId: z.ZodString;
|
|
65
|
-
deckName: z.ZodString;
|
|
66
|
-
source: z.ZodEnum<["session_override", "repo_manifest", "env"]>;
|
|
67
36
|
updatedAt: z.ZodString;
|
|
68
|
-
|
|
69
|
-
mcp: z.ZodNumber;
|
|
70
|
-
credentials: z.ZodNumber;
|
|
71
|
-
playbooks: z.ZodNumber;
|
|
72
|
-
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
mcp: number;
|
|
74
|
-
credentials: number;
|
|
75
|
-
playbooks: number;
|
|
76
|
-
}, {
|
|
77
|
-
mcp: number;
|
|
78
|
-
credentials: number;
|
|
79
|
-
playbooks: number;
|
|
80
|
-
}>;
|
|
81
|
-
oauthWarningCount: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
/** Workspace at bind time (metadata only; display is keyed by session). */
|
|
83
|
-
workspaceRoot: z.ZodOptional<z.ZodString>;
|
|
37
|
+
lastActivityAt: z.ZodString;
|
|
84
38
|
}, "strip", z.ZodTypeAny, {
|
|
85
39
|
updatedAt: string;
|
|
86
40
|
deckId: string;
|
|
41
|
+
badge: string;
|
|
87
42
|
deckName: string;
|
|
88
|
-
source: "env" | "session_override"
|
|
43
|
+
source: "env" | "session_override";
|
|
44
|
+
workspaceRoot: string;
|
|
89
45
|
cardCounts: {
|
|
90
46
|
mcp: number;
|
|
91
47
|
credentials: number;
|
|
92
48
|
playbooks: number;
|
|
93
49
|
};
|
|
94
|
-
|
|
95
|
-
|
|
50
|
+
lastActivityAt: string;
|
|
51
|
+
clientName?: string | undefined;
|
|
96
52
|
}, {
|
|
97
53
|
updatedAt: string;
|
|
98
54
|
deckId: string;
|
|
55
|
+
badge: string;
|
|
99
56
|
deckName: string;
|
|
100
|
-
source: "env" | "session_override"
|
|
57
|
+
source: "env" | "session_override";
|
|
58
|
+
workspaceRoot: string;
|
|
101
59
|
cardCounts: {
|
|
102
60
|
mcp: number;
|
|
103
61
|
credentials: number;
|
|
104
62
|
playbooks: number;
|
|
105
63
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
64
|
+
lastActivityAt: string;
|
|
65
|
+
clientName?: string | undefined;
|
|
66
|
+
}>;
|
|
109
67
|
export declare const DeckDisplaySchema: z.ZodObject<{
|
|
110
68
|
workspaceRoot: z.ZodString;
|
|
111
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
69
|
deckId: z.ZodNullable<z.ZodString>;
|
|
113
70
|
deckName: z.ZodNullable<z.ZodString>;
|
|
114
|
-
source: z.ZodEnum<["session_override", "
|
|
71
|
+
source: z.ZodEnum<["session_override", "env", "unbound"]>;
|
|
115
72
|
cardCounts: z.ZodObject<{
|
|
116
73
|
mcp: z.ZodNumber;
|
|
117
74
|
credentials: z.ZodNumber;
|
|
@@ -127,38 +84,39 @@ export declare const DeckDisplaySchema: z.ZodObject<{
|
|
|
127
84
|
}>;
|
|
128
85
|
oauthWarningCount: z.ZodOptional<z.ZodNumber>;
|
|
129
86
|
agentDeckOnline: z.ZodBoolean;
|
|
87
|
+
mcpOnline: z.ZodOptional<z.ZodBoolean>;
|
|
130
88
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
131
89
|
displayLine: z.ZodString;
|
|
132
90
|
}, "strip", z.ZodTypeAny, {
|
|
133
91
|
deckId: string | null;
|
|
134
92
|
deckName: string | null;
|
|
135
|
-
source: "env" | "session_override" | "
|
|
93
|
+
source: "env" | "session_override" | "unbound";
|
|
94
|
+
workspaceRoot: string;
|
|
136
95
|
cardCounts: {
|
|
137
96
|
mcp: number;
|
|
138
97
|
credentials: number;
|
|
139
98
|
playbooks: number;
|
|
140
99
|
};
|
|
141
|
-
workspaceRoot: string;
|
|
142
100
|
agentDeckOnline: boolean;
|
|
143
101
|
displayLine: string;
|
|
144
102
|
updatedAt?: string | undefined;
|
|
145
103
|
oauthWarningCount?: number | undefined;
|
|
146
|
-
|
|
104
|
+
mcpOnline?: boolean | undefined;
|
|
147
105
|
}, {
|
|
148
106
|
deckId: string | null;
|
|
149
107
|
deckName: string | null;
|
|
150
|
-
source: "env" | "session_override" | "
|
|
108
|
+
source: "env" | "session_override" | "unbound";
|
|
109
|
+
workspaceRoot: string;
|
|
151
110
|
cardCounts: {
|
|
152
111
|
mcp: number;
|
|
153
112
|
credentials: number;
|
|
154
113
|
playbooks: number;
|
|
155
114
|
};
|
|
156
|
-
workspaceRoot: string;
|
|
157
115
|
agentDeckOnline: boolean;
|
|
158
116
|
displayLine: string;
|
|
159
117
|
updatedAt?: string | undefined;
|
|
160
118
|
oauthWarningCount?: number | undefined;
|
|
161
|
-
|
|
119
|
+
mcpOnline?: boolean | undefined;
|
|
162
120
|
}>;
|
|
163
121
|
export declare const StatusLinePayloadSchema: z.ZodObject<{
|
|
164
122
|
session_id: z.ZodOptional<z.ZodString>;
|
|
@@ -190,8 +148,7 @@ export declare const StatusLinePayloadSchema: z.ZodObject<{
|
|
|
190
148
|
}>;
|
|
191
149
|
export type DeckDisplaySource = z.infer<typeof DeckDisplaySourceSchema>;
|
|
192
150
|
export type DeckCardCounts = z.infer<typeof DeckCardCountsSchema>;
|
|
193
|
-
export type
|
|
194
|
-
export type BindingsFile = z.infer<typeof BindingsFileSchema>;
|
|
151
|
+
export type LiveBinding = z.infer<typeof LiveBindingSchema>;
|
|
195
152
|
export type DeckDisplay = z.infer<typeof DeckDisplaySchema>;
|
|
196
153
|
export type StatusLinePayload = z.infer<typeof StatusLinePayloadSchema>;
|
|
197
154
|
export declare const DISPLAY_LINE_MAX_LENGTH = 120;
|
|
@@ -205,16 +162,11 @@ export declare function countDeckCards(deck: {
|
|
|
205
162
|
export declare function formatDisplayUpdatedSuffix(updatedAt: string): string;
|
|
206
163
|
export declare function formatDisplayLine(deckName: string | null, counts: DeckCardCounts, options?: {
|
|
207
164
|
offline?: boolean;
|
|
165
|
+
mcpOffline?: boolean;
|
|
208
166
|
updatedAt?: string;
|
|
167
|
+
badge?: string;
|
|
209
168
|
}): string;
|
|
210
169
|
export declare function normalizeWorkspaceRoot(workspaceRoot: string): string;
|
|
211
|
-
/** Walk up from workspaceRoot to find the nearest bindings sidecar entry. */
|
|
212
|
-
export declare function lookupWorkspaceBinding(bindings: BindingsFile, workspaceRoot: string): BindingEntry | null;
|
|
213
|
-
/** Session sidecar first; legacy pre-1.2.7 workspace keys as fallback. */
|
|
214
|
-
export declare function resolveBindingEntry(bindings: BindingsFile, options: {
|
|
215
|
-
sessionId?: string;
|
|
216
|
-
workspaceRoot?: string;
|
|
217
|
-
}): BindingEntry | null;
|
|
218
170
|
export declare function resolveStatusLineSessionId(payload: StatusLinePayload): string | undefined;
|
|
219
171
|
export declare function resolveStatusLineWorkspace(payload: StatusLinePayload, fallbackCwd?: string): string | undefined;
|
|
220
172
|
//# sourceMappingURL=deck-display.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deck-display.d.ts","sourceRoot":"","sources":["../../src/schemas/deck-display.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"deck-display.d.ts","sourceRoot":"","sources":["../../src/schemas/deck-display.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB,mDAIlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;CACvB,GAAG,cAAc,CAOjB;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAOpE;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACxF,MAAM,CAsCR;AAED,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAGzF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQ/G"}
|
|
@@ -3,20 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DISPLAY_LINE_MAX_LENGTH = exports.StatusLinePayloadSchema = exports.DeckDisplaySchema = exports.
|
|
6
|
+
exports.DISPLAY_LINE_MAX_LENGTH = exports.StatusLinePayloadSchema = exports.DeckDisplaySchema = exports.LiveBindingSchema = exports.DeckCardCountsSchema = exports.DeckDisplaySourceSchema = void 0;
|
|
7
7
|
exports.countDeckCards = countDeckCards;
|
|
8
8
|
exports.formatDisplayUpdatedSuffix = formatDisplayUpdatedSuffix;
|
|
9
9
|
exports.formatDisplayLine = formatDisplayLine;
|
|
10
10
|
exports.normalizeWorkspaceRoot = normalizeWorkspaceRoot;
|
|
11
|
-
exports.lookupWorkspaceBinding = lookupWorkspaceBinding;
|
|
12
|
-
exports.resolveBindingEntry = resolveBindingEntry;
|
|
13
11
|
exports.resolveStatusLineSessionId = resolveStatusLineSessionId;
|
|
14
12
|
exports.resolveStatusLineWorkspace = resolveStatusLineWorkspace;
|
|
15
13
|
const zod_1 = require("zod");
|
|
16
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
17
15
|
exports.DeckDisplaySourceSchema = zod_1.z.enum([
|
|
18
16
|
'session_override',
|
|
19
|
-
'repo_manifest',
|
|
20
17
|
'env',
|
|
21
18
|
'unbound',
|
|
22
19
|
]);
|
|
@@ -25,27 +22,26 @@ exports.DeckCardCountsSchema = zod_1.z.object({
|
|
|
25
22
|
credentials: zod_1.z.number().int().min(0),
|
|
26
23
|
playbooks: zod_1.z.number().int().min(0),
|
|
27
24
|
});
|
|
28
|
-
exports.
|
|
25
|
+
exports.LiveBindingSchema = zod_1.z.object({
|
|
26
|
+
badge: zod_1.z.string().min(1),
|
|
29
27
|
deckId: zod_1.z.string().uuid(),
|
|
30
|
-
deckName: zod_1.z.string(),
|
|
31
|
-
source:
|
|
32
|
-
|
|
28
|
+
deckName: zod_1.z.string().min(1),
|
|
29
|
+
source: exports.DeckDisplaySourceSchema.exclude(['unbound']),
|
|
30
|
+
workspaceRoot: zod_1.z.string().min(1),
|
|
31
|
+
clientName: zod_1.z.string().min(1).optional(),
|
|
33
32
|
cardCounts: exports.DeckCardCountsSchema,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
workspaceRoot: zod_1.z.string().optional(),
|
|
33
|
+
updatedAt: zod_1.z.string().datetime(),
|
|
34
|
+
lastActivityAt: zod_1.z.string().datetime(),
|
|
37
35
|
});
|
|
38
|
-
/** Keys are host/MCP session ids (see StatusLinePayload.session_id). */
|
|
39
|
-
exports.BindingsFileSchema = zod_1.z.record(zod_1.z.string(), exports.BindingEntrySchema);
|
|
40
36
|
exports.DeckDisplaySchema = zod_1.z.object({
|
|
41
37
|
workspaceRoot: zod_1.z.string(),
|
|
42
|
-
sessionId: zod_1.z.string().nullable().optional(),
|
|
43
38
|
deckId: zod_1.z.string().uuid().nullable(),
|
|
44
39
|
deckName: zod_1.z.string().nullable(),
|
|
45
40
|
source: exports.DeckDisplaySourceSchema,
|
|
46
41
|
cardCounts: exports.DeckCardCountsSchema,
|
|
47
42
|
oauthWarningCount: zod_1.z.number().int().min(0).optional(),
|
|
48
43
|
agentDeckOnline: zod_1.z.boolean(),
|
|
44
|
+
mcpOnline: zod_1.z.boolean().optional(),
|
|
49
45
|
updatedAt: zod_1.z.string().datetime().optional(),
|
|
50
46
|
displayLine: zod_1.z.string(),
|
|
51
47
|
});
|
|
@@ -86,54 +82,33 @@ function formatDisplayLine(deckName, counts, options) {
|
|
|
86
82
|
: offlineLine;
|
|
87
83
|
}
|
|
88
84
|
if (!deckName) {
|
|
89
|
-
|
|
85
|
+
const unboundLine = `${prefix}Unbound — bind a deck to use Agent Deck`;
|
|
86
|
+
const withMcp = options?.mcpOffline ? `${unboundLine} · MCP offline` : unboundLine;
|
|
87
|
+
return withMcp.length > exports.DISPLAY_LINE_MAX_LENGTH
|
|
88
|
+
? withMcp.slice(0, exports.DISPLAY_LINE_MAX_LENGTH)
|
|
89
|
+
: withMcp;
|
|
90
90
|
}
|
|
91
91
|
const countsPart = `${counts.mcp} MCP · ${counts.credentials} keys · ${counts.playbooks} playbooks`;
|
|
92
92
|
const separator = ' · ';
|
|
93
|
-
const
|
|
93
|
+
const badgeSuffix = options?.badge ? ` · ⌘${options.badge}` : '';
|
|
94
|
+
const mcpSuffix = options?.mcpOffline ? ' · MCP offline' : '';
|
|
95
|
+
const suffixLength = updatedSuffix.length + mcpSuffix.length + badgeSuffix.length;
|
|
94
96
|
const fixedLength = prefix.length + separator.length + countsPart.length + suffixLength;
|
|
95
97
|
const maxNameLength = exports.DISPLAY_LINE_MAX_LENGTH - fixedLength;
|
|
96
98
|
let name = deckName;
|
|
97
99
|
if (maxNameLength < 1) {
|
|
98
|
-
const line = `${prefix}${countsPart}${updatedSuffix}`;
|
|
100
|
+
const line = `${prefix}${countsPart}${badgeSuffix}${mcpSuffix}${updatedSuffix}`;
|
|
99
101
|
return line.length > exports.DISPLAY_LINE_MAX_LENGTH ? line.slice(0, exports.DISPLAY_LINE_MAX_LENGTH) : line;
|
|
100
102
|
}
|
|
101
103
|
if (name.length > maxNameLength) {
|
|
102
104
|
name = `${name.slice(0, Math.max(1, maxNameLength - 1))}…`;
|
|
103
105
|
}
|
|
104
|
-
const line = `${prefix}${name}${separator}${countsPart}${updatedSuffix}`;
|
|
106
|
+
const line = `${prefix}${name}${separator}${countsPart}${badgeSuffix}${mcpSuffix}${updatedSuffix}`;
|
|
105
107
|
return line.length > exports.DISPLAY_LINE_MAX_LENGTH ? line.slice(0, exports.DISPLAY_LINE_MAX_LENGTH) : line;
|
|
106
108
|
}
|
|
107
109
|
function normalizeWorkspaceRoot(workspaceRoot) {
|
|
108
110
|
return node_path_1.default.resolve(workspaceRoot.trim());
|
|
109
111
|
}
|
|
110
|
-
/** Walk up from workspaceRoot to find the nearest bindings sidecar entry. */
|
|
111
|
-
function lookupWorkspaceBinding(bindings, workspaceRoot) {
|
|
112
|
-
let current = normalizeWorkspaceRoot(workspaceRoot);
|
|
113
|
-
while (true) {
|
|
114
|
-
const entry = bindings[current];
|
|
115
|
-
if (entry) {
|
|
116
|
-
return entry;
|
|
117
|
-
}
|
|
118
|
-
const parent = node_path_1.default.dirname(current);
|
|
119
|
-
if (parent === current) {
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
current = parent;
|
|
123
|
-
}
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
/** Session sidecar first; legacy pre-1.2.7 workspace keys as fallback. */
|
|
127
|
-
function resolveBindingEntry(bindings, options) {
|
|
128
|
-
const sessionId = options.sessionId?.trim();
|
|
129
|
-
if (sessionId && bindings[sessionId]) {
|
|
130
|
-
return bindings[sessionId];
|
|
131
|
-
}
|
|
132
|
-
if (options.workspaceRoot?.trim()) {
|
|
133
|
-
return lookupWorkspaceBinding(bindings, options.workspaceRoot);
|
|
134
|
-
}
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
112
|
function resolveStatusLineSessionId(payload) {
|
|
138
113
|
const sessionId = payload.session_id?.trim();
|
|
139
114
|
return sessionId || undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deck-display.js","sourceRoot":"","sources":["../../src/schemas/deck-display.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"deck-display.js","sourceRoot":"","sources":["../../src/schemas/deck-display.ts"],"names":[],"mappings":";;;;;;AA2DA,wCAWC;AAED,gEAOC;AAED,8CA0CC;AAED,wDAEC;AAED,gEAGC;AAED,gEAQC;AA9ID,6BAAwB;AACxB,0DAA6B;AAEhB,QAAA,uBAAuB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC5C,kBAAkB;IAClB,KAAK;IACL,SAAS;CACV,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,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BAAuB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,+BAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/F,CAAC;AAED,SAAgB,sBAAsB,CAAC,aAAqB;IAC1D,OAAO,mBAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAgB,0BAA0B,CAAC,OAA0B;IACnE,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;IAC7C,OAAO,SAAS,IAAI,SAAS,CAAC;AAChC,CAAC;AAED,SAAgB,0BAA0B,CAAC,OAA0B,EAAE,WAAoB;IACzF,MAAM,UAAU,GAAG,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,sBAAsB,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,WAAW,EAAE,IAAI,EAAE,CAAC;IACjG,OAAO,GAAG,CAAC,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/** Dev monorepo / tsx — separate data dir from production `agent-deck start`. */
|
|
2
2
|
export declare function isAgentDeckDevMode(): boolean;
|
|
3
3
|
/**
|
|
4
|
-
* Agent Deck data root: SQLite, credential yaml metadata,
|
|
4
|
+
* Agent Deck data root: SQLite, credential yaml metadata, dev secret files.
|
|
5
5
|
* Production CLI → ~/.agent-deck
|
|
6
6
|
* Monorepo dev (AGENT_DECK_DEV=1) → ~/.agent-deck/dev
|
|
7
7
|
*/
|
|
8
8
|
export declare function resolveAgentDeckHome(): string;
|
|
9
|
-
export declare function resolveBindingsFilePath(): string;
|
|
10
|
-
/** Prod + dev sidecar paths (statusline / display must see binds from either workflow). */
|
|
11
|
-
export declare function listBindingsFileCandidates(): string[];
|
|
12
9
|
//# sourceMappingURL=agent-deck-home.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-deck-home.d.ts","sourceRoot":"","sources":["../../src/utils/agent-deck-home.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,wBAAgB,kBAAkB,IAAI,OAAO,CAS5C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAO7C
|
|
1
|
+
{"version":3,"file":"agent-deck-home.d.ts","sourceRoot":"","sources":["../../src/utils/agent-deck-home.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,wBAAgB,kBAAkB,IAAI,OAAO,CAS5C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAO7C"}
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.isAgentDeckDevMode = isAgentDeckDevMode;
|
|
7
7
|
exports.resolveAgentDeckHome = resolveAgentDeckHome;
|
|
8
|
-
exports.resolveBindingsFilePath = resolveBindingsFilePath;
|
|
9
|
-
exports.listBindingsFileCandidates = listBindingsFileCandidates;
|
|
10
8
|
const node_os_1 = __importDefault(require("node:os"));
|
|
11
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
10
|
/** Dev monorepo / tsx — separate data dir from production `agent-deck start`. */
|
|
@@ -21,7 +19,7 @@ function isAgentDeckDevMode() {
|
|
|
21
19
|
return process.env.NODE_ENV === 'development';
|
|
22
20
|
}
|
|
23
21
|
/**
|
|
24
|
-
* Agent Deck data root: SQLite, credential yaml metadata,
|
|
22
|
+
* Agent Deck data root: SQLite, credential yaml metadata, dev secret files.
|
|
25
23
|
* Production CLI → ~/.agent-deck
|
|
26
24
|
* Monorepo dev (AGENT_DECK_DEV=1) → ~/.agent-deck/dev
|
|
27
25
|
*/
|
|
@@ -32,20 +30,4 @@ function resolveAgentDeckHome() {
|
|
|
32
30
|
const base = node_path_1.default.join(node_os_1.default.homedir(), '.agent-deck');
|
|
33
31
|
return isAgentDeckDevMode() ? node_path_1.default.join(base, 'dev') : base;
|
|
34
32
|
}
|
|
35
|
-
function resolveBindingsFilePath() {
|
|
36
|
-
return node_path_1.default.join(resolveAgentDeckHome(), 'bindings.json');
|
|
37
|
-
}
|
|
38
|
-
/** Prod + dev sidecar paths (statusline / display must see binds from either workflow). */
|
|
39
|
-
function listBindingsFileCandidates() {
|
|
40
|
-
const base = node_path_1.default.join(node_os_1.default.homedir(), '.agent-deck');
|
|
41
|
-
const candidates = [
|
|
42
|
-
process.env.AGENT_DECK_HOME?.trim()
|
|
43
|
-
? node_path_1.default.join(node_path_1.default.resolve(process.env.AGENT_DECK_HOME.trim()), 'bindings.json')
|
|
44
|
-
: undefined,
|
|
45
|
-
resolveBindingsFilePath(),
|
|
46
|
-
node_path_1.default.join(base, 'bindings.json'),
|
|
47
|
-
node_path_1.default.join(base, 'dev', 'bindings.json'),
|
|
48
|
-
].filter((value) => Boolean(value));
|
|
49
|
-
return [...new Set(candidates)];
|
|
50
|
-
}
|
|
51
33
|
//# sourceMappingURL=agent-deck-home.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-deck-home.js","sourceRoot":"","sources":["../../src/utils/agent-deck-home.ts"],"names":[],"mappings":";;;;;AAKA,gDASC;AAOD,oDAOC;
|
|
1
|
+
{"version":3,"file":"agent-deck-home.js","sourceRoot":"","sources":["../../src/utils/agent-deck-home.ts"],"names":[],"mappings":";;;;;AAKA,gDASC;AAOD,oDAOC;AA3BD,sDAAyB;AACzB,0DAA6B;AAE7B,iFAAiF;AACjF,SAAgB,kBAAkB;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9D,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACtD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,EAAE,EAAE,CAAC;QACxC,OAAO,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,IAAI,GAAG,mBAAI,CAAC,IAAI,CAAC,iBAAE,CAAC,OAAO,EAAE,EAAE,aAAa,CAAC,CAAC;IACpD,OAAO,kBAAkB,EAAE,CAAC,CAAC,CAAC,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC"}
|