@lambdacurry/arbor 0.23.33 → 0.23.35

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 +74 -3
  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.23.33",
5
+ version: "0.23.35",
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",
@@ -6908,6 +6908,11 @@ var computerRuns = sqliteTable("computer_runs", {
6908
6908
  f1Authority: text("f1_authority", { mode: "json" }).$type(),
6909
6909
  workspaceState: text("workspace_state", { mode: "json" }).$type(),
6910
6910
  finishRequest: text("finish_request", { mode: "json" }).$type(),
6911
+ retentionPolicy: text("retention_policy").$type().notNull().default("none"),
6912
+ retentionDeadlineAt: ts("retention_deadline_at"),
6913
+ retentionMeaningfulUseAt: ts("retention_meaningful_use_at"),
6914
+ retentionKeep: integer2("retention_keep", { mode: "boolean" }).notNull().default(false),
6915
+ retentionRevision: integer2("retention_revision").notNull().default(0),
6911
6916
  status: text("status").$type().notNull().default("active"),
6912
6917
  label: text("label"),
6913
6918
  reason: text("reason"),
@@ -6918,7 +6923,8 @@ var computerRuns = sqliteTable("computer_runs", {
6918
6923
  threadIdx: index("computer_runs_thread_idx").on(t.threadId, t.startedAt),
6919
6924
  sessionIdx: index("computer_runs_session_idx").on(t.computerSessionId, t.startedAt),
6920
6925
  statusIdx: index("computer_runs_status_idx").on(t.computerId, t.status),
6921
- runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState)
6926
+ runtimeIdx: index("computer_runs_runtime_idx").on(t.computerId, t.runtimeState),
6927
+ retentionDueIdx: index("computer_runs_retention_due_idx").on(t.retentionPolicy, t.status, t.retentionDeadlineAt)
6922
6928
  }));
6923
6929
  var packageCacheObjects = sqliteTable("package_cache_objects", {
6924
6930
  key: text("key").primaryKey(),
@@ -7893,6 +7899,8 @@ var events = sqliteTable("events", {
7893
7899
  createdAt: ts("created_at").notNull()
7894
7900
  }, (t) => ({
7895
7901
  objectIdx: index("events_object_idx").on(t.objectType, t.objectId, t.createdAt),
7902
+ retentionMutationIdx: index("events_retention_mutation_idx").on(t.objectType, t.objectId, t.type, sql`trim(json_extract(${t.payload}, '$.mutationId'))`).where(sql`json_valid(${t.payload})`),
7903
+ retentionProcessIdx: index("events_retention_process_idx").on(t.objectType, t.objectId, t.type, sql`trim(json_extract(${t.payload}, '$.processId'))`).where(sql`json_valid(${t.payload})`),
7896
7904
  createdIdx: index("events_created_idx").on(t.createdAt)
7897
7905
  }));
7898
7906
  var notifications = sqliteTable("notifications", {
@@ -8175,6 +8183,9 @@ var MAX_WAY_LEN = WAYS_TO_HELP_LIMITS.maxItemLength;
8175
8183
  // ../core/src/ops/computer-output.ts
8176
8184
  var COMPUTER_OUTPUT_DEFAULT_STALE_MS = 24 * 60 * 60 * 1000;
8177
8185
 
8186
+ // ../core/src/ops/computer-run-retention.ts
8187
+ var COMPUTER_RUN_RETENTION_WARNING_MS = 24 * 60 * 60 * 1000;
8188
+
8178
8189
  // ../core/src/ops/computer-run.ts
8179
8190
  var COMPUTER_RUN_START_CHECKPOINT_RESERVATION_STALE_MS = 12 * 60 * 1000;
8180
8191
  var COMPUTER_RUN_F1_FINAL_FAILURE_CODES = new Set([
@@ -10053,6 +10064,39 @@ var MCP_OUTPUT_SCHEMAS = {
10053
10064
  })
10054
10065
  ])
10055
10066
  }),
10067
+ computer_run_retention: looseObject({
10068
+ runId: id,
10069
+ destructiveExpiration: literal("disabled"),
10070
+ report: looseObject({
10071
+ policy: _enum(["none", "isolated-run-14d"]),
10072
+ deadlineAt: timestamp.nullable(),
10073
+ meaningfulUseAt: timestamp.nullable(),
10074
+ keep: boolean2(),
10075
+ revision: number2().int().min(0),
10076
+ warningDelivery: literal("advisory-only"),
10077
+ destructiveExpiration: literal("disabled"),
10078
+ decision: _enum(["excluded", "not-due", "kept", "deferred", "eligible"]),
10079
+ reasonCode: string2(),
10080
+ warningDue: boolean2(),
10081
+ warningLossScope: string2(),
10082
+ warningAction: literal("computer_run_keep")
10083
+ })
10084
+ }),
10085
+ computer_run_keep: looseObject({
10086
+ runId: id,
10087
+ keep: boolean2(),
10088
+ revision: number2().int().min(0),
10089
+ replayed: boolean2(),
10090
+ retention: looseObject({
10091
+ policy: _enum(["none", "isolated-run-14d"]),
10092
+ deadlineAt: timestamp.nullable(),
10093
+ meaningfulUseAt: timestamp.nullable(),
10094
+ keep: boolean2(),
10095
+ revision: number2().int().min(0),
10096
+ warningDelivery: literal("advisory-only"),
10097
+ destructiveExpiration: literal("disabled")
10098
+ })
10099
+ }),
10056
10100
  computer_runs: looseObject({
10057
10101
  computerId: id,
10058
10102
  threadId: id,
@@ -10728,6 +10772,8 @@ var MCP_TOOL_ANNOTATIONS = {
10728
10772
  computer_repo_work_status: readOnly,
10729
10773
  computer_run_finish: idempotent,
10730
10774
  computer_run_receipt: readOnly,
10775
+ computer_run_retention: readOnly,
10776
+ computer_run_keep: idempotent,
10731
10777
  computer_runs: readOnly,
10732
10778
  computer_exec: destructiveOpenWorld,
10733
10779
  computer_run_setup: destructiveIdempotentOpenWorld,
@@ -11860,9 +11906,10 @@ var ACTION_DEFINITIONS = [
11860
11906
  {
11861
11907
  name: "computer_open",
11862
11908
  title: "Open a Thread computer",
11863
- description: "Deprecated by AD-306: start work with computer_run_start(threadId, mode) instead; this alias remains one release and boots the parent Thread Computer, returning a computerSessionId. Use it only for a legacy client that still addresses the parent by cms_ id; unsafe recovery is refused and unresolved newer workspace state stays fail-closed.",
11909
+ description: "Deprecated by AD-306: start work with computer_run_start(threadId, mode) instead; this alias remains one release and boots the parent Thread Computer, returning a computerSessionId. An optional owned active runId records a successful session attach as Run retention activity. Use it only for a legacy client that still addresses the parent by cms_ id; unsafe recovery is refused and unresolved newer workspace state stays fail-closed.",
11864
11910
  inputSchema: {
11865
11911
  threadId: string2().describe("the Arbor Thread whose stable computer to open, thr_…"),
11912
+ runId: string2().optional().describe("optional owned active Run; successful open renews its retention deadline"),
11866
11913
  idempotencyKey: string2().trim().min(1).max(200).optional().describe("optional explicit key for ONE distinct logical open; omission reuses the durable profile/Thread/recipe identity; changed options require a distinct intent; retry unchanged after response loss and never mint a new key to bypass unresolved work"),
11867
11914
  vcpus: number2().int().min(1).max(4).optional().describe("optional container vCPU request"),
11868
11915
  label: string2().optional().describe("short runtime label for operator diagnostics")
@@ -11952,6 +11999,30 @@ var ACTION_DEFINITIONS = [
11952
11999
  toolset: "loop",
11953
12000
  run: forward("computer_runtime.run_receipt")
11954
12001
  },
12002
+ {
12003
+ name: "computer_run_retention",
12004
+ title: "Inspect Run retention",
12005
+ description: "Report the deadline, last meaningful use, Keep flag, and advisory warning for one isolated Run. Expiry is disabled; this read sends no warning and releases nothing.",
12006
+ inputSchema: {
12007
+ runId: string2().describe("the Run to inspect, run_…")
12008
+ },
12009
+ surfaces: ["computer-mcp", "computer-cli"],
12010
+ toolset: "loop",
12011
+ run: forward("computer_runtime.run_retention")
12012
+ },
12013
+ {
12014
+ name: "computer_run_keep",
12015
+ title: "Keep Run data",
12016
+ description: "The Run owner or an organization admin can set or clear Keep for a newly created isolated Run, using expectedRevision to guard races. It protects restorable Run data without keeping provider compute alive; expiry remains disabled.",
12017
+ inputSchema: {
12018
+ runId: string2().describe("the Run to protect, run_…"),
12019
+ keep: boolean2().describe("true to retain the Run's restorable data; false to resume the policy"),
12020
+ expectedRevision: number2().int().nonnegative().optional().describe("optional retention revision read from computer_run_receipt")
12021
+ },
12022
+ surfaces: ["computer-mcp", "computer-cli"],
12023
+ toolset: "loop",
12024
+ run: forward("computer_runtime.run_keep")
12025
+ },
11955
12026
  {
11956
12027
  name: "computer_run_setup",
11957
12028
  title: "Run the declared setup",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.23.33",
3
+ "version": "0.23.35",
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",