humanish 0.15.0 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +33 -31
  2. package/dist/claude-agent-sdk.js +14 -7
  3. package/dist/claude-agent-sdk.js.map +1 -1
  4. package/dist/codex-app-server-ui.d.ts +1 -1
  5. package/dist/codex-app-server-ui.js +69 -39
  6. package/dist/codex-app-server-ui.js.map +1 -1
  7. package/dist/codex-app-server.d.ts +3 -0
  8. package/dist/codex-app-server.js +15 -8
  9. package/dist/codex-app-server.js.map +1 -1
  10. package/dist/concurrent-shared-world-lab.js +18 -16
  11. package/dist/concurrent-shared-world-lab.js.map +1 -1
  12. package/dist/core/git-state.d.ts +2 -0
  13. package/dist/core/git-state.js +152 -17
  14. package/dist/core/git-state.js.map +1 -1
  15. package/dist/core/git-workspace.d.ts +31 -0
  16. package/dist/core/git-workspace.js +447 -0
  17. package/dist/core/git-workspace.js.map +1 -0
  18. package/dist/cua-actor-lab.d.ts +3 -2
  19. package/dist/cua-actor-lab.js +34 -23
  20. package/dist/cua-actor-lab.js.map +1 -1
  21. package/dist/e2b-terminal-lab.js +111 -46
  22. package/dist/e2b-terminal-lab.js.map +1 -1
  23. package/dist/feedback.js +139 -101
  24. package/dist/feedback.js.map +1 -1
  25. package/dist/init.d.ts +1 -1
  26. package/dist/init.js +108 -22
  27. package/dist/init.js.map +1 -1
  28. package/dist/lab-config.d.ts +5 -0
  29. package/dist/lab-config.js +38 -0
  30. package/dist/lab-config.js.map +1 -1
  31. package/dist/labs.js +258 -52
  32. package/dist/labs.js.map +1 -1
  33. package/dist/observer-assets.js +3 -2
  34. package/dist/observer-assets.js.map +1 -1
  35. package/dist/observer-static.js +131 -17
  36. package/dist/observer-static.js.map +1 -1
  37. package/dist/observer.js +263 -66
  38. package/dist/observer.js.map +1 -1
  39. package/dist/openai-responses-cu.js +18 -4
  40. package/dist/openai-responses-cu.js.map +1 -1
  41. package/dist/oss-lab.js +59 -14
  42. package/dist/oss-lab.js.map +1 -1
  43. package/dist/oss-meta-lab.d.ts +2 -4
  44. package/dist/oss-meta-lab.js +117 -477
  45. package/dist/oss-meta-lab.js.map +1 -1
  46. package/dist/program.js +23 -21
  47. package/dist/program.js.map +1 -1
  48. package/dist/run-paths.d.ts +56 -0
  49. package/dist/run-paths.js +340 -0
  50. package/dist/run-paths.js.map +1 -0
  51. package/dist/run.d.ts +14 -4
  52. package/dist/run.js +595 -306
  53. package/dist/run.js.map +1 -1
  54. package/dist/scripted-browser-actor.d.ts +7 -4
  55. package/dist/scripted-browser-actor.js +154 -41
  56. package/dist/scripted-browser-actor.js.map +1 -1
  57. package/dist/scripted-browser-lab.js +95 -45
  58. package/dist/scripted-browser-lab.js.map +1 -1
  59. package/dist/selected-output-paths.d.ts +49 -0
  60. package/dist/selected-output-paths.js +354 -0
  61. package/dist/selected-output-paths.js.map +1 -0
  62. package/dist/shared-world-lab.js +13 -12
  63. package/dist/shared-world-lab.js.map +1 -1
  64. package/dist/source-archive.js +44 -1
  65. package/dist/source-archive.js.map +1 -1
  66. package/docs/architecture/oss-lab-poc.md +8 -0
  67. package/docs/assets/humanish-observer-hero.png +0 -0
  68. package/docs/contracts/policy.md +7 -1
  69. package/docs/goals/current.md +20 -1
  70. package/docs/product/open-source-install-experience.md +9 -1
  71. package/docs/ramp/README.md +14 -7
  72. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ export declare const RUNS_RELATIVE_ROOT: string;
2
+ export declare const LATEST_RUN_RELATIVE_PATH: string;
3
+ export interface RunArtifactPaths {
4
+ absoluteRunRoot: string;
5
+ relativeRunRoot: string;
6
+ absoluteLatestPointer: string;
7
+ relativeLatestPointer: string;
8
+ }
9
+ export interface PreparedRunArtifactPaths extends RunArtifactPaths {
10
+ readonly physicalLatestPointer: string;
11
+ readonly physicalRunRoot: string;
12
+ readonly physicalRunsRoot: string;
13
+ readonly runRootIdentity: FileIdentity;
14
+ readonly runsRootIdentity: FileIdentity;
15
+ }
16
+ interface FileIdentity {
17
+ readonly birthtimeNs: bigint;
18
+ readonly dev: bigint;
19
+ readonly ino: bigint;
20
+ }
21
+ export interface LatestRunPathPointer {
22
+ runId: string;
23
+ path: string;
24
+ }
25
+ /**
26
+ * Run ids are directory names, not paths. Keep the accepted grammar broad so
27
+ * existing runs remain readable while rejecting every path-shaped input.
28
+ */
29
+ export declare function isSafeRunIdSegment(runId: string): boolean;
30
+ export declare function resolveRunsRoot(cwdInput: string): string;
31
+ export declare function resolveRunDirectory(cwdInput: string, runId: string): string;
32
+ export declare function tryResolveRunDirectory(cwdInput: string, runId: string): string | null;
33
+ export declare function resolveRunArtifactPaths(cwdInput: string, runId: string): RunArtifactPaths;
34
+ export declare function prepareRunArtifactPaths(cwdInput: string, runId: string): Promise<PreparedRunArtifactPaths>;
35
+ export declare function validatePreparedRunArtifactPaths(prepared: PreparedRunArtifactPaths): Promise<PreparedRunArtifactPaths>;
36
+ /** Cheap revalidation for repeated contained reads/writes within one prepared run. */
37
+ export declare function validatePreparedRunRootIdentity(prepared: PreparedRunArtifactPaths): Promise<PreparedRunArtifactPaths>;
38
+ /** Bind an already-existing safe run as a new identity; this is not prior-preparation proof. */
39
+ export declare function bindExistingRunArtifactPaths(cwdInput: string, runId: string): Promise<PreparedRunArtifactPaths>;
40
+ export declare function resolveExistingRunDirectory(cwdInput: string, runId: string): Promise<string | null>;
41
+ /**
42
+ * A latest pointer is valid only when both fields identify the same direct
43
+ * child of .humanish/runs. Callers must never use pointer.path directly.
44
+ */
45
+ export declare function resolveLatestRunDirectory(cwdInput: string, pointer: LatestRunPathPointer): string | null;
46
+ export declare function resolveExistingLatestRunDirectory(cwdInput: string, pointer: LatestRunPathPointer): Promise<string | null>;
47
+ export declare function isRegularHumanishStorageFile(cwdInput: string, ...segments: string[]): Promise<boolean>;
48
+ export declare function prepareHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise<string>;
49
+ export declare function prepareReusableHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise<string>;
50
+ export declare function prepareExclusiveHumanishStorageDirectories(cwdInput: string, segmentSets: string[][]): Promise<string[]>;
51
+ export declare function prepareExclusiveHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise<string>;
52
+ export declare function prepareHumanishStorageFile(cwdInput: string, ...segments: string[]): Promise<string>;
53
+ export declare function resolveHumanishStorageDirectory(cwdInput: string, ...segments: string[]): string;
54
+ export declare function resolveExistingHumanishStorageDirectory(cwdInput: string, ...segments: string[]): Promise<string | null>;
55
+ export declare function isPathInside(rootInput: string, candidateInput: string): boolean;
56
+ export {};
@@ -0,0 +1,340 @@
1
+ import { lstat, mkdir, readdir, realpath } from "node:fs/promises";
2
+ import path from "node:path";
3
+ export const RUNS_RELATIVE_ROOT = path.join(".humanish", "runs");
4
+ export const LATEST_RUN_RELATIVE_PATH = path.join(RUNS_RELATIVE_ROOT, "latest.json");
5
+ /**
6
+ * Run ids are directory names, not paths. Keep the accepted grammar broad so
7
+ * existing runs remain readable while rejecting every path-shaped input.
8
+ */
9
+ export function isSafeRunIdSegment(runId) {
10
+ return runId.length > 0
11
+ && runId !== "."
12
+ && runId !== ".."
13
+ && !runId.includes("/")
14
+ && !runId.includes("\\")
15
+ && !runId.includes("\0");
16
+ }
17
+ export function resolveRunsRoot(cwdInput) {
18
+ return path.resolve(cwdInput, RUNS_RELATIVE_ROOT);
19
+ }
20
+ export function resolveRunDirectory(cwdInput, runId) {
21
+ if (!isSafeRunIdSegment(runId)) {
22
+ throw new Error("Run id must be one non-empty path segment.");
23
+ }
24
+ const runsRoot = resolveRunsRoot(cwdInput);
25
+ const runRoot = path.resolve(runsRoot, runId);
26
+ if (!isPathInside(runsRoot, runRoot) || path.dirname(runRoot) !== runsRoot) {
27
+ throw new Error("Run directory must stay inside the Humanish runs root.");
28
+ }
29
+ return runRoot;
30
+ }
31
+ export function tryResolveRunDirectory(cwdInput, runId) {
32
+ try {
33
+ return resolveRunDirectory(cwdInput, runId);
34
+ }
35
+ catch {
36
+ return null;
37
+ }
38
+ }
39
+ export function resolveRunArtifactPaths(cwdInput, runId) {
40
+ if (runId === "latest.json") {
41
+ throw new Error("Run id is reserved; choose a different run id.");
42
+ }
43
+ const absoluteRunRoot = resolveRunDirectory(cwdInput, runId);
44
+ return {
45
+ absoluteRunRoot,
46
+ relativeRunRoot: path.join(RUNS_RELATIVE_ROOT, runId),
47
+ absoluteLatestPointer: path.resolve(cwdInput, LATEST_RUN_RELATIVE_PATH),
48
+ relativeLatestPointer: LATEST_RUN_RELATIVE_PATH
49
+ };
50
+ }
51
+ export async function prepareRunArtifactPaths(cwdInput, runId) {
52
+ const paths = resolveRunArtifactPaths(cwdInput, runId);
53
+ const prepared = await prepareHumanishStorageDirectory(cwdInput, "runs", runId);
54
+ if (prepared !== paths.absoluteRunRoot) {
55
+ throw new Error("Run directory resolved outside the expected storage root.");
56
+ }
57
+ await assertNoSymlinkDescendants(prepared);
58
+ await assertRegularFileOrMissing(paths.absoluteLatestPointer);
59
+ return validatePreparedRunArtifactPaths(await capturePreparedRunArtifactPaths(paths, prepared));
60
+ }
61
+ export async function validatePreparedRunArtifactPaths(prepared) {
62
+ await validatePreparedRunRootIdentity(prepared);
63
+ await assertNoSymlinkDescendants(prepared.physicalRunRoot);
64
+ await assertRegularFileOrMissing(prepared.physicalLatestPointer);
65
+ return prepared;
66
+ }
67
+ /** Cheap revalidation for repeated contained reads/writes within one prepared run. */
68
+ export async function validatePreparedRunRootIdentity(prepared) {
69
+ const [lexicalRunsRoot, lexicalRunRoot] = await Promise.all([
70
+ realpath(path.dirname(prepared.absoluteRunRoot)),
71
+ realpath(prepared.absoluteRunRoot)
72
+ ]);
73
+ if (lexicalRunsRoot !== prepared.physicalRunsRoot || lexicalRunRoot !== prepared.physicalRunRoot) {
74
+ throw new Error("Prepared Humanish run storage changed physical destination.");
75
+ }
76
+ await Promise.all([
77
+ assertDirectoryIdentity(prepared.physicalRunsRoot, prepared.runsRootIdentity),
78
+ assertDirectoryIdentity(prepared.physicalRunRoot, prepared.runRootIdentity)
79
+ ]);
80
+ return prepared;
81
+ }
82
+ /** Bind an already-existing safe run as a new identity; this is not prior-preparation proof. */
83
+ export async function bindExistingRunArtifactPaths(cwdInput, runId) {
84
+ const paths = resolveRunArtifactPaths(cwdInput, runId);
85
+ const existing = await resolveExistingRunDirectory(cwdInput, runId);
86
+ if (!existing || existing !== paths.absoluteRunRoot) {
87
+ throw new Error("Run directory is not an existing Humanish run directory.");
88
+ }
89
+ await assertNoSymlinkDescendants(existing);
90
+ await assertRegularFileOrMissing(paths.absoluteLatestPointer);
91
+ return validatePreparedRunArtifactPaths(await capturePreparedRunArtifactPaths(paths, existing));
92
+ }
93
+ export async function resolveExistingRunDirectory(cwdInput, runId) {
94
+ const expected = tryResolveRunDirectory(cwdInput, runId);
95
+ if (!expected) {
96
+ return null;
97
+ }
98
+ const existing = await resolveExistingHumanishStorageDirectory(cwdInput, "runs", runId);
99
+ return existing === expected ? existing : null;
100
+ }
101
+ /**
102
+ * A latest pointer is valid only when both fields identify the same direct
103
+ * child of .humanish/runs. Callers must never use pointer.path directly.
104
+ */
105
+ export function resolveLatestRunDirectory(cwdInput, pointer) {
106
+ const expected = tryResolveRunDirectory(cwdInput, pointer.runId);
107
+ if (!expected || !isProjectRelativePath(pointer.path)) {
108
+ return null;
109
+ }
110
+ const declared = path.resolve(cwdInput, pointer.path);
111
+ return declared === expected ? expected : null;
112
+ }
113
+ export async function resolveExistingLatestRunDirectory(cwdInput, pointer) {
114
+ const expected = resolveLatestRunDirectory(cwdInput, pointer);
115
+ if (!expected) {
116
+ return null;
117
+ }
118
+ const existing = await resolveExistingRunDirectory(cwdInput, pointer.runId);
119
+ return existing === expected ? existing : null;
120
+ }
121
+ export async function isRegularHumanishStorageFile(cwdInput, ...segments) {
122
+ const parent = await resolveExistingHumanishStorageDirectory(cwdInput, ...segments.slice(0, -1));
123
+ const fileName = segments.at(-1);
124
+ if (!parent || !fileName || !isSafeStorageSegment(fileName)) {
125
+ return false;
126
+ }
127
+ try {
128
+ const stats = await lstat(path.join(parent, fileName));
129
+ return stats.isFile() && !stats.isSymbolicLink() && stats.nlink === 1;
130
+ }
131
+ catch (error) {
132
+ if (isNodeError(error) && error.code === "ENOENT") {
133
+ return false;
134
+ }
135
+ throw error;
136
+ }
137
+ }
138
+ export async function prepareHumanishStorageDirectory(cwdInput, ...segments) {
139
+ const prepared = await walkHumanishStorage(cwdInput, segments, true);
140
+ if (!prepared) {
141
+ throw new Error("Humanish storage directory could not be created.");
142
+ }
143
+ return prepared;
144
+ }
145
+ export async function prepareReusableHumanishStorageDirectory(cwdInput, ...segments) {
146
+ const prepared = await prepareHumanishStorageDirectory(cwdInput, ...segments);
147
+ await assertNoSymlinkDescendants(prepared);
148
+ return prepared;
149
+ }
150
+ export async function prepareExclusiveHumanishStorageDirectories(cwdInput, segmentSets) {
151
+ const targets = [];
152
+ for (const segments of segmentSets) {
153
+ assertSafeStorageSegments(segments);
154
+ const name = segments.at(-1);
155
+ if (!name) {
156
+ throw new Error("Exclusive Humanish storage directory needs a leaf segment.");
157
+ }
158
+ const parent = await prepareHumanishStorageDirectory(cwdInput, ...segments.slice(0, -1));
159
+ const target = path.join(parent, name);
160
+ try {
161
+ await lstat(target);
162
+ throw new Error("Humanish storage id already exists; choose a new id.");
163
+ }
164
+ catch (error) {
165
+ if (!isNodeError(error) || error.code !== "ENOENT") {
166
+ throw error;
167
+ }
168
+ }
169
+ targets.push(target);
170
+ }
171
+ for (const target of targets) {
172
+ try {
173
+ await mkdir(target);
174
+ }
175
+ catch (error) {
176
+ if (isNodeError(error) && error.code === "EEXIST") {
177
+ throw new Error("Humanish storage id already exists; choose a new id.");
178
+ }
179
+ throw error;
180
+ }
181
+ }
182
+ return targets;
183
+ }
184
+ export async function prepareExclusiveHumanishStorageDirectory(cwdInput, ...segments) {
185
+ const [target] = await prepareExclusiveHumanishStorageDirectories(cwdInput, [segments]);
186
+ if (!target) {
187
+ throw new Error("Exclusive Humanish storage directory was not created.");
188
+ }
189
+ return target;
190
+ }
191
+ export async function prepareHumanishStorageFile(cwdInput, ...segments) {
192
+ const fileName = segments.at(-1);
193
+ if (!fileName || !isSafeStorageSegment(fileName)) {
194
+ throw new Error("Humanish storage file must use a non-empty path segment.");
195
+ }
196
+ const parent = await prepareHumanishStorageDirectory(cwdInput, ...segments.slice(0, -1));
197
+ const filePath = path.join(parent, fileName);
198
+ await assertRegularFileOrMissing(filePath);
199
+ return filePath;
200
+ }
201
+ export function resolveHumanishStorageDirectory(cwdInput, ...segments) {
202
+ assertSafeStorageSegments(segments);
203
+ const humanishRoot = path.resolve(cwdInput, ".humanish");
204
+ const resolved = path.resolve(humanishRoot, ...segments);
205
+ if (!isPathInside(humanishRoot, resolved)) {
206
+ throw new Error("Humanish storage directory must stay inside .humanish.");
207
+ }
208
+ return resolved;
209
+ }
210
+ export async function resolveExistingHumanishStorageDirectory(cwdInput, ...segments) {
211
+ return walkHumanishStorage(cwdInput, segments, false);
212
+ }
213
+ export function isPathInside(rootInput, candidateInput) {
214
+ const root = path.resolve(rootInput);
215
+ const candidate = path.resolve(candidateInput);
216
+ const relative = path.relative(root, candidate);
217
+ return relative === ""
218
+ || (relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative));
219
+ }
220
+ function isProjectRelativePath(value) {
221
+ const parts = value.replace(/\\/g, "/").split("/");
222
+ return value.length > 0
223
+ && !path.isAbsolute(value)
224
+ && !path.posix.isAbsolute(value)
225
+ && !path.win32.isAbsolute(value)
226
+ && !value.includes("\0")
227
+ && !parts.some((part) => part === "." || part === "..");
228
+ }
229
+ async function walkHumanishStorage(cwdInput, segments, create) {
230
+ assertSafeStorageSegments(segments);
231
+ let current = path.resolve(cwdInput);
232
+ for (const segment of [".humanish", ...segments]) {
233
+ current = path.join(current, segment);
234
+ let stats;
235
+ try {
236
+ stats = await lstat(current);
237
+ }
238
+ catch (error) {
239
+ if (!isNodeError(error) || error.code !== "ENOENT") {
240
+ throw error;
241
+ }
242
+ if (!create) {
243
+ return null;
244
+ }
245
+ try {
246
+ await mkdir(current);
247
+ }
248
+ catch (mkdirError) {
249
+ if (!isNodeError(mkdirError) || mkdirError.code !== "EEXIST") {
250
+ throw mkdirError;
251
+ }
252
+ }
253
+ stats = await lstat(current);
254
+ }
255
+ if (stats.isSymbolicLink()) {
256
+ throw new Error("Humanish storage directories must not be symbolic links.");
257
+ }
258
+ if (!stats.isDirectory()) {
259
+ throw new Error("ENOTDIR: Humanish storage path must be a directory.");
260
+ }
261
+ }
262
+ return current;
263
+ }
264
+ function assertSafeStorageSegments(segments) {
265
+ if (!segments.every(isSafeStorageSegment)) {
266
+ throw new Error("Humanish storage paths must use non-empty path segments.");
267
+ }
268
+ }
269
+ function isSafeStorageSegment(segment) {
270
+ return segment.length > 0
271
+ && segment !== "."
272
+ && segment !== ".."
273
+ && !segment.includes("/")
274
+ && !segment.includes("\\")
275
+ && !segment.includes("\0");
276
+ }
277
+ function isNodeError(error) {
278
+ return error instanceof Error && "code" in error;
279
+ }
280
+ async function assertRegularFileOrMissing(filePath) {
281
+ try {
282
+ const stats = await lstat(filePath);
283
+ if (stats.isSymbolicLink() || !stats.isFile() || stats.nlink > 1) {
284
+ throw new Error("Humanish storage files must be single-link regular files, not symbolic links or hardlinks.");
285
+ }
286
+ }
287
+ catch (error) {
288
+ if (isNodeError(error) && error.code === "ENOENT") {
289
+ return;
290
+ }
291
+ throw error;
292
+ }
293
+ }
294
+ async function assertNoSymlinkDescendants(directory) {
295
+ const entries = await readdir(directory, { withFileTypes: true });
296
+ for (const entry of entries) {
297
+ const child = path.join(directory, entry.name);
298
+ const stats = await lstat(child);
299
+ if (stats.isSymbolicLink()) {
300
+ throw new Error("Humanish run directories must not contain symbolic links.");
301
+ }
302
+ if (stats.isDirectory()) {
303
+ await assertNoSymlinkDescendants(child);
304
+ }
305
+ else if (!stats.isFile() || stats.nlink > 1) {
306
+ throw new Error("Humanish run leaves must be single-link regular files, not hardlinks or special files.");
307
+ }
308
+ }
309
+ }
310
+ async function capturePreparedRunArtifactPaths(paths, runRoot) {
311
+ const physicalRunRoot = await realpath(runRoot);
312
+ const physicalRunsRoot = await realpath(path.dirname(runRoot));
313
+ const [runStats, runsStats] = await Promise.all([
314
+ lstat(physicalRunRoot, { bigint: true }),
315
+ lstat(physicalRunsRoot, { bigint: true })
316
+ ]);
317
+ if (!runStats.isDirectory() || runStats.isSymbolicLink() || !runsStats.isDirectory() || runsStats.isSymbolicLink()) {
318
+ throw new Error("Prepared Humanish run storage must use physical directories.");
319
+ }
320
+ return Object.freeze({
321
+ ...paths,
322
+ physicalLatestPointer: path.join(physicalRunsRoot, "latest.json"),
323
+ physicalRunRoot,
324
+ physicalRunsRoot,
325
+ runRootIdentity: Object.freeze({ birthtimeNs: runStats.birthtimeNs, dev: runStats.dev, ino: runStats.ino }),
326
+ runsRootIdentity: Object.freeze({ birthtimeNs: runsStats.birthtimeNs, dev: runsStats.dev, ino: runsStats.ino })
327
+ });
328
+ }
329
+ async function assertDirectoryIdentity(directory, identity) {
330
+ const stats = await lstat(directory, { bigint: true });
331
+ if (stats.isSymbolicLink()
332
+ || !stats.isDirectory()
333
+ || stats.birthtimeNs !== identity.birthtimeNs
334
+ || stats.dev !== identity.dev
335
+ || stats.ino !== identity.ino
336
+ || await realpath(directory) !== directory) {
337
+ throw new Error("Prepared Humanish run storage identity changed.");
338
+ }
339
+ }
340
+ //# sourceMappingURL=run-paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-paths.js","sourceRoot":"","sources":["../src/run-paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,wBAA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iDAAiD,CAAC,CAAC;IACrE,CAAC;AACH,CAAC"}
package/dist/run.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { type CodexAppServerTrace } from "./codex-app-server.js";
2
2
  import { type ActorTrace } from "./actor-contract.js";
3
3
  import { type CapturedGitState } from "./core/git-state.js";
4
- import { type E2BDesktopModule } from "./e2b-desktop-launch.js";
4
+ import type { E2BDesktopModule } from "./e2b-desktop-launch.js";
5
+ import { type PreparedRunArtifactPaths } from "./run-paths.js";
5
6
  export declare const RUN_BUNDLE_SCHEMA = "humanish.run-bundle.v1";
6
7
  export declare const SHARED_WORLD_SCHEMA = "humanish.shared-world.v1";
7
8
  export declare const REVIEW_SCHEMA = "humanish.review.v1";
@@ -593,9 +594,9 @@ export interface RunBundle {
593
594
  */
594
595
  adapterArtifacts?: RunAdapterArtifact[];
595
596
  /**
596
- * Provider resources this run owns and may clean up later by exact recorded id.
597
- * Optional + additive: absent means the producer did not record any run-owned
598
- * remote resources. Core cleanup never enumerates provider accounts.
597
+ * Evidence about mutable provider resources observed during this run. Stored ids
598
+ * are not cleanup authority: automatic provider mutation requires a verified
599
+ * resource lease. Optional + additive; core never enumerates provider accounts.
599
600
  */
600
601
  providerResources?: RunProviderResource[];
601
602
  }
@@ -717,6 +718,7 @@ export interface CleanupResult {
717
718
  };
718
719
  }
719
720
  export interface RunCleanupHooks {
721
+ /** @deprecated Ignored. Stored provider ids are not authority to load or mutate a provider. */
720
722
  loadDesktopModule?: () => Promise<E2BDesktopModule>;
721
723
  cleanupAdapterResources?: (ctx: {
722
724
  cwd: string;
@@ -775,6 +777,14 @@ export declare function loadRunBundle(cwdInput: string, runInput: string): Promi
775
777
  bundlePath: string;
776
778
  runDir: string;
777
779
  } | null>;
780
+ /** Internal continuity seam for callers that already bound one run identity. */
781
+ export declare function loadRunBundlePrepared(cwdInput: string, runPaths: PreparedRunArtifactPaths): Promise<{
782
+ bundle: RunBundle;
783
+ bundlePath: string;
784
+ runDir: string;
785
+ } | null>;
786
+ /** Internal continuity seam for callers that already bound one run identity. */
787
+ export declare function verifyRunPrepared(cwdInput: string, runInput: string, runPaths: PreparedRunArtifactPaths): Promise<VerifyResult>;
778
788
  export declare function listRuns(cwdInput: string): Promise<RunsResult>;
779
789
  export declare function readReview(cwdInput: string, runInput: string): Promise<VerifyResult | (ReviewSummary & {
780
790
  path: string;