@lambdacurry/arbor 0.21.38 → 0.21.40

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 +72 -21
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -13,10 +13,55 @@ var __export = (target, all) => {
13
13
  set: __exportSetter.bind(all, name)
14
14
  });
15
15
  };
16
-
17
- // src/index.ts
18
- import { readFileSync as readFileSync3 } from "node:fs";
19
- import { fileURLToPath } from "node:url";
16
+ // package.json
17
+ var package_default = {
18
+ name: "@lambdacurry/arbor",
19
+ version: "0.21.40",
20
+ description: "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
21
+ keywords: [
22
+ "agents",
23
+ "arbor",
24
+ "cli",
25
+ "collaboration",
26
+ "mcp"
27
+ ],
28
+ license: "MIT",
29
+ repository: {
30
+ type: "git",
31
+ url: "git+https://github.com/lambda-curry/arbor.git",
32
+ directory: "packages/cli"
33
+ },
34
+ bin: {
35
+ arbor: "./dist/arbor.js"
36
+ },
37
+ files: [
38
+ "dist",
39
+ "README.md"
40
+ ],
41
+ type: "module",
42
+ publishConfig: {
43
+ access: "public"
44
+ },
45
+ scripts: {
46
+ arbor: "tsx src/bin.ts",
47
+ build: "bun build ./src/bin.ts --target=node --outfile=dist/arbor.js",
48
+ test: "vitest run --passWithNoTests",
49
+ typecheck: "tsc -b",
50
+ prepublishOnly: "bun run build"
51
+ },
52
+ devDependencies: {
53
+ "@arbor/actions": "workspace:*",
54
+ "@arbor/core": "workspace:*",
55
+ "@types/node": "^26.2.0",
56
+ tsx: "^4.20.6",
57
+ typescript: "^5.8.0",
58
+ vitest: "^4.1.4",
59
+ zod: "^4.4.3"
60
+ },
61
+ engines: {
62
+ node: ">=18"
63
+ }
64
+ };
20
65
 
21
66
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
22
67
  var exports_external = {};
@@ -22087,6 +22132,20 @@ var httpExecutor = {
22087
22132
  };
22088
22133
 
22089
22134
  // src/output.ts
22135
+ function writeOutput(value, stream, fallback) {
22136
+ if (stream && typeof stream.write === "function") {
22137
+ stream.write(value);
22138
+ return;
22139
+ }
22140
+ fallback(value.endsWith(`
22141
+ `) ? value.slice(0, -1) : value);
22142
+ }
22143
+ function writeStdout(value) {
22144
+ writeOutput(value, process.stdout, (line) => console.log(line));
22145
+ }
22146
+ function writeStderr(value) {
22147
+ writeOutput(value, process.stderr, (line) => console.error(line));
22148
+ }
22090
22149
  function lastValue(value) {
22091
22150
  return Array.isArray(value) ? value[value.length - 1] : value;
22092
22151
  }
@@ -22120,7 +22179,7 @@ function stringFlag(value, name) {
22120
22179
  }
22121
22180
  function resolveOutput(flags, opts) {
22122
22181
  const json2 = truthyFlag(flags.json);
22123
- const isTTY = opts?.isTTY ?? Boolean(process.stdout.isTTY);
22182
+ const isTTY = opts?.isTTY ?? Boolean(process.stdout?.isTTY);
22124
22183
  const quiet = truthyFlag(flags["no-quiet"]) ? false : truthyFlag(flags.quiet) || json2 || !isTTY;
22125
22184
  const fieldsRaw = lastValue(flags.fields);
22126
22185
  const fields = typeof fieldsRaw === "string" && fieldsRaw.trim() ? fieldsRaw.split(",").map((f) => f.trim()).filter(Boolean) : undefined;
@@ -22152,10 +22211,10 @@ function emitData(data, _action, ctx) {
22152
22211
  const shaped = ctx.fields ? applyFields(data, ctx.fields) : data;
22153
22212
  if (ctx.json) {
22154
22213
  const envelope = { ok: true, data: shaped };
22155
- process.stdout.write(`${JSON.stringify(envelope)}
22214
+ writeStdout(`${JSON.stringify(envelope)}
22156
22215
  `);
22157
22216
  } else {
22158
- process.stdout.write(`${JSON.stringify(shaped, null, 2)}
22217
+ writeStdout(`${JSON.stringify(shaped, null, 2)}
22159
22218
  `);
22160
22219
  }
22161
22220
  }
@@ -22167,24 +22226,24 @@ function emitError(err, _action, ctx) {
22167
22226
  ok: false,
22168
22227
  error: { code, message, ...detailsForError(err) }
22169
22228
  };
22170
- process.stdout.write(`${JSON.stringify(envelope)}
22229
+ writeStdout(`${JSON.stringify(envelope)}
22171
22230
  `);
22172
22231
  process.exitCode = exitCodeForError(code);
22173
22232
  } else {
22174
- process.stderr.write(`✗ ${message}
22233
+ writeStderr(`✗ ${message}
22175
22234
  `);
22176
22235
  process.exitCode = 1;
22177
22236
  }
22178
22237
  }
22179
22238
  function advise(message, ctx) {
22180
22239
  if (!ctx.quiet)
22181
- process.stderr.write(message);
22240
+ writeStderr(message);
22182
22241
  }
22183
22242
  function emitDual(data, human, action, ctx) {
22184
22243
  if (ctx.json)
22185
22244
  emitData(data, action, ctx);
22186
22245
  else
22187
- process.stdout.write(human);
22246
+ writeStdout(human);
22188
22247
  }
22189
22248
 
22190
22249
  // src/computer-exec-wait.ts
@@ -22894,15 +22953,7 @@ function clamp(text3, max = 140) {
22894
22953
  const t = text3.trim().replace(/\s+/g, " ");
22895
22954
  return t.length > max ? `${t.slice(0, max - 1)}…` : t;
22896
22955
  }
22897
- var PKG = (() => {
22898
- try {
22899
- const pkg = JSON.parse(readFileSync3(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8"));
22900
- return { name: pkg.name ?? "@lambdacurry/arbor", version: pkg.version ?? "0.0.0" };
22901
- } catch {
22902
- return { name: "@lambdacurry/arbor", version: "0.0.0" };
22903
- }
22904
- })();
22905
- var CLI_VERSION = PKG.version;
22956
+ var CLI_VERSION = package_default.version;
22906
22957
  async function renderMe(ctx, action) {
22907
22958
  const me = await httpExecutor.call("me.get", {});
22908
22959
  const gaps = me.completeness?.unset ?? [];
@@ -22933,7 +22984,7 @@ ${CLI_NOTE}
22933
22984
  `, "orient", ctx);
22934
22985
  }
22935
22986
  function renderVersion(ctx) {
22936
- emitDual({ name: PKG.name, version: CLI_VERSION }, `arbor ${CLI_VERSION}
22987
+ emitDual({ name: package_default.name, version: CLI_VERSION }, `arbor ${CLI_VERSION}
22937
22988
  `, "version", ctx);
22938
22989
  }
22939
22990
  var HELP = `arbor — the Arbor CLI: people and agents deliberate on typed work, and Arbor remembers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.21.38",
3
+ "version": "0.21.40",
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",