@arcforge/kernel 2.0.125 → 2.0.126

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/package.json +8 -8
  2. package/src/scope.ts +15 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcforge/kernel",
3
- "version": "2.0.125",
3
+ "version": "2.0.126",
4
4
  "description": "The Axon kernel — ring 0. Owns resources and execution, enforces policy, and is the only constructor of the unprivileged capsule.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -15,13 +15,13 @@
15
15
  "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"
16
16
  },
17
17
  "dependencies": {
18
- "@arcforge/air": "2.0.125",
19
- "@arcforge/engines": "2.0.125",
20
- "@arcforge/err": "2.0.125",
21
- "@arcforge/session": "2.0.125",
22
- "@arcforge/types": "2.0.125",
23
- "@arclabs/cloud": "2.0.125",
24
- "@axon/capsule": "2.0.125"
18
+ "@arcforge/air": "2.0.126",
19
+ "@arcforge/engines": "2.0.126",
20
+ "@arcforge/err": "2.0.126",
21
+ "@arcforge/session": "2.0.126",
22
+ "@arcforge/types": "2.0.126",
23
+ "@arclabs/cloud": "2.0.126",
24
+ "@axon/capsule": "2.0.126"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/bun": "latest",
package/src/scope.ts CHANGED
@@ -81,9 +81,23 @@ export function toScope(blueprint: AxonBlueprint): AxonScope {
81
81
  if (members.length > 0) modules.push({ ...module, members })
82
82
  }
83
83
 
84
+ // A module that loaded without part of its surface. Read from the
85
+ // blueprint rather than inferred from missing tools: "has no tools" and
86
+ // "its tools would not compile" are different facts, and only the second
87
+ // is worth telling the model about.
88
+ //
89
+ // `modules` is optional on a partial blueprint — a programmatic one built
90
+ // from tools alone has none — so this must not assume the array exists.
91
+ const unavailable = (blueprint.modules ?? [])
92
+ .filter(module => module.degraded)
93
+ .map(module => ({ name: module.packageName ?? module.name, reason: module.degraded! }))
94
+
84
95
  // Restore blueprint order: the filtering above needs agent-first, but the
85
96
  // rendered scope should read in the order the blueprint declares.
86
- return { modules: modules.sort((a, b) => order(loadable, a) - order(loadable, b)) }
97
+ return {
98
+ modules: modules.sort((a, b) => order(loadable, a) - order(loadable, b)),
99
+ ...(unavailable.length > 0 ? { unavailable } : {}),
100
+ }
87
101
  }
88
102
 
89
103
  /** Agent-authored tools outrank module tools when both claim a callable name. */