@zenera/engine 1.1.58 → 1.1.59

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 (2) hide show
  1. package/dist/engine.js +13 -9
  2. package/package.json +2 -2
package/dist/engine.js CHANGED
@@ -97,12 +97,15 @@ export async function openEngine(opts) {
97
97
  provider: opts.newSandbox ? 'the host' : chosen?.provider.describe,
98
98
  ...(opts.disposable ? { persist: false } : {}),
99
99
  });
100
- const workspaceOptions = setup.sandbox.files({
101
- root: workspace,
102
- readOnly: opts.readOnly,
100
+ // The sandbox's own files, by the names its commands use: what
101
+ // `run_command` prints a path as, `read_file` accepts.
102
+ const workspaceOptions = {
103
+ fs: setup.sandbox.fs,
104
+ root: setup.workdir,
103
105
  mount: setup.workdir,
104
- mounts,
105
- });
106
+ mounts: mounts.map(({ at, readOnly, source }) => ({ at, readOnly, source })),
107
+ readOnly: opts.readOnly,
108
+ };
106
109
  // The same view the file tools have, so a path the agent just wrote
107
110
  // resolves the same way when it asks memory to keep a copy.
108
111
  files = new Workspace(workspaceOptions);
@@ -362,10 +365,11 @@ async function record(engine, input, result, startedAt, durationMs) {
362
365
  title: `${engine.name} · ${run.id}`,
363
366
  architecture: await engine.runner.describe(),
364
367
  memory: engine.runner.services.memory?.store,
365
- mounts: [
366
- { at: engine.workspaceMount, href: pathToFileURL(engine.files.root).href },
367
- ...engine.files.mounts.map((m) => ({ at: m.at, href: pathToFileURL(m.host).href })),
368
- ],
368
+ // Links to the trees on this machine — the ones the tools reach.
369
+ mounts: mounts(engine)
370
+ .filter((m) => m.at === engine.workspaceMount ||
371
+ engine.files.mounts.some((f) => f.at === m.at))
372
+ .map((m) => ({ at: m.at, href: pathToFileURL(m.host).href })),
369
373
  });
370
374
  await writeFile(run.report, renderReportHtml(built), 'utf8');
371
375
  report = run.report;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenera/engine",
3
- "version": "1.1.58",
3
+ "version": "1.1.59",
4
4
  "description": "Runs a @zenera/neo project on this machine: keyring, sandbox, sessions and the record each turn leaves behind.",
5
5
  "keywords": [
6
6
  "agents",
@@ -46,6 +46,6 @@
46
46
  "prepack": "tsc -b"
47
47
  },
48
48
  "dependencies": {
49
- "@zenera/neo": "^1.1.58"
49
+ "@zenera/neo": "^1.1.59"
50
50
  }
51
51
  }