@agent-deck/cli 2.4.0 → 2.5.1
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/agent-harness.js +1 -1
- package/dist/codex-plugin.d.ts +30 -8
- package/dist/codex-plugin.d.ts.map +1 -1
- package/dist/codex-plugin.js +141 -22
- package/dist/codex-plugin.js.map +1 -1
- package/dist/cursor-mcp-inspect.d.ts +7 -6
- package/dist/cursor-mcp-inspect.d.ts.map +1 -1
- package/dist/cursor-mcp-inspect.js +59 -30
- package/dist/cursor-mcp-inspect.js.map +1 -1
- package/dist/debug-mcp.d.ts.map +1 -1
- package/dist/debug-mcp.js +50 -12
- package/dist/debug-mcp.js.map +1 -1
- package/dist/host-connection.d.ts +159 -0
- package/dist/host-connection.d.ts.map +1 -0
- package/dist/host-connection.js +568 -0
- package/dist/host-connection.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/launcher-migration.d.ts +65 -0
- package/dist/launcher-migration.d.ts.map +1 -0
- package/dist/launcher-migration.js +383 -0
- package/dist/launcher-migration.js.map +1 -0
- package/dist/mcp-bridge.d.ts.map +1 -1
- package/dist/mcp-bridge.js +5 -0
- package/dist/mcp-bridge.js.map +1 -1
- package/dist/mcp-config.d.ts +120 -52
- package/dist/mcp-config.d.ts.map +1 -1
- package/dist/mcp-config.js +562 -195
- package/dist/mcp-config.js.map +1 -1
- package/dist/mcp-launcher.d.ts.map +1 -1
- package/dist/mcp-launcher.js +7 -0
- package/dist/mcp-launcher.js.map +1 -1
- package/dist/menubar.d.ts +7 -0
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +11 -1
- package/dist/menubar.js.map +1 -1
- package/dist/muse-skills/agent-deck-session/SKILL.md +9 -6
- package/dist/muse-skills/agent-deck-setup/SKILL.md +21 -5
- package/dist/setup.d.ts +3 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +152 -42
- package/dist/setup.js.map +1 -1
- package/dist/start.d.ts +4 -1
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +25 -4
- package/dist/start.js.map +1 -1
- package/dist/upgrade-scan.d.ts +20 -0
- package/dist/upgrade-scan.d.ts.map +1 -0
- package/dist/upgrade-scan.js +113 -0
- package/dist/upgrade-scan.js.map +1 -0
- package/dist/upgrade.d.ts.map +1 -1
- package/dist/upgrade.js +89 -5
- package/dist/upgrade.js.map +1 -1
- package/dist/use.d.ts +1 -1
- package/dist/use.d.ts.map +1 -1
- package/dist/use.js +92 -48
- package/dist/use.js.map +1 -1
- package/package.json +3 -3
- package/dist/coordinator.d.ts +0 -2
- package/dist/coordinator.d.ts.map +0 -1
- package/dist/coordinator.js +0 -153
- package/dist/coordinator.js.map +0 -1
- package/dist/grant-issue.d.ts +0 -39
- package/dist/grant-issue.d.ts.map +0 -1
- package/dist/grant-issue.js +0 -133
- package/dist/grant-issue.js.map +0 -1
- package/dist/grant-store.d.ts +0 -35
- package/dist/grant-store.d.ts.map +0 -1
- package/dist/grant-store.js +0 -302
- package/dist/grant-store.js.map +0 -1
- package/dist/run-adapter.d.ts +0 -100
- package/dist/run-adapter.d.ts.map +0 -1
- package/dist/run-adapter.js +0 -73
- package/dist/run-adapter.js.map +0 -1
- package/dist/run-claude.d.ts +0 -41
- package/dist/run-claude.d.ts.map +0 -1
- package/dist/run-claude.js +0 -91
- package/dist/run-claude.js.map +0 -1
- package/dist/run-codex.d.ts +0 -75
- package/dist/run-codex.d.ts.map +0 -1
- package/dist/run-codex.js +0 -337
- package/dist/run-codex.js.map +0 -1
- package/dist/run-cursor.d.ts +0 -79
- package/dist/run-cursor.d.ts.map +0 -1
- package/dist/run-cursor.js +0 -455
- package/dist/run-cursor.js.map +0 -1
- package/dist/run-muse.d.ts +0 -127
- package/dist/run-muse.d.ts.map +0 -1
- package/dist/run-muse.js +0 -499
- package/dist/run-muse.js.map +0 -1
package/dist/grant-issue.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatTrustedWriterError = formatTrustedWriterError;
|
|
4
|
-
exports.issueWorkspaceGrant = issueWorkspaceGrant;
|
|
5
|
-
exports.activateWorkspaceGrant = activateWorkspaceGrant;
|
|
6
|
-
exports.revokePendingWorkspaceGrant = revokePendingWorkspaceGrant;
|
|
7
|
-
exports.toGrantManifest = toGrantManifest;
|
|
8
|
-
const defaults_1 = require("./defaults");
|
|
9
|
-
const admin_secret_1 = require("./admin-secret");
|
|
10
|
-
function resolveBackendUrl(host) {
|
|
11
|
-
return `http://${host}:${(0, defaults_1.readCliBackendPort)()}`;
|
|
12
|
-
}
|
|
13
|
-
async function trustedWriterAuth() {
|
|
14
|
-
const adminSecret = await (0, admin_secret_1.readAdminSecret)();
|
|
15
|
-
if (!adminSecret) {
|
|
16
|
-
return {
|
|
17
|
-
ok: false,
|
|
18
|
-
error: 'No admin secret — run `agent-deck setup` or `agent-deck start` once to initialize ~/.agent-deck/admin-secret',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
ok: true,
|
|
23
|
-
authorization: `Bearer ${adminSecret}`,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/** Prefer Fastify `message` / API `error` over a bare status phrase like "Bad Request". */
|
|
27
|
-
function formatTrustedWriterError(status, payload, fallback) {
|
|
28
|
-
const detail = payload?.message?.trim() || payload?.error?.trim();
|
|
29
|
-
if (detail && detail.toLowerCase() !== 'bad request' && detail.toLowerCase() !== 'error') {
|
|
30
|
-
return detail;
|
|
31
|
-
}
|
|
32
|
-
if (payload?.error?.trim() && payload.error.trim().toLowerCase() !== 'bad request') {
|
|
33
|
-
return payload.error.trim();
|
|
34
|
-
}
|
|
35
|
-
if (detail) {
|
|
36
|
-
return `${detail} (${status})`;
|
|
37
|
-
}
|
|
38
|
-
return `${fallback} (${status})`;
|
|
39
|
-
}
|
|
40
|
-
async function readJsonPayload(response) {
|
|
41
|
-
try {
|
|
42
|
-
return (await response.json());
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
async function issueWorkspaceGrant(input) {
|
|
49
|
-
const auth = await trustedWriterAuth();
|
|
50
|
-
if (!auth.ok) {
|
|
51
|
-
return { error: auth.error };
|
|
52
|
-
}
|
|
53
|
-
const backendUrl = resolveBackendUrl(input.host ?? process.env.AGENT_DECK_HOST ?? '127.0.0.1');
|
|
54
|
-
const response = await fetch(`${backendUrl}/api/trusted-session/workspace-grants/issue`, {
|
|
55
|
-
method: 'POST',
|
|
56
|
-
headers: {
|
|
57
|
-
Authorization: auth.authorization,
|
|
58
|
-
'Content-Type': 'application/json',
|
|
59
|
-
},
|
|
60
|
-
body: JSON.stringify({
|
|
61
|
-
workspaceRoot: input.workspaceRoot,
|
|
62
|
-
deckId: input.deckId,
|
|
63
|
-
}),
|
|
64
|
-
});
|
|
65
|
-
const payload = await readJsonPayload(response);
|
|
66
|
-
const data = payload?.data;
|
|
67
|
-
if (!response.ok || !payload?.success || !data) {
|
|
68
|
-
return {
|
|
69
|
-
error: formatTrustedWriterError(response.status, payload, 'Grant issuance failed'),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
return data;
|
|
73
|
-
}
|
|
74
|
-
async function activateWorkspaceGrant(input) {
|
|
75
|
-
const auth = await trustedWriterAuth();
|
|
76
|
-
if (!auth.ok) {
|
|
77
|
-
return { error: auth.error };
|
|
78
|
-
}
|
|
79
|
-
const backendUrl = resolveBackendUrl(input.host ?? process.env.AGENT_DECK_HOST ?? '127.0.0.1');
|
|
80
|
-
// Fastify rejects Content-Type: application/json with an empty body
|
|
81
|
-
// (FST_ERR_CTP_EMPTY_JSON_BODY). Send {}.
|
|
82
|
-
const response = await fetch(`${backendUrl}/api/trusted-session/workspace-grants/${encodeURIComponent(input.grantId)}/activate`, {
|
|
83
|
-
method: 'POST',
|
|
84
|
-
headers: {
|
|
85
|
-
Authorization: auth.authorization,
|
|
86
|
-
'Content-Type': 'application/json',
|
|
87
|
-
},
|
|
88
|
-
body: '{}',
|
|
89
|
-
});
|
|
90
|
-
const payload = await readJsonPayload(response);
|
|
91
|
-
const data = payload?.data;
|
|
92
|
-
if (!response.ok || !payload?.success || !data) {
|
|
93
|
-
return {
|
|
94
|
-
error: formatTrustedWriterError(response.status, payload, 'Grant activation failed'),
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return data;
|
|
98
|
-
}
|
|
99
|
-
async function revokePendingWorkspaceGrant(input) {
|
|
100
|
-
const auth = await trustedWriterAuth();
|
|
101
|
-
if (!auth.ok) {
|
|
102
|
-
return { error: auth.error };
|
|
103
|
-
}
|
|
104
|
-
const backendUrl = resolveBackendUrl(input.host ?? process.env.AGENT_DECK_HOST ?? '127.0.0.1');
|
|
105
|
-
const response = await fetch(`${backendUrl}/api/trusted-session/workspace-grants/${encodeURIComponent(input.grantId)}/revoke-pending`, {
|
|
106
|
-
method: 'POST',
|
|
107
|
-
headers: {
|
|
108
|
-
Authorization: auth.authorization,
|
|
109
|
-
'Content-Type': 'application/json',
|
|
110
|
-
},
|
|
111
|
-
body: '{}',
|
|
112
|
-
});
|
|
113
|
-
if (!response.ok) {
|
|
114
|
-
const payload = await readJsonPayload(response);
|
|
115
|
-
return {
|
|
116
|
-
error: formatTrustedWriterError(response.status, payload, 'Grant revoke-pending failed'),
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
function toGrantManifest(issued, mcpUrl, store = 'file') {
|
|
121
|
-
return {
|
|
122
|
-
version: 2,
|
|
123
|
-
workspaceKey: issued.workspaceKey,
|
|
124
|
-
grantId: issued.grantId,
|
|
125
|
-
secret: issued.secret,
|
|
126
|
-
deckId: issued.deckId,
|
|
127
|
-
deckName: issued.deckName,
|
|
128
|
-
mcpUrl,
|
|
129
|
-
store,
|
|
130
|
-
updatedAt: new Date().toISOString(),
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=grant-issue.js.map
|
package/dist/grant-issue.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grant-issue.js","sourceRoot":"","sources":["../src/grant-issue.ts"],"names":[],"mappings":";;AAsCA,4DAgBC;AAoBD,kDAqCC;AAED,wDAwCC;AAED,kEAgCC;AAED,0CAgBC;AA3MD,yCAAgD;AAChD,iDAAiD;AAejD,SAAS,iBAAiB,CAAC,IAAY;IACrC,OAAO,UAAU,IAAI,IAAI,IAAA,6BAAkB,GAAE,EAAE,CAAC;AAClD,CAAC;AAED,KAAK,UAAU,iBAAiB;IAC9B,MAAM,WAAW,GAAG,MAAM,IAAA,8BAAe,GAAE,CAAC;IAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO;YACL,EAAE,EAAE,KAAK;YACT,KAAK,EACH,8GAA8G;SACjH,CAAC;IACJ,CAAC;IACD,OAAO;QACL,EAAE,EAAE,IAAI;QACR,aAAa,EAAE,UAAU,WAAW,EAAE;KACvC,CAAC;AACJ,CAAC;AAED,2FAA2F;AAC3F,SAAgB,wBAAwB,CACtC,MAAc,EACd,OAAoD,EACpD,QAAgB;IAEhB,MAAM,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAClE,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,aAAa,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;QACzF,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,aAAa,EAAE,CAAC;QACnF,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;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E,CAAC;QACb,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM,UAAU,GAAG,iBAAiB,CAAC,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,WAAW,CAAC,CAAC;IAC/F,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,UAAU,yCAAyC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EACxG;QACE,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI;KACX,CACF,CAAC;IAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;QAChD,OAAO;YACL,KAAK,EAAE,wBAAwB,CAC7B,QAAQ,CAAC,MAAM,EACf,OAAO,EACP,6BAA6B,CAC9B;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,eAAe,CAC7B,MAAmB,EACnB,MAAc,EACd,QAA6B,MAAM;IAEnC,OAAO;QACL,OAAO,EAAE,CAAC;QACV,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM;QACN,KAAK;QACL,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;AACJ,CAAC"}
|
package/dist/grant-store.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { WorkspaceGrantManifest } from '@agent-deck/shared';
|
|
2
|
-
export type GrantStoreKind = 'file' | 'keychain';
|
|
3
|
-
export interface GrantStore {
|
|
4
|
-
kind: GrantStoreKind;
|
|
5
|
-
read(): Promise<WorkspaceGrantManifest | null>;
|
|
6
|
-
stage(manifest: WorkspaceGrantManifest): Promise<void>;
|
|
7
|
-
activate(): Promise<void>;
|
|
8
|
-
rollback(): Promise<void>;
|
|
9
|
-
clear(): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
export declare class FileGrantStore implements GrantStore {
|
|
12
|
-
private readonly workspaceRoot;
|
|
13
|
-
readonly kind: GrantStoreKind;
|
|
14
|
-
constructor(workspaceRoot: string);
|
|
15
|
-
read(): Promise<WorkspaceGrantManifest | null>;
|
|
16
|
-
stage(manifest: WorkspaceGrantManifest): Promise<void>;
|
|
17
|
-
activate(): Promise<void>;
|
|
18
|
-
rollback(): Promise<void>;
|
|
19
|
-
clear(): Promise<void>;
|
|
20
|
-
}
|
|
21
|
-
export declare class KeychainGrantStore implements GrantStore {
|
|
22
|
-
private readonly workspaceRoot;
|
|
23
|
-
readonly kind: GrantStoreKind;
|
|
24
|
-
constructor(workspaceRoot: string);
|
|
25
|
-
private account;
|
|
26
|
-
private runSecurity;
|
|
27
|
-
read(): Promise<WorkspaceGrantManifest | null>;
|
|
28
|
-
stage(manifest: WorkspaceGrantManifest): Promise<void>;
|
|
29
|
-
activate(): Promise<void>;
|
|
30
|
-
rollback(): Promise<void>;
|
|
31
|
-
clear(): Promise<void>;
|
|
32
|
-
}
|
|
33
|
-
export declare function resolveGrantStore(workspaceRoot: string, prefer?: GrantStoreKind): GrantStore;
|
|
34
|
-
export declare function readWorkspaceGrant(workspaceRoot: string, prefer?: GrantStoreKind): Promise<WorkspaceGrantManifest | null>;
|
|
35
|
-
//# sourceMappingURL=grant-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grant-store.d.ts","sourceRoot":"","sources":["../src/grant-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAOj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AO,CAAC,IAAI,CAAC;CAa7B;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,GAAE,cAAuB,GAAG,UAAU,CAKpG;AAED,wBAAsB,kBAAkB,CACtC,aAAa,EAAE,MAAM,EACrB,MAAM,GAAE,cAAuB,GAC9B,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAaxC"}
|
package/dist/grant-store.js
DELETED
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.KeychainGrantStore = exports.FileGrantStore = void 0;
|
|
40
|
-
exports.resolveGrantStore = resolveGrantStore;
|
|
41
|
-
exports.readWorkspaceGrant = readWorkspaceGrant;
|
|
42
|
-
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
43
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
44
|
-
const shared_1 = require("@agent-deck/shared");
|
|
45
|
-
const MANIFEST_FILENAME = 'use.json';
|
|
46
|
-
const MANIFEST_BACKUP = 'use.json.bak';
|
|
47
|
-
const MANIFEST_STAGING = 'use.json.staging';
|
|
48
|
-
function manifestPath(workspaceRoot) {
|
|
49
|
-
return node_path_1.default.join(workspaceRoot, '.agent-deck', MANIFEST_FILENAME);
|
|
50
|
-
}
|
|
51
|
-
function stagingPath(workspaceRoot) {
|
|
52
|
-
return node_path_1.default.join(workspaceRoot, '.agent-deck', MANIFEST_STAGING);
|
|
53
|
-
}
|
|
54
|
-
function backupPath(workspaceRoot) {
|
|
55
|
-
return node_path_1.default.join(workspaceRoot, '.agent-deck', MANIFEST_BACKUP);
|
|
56
|
-
}
|
|
57
|
-
async function ensureAgentDeckDir(workspaceRoot) {
|
|
58
|
-
const dir = node_path_1.default.join(workspaceRoot, '.agent-deck');
|
|
59
|
-
await promises_1.default.mkdir(dir, { recursive: true, mode: 0o700 });
|
|
60
|
-
return dir;
|
|
61
|
-
}
|
|
62
|
-
class FileGrantStore {
|
|
63
|
-
workspaceRoot;
|
|
64
|
-
kind = 'file';
|
|
65
|
-
constructor(workspaceRoot) {
|
|
66
|
-
this.workspaceRoot = workspaceRoot;
|
|
67
|
-
}
|
|
68
|
-
async read() {
|
|
69
|
-
try {
|
|
70
|
-
const raw = await promises_1.default.readFile(manifestPath(this.workspaceRoot), 'utf8');
|
|
71
|
-
const parsed = shared_1.WorkspaceGrantManifestSchema.parse(JSON.parse(raw));
|
|
72
|
-
return parsed;
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
const nodeError = error;
|
|
76
|
-
if (nodeError.code === 'ENOENT') {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
// Legacy v1 use.json or corrupt manifest — caller falls back to readUseManifest.
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
async stage(manifest) {
|
|
84
|
-
await ensureAgentDeckDir(this.workspaceRoot);
|
|
85
|
-
const target = manifestPath(this.workspaceRoot);
|
|
86
|
-
try {
|
|
87
|
-
await promises_1.default.copyFile(target, backupPath(this.workspaceRoot));
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
const nodeError = error;
|
|
91
|
-
if (nodeError.code !== 'ENOENT') {
|
|
92
|
-
throw error;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
await promises_1.default.writeFile(stagingPath(this.workspaceRoot), `${JSON.stringify(manifest, null, 2)}\n`, {
|
|
96
|
-
encoding: 'utf8',
|
|
97
|
-
mode: 0o600,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
async activate() {
|
|
101
|
-
const staging = stagingPath(this.workspaceRoot);
|
|
102
|
-
const target = manifestPath(this.workspaceRoot);
|
|
103
|
-
await promises_1.default.rename(staging, target);
|
|
104
|
-
await promises_1.default.chmod(target, 0o600);
|
|
105
|
-
}
|
|
106
|
-
async rollback() {
|
|
107
|
-
const staging = stagingPath(this.workspaceRoot);
|
|
108
|
-
try {
|
|
109
|
-
await promises_1.default.unlink(staging);
|
|
110
|
-
}
|
|
111
|
-
catch (error) {
|
|
112
|
-
const nodeError = error;
|
|
113
|
-
if (nodeError.code !== 'ENOENT') {
|
|
114
|
-
throw error;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
const backup = backupPath(this.workspaceRoot);
|
|
118
|
-
const target = manifestPath(this.workspaceRoot);
|
|
119
|
-
try {
|
|
120
|
-
await promises_1.default.copyFile(backup, target);
|
|
121
|
-
await promises_1.default.chmod(target, 0o600);
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
const nodeError = error;
|
|
125
|
-
if (nodeError.code === 'ENOENT') {
|
|
126
|
-
try {
|
|
127
|
-
await promises_1.default.unlink(target);
|
|
128
|
-
}
|
|
129
|
-
catch {
|
|
130
|
-
// no prior grant
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
throw error;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
async clear() {
|
|
139
|
-
try {
|
|
140
|
-
await promises_1.default.unlink(manifestPath(this.workspaceRoot));
|
|
141
|
-
}
|
|
142
|
-
catch {
|
|
143
|
-
// ignore
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
exports.FileGrantStore = FileGrantStore;
|
|
148
|
-
class KeychainGrantStore {
|
|
149
|
-
workspaceRoot;
|
|
150
|
-
kind = 'keychain';
|
|
151
|
-
constructor(workspaceRoot) {
|
|
152
|
-
this.workspaceRoot = workspaceRoot;
|
|
153
|
-
}
|
|
154
|
-
account() {
|
|
155
|
-
return `workspace-grant:${this.workspaceRoot}`;
|
|
156
|
-
}
|
|
157
|
-
async runSecurity(args) {
|
|
158
|
-
const { execFile } = await Promise.resolve().then(() => __importStar(require('node:child_process')));
|
|
159
|
-
const { promisify } = await Promise.resolve().then(() => __importStar(require('node:util')));
|
|
160
|
-
const execFileAsync = promisify(execFile);
|
|
161
|
-
const result = await execFileAsync('security', args, { encoding: 'utf8' });
|
|
162
|
-
return String(result.stdout ?? '').trim();
|
|
163
|
-
}
|
|
164
|
-
async read() {
|
|
165
|
-
if (process.platform !== 'darwin') {
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
try {
|
|
169
|
-
const raw = await this.runSecurity([
|
|
170
|
-
'find-generic-password',
|
|
171
|
-
'-s',
|
|
172
|
-
'agent-deck-workspace-grant',
|
|
173
|
-
'-a',
|
|
174
|
-
this.account(),
|
|
175
|
-
'-w',
|
|
176
|
-
]);
|
|
177
|
-
if (!raw) {
|
|
178
|
-
return null;
|
|
179
|
-
}
|
|
180
|
-
return shared_1.WorkspaceGrantManifestSchema.parse(JSON.parse(raw));
|
|
181
|
-
}
|
|
182
|
-
catch {
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
async stage(manifest) {
|
|
187
|
-
if (process.platform !== 'darwin') {
|
|
188
|
-
throw new Error('Keychain grant store requires macOS');
|
|
189
|
-
}
|
|
190
|
-
const payload = JSON.stringify(manifest);
|
|
191
|
-
try {
|
|
192
|
-
await this.runSecurity([
|
|
193
|
-
'delete-generic-password',
|
|
194
|
-
'-s',
|
|
195
|
-
'agent-deck-workspace-grant-staging',
|
|
196
|
-
'-a',
|
|
197
|
-
this.account(),
|
|
198
|
-
]);
|
|
199
|
-
}
|
|
200
|
-
catch {
|
|
201
|
-
// may not exist
|
|
202
|
-
}
|
|
203
|
-
await this.runSecurity([
|
|
204
|
-
'add-generic-password',
|
|
205
|
-
'-s',
|
|
206
|
-
'agent-deck-workspace-grant-staging',
|
|
207
|
-
'-a',
|
|
208
|
-
this.account(),
|
|
209
|
-
'-w',
|
|
210
|
-
payload,
|
|
211
|
-
'-U',
|
|
212
|
-
]);
|
|
213
|
-
}
|
|
214
|
-
async activate() {
|
|
215
|
-
const staging = await this.runSecurity([
|
|
216
|
-
'find-generic-password',
|
|
217
|
-
'-s',
|
|
218
|
-
'agent-deck-workspace-grant-staging',
|
|
219
|
-
'-a',
|
|
220
|
-
this.account(),
|
|
221
|
-
'-w',
|
|
222
|
-
]);
|
|
223
|
-
try {
|
|
224
|
-
await this.runSecurity([
|
|
225
|
-
'delete-generic-password',
|
|
226
|
-
'-s',
|
|
227
|
-
'agent-deck-workspace-grant',
|
|
228
|
-
'-a',
|
|
229
|
-
this.account(),
|
|
230
|
-
]);
|
|
231
|
-
}
|
|
232
|
-
catch {
|
|
233
|
-
// may not exist
|
|
234
|
-
}
|
|
235
|
-
await this.runSecurity([
|
|
236
|
-
'add-generic-password',
|
|
237
|
-
'-s',
|
|
238
|
-
'agent-deck-workspace-grant',
|
|
239
|
-
'-a',
|
|
240
|
-
this.account(),
|
|
241
|
-
'-w',
|
|
242
|
-
staging,
|
|
243
|
-
'-U',
|
|
244
|
-
]);
|
|
245
|
-
await this.runSecurity([
|
|
246
|
-
'delete-generic-password',
|
|
247
|
-
'-s',
|
|
248
|
-
'agent-deck-workspace-grant-staging',
|
|
249
|
-
'-a',
|
|
250
|
-
this.account(),
|
|
251
|
-
]);
|
|
252
|
-
}
|
|
253
|
-
async rollback() {
|
|
254
|
-
if (process.platform !== 'darwin') {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
try {
|
|
258
|
-
await this.runSecurity([
|
|
259
|
-
'delete-generic-password',
|
|
260
|
-
'-s',
|
|
261
|
-
'agent-deck-workspace-grant-staging',
|
|
262
|
-
'-a',
|
|
263
|
-
this.account(),
|
|
264
|
-
]);
|
|
265
|
-
}
|
|
266
|
-
catch {
|
|
267
|
-
// ignore
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
async clear() {
|
|
271
|
-
if (process.platform !== 'darwin') {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
await this.runSecurity([
|
|
275
|
-
'delete-generic-password',
|
|
276
|
-
'-s',
|
|
277
|
-
'agent-deck-workspace-grant',
|
|
278
|
-
'-a',
|
|
279
|
-
this.account(),
|
|
280
|
-
]);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
exports.KeychainGrantStore = KeychainGrantStore;
|
|
284
|
-
function resolveGrantStore(workspaceRoot, prefer = 'file') {
|
|
285
|
-
if (prefer === 'keychain' && process.platform === 'darwin') {
|
|
286
|
-
return new KeychainGrantStore(workspaceRoot);
|
|
287
|
-
}
|
|
288
|
-
return new FileGrantStore(workspaceRoot);
|
|
289
|
-
}
|
|
290
|
-
async function readWorkspaceGrant(workspaceRoot, prefer = 'file') {
|
|
291
|
-
const fileStore = new FileGrantStore(workspaceRoot);
|
|
292
|
-
const fromFile = await fileStore.read();
|
|
293
|
-
if (fromFile) {
|
|
294
|
-
return fromFile;
|
|
295
|
-
}
|
|
296
|
-
if (prefer === 'keychain' || process.platform === 'darwin') {
|
|
297
|
-
const keychainStore = new KeychainGrantStore(workspaceRoot);
|
|
298
|
-
return keychainStore.read();
|
|
299
|
-
}
|
|
300
|
-
return null;
|
|
301
|
-
}
|
|
302
|
-
//# sourceMappingURL=grant-store.js.map
|
package/dist/grant-store.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"grant-store.js","sourceRoot":"","sources":["../src/grant-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4QA,8CAKC;AAED,gDAgBC;AAnSD,gEAAkC;AAClC,0DAA6B;AAG7B,+CAAkE;AAElE,MAAM,iBAAiB,GAAG,UAAU,CAAC;AACrC,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAa5C,SAAS,YAAY,CAAC,aAAqB;IACzC,OAAO,mBAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,WAAW,CAAC,aAAqB;IACxC,OAAO,mBAAI,CAAC,IAAI,CAAC,aAAa,EAAE,aAAa,EAAE,gBAAgB,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,UAAU,CAAC,aAAqB;IACvC,OAAO,mB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AC5B,IAAI;YACJ,IAAI,CAAC,OAAO,EAAE;SACf,CAAC,CAAC;IACL,CAAC;CACF;AA/ID,gDA+IC;AAED,SAAgB,iBAAiB,CAAC,aAAqB,EAAE,SAAyB,MAAM;IACtF,IAAI,MAAM,KAAK,UAAU,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC3D,OAAO,IAAI,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,cAAc,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAEM,KAAK,UAAU,kBAAkB,CACtC,aAAqB,EACrB,SAAyB,MAAM;IAE/B,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,aAAa,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;IACxC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,MAAM,KAAK,UAAU,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC3D,MAAM,aAAa,GAAG,IAAI,kBAAkB,CAAC,aAAa,CAAC,CAAC;QAC5D,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/run-adapter.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Client adapters for `agent-deck run` (NOT-404).
|
|
3
|
-
*
|
|
4
|
-
* All client-specific launching lives behind {@link ClientAdapter}; the run,
|
|
5
|
-
* log, and status code only sees normalized events. New clients plug in by
|
|
6
|
-
* adding an adapter plus a registry entry — no changes to run.ts are needed.
|
|
7
|
-
*
|
|
8
|
-
* Tool profiles (`readonly`/`edit`) and meta.json stay owned by the shared run
|
|
9
|
-
* code: adapters receive the profile name and map it to client flags.
|
|
10
|
-
*/
|
|
11
|
-
/** Read-only profile: exactly the botmancers prototype allowlist. */
|
|
12
|
-
export declare const RUN_READONLY_TOOLS: readonly string[];
|
|
13
|
-
/**
|
|
14
|
-
* Edit profile: readonly plus file writes and git-scoped Bash. No `git push`,
|
|
15
|
-
* no unscoped `Bash`, no network tools. One-line reason per git entry:
|
|
16
|
-
* - `git diff` reviews local changes before staging or committing;
|
|
17
|
-
* - `git add` stages the files the session created or edited;
|
|
18
|
-
* - `git commit` records the work as a commit for handoff;
|
|
19
|
-
* - `git checkout -b` starts delegated work on a fresh branch.
|
|
20
|
-
*/
|
|
21
|
-
export declare const RUN_EDIT_TOOLS: readonly string[];
|
|
22
|
-
/** Both profiles run with `acceptEdits`; `bypassPermissions` is never used. */
|
|
23
|
-
export declare const RUN_PERMISSION_MODE = "acceptEdits";
|
|
24
|
-
/** Setting sources copied from the prototype. */
|
|
25
|
-
export declare const RUN_SETTING_SOURCES: readonly string[];
|
|
26
|
-
export declare const RUN_TOOL_PROFILES: readonly ["readonly", "edit"];
|
|
27
|
-
export type RunToolsProfile = (typeof RUN_TOOL_PROFILES)[number];
|
|
28
|
-
export declare function allowedToolsForProfile(profile: RunToolsProfile): readonly string[];
|
|
29
|
-
/** Clients with a working adapter. */
|
|
30
|
-
export declare const RUN_SUPPORTED_CLIENTS: readonly ["claude", "codex", "cursor", "muse"];
|
|
31
|
-
export type RunClient = (typeof RUN_SUPPORTED_CLIENTS)[number];
|
|
32
|
-
/** Clients with a ticket but no adapter yet (separate tickets, blocked by NOT-404). */
|
|
33
|
-
export declare const RUN_FUTURE_CLIENTS: readonly [];
|
|
34
|
-
export declare function isSupportedRunClient(value: string): value is RunClient;
|
|
35
|
-
export declare function isFutureRunClient(value: string): boolean;
|
|
36
|
-
export declare function missingRunClientMessage(): string;
|
|
37
|
-
export declare function runClientMessage(client: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Normalized session event. Adapters map client-specific streams onto this
|
|
40
|
-
* envelope; only the envelope is shared (text/tool names stay client-native).
|
|
41
|
-
* `sessionId` carries the client session id (Claude session id, Codex
|
|
42
|
-
* thread id) whenever the adapter learns it.
|
|
43
|
-
*/
|
|
44
|
-
export type NormalizedEvent = {
|
|
45
|
-
kind: 'text';
|
|
46
|
-
text: string;
|
|
47
|
-
sessionId?: string;
|
|
48
|
-
} | {
|
|
49
|
-
kind: 'tool';
|
|
50
|
-
name: string;
|
|
51
|
-
sessionId?: string;
|
|
52
|
-
} | {
|
|
53
|
-
kind: 'result';
|
|
54
|
-
subtype: string;
|
|
55
|
-
result: unknown;
|
|
56
|
-
sessionId?: string;
|
|
57
|
-
} | {
|
|
58
|
-
kind: 'notice';
|
|
59
|
-
message: string;
|
|
60
|
-
sessionId?: string;
|
|
61
|
-
};
|
|
62
|
-
export type AdapterStartArgs = {
|
|
63
|
-
cwd: string;
|
|
64
|
-
prompt: string;
|
|
65
|
-
tools: RunToolsProfile;
|
|
66
|
-
resumeId?: string;
|
|
67
|
-
};
|
|
68
|
-
export type AdapterPreflight = {
|
|
69
|
-
ok: true;
|
|
70
|
-
} | {
|
|
71
|
-
ok: false;
|
|
72
|
-
remedy: string;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Pure start plan, computed before any model call. `trustOverride` records
|
|
76
|
-
* whether the launch bypasses a client workspace-trust guard (Codex
|
|
77
|
-
* `--skip-git-repo-check`); `{ ok: false }` fails closed with a remedy and
|
|
78
|
-
* the run exits before spawning anything.
|
|
79
|
-
*/
|
|
80
|
-
export type AdapterStartPlan = {
|
|
81
|
-
ok: true;
|
|
82
|
-
trustOverride: boolean;
|
|
83
|
-
} | {
|
|
84
|
-
ok: false;
|
|
85
|
-
remedy: string;
|
|
86
|
-
};
|
|
87
|
-
export type ClientAdapter = {
|
|
88
|
-
readonly id: RunClient;
|
|
89
|
-
/** Binary/auth checks. Must make no model call and spawn no session. */
|
|
90
|
-
preflight(): Promise<AdapterPreflight>;
|
|
91
|
-
/** Pure per-start plan (sandbox mapping, trust decision, fail-closed gates). */
|
|
92
|
-
planStart(args: AdapterStartArgs): AdapterStartPlan;
|
|
93
|
-
/**
|
|
94
|
-
* Stream normalized events for one session. Rejects (or the iterator
|
|
95
|
-
* throws) when the client process fails, so the shared run code marks the
|
|
96
|
-
* run `error`. A stream that ends without a `result` event is also `error`.
|
|
97
|
-
*/
|
|
98
|
-
start(args: AdapterStartArgs): AsyncIterable<NormalizedEvent>;
|
|
99
|
-
};
|
|
100
|
-
//# sourceMappingURL=run-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run-adapter.d.ts","sourceRoot":"","sources":["../src/run-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAQ/C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAQ3C,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAEjD,iDAAiD;AACjD,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAwB,CAAC;AAE1E,eAAO,MAAM,iBAAiB,+BAAgC,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,MAAM,EAAE,CAElF;AAED,sCAAsC;AACtC,eAAO,MAAM,qBAAqB,gDAAiD,CAAC;AACpF,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,aAAc,CAAC;AAE9C,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAEtE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB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CAAC,gBAAgB,CAAC,CAAC;IACvC,gFAAgF;IAChF,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;IACpD;;;;OAIG;IACH,KAAK,CAAC,IAAI,EAAE,gBAAgB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;CAC/D,CAAC"}
|
package/dist/run-adapter.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Client adapters for `agent-deck run` (NOT-404).
|
|
4
|
-
*
|
|
5
|
-
* All client-specific launching lives behind {@link ClientAdapter}; the run,
|
|
6
|
-
* log, and status code only sees normalized events. New clients plug in by
|
|
7
|
-
* adding an adapter plus a registry entry — no changes to run.ts are needed.
|
|
8
|
-
*
|
|
9
|
-
* Tool profiles (`readonly`/`edit`) and meta.json stay owned by the shared run
|
|
10
|
-
* code: adapters receive the profile name and map it to client flags.
|
|
11
|
-
*/
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.RUN_FUTURE_CLIENTS = exports.RUN_SUPPORTED_CLIENTS = exports.RUN_TOOL_PROFILES = exports.RUN_SETTING_SOURCES = exports.RUN_PERMISSION_MODE = exports.RUN_EDIT_TOOLS = exports.RUN_READONLY_TOOLS = void 0;
|
|
14
|
-
exports.allowedToolsForProfile = allowedToolsForProfile;
|
|
15
|
-
exports.isSupportedRunClient = isSupportedRunClient;
|
|
16
|
-
exports.isFutureRunClient = isFutureRunClient;
|
|
17
|
-
exports.missingRunClientMessage = missingRunClientMessage;
|
|
18
|
-
exports.runClientMessage = runClientMessage;
|
|
19
|
-
/** Read-only profile: exactly the botmancers prototype allowlist. */
|
|
20
|
-
exports.RUN_READONLY_TOOLS = [
|
|
21
|
-
'mcp__agent-deck__*',
|
|
22
|
-
'Read',
|
|
23
|
-
'Glob',
|
|
24
|
-
'Grep',
|
|
25
|
-
'Bash(git log:*)',
|
|
26
|
-
'Bash(git status:*)',
|
|
27
|
-
'Bash(ls:*)',
|
|
28
|
-
];
|
|
29
|
-
/**
|
|
30
|
-
* Edit profile: readonly plus file writes and git-scoped Bash. No `git push`,
|
|
31
|
-
* no unscoped `Bash`, no network tools. One-line reason per git entry:
|
|
32
|
-
* - `git diff` reviews local changes before staging or committing;
|
|
33
|
-
* - `git add` stages the files the session created or edited;
|
|
34
|
-
* - `git commit` records the work as a commit for handoff;
|
|
35
|
-
* - `git checkout -b` starts delegated work on a fresh branch.
|
|
36
|
-
*/
|
|
37
|
-
exports.RUN_EDIT_TOOLS = [
|
|
38
|
-
...exports.RUN_READONLY_TOOLS,
|
|
39
|
-
'Edit',
|
|
40
|
-
'Write',
|
|
41
|
-
'Bash(git diff:*)',
|
|
42
|
-
'Bash(git add:*)',
|
|
43
|
-
'Bash(git commit:*)',
|
|
44
|
-
'Bash(git checkout -b:*)',
|
|
45
|
-
];
|
|
46
|
-
/** Both profiles run with `acceptEdits`; `bypassPermissions` is never used. */
|
|
47
|
-
exports.RUN_PERMISSION_MODE = 'acceptEdits';
|
|
48
|
-
/** Setting sources copied from the prototype. */
|
|
49
|
-
exports.RUN_SETTING_SOURCES = ['project', 'user'];
|
|
50
|
-
exports.RUN_TOOL_PROFILES = ['readonly', 'edit'];
|
|
51
|
-
function allowedToolsForProfile(profile) {
|
|
52
|
-
return profile === 'edit' ? exports.RUN_EDIT_TOOLS : exports.RUN_READONLY_TOOLS;
|
|
53
|
-
}
|
|
54
|
-
/** Clients with a working adapter. */
|
|
55
|
-
exports.RUN_SUPPORTED_CLIENTS = ['claude', 'codex', 'cursor', 'muse'];
|
|
56
|
-
/** Clients with a ticket but no adapter yet (separate tickets, blocked by NOT-404). */
|
|
57
|
-
exports.RUN_FUTURE_CLIENTS = [];
|
|
58
|
-
function isSupportedRunClient(value) {
|
|
59
|
-
return exports.RUN_SUPPORTED_CLIENTS.includes(value);
|
|
60
|
-
}
|
|
61
|
-
function isFutureRunClient(value) {
|
|
62
|
-
return exports.RUN_FUTURE_CLIENTS.includes(value);
|
|
63
|
-
}
|
|
64
|
-
function missingRunClientMessage() {
|
|
65
|
-
return '--client is required: pass --client claude, --client codex, --client cursor, or --client muse';
|
|
66
|
-
}
|
|
67
|
-
function runClientMessage(client) {
|
|
68
|
-
if (isFutureRunClient(client)) {
|
|
69
|
-
return `Client adapter "${client}" is not available yet (supported clients: claude, codex, cursor, muse)`;
|
|
70
|
-
}
|
|
71
|
-
return `--client must be one of: claude, codex, cursor, muse (got "${client}")`;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=run-adapter.js.map
|