@lambdacurry/arbor 0.14.5 → 0.14.6

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 +59 -3
  2. package/package.json +1 -1
package/dist/arbor.js CHANGED
@@ -1908,6 +1908,7 @@ var appBundles = sqliteTable("app_bundles", {
1908
1908
  }).$type(),
1909
1909
  runtimeEntrypoint: text("runtime_entrypoint").$type().notNull(),
1910
1910
  capabilityRequirements: text("capability_requirements", { mode: "json" }).$type().notNull().default([]),
1911
+ runtimeConfigRequirements: text("runtime_config_requirements", { mode: "json" }).$type().notNull().default([]),
1911
1912
  stateSchemaVersion: integer("state_schema_version").notNull().default(0),
1912
1913
  stateCompatibleFrom: integer("state_compatible_from").notNull().default(0),
1913
1914
  stateCompatibleThrough: integer("state_compatible_through").notNull().default(0),
@@ -1974,6 +1975,22 @@ var secretBindings = sqliteTable("secret_bindings", {
1974
1975
  appNameUq: uniqueIndex("secret_bindings_app_name_uq").on(t.appId, t.bindingName),
1975
1976
  secretIdx: index("secret_bindings_secret_idx").on(t.secretId, t.status)
1976
1977
  }));
1978
+ var appRuntimeVars = sqliteTable("app_runtime_vars", {
1979
+ id: text("id").primaryKey(),
1980
+ appId: text("app_id").notNull().references(() => apps.id),
1981
+ name: text("name").notNull(),
1982
+ value: text("value").notNull(),
1983
+ revision: integer("revision").notNull().default(1),
1984
+ createdByProfileId: text("created_by_profile_id").notNull().references(() => profiles.id),
1985
+ createdExecutionContextId: text("created_execution_context_id").notNull().references(() => executionContexts.id),
1986
+ createdAt: ts("created_at").notNull(),
1987
+ updatedByProfileId: text("updated_by_profile_id").notNull().references(() => profiles.id),
1988
+ updatedExecutionContextId: text("updated_execution_context_id").notNull().references(() => executionContexts.id),
1989
+ updatedAt: ts("updated_at").notNull()
1990
+ }, (t) => ({
1991
+ appNameUq: uniqueIndex("app_runtime_vars_app_name_uq").on(t.appId, t.name),
1992
+ appIdx: index("app_runtime_vars_app_idx").on(t.appId)
1993
+ }));
1977
1994
  var appDeployments = sqliteTable("app_deployments", {
1978
1995
  id: text("id").primaryKey(),
1979
1996
  appId: text("app_id").notNull().references(() => apps.id),
@@ -17203,6 +17220,7 @@ var MCP_OUTPUT_SCHEMAS = {
17203
17220
  app_fetch: appInvocationResponse,
17204
17221
  app_request: appInvocationResponse,
17205
17222
  app_create: app2,
17223
+ app_config_apply: exports_external.object({ appId: id, dryRun: exports_external.boolean(), changes: exports_external.array(jsonObject) }),
17206
17224
  app_deploy: exports_external.looseObject({
17207
17225
  deployment,
17208
17226
  activated: exports_external.boolean(),
@@ -17487,6 +17505,7 @@ var MCP_TOOL_ANNOTATIONS = {
17487
17505
  app_fetch: readOnly,
17488
17506
  app_request: destructive,
17489
17507
  app_create: additive,
17508
+ app_config_apply: idempotent,
17490
17509
  app_deploy: idempotent,
17491
17510
  app_activate: additive,
17492
17511
  app_rollback: additive,
@@ -18057,6 +18076,7 @@ var ACTION_DEFINITIONS = [
18057
18076
  stateSchemaVersion: exports_external.number().int().min(0).optional().describe("durable schema this release writes; default 0"),
18058
18077
  stateCompatibleFrom: exports_external.number().int().min(0).optional().describe("oldest durable schema this code can open"),
18059
18078
  stateCompatibleThrough: exports_external.number().int().min(0).optional().describe("newest durable schema this code can open"),
18079
+ runtimeConfigRequirements: exports_external.array(exports_external.object({ name: exports_external.string().min(1).max(64), kind: exports_external.enum(["var", "secret"]) })).optional().describe("required runtime config keys and kinds; values are never part of the AppBundle"),
18060
18080
  idempotencyKey: exports_external.string().min(1).max(200).describe("stable key for this one logical bundle publication")
18061
18081
  },
18062
18082
  surfaces: ["computer-mcp", "computer-cli"],
@@ -19287,6 +19307,22 @@ var ACTION_DEFINITIONS = [
19287
19307
  toolset: "apps",
19288
19308
  run: forward("app.create")
19289
19309
  },
19310
+ {
19311
+ name: "app_config_apply",
19312
+ title: "Apply App runtime config",
19313
+ description: "Declaratively apply the complete typed runtime config for one App. var stores an ordinary runtime value; secret references an existing Arbor Secret without accepting or returning secret material. Dry-run performs the same validation and returns create/update/delete/no-op actions without mutating.",
19314
+ inputSchema: {
19315
+ appId: exports_external.string().describe("target App, app_…"),
19316
+ config: exports_external.record(exports_external.string(), exports_external.discriminatedUnion("kind", [
19317
+ exports_external.object({ kind: exports_external.literal("var"), value: exports_external.string().max(16384) }),
19318
+ exports_external.object({ kind: exports_external.literal("secret"), secretId: exports_external.string() })
19319
+ ])).describe("complete desired runtime config object keyed by environment variable name"),
19320
+ dryRun: exports_external.boolean().optional().describe("validate and plan without mutating")
19321
+ },
19322
+ surfaces: ["mcp", "cli"],
19323
+ toolset: "apps",
19324
+ run: forward("app.config_apply")
19325
+ },
19290
19326
  {
19291
19327
  name: "app_deploy",
19292
19328
  title: "Prepare an App deployment",
@@ -19842,6 +19878,9 @@ function kindOf(node) {
19842
19878
  return "array";
19843
19879
  case "boolean":
19844
19880
  return "boolean";
19881
+ case "object":
19882
+ case "record":
19883
+ return "json";
19845
19884
  default:
19846
19885
  return "string";
19847
19886
  }
@@ -19850,7 +19889,7 @@ function acceptedFlags(inputSchema) {
19850
19889
  const out = new Set;
19851
19890
  for (const spec of flagsForSchema(inputSchema)) {
19852
19891
  out.add(spec.flag);
19853
- if (spec.kind === "string")
19892
+ if (spec.kind === "string" || spec.kind === "json")
19854
19893
  out.add(`${spec.flag}-file`);
19855
19894
  }
19856
19895
  return out;
@@ -19886,7 +19925,7 @@ function buildInput(inputSchema, flags, command) {
19886
19925
  const primary = primaryPositionalField(inputSchema);
19887
19926
  const input = {};
19888
19927
  for (const spec of flagsForSchema(inputSchema)) {
19889
- if (spec.kind === "string") {
19928
+ if (spec.kind === "string" || spec.kind === "json") {
19890
19929
  const fileSrc = lastValue(flags[`${spec.flag}-file`]);
19891
19930
  if (fileSrc !== undefined) {
19892
19931
  if (flags[spec.flag] !== undefined) {
@@ -19894,7 +19933,16 @@ function buildInput(inputSchema, flags, command) {
19894
19933
  }
19895
19934
  if (fileSrc === true)
19896
19935
  throw new UsageError(`--${spec.flag}-file expects a path (or - for stdin)`);
19897
- input[spec.field] = readTextSource(String(fileSrc));
19936
+ const sourced = readTextSource(String(fileSrc));
19937
+ if (spec.kind === "json") {
19938
+ try {
19939
+ input[spec.field] = JSON.parse(sourced);
19940
+ } catch {
19941
+ throw new UsageError(`--${spec.flag}-file must contain valid JSON`);
19942
+ }
19943
+ } else {
19944
+ input[spec.field] = sourced;
19945
+ }
19898
19946
  continue;
19899
19947
  }
19900
19948
  }
@@ -19958,6 +20006,14 @@ function buildInput(inputSchema, flags, command) {
19958
20006
  input[spec.field] = out;
19959
20007
  break;
19960
20008
  }
20009
+ case "json": {
20010
+ try {
20011
+ input[spec.field] = JSON.parse(String(lastValue(raw)));
20012
+ } catch {
20013
+ throw new UsageError(`--${spec.flag} must be valid JSON`);
20014
+ }
20015
+ break;
20016
+ }
19961
20017
  case "boolean": {
19962
20018
  const v = lastValue(raw);
19963
20019
  input[spec.field] = v === true ? true : v !== "false";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdacurry/arbor",
3
- "version": "0.14.5",
3
+ "version": "0.14.6",
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",