@arcforge/kernel 2.0.179 → 2.0.180

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/engine.ts +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcforge/kernel",
3
- "version": "2.0.179",
3
+ "version": "2.0.180",
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.179",
19
- "@arcforge/engines": "2.0.179",
20
- "@arcforge/err": "2.0.179",
21
- "@arcforge/session": "2.0.179",
22
- "@arcforge/types": "2.0.179",
23
- "@arcforge/cloud": "2.0.179",
24
- "@arcforge/capsule": "2.0.179"
18
+ "@arcforge/air": "2.0.180",
19
+ "@arcforge/engines": "2.0.180",
20
+ "@arcforge/err": "2.0.180",
21
+ "@arcforge/session": "2.0.180",
22
+ "@arcforge/types": "2.0.180",
23
+ "@arcforge/cloud": "2.0.180",
24
+ "@arcforge/capsule": "2.0.180"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/bun": "latest",
package/src/engine.ts CHANGED
@@ -1151,7 +1151,18 @@ export function Engine(opts: EngineOpts) {
1151
1151
  // the difference between a diagnostic and a contradiction. The
1152
1152
  // model sent a `<script>`; telling it that it sent no script —
1153
1153
  // while quoting the script — leaves it nothing to correct.
1154
- if (violations.length === 0 && !spoke && !acted && truncated) {
1154
+ // NOT gated on `!spoke`. A truncated block is malformed whether or
1155
+ // not anything reached the screen, and text streams as it arrives —
1156
+ // so `spoke` is already true by the time the missing `</text>` is
1157
+ // known. Gating on it meant a truncated TEXT was always accepted
1158
+ // (only a truncated script, which streams nothing, was ever
1159
+ // caught), and any `<done/>` swallowed inside the unclosed block
1160
+ // ended the turn: a long answer stopping mid-sentence, with the tag
1161
+ // sitting in the prose.
1162
+ //
1163
+ // `!acted` stays: a reply that ran a script has committed a real
1164
+ // side effect, and re-requesting it would run that script twice.
1165
+ if (violations.length === 0 && !acted && truncated) {
1155
1166
  lastFault = describeTruncatedBlock(truncated, step.value?.text)
1156
1167
  lastFailure = "empty"
1157
1168
  await opts.fault({ code: "OUTPUT_TRUNCATED", message: lastFault, rejected: step.value?.text, attempt: attempt + 1 })