@lambdacurry/arbor 0.24.19 → 0.24.22

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/arbor.js +29 -22
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -7900,8 +7900,7 @@ var computerRuns = sqliteTable("computer_runs", {
7900
7900
  threadIdx: index("computer_runs_thread_idx").on(t.threadId, t.startedAt),
7901
7901
  sessionIdx: index("computer_runs_session_idx").on(t.computerSessionId, t.startedAt),
7902
7902
  statusIdx: index("computer_runs_status_idx").on(t.computerId, t.status),
7903
- runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState),
7904
- retentionDueIdx: index("computer_runs_retention_due_idx").on(t.retentionPolicy, t.status, t.retentionDeadlineAt)
7903
+ runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState)
7905
7904
  }));
7906
7905
  var packageCacheObjects = sqliteTable("package_cache_objects", {
7907
7906
  key: text("key").primaryKey(),
@@ -9323,6 +9322,7 @@ var COMPUTER_WORKSPACE_RECOVERY_ATTACH_DEADLINE_MS = 31 * 60 * 1000;
9323
9322
  var COMPUTER_WORKSPACE_RECOVERY_HEALTH_DEADLINE_MS = 2 * 60 * 1000;
9324
9323
  var COMPUTER_WORKSPACE_RECOVERY_HEADROOM_MS = 2 * 60 * 1000;
9325
9324
  var COMPUTER_WORKSPACE_RECOVERY_LEASE_MS = COMPUTER_WORKSPACE_RECOVERY_CHECKPOINT_DEADLINE_MS + COMPUTER_WORKSPACE_RECOVERY_ATTACH_DEADLINE_MS + COMPUTER_WORKSPACE_RECOVERY_HEALTH_DEADLINE_MS + COMPUTER_WORKSPACE_RECOVERY_HEADROOM_MS;
9325
+
9326
9326
  // ../core/src/ops/artifact-git-intent.ts
9327
9327
  var RETRYABLE_REPAIR = new Set([
9328
9328
  "pending_push_unconfirmed",
@@ -9753,8 +9753,8 @@ function buildOutputSchemas() {
9753
9753
  git: computerRunGitState.nullable()
9754
9754
  }));
9755
9755
  const computerRunGitStart = looseObject({
9756
- repositories: computerRunGitStartRepositories.describe("the inherited base's repositories before any requested revision was checked out"),
9757
- materialized: looseObject({ repositories: computerRunGitStartRepositories }).optional().describe("the workspace as admitted, at each requested revision; read this, when present, for what the Run started on")
9756
+ repositories: computerRunGitStartRepositories.describe("named recipe repositories at start; git facts are null unless a historical Run inspected them"),
9757
+ materialized: looseObject({ repositories: computerRunGitStartRepositories }).optional().describe("historical isolated checkout after admission-managed Git; omitted on new Runs (ARB-584)")
9758
9758
  });
9759
9759
  const computerRunSource = object({ runId: id, snapshotId: id.nullable() }).optional().describe("this Run began at source.runId's durable checkpoint snapshotId");
9760
9760
  const computerRun = looseObject({
@@ -12503,6 +12503,15 @@ function verbatimList(description) {
12503
12503
  function isVerbatimList(schema) {
12504
12504
  return VERBATIM_LISTS.has(schema);
12505
12505
  }
12506
+ var FILE_BODIES = registry();
12507
+ function fileBody(description, base = string2()) {
12508
+ const schema = base.describe(description);
12509
+ FILE_BODIES.add(schema, { fileBody: true });
12510
+ return schema;
12511
+ }
12512
+ function isFileBody(schema) {
12513
+ return FILE_BODIES.has(schema);
12514
+ }
12506
12515
  var ATTACHMENT_DESCRIPTION_HINT = "durable summary and default alt text; defaults to the filename when omitted; permanent once bound; 1-500 chars; give each file its own";
12507
12516
  function forward(operation) {
12508
12517
  const run = (ex, input) => ex.call(operation, input);
@@ -13275,10 +13284,7 @@ var ACTION_DEFINITIONS = [
13275
13284
  mode: _enum(["read", "write"]).describe("write for mutable work; read for shared inspection"),
13276
13285
  execution: _enum(["shared", "isolated"]).optional().describe("write Run placement; defaults to isolated. Use shared only for intentional live collaboration on the Thread Computer"),
13277
13286
  label: string2().trim().max(120).optional().describe("required for a new Run: short actual intention, e.g. Fix CI; exact accepted legacy retries reuse their original text or omission"),
13278
- requestedRevisions: array(object({
13279
- repository: string2().describe("configured GitHub repository as canonical owner/name"),
13280
- head: string2().regex(/^[0-9a-fA-F]{40}(?:[0-9a-fA-F]{24})?$/).describe("exact 40- or 64-hex Git object id required before caller work")
13281
- })).max(32).optional().describe("optional exact repository revisions the isolated workspace must prove before caller work"),
13287
+ requestedRevisions: array(unknown()).max(32).optional().describe("retired: omit or pass []. A non-empty value is rejected with 400; agents own Git inside isolated Computers"),
13282
13288
  sourceRunId: string2().optional().describe("fork: a new isolated write Run restored from YOUR same-Thread Run's last durable checkpoint (its last suspend or admission; edits since are not included), run_…; active, suspended, or ended within 14 days or Keep; requires threadId; the source Run is never changed"),
13283
13289
  sourceSnapshotId: string2().optional().describe("with sourceRunId: the exact checkpoint you expect (the source receipt's runtime.currentSnapshotId), cps_…; refused if it moved"),
13284
13290
  idempotencyKey: string2().min(1).max(200).describe("stable key for this ONE logical Run-start request; reuse it unchanged for retries")
@@ -13680,7 +13686,7 @@ var ACTION_DEFINITIONS = [
13680
13686
  computerSessionId: string2().optional().describe("legacy alternative to runId: a computerSessionId on that Computer, cms_…; required unless runId is supplied"),
13681
13687
  path: string2().describe("absolute path under /workspace, or a path inside the run"),
13682
13688
  runId: string2().optional().describe("route this write according to this Run execution placement, run_… (from computer_run_start)"),
13683
- content: string2().describe("complete UTF-8 content, or base64 bytes when encoding=base64"),
13689
+ content: fileBody("complete UTF-8 content, or base64 bytes when encoding=base64"),
13684
13690
  encoding: _enum(["utf8", "base64"]).optional().describe("content encoding; defaults to utf8, use base64 for binary files")
13685
13691
  },
13686
13692
  surfaces: ["computer-mcp", "computer-cli"],
@@ -13858,7 +13864,7 @@ var ACTION_DEFINITIONS = [
13858
13864
  type: _enum(ARTIFACT_TYPES).describe(ARTIFACT_TYPE_DESCRIPTION),
13859
13865
  kind: _enum(["doc", "table", "diagram", "html", "file"]).optional().describe("structural kind (default file). doc/table/diagram/html are editable, versioned text"),
13860
13866
  title: string2().min(1),
13861
- source: string2().optional().describe("text kinds: the initial content (v1)"),
13867
+ source: fileBody("text kinds: the initial content (v1)").optional(),
13862
13868
  contentRef: string2().optional().describe("kind=file: where the content lives, e.g. inline://… or a URL"),
13863
13869
  editPolicy: _enum(["owner", "members", "anyone"]).optional().describe("who may edit (default members)"),
13864
13870
  summary: string2().min(1).max(500).describe("required one-line description of what this durable Artifact is or accomplishes"),
@@ -13896,7 +13902,7 @@ var ACTION_DEFINITIONS = [
13896
13902
  inputSchema: {
13897
13903
  artifactId: string2().describe("the artifact, art_…"),
13898
13904
  baseVersion: number2().describe("the version you READ (get_artifact) — stale is rejected"),
13899
- source: string2().optional().describe("full replace: the complete new content"),
13905
+ source: fileBody("full replace: the complete new content").optional(),
13900
13906
  patches: array(object({ old: string2(), new: string2() })).optional().describe("exact-match hunks applied in order; each old must match exactly once"),
13901
13907
  note: string2().optional().describe("one-line summary of what changed"),
13902
13908
  idempotencyKey: string2().min(1).max(200).optional().describe("stable retry key for this logical edit; the CLI derives one from the artifact, base version, and content when omitted")
@@ -14889,7 +14895,7 @@ var ACTION_DEFINITIONS = [
14889
14895
  title: string2().optional().describe("create: the artifact's title"),
14890
14896
  kind: _enum(["doc", "table", "diagram", "html", "file"]).optional().describe("create: structural kind (default file). doc/table/diagram/html are editable text"),
14891
14897
  type: _enum(ARTIFACT_TYPES).optional().describe(`create: ${ARTIFACT_TYPE_DESCRIPTION}`),
14892
- source: string2().optional().describe("create (text kinds): the initial content · edit verb=replace: the full new content"),
14898
+ source: fileBody("create (text kinds): the initial content · edit verb=replace: the full new content").optional(),
14893
14899
  contentRef: string2().optional().describe("create (kind=file): where the content lives, e.g. inline://… or a URL"),
14894
14900
  editPolicy: _enum(["owner", "members", "anyone"]).optional().describe("create: who may edit (default members)"),
14895
14901
  summary: string2().min(1).max(500).optional().describe("create: REQUIRED one-line description of what this Artifact is or accomplishes"),
@@ -15143,7 +15149,7 @@ var ACTION_DEFINITIONS = [
15143
15149
  description: string2().max(500).optional().describe("create: non-sensitive purpose"),
15144
15150
  owner: _enum(["organization", "profile"]).optional().describe("create: who owns the Secret (default organization). profile keeps administration with one identity; names are unique per owner"),
15145
15151
  ownerProfileId: string2().optional().describe("create + owner=profile: the owning identity, defaulting to you; assigning another Profile is an Org owner/admin action"),
15146
- value: string2().min(1).optional().describe("set/rotate: plaintext submitted once and never returned or recorded"),
15152
+ value: fileBody("set/rotate: plaintext submitted once and never returned or recorded; --value-file is sent byte-exact (printf, not echo)", string2().min(1)).optional(),
15147
15153
  profileId: string2().optional().describe("grant/revoke_grant: authorized human or agent"),
15148
15154
  permissions: array(_enum([
15149
15155
  "create",
@@ -15213,7 +15219,7 @@ var ACTION_DEFINITIONS = [
15213
15219
  description: "Write the first encrypted SecretVersion. The submitted value is never echoed, logged, audited, or placed in provenance; use secret_rotate after the first version.",
15214
15220
  inputSchema: {
15215
15221
  secretId: string2().describe("the empty Secret, sec_…"),
15216
- value: string2().min(1).describe("plaintext submitted once and never returned")
15222
+ value: fileBody("plaintext submitted once and never returned; --value-file is sent byte-exact (printf, not echo)", string2().min(1))
15217
15223
  },
15218
15224
  surfaces: ["cli"],
15219
15225
  toolset: "apps",
@@ -15225,7 +15231,7 @@ var ACTION_DEFINITIONS = [
15225
15231
  description: "Append a new encrypted SecretVersion and make every active App binding consume it. Rotation permission is independent of value-write, bind, and plaintext-read permission; the submitted value is never returned.",
15226
15232
  inputSchema: {
15227
15233
  secretId: string2().describe("the active Secret, sec_…"),
15228
- value: string2().min(1).describe("new plaintext submitted once and never returned")
15234
+ value: fileBody("new plaintext submitted once and never returned; --value-file is sent byte-exact (printf, not echo)", string2().min(1))
15229
15235
  },
15230
15236
  surfaces: ["cli"],
15231
15237
  toolset: "apps",
@@ -15457,7 +15463,7 @@ var ACTION_DEFINITIONS = [
15457
15463
  path: string2().min(1).max(2048).describe("relative App path beginning with /; may include a query string"),
15458
15464
  method: _enum(["POST", "PUT", "PATCH", "DELETE"]).describe("mutating HTTP method"),
15459
15465
  json: json().optional().describe("JSON request value; mutually exclusive with body and sets application/json. On the CLI, pass serialized JSON after the command as --json '<value>'"),
15460
- body: string2().optional().describe("UTF-8 request body; mutually exclusive with json"),
15466
+ body: fileBody("UTF-8 request body; mutually exclusive with json").optional(),
15461
15467
  contentType: string2().max(160).optional().describe("body media type; allowed only with body, default text/plain; charset=utf-8")
15462
15468
  },
15463
15469
  surfaces: ["computer-mcp", "cli"],
@@ -15613,7 +15619,7 @@ var ACTIONS = ACTION_DEFINITIONS.map((action) => {
15613
15619
  });
15614
15620
 
15615
15621
  // ../actions/src/retention-entry.ts
15616
- var ARBOR_VERSION = "0.24.19";
15622
+ var ARBOR_VERSION = "0.24.22";
15617
15623
  var historyPolicySchema = _enum(["full", "checkpoint"]).optional().describe("text Artifacts: future history retention policy; full retains every source snapshot, checkpoint keeps metadata for every revision and source only when explicitly retained");
15618
15624
  var retainSourceSchema = boolean2().optional().describe("edit: in checkpoint mode, retain this newly minted content revision's source");
15619
15625
  var checkpointSchema = boolean2().optional().describe("edit: retain the exact current version source without incrementing content version");
@@ -16497,7 +16503,7 @@ function dispositionFilename(value) {
16497
16503
  // package.json
16498
16504
  var package_default = {
16499
16505
  name: "@lambdacurry/arbor",
16500
- version: "0.24.19",
16506
+ version: "0.24.22",
16501
16507
  description: "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
16502
16508
  keywords: [
16503
16509
  "agents",
@@ -16995,7 +17001,7 @@ function acceptedFlags(inputSchema) {
16995
17001
  }
16996
17002
  return out;
16997
17003
  }
16998
- function readTextSource(src) {
17004
+ function readTextSource(src, verbatim) {
16999
17005
  let text;
17000
17006
  try {
17001
17007
  text = readFileSync2(src === "-" ? 0 : src, "utf8");
@@ -17003,7 +17009,7 @@ function readTextSource(src) {
17003
17009
  const where = src === "-" ? "stdin" : src;
17004
17010
  throw new UsageError(`could not read ${where}: ${e instanceof Error ? e.message : String(e)}`);
17005
17011
  }
17006
- return text.replace(/[\r\n]+$/, "");
17012
+ return verbatim ? text : text.replace(/[\r\n]+$/, "");
17007
17013
  }
17008
17014
  function primaryPositionalField(inputSchema) {
17009
17015
  return flagsForSchema(inputSchema).find((f) => f.required && (f.kind === "string" || f.kind === "number"));
@@ -17019,7 +17025,8 @@ function flagsForSchema(inputSchema) {
17019
17025
  nullable,
17020
17026
  description: description(inner) ?? description(raw),
17021
17027
  literal: isProseList(inner),
17022
- verbatim: isVerbatimList(inner)
17028
+ verbatim: isVerbatimList(inner),
17029
+ fileBody: isFileBody(inner)
17023
17030
  };
17024
17031
  });
17025
17032
  }
@@ -17035,7 +17042,7 @@ function buildInput(inputSchema, flags, command) {
17035
17042
  }
17036
17043
  if (fileSrc === true)
17037
17044
  throw new UsageError(`--${spec.flag}-file expects a path (or - for stdin)`);
17038
- const sourced = readTextSource(String(fileSrc));
17045
+ const sourced = readTextSource(String(fileSrc), spec.fileBody === true);
17039
17046
  if (spec.kind === "json") {
17040
17047
  try {
17041
17048
  input[spec.field] = JSON.parse(sourced);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.24.19",
3
+ "version": "0.24.22",
4
4
  "description": "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
5
5
  "keywords": [
6
6
  "agents",