instar 1.3.341 → 1.3.343

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA06RtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAy9RtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -3733,6 +3733,51 @@ export async function startServer(options) {
3733
3733
  catch (err) {
3734
3734
  console.log(pc.yellow(` Worktree detector: skipped (${err instanceof Error ? err.message : String(err)})`));
3735
3735
  }
3736
+ // GuardPostureTripwire — a disabled guard is itself an incident.
3737
+ // Runs once per server boot. Compares the resolved guard posture (every
3738
+ // monitoring.* enabled flag + scheduler.enabled) against the persisted
3739
+ // posture from the previous boot; any enabled→disabled transition gets a
3740
+ // loud log line + a logs/guard-posture.jsonl breadcrumb + ONE aggregated
3741
+ // HIGH Attention item (the 2026-06-05 meltdown load-shed batch-flipped
3742
+ // five guards off and only the scheduler was noticed — issue #882 / the
3743
+ // EXO AUP-wedge evening). Signal-only: never re-enables, never blocks a
3744
+ // boot. Placement mirrors the worktree detector above: after the
3745
+ // Telegram setup blocks so `telegram.createAttentionItem` is available.
3746
+ try {
3747
+ const tripwire = await import('../monitoring/GuardPostureTripwire.js');
3748
+ const postureResult = await tripwire.runGuardPostureTripwire({
3749
+ config,
3750
+ stateDir: config.stateDir,
3751
+ logsDir: path.join(config.stateDir, '..', 'logs'),
3752
+ emitAttention: telegram
3753
+ ? async (item) => {
3754
+ await telegram.createAttentionItem({
3755
+ id: item.id,
3756
+ title: item.title,
3757
+ summary: item.summary,
3758
+ description: item.description,
3759
+ category: item.category,
3760
+ priority: item.priority,
3761
+ sourceContext: item.sourceContext,
3762
+ });
3763
+ }
3764
+ : undefined,
3765
+ });
3766
+ if (postureResult.disabled.length > 0) {
3767
+ console.log(pc.yellow(` Guard-posture tripwire: ${postureResult.disabled.length} guard(s) DISABLED since last boot ` +
3768
+ `(${postureResult.disabled.join(', ')}) — ` +
3769
+ `${postureResult.attentionEmitted ? 'Attention item raised' : 'breadcrumb only (no Telegram)'}`));
3770
+ }
3771
+ else if (postureResult.firstBoot) {
3772
+ console.log(pc.green(' Guard-posture tripwire: baseline recorded'));
3773
+ }
3774
+ else {
3775
+ console.log(pc.green(' Guard-posture tripwire: posture unchanged'));
3776
+ }
3777
+ }
3778
+ catch (err) {
3779
+ console.log(pc.yellow(` Guard-posture tripwire: skipped (${err instanceof Error ? err.message : String(err)})`));
3780
+ }
3736
3781
  // ArcCheck (Layer 3) — declared at outer scope so the instance built inside
3737
3782
  // the telegram block is visible at AgentServer construction below. The same
3738
3783
  // instance backs the HTTP route and the in-process checkOutboundMessage caller.