@lambdacurry/arbor 0.4.33 → 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 +52 -19
  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
@@ -16353,11 +16353,12 @@ var ACTIONS = [
16353
16353
  },
16354
16354
  {
16355
16355
  name: "set_space_charter",
16356
- title: "Set how you operate in a space",
16357
- description: "Set your own SPACE CHARTER for a space you're a member of (AD-152): an open-text note on HOW you operate here — your focus, working style, what you'll pick up — distinct from your org-wide identity charter. Shows on the space's member roster so teammates know how to work with you here. One per space; an empty string clears it.",
16356
+ title: "Set how you (or, as admin, a member) operate in a space",
16357
+ description: "Set a SPACE CHARTER for a space (AD-152): an open-text note on HOW someone operates here — focus, working style, what they pick up — distinct from the org-wide identity charter. Shows on the space's member roster. One per member per space; an empty string clears it. By default sets YOUR OWN. An org owner/admin may pass `profileId` to set ANOTHER member's charter — used sparingly, to bootstrap a member's role or fix drift; members otherwise self-author.",
16358
16358
  inputSchema: {
16359
- spaceId: exports_external.string().describe("the space id, e.g. spc_… (you must be a member)"),
16360
- charter: exports_external.string().describe("how you operate in this space; empty string clears it")
16359
+ spaceId: exports_external.string().describe("the space id, e.g. spc_… (you must be a member, or an org admin to override)"),
16360
+ charter: exports_external.string().describe("how they operate in this space; empty string clears it"),
16361
+ profileId: exports_external.string().optional().describe("admin override — set THIS member's charter instead of your own (org owner/admin only)")
16361
16362
  },
16362
16363
  surfaces: ["mcp", "cli"],
16363
16364
  run: forward("space.setCharter")
@@ -16415,15 +16416,15 @@ var ACTIONS = [
16415
16416
  run: forward("space.leave")
16416
16417
  },
16417
16418
  {
16418
- name: "invite_to_space",
16419
- title: "Invite to a space",
16420
- 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").',
16421
16422
  inputSchema: {
16422
- spaceId: exports_external.string().describe("the space id to invite into, e.g. spc_…"),
16423
- 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)")
16424
16425
  },
16425
16426
  surfaces: ["mcp", "cli"],
16426
- run: forward("space.invite")
16427
+ run: forward("space.addMember")
16427
16428
  },
16428
16429
  {
16429
16430
  name: "accept_space_invite",
@@ -16532,11 +16533,12 @@ var ACTIONS = [
16532
16533
  {
16533
16534
  name: "space_create",
16534
16535
  title: "Create a space",
16535
- 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.",
16536
16537
  inputSchema: {
16537
16538
  title: exports_external.string().min(1).describe("the space title"),
16538
16539
  purpose: exports_external.string().optional().describe("optional one-line purpose"),
16539
- 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")
16540
16542
  },
16541
16543
  surfaces: ["mcp", "cli"],
16542
16544
  run: forward("space.create")
@@ -16774,8 +16776,18 @@ import { randomUUID } from "node:crypto";
16774
16776
  function lastValue(value) {
16775
16777
  return Array.isArray(value) ? value[value.length - 1] : value;
16776
16778
  }
16777
- var GLOBAL_BOOLEAN_FLAGS = new Set(["json", "quiet", "no-quiet", "version", "help"]);
16778
- 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
+ ]);
16779
16791
  var TRUTHY = new Set(["true", "1", "yes", "on"]);
16780
16792
  function truthyFlag(value) {
16781
16793
  const v = lastValue(value);
@@ -16822,7 +16834,11 @@ function applyFields(data, fields) {
16822
16834
  function emitData(data, action, ctx) {
16823
16835
  const shaped = ctx.fields ? applyFields(data, ctx.fields) : data;
16824
16836
  if (ctx.json) {
16825
- 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
+ };
16826
16842
  process.stdout.write(`${JSON.stringify(envelope)}
16827
16843
  `);
16828
16844
  } else {
@@ -16834,7 +16850,11 @@ function emitError(err, action, ctx) {
16834
16850
  const code = codeForError(err);
16835
16851
  const message = err instanceof Error ? err.message : String(err);
16836
16852
  if (ctx.json) {
16837
- 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
+ };
16838
16858
  process.stdout.write(`${JSON.stringify(envelope)}
16839
16859
  `);
16840
16860
  process.exitCode = exitCodeForError(code);
@@ -17137,7 +17157,11 @@ async function connect(opts) {
17137
17157
  throw new Error("pairing timed out — ask for a new pairing key and run `arbor connect` again");
17138
17158
  }
17139
17159
  await sleep(pollIntervalMs);
17140
- 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
+ });
17141
17165
  const tok = await tokRes.json().catch(() => ({}));
17142
17166
  if (tok.status === "approved" && tok.apiKey) {
17143
17167
  saveConfig({ apiUrl, token: tok.apiKey });
@@ -17187,7 +17211,11 @@ async function login(opts) {
17187
17211
  const tokRes = await fetch(`${apiUrl}/api/auth/device/token`, {
17188
17212
  method: "POST",
17189
17213
  headers: { "content-type": "application/json" },
17190
- 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
+ })
17191
17219
  });
17192
17220
  const tok = await tokRes.json().catch(() => ({}));
17193
17221
  if (tok.access_token) {
@@ -17332,7 +17360,12 @@ async function renderHealth(ctx) {
17332
17360
  const me = await httpExecutor.call("me.get", {});
17333
17361
  auth = {
17334
17362
  authenticated: true,
17335
- 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
+ }
17336
17369
  };
17337
17370
  } catch (e) {
17338
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.33",
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
  }