instar 1.3.336 → 1.3.337
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/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +6 -5
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +25 -5
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.d.ts +46 -17
- package/dist/monitoring/ContextWedgeSentinel.d.ts.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.js +92 -30
- package/dist/monitoring/ContextWedgeSentinel.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +14 -3
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +63 -63
- package/upgrades/1.3.337.md +56 -0
- package/upgrades/aup-wedge-fresh-api.eli16.md +45 -0
- package/upgrades/side-effects/aup-wedge-fresh-api.md +83 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostUpdateMigrator.d.ts","sourceRoot":"","sources":["../../src/core/PostUpdateMigrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsCH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"PostUpdateMigrator.d.ts","sourceRoot":"","sources":["../../src/core/PostUpdateMigrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAsCH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAejC,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,kCAAkC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2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oF;IACpF,iCAAiC,IAAI,MAAM;IAI3C,6EAA6E;IAC7E,yBAAyB,IAAI,MAAM;IAInC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,2BAA2B;IAmFnC,OAAO,CAAC,mBAAmB;IAyd3B,OAAO,CAAC,wBAAwB;IAuJhC,OAAO,CAAC,2BAA2B;IAwEnC,OAAO,CAAC,yBAAyB;IA8IjC,OAAO,CAAC,2BAA2B;IAqKnC,OAAO,CAAC,qBAAqB;IAqS7B,OAAO,CAAC,uBAAuB;IAqJ/B,OAAO,CAAC,oBAAoB;IAgG5B,OAAO,CAAC,qBAAqB;IA8H7B,OAAO,CAAC,2BAA2B;IAoHnC,OAAO,CAAC,iCAAiC;IA6DzC,OAAO,CAAC,4BAA4B;IA0MpC;;;;;;;;;;OAUG;IACH;;;;;;;;;;;OAWG;IAEH,gBAAuB,iCAAiC,EAAE,WAAW,CAAC,MAAM,CAAC,CAgC1E;IAEH;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,8BAA8B;IAiHtC,OAAO,CAAC,uBAAuB;IAwC/B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,sBAAsB;IAwC9B,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,8BAA8B;IA6HtC,OAAO,CAAC,+BAA+B;IAuKvC,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,qBAAqB;IAqO7B,OAAO,CAAC,qBAAqB;IAwI7B,OAAO,CAAC,qBAAqB;IAyN7B,OAAO,CAAC,6BAA6B;IAkLrC,OAAO,CAAC,0BAA0B;IAgClC,OAAO,CAAC,gBAAgB;IAmJxB,OAAO,CAAC,6BAA6B;CAoCtC"}
|
|
@@ -47,6 +47,16 @@ import { detectCodexPath, detectTmuxPath } from './Config.js';
|
|
|
47
47
|
import { DegradationReporter } from '../monitoring/DegradationReporter.js';
|
|
48
48
|
import { MigratorStepEngine, } from './MigratorStepEngine.js';
|
|
49
49
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
50
|
+
/**
|
|
51
|
+
* CLAUDE.md note for the second wedge-signature family (2026-06-05 EXO
|
|
52
|
+
* incident) + the API fresh-respawn lever. Appended to NEW installs as part of
|
|
53
|
+
* the Stuck-Context Recovery section, and patched onto agents that already
|
|
54
|
+
* have the section. Marker for idempotency: 'AUP-rejection wedge'.
|
|
55
|
+
*/
|
|
56
|
+
const AUP_WEDGE_CLAUDE_MD_NOTE = `
|
|
57
|
+
- **AUP-rejection wedge (second signature, 2026-06-05):** a transcript that accumulates content tripping the API's Usage Policy classifier (e.g. literal red-team / prompt-injection test payloads from security-harness work) gets EVERY reply rejected with \`API Error: … appears to violate our Usage Policy\` — same permanent death, same fresh-respawn recovery. The sentinel requires the signature on MORE THAN ONE line (the loop always repeats; a benign one-off rejection doesn't). Prevention: keep literal adversarial payloads in files on disk and reference them by path — never paste them into a conversation.
|
|
58
|
+
- **Fresh respawn via API:** \`POST /sessions/refresh\` with \`{"sessionName":"<tmux-name>","fresh":true,"reason":"…"}\` kills + respawns WITHOUT \`--resume\` (clears the topic's resume UUID first). Use it when a transcript is poisoned — a normal refresh would re-wedge.
|
|
59
|
+
`;
|
|
50
60
|
export class PostUpdateMigrator {
|
|
51
61
|
config;
|
|
52
62
|
/**
|
|
@@ -3234,9 +3244,10 @@ A secret you give me on one machine — a Telegram token, an API key, a GitHub P
|
|
|
3234
3244
|
result.upgraded.push('CLAUDE.md: added secret-sync push-opt-in safety line');
|
|
3235
3245
|
}
|
|
3236
3246
|
// ContextWedgeSentinel — the 4th silently-stopped sentinel. Tells the agent
|
|
3237
|
-
// about the thinking-block
|
|
3238
|
-
// it, an agent asked "why did
|
|
3239
|
-
// the thinking-block error?"
|
|
3247
|
+
// about the transcript fast-fail wedges (thinking-block 400 + AUP-rejection
|
|
3248
|
+
// loop) + that auto-recovery is opt-in. Without it, an agent asked "why did
|
|
3249
|
+
// my session keep failing instantly / what is the thinking-block error?"
|
|
3250
|
+
// has no grounded answer. Idempotent via marker.
|
|
3240
3251
|
if (!content.includes('ContextWedgeSentinel') && !content.includes('Stuck-Context Recovery (thinking-block wedge)')) {
|
|
3241
3252
|
const section = `
|
|
3242
3253
|
## Stuck-Context Recovery (thinking-block wedge)
|
|
@@ -3248,13 +3259,22 @@ A nudge can't fix this (re-engaging re-sends the corrupted turn). Recovery is a
|
|
|
3248
3259
|
- **Detection + audit are default-ON housekeeping** — every transition (detected / recovered / dry-run / false-alarm / escalated) lands in \`logs/sentinel-events.jsonl\`; the user sees nothing.
|
|
3249
3260
|
- **Auto-recovery is OPT-IN** (it kills + respawns a session). It rides the Graduated Feature Rollout track and ships dark. Turn it on in \`.instar/config.json\`: \`{"monitoring": {"contextWedgeSentinel": {"autoRecovery": {"enabled": true, "dryRun": false}}}}\` (use \`dryRun: true\` first to log what it WOULD respawn). When OFF, a confirmed wedge escalates (gated by \`sentinelTelegramEscalation\`) so you can restart it yourself.
|
|
3250
3261
|
- If a user asks "why did my session keep failing / get stuck on a thinking error?" — read \`logs/sentinel-events.jsonl\` (filter \`context-wedge\`) and explain the above. Spec: \`docs/specs/context-wedge-sentinel.md\`.
|
|
3251
|
-
`;
|
|
3262
|
+
${AUP_WEDGE_CLAUDE_MD_NOTE}`;
|
|
3252
3263
|
content += '\n' + section;
|
|
3253
3264
|
patched = true;
|
|
3254
3265
|
result.upgraded.push('CLAUDE.md: added Stuck-Context Recovery section');
|
|
3255
3266
|
}
|
|
3267
|
+
else if (content.includes('ContextWedgeSentinel') && !content.includes('AUP-rejection wedge')) {
|
|
3268
|
+
// Agents that already got the Stuck-Context section predate the second
|
|
3269
|
+
// signature family (the 2026-06-05 EXO AUP-rejection incident). Append
|
|
3270
|
+
// the note so they know about it + the API fresh-respawn lever.
|
|
3271
|
+
// Idempotent via the 'AUP-rejection wedge' marker.
|
|
3272
|
+
content += '\n' + AUP_WEDGE_CLAUDE_MD_NOTE;
|
|
3273
|
+
patched = true;
|
|
3274
|
+
result.upgraded.push('CLAUDE.md: added AUP-rejection wedge + fresh-respawn API note');
|
|
3275
|
+
}
|
|
3256
3276
|
else {
|
|
3257
|
-
result.skipped.push('CLAUDE.md: Stuck-Context Recovery section already
|
|
3277
|
+
result.skipped.push('CLAUDE.md: Stuck-Context Recovery section already current');
|
|
3258
3278
|
}
|
|
3259
3279
|
// Reap-log (UNIFIED-SESSION-LIFECYCLE §P4) — tells the agent the durable
|
|
3260
3280
|
// "why did my session vanish?" answer exists and where to read it. Without
|