@agent-deck/shared 1.8.1 → 1.8.2
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 +1 -1
- package/dist/constants/client-scope.d.ts.map +1 -1
- package/dist/constants/client-scope.js +1 -1
- package/dist/constants/client-scope.js.map +1 -1
- package/dist/schemas/trusted-session.d.ts +21 -10
- package/dist/schemas/trusted-session.d.ts.map +1 -1
- package/dist/schemas/trusted-session.js +15 -9
- package/dist/schemas/trusted-session.js.map +1 -1
- package/dist/utils/git-exclude.d.ts +8 -0
- package/dist/utils/git-exclude.d.ts.map +1 -0
- package/dist/utils/git-exclude.js +61 -0
- package/dist/utils/git-exclude.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,6 @@ export declare const AGENT_DECK_DASHBOARD_CLIENT = "dashboard";
|
|
|
6
6
|
export declare const AGENT_DECK_AGENT_CLIENT = "agent";
|
|
7
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
|
+
/** Launch-selected deck (NOT-105). */
|
|
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,uEAAuE;AACvE,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAEpE,
|
|
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,sCAAsC;AACtC,eAAO,MAAM,yBAAyB,yBAAyB,CAAC"}
|
|
@@ -9,6 +9,6 @@ exports.AGENT_DECK_DASHBOARD_CLIENT = 'dashboard';
|
|
|
9
9
|
exports.AGENT_DECK_AGENT_CLIENT = 'agent';
|
|
10
10
|
/** Workspace root for session grouping and display (agent clients). */
|
|
11
11
|
exports.AGENT_DECK_WORKSPACE_HEADER = 'x-agent-deck-workspace';
|
|
12
|
-
/**
|
|
12
|
+
/** Launch-selected deck (NOT-105). */
|
|
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,uEAAuE;AAC1D,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AAEpE,
|
|
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,sCAAsC;AACzB,QAAA,yBAAyB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const AgentSessionModeSchema: z.ZodEnum<["normal", "agent-admin"]>;
|
|
3
|
-
export declare const TrustedSessionErrorCodeSchema: z.ZodEnum<["GRANT_REQUIRED", "SESSION_INVALID", "SESSION_REVOKED", "
|
|
3
|
+
export declare const TrustedSessionErrorCodeSchema: z.ZodEnum<["GRANT_REQUIRED", "SESSION_INVALID", "SESSION_REVOKED", "RESOURCE_OUT_OF_SCOPE", "ADMIN_REQUIRED", "DASHBOARD_REQUIRED", "ADMIN_CHALLENGE_EXPIRED", "DECK_FIXED"]>;
|
|
4
|
+
/** @deprecated Legacy v2 grant file shape — CLI reads for migration only (NOT-108). */
|
|
4
5
|
export declare const WorkspaceGrantStatusSchema: z.ZodEnum<["pending", "active", "revoked"]>;
|
|
5
6
|
export declare const RuntimeSessionSchema: z.ZodObject<{
|
|
6
7
|
sessionId: z.ZodString;
|
|
7
8
|
mcpSessionId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
workspaceKey: z.ZodString;
|
|
9
|
-
workspaceGrantId: z.ZodString;
|
|
10
9
|
deckId: z.ZodString;
|
|
11
10
|
mode: z.ZodEnum<["normal", "agent-admin"]>;
|
|
12
11
|
lastSeenAt: z.ZodString;
|
|
@@ -17,8 +16,6 @@ export declare const RuntimeSessionSchema: z.ZodObject<{
|
|
|
17
16
|
expiresAt: string;
|
|
18
17
|
mode: "normal" | "agent-admin";
|
|
19
18
|
sessionId: string;
|
|
20
|
-
workspaceKey: string;
|
|
21
|
-
workspaceGrantId: string;
|
|
22
19
|
lastSeenAt: string;
|
|
23
20
|
adminExpiresAt: string | null;
|
|
24
21
|
mcpSessionId?: string | undefined;
|
|
@@ -27,12 +24,11 @@ export declare const RuntimeSessionSchema: z.ZodObject<{
|
|
|
27
24
|
expiresAt: string;
|
|
28
25
|
mode: "normal" | "agent-admin";
|
|
29
26
|
sessionId: string;
|
|
30
|
-
workspaceKey: string;
|
|
31
|
-
workspaceGrantId: string;
|
|
32
27
|
lastSeenAt: string;
|
|
33
28
|
adminExpiresAt: string | null;
|
|
34
29
|
mcpSessionId?: string | undefined;
|
|
35
30
|
}>;
|
|
31
|
+
/** Legacy v2 grant manifest — CLI assignment migration only. */
|
|
36
32
|
export declare const WorkspaceGrantManifestSchema: z.ZodObject<{
|
|
37
33
|
version: z.ZodLiteral<2>;
|
|
38
34
|
workspaceKey: z.ZodString;
|
|
@@ -64,9 +60,25 @@ export declare const WorkspaceGrantManifestSchema: z.ZodObject<{
|
|
|
64
60
|
mcpUrl?: string | undefined;
|
|
65
61
|
store?: "file" | "keychain" | undefined;
|
|
66
62
|
}>;
|
|
63
|
+
/** Plain folder→deck assignment (NOT-108). No secret. */
|
|
64
|
+
export declare const WorkspaceAssignmentSchema: z.ZodObject<{
|
|
65
|
+
version: z.ZodLiteral<3>;
|
|
66
|
+
deckId: z.ZodString;
|
|
67
|
+
deckName: z.ZodString;
|
|
68
|
+
mcpUrl: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, "strict", z.ZodTypeAny, {
|
|
70
|
+
deckId: string;
|
|
71
|
+
version: 3;
|
|
72
|
+
deckName: string;
|
|
73
|
+
mcpUrl?: string | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
deckId: string;
|
|
76
|
+
version: 3;
|
|
77
|
+
deckName: string;
|
|
78
|
+
mcpUrl?: string | undefined;
|
|
79
|
+
}>;
|
|
67
80
|
export declare const RedactedSessionBindingSchema: z.ZodObject<{
|
|
68
81
|
sessionId: z.ZodString;
|
|
69
|
-
workspaceKey: z.ZodString;
|
|
70
82
|
deckId: z.ZodString;
|
|
71
83
|
deckName: z.ZodOptional<z.ZodString>;
|
|
72
84
|
mode: z.ZodEnum<["normal", "agent-admin"]>;
|
|
@@ -78,7 +90,6 @@ export declare const RedactedSessionBindingSchema: z.ZodObject<{
|
|
|
78
90
|
expiresAt: string;
|
|
79
91
|
mode: "normal" | "agent-admin";
|
|
80
92
|
sessionId: string;
|
|
81
|
-
workspaceKey: string;
|
|
82
93
|
deckName?: string | undefined;
|
|
83
94
|
adminExpiresAt?: string | null | undefined;
|
|
84
95
|
display_summary?: string | undefined;
|
|
@@ -87,7 +98,6 @@ export declare const RedactedSessionBindingSchema: z.ZodObject<{
|
|
|
87
98
|
expiresAt: string;
|
|
88
99
|
mode: "normal" | "agent-admin";
|
|
89
100
|
sessionId: string;
|
|
90
|
-
workspaceKey: string;
|
|
91
101
|
deckName?: string | undefined;
|
|
92
102
|
adminExpiresAt?: string | null | undefined;
|
|
93
103
|
display_summary?: string | undefined;
|
|
@@ -97,6 +107,7 @@ export type TrustedSessionErrorCode = z.infer<typeof TrustedSessionErrorCodeSche
|
|
|
97
107
|
export type WorkspaceGrantStatus = z.infer<typeof WorkspaceGrantStatusSchema>;
|
|
98
108
|
export type RuntimeSession = z.infer<typeof RuntimeSessionSchema>;
|
|
99
109
|
export type WorkspaceGrantManifest = z.infer<typeof WorkspaceGrantManifestSchema>;
|
|
110
|
+
export type WorkspaceAssignment = z.infer<typeof WorkspaceAssignmentSchema>;
|
|
100
111
|
export type RedactedSessionBinding = z.infer<typeof RedactedSessionBindingSchema>;
|
|
101
112
|
export type TrustedSessionErrorBody = {
|
|
102
113
|
success: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trusted-session.d.ts","sourceRoot":"","sources":["../../src/schemas/trusted-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB,sCAAoC,CAAC;AAExE,eAAO,MAA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f,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,uBAAuB,CAAC;CACrC,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,uBAAuB,EAC7B,OAAO,EAAE,MAAM,GACd,uBAAuB,CAEzB;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,uBAAuB,GAAG,MAAM,CAgB/E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RedactedSessionBindingSchema = exports.WorkspaceGrantManifestSchema = exports.RuntimeSessionSchema = exports.WorkspaceGrantStatusSchema = exports.TrustedSessionErrorCodeSchema = exports.AgentSessionModeSchema = void 0;
|
|
3
|
+
exports.RedactedSessionBindingSchema = exports.WorkspaceAssignmentSchema = exports.WorkspaceGrantManifestSchema = exports.RuntimeSessionSchema = exports.WorkspaceGrantStatusSchema = exports.TrustedSessionErrorCodeSchema = exports.AgentSessionModeSchema = void 0;
|
|
4
4
|
exports.trustedSessionError = trustedSessionError;
|
|
5
5
|
exports.httpStatusForTrustedError = httpStatusForTrustedError;
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -9,21 +9,19 @@ exports.TrustedSessionErrorCodeSchema = zod_1.z.enum([
|
|
|
9
9
|
'GRANT_REQUIRED',
|
|
10
10
|
'SESSION_INVALID',
|
|
11
11
|
'SESSION_REVOKED',
|
|
12
|
-
'WORKSPACE_SCOPE_MISMATCH',
|
|
13
12
|
'RESOURCE_OUT_OF_SCOPE',
|
|
14
13
|
'ADMIN_REQUIRED',
|
|
15
14
|
'DASHBOARD_REQUIRED',
|
|
16
15
|
'ADMIN_CHALLENGE_EXPIRED',
|
|
17
|
-
/**
|
|
18
|
-
'
|
|
16
|
+
/** Launch-selected deck cannot be changed by the agent (NOT-105). */
|
|
17
|
+
'DECK_FIXED',
|
|
19
18
|
]);
|
|
19
|
+
/** @deprecated Legacy v2 grant file shape — CLI reads for migration only (NOT-108). */
|
|
20
20
|
exports.WorkspaceGrantStatusSchema = zod_1.z.enum(['pending', 'active', 'revoked']);
|
|
21
21
|
exports.RuntimeSessionSchema = zod_1.z
|
|
22
22
|
.object({
|
|
23
23
|
sessionId: zod_1.z.string(),
|
|
24
24
|
mcpSessionId: zod_1.z.string().optional(),
|
|
25
|
-
workspaceKey: zod_1.z.string(),
|
|
26
|
-
workspaceGrantId: zod_1.z.string(),
|
|
27
25
|
deckId: zod_1.z.string(),
|
|
28
26
|
mode: exports.AgentSessionModeSchema,
|
|
29
27
|
lastSeenAt: zod_1.z.string().datetime(),
|
|
@@ -31,6 +29,7 @@ exports.RuntimeSessionSchema = zod_1.z
|
|
|
31
29
|
adminExpiresAt: zod_1.z.string().datetime().nullable(),
|
|
32
30
|
})
|
|
33
31
|
.strict();
|
|
32
|
+
/** Legacy v2 grant manifest — CLI assignment migration only. */
|
|
34
33
|
exports.WorkspaceGrantManifestSchema = zod_1.z
|
|
35
34
|
.object({
|
|
36
35
|
version: zod_1.z.literal(2),
|
|
@@ -44,10 +43,18 @@ exports.WorkspaceGrantManifestSchema = zod_1.z
|
|
|
44
43
|
updatedAt: zod_1.z.string().datetime(),
|
|
45
44
|
})
|
|
46
45
|
.strict();
|
|
46
|
+
/** Plain folder→deck assignment (NOT-108). No secret. */
|
|
47
|
+
exports.WorkspaceAssignmentSchema = zod_1.z
|
|
48
|
+
.object({
|
|
49
|
+
version: zod_1.z.literal(3),
|
|
50
|
+
deckId: zod_1.z.string().min(1),
|
|
51
|
+
deckName: zod_1.z.string().min(1),
|
|
52
|
+
mcpUrl: zod_1.z.string().url().optional(),
|
|
53
|
+
})
|
|
54
|
+
.strict();
|
|
47
55
|
exports.RedactedSessionBindingSchema = zod_1.z
|
|
48
56
|
.object({
|
|
49
57
|
sessionId: zod_1.z.string(),
|
|
50
|
-
workspaceKey: zod_1.z.string(),
|
|
51
58
|
deckId: zod_1.z.string(),
|
|
52
59
|
deckName: zod_1.z.string().optional(),
|
|
53
60
|
mode: exports.AgentSessionModeSchema,
|
|
@@ -65,11 +72,10 @@ function httpStatusForTrustedError(code) {
|
|
|
65
72
|
case 'SESSION_INVALID':
|
|
66
73
|
case 'SESSION_REVOKED':
|
|
67
74
|
return 401;
|
|
68
|
-
case 'WORKSPACE_SCOPE_MISMATCH':
|
|
69
75
|
case 'RESOURCE_OUT_OF_SCOPE':
|
|
70
76
|
case 'ADMIN_REQUIRED':
|
|
71
77
|
case 'DASHBOARD_REQUIRED':
|
|
72
|
-
case '
|
|
78
|
+
case 'DECK_FIXED':
|
|
73
79
|
return 403;
|
|
74
80
|
case 'ADMIN_CHALLENGE_EXPIRED':
|
|
75
81
|
return 410;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trusted-session.js","sourceRoot":"","sources":["../../src/schemas/trusted-session.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"trusted-session.js","sourceRoot":"","sources":["../../src/schemas/trusted-session.ts"],"names":[],"mappings":";;;AAkFA,kDAKC;AAED,8DAgBC;AAzGD,6BAAwB;AAEX,QAAA,sBAAsB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAE3D,QAAA,6BAA6B,GAAG,OAAC,CAAC,IAAI,CAAC;IAClD,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,uBAAuB;IACvB,gBAAgB;IAChB,oBAAoB;IACpB,yBAAyB;IACzB,qEAAqE;IACrE,YAAY;CACb,CAAC,CAAC;AAEH,uFAAuF;AAC1E,QAAA,0BAA0B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAEtE,QAAA,oBAAoB,GAAG,OAAC;KAClC,MAAM,CAAC;IACN,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;IACrB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAA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DECK_GIT_EXCLUDE_PATTERNS: readonly ["/.agent-deck/", "/.cursor/rules/agent-deck-stubs/", "/.claude/skills/agent-deck-*/"];
|
|
3
|
+
/**
|
|
4
|
+
* Append patterns to the repo's `.git/info/exclude` (local only).
|
|
5
|
+
* No-op when `root` is not a git working tree. Idempotent.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureGitExcluded(root: string, patterns?: readonly string[]): void;
|
|
8
|
+
//# sourceMappingURL=git-exclude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-exclude.d.ts","sourceRoot":"","sources":["../../src/utils/git-exclude.ts"],"names":[],"mappings":"AAIA,sEAAsE;AACtE,eAAO,MAAM,+BAA+B,iGAIlC,CAAC;AAEX;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,SAAS,MAAM,EAAoC,GAC5D,IAAI,CA8CN"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AGENT_DECK_GIT_EXCLUDE_PATTERNS = void 0;
|
|
7
|
+
exports.ensureGitExcluded = ensureGitExcluded;
|
|
8
|
+
const node_child_process_1 = require("node:child_process");
|
|
9
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
+
/** Default patterns that Agent Deck writes under a project folder. */
|
|
12
|
+
exports.AGENT_DECK_GIT_EXCLUDE_PATTERNS = [
|
|
13
|
+
'/.agent-deck/',
|
|
14
|
+
'/.cursor/rules/agent-deck-stubs/',
|
|
15
|
+
'/.claude/skills/agent-deck-*/',
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Append patterns to the repo's `.git/info/exclude` (local only).
|
|
19
|
+
* No-op when `root` is not a git working tree. Idempotent.
|
|
20
|
+
*/
|
|
21
|
+
function ensureGitExcluded(root, patterns = exports.AGENT_DECK_GIT_EXCLUDE_PATTERNS) {
|
|
22
|
+
if (patterns.length === 0) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
let excludeRel;
|
|
26
|
+
try {
|
|
27
|
+
excludeRel = (0, node_child_process_1.execFileSync)('git', ['-C', root, 'rev-parse', '--git-path', 'info/exclude'], {
|
|
28
|
+
encoding: 'utf8',
|
|
29
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
30
|
+
}).trim();
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!excludeRel) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const excludePath = node_path_1.default.isAbsolute(excludeRel) ? excludeRel : node_path_1.default.resolve(root, excludeRel);
|
|
39
|
+
node_fs_1.default.mkdirSync(node_path_1.default.dirname(excludePath), { recursive: true });
|
|
40
|
+
let existing = '';
|
|
41
|
+
try {
|
|
42
|
+
existing = node_fs_1.default.readFileSync(excludePath, 'utf8');
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const nodeError = error;
|
|
46
|
+
if (nodeError.code !== 'ENOENT') {
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const present = new Set(existing
|
|
51
|
+
.split(/\r?\n/)
|
|
52
|
+
.map((line) => line.trim())
|
|
53
|
+
.filter((line) => line.length > 0 && !line.startsWith('#')));
|
|
54
|
+
const toAppend = patterns.filter((pattern) => !present.has(pattern));
|
|
55
|
+
if (toAppend.length === 0) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const prefix = existing.length === 0 || existing.endsWith('\n') ? '' : '\n';
|
|
59
|
+
node_fs_1.default.writeFileSync(excludePath, `${prefix}${toAppend.join('\n')}\n`, 'utf8');
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=git-exclude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-exclude.js","sourceRoot":"","sources":["../../src/utils/git-exclude.ts"],"names":[],"mappings":";;;;;;AAeA,8CAiDC;AAhED,2DAAkD;AAClD,sDAAyB;AACzB,0DAA6B;AAE7B,sEAAsE;AACzD,QAAA,+BAA+B,GAAG;IAC7C,eAAe;IACf,kCAAkC;IAClC,+BAA+B;CACvB,CAAC;AAEX;;;GAGG;AACH,SAAgB,iBAAiB,CAC/B,IAAY,EACZ,WAA8B,uCAA+B;IAE7D,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,IAAI,UAAkB,CAAC;IACvB,IAAI,CAAC;QACH,UAAU,GAAG,IAAA,iCAAY,EAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,EAAE;YACxF,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;IAED,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GAAG,mBAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAI,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC9F,iBAAE,CAAC,SAAS,CAAC,mBAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,CAAC;QACH,QAAQ,GAAG,iBAA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AY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -26,4 +26,5 @@ __exportStar(require("./local-mcp-manifest"), exports);
|
|
|
26
26
|
__exportStar(require("./agent-deck-home"), exports);
|
|
27
27
|
__exportStar(require("./trigger-hygiene"), exports);
|
|
28
28
|
__exportStar(require("./workspace-key"), exports);
|
|
29
|
+
__exportStar(require("./git-exclude"), exports);
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,+CAA6B;AAC7B,6CAA2B;AAC3B,+CAA6B;AAC7B,6CAA2B;AAC3B,0DAAwC;AACxC,wDAAsC;AACtC,kDAAgC;AAChC,uDAAqC;AACrC,oDAAkC;AAClC,oDAAkC;AAClC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,+CAA6B;AAC7B,6CAA2B;AAC3B,+CAA6B;AAC7B,6CAA2B;AAC3B,0DAAwC;AACxC,wDAAsC;AACtC,kDAAgC;AAChC,uDAAqC;AACrC,oDAAkC;AAClC,oDAAkC;AAClC,kDAAgC;AAChC,gDAA8B"}
|