@lambdacurry/arbor 0.22.7 → 0.22.8

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 +93 -4
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // package.json
3
3
  var package_default = {
4
4
  name: "@lambdacurry/arbor",
5
- version: "0.22.7",
5
+ version: "0.22.8",
6
6
  description: "The Arbor CLI — a shared workspace for people and agents. The human + headless-agent write path over Arbor's guarded operation surface.",
7
7
  keywords: [
8
8
  "agents",
@@ -9675,6 +9675,88 @@ function mcpAnnotationsFor(name) {
9675
9675
  return annotations;
9676
9676
  }
9677
9677
 
9678
+ // ../actions/src/tldraw-agent.ts
9679
+ var TLDRAW_EXEC_MAX_OPERATIONS = 100;
9680
+ var shapeId = string2().regex(/^shape:[A-Za-z0-9_-]{1,128}$/).describe("stable tldraw shape id, shape:…");
9681
+ var shapeType = _enum(["geo", "text", "note", "frame", "arrow", "line", "draw", "group"]).describe("built-in tldraw shape type; use code mode for custom or asset-backed shapes");
9682
+ var finite = number2().finite();
9683
+ var jsonRecord = record(string2(), unknown());
9684
+ var create = object({
9685
+ op: literal("create"),
9686
+ id: shapeId,
9687
+ type: shapeType,
9688
+ x: finite,
9689
+ y: finite,
9690
+ parentId: string2().min(1).max(200).optional(),
9691
+ rotation: finite.optional(),
9692
+ opacity: finite.min(0).max(1).optional(),
9693
+ isLocked: boolean2().optional(),
9694
+ props: jsonRecord.optional().describe("shape properties such as w, h, geo, color, or richText"),
9695
+ meta: jsonRecord.optional()
9696
+ }).strict();
9697
+ var update = object({
9698
+ op: literal("update"),
9699
+ id: shapeId,
9700
+ type: shapeType,
9701
+ x: finite.optional(),
9702
+ y: finite.optional(),
9703
+ parentId: string2().min(1).max(200).optional(),
9704
+ rotation: finite.optional(),
9705
+ opacity: finite.min(0).max(1).optional(),
9706
+ isLocked: boolean2().optional(),
9707
+ props: jsonRecord.optional().describe("partial shape properties"),
9708
+ meta: jsonRecord.optional()
9709
+ }).strict();
9710
+ var shapeIds = array(shapeId).min(1).max(TLDRAW_EXEC_MAX_OPERATIONS);
9711
+ var TLDRAW_EXEC_OPERATION_SCHEMA = discriminatedUnion("op", [
9712
+ create,
9713
+ update,
9714
+ object({ op: literal("delete"), ids: shapeIds }).strict(),
9715
+ object({
9716
+ op: literal("align"),
9717
+ ids: shapeIds.min(2),
9718
+ alignment: _enum(["bottom", "center-horizontal", "center-vertical", "left", "right", "top"])
9719
+ }).strict(),
9720
+ object({
9721
+ op: literal("distribute"),
9722
+ ids: shapeIds.min(3),
9723
+ axis: _enum(["horizontal", "vertical"])
9724
+ }).strict(),
9725
+ object({
9726
+ op: literal("group"),
9727
+ ids: shapeIds.min(2),
9728
+ groupId: shapeId.optional()
9729
+ }).strict()
9730
+ ]);
9731
+ var TLDRAW_EXEC_OPERATIONS_SCHEMA = array(TLDRAW_EXEC_OPERATION_SCHEMA).min(1).max(TLDRAW_EXEC_MAX_OPERATIONS).superRefine((operations, ctx) => {
9732
+ const createdIds = new Set;
9733
+ operations.forEach((operation, index) => {
9734
+ if (operation.op === "create") {
9735
+ if (createdIds.has(operation.id)) {
9736
+ ctx.addIssue({
9737
+ code: "custom",
9738
+ message: `duplicate create id: ${operation.id}`,
9739
+ path: [index, "id"]
9740
+ });
9741
+ }
9742
+ createdIds.add(operation.id);
9743
+ }
9744
+ if ("ids" in operation) {
9745
+ const seen = new Set;
9746
+ operation.ids.forEach((id, idIndex) => {
9747
+ if (seen.has(id)) {
9748
+ ctx.addIssue({
9749
+ code: "custom",
9750
+ message: `duplicate shape id: ${id}`,
9751
+ path: [index, "ids", idIndex]
9752
+ });
9753
+ }
9754
+ seen.add(id);
9755
+ });
9756
+ }
9757
+ });
9758
+ }).describe("preferred declarative edits, applied in order; mutually exclusive with code — read skill://arbor/references/tldraw.md before first use");
9759
+
9678
9760
  // ../actions/src/skill.ts
9679
9761
  var ARBOR_SKILL_NAME = "arbor";
9680
9762
  var ARBOR_SKILL_DESCRIPTION = "Work in Arbor (arborthreads.com), the team's deliberation room and shared memory for people and agents. " + "Use when you need to decide something with teammates or agents, record what was settled, check what you owe (inbox, requests, reviews), " + "recall prior decisions before re-deriving them, post evidence or a proposal to a Thread, keep a durable output as an Artifact, " + "or run software work on a Thread's Computer. Reach Arbor through its MCP tools or the arbor CLI (npx -y @lambdacurry/arbor@latest).";
@@ -9720,6 +9802,12 @@ Artifacts Arbor keeps current. Use it to decide things with others and to rememb
9720
9802
  ## How to work well in Arbor
9721
9803
 
9722
9804
  ${orientation}
9805
+
9806
+ ## Native tldraw
9807
+
9808
+ Before creating or modifying a native tldraw Artifact, read the bundled
9809
+ references/tldraw.md. Over MCP it is skill://arbor/references/tldraw.md; when only the CLI or web is
9810
+ available, read ${base}/skill/tldraw.md.
9723
9811
  `;
9724
9812
  }
9725
9813
  // ../actions/src/index.ts
@@ -11936,7 +12024,7 @@ var ACTION_DEFINITIONS = [
11936
12024
  {
11937
12025
  name: "tldraw_observe",
11938
12026
  title: "Observe a tldraw board",
11939
- description: "Capture a fresh bounded tldraw scene, lint result, document clock and digest, plus a PNG attachment for visual review.",
12027
+ description: "Capture a fresh bounded tldraw scene, lint result, document clock and digest, plus a PNG attachment for visual review. Observe before editing; first-time agents should read skill://arbor/references/tldraw.md (or https://arborthreads.com/skill/tldraw.md).",
11940
12028
  inputSchema: {
11941
12029
  artifactId: string2().describe("the tldraw Artifact, art_…"),
11942
12030
  pageId: string2().min(1).max(200).optional().describe("optional page to observe"),
@@ -11950,10 +12038,11 @@ var ACTION_DEFINITIONS = [
11950
12038
  {
11951
12039
  name: "tldraw_exec",
11952
12040
  title: "Run a one-shot tldraw program",
11953
- description: "Run bounded one-shot code against the current live tldraw board without changing its persistent document script, and return a durable execution receipt. An unknown result is reported for recovery and is never replayed automatically.",
12041
+ description: "Modify the current live tldraw board with preferred declarative operations or bounded JavaScript, then return a durable execution receipt. Observe first and read skill://arbor/references/tldraw.md (or https://arborthreads.com/skill/tldraw.md); an unknown result is never replayed automatically.",
11954
12042
  inputSchema: {
11955
12043
  artifactId: string2().describe("the tldraw Artifact, art_…"),
11956
- code: string2().min(1).max(1e5).describe("the script source to execute"),
12044
+ code: string2().min(1).max(1e5).optional().describe("advanced script source; mutually exclusive with operations"),
12045
+ operations: TLDRAW_EXEC_OPERATIONS_SCHEMA.optional(),
11957
12046
  idempotencyKey: string2().min(1).max(200).describe("stable key for this execution"),
11958
12047
  expectedDocumentClock: number2().int().min(0).optional().describe("optional current room clock guard"),
11959
12048
  boundedSettleMs: number2().int().min(400).max(3000).optional().describe("maximum settle time")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.22.7",
3
+ "version": "0.22.8",
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",