stitchkit 0.120.0 → 0.121.0
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/CHANGELOG.md +42 -0
- package/dist/agent-runtime/coding-discovery.d.ts +25 -0
- package/dist/agent-runtime/coding-discovery.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-automaton.d.ts +37 -0
- package/dist/agent-runtime/coding-search-automaton.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-case-fold.d.ts +4 -0
- package/dist/agent-runtime/coding-search-case-fold.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-class-ranges.d.ts +10 -0
- package/dist/agent-runtime/coding-search-class-ranges.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-contract.d.ts +86 -0
- package/dist/agent-runtime/coding-search-contract.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-limits.d.ts +13 -0
- package/dist/agent-runtime/coding-search-limits.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-matcher.d.ts +33 -0
- package/dist/agent-runtime/coding-search-matcher.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-output.d.ts +5 -0
- package/dist/agent-runtime/coding-search-output.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-regex-syntax.d.ts +39 -0
- package/dist/agent-runtime/coding-search-regex-syntax.d.ts.map +1 -0
- package/dist/agent-runtime/coding-search-unit-classes.d.ts +31 -0
- package/dist/agent-runtime/coding-search-unit-classes.d.ts.map +1 -0
- package/dist/agent-runtime/coding-shell-process.d.ts +1 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts +8 -3
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-files.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts +1 -11
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-paths.d.ts +6 -2
- package/dist/agent-runtime/coding-tool-paths.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-refusals.d.ts +6 -0
- package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search.d.ts +113 -0
- package/dist/agent-runtime/coding-tool-search.d.ts.map +1 -0
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/contained-scan-budget.d.ts +32 -0
- package/dist/agent-runtime/contained-scan-budget.d.ts.map +1 -0
- package/dist/agent-runtime/contained-scan-contract.d.ts +52 -0
- package/dist/agent-runtime/contained-scan-contract.d.ts.map +1 -0
- package/dist/agent-runtime/contained-scan.d.ts +48 -13
- package/dist/agent-runtime/contained-scan.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox.d.ts +5 -1
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/workspace-glob.d.ts +6 -0
- package/dist/agent-runtime/workspace-glob.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/coding-tools.js +7 -7
- package/dist/entrypoints/agent-runtime/harness.js +3 -3
- package/dist/entrypoints/agent-runtime/sandbox.js +7 -7
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +9 -9
- package/dist/entrypoints/agent-runtime/sqlite/node.js +9 -9
- package/dist/entrypoints/agent-runtime/testing.js +9 -9
- package/dist/entrypoints/agent-runtime.js +9 -9
- package/dist/entrypoints/application/diagnostic-journal.js +3 -3
- package/dist/entrypoints/application/directory-inbox.js +5 -5
- package/dist/entrypoints/cli/publish.js +4 -4
- package/dist/entrypoints/cli.js +4 -4
- package/dist/entrypoints/files.js +4 -4
- package/dist/entrypoints/process/owner-loss.js +2 -1
- package/dist/entrypoints/process.js +4 -4
- package/dist/entrypoints/server.js +5 -5
- package/dist/entrypoints/telegram.js +3 -3
- package/dist/entrypoints/tools/toolkit.js +4 -4
- package/dist/{index-pq2m7t46.js → index-0fra8xvy.js} +2 -2
- package/dist/{index-yb9n4pgj.js → index-10rg78vf.js} +1 -1
- package/dist/{index-3yb5kft5.js → index-4tyt1qya.js} +1 -1
- package/dist/{index-8xyf8h2k.js → index-6j15ktag.js} +1 -1
- package/dist/{index-zrdcmg6j.js → index-72xtvcvr.js} +40 -6
- package/dist/{index-e452syyh.js → index-aqmadanx.js} +2 -2
- package/dist/{index-1jwsfkfz.js → index-eeahxwvg.js} +60 -76
- package/dist/{index-nyyam9ce.js → index-f6pw75e1.js} +1 -1
- package/dist/{index-qevqn3d3.js → index-gq3fnq3f.js} +1 -1
- package/dist/{index-bz479f0x.js → index-gtx3eknx.js} +1 -1
- package/dist/{index-nn9qvkww.js → index-j95jp7ee.js} +45 -9
- package/dist/{index-2kbysk9s.js → index-m5m9rmvt.js} +2 -0
- package/dist/{index-r3db01kh.js → index-nwm3ww60.js} +1 -1
- package/dist/index-qaqxdbxf.js +2857 -0
- package/dist/index-s9a0fjh3.js +305 -0
- package/dist/internal/contained-directory.d.ts +1 -1
- package/dist/internal/contained-directory.d.ts.map +1 -1
- package/dist/internal/contained-files.d.ts +18 -51
- package/dist/internal/contained-files.d.ts.map +1 -1
- package/dist/internal/contained-read.d.ts +17 -0
- package/dist/internal/contained-read.d.ts.map +1 -0
- package/dist/internal/darwin-binding.d.ts +3 -1
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/process/bun-child.d.ts.map +1 -1
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/group.d.ts +2 -0
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/launch.d.ts +1 -0
- package/dist/process/launch.d.ts.map +1 -1
- package/dist/process/owned-child.d.ts.map +1 -1
- package/dist/process/owner-loss-guard.d.ts.map +1 -1
- package/dist/process/owner-loss-protocol.d.ts +1 -0
- package/dist/process/owner-loss-protocol.d.ts.map +1 -1
- package/llms/agent-runtime-coding-tools.txt +9 -9
- package/llms/agent-runtime.2.txt +17 -0
- package/llms/agent-runtime.txt +59 -24
- package/llms/application.3.txt +5 -2
- package/llms/contract.txt +1 -1
- package/llms/process.txt +3 -1
- package/llms/server.5.txt +2 -0
- package/llms/stitchkit.txt +3 -3
- package/llms/{upgrading-0.106.0-0.120.0.txt → upgrading-0.106.0-0.121.0.txt} +53 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +132 -23
- package/llms.txt +4 -4
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/native-assets.json +4 -4
- package/package.json +1 -1
- package/dist/index-0qyrcjfs.js +0 -1478
- package/dist/index-aa50qwv4.js +0 -107
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openDirectoryAt,
|
|
3
|
+
openPinnedDirectory,
|
|
4
|
+
openFileAt,
|
|
5
|
+
listAt
|
|
6
|
+
} from "./index-eeahxwvg.js";
|
|
7
|
+
import {
|
|
8
|
+
errnoOf
|
|
9
|
+
} from "./index-jj9228tt.js";
|
|
10
|
+
import {
|
|
11
|
+
raceAbort
|
|
12
|
+
} from "./index-b0kddvzw.js";
|
|
13
|
+
|
|
14
|
+
// src/agent-runtime/contained-scan-budget.ts
|
|
15
|
+
class ScanStopped extends Error {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class ContainedScanBudget {
|
|
19
|
+
limits;
|
|
20
|
+
reasons = new Set;
|
|
21
|
+
visitedDirectories = 0;
|
|
22
|
+
visitedEntries = 0;
|
|
23
|
+
readBytes = 0;
|
|
24
|
+
constructor(limits = {}) {
|
|
25
|
+
this.limits = limits;
|
|
26
|
+
}
|
|
27
|
+
stop(reason) {
|
|
28
|
+
this.reasons.add(reason);
|
|
29
|
+
throw new ScanStopped(reason);
|
|
30
|
+
}
|
|
31
|
+
check() {
|
|
32
|
+
if (this.limits.deadline !== undefined && performance.now() >= this.limits.deadline)
|
|
33
|
+
this.stop("timeout");
|
|
34
|
+
if (this.limits.signal?.aborted)
|
|
35
|
+
this.stop("cancelled");
|
|
36
|
+
}
|
|
37
|
+
async wait(operation, disposeLate) {
|
|
38
|
+
this.check();
|
|
39
|
+
try {
|
|
40
|
+
const pending = operation();
|
|
41
|
+
const value = this.limits.signal ? await raceAbort(pending, this.limits.signal, disposeLate) : await pending;
|
|
42
|
+
return value;
|
|
43
|
+
} catch (error) {
|
|
44
|
+
this.check();
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
directory() {
|
|
49
|
+
this.check();
|
|
50
|
+
if (this.visitedDirectories >= (this.limits.maxDirectories ?? Infinity))
|
|
51
|
+
this.stop("max-directories");
|
|
52
|
+
this.visitedDirectories += 1;
|
|
53
|
+
}
|
|
54
|
+
remainingEntries() {
|
|
55
|
+
this.check();
|
|
56
|
+
const max = this.limits.maxEntries;
|
|
57
|
+
if (max === undefined)
|
|
58
|
+
return;
|
|
59
|
+
if (this.visitedEntries >= max)
|
|
60
|
+
this.stop("max-entries");
|
|
61
|
+
return max - this.visitedEntries;
|
|
62
|
+
}
|
|
63
|
+
entry() {
|
|
64
|
+
this.remainingEntries();
|
|
65
|
+
this.visitedEntries += 1;
|
|
66
|
+
}
|
|
67
|
+
readAllowance(maxFileBytes) {
|
|
68
|
+
this.check();
|
|
69
|
+
const remaining = (this.limits.maxBytes ?? Infinity) - this.readBytes;
|
|
70
|
+
if (remaining <= 0)
|
|
71
|
+
this.stop("max-bytes");
|
|
72
|
+
return Math.min(maxFileBytes, remaining);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/agent-runtime/contained-scan.ts
|
|
77
|
+
import path from "node:path";
|
|
78
|
+
|
|
79
|
+
// src/internal/contained-read.ts
|
|
80
|
+
async function readContainedUtf8Handle(handle, maxBytes, progress) {
|
|
81
|
+
progress?.check();
|
|
82
|
+
const metadata = progress ? await progress.wait(() => handle.stat()) : await handle.stat();
|
|
83
|
+
progress?.check();
|
|
84
|
+
if (!metadata.isFile())
|
|
85
|
+
throw new Error("Contained path is not a regular file");
|
|
86
|
+
if (metadata.size > maxBytes) {
|
|
87
|
+
const error = new Error("Contained file exceeds byte budget");
|
|
88
|
+
Object.assign(error, { code: "FILE_TOO_LARGE" });
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
const buffer = Buffer.alloc(metadata.size);
|
|
92
|
+
let offset = 0;
|
|
93
|
+
while (offset < buffer.byteLength) {
|
|
94
|
+
progress?.check();
|
|
95
|
+
const read = () => handle.read(buffer, offset, Math.min(16384, buffer.byteLength - offset), offset).then((result) => {
|
|
96
|
+
progress?.readBytes(result.bytesRead);
|
|
97
|
+
return result;
|
|
98
|
+
});
|
|
99
|
+
const { bytesRead } = progress ? await progress.wait(read) : await read();
|
|
100
|
+
if (bytesRead === 0)
|
|
101
|
+
break;
|
|
102
|
+
offset += bytesRead;
|
|
103
|
+
}
|
|
104
|
+
if (offset !== metadata.size)
|
|
105
|
+
throw new Error("Contained file changed while being read");
|
|
106
|
+
return {
|
|
107
|
+
text: new TextDecoder("utf-8", { fatal: true }).decode(buffer),
|
|
108
|
+
bytes: offset,
|
|
109
|
+
mode: metadata.mode
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// src/agent-runtime/contained-scan.ts
|
|
114
|
+
async function walkContainedFiles(input) {
|
|
115
|
+
const scan = await scanContainedFiles({ ...input, symlinks: "refuse" });
|
|
116
|
+
if (scan.truncated)
|
|
117
|
+
throw new Error("Contained file traversal exceeded its bounds");
|
|
118
|
+
return scan.files;
|
|
119
|
+
}
|
|
120
|
+
async function scanContainedFiles(input, io = { openRoot: openPinnedDirectory, list: listAt }) {
|
|
121
|
+
const budget = input.budget ?? new ContainedScanBudget;
|
|
122
|
+
const files = [];
|
|
123
|
+
const denied = [];
|
|
124
|
+
const errors = [];
|
|
125
|
+
let deniedTruncated = false;
|
|
126
|
+
let errorsTruncated = false;
|
|
127
|
+
let skippedDirectories = 0;
|
|
128
|
+
let skippedSymlinks = 0;
|
|
129
|
+
let scannedFiles = 0;
|
|
130
|
+
let stopped = false;
|
|
131
|
+
const disposeLate = (handle) => {
|
|
132
|
+
handle.close().catch(() => {
|
|
133
|
+
return;
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
const report = (error, relative, operation) => {
|
|
137
|
+
if (error instanceof ScanStopped || !input.skipUnreadable)
|
|
138
|
+
throw error;
|
|
139
|
+
budget.reasons.add("unreadable");
|
|
140
|
+
if (errors.length < (input.maxDiagnostics ?? input.maxFiles)) {
|
|
141
|
+
const code = errnoOf(error);
|
|
142
|
+
errors.push({
|
|
143
|
+
path: relative,
|
|
144
|
+
operation,
|
|
145
|
+
code: code && /^[A-Z][A-Z0-9_]{0,40}$/.test(code) ? code : "READ_FAILED"
|
|
146
|
+
});
|
|
147
|
+
} else
|
|
148
|
+
errorsTruncated = true;
|
|
149
|
+
};
|
|
150
|
+
const readFile = async (directory, name) => {
|
|
151
|
+
const maximum = input.readMaxBytes;
|
|
152
|
+
if (maximum === undefined)
|
|
153
|
+
return;
|
|
154
|
+
const allowance = budget.readAllowance(maximum);
|
|
155
|
+
const handle = await budget.wait(() => openFileAt(directory, name), disposeLate);
|
|
156
|
+
try {
|
|
157
|
+
return await readContainedUtf8Handle(handle, allowance, {
|
|
158
|
+
check: () => budget.check(),
|
|
159
|
+
readBytes: (bytes) => {
|
|
160
|
+
budget.readBytes += bytes;
|
|
161
|
+
},
|
|
162
|
+
wait: (operation) => budget.wait(operation)
|
|
163
|
+
});
|
|
164
|
+
} catch (error) {
|
|
165
|
+
if (errnoOf(error) === "FILE_TOO_LARGE") {
|
|
166
|
+
if (allowance < maximum)
|
|
167
|
+
budget.stop("max-bytes");
|
|
168
|
+
budget.reasons.add("max-file-bytes");
|
|
169
|
+
}
|
|
170
|
+
throw error;
|
|
171
|
+
} finally {
|
|
172
|
+
await handle.close();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const visitEntry = async (directory, entry, relativeDirectory, depth) => {
|
|
176
|
+
budget.check();
|
|
177
|
+
const relative = relativeDirectory ? path.join(relativeDirectory, entry.name) : entry.name;
|
|
178
|
+
const kind = entry.isDirectory() ? "directory" : entry.isSymbolicLink() ? "symlink" : entry.isFile() ? "file" : "other";
|
|
179
|
+
if (kind === "file" && input.includeFile && !input.includeFile(relative))
|
|
180
|
+
return;
|
|
181
|
+
if (kind === "directory" && input.excludeDirectory?.(relative)) {
|
|
182
|
+
skippedDirectories += 1;
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (input.authorizePath && !await budget.wait(async () => input.authorizePath?.(relative, kind))) {
|
|
186
|
+
budget.reasons.add("denied");
|
|
187
|
+
if (denied.length < (input.maxDiagnostics ?? input.maxFiles))
|
|
188
|
+
denied.push({ relative, kind });
|
|
189
|
+
else
|
|
190
|
+
deniedTruncated = true;
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
budget.check();
|
|
194
|
+
if (input.visitEntry && !await input.visitEntry(directory, { name: entry.name, kind }, relative))
|
|
195
|
+
return;
|
|
196
|
+
if (kind === "symlink") {
|
|
197
|
+
if (input.symlinks === "refuse")
|
|
198
|
+
throw new Error(`Contained file traversal refuses symlink: ${relative}`);
|
|
199
|
+
skippedSymlinks += 1;
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
if (kind === "directory") {
|
|
203
|
+
if (depth >= input.maxDepth) {
|
|
204
|
+
budget.reasons.add("max-depth");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
budget.directory();
|
|
208
|
+
let child;
|
|
209
|
+
try {
|
|
210
|
+
child = await budget.wait(() => openDirectoryAt(directory, entry.name), disposeLate);
|
|
211
|
+
} catch (error) {
|
|
212
|
+
report(error, relative, "open-directory");
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
try {
|
|
216
|
+
await visit(child, relative, depth + 1);
|
|
217
|
+
} finally {
|
|
218
|
+
await child.close();
|
|
219
|
+
}
|
|
220
|
+
} else if (kind === "file") {
|
|
221
|
+
if (scannedFiles >= input.maxFiles)
|
|
222
|
+
budget.stop("max-files");
|
|
223
|
+
let content;
|
|
224
|
+
try {
|
|
225
|
+
content = await readFile(directory, entry.name);
|
|
226
|
+
} catch (error) {
|
|
227
|
+
report(error, relative, "read-file");
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
budget.check();
|
|
231
|
+
scannedFiles += 1;
|
|
232
|
+
const file = { absolute: relative, relative, ...content && { content } };
|
|
233
|
+
if (input.visitFile)
|
|
234
|
+
stopped = !await input.visitFile(file);
|
|
235
|
+
else
|
|
236
|
+
files.push(file);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const visit = async (directory, relative, depth) => {
|
|
240
|
+
budget.check();
|
|
241
|
+
const remaining = budget.remainingEntries();
|
|
242
|
+
let countedEntries = 0;
|
|
243
|
+
let entries;
|
|
244
|
+
try {
|
|
245
|
+
entries = await budget.wait(() => io.list(directory, remaining, {
|
|
246
|
+
check: () => budget.check(),
|
|
247
|
+
entry: () => {
|
|
248
|
+
budget.visitedEntries += 1;
|
|
249
|
+
countedEntries += 1;
|
|
250
|
+
}
|
|
251
|
+
}));
|
|
252
|
+
} catch (error) {
|
|
253
|
+
report(error, relative || ".", "read-directory");
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
if (countedEntries === 0)
|
|
257
|
+
budget.visitedEntries += entries.length;
|
|
258
|
+
if (budget.limits.maxEntries !== undefined && budget.visitedEntries >= budget.limits.maxEntries)
|
|
259
|
+
budget.reasons.add("max-entries");
|
|
260
|
+
for (const entry of [...entries].sort((left, right) => left.name.localeCompare(right.name))) {
|
|
261
|
+
if (stopped)
|
|
262
|
+
break;
|
|
263
|
+
await visitEntry(directory, entry, relative, depth);
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
try {
|
|
267
|
+
let root;
|
|
268
|
+
if (typeof input.root === "string") {
|
|
269
|
+
budget.directory();
|
|
270
|
+
const rootPath = input.root;
|
|
271
|
+
try {
|
|
272
|
+
root = await budget.wait(() => io.openRoot(rootPath), disposeLate);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
report(error, ".", "open-directory");
|
|
275
|
+
return result();
|
|
276
|
+
}
|
|
277
|
+
} else
|
|
278
|
+
root = input.root;
|
|
279
|
+
try {
|
|
280
|
+
await visit(root, input.basePath === "." ? "" : input.basePath ?? "", 0);
|
|
281
|
+
} finally {
|
|
282
|
+
if (typeof input.root === "string")
|
|
283
|
+
await root.close();
|
|
284
|
+
}
|
|
285
|
+
} catch (error) {
|
|
286
|
+
if (!(error instanceof ScanStopped))
|
|
287
|
+
throw error;
|
|
288
|
+
}
|
|
289
|
+
function result() {
|
|
290
|
+
return {
|
|
291
|
+
files,
|
|
292
|
+
truncated: budget.reasons.size > 0 || stopped,
|
|
293
|
+
scannedFiles,
|
|
294
|
+
skippedDirectories,
|
|
295
|
+
skippedSymlinks,
|
|
296
|
+
denied,
|
|
297
|
+
deniedTruncated,
|
|
298
|
+
errors,
|
|
299
|
+
errorsTruncated
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
return result();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export { ScanStopped, ContainedScanBudget, readContainedUtf8Handle, walkContainedFiles, scanContainedFiles };
|
|
@@ -11,7 +11,7 @@ export declare function createDirectoryAt(directory: ContainedFileHandle, name:
|
|
|
11
11
|
* selection cannot redirect the walk. Missing descendants are created through the same
|
|
12
12
|
* pinned parents. The returned capability remains the selected directory if it is renamed.
|
|
13
13
|
*/
|
|
14
|
-
export declare function openPinnedDirectory(absolute: string, options?: {
|
|
14
|
+
export declare function openPinnedDirectory(absolute: string | ContainedFileHandle, options?: {
|
|
15
15
|
create?: boolean;
|
|
16
16
|
readable?: boolean;
|
|
17
17
|
}, io?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contained-directory.d.ts","sourceRoot":"","sources":["../../src/internal/contained-directory.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,mBAAm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GAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAAiB,GAC7D,OAAO,CAAC,mBAAmB,CAAC,CAoD9B"}
|
|
@@ -8,24 +8,6 @@ export interface ContainedFile {
|
|
|
8
8
|
mode: number;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
export interface ContainedFileScan {
|
|
12
|
-
files: readonly ContainedFile[];
|
|
13
|
-
truncated: boolean;
|
|
14
|
-
skippedDirectories: number;
|
|
15
|
-
skippedSymlinks: number;
|
|
16
|
-
/**
|
|
17
|
-
* Entries the host's `authorizePath` rejected while walking. A denied path
|
|
18
|
-
* used to disappear from every listing exactly like an absent one; naming
|
|
19
|
-
* them is what lets a caller tell "the host refused this" from "there is
|
|
20
|
-
* nothing here". Only the name and kind are carried — never content.
|
|
21
|
-
*/
|
|
22
|
-
denied: readonly {
|
|
23
|
-
relative: string;
|
|
24
|
-
kind: ContainedEntryKind;
|
|
25
|
-
}[];
|
|
26
|
-
/** The `denied` list hit its cap; there are more refusals than named. */
|
|
27
|
-
deniedTruncated: boolean;
|
|
28
|
-
}
|
|
29
11
|
export type ContainedEntryKind = 'file' | 'directory' | 'symlink' | 'other';
|
|
30
12
|
/** One entry name a directory-relative call may receive: never a walk and never truncated by NUL. */
|
|
31
13
|
export declare function isSafeEntryName(name: string): boolean;
|
|
@@ -44,22 +26,12 @@ interface ContainedDirectoryEntry {
|
|
|
44
26
|
isFile(): boolean;
|
|
45
27
|
isSymbolicLink(): boolean;
|
|
46
28
|
}
|
|
47
|
-
export declare function listAt(directory: ContainedFileHandle
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
bytes?: number;
|
|
54
|
-
}[];
|
|
55
|
-
truncated: boolean;
|
|
56
|
-
/** Direct children the host's policy refused, capped at `maxEntries`. */
|
|
57
|
-
denied: {
|
|
58
|
-
name: string;
|
|
59
|
-
kind: ContainedEntryKind;
|
|
60
|
-
}[];
|
|
61
|
-
deniedTruncated: boolean;
|
|
62
|
-
}>;
|
|
29
|
+
export declare function listAt(directory: ContainedFileHandle, maxEntries?: number, progress?: {
|
|
30
|
+
check(): void;
|
|
31
|
+
entry(): void;
|
|
32
|
+
}): Promise<readonly ContainedDirectoryEntry[]>;
|
|
33
|
+
/** One descendant directory opened from the request's selected root. */
|
|
34
|
+
export declare function openContainedDirectory(root: string | ContainedFileHandle, relative: string, beforeOpen?: () => void): Promise<ContainedFileHandle>;
|
|
63
35
|
export interface ContainedParent {
|
|
64
36
|
handle: ContainedFileHandle;
|
|
65
37
|
basename: string;
|
|
@@ -70,7 +42,7 @@ export interface ContainedParent {
|
|
|
70
42
|
* Read-only on purpose: the caller authorizes the mutation before any of it
|
|
71
43
|
* happens, and cannot do that without knowing what would be created.
|
|
72
44
|
*/
|
|
73
|
-
export declare function missingContainedDirectories(root: string, relative: string): Promise<string[]>;
|
|
45
|
+
export declare function missingContainedDirectories(root: string | ContainedFileHandle, relative: string): Promise<string[]>;
|
|
74
46
|
/**
|
|
75
47
|
* The first segment of `relative` that opens an entry stored under another spelling.
|
|
76
48
|
*
|
|
@@ -80,36 +52,31 @@ export declare function missingContainedDirectories(root: string, relative: stri
|
|
|
80
52
|
* because two distinct entries may exist on a volume that does not fold. A missing
|
|
81
53
|
* segment is not misspelled; the caller reports it.
|
|
82
54
|
*/
|
|
83
|
-
export declare function misspelledContainedSegment(root: string, relative: string
|
|
55
|
+
export declare function misspelledContainedSegment(root: string | ContainedFileHandle, relative: string, progress?: {
|
|
56
|
+
check(): void;
|
|
57
|
+
directory(): void;
|
|
58
|
+
entry(): void;
|
|
59
|
+
remainingEntries(): number | undefined;
|
|
60
|
+
wait<T>(operation: () => Promise<T>, disposeLate?: (value: T) => void): Promise<T>;
|
|
61
|
+
}): Promise<string | undefined>;
|
|
84
62
|
/** A directory vanished after the host approved a different creation plan. */
|
|
85
63
|
export declare class UnapprovedContainedDirectoryError extends Error {
|
|
86
64
|
readonly relative: string;
|
|
87
65
|
constructor(relative: string);
|
|
88
66
|
}
|
|
89
|
-
export declare function openContainedParent(root: string, relative: string, options?: {
|
|
67
|
+
export declare function openContainedParent(root: string | ContainedFileHandle, relative: string, options?: {
|
|
90
68
|
createDirectories?: readonly string[];
|
|
91
69
|
}): Promise<ContainedParent>;
|
|
92
70
|
/** Open a final regular-file candidate through pinned ancestors without following symlinks. */
|
|
93
|
-
export declare function openContainedFile(root: string, relative: string): Promise<ContainedFileHandle>;
|
|
71
|
+
export declare function openContainedFile(root: string | ContainedFileHandle, relative: string): Promise<ContainedFileHandle>;
|
|
94
72
|
/** What was checked is no longer what the path names; the caller can look again. */
|
|
95
73
|
export declare class ContainedPathChangedError extends Error {
|
|
96
74
|
readonly relative: string;
|
|
97
75
|
constructor(relative: string);
|
|
98
76
|
}
|
|
99
|
-
export declare function assertContainedFileCurrent(root: string, relative: string, expected: ContainedFileHandle): Promise<void>;
|
|
100
|
-
export declare function assertContainedParentCurrent(root: string, relative: string, expected: ContainedFileHandle): Promise<void>;
|
|
77
|
+
export declare function assertContainedFileCurrent(root: string | ContainedFileHandle, relative: string, expected: ContainedFileHandle): Promise<void>;
|
|
78
|
+
export declare function assertContainedParentCurrent(root: string | ContainedFileHandle, relative: string, expected: ContainedFileHandle): Promise<void>;
|
|
101
79
|
export declare function containedEntryMetadata(parent: ContainedParent): Promise<ContainedEntryMetadata | null>;
|
|
102
80
|
export declare function openContainedParentFile(parent: ContainedParent): Promise<ContainedFileHandle>;
|
|
103
|
-
export declare function readContainedUtf8Handle(handle: ContainedFileHandle, maxBytes: number): Promise<{
|
|
104
|
-
text: string;
|
|
105
|
-
bytes: number;
|
|
106
|
-
mode: number;
|
|
107
|
-
}>;
|
|
108
|
-
/** Open the final path without following any mutable ancestor or replacement symlink. */
|
|
109
|
-
export declare function readContainedUtf8File(root: string, relative: string, maxBytes: number): Promise<{
|
|
110
|
-
text: string;
|
|
111
|
-
bytes: number;
|
|
112
|
-
mode: number;
|
|
113
|
-
}>;
|
|
114
81
|
export {};
|
|
115
82
|
//# sourceMappingURL=contained-files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contained-files.d.ts","sourceRoot":"","sources":["../../src/internal/contained-files.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,mBAAmB,EAOzB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"contained-files.d.ts","sourceRoot":"","sources":["../../src/internal/contained-files.ts"],"names":[],"mappings":"AASA,OAAO,EACL,KAAK,mBAAmB,EAOzB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAM5E,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAErD;AAWD,wBAAsB,UAAU,CAC9B,SAAS,EAAE,mBAAmB,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,mBAAmB,CAAC,CAQ9B;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,IAAI,OAA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@@
|
|
|
1
|
+
import type { ContainedFileHandle } from './contained-handle.js';
|
|
2
|
+
export declare function readContainedUtf8Handle(handle: ContainedFileHandle, maxBytes: number, progress?: {
|
|
3
|
+
check(): void;
|
|
4
|
+
readBytes(bytes: number): void;
|
|
5
|
+
wait<T>(operation: () => Promise<T>): Promise<T>;
|
|
6
|
+
}): Promise<{
|
|
7
|
+
text: string;
|
|
8
|
+
bytes: number;
|
|
9
|
+
mode: number;
|
|
10
|
+
}>;
|
|
11
|
+
/** Open the final path without following any mutable ancestor or replacement symlink. */
|
|
12
|
+
export declare function readContainedUtf8File(root: string | ContainedFileHandle, relative: string, maxBytes: number): Promise<{
|
|
13
|
+
text: string;
|
|
14
|
+
bytes: number;
|
|
15
|
+
mode: number;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=contained-read.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contained-read.d.ts","sourceRoot":"","sources":["../../src/internal/contained-read.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE;IACT,KAAK,IAAI,IAAI,CAAC;IACd,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAClD,GACA,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA+BxD;AAED,yFAAyF;AACzF,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,GAAG,mBAAmB,EAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAOxD"}
|
|
@@ -6,11 +6,13 @@ export interface DarwinEntry {
|
|
|
6
6
|
export interface DarwinBinding {
|
|
7
7
|
processIdentity(pid: number): unknown;
|
|
8
8
|
openDirectoryAt(directory: number, name: string, searchOnly: boolean): number;
|
|
9
|
+
reopenDirectory(directory: number, searchOnly: boolean): number;
|
|
10
|
+
changeDirectory(directory: number): void;
|
|
9
11
|
openFileAt(directory: number, name: string): number;
|
|
10
12
|
createFileAt(directory: number, name: string, mode: number): number;
|
|
11
13
|
createDirectoryAt(directory: number, name: string, mode: number): boolean;
|
|
12
14
|
statAt(directory: number, name: string): Omit<DarwinEntry, 'name'> | null;
|
|
13
|
-
listAt(directory: number): readonly DarwinEntry[];
|
|
15
|
+
listAt(directory: number, maxEntries?: number, progress?: (entry: boolean) => void): readonly DarwinEntry[];
|
|
14
16
|
renameAt(directory: number, source: string, target: string): void;
|
|
15
17
|
unlinkAt(directory: number, name: string): void;
|
|
16
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"darwin-binding.d.ts","sourceRoot":"","sources":["../../src/internal/darwin-binding.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACtC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9E,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACpD,YAAY,CAA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AAc,CAMhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-owner.d.ts","sourceRoot":"","sources":["../../src/process/command-owner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAEL,KAAK,oBAAoB,EAI1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"command-owner.d.ts","sourceRoot":"","sources":["../../src/process/command-owner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAEL,KAAK,oBAAoB,EAI1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,UAAU,CAAC;AAWlB,wFAAwF;AACxF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,oBAAoB,EAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,yBAAyB;;;;;;;;;;EAyLnC"}
|
package/dist/process/group.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { NativeCommandError, type ParsedNativeCommandStopPolicy } from './contra
|
|
|
3
3
|
export declare function createCommandDeadline(timeoutMs: number, reason: unknown): {
|
|
4
4
|
signal: AbortSignal;
|
|
5
5
|
cancel(): void;
|
|
6
|
+
/** Grant `nextMs` from now instead; an expired deadline stays expired. */
|
|
7
|
+
restart(nextMs: number): void;
|
|
6
8
|
};
|
|
7
9
|
/** Send `signal` to the group. `false` is `ESRCH`: the kernel found no member to receive it. */
|
|
8
10
|
export declare function signalGroup(pid: number | undefined, signal: NodeJS.Signals): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../src/process/group.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,k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GAAG;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,GAC/E,OAAO,CAAC,OAAO,CAAC,CAsBlB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,6BAA6B,CAAC;IACtC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBnB;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAQtE;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAMxF"}
|
package/dist/process/launch.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface NativeCommandLaunchDriver {
|
|
|
27
27
|
cleanupTimeoutMs?: number;
|
|
28
28
|
timeoutMs?: number;
|
|
29
29
|
closeTimeoutMs?: number;
|
|
30
|
+
cwdDescriptor?: number;
|
|
30
31
|
}
|
|
31
32
|
/** Driver overrides retain the same finite, safe-integer budget admission. */
|
|
32
33
|
export declare function nativeCommandBudgets(options: ParsedNativeCommandOptions, driver: NativeCommandLaunchDriver | undefined): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/process/launch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAsB,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAIjF,OAAO,EAA0B,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAElF,wFA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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owned-child.d.ts","sourceRoot":"","sources":["../../src/process/owned-child.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAA+B,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAM1F,OAAO,EAAE,KAAK,wBAAwB,EAAyB,MAAM,uBAAuB,CAAC;AAI7F,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC,GAAG,UAAU,CAIb;
|
|
1
|
+
{"version":3,"file":"owned-child.d.ts","sourceRoot":"","sources":["../../src/process/owned-child.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAA+B,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAM1F,OAAO,EAAE,KAAK,wBAAwB,EAAyB,MAAM,uBAAuB,CAAC;AAI7F,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC,GAAG,UAAU,CAIb;AAiGD,6FAA6F;AAC7F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,wBAAwB,CAAC;CACtC,GAAG,4BAA4B,CA0C/B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-loss-guard.d.ts","sourceRoot":"","sources":["../../src/process/owner-loss-guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"owner-loss-guard.d.ts","sourceRoot":"","sources":["../../src/process/owner-loss-guard.ts"],"names":[],"mappings":"AAgNA;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAEzD;AAED,0FAA0F;AAC1F,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
|
|
@@ -2,6 +2,7 @@ export declare const OWNER_LOSS_GUARD_FLAG = "--stitchkit-owner-loss-guard-v1";
|
|
|
2
2
|
export interface OwnerLossGuardInvocation {
|
|
3
3
|
readonly entry: string;
|
|
4
4
|
readonly signalTarget: 'group' | 'leader';
|
|
5
|
+
readonly cwdDescriptor?: number;
|
|
5
6
|
}
|
|
6
7
|
/** The owner-loss guard is certified only on the two POSIX kernels exercised by release CI. */
|
|
7
8
|
export declare function ownerLossAvailable(platform: NodeJS.Platform): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"owner-loss-protocol.d.ts","sourceRoot":"","sources":["../../src/process/owner-loss-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAEvE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"owner-loss-protocol.d.ts","sourceRoot":"","sources":["../../src/process/owner-loss-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,oCAAoC,CAAC;AAEvE,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,OAAO,CAErE;AAED,mGAAmG;AACnG,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,wBAAwB,EAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,SAAS,MAAM,EAAE,GACtB,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAUvB"}
|
|
@@ -22,28 +22,28 @@ artifact store is supplied, `read_output`.
|
|
|
22
22
|
| Export | Kind | Summary |
|
|
23
23
|
|--------|------|---------|
|
|
24
24
|
| `createAgentCodingTools` | function | construct direct host-authorized bounded file, listing, glob, search, exact-snippet edit, shell and artifact runtime-tool definitions; `edit_file` inserts `newText` literally in both single and `replaceAll` modes; every ordinary refusal is a typed code with an instructive `hint`, and filesystem operations use Linux `/proc/self/fd` or the packaged macOS Node-API backend and otherwise fail closed |
|
|
25
|
-
| `AGENT_CODING_TOOL_NAMES` | const | the mounted tool names — `read_file`, `write_file`, `edit_file`, `list_directory`, `glob`, `search_files`, `run_command`, `read_output` |
|
|
26
25
|
| `AgentCodingToolDefinition` | _type_ | peer-free structural direct-tool shape accepted by the canonical runtime-tool surface |
|
|
27
26
|
| `AgentCodingToolConfig` | _type_ | absolute root, required operation authorization, optional async/sync `authorizePath({ path })` shared by direct file effects and discovery, finite executable alias map, exact child environment and optional limits |
|
|
28
27
|
| `AgentCodingToolAuthorizationSchema` / `AgentCodingToolAuthorization` | schema / _type_ | discriminated read/write/search/patch/shell/artifact decision presented to host policy before effect |
|
|
29
28
|
| `AgentCodingToolPathAuthorizationSchema` / `AgentCodingToolPathAuthorization` | schema / _type_ | strict workspace-relative path presented to the shared path policy before disclosure, opening or mutation |
|
|
30
|
-
| `AgentCodingToolLimitsSchema` / `AgentCodingToolLimits` | schema / _type_ | explicit path/read/write/argument-count/argument-byte/output/artifact/timeout/termination-grace ceilings |
|
|
29
|
+
| `AgentCodingToolLimitsSchema` / `AgentCodingToolLimits` | schema / _type_ | explicit path/read/write/argument-count/argument-byte/output/artifact/timeout/termination-grace ceilings; shared discovery directory/entry/serialized-output/deadline ceilings, aggregate search-read ceiling and measured coverage |
|
|
31
30
|
| `AgentCodingArtifactStore` | _type_ | host-owned opaque artifact write and bounded read boundary |
|
|
32
|
-
| `FileReadInputSchema` / `FileReadOutputSchema` | schema | bounded strict-UTF-8 byte slice; offsets must align with UTF-8 code-point boundaries |
|
|
33
|
-
| `FileWriteInputSchema` / `FileWriteOutputSchema` | schema | create-only by default or explicit atomic replacement; symlink targets fail closed |
|
|
34
|
-
| `createShellInputSchema` / `ShellOutputSchema` | schema | enumerated executable alias plus arguments and concrete relative cwd; explicit exited/timeout/output-limit/cancelled outcome |
|
|
35
31
|
|
|
36
|
-
File/search operations pin directory descriptors across authorization and the actual effect;
|
|
32
|
+
File/search operations select a root descriptor before both policy callback kinds and pin directory descriptors across authorization and the actual effect;
|
|
37
33
|
resource discovery uses the same ancestor-safe traversal. This closes parent rename/symlink races
|
|
38
|
-
without claiming an executable sandbox. The
|
|
34
|
+
without claiming an executable sandbox. The ordinary command launcher passes a pinned cwd to its
|
|
35
|
+
isolated guard (inherited fd 4); a custom sandbox launcher owns atomic capture of its pathname cwd. List/glob/search report coverage; canonical spelling work consumes the same budget. List raw entries
|
|
36
|
+
are capped by maxListEntries and maxSearchEntries, and glob patterns by 4,096 UTF-16 units.
|
|
37
|
+
The default ceilings are 4,096 path bytes, 256 KiB read/write/output, 128 shell arguments, 64 KiB
|
|
39
38
|
of aggregate argument text, 4 MiB per artifact and 30 seconds. The root is a path-resolution
|
|
40
39
|
boundary, not an OS sandbox; executable behavior, process
|
|
41
40
|
isolation, credentials and external-effect idempotency remain host responsibilities.
|
|
42
41
|
|
|
43
42
|
When `authorizePath` denies a path, direct read/write/edit returns `FORBIDDEN`, while
|
|
44
43
|
`list_directory`, `glob` and `search_files` omit it. Denial is recursive: direct access and
|
|
45
|
-
discovery base paths
|
|
46
|
-
|
|
44
|
+
discovery base paths check every named ancestor, outermost first and segment-wise; `.` is
|
|
45
|
+
checked only when the requested base itself is `.`, so subtree allowlists remain usable. Thus
|
|
46
|
+
denying `credentials` denies `credentials/token.txt` but not `credentials-backup`. Directory
|
|
47
47
|
admission happens before descent and file admission before opening; `search_files.include` is also
|
|
48
48
|
applied before content is read. Requested paths must use `/` — a backslash is refused, because the
|
|
49
49
|
containment walk reads it as a separator while a callback would read it as one name.
|