instar 1.3.1221 → 1.3.1223

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 (67) hide show
  1. package/dist/core/CodexDeliveryObserver.d.ts.map +1 -1
  2. package/dist/core/CodexDeliveryObserver.js +8 -8
  3. package/dist/core/CodexDeliveryObserver.js.map +1 -1
  4. package/dist/core/InboundDeliveryStore.d.ts.map +1 -1
  5. package/dist/core/InboundDeliveryStore.js +10 -2
  6. package/dist/core/InboundDeliveryStore.js.map +1 -1
  7. package/dist/core/ModelTierEscalation.d.ts +1 -1
  8. package/dist/core/ModelTierEscalation.d.ts.map +1 -1
  9. package/dist/core/ModelTierEscalation.js +10 -2
  10. package/dist/core/ModelTierEscalation.js.map +1 -1
  11. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  12. package/dist/core/PostUpdateMigrator.js +5 -0
  13. package/dist/core/PostUpdateMigrator.js.map +1 -1
  14. package/dist/core/SessionManager.d.ts.map +1 -1
  15. package/dist/core/SessionManager.js +13 -0
  16. package/dist/core/SessionManager.js.map +1 -1
  17. package/dist/core/StuckInputSentinel.d.ts.map +1 -1
  18. package/dist/core/StuckInputSentinel.js +16 -3
  19. package/dist/core/StuckInputSentinel.js.map +1 -1
  20. package/dist/core/topicProfileValidation.d.ts +2 -2
  21. package/dist/core/topicProfileValidation.js +3 -3
  22. package/dist/core/topicProfileValidation.js.map +1 -1
  23. package/dist/data/codexStageBReleaseEvidence.d.ts.map +1 -1
  24. package/dist/data/codexStageBReleaseEvidence.js +13 -12
  25. package/dist/data/codexStageBReleaseEvidence.js.map +1 -1
  26. package/dist/data/stageBCertifiedSet.d.ts +7 -7
  27. package/dist/data/stageBCertifiedSet.js +7 -7
  28. package/dist/data/stageBCertifiedSet.js.map +1 -1
  29. package/dist/data/standards-guard-index.json +1 -1
  30. package/dist/data/standards-guard-index.meta.json +2 -2
  31. package/dist/data/standards-registry.meta.json +1 -1
  32. package/dist/lifeline/MessageQueue.d.ts +3 -0
  33. package/dist/lifeline/MessageQueue.d.ts.map +1 -1
  34. package/dist/lifeline/MessageQueue.js.map +1 -1
  35. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
  36. package/dist/lifeline/TelegramLifeline.js +34 -14
  37. package/dist/lifeline/TelegramLifeline.js.map +1 -1
  38. package/dist/lifeline/queueDeliveryNotice.d.ts +14 -0
  39. package/dist/lifeline/queueDeliveryNotice.d.ts.map +1 -0
  40. package/dist/lifeline/queueDeliveryNotice.js +31 -0
  41. package/dist/lifeline/queueDeliveryNotice.js.map +1 -0
  42. package/dist/monitoring/SessionWatchdog.d.ts +24 -1
  43. package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
  44. package/dist/monitoring/SessionWatchdog.js +107 -19
  45. package/dist/monitoring/SessionWatchdog.js.map +1 -1
  46. package/dist/scaffold/templates.js +1 -1
  47. package/dist/server/routes.d.ts +14 -0
  48. package/dist/server/routes.d.ts.map +1 -1
  49. package/dist/server/routes.js +33 -8
  50. package/dist/server/routes.js.map +1 -1
  51. package/package.json +1 -1
  52. package/scripts/model-registry-freshness.manifest.json +1 -1
  53. package/src/data/builtin-manifest.json +65 -65
  54. package/src/data/codexStageBReleaseEvidence.ts +13 -12
  55. package/src/data/stageBCertifiedSet.ts +7 -7
  56. package/src/data/standards-guard-index.json +1 -1
  57. package/src/data/standards-guard-index.meta.json +2 -2
  58. package/src/data/standards-registry.meta.json +1 -1
  59. package/src/scaffold/templates.ts +1 -1
  60. package/upgrades/1.3.1222.md +72 -0
  61. package/upgrades/1.3.1223.md +50 -0
  62. package/upgrades/inbound-delivery-unknown-terminalization.eli16.md +36 -0
  63. package/upgrades/side-effects/codex-gpt6-astra-allowlist.md +299 -0
  64. package/upgrades/side-effects/codex-observer-bounded-backlog.md +84 -0
  65. package/upgrades/side-effects/codex-test-worker-control-plane.md +86 -0
  66. package/upgrades/side-effects/inbound-delivery-unknown-terminalization.md +82 -0
  67. package/upgrades/side-effects/stage-b-evidence-code-binding.md +1 -0
@@ -50,6 +50,30 @@ import os from 'node:os';
50
50
  import path from 'node:path';
51
51
  import { MoneyLayerRefusal, MONEY_LAYER_LIMIT_DEFAULTS } from '../core/MoneyLayerEnableSurface.js';
52
52
  import { KNOWN_CLAUDE_MODEL_IDS, KNOWN_MODEL_IDS, escalatedModelIds, normalizeTierEscalationConfig, } from '../core/ModelTierEscalation.js';
53
+ /**
54
+ * Generic tiers accepted for EVERY framework; they resolve per-framework inside
55
+ * buildHeadlessLaunch.
56
+ */
57
+ const GENERIC_TIERS = ['fast', 'balanced', 'capable'];
58
+ /**
59
+ * The model ids `POST /sessions/spawn` accepts for a framework — the generic
60
+ * tiers plus that framework's canonical per-framework enum.
61
+ *
62
+ * EXPORTED so a test can observe THE ROUTE'S OWN accepted set rather than
63
+ * re-deriving it from the enum. codex used to have its own arm here reading a
64
+ * hand-typed duplicate of KNOWN_CODEX_MODEL_IDS, "kept in lockstep" by comment
65
+ * only. A test that read the enum could not see the route drift away from it:
66
+ * re-splitting the route to drop 6 of 9 codex ids left the suite green
67
+ * (second-pass review negative control, 2026-09-05). Reading this function is
68
+ * what lets a test prove the spawn route and the pin validator accept the same
69
+ * ids — assert against the enum instead and the guard is blind to its subject.
70
+ */
71
+ export function spawnModelAllowlist(framework) {
72
+ return [
73
+ ...GENERIC_TIERS,
74
+ ...(KNOWN_MODEL_IDS[framework] ?? KNOWN_CLAUDE_MODEL_IDS),
75
+ ];
76
+ }
53
77
  /** Validate a decision-quality join key carried back by an advisory client. */
54
78
  export function isPlausibleDecisionRef(ref) {
55
79
  // Router ids are `d-<machineId8>-<uuid>` on a mesh member and `d-<uuid>`
@@ -9055,7 +9079,6 @@ export function createRoutes(ctx) {
9055
9079
  // Generic tiers ('fast'|'balanced'|'capable') are universally accepted
9056
9080
  // and resolve per-framework inside buildHeadlessLaunch. Framework-
9057
9081
  // specific names are accepted when they match the framework slot.
9058
- const GENERIC_TIERS = ['fast', 'balanced', 'capable'];
9059
9082
  // E2E-PAIRING: EXEMPT — extends an existing model allowlist on the
9060
9083
  // already-live spawn route. No new route, no route-aliveness change, no
9061
9084
  // 503 surface; route-create E2E coverage is unchanged by extending the
@@ -9064,10 +9087,6 @@ export function createRoutes(ctx) {
9064
9087
  // enum from ModelTierEscalation.ts — includes the concrete model ids
9065
9088
  // (claude-fable-5, claude-opus-4-8, …) AND the CLI tier aliases
9066
9089
  // (opus/sonnet/haiku), so instar can natively spawn Fable sessions.
9067
- // Mirror of KNOWN_CODEX_MODEL_IDS (ModelTierEscalation.ts) — keep in lockstep.
9068
- // GPT-5.6 family GA on the codex subscription 2026-07-09 (codex CLI >= 0.144.0);
9069
- // -pro variants deliberately excluded (plan-gated + pricier, future follow-up).
9070
- const CODEX_MODELS_SUBSCRIPTION = ['gpt-5.2', 'gpt-5.3-codex', 'gpt-5.4', 'gpt-5.4-mini', 'gpt-5.5', 'gpt-5.6-sol', 'gpt-5.6-terra', 'gpt-5.6-luna'];
9071
9090
  if (model !== undefined) {
9072
9091
  if (typeof model !== 'string') {
9073
9092
  res.status(400).json({ error: '"model" must be a string' });
@@ -9081,9 +9100,15 @@ export function createRoutes(ctx) {
9081
9100
  // subscription-only list; every other framework now reads the canonical
9082
9101
  // per-framework map, which is an exhaustive Record over the union and so
9083
9102
  // cannot silently omit the next framework the way a chain does.
9084
- const allowed = requestedFramework === 'codex-cli'
9085
- ? [...GENERIC_TIERS, ...CODEX_MODELS_SUBSCRIPTION]
9086
- : [...GENERIC_TIERS, ...(KNOWN_MODEL_IDS[requestedFramework] ?? KNOWN_CLAUDE_MODEL_IDS)];
9103
+ // codex no longer needs its own arm: KNOWN_MODEL_IDS['codex-cli'] IS
9104
+ // KNOWN_CODEX_MODEL_IDS, so the general arm yields the identical list.
9105
+ // The codex arm used to read a hand-maintained duplicate of that list,
9106
+ // "kept in lockstep" by comment only — nothing enforced it, so a model
9107
+ // added to one and not the other made a spawn-accepted / pin-refused
9108
+ // split (found 2026-09-05 adding gpt-6-astra). Deleting the special case
9109
+ // removes the drift class rather than documenting it; spawnModelAllowlist
9110
+ // is exported so a test can observe THIS list, not a re-derivation of it.
9111
+ const allowed = spawnModelAllowlist(requestedFramework);
9087
9112
  if (!allowed.includes(model)) {
9088
9113
  res.status(400).json({
9089
9114
  error: `"model" must be one of: ${allowed.join(', ')} (framework: ${requestedFramework})`,