@foldrun/core 24.2.2 → 24.3.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.
Files changed (64) hide show
  1. package/dist/src/account.js +2 -2
  2. package/dist/src/agent-import.js +2 -2
  3. package/dist/src/budget.js +1 -1
  4. package/dist/src/copy-back.js +2 -2
  5. package/dist/src/data-import.js +9 -9
  6. package/dist/src/deploy.js +2 -2
  7. package/dist/src/engine-loop.d.ts +45 -0
  8. package/dist/src/engine-loop.js +480 -0
  9. package/dist/src/engine-tools.d.ts +41 -0
  10. package/dist/src/engine-tools.js +579 -0
  11. package/dist/src/evals.js +1 -1
  12. package/dist/src/failure.js +1 -1
  13. package/dist/src/flow-lint.js +8 -8
  14. package/dist/src/frontmatter-fields.js +8 -8
  15. package/dist/src/mail.js +1 -1
  16. package/dist/src/manifest.js +1 -1
  17. package/dist/src/notify.js +2 -2
  18. package/dist/src/oauth-capabilities.js +1 -1
  19. package/dist/src/openapi.js +3 -3
  20. package/dist/src/package.js +2 -2
  21. package/dist/src/providers.js +2 -2
  22. package/dist/src/publish.js +2 -2
  23. package/dist/src/run-container.js +3 -3
  24. package/dist/src/scan.js +7 -7
  25. package/dist/src/secrets.js +7 -7
  26. package/dist/src/starter.js +18 -18
  27. package/dist/src/step-exec.d.ts +12 -1
  28. package/dist/src/step-exec.js +6 -2
  29. package/dist/src/storage.js +6 -6
  30. package/dist/src/store.js +16 -16
  31. package/dist/src/tool-test.js +1 -1
  32. package/dist/src/webhook.js +1 -1
  33. package/dist/src/workspace-revisions.js +2 -2
  34. package/package.json +1 -1
  35. package/src/account.ts +2 -2
  36. package/src/agent-import.ts +2 -2
  37. package/src/budget.ts +1 -1
  38. package/src/copy-back.ts +2 -2
  39. package/src/data-import.ts +9 -9
  40. package/src/deploy.ts +2 -2
  41. package/src/engine-loop.ts +495 -0
  42. package/src/engine-tools.ts +566 -0
  43. package/src/evals.ts +1 -1
  44. package/src/failure.ts +1 -1
  45. package/src/flow-lint.ts +8 -8
  46. package/src/frontmatter-fields.ts +8 -8
  47. package/src/mail.ts +1 -1
  48. package/src/manifest.ts +1 -1
  49. package/src/notify.ts +2 -2
  50. package/src/oauth-capabilities.ts +1 -1
  51. package/src/openapi.ts +3 -3
  52. package/src/package.ts +2 -2
  53. package/src/providers.ts +2 -2
  54. package/src/publish.ts +2 -2
  55. package/src/run-container.ts +3 -3
  56. package/src/scan.ts +7 -7
  57. package/src/secrets.ts +7 -7
  58. package/src/starter.ts +19 -19
  59. package/src/step-exec.ts +14 -2
  60. package/src/storage.ts +6 -6
  61. package/src/store.ts +16 -16
  62. package/src/tool-test.ts +1 -1
  63. package/src/webhook.ts +1 -1
  64. package/src/workspace-revisions.ts +2 -2
@@ -93,7 +93,7 @@ function bytesOf(files) {
93
93
  */
94
94
  export function requireWorkspace(tenant, workspace) {
95
95
  if (!fs.existsSync(workspaceDir(tenant, workspace))) {
96
- throw Object.assign(new Error(`workspace ${workspace} not found`), { status: 404 });
96
+ throw Object.assign(new Error(`project ${workspace} not found`), { status: 404 });
97
97
  }
98
98
  }
99
99
  // ---------- paths ----------
@@ -976,7 +976,7 @@ async function putFileQuietly(tenant, workspace, rel, body, by) {
976
976
  assertNoNameClash(seen.files, norm);
977
977
  const before = seen.files.find((f) => f.path === norm);
978
978
  if (before?.sha !== sha && usedBytes(tenant, workspace) - (before?.size ?? 0) + body.length > quotaBytes()) {
979
- throw new Error(`workspace file quota exceeded (${quotaBytes() / 1e6}MB)`);
979
+ throw new Error(`project file quota exceeded (${quotaBytes() / 1e6}MB)`);
980
980
  }
981
981
  }
982
982
  // The upload happens outside the lock: it can be long, and a blob is
@@ -995,7 +995,7 @@ async function putFileQuietly(tenant, workspace, rel, body, by) {
995
995
  // Nothing names the blob we just put unless another record already does.
996
996
  if (!index.files.some((f) => f.sha === sha))
997
997
  await driver.remove(key).catch(() => { });
998
- throw new Error(`workspace file quota exceeded (${quotaBytes() / 1e6}MB)`);
998
+ throw new Error(`project file quota exceeded (${quotaBytes() / 1e6}MB)`);
999
999
  }
1000
1000
  // A delete or replace that ran between our upload and now may have
1001
1001
  // collected this very blob (it was unreferenced then). We hold the bytes,
@@ -1064,7 +1064,7 @@ export async function registerUpload(tenant, workspace, rel, sha, _claimed, by)
1064
1064
  await refuse(`${norm} is ${Math.round(size / 1e6)}MB — the limit is ${maxBytes() / 1e6}MB`);
1065
1065
  }
1066
1066
  if (bytesOf(files) > quotaBytes() && bytesOf(files) > bytesOf(index.files)) {
1067
- await refuse(`workspace file quota exceeded (${quotaBytes() / 1e6}MB)`);
1067
+ await refuse(`project file quota exceeded (${quotaBytes() / 1e6}MB)`);
1068
1068
  }
1069
1069
  indexPut(tenant, workspace, index, record);
1070
1070
  if (previous && previous.sha !== sha)
@@ -1182,7 +1182,7 @@ export async function uploadUrl(tenant, workspace, rel, sha, size) {
1182
1182
  const files = readIndex(tenant, workspace).files;
1183
1183
  const next = [...files.filter((f) => f.path !== norm), { sha, size }];
1184
1184
  if (bytesOf(next) > quotaBytes() && bytesOf(next) > bytesOf(files)) {
1185
- throw new Error(`workspace file quota exceeded (${quotaBytes() / 1e6}MB)`);
1185
+ throw new Error(`project file quota exceeded (${quotaBytes() / 1e6}MB)`);
1186
1186
  }
1187
1187
  }
1188
1188
  return driverFor(tenant, workspace).presignPut(blobKey(tenant, workspace, sha), mimeFor(norm), undefined, size);
@@ -1266,7 +1266,7 @@ async function moveUnlocked(tenant, from, to) {
1266
1266
  const driver = driverFor(tenant, from);
1267
1267
  const shas = driver.kind === "fs" ? [] : [...new Set(readIndex(tenant, from).files.map((f) => f.sha))];
1268
1268
  if (shas.length && !driver.copy)
1269
- throw new Error(`the ${driver.kind} store cannot move files to a new workspace name`);
1269
+ throw new Error(`the ${driver.kind} store cannot move files to a new project name`);
1270
1270
  for (const sha of shas)
1271
1271
  await driver.copy(blobKey(tenant, from, sha), blobKey(tenant, to, sha));
1272
1272
  if (fs.existsSync(src)) {
package/dist/src/store.js CHANGED
@@ -280,7 +280,7 @@ export function checkFormatVersion(declared) {
280
280
  return {
281
281
  declared: value,
282
282
  supported: FORMAT_VERSION,
283
- warning: `this workspace targets foldrun format ${value}, and this build understands ` +
283
+ warning: `this project targets foldrun format ${value}, and this build understands ` +
284
284
  `${FORMAT_VERSION}. A different major version may mean different behaviour — ` +
285
285
  `read it as best-effort rather than correct.`,
286
286
  };
@@ -289,7 +289,7 @@ export function checkFormatVersion(declared) {
289
289
  return {
290
290
  declared: value,
291
291
  supported: FORMAT_VERSION,
292
- warning: `this workspace targets foldrun format ${value}; this build understands ` +
292
+ warning: `this project targets foldrun format ${value}; this build understands ` +
293
293
  `${FORMAT_VERSION}. Newer fields will be ignored rather than rejected.`,
294
294
  };
295
295
  }
@@ -381,7 +381,7 @@ meta = {}) {
381
381
  }
382
382
  assertCanonicalCase(norm);
383
383
  if (!IN_WORKSPACE_DIR.test(norm) && norm !== "project.md" && norm !== "AGENTS.md") {
384
- throw new Error(`unexpected file: ${f.path} — a workspace holds AGENTS.md plus ` +
384
+ throw new Error(`unexpected file: ${f.path} — a project holds AGENTS.md plus ` +
385
385
  `${WORKSPACE_DIRS.map((d) => `${d}/`).join(", ")}`);
386
386
  }
387
387
  }
@@ -1696,7 +1696,7 @@ export function parseFlow(file, raw) {
1696
1696
  else if (!/\s/.test(value) && (/\.(json|ya?ml)$/i.test(value) || value.includes("/")))
1697
1697
  step.schemaPath = value;
1698
1698
  else
1699
- problem("a JSON object, a path under the workspace (schemas/lead.json), or a YAML block on the lines below");
1699
+ problem("a JSON object, a path under the project (schemas/lead.json), or a YAML block on the lines below");
1700
1700
  }
1701
1701
  }
1702
1702
  }
@@ -2320,7 +2320,7 @@ export function accountFileSealed(rel) {
2320
2320
  return "generated bookkeeping, not an authored file.";
2321
2321
  }
2322
2322
  if (/^workspaces\/[^/]+\/secrets\.json$/.test(norm)) {
2323
- return "the workspace vault — encrypted, and never served to a browser.";
2323
+ return "the project vault — encrypted, and never served to a browser.";
2324
2324
  }
2325
2325
  return null;
2326
2326
  }
@@ -2483,7 +2483,7 @@ export function landsInside(dir, full, followLast = true) {
2483
2483
  }
2484
2484
  export function assertLandsInside(dir, full, rel, followLast = true) {
2485
2485
  if (!landsInside(dir, full, followLast))
2486
- throw new Error(`illegal path: ${rel} leads out of the workspace through a symlink`);
2486
+ throw new Error(`illegal path: ${rel} leads out of the project through a symlink`);
2487
2487
  }
2488
2488
  export function readWorkspaceFile(tenant, workspace, rel) {
2489
2489
  const dir = workspaceDir(tenant, workspace);
@@ -2500,7 +2500,7 @@ export function readWorkspaceFile(tenant, workspace, rel) {
2500
2500
  }
2501
2501
  catch (err) {
2502
2502
  if (err instanceof UnsafeFileError)
2503
- throw new Error(`illegal path: ${rel} leads out of the workspace through a symlink`);
2503
+ throw new Error(`illegal path: ${rel} leads out of the project through a symlink`);
2504
2504
  throw err;
2505
2505
  }
2506
2506
  }
@@ -2518,7 +2518,7 @@ export function writeWorkspaceFile(tenant, workspace, rel, content, meta = {}) {
2518
2518
  // /api/workspaces, deploy and import apply. Those create through
2519
2519
  // saveWorkspace / applyImport, not through here.
2520
2520
  if (!fs.existsSync(dir))
2521
- throw Object.assign(new Error(`workspace ${workspace} not found`), { status: 404 });
2521
+ throw Object.assign(new Error(`project ${workspace} not found`), { status: 404 });
2522
2522
  const p = path.join(dir, assertEditablePath(rel));
2523
2523
  // Before anything is created: mkdir below would otherwise make folders
2524
2524
  // through a linked directory too.
@@ -2603,7 +2603,7 @@ export function anchoredReason(rel) {
2603
2603
  const norm = rel.replaceAll("\\", "/");
2604
2604
  const base = norm.split("/").pop();
2605
2605
  if (norm === "AGENTS.md" || norm === "project.md") {
2606
- return `${base} is the workspace's own identity — it cannot move; rename or delete the workspace instead`;
2606
+ return `${base} is the project's own identity — it cannot move; rename or delete the project instead`;
2607
2607
  }
2608
2608
  if (base === "agent.md") {
2609
2609
  return "agent.md is the agent because of where it sits — to rename the agent, rename its folder";
@@ -2746,7 +2746,7 @@ export function deleteWorkspacePath(tenant, workspace, rel, meta = {}) {
2746
2746
  export function deleteWorkspace(tenant, workspace) {
2747
2747
  const dir = workspaceDir(tenant, workspace);
2748
2748
  if (!fs.existsSync(dir))
2749
- throw new Error(`workspace ${workspace} not found`);
2749
+ throw new Error(`project ${workspace} not found`);
2750
2750
  // Its records in the database (runs, trigger log, file index) go BEFORE the
2751
2751
  // folder: if that throws, nothing was removed and the delete can be retried;
2752
2752
  // after the folder is gone a retry would answer "not found" with rows left.
@@ -2778,7 +2778,7 @@ export async function deleteWorkspaceAsync(tenant, workspace) {
2778
2778
  if (!lc)
2779
2779
  return deleteWorkspace(tenant, workspace);
2780
2780
  if (!fs.existsSync(workspaceDir(tenant, workspace)))
2781
- throw new Error(`workspace ${workspace} not found`);
2781
+ throw new Error(`project ${workspace} not found`);
2782
2782
  await lc.drop(tenant, workspace, () => deleteWorkspace(tenant, workspace));
2783
2783
  }
2784
2784
  /**
@@ -2810,14 +2810,14 @@ export function renameWorkspace(tenant, from, to) {
2810
2810
  return;
2811
2811
  const src = workspaceDir(tenant, from);
2812
2812
  if (!fs.existsSync(src))
2813
- throw new Error(`workspace ${from} not found`);
2813
+ throw new Error(`project ${from} not found`);
2814
2814
  // Deliberately not workspaceDir(): that returns the *legacy* path when one
2815
2815
  // exists, and renaming into `projects/` would resurrect the old layout.
2816
2816
  const dest = singleWorkspace()
2817
2817
  ? (() => { throw new Error("cannot rename in single-workspace mode"); })()
2818
2818
  : path.join(dataRoot(), tenant, WORKSPACES, to);
2819
2819
  if (fs.existsSync(dest))
2820
- throw new Error(`workspace ${to} already exists`);
2820
+ throw new Error(`project ${to} already exists`);
2821
2821
  fs.mkdirSync(path.dirname(dest), { recursive: true });
2822
2822
  fs.renameSync(src, dest);
2823
2823
  // Its runs and trigger log in the database follow the name; if they cannot,
@@ -2850,13 +2850,13 @@ export async function renameWorkspaceAsync(tenant, from, to) {
2850
2850
  return renameWorkspace(tenant, from, to);
2851
2851
  assertSafeName(to, "workspace");
2852
2852
  if (!fs.existsSync(workspaceDir(tenant, from)))
2853
- throw new Error(`workspace ${from} not found`);
2853
+ throw new Error(`project ${from} not found`);
2854
2854
  // The checks renameWorkspace makes, BEFORE the history moves: a name that is
2855
2855
  // taken must never have its history replaced by this one's.
2856
2856
  if (singleWorkspace())
2857
2857
  return renameWorkspace(tenant, from, to); // throws
2858
2858
  if (fs.existsSync(workspaceDir(tenant, to)) || fs.existsSync(path.join(dataRoot(), tenant, WORKSPACES, to)))
2859
- throw new Error(`workspace ${to} already exists`);
2859
+ throw new Error(`project ${to} already exists`);
2860
2860
  await lc.move(tenant, from, to, () => renameWorkspace(tenant, from, to));
2861
2861
  }
2862
2862
  /** Set a workspace's description, in AGENTS.md, without touching anything else.
@@ -2871,7 +2871,7 @@ export async function renameWorkspaceAsync(tenant, from, to) {
2871
2871
  export function setWorkspaceDescription(tenant, workspace, description, meta = {}) {
2872
2872
  const file = path.join(workspaceDir(tenant, workspace), "AGENTS.md");
2873
2873
  if (!fs.existsSync(file))
2874
- throw new Error("this workspace has no AGENTS.md");
2874
+ throw new Error("this project has no AGENTS.md");
2875
2875
  const raw = fs.readFileSync(file, "utf8");
2876
2876
  if (!/^---\r?\n[\s\S]*?\r?\n---/.test(raw))
2877
2877
  throw new Error("AGENTS.md has no frontmatter");
@@ -345,7 +345,7 @@ export async function testTool(tenant, workspace, def, input = {}) {
345
345
  : code === 0 ? "exited 0" : `exited ${code ?? "with an error"}`,
346
346
  detail: clip((caller
347
347
  ? `ran from agents/${caller.name}/, where a run runs\n\n`
348
- : `ran from the workspace root — there is no agent to stand in for, so a script that reaches workspace/ or ../../ will not find the workspace there\n\n`) +
348
+ : `ran from the project root — there is no agent to stand in for, so a script that reaches workspace/ or ../../ will not find the project there\n\n`) +
349
349
  (out || "(no output)")),
350
350
  });
351
351
  }
@@ -56,7 +56,7 @@ export function rotateWebhook(tenant, workspace, flow) {
56
56
  // here turned a rotate under a mistyped name into a workspace holding only
57
57
  // hooks.json, past the plan's workspace count.
58
58
  if (!fs.existsSync(path.dirname(file)))
59
- throw Object.assign(new Error(`workspace ${workspace} not found`), { status: 404 });
59
+ throw Object.assign(new Error(`project ${workspace} not found`), { status: 404 });
60
60
  const rotatedAt = new Date().toISOString();
61
61
  const store = docStore(tenant, workspace);
62
62
  if (store) {
@@ -404,7 +404,7 @@ function permanent(err) {
404
404
  if (err instanceof OpIdReused)
405
405
  return true; // commitEntry asked again and it still is: see there
406
406
  const m = err instanceof Error ? err.message : "";
407
- return /^illegal manifest path|differ only by case|a manifest holds at most|is not workspace content/.test(m);
407
+ return /^illegal manifest path|differ only by case|a manifest holds at most|is not project content/.test(m);
408
408
  }
409
409
  /** Wait until every queued change (of one workspace, or all) is committed.
410
410
  * A barrier for an edge that wants "committed" before it answers. Returns
@@ -1431,7 +1431,7 @@ async function reconcileNow(tenant, workspace, by = "reconcile") {
1431
1431
  ws,
1432
1432
  opId,
1433
1433
  by,
1434
- message: "workspace content recorded",
1434
+ message: "project content recorded",
1435
1435
  changes,
1436
1436
  // Read when asked, one file at a time; publish checks the bytes against
1437
1437
  // the sha, so a file that changed since the scan fails this repair (the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldrun/core",
3
- "version": "24.2.2",
3
+ "version": "24.3.0",
4
4
  "description": "Agents are just folders. The format, the runner, the checks.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",
package/src/account.ts CHANGED
@@ -100,7 +100,7 @@ export function readAccountTree(accountRoot: string, only?: string): AccountTree
100
100
  }
101
101
  const names = listWorkspaceDirs(root).filter((n) => (only ? n === only : true));
102
102
  if (only && names.length === 0) {
103
- throw new Error(`no workspace "${only}" in ${root} — have: ${listWorkspaceDirs(root).join(", ") || "none"}`);
103
+ throw new Error(`no project "${only}" in ${root} — have: ${listWorkspaceDirs(root).join(", ") || "none"}`);
104
104
  }
105
105
  const wsRoot = path.join(root, "workspaces");
106
106
  const legacy = path.join(root, "projects");
@@ -130,7 +130,7 @@ export function accountTreeFrom(from: string, only?: string): { layout: Layout;
130
130
  if (layout.kind === "flat" || layout.kind === "empty") {
131
131
  const dir = layout.workspaceDir!;
132
132
  const name = path.basename(dir);
133
- if (only && only !== name) throw new Error(`${dir} is a single workspace called "${name}", not "${only}"`);
133
+ if (only && only !== name) throw new Error(`${dir} is a single project called "${name}", not "${only}"`);
134
134
  return {
135
135
  layout,
136
136
  tree: {
@@ -76,8 +76,8 @@ export function importAgent(
76
76
  const name = opts.as?.trim() || agent;
77
77
  assertSafeName(name, "agent");
78
78
  const known = new Set(listWorkspaces(tenant).map((w) => w.name));
79
- if (!known.has(from)) throw new AgentImportError(`no workspace called "${from}" in this account`, 404);
80
- if (!known.has(to)) throw new AgentImportError(`no workspace called "${to}" in this account`, 404);
79
+ if (!known.has(from)) throw new AgentImportError(`no project called "${from}" in this account`, 404);
80
+ if (!known.has(to)) throw new AgentImportError(`no project called "${to}" in this account`, 404);
81
81
  if (from === to && name === agent) {
82
82
  throw new AgentImportError(`${agent} is already in ${to} — give the copy another name with "as"`, 409);
83
83
  }
package/src/budget.ts CHANGED
@@ -88,7 +88,7 @@ export function budgetProblem(raw: unknown, allowed: BudgetPeriod[]): string | n
88
88
  if (!allowed.includes(period)) {
89
89
  return period === "run"
90
90
  ? `budget: is per run here already — write the number alone`
91
- : `budget: "${period}" does not apply here — this cap is per run; a cap over time belongs in the workspace's or the account's AGENTS.md`;
91
+ : `budget: "${period}" does not apply here — this cap is per run; a cap over time belongs in the project's or the account's AGENTS.md`;
92
92
  }
93
93
  }
94
94
  return null;
package/src/copy-back.ts CHANGED
@@ -81,7 +81,7 @@ export function refusedLine(refused: readonly RefusedPath[]): string {
81
81
  const shown = refused.slice(0, 20).map((r) => `${r.path} (${r.kind})`).join(", ");
82
82
  const more = refused.length > 20 ? ` and ${refused.length - 20} more` : "";
83
83
  return (
84
- `refused path: ${shown}${more} — a step cannot change the workspace's configuration or code; ` +
85
- `the workspace keeps its own copy. Propose the change instead (Proposed fixes), and a person applies it.`
84
+ `refused path: ${shown}${more} — a step cannot change the project's configuration or code; ` +
85
+ `the project keeps its own copy. Propose the change instead (Proposed fixes), and a person applies it.`
86
86
  );
87
87
  }
@@ -211,9 +211,9 @@ const PLATFORM_MARKERS: Record<string, string> = {
211
211
  "trigger-log.jsonl.tmp": "trigger log temp file (not read here)",
212
212
  "hooks.json": "webhook tokens (platform file; not mapped)",
213
213
  "hook-deliveries.jsonl": "hook delivery log (not mapped)",
214
- ".repo.json": "platform file; not workspace content",
214
+ ".repo.json": "platform file; not project content",
215
215
  once: "operation markers (the unique keys decide now; not imported)",
216
- ".foldrun": "platform folder; not workspace content",
216
+ ".foldrun": "platform folder; not project content",
217
217
  storage: "workspace-local storage folder (the storage index moved in FOL-152; not read here)",
218
218
  };
219
219
 
@@ -253,7 +253,7 @@ async function scanWorkspace(tenant: string, workspace: string, dir: string): Pr
253
253
  try {
254
254
  top = fs.readdirSync(dir, { withFileTypes: true });
255
255
  } catch (err) {
256
- ws.error = `workspace folder unreadable (${(err as NodeJS.ErrnoException).code ?? "error"})`;
256
+ ws.error = `project folder unreadable (${(err as NodeJS.ErrnoException).code ?? "error"})`;
257
257
  return ws;
258
258
  }
259
259
  for (const e of top.sort(byName)) {
@@ -289,7 +289,7 @@ async function scanWorkspace(tenant: string, workspace: string, dir: string): Pr
289
289
  ws.unmapped.push({ path: name, reason: PLATFORM_MARKERS[name], ...t });
290
290
  } else {
291
291
  const t = st.isDirectory() ? tally(abs) : { files: 1, bytes: st.size };
292
- ws.unmapped.push({ path: name, reason: "not part of a workspace manifest (in neither the authored nor the state list)", ...t });
292
+ ws.unmapped.push({ path: name, reason: "not part of a project manifest (in neither the authored nor the state list)", ...t });
293
293
  }
294
294
  }
295
295
 
@@ -297,7 +297,7 @@ async function scanWorkspace(tenant: string, workspace: string, dir: string): Pr
297
297
  const mapped: { rel: string; abs: string; st: fs.Stats }[] = [];
298
298
  for (const f of found) {
299
299
  if (isPlatformPath(f.rel)) {
300
- ws.unmapped.push({ path: f.rel, reason: "platform or engine file, not workspace content", files: 1, bytes: f.st.size });
300
+ ws.unmapped.push({ path: f.rel, reason: "platform or engine file, not project content", files: 1, bytes: f.st.size });
301
301
  continue;
302
302
  }
303
303
  try {
@@ -571,7 +571,7 @@ export async function planImport(scan: SourceScan, deps?: Deps): Promise<PlanWor
571
571
  const sides = new Set(Object.keys(want).filter((k) => !(all[k]?.sha === want[k].sha && all[k]?.mode === want[k].mode)).map((k) => w.files.find((f) => f.path === k)!.side));
572
572
  p.revisionsToMake = sides.size;
573
573
  const foreign = await foreignRevisions(deps, wsRef(w));
574
- if (foreign.length) p.note = `${foreign.length} revision(s) by someone else (latest by ${foreign[0].by}): an import skips this workspace unless --force`;
574
+ if (foreign.length) p.note = `${foreign.length} revision(s) by someone else (latest by ${foreign[0].by}): an import skips this project unless --force`;
575
575
  } catch (err) {
576
576
  p.note = `could not read the destination: ${(err as Error).message}`;
577
577
  }
@@ -589,7 +589,7 @@ export function renderPlan(scan: SourceScan, plan: PlanWorkspace[]): string {
589
589
  let files = 0;
590
590
  let bytes = 0;
591
591
  for (const t of scan.tenants) {
592
- L.push(`account ${t.tenant} (${t.workspaces.length} workspace(s))`);
592
+ L.push(`account ${t.tenant} (${t.workspaces.length} project(s))`);
593
593
  for (const u of t.unmapped) L.push(` can't map ${u.path}: ${u.reason} (${u.files ?? 0} files, ${kb(u.bytes ?? 0)})`);
594
594
  for (const w of t.workspaces) {
595
595
  const p = plan.find((x) => x.tenant === w.tenant && x.workspace === w.workspace)!;
@@ -602,7 +602,7 @@ export function renderPlan(scan: SourceScan, plan: PlanWorkspace[]): string {
602
602
  for (const u of w.unmapped) L.push(` can't map ${u.path}: ${u.reason}${u.files ? ` (${u.files} files, ${kb(u.bytes ?? 0)})` : ""}`);
603
603
  }
604
604
  }
605
- L.push("", `Total: ${files} workspace files, ${kb(bytes)}.`);
605
+ L.push("", `Total: ${files} project files, ${kb(bytes)}.`);
606
606
  return L.join("\n") + "\n";
607
607
  }
608
608
 
@@ -729,7 +729,7 @@ export function renderVerify(r: VerifyReport): string {
729
729
  list("extra in head", w.extra);
730
730
  for (const n of w.notes) L.push(` note: ${n}`);
731
731
  }
732
- L.push("", `${r.workspaces.filter((w) => w.pass).length} of ${r.workspaces.length} workspace(s) passed.`);
732
+ L.push("", `${r.workspaces.filter((w) => w.pass).length} of ${r.workspaces.length} project(s) passed.`);
733
733
  return L.join("\n") + "\n";
734
734
  }
735
735
 
package/src/deploy.ts CHANGED
@@ -181,7 +181,7 @@ export function readTree(dir: string, opts: ReadTreeOptions = {}): DeployFile[]
181
181
  }
182
182
  sourceBytes += bytes;
183
183
  if (opts.maxSourceBytes !== undefined && sourceBytes > opts.maxSourceBytes) {
184
- throw new TreeTooLarge(`the workspace's files other than state/ and memory/ are over ${Math.round(opts.maxSourceBytes / 1048576)} MiB — not read`);
184
+ throw new TreeTooLarge(`the project's files other than state/ and memory/ are over ${Math.round(opts.maxSourceBytes / 1048576)} MiB — not read`);
185
185
  }
186
186
  return true;
187
187
  };
@@ -440,7 +440,7 @@ function structuralWarnings(files: DeployFile[], extraOutward: Iterable<string>
440
440
  const agentNames: string[] = [];
441
441
  const out: (DeployIssue & { kind?: string })[] = [];
442
442
  if (!files.some((f) => /^agents\/[^/]+\/agent\.md$/.test(f.path)) && !files.some((f) => /^\.(claude|agents)\/agents\/[^/]+\.md$/.test(f.path))) {
443
- out.push({ where: "agents/", message: "no agents yet — add one (agents/<name>/agent.md), or import one from another workspace" });
443
+ out.push({ where: "agents/", message: "no agents yet — add one (agents/<name>/agent.md), or import one from another project" });
444
444
  }
445
445
  // The web: warnings check prints — the old session: key, and a pinned
446
446
  // user agent behind the runner image's Chrome, which the platform knows