@nathanstephenson/flow 0.1.5 → 0.1.6
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/backend/claude/index.js +28 -6
- package/dist/backend/claude/workflow-builder.js +12 -0
- package/dist/backend/mcp.js +47 -7
- package/dist/backend/pi/index.js +30 -16
- package/dist/backend/pi/workflow-builder.js +11 -0
- package/dist/backend/worker/entry.js +11 -3
- package/dist/backend/worker/index.js +31 -8
- package/dist/backend/worker/launcher.js +1 -0
- package/dist/backend/workflow-builder.js +8 -0
- package/dist/build-id +1 -1
- package/dist/cli/bootstrap.js +1 -1
- package/dist/cli/main.js +13 -1
- package/dist/daemon/host.js +14 -0
- package/dist/daemon/mcp-auth.js +32 -4
- package/dist/daemon/runtime.js +13 -3
- package/dist/daemon/server.js +34 -0
- package/dist/daemon/workflow-authoring-scope-checks.js +134 -0
- package/dist/daemon/workflow-authoring-scope-reader.js +42 -0
- package/dist/daemon/workflow-authoring-scope.js +49 -0
- package/dist/daemon/workflow-builder-files.js +321 -0
- package/dist/daemon/workflow-builder-guidance.js +31 -0
- package/dist/daemon/workflow-builder-reader.js +131 -0
- package/dist/daemon/workflow-builder-routes.js +61 -0
- package/dist/daemon/workflow-builder.js +480 -0
- package/dist/daemon/workflow-mcp-authoring-routes.js +44 -0
- package/dist/daemon/workflow-mcp-authoring.js +313 -0
- package/dist/isolation/filesystem.js +7 -4
- package/dist/protocol/workflow-builder.js +1 -0
- package/dist/protocol/workflow-mcp-authoring.js +1 -0
- package/package.json +1 -1
- package/web/dist/assets/index-C_M0oDHN.js +38 -0
- package/web/dist/assets/index-D8CGXp1X.css +2 -0
- package/web/dist/assets/{input-CqyJUgIE.js → input-D9fbSfQF.js} +1 -1
- package/web/dist/assets/settings-mcp-BvSvGrcs.js +1 -0
- package/web/dist/assets/{settings-secrets-D3zCO2H1.js → settings-secrets-DlkU6W_Z.js} +1 -1
- package/web/dist/assets/settings-workflows-DNGE-b_U.js +23 -0
- package/web/dist/assets/switch-DEvHojwW.js +1 -0
- package/web/dist/assets/workflow-editors-D6XT6pcb.js +137 -0
- package/web/dist/assets/{workflows-9aO6cptD.css → workflows-Bb90N0XJ.css} +1 -1
- package/web/dist/assets/workflows-LSCnXIxN.js +7 -0
- package/web/dist/assets/workflows-pane-BIlp7uyg.js +1 -0
- package/web/dist/index.html +5 -4
- package/web/dist/assets/index-2oJWC9JF.css +0 -2
- package/web/dist/assets/index-6BD3ul5N.js +0 -174
- package/web/dist/assets/settings-mcp-DOQOULdG.js +0 -1
- package/web/dist/assets/settings-workflows-BSVIqm4R.js +0 -23
- package/web/dist/assets/switch-ehZe7Kr5.js +0 -1
- package/web/dist/assets/workflows-DC1k1O8g.js +0 -7
- package/web/dist/assets/workflows-pane-B0hL69SD.js +0 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { redactCredentials } from "./credential-redaction.js";
|
|
3
|
+
import { workflowAuthoringScopePath } from "./workflow-authoring-scope.js";
|
|
4
|
+
import { WorkflowAuthoringScopeChecks } from "./workflow-authoring-scope-checks.js";
|
|
5
|
+
import { connectionIdentity, snapshotTool } from "./workflow-mcp.js";
|
|
6
|
+
const TTL = 60_000;
|
|
7
|
+
const MAX_ENTRIES = 128;
|
|
8
|
+
const MAX_CLIENTS = 4;
|
|
9
|
+
const MAX_BYTES = 192_000;
|
|
10
|
+
const MAX_TOOLS = 256;
|
|
11
|
+
const MAX_ERRORS = 128;
|
|
12
|
+
const MAX_TOOL_BYTES = 48_000;
|
|
13
|
+
export class WorkflowMcpAuthoringService {
|
|
14
|
+
options;
|
|
15
|
+
scopes = new WorkflowAuthoringScopeChecks();
|
|
16
|
+
entries = new Map();
|
|
17
|
+
queue = [];
|
|
18
|
+
active = new Set();
|
|
19
|
+
fingerprint = '';
|
|
20
|
+
generation = 0;
|
|
21
|
+
stopped = false;
|
|
22
|
+
closing;
|
|
23
|
+
constructor(options) { this.options = options; }
|
|
24
|
+
connections(projectId) { return this.bounded(async () => this.metadata((await this.scope(projectId)).path)); }
|
|
25
|
+
metadata(scope) {
|
|
26
|
+
return this.redact({ scope, connections: this.options.config.mcpConnections().map(({ id, name, transport, enabledByDefault }) => ({ id, name, transport, enabledByDefault })) });
|
|
27
|
+
}
|
|
28
|
+
async scope(projectId) {
|
|
29
|
+
this.refresh();
|
|
30
|
+
const generation = this.generation;
|
|
31
|
+
try {
|
|
32
|
+
const scope = await this.scopes.read(workflowAuthoringScopePath(this.options.config, this.options.scope, projectId));
|
|
33
|
+
this.refresh();
|
|
34
|
+
if (generation !== this.generation)
|
|
35
|
+
throw new Error('MCP configuration changed; discover again');
|
|
36
|
+
return scope;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
throw this.safeError(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
discover(projectId, connectionId, refresh = false) {
|
|
43
|
+
return this.bounded(deadline => this.discoverWithin(projectId, connectionId, refresh, deadline));
|
|
44
|
+
}
|
|
45
|
+
async discoverWithin(projectId, connectionId, refresh, deadline) {
|
|
46
|
+
const scope = await this.scope(projectId);
|
|
47
|
+
this.checkDeadline(deadline);
|
|
48
|
+
const generation = this.generation;
|
|
49
|
+
const connection = this.options.config.mcpConnections().find(connection => connection.id === connectionId);
|
|
50
|
+
if (!connection)
|
|
51
|
+
throw new Error('Unknown MCP connection');
|
|
52
|
+
const result = await this.request(scope, connection, deadline, generation, refresh);
|
|
53
|
+
this.checkDeadline(deadline);
|
|
54
|
+
await this.scopes.check(scope);
|
|
55
|
+
this.checkDeadline(deadline);
|
|
56
|
+
this.refresh();
|
|
57
|
+
if (generation !== this.generation)
|
|
58
|
+
throw new Error('MCP configuration changed; discover again');
|
|
59
|
+
return this.redact(structuredClone(result));
|
|
60
|
+
}
|
|
61
|
+
catalogue(projectId, expectedScope) {
|
|
62
|
+
return this.bounded(deadline => this.catalogueWithin(projectId, expectedScope, deadline));
|
|
63
|
+
}
|
|
64
|
+
async catalogueWithin(projectId, expectedScope, deadline) {
|
|
65
|
+
const scope = await this.scope(projectId);
|
|
66
|
+
this.checkDeadline(deadline);
|
|
67
|
+
if (expectedScope && (scope.path !== expectedScope.scope || scope.identity !== expectedScope.scopeIdentity))
|
|
68
|
+
throw new Error('MCP authoring Scope changed. Close and reopen the builder.');
|
|
69
|
+
const metadata = this.metadata(scope.path);
|
|
70
|
+
const generation = this.generation;
|
|
71
|
+
const selected = this.options.config.mcpConnections().filter(connection => connection.enabledByDefault || this.entries.has(this.key(scope, connection)));
|
|
72
|
+
const results = await Promise.all(selected.map(async (connection) => {
|
|
73
|
+
try {
|
|
74
|
+
return { connection, discovery: await this.request(scope, connection, deadline, generation) };
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
return { connection, error: this.safeError(error).message };
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
this.checkDeadline(deadline);
|
|
81
|
+
await this.scopes.check(scope);
|
|
82
|
+
this.checkDeadline(deadline);
|
|
83
|
+
this.refresh();
|
|
84
|
+
if (generation !== this.generation)
|
|
85
|
+
throw new Error('MCP configuration changed; read the catalogue again');
|
|
86
|
+
const result = { ...metadata, scopeIdentity: scope.identity, tools: [], errors: [] };
|
|
87
|
+
let omitted = false;
|
|
88
|
+
const fits = () => bytes(result) <= MAX_BYTES - 1_024;
|
|
89
|
+
const addError = (error) => {
|
|
90
|
+
if (result.errors.length >= MAX_ERRORS) {
|
|
91
|
+
omitted = true;
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
result.errors.push(this.redact(error));
|
|
95
|
+
if (!fits()) {
|
|
96
|
+
result.errors.pop();
|
|
97
|
+
omitted = true;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
for (const { connection, error } of results) {
|
|
101
|
+
if (error)
|
|
102
|
+
addError({ connectionId: connection.id, connectionName: connection.name, message: error });
|
|
103
|
+
}
|
|
104
|
+
for (const { connection, discovery } of results) {
|
|
105
|
+
const source = { connectionId: connection.id, connectionName: connection.name };
|
|
106
|
+
for (const tool of discovery?.tools ?? []) {
|
|
107
|
+
result.tools.push(this.redact(tool));
|
|
108
|
+
if (result.tools.length > MAX_TOOLS || !fits()) {
|
|
109
|
+
result.tools.pop();
|
|
110
|
+
addError({ ...source, toolName: this.text(tool.toolName, 120), message: 'MCP catalogue limit exceeded; tool omitted' });
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
for (const error of discovery?.errors ?? [])
|
|
114
|
+
addError({ ...source, ...error });
|
|
115
|
+
}
|
|
116
|
+
if (omitted)
|
|
117
|
+
result.errors.push({ connectionId: '', connectionName: '', message: 'MCP catalogue limit exceeded; additional diagnostics omitted' });
|
|
118
|
+
return this.redact(result);
|
|
119
|
+
}
|
|
120
|
+
hasActiveWork() { return this.active.size > 0 || this.queue.length > 0 || this.scopes.hasActiveWork(); }
|
|
121
|
+
shutdown() {
|
|
122
|
+
if (this.closing)
|
|
123
|
+
return this.closing;
|
|
124
|
+
this.stopped = true;
|
|
125
|
+
this.invalidate(new Error('Workflow MCP authoring stopped'));
|
|
126
|
+
return this.closing = Promise.allSettled([...this.active, this.scopes.shutdown()]).then(() => { });
|
|
127
|
+
}
|
|
128
|
+
refresh() {
|
|
129
|
+
if (this.stopped)
|
|
130
|
+
throw new Error('Workflow MCP authoring stopped');
|
|
131
|
+
const config = this.options.config;
|
|
132
|
+
const fingerprint = createHash('sha256').update(JSON.stringify([config.projectRoot(), config.projectInclude(), config.mcpConnections(), config.filesystemIsolationEnabled(), this.options.host.workflowMcpCredentials()])).digest('hex');
|
|
133
|
+
if (fingerprint !== this.fingerprint) {
|
|
134
|
+
this.fingerprint = fingerprint;
|
|
135
|
+
this.invalidate(new Error('MCP configuration changed; discover again'));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
invalidate(error) {
|
|
139
|
+
this.generation++;
|
|
140
|
+
for (const entry of this.entries.values()) {
|
|
141
|
+
entry.controller.abort(error);
|
|
142
|
+
entry.reject(error);
|
|
143
|
+
}
|
|
144
|
+
this.entries.clear();
|
|
145
|
+
this.queue.length = 0;
|
|
146
|
+
}
|
|
147
|
+
key(scope, connection) { return JSON.stringify([scope.path, scope.identity, connectionIdentity(connection)]); }
|
|
148
|
+
async request(scope, connection, deadline, generation, refresh = false) {
|
|
149
|
+
this.checkDeadline(deadline);
|
|
150
|
+
await this.scopes.check(scope);
|
|
151
|
+
this.refresh();
|
|
152
|
+
if (generation !== this.generation)
|
|
153
|
+
throw new Error('MCP configuration changed; discover again');
|
|
154
|
+
this.checkDeadline(deadline);
|
|
155
|
+
const key = this.key(scope, connection);
|
|
156
|
+
const existing = this.entries.get(key);
|
|
157
|
+
if (existing && (!existing.expires || (!refresh && existing.expires > Date.now())))
|
|
158
|
+
return existing.promise;
|
|
159
|
+
if (existing)
|
|
160
|
+
this.entries.delete(key);
|
|
161
|
+
while (this.entries.size >= MAX_ENTRIES) {
|
|
162
|
+
const oldest = [...this.entries].find(([, entry]) => entry.expires > 0);
|
|
163
|
+
if (!oldest)
|
|
164
|
+
return Promise.reject(new Error('MCP discovery capacity exceeded; try again later'));
|
|
165
|
+
this.entries.delete(oldest[0]);
|
|
166
|
+
}
|
|
167
|
+
let resolve, reject;
|
|
168
|
+
const promise = new Promise((yes, no) => { resolve = yes; reject = no; });
|
|
169
|
+
const entry = { scope: scope.path, directory: scope, connection: structuredClone(connection), isolation: this.options.config.filesystemIsolationEnabled(), generation: this.generation, promise, resolve, reject, controller: new AbortController(), expires: 0, timer: undefined };
|
|
170
|
+
entry.controller.signal.addEventListener('abort', () => {
|
|
171
|
+
clearTimeout(entry.timer);
|
|
172
|
+
entry.expires = Date.now() + TTL;
|
|
173
|
+
entry.reject(this.safeError(entry.controller.signal.reason));
|
|
174
|
+
const queued = this.queue.indexOf(entry);
|
|
175
|
+
if (queued !== -1)
|
|
176
|
+
this.queue.splice(queued, 1);
|
|
177
|
+
}, { once: true });
|
|
178
|
+
// Admission, not execution, starts the deadline: exhausted cleanup capacity cannot strand a queue.
|
|
179
|
+
entry.timer = setTimeout(() => entry.controller.abort(new Error('MCP discovery timed out')), Math.max(0, deadline - Date.now()));
|
|
180
|
+
this.entries.set(key, entry);
|
|
181
|
+
this.queue.push(entry);
|
|
182
|
+
this.drain();
|
|
183
|
+
return promise;
|
|
184
|
+
}
|
|
185
|
+
drain() {
|
|
186
|
+
while (!this.stopped && this.active.size < MAX_CLIENTS && this.queue.length) {
|
|
187
|
+
const entry = this.queue.shift();
|
|
188
|
+
const task = this.run(entry);
|
|
189
|
+
this.active.add(task);
|
|
190
|
+
void task.finally(() => { this.active.delete(task); this.drain(); });
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
async run(entry) {
|
|
194
|
+
let session, disposal;
|
|
195
|
+
const dispose = () => session ? disposal ??= session.dispose({ waitForExit: true }) : Promise.resolve();
|
|
196
|
+
const { signal } = entry.controller;
|
|
197
|
+
const abort = () => { void dispose().catch(() => { }); };
|
|
198
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
199
|
+
let cancel;
|
|
200
|
+
const cancelled = new Promise((_, reject) => {
|
|
201
|
+
cancel = () => reject(signal.reason);
|
|
202
|
+
signal.addEventListener('abort', cancel, { once: true });
|
|
203
|
+
});
|
|
204
|
+
const work = (async () => {
|
|
205
|
+
await this.scopes.check(entry.directory);
|
|
206
|
+
signal.throwIfAborted();
|
|
207
|
+
session = await this.options.host.openWorkflowMcpAuthoring(entry.scope, entry.connection.id, entry.isolation, entry.directory.identity);
|
|
208
|
+
signal.throwIfAborted();
|
|
209
|
+
await this.scopes.check(entry.directory);
|
|
210
|
+
signal.throwIfAborted();
|
|
211
|
+
this.refresh();
|
|
212
|
+
if (entry.generation !== this.generation)
|
|
213
|
+
throw new Error('MCP configuration changed; discover again');
|
|
214
|
+
if (connectionIdentity(session.connections[0]) !== connectionIdentity(entry.connection))
|
|
215
|
+
throw new Error('MCP configuration changed; discover again');
|
|
216
|
+
await session.open();
|
|
217
|
+
signal.throwIfAborted();
|
|
218
|
+
await this.scopes.check(entry.directory);
|
|
219
|
+
signal.throwIfAborted();
|
|
220
|
+
if (session.status()[0]?.state !== 'connected')
|
|
221
|
+
throw new Error('MCP connection unavailable. Sign in in MCP Settings or reconfigure the server, then retry manually.');
|
|
222
|
+
return this.snapshot(entry.connection, session);
|
|
223
|
+
})();
|
|
224
|
+
try {
|
|
225
|
+
const completed = work.then(async (result) => { await dispose(); return result; });
|
|
226
|
+
const result = await Promise.race([completed, cancelled]);
|
|
227
|
+
signal.throwIfAborted();
|
|
228
|
+
await this.scopes.check(entry.directory);
|
|
229
|
+
signal.throwIfAborted();
|
|
230
|
+
this.refresh();
|
|
231
|
+
if (entry.generation !== this.generation)
|
|
232
|
+
throw new Error('MCP configuration changed; discover again');
|
|
233
|
+
entry.expires = Date.now() + TTL;
|
|
234
|
+
entry.resolve(result);
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
const safe = this.safeError(error);
|
|
238
|
+
entry.expires = Date.now() + TTL;
|
|
239
|
+
entry.reject(safe);
|
|
240
|
+
}
|
|
241
|
+
finally {
|
|
242
|
+
clearTimeout(entry.timer);
|
|
243
|
+
await dispose().catch(() => { });
|
|
244
|
+
await work.catch(() => { });
|
|
245
|
+
await dispose().catch(() => { });
|
|
246
|
+
signal.removeEventListener('abort', abort);
|
|
247
|
+
signal.removeEventListener('abort', cancel);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
snapshot(connection, session) {
|
|
251
|
+
const result = { tools: [], errors: [] };
|
|
252
|
+
let omitted = false;
|
|
253
|
+
const error = (toolName, message) => {
|
|
254
|
+
if (result.errors.length >= MAX_ERRORS) {
|
|
255
|
+
omitted = true;
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
result.errors.push({ toolName: this.text(toolName, 120), message: this.text(message, 600) });
|
|
259
|
+
if (bytes(result) > MAX_BYTES - 1_024) {
|
|
260
|
+
result.errors.pop();
|
|
261
|
+
omitted = true;
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const tools = session.tools();
|
|
265
|
+
for (const tool of tools.slice(0, MAX_TOOLS)) {
|
|
266
|
+
try {
|
|
267
|
+
const data = { connectionId: connection.id, connectionName: connection.name, serverIdentity: tool.serverIdentity, toolName: tool.definition.name, inputSchema: tool.definition.inputSchema, outputSchema: tool.definition.outputSchema };
|
|
268
|
+
this.assertNoSecrets(data);
|
|
269
|
+
if (bytes(data) > MAX_TOOL_BYTES)
|
|
270
|
+
throw new Error('MCP tool exceeds the discovery size limit');
|
|
271
|
+
const snapshot = snapshotTool(connection, tool);
|
|
272
|
+
result.tools.push(snapshot);
|
|
273
|
+
if (bytes(result) > MAX_BYTES - 64_000) {
|
|
274
|
+
result.tools.pop();
|
|
275
|
+
throw new Error('MCP discovery size limit exceeded; tool omitted');
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
catch (failure) {
|
|
279
|
+
error(tool.definition.name, this.safeError(failure).message);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (tools.length > MAX_TOOLS)
|
|
283
|
+
error('', 'MCP tool count limit exceeded; additional tools omitted');
|
|
284
|
+
if (omitted)
|
|
285
|
+
result.errors.push({ toolName: '', message: 'MCP diagnostic limit exceeded; additional diagnostics omitted' });
|
|
286
|
+
return result;
|
|
287
|
+
}
|
|
288
|
+
checkDeadline(deadline) {
|
|
289
|
+
if (Date.now() >= deadline)
|
|
290
|
+
throw new Error('MCP discovery timed out');
|
|
291
|
+
}
|
|
292
|
+
/** Caller wait includes Scope checks and queue admission; underlying cleanup remains owned. */
|
|
293
|
+
async bounded(work) {
|
|
294
|
+
const deadline = Date.now() + 10_000;
|
|
295
|
+
let timer;
|
|
296
|
+
try {
|
|
297
|
+
return await Promise.race([work(deadline), new Promise((_, reject) => {
|
|
298
|
+
timer = setTimeout(() => reject(new Error('MCP discovery timed out')), Math.max(0, deadline - Date.now()));
|
|
299
|
+
})]);
|
|
300
|
+
}
|
|
301
|
+
finally {
|
|
302
|
+
clearTimeout(timer);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
assertNoSecrets(value) {
|
|
306
|
+
if (JSON.stringify(value) !== JSON.stringify(this.redact(value)))
|
|
307
|
+
throw new Error('MCP tool metadata cannot contain credential values');
|
|
308
|
+
}
|
|
309
|
+
redact(value) { return redactCredentials(value, this.options.host.workflowMcpCredentials()); }
|
|
310
|
+
text(value, limit) { return this.redact(value).slice(0, limit); }
|
|
311
|
+
safeError(error) { return new Error(this.text(error instanceof Error ? error.message : String(error), 600)); }
|
|
312
|
+
}
|
|
313
|
+
function bytes(value) { return Buffer.byteLength(JSON.stringify(value)); }
|
|
@@ -183,11 +183,14 @@ export async function prepareFilesystemIsolation(options) {
|
|
|
183
183
|
};
|
|
184
184
|
// Pin validated mount sources in the host only, not inherited application descriptors. A
|
|
185
185
|
// concurrently writable ancestor must not swap Scope for a symlink between validation and bind.
|
|
186
|
-
const pinned = (path) => {
|
|
187
|
-
const before = statSync(path);
|
|
186
|
+
const pinned = (path, expectedIdentity) => {
|
|
187
|
+
const before = statSync(path, { bigint: true });
|
|
188
188
|
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW | (before.isDirectory() ? constants.O_DIRECTORY : 0));
|
|
189
189
|
sources.push(fd);
|
|
190
|
-
const after = fstatSync(fd);
|
|
190
|
+
const after = fstatSync(fd, { bigint: true });
|
|
191
|
+
if (expectedIdentity !== undefined && `${after.dev}:${after.ino}` !== expectedIdentity) {
|
|
192
|
+
throw new Error("Scope changed since selection; refusing replaced directory");
|
|
193
|
+
}
|
|
191
194
|
if (before.dev !== after.dev || before.ino !== after.ino || realpathSync(`/proc/self/fd/${fd}`) !== path) {
|
|
192
195
|
throw new Error(`Execution mount source changed during preparation: ${path}`);
|
|
193
196
|
}
|
|
@@ -304,7 +307,7 @@ export async function prepareFilesystemIsolation(options) {
|
|
|
304
307
|
const privateHome = join(scratch, "home");
|
|
305
308
|
mkdirSync(join(privateHome, ".pi/agent"), { recursive: true, mode: 0o700 });
|
|
306
309
|
mkdirSync(join(privateHome, ".claude"), { mode: 0o700 });
|
|
307
|
-
args.push("--bind-fd", pinned(scope), scope, "--dir", virtualRoot, "--bind-fd", pinned(privateHome), virtualHome, "--dir", `${virtualRoot}/run`, "--bind-fd", pinned(backend), virtualState);
|
|
310
|
+
args.push("--bind-fd", pinned(scope, options.expectedScopeIdentity), scope, "--dir", virtualRoot, "--bind-fd", pinned(privateHome), virtualHome, "--dir", `${virtualRoot}/run`, "--bind-fd", pinned(backend), virtualState);
|
|
308
311
|
for (const path of directoryMasks)
|
|
309
312
|
args.push("--remount-ro", path);
|
|
310
313
|
const stage = (source, destination) => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|