@arcforge/platform 2.0.192 → 2.0.194

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcforge/platform",
3
- "version": "2.0.192",
3
+ "version": "2.0.194",
4
4
  "description": "The Axon developer platform — headless project discovery, blueprint scanning, typegen, agent lifecycle, registry, benches and tests. Shared by the CLI/TUI and the Fleet extension.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -44,20 +44,20 @@
44
44
  "deploy": "echo \"This package is published ONLY by apps/tui/scripts/release.ts, which pins workspace:* deps to concrete versions first. Publishing it directly ships an unresolvable dependency.\" && exit 1"
45
45
  },
46
46
  "dependencies": {
47
- "@arcforge/session": "2.0.192",
48
- "@arcforge/engines": "2.0.192",
49
- "@arcforge/err": "2.0.192",
50
- "@arcforge/types": "2.0.192",
51
- "@arcforge/cloud": "2.0.192",
52
- "@arcforge/capsule": "2.0.192",
53
- "@arcforge/core": "2.0.192",
54
- "@arcforge/vstr": "2.0.192",
47
+ "@arcforge/session": "2.0.194",
48
+ "@arcforge/engines": "2.0.194",
49
+ "@arcforge/err": "2.0.194",
50
+ "@arcforge/types": "2.0.194",
51
+ "@arcforge/cloud": "2.0.194",
52
+ "@arcforge/capsule": "2.0.194",
53
+ "@arcforge/core": "2.0.194",
54
+ "@arcforge/vstr": "2.0.194",
55
55
  "fft.js": "^4.0.4",
56
56
  "h3": "^1.15.11",
57
57
  "semver": "^7.7.4",
58
58
  "sharp": "^0.35.3",
59
59
  "typescript": "5.9.2",
60
- "@arcforge/link": "2.0.192"
60
+ "@arcforge/link": "2.0.194"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@arcforge/air": "2.0.187",
@@ -2,7 +2,6 @@ import { randomUUID } from "node:crypto"
2
2
  import { join, resolve } from "node:path"
3
3
  import { Axon } from "@arcforge/core"
4
4
  import type { AxonHost, AxonT } from "@arcforge/core"
5
- import type { AxonEscalate } from "@arcforge/types"
6
5
  import type { AxonBlueprint, AxonPartialBlueprint, SupervisorToAgent } from "@arcforge/types"
7
6
  import type { AxonSessionT } from "@arcforge/session"
8
7
  import { err } from "@arcforge/err"
@@ -29,15 +28,6 @@ type AgentOpts = {
29
28
  session?: string
30
29
  /** Platform-owned services exposed to this instance's capsule. */
31
30
  host?: AxonHost
32
- /**
33
- * The platform's policy decider, bound to THIS agent.
34
- *
35
- * Bound rather than generic because a grant is written against an agent
36
- * name, and the decider has no way to know which agent raised a call — the
37
- * capsule only reports the fn and its arguments. Runtime() closes over the
38
- * name when it builds this.
39
- */
40
- escalate?: AxonEscalate
41
31
  parentSessionId?: string | null
42
32
  rootSessionId?: string
43
33
  depth?: number
@@ -460,23 +460,6 @@ export function Instances(opts: InstancesOpts) {
460
460
  store: opts.store,
461
461
  cwd: opts.cwd,
462
462
  host: opts.host,
463
- // Bound to THIS agent's name, because a grant is written against
464
- // one and the capsule only ever reports the fn and its arguments —
465
- // it has no idea which agent it belongs to. Closed over here,
466
- // where both the project and the decider are in scope.
467
- ...(opts.escalations
468
- ? {
469
- // The session id is read at CALL time, not closed over:
470
- // the agent that owns it does not exist yet at this point
471
- // in construction, and a reload can replace the runtime
472
- // underneath. Reading through the handle is what keeps a
473
- // request naming the session it was actually raised in.
474
- escalate: (call: EscalationCall) => opts.escalations!.decide(
475
- { agent: project.name, sessionId: agent.sessionId },
476
- call,
477
- ),
478
- }
479
- : {}),
480
463
  parentSessionId: lineage?.parentSessionId ?? null,
481
464
  ...(lineage ? { rootSessionId: lineage.rootSessionId } : {}),
482
465
  depth: lineage?.depth ?? 0,
@@ -193,10 +193,26 @@ export async function main(): Promise<void> {
193
193
  runtime = await Axon({
194
194
  blueprint,
195
195
  bus,
196
- // The two facts that make this runtime confined:
197
- // remote — inference crosses the link, so no credential is here
198
- // (tools then load in this heap, see Axon())
196
+ // The three facts that make this runtime confined:
197
+ // remote — inference crosses the link, so no credential is here
198
+ // (tools then load in this heap, see Axon())
199
+ // escalate — the DECIDER stays outside; this asks over a verb
199
200
  remote: role => RemoteDriver({ role, supervisor }),
201
+ /*
202
+ * Ask the supervisor, which asks the person.
203
+ *
204
+ * Without this the agent's kernel had no decider at all, so
205
+ * `headless()` was true inside every confined agent and each
206
+ * escalation was refused before it was ever raised — the TUI
207
+ * reporting "needs approval, and nothing was listening" while the
208
+ * user sat in front of it. The verb, the supervisor-side handler
209
+ * and the decider all existed; nothing called this.
210
+ *
211
+ * A CALL, not the callback itself: what crosses into the box is the
212
+ * ability to ask, never the ability to answer. A program that held
213
+ * the decider could raise and settle its own escalations.
214
+ */
215
+ escalate: async call => (await supervisor.escalate(call)).allow,
200
216
  })
201
217
  } catch (cause) {
202
218
  const failure = err(cause)