@lambdacurry/arbor 0.22.28 → 0.22.30
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.
- package/dist/arbor.js +101 -8
- 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.
|
|
5
|
+
version: "0.22.30",
|
|
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",
|
|
@@ -8012,6 +8012,17 @@ var computerRunReceipt2 = looseObject({
|
|
|
8012
8012
|
durability: computerRunDurability,
|
|
8013
8013
|
finishAssessment: computerRunFinishAssessment.nullable(),
|
|
8014
8014
|
finishRequest: computerRunFinishRequest.nullable(),
|
|
8015
|
+
finishContinuation: looseObject({
|
|
8016
|
+
state: _enum(["retrying", "unverified"]),
|
|
8017
|
+
phase: _enum(["quiescence", "git", "checkpoint", "release"]),
|
|
8018
|
+
reasonCode: string2(),
|
|
8019
|
+
description: string2(),
|
|
8020
|
+
callerAction: literal("none"),
|
|
8021
|
+
operation: _enum(["run_terminal_checkpoint", "run_release", "run_checkpoint_publication"]).optional(),
|
|
8022
|
+
attempts: number2().int().positive().optional(),
|
|
8023
|
+
lastFailedAt: timestamp.optional(),
|
|
8024
|
+
nextAttemptAt: timestamp.optional()
|
|
8025
|
+
}).nullable(),
|
|
8015
8026
|
status: _enum(["active", "finished", "failed", "cancelled"]),
|
|
8016
8027
|
outcome: _enum(["finished", "failed", "cancelled"]).nullable(),
|
|
8017
8028
|
reason: string2().nullable(),
|
|
@@ -8084,7 +8095,13 @@ var computerRunReceipt2 = looseObject({
|
|
|
8084
8095
|
providerHttpStatus: number2().int().optional(),
|
|
8085
8096
|
providerStopClass: string2().optional(),
|
|
8086
8097
|
providerRoute: _enum(["primary", "standby", "service"]).optional(),
|
|
8087
|
-
parentWorkspaceFrozen: boolean2().optional()
|
|
8098
|
+
parentWorkspaceFrozen: boolean2().optional(),
|
|
8099
|
+
finishIntentId: string2().optional(),
|
|
8100
|
+
finishPhase: _enum(["quiescence", "git", "checkpoint", "release"]).optional(),
|
|
8101
|
+
retryOperation: _enum(["run_terminal_checkpoint", "run_release", "run_checkpoint_publication"]).optional(),
|
|
8102
|
+
retryAttempts: number2().int().positive().optional(),
|
|
8103
|
+
retryLastFailedAt: timestamp.optional(),
|
|
8104
|
+
retryNextAttemptAt: timestamp.optional()
|
|
8088
8105
|
}))
|
|
8089
8106
|
})
|
|
8090
8107
|
});
|
|
@@ -9929,6 +9946,8 @@ ${orientation}
|
|
|
9929
9946
|
|
|
9930
9947
|
// ../actions/src/tldraw-agent.ts
|
|
9931
9948
|
var TLDRAW_EXEC_MAX_OPERATIONS = 100;
|
|
9949
|
+
var TLDRAW_DIAGRAM_MAX_NODES = 64;
|
|
9950
|
+
var TLDRAW_DIAGRAM_MAX_EDGES = 96;
|
|
9932
9951
|
var shapeId = string2().regex(/^shape:[A-Za-z0-9_-]{1,128}$/).describe("stable tldraw shape id, shape:…");
|
|
9933
9952
|
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");
|
|
9934
9953
|
var finite = number2().finite();
|
|
@@ -9960,6 +9979,21 @@ var update = object({
|
|
|
9960
9979
|
meta: jsonRecord.optional()
|
|
9961
9980
|
}).strict();
|
|
9962
9981
|
var shapeIds = array(shapeId).min(1).max(TLDRAW_EXEC_MAX_OPERATIONS);
|
|
9982
|
+
var diagramKey = string2().min(1).max(80).describe("caller-meaningful node key; returned as the alias for its generated tldraw shape id");
|
|
9983
|
+
var diagramLabel = string2().min(1).max(160);
|
|
9984
|
+
var diagram = object({
|
|
9985
|
+
op: literal("diagram"),
|
|
9986
|
+
direction: _enum(["LR", "RL", "TB", "BT"]).describe("graph reading direction: left/right or top/bottom"),
|
|
9987
|
+
nodes: array(object({
|
|
9988
|
+
key: diagramKey,
|
|
9989
|
+
label: diagramLabel
|
|
9990
|
+
}).strict()).min(1).max(TLDRAW_DIAGRAM_MAX_NODES),
|
|
9991
|
+
edges: array(object({
|
|
9992
|
+
from: diagramKey,
|
|
9993
|
+
to: diagramKey,
|
|
9994
|
+
label: diagramLabel.optional()
|
|
9995
|
+
}).strict()).max(TLDRAW_DIAGRAM_MAX_EDGES)
|
|
9996
|
+
}).strict();
|
|
9963
9997
|
var TLDRAW_EXEC_OPERATION_SCHEMA = discriminatedUnion("op", [
|
|
9964
9998
|
create,
|
|
9965
9999
|
update,
|
|
@@ -9978,10 +10012,14 @@ var TLDRAW_EXEC_OPERATION_SCHEMA = discriminatedUnion("op", [
|
|
|
9978
10012
|
op: literal("group"),
|
|
9979
10013
|
ids: shapeIds.min(2),
|
|
9980
10014
|
groupId: shapeId.optional()
|
|
9981
|
-
}).strict()
|
|
10015
|
+
}).strict(),
|
|
10016
|
+
diagram
|
|
9982
10017
|
]);
|
|
9983
10018
|
var TLDRAW_EXEC_OPERATIONS_SCHEMA = array(TLDRAW_EXEC_OPERATION_SCHEMA).min(1).max(TLDRAW_EXEC_MAX_OPERATIONS).superRefine((operations, ctx) => {
|
|
9984
10019
|
const createdIds = new Set;
|
|
10020
|
+
const diagramKeys = new Set;
|
|
10021
|
+
let totalDiagramNodes = 0;
|
|
10022
|
+
let totalDiagramEdges = 0;
|
|
9985
10023
|
operations.forEach((operation, index) => {
|
|
9986
10024
|
if (operation.op === "create") {
|
|
9987
10025
|
if (createdIds.has(operation.id)) {
|
|
@@ -10006,6 +10044,61 @@ var TLDRAW_EXEC_OPERATIONS_SCHEMA = array(TLDRAW_EXEC_OPERATION_SCHEMA).min(1).m
|
|
|
10006
10044
|
seen.add(id);
|
|
10007
10045
|
});
|
|
10008
10046
|
}
|
|
10047
|
+
if (operation.op === "diagram") {
|
|
10048
|
+
const previousNodeTotal = totalDiagramNodes;
|
|
10049
|
+
const previousEdgeTotal = totalDiagramEdges;
|
|
10050
|
+
totalDiagramNodes += operation.nodes.length;
|
|
10051
|
+
totalDiagramEdges += operation.edges.length;
|
|
10052
|
+
if (previousNodeTotal <= TLDRAW_DIAGRAM_MAX_NODES && totalDiagramNodes > TLDRAW_DIAGRAM_MAX_NODES) {
|
|
10053
|
+
ctx.addIssue({
|
|
10054
|
+
code: "custom",
|
|
10055
|
+
message: `diagram nodes exceed execution limit: ${TLDRAW_DIAGRAM_MAX_NODES}`,
|
|
10056
|
+
path: [index, "nodes"]
|
|
10057
|
+
});
|
|
10058
|
+
}
|
|
10059
|
+
if (previousEdgeTotal <= TLDRAW_DIAGRAM_MAX_EDGES && totalDiagramEdges > TLDRAW_DIAGRAM_MAX_EDGES) {
|
|
10060
|
+
ctx.addIssue({
|
|
10061
|
+
code: "custom",
|
|
10062
|
+
message: `diagram edges exceed execution limit: ${TLDRAW_DIAGRAM_MAX_EDGES}`,
|
|
10063
|
+
path: [index, "edges"]
|
|
10064
|
+
});
|
|
10065
|
+
}
|
|
10066
|
+
const keys = new Set;
|
|
10067
|
+
operation.nodes.forEach((node, nodeIndex) => {
|
|
10068
|
+
if (keys.has(node.key)) {
|
|
10069
|
+
ctx.addIssue({
|
|
10070
|
+
code: "custom",
|
|
10071
|
+
message: `duplicate diagram node key: ${node.key}`,
|
|
10072
|
+
path: [index, "nodes", nodeIndex, "key"]
|
|
10073
|
+
});
|
|
10074
|
+
}
|
|
10075
|
+
if (diagramKeys.has(node.key)) {
|
|
10076
|
+
ctx.addIssue({
|
|
10077
|
+
code: "custom",
|
|
10078
|
+
message: `diagram node key is already used in this execution: ${node.key}`,
|
|
10079
|
+
path: [index, "nodes", nodeIndex, "key"]
|
|
10080
|
+
});
|
|
10081
|
+
}
|
|
10082
|
+
keys.add(node.key);
|
|
10083
|
+
diagramKeys.add(node.key);
|
|
10084
|
+
});
|
|
10085
|
+
operation.edges.forEach((edge, edgeIndex) => {
|
|
10086
|
+
if (!keys.has(edge.from)) {
|
|
10087
|
+
ctx.addIssue({
|
|
10088
|
+
code: "custom",
|
|
10089
|
+
message: `diagram edge source does not name a node: ${edge.from}`,
|
|
10090
|
+
path: [index, "edges", edgeIndex, "from"]
|
|
10091
|
+
});
|
|
10092
|
+
}
|
|
10093
|
+
if (!keys.has(edge.to)) {
|
|
10094
|
+
ctx.addIssue({
|
|
10095
|
+
code: "custom",
|
|
10096
|
+
message: `diagram edge target does not name a node: ${edge.to}`,
|
|
10097
|
+
path: [index, "edges", edgeIndex, "to"]
|
|
10098
|
+
});
|
|
10099
|
+
}
|
|
10100
|
+
});
|
|
10101
|
+
}
|
|
10009
10102
|
});
|
|
10010
10103
|
}).describe("preferred declarative edits, applied in order; mutually exclusive with code");
|
|
10011
10104
|
// ../actions/src/index.ts
|
|
@@ -10045,8 +10138,8 @@ ${ARBOR_FEEDBACK_GUIDANCE}
|
|
|
10045
10138
|
|
|
10046
10139
|
1. ORIENT, CONFIGURE, AND AUTHORIZE. Start with provider-free get_computer(threadId) to inspect the effective inherited recipe, repository authorization, compatibility, recoverySafety, and durable lineage without contacting execution. Use set_organization_computer, set_space_computer, set_topic_computer, or set_thread_computer only when the corresponding complete sparse layer must be replaced; use github_connect_repository with a known installed id, exact owner/name, or canonical GitHub URL, or use github_repositories when browsing, to authorize repositories at the narrowest scope that should inherit them. If github_repositories looks stale, github_refresh_installation reconciles the cached inventory from GitHub. computer_run_start(threadId, mode) is the front door: it attaches durable identity itself and starts an isolated write Run from the Thread's base snapshot without booting the parent. Each returned repository entry includes verified root instruction pointers when that repo has an AGENTS.md: read surfaced repository instructions before substantial edits or verification, then check for a nearer nested AGENTS.md once the target path is known. Repo-local instructions/scripts/config beat guessed formatter, test, lint, or build commands.
|
|
10047
10140
|
2. READ THE CAPABILITIES CARD, NOT THE BACKEND. runId is the one address: every runtime tool takes it, and the computerSessionId a Run carries is legacy input. computer_status(runId) describes the live PARENT Thread Computer behind a shared Run; it does not establish isolated Run activity, so use computer_run_receipt(runId) and computer_process_read for Run-owned work. Command-line utilities, including Git and package managers, run through computer_exec; check unfamiliar binaries with command -v.
|
|
10048
|
-
3. ONE RUN PER TASK. A write Run defaults to an isolated execution environment with its own filesystem, processes, ports, and /tmp while preserving /workspace paths; a read Run shares the parent. Pass runId to Run-aware tools. If a response is lost, recover the durable operation/process identity from computer_run_receipt and read it before retrying. computer_process_read
|
|
10049
|
-
4. CHECKPOINT COMPLETE UNITS THROUGH THE RUN. computer_run_suspend(runId) checkpoints an intermediate complete unit — an isolated Run publishes its exact workspace and releases its Sandbox, a shared Run advances the parent lineage — and computer_run_finish(runId) requests the final release; finishing the last active shared Run also stops the parent. An accepted isolated finish may return status active with finishRequest.state pending while the lifecycle owner preserves output, verifies Git, checkpoints, and releases without caller cleanup; one request is sufficient, and computer_run_receipt is an optional observation rather than a progress trigger. An isolated Run Preview is durable review output, not adoption or a checkpoint. The internal provider-handle publication operations are not agent tools.
|
|
10141
|
+
3. ONE RUN PER TASK. A write Run defaults to an isolated execution environment with its own filesystem, processes, ports, and /tmp while preserving /workspace paths; a read Run shares the parent. Pass runId to Run-aware tools. If a response is lost, recover the durable operation/process identity from computer_run_receipt and read it before retrying. computer_process_read settles a provider-absent current-generation process from exact evidence; computer_process_terminate sends one termination request and preserves the actual native terminal outcome from one bounded read. computer_run_suspend performs bounded settlement internally and never replays unknown work. A still-active process returns a retryable busy state; an unknown current-generation mutation fail-closes. An isolated local commit or Preview is not Git publication; push coherent work before computer_run_finish. discard=true with outcome failed or cancelled explicitly abandons Git work only after provider work is quiescent; it never overrides active or unknown execution.
|
|
10142
|
+
4. CHECKPOINT COMPLETE UNITS THROUGH THE RUN. computer_run_suspend(runId) checkpoints an intermediate complete unit — an isolated Run publishes its exact workspace and releases its Sandbox, a shared Run advances the parent lineage — and computer_run_finish(runId) requests the final release; finishing the last active shared Run also stops the parent. An accepted isolated finish may return status active with finishRequest.state pending while the lifecycle owner preserves output, verifies Git, checkpoints, and releases without caller cleanup; one request is sufficient, and computer_run_receipt is an optional observation rather than a progress trigger. A verified finishContinuation names the blocked stage and says callerAction none while that owner continues its capped retry. An isolated Run Preview is durable review output, not adoption or a checkpoint. The internal provider-handle publication operations are not agent tools.
|
|
10050
10143
|
5. GIT AND GITHUB ARE ORDINARY COMMANDS AFTER AUTHORIZATION. Clone, fetch, pull, push, and gh run through computer_exec using a connected human's just-in-time ambient GitHub identity. Credentials never enter argv, workspace files, Git config, checkpoints, Events, logs, or receipts. A restored Computer deliberately keeps the checkout age of its snapshot, so fetch/pull before trusting remote state.
|
|
10051
10144
|
6. VERIFY, PREVIEW, AND EXPORT. computer_verify captures a public URL directly without opening a project runtime. computer_publish_preview preserves immutable static output from either the parent or an active isolated write Run. computer_export moves bounded files into durable Thread Attachments; for a computer:// file Artifact asleep face, export the exact locator path .tldr and a same-Thread PNG, then use artifact set_snapshot. computer_export itself does not call set_snapshot; place returned Markdown exactly where the media belongs and cite the matching attachment ids.
|
|
10052
10145
|
7. PACKAGE, DEPLOY, ACTIVATE, AND OPERATE APPS HERE. computer_publish_app_bundle creates the immutable executable bundle from verified parent bytes through a shared write Run: push isolated work, computer_run_start with execution shared, pull, then publish. For short-lived public Artifact experiments use preview_app_create/get/retire; for published Space Apps use app_create, app_config_apply, app_deploy, app_deployment_get, app_activate, app_get, app_fetch/app_request, app_rollback, app_set_access, app_reset_state/app_restore_state, and app_archive as one workflow-closed release surface. First-class Organization/Profile Secrets remain on Arbor's collaboration MCP because they are broader identity-owned resources; App configuration here references existing Secret ids and never accepts or returns secret material.
|
|
@@ -10836,7 +10929,7 @@ var ACTION_DEFINITIONS = [
|
|
|
10836
10929
|
{
|
|
10837
10930
|
name: "computer_run_receipt",
|
|
10838
10931
|
title: "Read a run receipt",
|
|
10839
|
-
description: "
|
|
10932
|
+
description: "Read a Run's durable receipt, including finishRequest, derived finishContinuation, Run-owned operation/activity state, and compact providerLifecycle. A verified pending continuation names the stage the existing owner is retrying with callerAction none; reads never advance finish or rewrite terminal reasonCode, so use this instead of parent computer_status for compact history.",
|
|
10840
10933
|
inputSchema: {
|
|
10841
10934
|
runId: string2().describe("the run to read, run_… (from computer_run_start or computer_runs)")
|
|
10842
10935
|
},
|
|
@@ -10895,7 +10988,7 @@ var ACTION_DEFINITIONS = [
|
|
|
10895
10988
|
{
|
|
10896
10989
|
name: "computer_process_terminate",
|
|
10897
10990
|
title: "Terminate a background process",
|
|
10898
|
-
description: "
|
|
10991
|
+
description: "Request termination once for a computer_exec process without shell PIDs or ps/kill; an already-absent or already-complete process is a no-op. Control performs one bounded native read and returns its actual terminal result, preserving completion races and provider-reported failed signal exits; if uncertain, inspect this process with computer_process_read instead of repeating termination.",
|
|
10899
10992
|
inputSchema: {
|
|
10900
10993
|
computerSessionId: string2().optional().describe("legacy alternative to runId: a computerSessionId on that Computer, cms_…; required unless runId is supplied"),
|
|
10901
10994
|
runId: string2().optional().describe("the Run that owns this process, if it was started inside a Run"),
|
|
@@ -12250,7 +12343,7 @@ var ACTION_DEFINITIONS = [
|
|
|
12250
12343
|
{
|
|
12251
12344
|
name: "tldraw_exec",
|
|
12252
12345
|
title: "Run a one-shot tldraw program",
|
|
12253
|
-
description: `Modify the current live tldraw board with preferred declarative operations or bounded JavaScript, then return a durable execution receipt; use IDs from a fresh observe, reacquire this current schema after compaction, and never replay an unknown result. First use: read the tldraw guide at ${AGENT_GUIDE_URLS.tldraw}.`,
|
|
12346
|
+
description: `Modify the current live tldraw board with preferred declarative operations or bounded JavaScript, including a graph-scoped diagram operation that lays out keyed nodes and native bound edges without caller-supplied coordinates, then return a durable execution receipt; use IDs from a fresh observe, reacquire this current schema after compaction, and never replay an unknown result. First use: read the tldraw guide at ${AGENT_GUIDE_URLS.tldraw}.`,
|
|
12254
12347
|
inputSchema: {
|
|
12255
12348
|
artifactId: string2().describe("the tldraw Artifact, art_…"),
|
|
12256
12349
|
code: string2().min(1).max(1e5).optional().describe("advanced script source; mutually exclusive with operations"),
|
package/package.json
CHANGED