instar 1.3.905 → 1.3.907

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 (101) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +140 -6
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  5. package/dist/config/ConfigDefaults.js +20 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/core/MessagingToneGate.d.ts.map +1 -1
  8. package/dist/core/MessagingToneGate.js +21 -0
  9. package/dist/core/MessagingToneGate.js.map +1 -1
  10. package/dist/core/PostUpdateMigrator.d.ts +22 -0
  11. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  12. package/dist/core/PostUpdateMigrator.js +70 -0
  13. package/dist/core/PostUpdateMigrator.js.map +1 -1
  14. package/dist/core/ProactiveSwapMonitor.d.ts +4 -0
  15. package/dist/core/ProactiveSwapMonitor.d.ts.map +1 -1
  16. package/dist/core/ProactiveSwapMonitor.js +17 -8
  17. package/dist/core/ProactiveSwapMonitor.js.map +1 -1
  18. package/dist/core/QuotaAwareScheduler.d.ts +3 -1
  19. package/dist/core/QuotaAwareScheduler.d.ts.map +1 -1
  20. package/dist/core/QuotaAwareScheduler.js +5 -4
  21. package/dist/core/QuotaAwareScheduler.js.map +1 -1
  22. package/dist/core/SessionManager.d.ts +19 -0
  23. package/dist/core/SessionManager.d.ts.map +1 -1
  24. package/dist/core/SessionManager.js +33 -0
  25. package/dist/core/SessionManager.js.map +1 -1
  26. package/dist/core/SessionPoolFailoverRunner.d.ts +94 -0
  27. package/dist/core/SessionPoolFailoverRunner.d.ts.map +1 -0
  28. package/dist/core/SessionPoolFailoverRunner.js +89 -0
  29. package/dist/core/SessionPoolFailoverRunner.js.map +1 -0
  30. package/dist/core/SessionPoolRolloutDriver.d.ts +74 -0
  31. package/dist/core/SessionPoolRolloutDriver.d.ts.map +1 -0
  32. package/dist/core/SessionPoolRolloutDriver.js +78 -0
  33. package/dist/core/SessionPoolRolloutDriver.js.map +1 -0
  34. package/dist/core/SessionRefresh.d.ts +3 -0
  35. package/dist/core/SessionRefresh.d.ts.map +1 -1
  36. package/dist/core/SessionRefresh.js +19 -0
  37. package/dist/core/SessionRefresh.js.map +1 -1
  38. package/dist/core/SwapAntiThrash.d.ts +1 -0
  39. package/dist/core/SwapAntiThrash.d.ts.map +1 -1
  40. package/dist/core/SwapAntiThrash.js +9 -5
  41. package/dist/core/SwapAntiThrash.js.map +1 -1
  42. package/dist/core/SwapLedger.d.ts +2 -0
  43. package/dist/core/SwapLedger.d.ts.map +1 -1
  44. package/dist/core/SwapLedger.js.map +1 -1
  45. package/dist/core/deferral-floor.d.ts +50 -0
  46. package/dist/core/deferral-floor.d.ts.map +1 -0
  47. package/dist/core/deferral-floor.js +169 -0
  48. package/dist/core/deferral-floor.js.map +1 -0
  49. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  50. package/dist/core/devGatedFeatures.js +12 -0
  51. package/dist/core/devGatedFeatures.js.map +1 -1
  52. package/dist/core/sessionPoolFailoverCheck.d.ts +67 -0
  53. package/dist/core/sessionPoolFailoverCheck.d.ts.map +1 -0
  54. package/dist/core/sessionPoolFailoverCheck.js +57 -0
  55. package/dist/core/sessionPoolFailoverCheck.js.map +1 -0
  56. package/dist/core/types.d.ts +33 -0
  57. package/dist/core/types.d.ts.map +1 -1
  58. package/dist/core/types.js.map +1 -1
  59. package/dist/messaging/slack/SlackAdapter.d.ts +3 -0
  60. package/dist/messaging/slack/SlackAdapter.d.ts.map +1 -1
  61. package/dist/messaging/slack/SlackAdapter.js +18 -0
  62. package/dist/messaging/slack/SlackAdapter.js.map +1 -1
  63. package/dist/monitoring/BlockerLifecycleService.d.ts.map +1 -1
  64. package/dist/monitoring/BlockerLifecycleService.js +11 -5
  65. package/dist/monitoring/BlockerLifecycleService.js.map +1 -1
  66. package/dist/monitoring/MissingLoginSessionDetector.d.ts +159 -0
  67. package/dist/monitoring/MissingLoginSessionDetector.d.ts.map +1 -0
  68. package/dist/monitoring/MissingLoginSessionDetector.js +166 -0
  69. package/dist/monitoring/MissingLoginSessionDetector.js.map +1 -0
  70. package/dist/monitoring/SingleMachineFailoverGapDetector.d.ts +144 -0
  71. package/dist/monitoring/SingleMachineFailoverGapDetector.d.ts.map +1 -0
  72. package/dist/monitoring/SingleMachineFailoverGapDetector.js +152 -0
  73. package/dist/monitoring/SingleMachineFailoverGapDetector.js.map +1 -0
  74. package/dist/monitoring/guardManifest.d.ts.map +1 -1
  75. package/dist/monitoring/guardManifest.js +40 -0
  76. package/dist/monitoring/guardManifest.js.map +1 -1
  77. package/dist/monitoring/missingLoginSessionWiring.d.ts +96 -0
  78. package/dist/monitoring/missingLoginSessionWiring.d.ts.map +1 -0
  79. package/dist/monitoring/missingLoginSessionWiring.js +97 -0
  80. package/dist/monitoring/missingLoginSessionWiring.js.map +1 -0
  81. package/dist/monitoring/singleMachineFailoverGapWiring.d.ts +56 -0
  82. package/dist/monitoring/singleMachineFailoverGapWiring.d.ts.map +1 -0
  83. package/dist/monitoring/singleMachineFailoverGapWiring.js +48 -0
  84. package/dist/monitoring/singleMachineFailoverGapWiring.js.map +1 -0
  85. package/dist/server/AgentServer.d.ts +2 -0
  86. package/dist/server/AgentServer.d.ts.map +1 -1
  87. package/dist/server/AgentServer.js +2 -0
  88. package/dist/server/AgentServer.js.map +1 -1
  89. package/dist/server/CapabilityIndex.d.ts.map +1 -1
  90. package/dist/server/CapabilityIndex.js +30 -0
  91. package/dist/server/CapabilityIndex.js.map +1 -1
  92. package/dist/server/routes.d.ts +2 -0
  93. package/dist/server/routes.d.ts.map +1 -1
  94. package/dist/server/routes.js +41 -3
  95. package/dist/server/routes.js.map +1 -1
  96. package/package.json +1 -1
  97. package/src/data/builtin-manifest.json +65 -65
  98. package/upgrades/1.3.906.md +20 -0
  99. package/upgrades/1.3.907.md +30 -0
  100. package/upgrades/side-effects/proactive-default-account-swap.md +124 -0
  101. package/upgrades/side-effects/throughput-window-semantics.md +79 -0
@@ -0,0 +1,124 @@
1
+ # Side-Effects Review — Proactive default-account swap
2
+
3
+ **Version / slug:** `proactive-default-account-swap`
4
+ **Date:** `2026-07-22`
5
+ **Author:** `Instar Agent (instar-codey)`
6
+ **Second-pass reviewer:** independent security, integration, and decision reviewers — concurred
7
+
8
+ ## Summary of the change
9
+
10
+ The existing proactive subscription swap now admits a refreshable untagged
11
+ session through its resolved default account, excludes sessions the existing
12
+ refresh funnel cannot route, prefers the lowest-utilization eligible target,
13
+ preserves structured refresh refusal codes, and boots on Slack-only installs.
14
+ Slack binding lookup gains the disk fallback already modeled by SessionRefresh.
15
+
16
+ ## Decision-point inventory
17
+
18
+ - Proactive candidate admission — modified — requires a routable conversation
19
+ binding and a valid effective source account.
20
+ - Proactive target preference — modified — lowest binding utilization wins
21
+ after every existing eligibility/brake floor.
22
+ - Execute-time source revalidation — modified — re-resolves default-backed
23
+ sessions before any refresh.
24
+ - In-flight work gate — pass-through — remains the authority over busy work.
25
+
26
+ ## 1. Over-block
27
+
28
+ A temporarily unreadable binding registry excludes an otherwise refreshable
29
+ session for one tick. This is the safe direction for a destructive restart;
30
+ the next level-triggered tick retries after the registry recovers. A stale
31
+ higher-priority Telegram binding still wins over Slack, matching the refresh
32
+ funnel's established routing semantics.
33
+
34
+ ## 2. Under-block
35
+
36
+ A readable but semantically stale disk binding can admit an attempt. The
37
+ authoritative refresh lookup repeats before kill and returns a concrete refusal;
38
+ failure backoff and the breaker bound repetition. The change does not attempt
39
+ to infer whether a still-present platform binding reflects operator intent.
40
+
41
+ ## 3. Level-of-abstraction fit
42
+
43
+ Candidate admission stays in ProactiveSwapMonitor, target selection stays in
44
+ SwapAntiThrash, execution revalidation stays in QuotaAwareScheduler, and the
45
+ restart stays in SessionRefresh. SlackAdapter owns its own disk persistence.
46
+ No layer duplicates a credential store or becomes a parallel swap authority.
47
+
48
+ ## 4. Signal vs authority compliance
49
+
50
+ Required reference: [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
51
+
52
+ - [x] No — structured binding and quota signals feed the existing deterministic
53
+ proactive-swap authority.
54
+
55
+ The rules are enumerable resource and lifecycle invariants. No brittle content
56
+ detector or LLM judgment is introduced.
57
+
58
+ ## 4b. Judgment-point check
59
+
60
+ No new competing-signals heuristic. “Freshest” is operator-defined as the
61
+ lowest valid binding-window utilization after the existing safety floors.
62
+
63
+ ## 5. Interactions
64
+
65
+ - Legacy/dry-run behavior remains unchanged; the new default-session admission
66
+ is in the live anti-thrash pipeline.
67
+ - SessionRefresh repeats binding lookup, so enumeration is signal-only.
68
+ - Source identity and target state are revalidated before refresh; no silent
69
+ reselection occurs.
70
+ - Busy work still defers/drops through the existing gate.
71
+ - Successful untagged moves become tagged/pinned, so they do not mutate the
72
+ default or create repeated default-session moves.
73
+
74
+ ## 6. External surfaces
75
+
76
+ Users see their main interactive conversation move before quota exhaustion when
77
+ a fresh account is available. The existing swap ledger receives one optional
78
+ field. No new API, setting, URL, operator action, or credential store is added.
79
+
80
+ ## 6b. Operator-surface quality
81
+
82
+ No operator surface — not applicable.
83
+
84
+ ## 7. Multi-machine posture
85
+
86
+ Machine-local by design under `physical-credential-locality`: OAuth homes,
87
+ platform bindings, tmux processes, and swap ledgers belong to the executing
88
+ host. Ledger rows already carry `machineId`; no notice or URL is added and no
89
+ durable state is stranded by topic transfer.
90
+
91
+ ## 8. Rollback cost
92
+
93
+ Immediate rollback is disabling proactive swap. Code rollback is a revert and
94
+ patch release. The optional JSONL field needs no migration or repair.
95
+
96
+ ## Conclusion
97
+
98
+ The review changed the implementation plan to revalidate default identity at
99
+ execution, use honest audit semantics, and cover Slack-only/disk-backed routing.
100
+ All three independent second-pass reviewers concurred. Clear to ship.
101
+
102
+ ## Second-pass review
103
+
104
+ **Reviewers:** independent security, integration, and decision-completeness reviewers
105
+ **Independent read of the artifact: concur.** No remaining material lifecycle,
106
+ authority, integration, or convergence concern. The lifecycle reviewer first
107
+ found that an unresolved default source could pass revalidation; the code and a
108
+ null-source/no-refresh boundary test were added, then the reviewer concurred.
109
+
110
+ ## Class-Closure Declaration (display-only mirror)
111
+
112
+ `defectClass: unbounded-self-action`, `closure: guard`, `guardEvidence:
113
+ { enforcementType: ratchet, citation: tests/unit/self-action-convergence.test.ts,
114
+ howCaught: the monitor edge remains level-triggered and is bounded by non-overlap,
115
+ per-cycle/per-target caps, dwell, failure backoff, breaker, and work-deferral
116
+ ceiling; the ratchet requires those steady-state and settling brakes for this
117
+ self-triggered swap controller }`.
118
+
119
+ ## Evidence pointers
120
+
121
+ - `tests/unit/swap-continuity-wiring.test.ts`
122
+ - `tests/unit/sessionRefresh-slack.test.ts`
123
+ - `tests/unit/proactive-swap-production-wiring.test.ts`
124
+ - `tests/e2e/swap-continuity-antithrash-lifecycle.test.ts`
@@ -0,0 +1,79 @@
1
+ # Side-Effects Review — Throughput window semantics
2
+
3
+ **Version / slug:** `throughput-window-semantics`
4
+ **Date:** `2026-07-21`
5
+ **Author:** `Instar Agent (instar-codey)`
6
+ **Second-pass reviewer:** `not required`
7
+
8
+ ## Summary of the change
9
+
10
+ The existing `BlockerLifecycleService` completion projections now label their independently selected time scopes. Summary reports a rolling-hours window; trend reports rolling days, UTC buckets, and a partial current day. The existing pool sanitizer preserves and validates those additive labels. No count, state owner, action, or decision point changes.
11
+
12
+ ## Decision-point inventory
13
+
14
+ No decision point is added, modified, or removed. This is a read-only measurement contract clarification.
15
+
16
+ ## 1. Over-block
17
+
18
+ No block/allow surface — over-block not applicable.
19
+
20
+ ## 2. Under-block
21
+
22
+ No block/allow surface — under-block not applicable. Older servers do not emit the additive label until upgraded; schema-v1 peers remain explicitly unsupported under the existing pool rules.
23
+
24
+ ## 3. Level-of-abstraction fit
25
+
26
+ The label is produced beside the count in the existing service projection and validated by the existing pool read sanitizer. This is the lowest layer that knows the actual requested window and avoids a parallel route, store, or derived aggregate.
27
+
28
+ ## 4. Signal vs authority compliance
29
+
30
+ Required reference: [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
31
+
32
+ - [x] No — this change has no block/allow surface.
33
+
34
+ It describes the scope of an existing observe-only signal and grants it no selection, pressure, notification, grading, gating, or action authority.
35
+
36
+ ## 4b. Judgment-point check
37
+
38
+ No new static heuristic at a competing-signals decision point.
39
+
40
+ ## 5. Interactions
41
+
42
+ - **Shadowing:** none; the existing count fields and route envelopes remain intact.
43
+ - **Double-fire:** none; reads add no writes or events.
44
+ - **Races:** the exact caller-supplied window is labeled, avoiding drift from a second clock read.
45
+ - **Feedback loops:** none; no consumer or authority is changed.
46
+
47
+ ## 6. External surfaces
48
+
49
+ The two authenticated blocker-lifecycle responses gain additive `window` metadata on the deliverable-completion factor. Clients keyed to schema version 2 already ignore additive fields. No persistent state, notice, URL, or operator action changes.
50
+
51
+ ## 6b. Operator-surface quality
52
+
53
+ No operator surface — not applicable.
54
+
55
+ ## 7. Multi-machine posture
56
+
57
+ Proxied-on-read through the existing `scope=pool` composition. Each machine retains its local ledger truth and the pool sanitizer validates and preserves the machine-tagged window label. No user-facing notice is emitted, no durable state can strand on topic transfer, and no URL is generated.
58
+
59
+ ## 8. Rollback cost
60
+
61
+ Pure additive code and documentation change: revert and ship a patch. There is no data migration or agent-state repair. Rolling back removes the labels and restores the prior ambiguity but does not change counts.
62
+
63
+ ## Conclusion
64
+
65
+ The change makes two deliberately different scopes visibly different without inventing numbers or altering the measurement substrate. It is clear to ship.
66
+
67
+ ## Second-pass review
68
+
69
+ Not required: no sentinel, guard, gate, watchdog, lifecycle, dispatch, or message-flow authority changes.
70
+
71
+ ## Evidence pointers
72
+
73
+ - `tests/unit/BlockerLifecycleService-throughput.test.ts`
74
+ - `tests/integration/blocker-throughput-pool-routes.test.ts`
75
+ - `tests/e2e/blocker-throughput-count-alive.test.ts`
76
+
77
+ ## Class-Closure Declaration (display-only mirror)
78
+
79
+ No agent-authored-artifact defect and no self-triggered controller — not applicable.