@agent-deck/shared 1.2.7 → 1.2.9
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/schemas/deck-display.d.ts +6 -102
- package/dist/schemas/deck-display.d.ts.map +1 -1
- package/dist/schemas/deck-display.js +11 -35
- 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
|
@@ -13,102 +13,8 @@ export declare const DeckCardCountsSchema: z.ZodObject<{
|
|
|
13
13
|
credentials: number;
|
|
14
14
|
playbooks: number;
|
|
15
15
|
}>;
|
|
16
|
-
export declare const BindingEntrySchema: z.ZodObject<{
|
|
17
|
-
deckId: z.ZodString;
|
|
18
|
-
deckName: z.ZodString;
|
|
19
|
-
source: z.ZodEnum<["session_override", "repo_manifest", "env"]>;
|
|
20
|
-
updatedAt: z.ZodString;
|
|
21
|
-
cardCounts: z.ZodObject<{
|
|
22
|
-
mcp: z.ZodNumber;
|
|
23
|
-
credentials: z.ZodNumber;
|
|
24
|
-
playbooks: z.ZodNumber;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
mcp: number;
|
|
27
|
-
credentials: number;
|
|
28
|
-
playbooks: number;
|
|
29
|
-
}, {
|
|
30
|
-
mcp: number;
|
|
31
|
-
credentials: number;
|
|
32
|
-
playbooks: number;
|
|
33
|
-
}>;
|
|
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
|
-
updatedAt: z.ZodString;
|
|
68
|
-
cardCounts: z.ZodObject<{
|
|
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>;
|
|
84
|
-
}, "strip", z.ZodTypeAny, {
|
|
85
|
-
updatedAt: string;
|
|
86
|
-
deckId: string;
|
|
87
|
-
deckName: string;
|
|
88
|
-
source: "env" | "session_override" | "repo_manifest";
|
|
89
|
-
cardCounts: {
|
|
90
|
-
mcp: number;
|
|
91
|
-
credentials: number;
|
|
92
|
-
playbooks: number;
|
|
93
|
-
};
|
|
94
|
-
oauthWarningCount?: number | undefined;
|
|
95
|
-
workspaceRoot?: string | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
updatedAt: string;
|
|
98
|
-
deckId: string;
|
|
99
|
-
deckName: string;
|
|
100
|
-
source: "env" | "session_override" | "repo_manifest";
|
|
101
|
-
cardCounts: {
|
|
102
|
-
mcp: number;
|
|
103
|
-
credentials: number;
|
|
104
|
-
playbooks: number;
|
|
105
|
-
};
|
|
106
|
-
oauthWarningCount?: number | undefined;
|
|
107
|
-
workspaceRoot?: string | undefined;
|
|
108
|
-
}>>;
|
|
109
16
|
export declare const DeckDisplaySchema: z.ZodObject<{
|
|
110
17
|
workspaceRoot: z.ZodString;
|
|
111
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
112
18
|
deckId: z.ZodNullable<z.ZodString>;
|
|
113
19
|
deckName: z.ZodNullable<z.ZodString>;
|
|
114
20
|
source: z.ZodEnum<["session_override", "repo_manifest", "env", "unbound"]>;
|
|
@@ -127,10 +33,12 @@ export declare const DeckDisplaySchema: z.ZodObject<{
|
|
|
127
33
|
}>;
|
|
128
34
|
oauthWarningCount: z.ZodOptional<z.ZodNumber>;
|
|
129
35
|
agentDeckOnline: z.ZodBoolean;
|
|
36
|
+
mcpOnline: z.ZodOptional<z.ZodBoolean>;
|
|
130
37
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
131
38
|
displayLine: z.ZodString;
|
|
132
39
|
}, "strip", z.ZodTypeAny, {
|
|
133
40
|
deckId: string | null;
|
|
41
|
+
workspaceRoot: string;
|
|
134
42
|
deckName: string | null;
|
|
135
43
|
source: "env" | "session_override" | "repo_manifest" | "unbound";
|
|
136
44
|
cardCounts: {
|
|
@@ -138,14 +46,14 @@ export declare const DeckDisplaySchema: z.ZodObject<{
|
|
|
138
46
|
credentials: number;
|
|
139
47
|
playbooks: number;
|
|
140
48
|
};
|
|
141
|
-
workspaceRoot: string;
|
|
142
49
|
agentDeckOnline: boolean;
|
|
143
50
|
displayLine: string;
|
|
144
51
|
updatedAt?: string | undefined;
|
|
145
52
|
oauthWarningCount?: number | undefined;
|
|
146
|
-
|
|
53
|
+
mcpOnline?: boolean | undefined;
|
|
147
54
|
}, {
|
|
148
55
|
deckId: string | null;
|
|
56
|
+
workspaceRoot: string;
|
|
149
57
|
deckName: string | null;
|
|
150
58
|
source: "env" | "session_override" | "repo_manifest" | "unbound";
|
|
151
59
|
cardCounts: {
|
|
@@ -153,12 +61,11 @@ export declare const DeckDisplaySchema: z.ZodObject<{
|
|
|
153
61
|
credentials: number;
|
|
154
62
|
playbooks: number;
|
|
155
63
|
};
|
|
156
|
-
workspaceRoot: string;
|
|
157
64
|
agentDeckOnline: boolean;
|
|
158
65
|
displayLine: string;
|
|
159
66
|
updatedAt?: string | undefined;
|
|
160
67
|
oauthWarningCount?: number | undefined;
|
|
161
|
-
|
|
68
|
+
mcpOnline?: boolean | undefined;
|
|
162
69
|
}>;
|
|
163
70
|
export declare const StatusLinePayloadSchema: z.ZodObject<{
|
|
164
71
|
session_id: z.ZodOptional<z.ZodString>;
|
|
@@ -190,8 +97,6 @@ export declare const StatusLinePayloadSchema: z.ZodObject<{
|
|
|
190
97
|
}>;
|
|
191
98
|
export type DeckDisplaySource = z.infer<typeof DeckDisplaySourceSchema>;
|
|
192
99
|
export type DeckCardCounts = z.infer<typeof DeckCardCountsSchema>;
|
|
193
|
-
export type BindingEntry = z.infer<typeof BindingEntrySchema>;
|
|
194
|
-
export type BindingsFile = z.infer<typeof BindingsFileSchema>;
|
|
195
100
|
export type DeckDisplay = z.infer<typeof DeckDisplaySchema>;
|
|
196
101
|
export type StatusLinePayload = z.infer<typeof StatusLinePayloadSchema>;
|
|
197
102
|
export declare const DISPLAY_LINE_MAX_LENGTH = 120;
|
|
@@ -205,11 +110,10 @@ export declare function countDeckCards(deck: {
|
|
|
205
110
|
export declare function formatDisplayUpdatedSuffix(updatedAt: string): string;
|
|
206
111
|
export declare function formatDisplayLine(deckName: string | null, counts: DeckCardCounts, options?: {
|
|
207
112
|
offline?: boolean;
|
|
113
|
+
mcpOffline?: boolean;
|
|
208
114
|
updatedAt?: string;
|
|
209
115
|
}): string;
|
|
210
116
|
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
117
|
export declare function resolveStatusLineSessionId(payload: StatusLinePayload): string | undefined;
|
|
214
118
|
export declare function resolveStatusLineWorkspace(payload: StatusLinePayload, fallbackCwd?: string): string | undefined;
|
|
215
119
|
//# 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,oEAKlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,
|
|
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,oEAKlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;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,11 @@ 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.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
11
|
exports.resolveStatusLineSessionId = resolveStatusLineSessionId;
|
|
13
12
|
exports.resolveStatusLineWorkspace = resolveStatusLineWorkspace;
|
|
14
13
|
const zod_1 = require("zod");
|
|
@@ -24,27 +23,15 @@ exports.DeckCardCountsSchema = zod_1.z.object({
|
|
|
24
23
|
credentials: zod_1.z.number().int().min(0),
|
|
25
24
|
playbooks: zod_1.z.number().int().min(0),
|
|
26
25
|
});
|
|
27
|
-
exports.BindingEntrySchema = zod_1.z.object({
|
|
28
|
-
deckId: zod_1.z.string().uuid(),
|
|
29
|
-
deckName: zod_1.z.string(),
|
|
30
|
-
source: zod_1.z.enum(['session_override', 'repo_manifest', 'env']),
|
|
31
|
-
updatedAt: zod_1.z.string().datetime(),
|
|
32
|
-
cardCounts: exports.DeckCardCountsSchema,
|
|
33
|
-
oauthWarningCount: zod_1.z.number().int().min(0).optional(),
|
|
34
|
-
/** Workspace at bind time (metadata only; display is keyed by session). */
|
|
35
|
-
workspaceRoot: zod_1.z.string().optional(),
|
|
36
|
-
});
|
|
37
|
-
/** Keys are host/MCP session ids (see StatusLinePayload.session_id). */
|
|
38
|
-
exports.BindingsFileSchema = zod_1.z.record(zod_1.z.string(), exports.BindingEntrySchema);
|
|
39
26
|
exports.DeckDisplaySchema = zod_1.z.object({
|
|
40
27
|
workspaceRoot: zod_1.z.string(),
|
|
41
|
-
sessionId: zod_1.z.string().nullable().optional(),
|
|
42
28
|
deckId: zod_1.z.string().uuid().nullable(),
|
|
43
29
|
deckName: zod_1.z.string().nullable(),
|
|
44
30
|
source: exports.DeckDisplaySourceSchema,
|
|
45
31
|
cardCounts: exports.DeckCardCountsSchema,
|
|
46
32
|
oauthWarningCount: zod_1.z.number().int().min(0).optional(),
|
|
47
33
|
agentDeckOnline: zod_1.z.boolean(),
|
|
34
|
+
mcpOnline: zod_1.z.boolean().optional(),
|
|
48
35
|
updatedAt: zod_1.z.string().datetime().optional(),
|
|
49
36
|
displayLine: zod_1.z.string(),
|
|
50
37
|
});
|
|
@@ -85,43 +72,32 @@ function formatDisplayLine(deckName, counts, options) {
|
|
|
85
72
|
: offlineLine;
|
|
86
73
|
}
|
|
87
74
|
if (!deckName) {
|
|
88
|
-
|
|
75
|
+
const unboundLine = `${prefix}Unbound — bind a deck to use Agent Deck`;
|
|
76
|
+
const withMcp = options?.mcpOffline ? `${unboundLine} · MCP offline` : unboundLine;
|
|
77
|
+
return withMcp.length > exports.DISPLAY_LINE_MAX_LENGTH
|
|
78
|
+
? withMcp.slice(0, exports.DISPLAY_LINE_MAX_LENGTH)
|
|
79
|
+
: withMcp;
|
|
89
80
|
}
|
|
90
81
|
const countsPart = `${counts.mcp} MCP · ${counts.credentials} keys · ${counts.playbooks} playbooks`;
|
|
91
82
|
const separator = ' · ';
|
|
92
|
-
const
|
|
83
|
+
const mcpSuffix = options?.mcpOffline ? ' · MCP offline' : '';
|
|
84
|
+
const suffixLength = updatedSuffix.length + mcpSuffix.length;
|
|
93
85
|
const fixedLength = prefix.length + separator.length + countsPart.length + suffixLength;
|
|
94
86
|
const maxNameLength = exports.DISPLAY_LINE_MAX_LENGTH - fixedLength;
|
|
95
87
|
let name = deckName;
|
|
96
88
|
if (maxNameLength < 1) {
|
|
97
|
-
const line = `${prefix}${countsPart}${updatedSuffix}`;
|
|
89
|
+
const line = `${prefix}${countsPart}${mcpSuffix}${updatedSuffix}`;
|
|
98
90
|
return line.length > exports.DISPLAY_LINE_MAX_LENGTH ? line.slice(0, exports.DISPLAY_LINE_MAX_LENGTH) : line;
|
|
99
91
|
}
|
|
100
92
|
if (name.length > maxNameLength) {
|
|
101
93
|
name = `${name.slice(0, Math.max(1, maxNameLength - 1))}…`;
|
|
102
94
|
}
|
|
103
|
-
const line = `${prefix}${name}${separator}${countsPart}${updatedSuffix}`;
|
|
95
|
+
const line = `${prefix}${name}${separator}${countsPart}${mcpSuffix}${updatedSuffix}`;
|
|
104
96
|
return line.length > exports.DISPLAY_LINE_MAX_LENGTH ? line.slice(0, exports.DISPLAY_LINE_MAX_LENGTH) : line;
|
|
105
97
|
}
|
|
106
98
|
function normalizeWorkspaceRoot(workspaceRoot) {
|
|
107
99
|
return node_path_1.default.resolve(workspaceRoot.trim());
|
|
108
100
|
}
|
|
109
|
-
/** Walk up from workspaceRoot to find the nearest bindings sidecar entry. */
|
|
110
|
-
function lookupWorkspaceBinding(bindings, workspaceRoot) {
|
|
111
|
-
let current = normalizeWorkspaceRoot(workspaceRoot);
|
|
112
|
-
while (true) {
|
|
113
|
-
const entry = bindings[current];
|
|
114
|
-
if (entry) {
|
|
115
|
-
return entry;
|
|
116
|
-
}
|
|
117
|
-
const parent = node_path_1.default.dirname(current);
|
|
118
|
-
if (parent === current) {
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
current = parent;
|
|
122
|
-
}
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
101
|
function resolveStatusLineSessionId(payload) {
|
|
126
102
|
const sessionId = payload.session_id?.trim();
|
|
127
103
|
return sessionId || undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deck-display.js","sourceRoot":"","sources":["../../src/schemas/deck-display.ts"],"names":[],"mappings":";;;;;;AA+
|
|
1
|
+
{"version":3,"file":"deck-display.js","sourceRoot":"","sources":["../../src/schemas/deck-display.ts"],"names":[],"mappings":";;;;;;AA+CA,wCAWC;AAED,gEAOC;AAED,8CAyCC;AAED,wDAEC;AAED,gEAGC;AAED,gEAQC;AAjID,6BAAwB;AACxB,0DAA6B;AAEhB,QAAA,uBAAuB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC5C,kBAAkB;IAClB,eAAe;IACf,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,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACnC,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,+BAAuB;IAC/B,UAAU,EAAE,4BAAoB;IAChC,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACrD,eAAe,EAAE,OAAC,CAAC,OAAO,EAAE;IAC5B,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;I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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"}
|