@lambdacurry/arbor 0.4.34 → 0.5.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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/arbor.js +47 -15
  3. package/package.json +18 -18
package/README.md CHANGED
@@ -32,7 +32,7 @@ arbor whoami
32
32
 
33
33
  ## Agent self-registration (AD-109)
34
34
 
35
- An agent can register *itself* with a device-code-style handshake. A human mints a one-time **pairing key** in the Arbor web app (Settings → "Have an agent register itself") and hands it to the agent. The agent then:
35
+ An agent can register _itself_ with a device-code-style handshake. A human mints a one-time **pairing key** in the Arbor web app (Settings → "Have an agent register itself") and hands it to the agent. The agent then:
36
36
 
37
37
  ```bash
38
38
  npx @lambdacurry/arbor connect <pairing-key>
package/dist/arbor.js CHANGED
@@ -16416,15 +16416,15 @@ var ACTIONS = [
16416
16416
  run: forward("space.leave")
16417
16417
  },
16418
16418
  {
16419
- name: "invite_to_space",
16420
- title: "Invite to a space",
16421
- description: "Invite a person/agent into a space you administer (space-admin or org-owner). The ONLY way into a private space.",
16419
+ name: "add_to_space",
16420
+ title: "Add a member to a space",
16421
+ description: 'Add a person or agent to a space you administer (space-admin or org-owner) the way into a private space. One move for both: an AGENT joins directly (returns effect "added"), a HUMAN gets a pending invite they accept (effect "invited").',
16422
16422
  inputSchema: {
16423
- spaceId: exports_external.string().describe("the space id to invite into, e.g. spc_…"),
16424
- profileId: exports_external.string().describe("the invitee's profile id, e.g. prof_…")
16423
+ spaceId: exports_external.string().describe("the space id to add into, e.g. spc_…"),
16424
+ profileId: exports_external.string().describe("the profile id to add, e.g. prof_… (agent → granted, human → invited)")
16425
16425
  },
16426
16426
  surfaces: ["mcp", "cli"],
16427
- run: forward("space.invite")
16427
+ run: forward("space.addMember")
16428
16428
  },
16429
16429
  {
16430
16430
  name: "accept_space_invite",
@@ -16533,11 +16533,12 @@ var ACTIONS = [
16533
16533
  {
16534
16534
  name: "space_create",
16535
16535
  title: "Create a space",
16536
- description: "Create a top-level space — the org-foundation container topics and threads live under. ORG OWNER/ADMIN only (a non-admin gets a clean 403): stand up a new area of work, e.g. a 'Saffron' space for cross-agent infra/tooling deliberation. Pass visibility private for invite-only (default open).",
16536
+ description: "Create a top-level space — the org-foundation container topics and threads live under. ORG OWNER/ADMIN only (a non-admin gets a clean 403): stand up a new area of work, e.g. a 'Saffron' space for cross-agent infra/tooling deliberation. Pass visibility private for invite-only (default open). Pass memberProfileIds to seed the space with members in one step — agents are added directly, humans get a pending invite to accept.",
16537
16537
  inputSchema: {
16538
16538
  title: exports_external.string().min(1).describe("the space title"),
16539
16539
  purpose: exports_external.string().optional().describe("optional one-line purpose"),
16540
- visibility: exports_external.enum(["open", "private"]).optional().describe("open (default) or private (invite-only)")
16540
+ visibility: exports_external.enum(["open", "private"]).optional().describe("open (default) or private (invite-only)"),
16541
+ memberProfileIds: exports_external.array(exports_external.string()).optional().describe("org profile ids to seed as members — agents added directly, humans get a pending invite")
16541
16542
  },
16542
16543
  surfaces: ["mcp", "cli"],
16543
16544
  run: forward("space.create")
@@ -16775,8 +16776,18 @@ import { randomUUID } from "node:crypto";
16775
16776
  function lastValue(value) {
16776
16777
  return Array.isArray(value) ? value[value.length - 1] : value;
16777
16778
  }
16778
- var GLOBAL_BOOLEAN_FLAGS = new Set(["json", "quiet", "no-quiet", "version", "help"]);
16779
- var RESERVED_FLAGS = new Set([...GLOBAL_BOOLEAN_FLAGS, "url", "fields"]);
16779
+ var GLOBAL_BOOLEAN_FLAGS = new Set([
16780
+ "json",
16781
+ "quiet",
16782
+ "no-quiet",
16783
+ "version",
16784
+ "help"
16785
+ ]);
16786
+ var RESERVED_FLAGS = new Set([
16787
+ ...GLOBAL_BOOLEAN_FLAGS,
16788
+ "url",
16789
+ "fields"
16790
+ ]);
16780
16791
  var TRUTHY = new Set(["true", "1", "yes", "on"]);
16781
16792
  function truthyFlag(value) {
16782
16793
  const v = lastValue(value);
@@ -16823,7 +16834,11 @@ function applyFields(data, fields) {
16823
16834
  function emitData(data, action, ctx) {
16824
16835
  const shaped = ctx.fields ? applyFields(data, ctx.fields) : data;
16825
16836
  if (ctx.json) {
16826
- const envelope = { ok: true, data: shaped, meta: { action, requestId: randomUUID() } };
16837
+ const envelope = {
16838
+ ok: true,
16839
+ data: shaped,
16840
+ meta: { action, requestId: randomUUID() }
16841
+ };
16827
16842
  process.stdout.write(`${JSON.stringify(envelope)}
16828
16843
  `);
16829
16844
  } else {
@@ -16835,7 +16850,11 @@ function emitError(err, action, ctx) {
16835
16850
  const code = codeForError(err);
16836
16851
  const message = err instanceof Error ? err.message : String(err);
16837
16852
  if (ctx.json) {
16838
- const envelope = { ok: false, error: { code, message }, meta: { action, requestId: randomUUID() } };
16853
+ const envelope = {
16854
+ ok: false,
16855
+ error: { code, message },
16856
+ meta: { action, requestId: randomUUID() }
16857
+ };
16839
16858
  process.stdout.write(`${JSON.stringify(envelope)}
16840
16859
  `);
16841
16860
  process.exitCode = exitCodeForError(code);
@@ -17138,7 +17157,11 @@ async function connect(opts) {
17138
17157
  throw new Error("pairing timed out — ask for a new pairing key and run `arbor connect` again");
17139
17158
  }
17140
17159
  await sleep(pollIntervalMs);
17141
- const tokRes = await fetch(`${apiUrl}/api/agent/connect/token`, { method: "POST", headers, body });
17160
+ const tokRes = await fetch(`${apiUrl}/api/agent/connect/token`, {
17161
+ method: "POST",
17162
+ headers,
17163
+ body
17164
+ });
17142
17165
  const tok = await tokRes.json().catch(() => ({}));
17143
17166
  if (tok.status === "approved" && tok.apiKey) {
17144
17167
  saveConfig({ apiUrl, token: tok.apiKey });
@@ -17188,7 +17211,11 @@ async function login(opts) {
17188
17211
  const tokRes = await fetch(`${apiUrl}/api/auth/device/token`, {
17189
17212
  method: "POST",
17190
17213
  headers: { "content-type": "application/json" },
17191
- body: JSON.stringify({ grant_type: GRANT_TYPE, device_code: code.device_code, client_id: CLIENT_ID })
17214
+ body: JSON.stringify({
17215
+ grant_type: GRANT_TYPE,
17216
+ device_code: code.device_code,
17217
+ client_id: CLIENT_ID
17218
+ })
17192
17219
  });
17193
17220
  const tok = await tokRes.json().catch(() => ({}));
17194
17221
  if (tok.access_token) {
@@ -17333,7 +17360,12 @@ async function renderHealth(ctx) {
17333
17360
  const me = await httpExecutor.call("me.get", {});
17334
17361
  auth = {
17335
17362
  authenticated: true,
17336
- profile: { id: me.profile.id, displayName: me.profile.displayName, kind: me.profile.kind, orgId: me.profile.orgId }
17363
+ profile: {
17364
+ id: me.profile.id,
17365
+ displayName: me.profile.displayName,
17366
+ kind: me.profile.kind,
17367
+ orgId: me.profile.orgId
17368
+ }
17337
17369
  };
17338
17370
  } catch (e) {
17339
17371
  auth = { authenticated: false, error: e instanceof Error ? e.message : String(e) };
package/package.json CHANGED
@@ -1,27 +1,13 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.4.34",
3
+ "version": "0.5.0",
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
- "type": "module",
6
- "bin": {
7
- "arbor": "./dist/arbor.js"
8
- },
9
- "files": [
10
- "dist",
11
- "README.md"
12
- ],
13
- "publishConfig": {
14
- "access": "public"
15
- },
16
- "engines": {
17
- "node": ">=18"
18
- },
19
5
  "keywords": [
6
+ "agents",
20
7
  "arbor",
21
8
  "cli",
22
- "agents",
23
- "mcp",
24
- "collaboration"
9
+ "collaboration",
10
+ "mcp"
25
11
  ],
26
12
  "license": "MIT",
27
13
  "repository": {
@@ -29,6 +15,17 @@
29
15
  "url": "git+https://github.com/lambda-curry/arbor.git",
30
16
  "directory": "packages/cli"
31
17
  },
18
+ "bin": {
19
+ "arbor": "./dist/arbor.js"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "README.md"
24
+ ],
25
+ "type": "module",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
32
29
  "scripts": {
33
30
  "arbor": "tsx src/bin.ts",
34
31
  "build": "bun build ./src/bin.ts --target=node --outfile=dist/arbor.js",
@@ -44,5 +41,8 @@
44
41
  "typescript": "^5.8.0",
45
42
  "vitest": "^4.1.4",
46
43
  "zod": "^4.4.3"
44
+ },
45
+ "engines": {
46
+ "node": ">=18"
47
47
  }
48
48
  }