instar 1.3.1124 → 1.3.1126
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 +50 -4
- package/dist/commands/server.js.map +1 -1
- package/dist/core/LlmCircuitBreaker.d.ts +39 -0
- package/dist/core/LlmCircuitBreaker.d.ts.map +1 -1
- package/dist/core/LlmCircuitBreaker.js +61 -1
- package/dist/core/LlmCircuitBreaker.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +15 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +51 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +22 -7
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/tmuxLiteralSend.d.ts +81 -0
- package/dist/core/tmuxLiteralSend.d.ts.map +1 -0
- package/dist/core/tmuxLiteralSend.js +131 -0
- package/dist/core/tmuxLiteralSend.js.map +1 -0
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/messaging/NotificationBatcher.d.ts +133 -10
- package/dist/messaging/NotificationBatcher.d.ts.map +1 -1
- package/dist/messaging/NotificationBatcher.js +337 -20
- package/dist/messaging/NotificationBatcher.js.map +1 -1
- package/dist/monitoring/DegradationReporter.d.ts +15 -0
- package/dist/monitoring/DegradationReporter.d.ts.map +1 -1
- package/dist/monitoring/DegradationReporter.js +6 -1
- package/dist/monitoring/DegradationReporter.js.map +1 -1
- package/dist/providers/adapters/anthropic-headless/control/inputInjection.d.ts.map +1 -1
- package/dist/providers/adapters/anthropic-headless/control/inputInjection.js +28 -1
- package/dist/providers/adapters/anthropic-headless/control/inputInjection.js.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/canary/emptyPromptCanary.d.ts.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/canary/emptyPromptCanary.js +2 -1
- package/dist/providers/adapters/anthropic-interactive-pool/canary/emptyPromptCanary.js.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/control/inputInjection.d.ts.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/control/inputInjection.js +28 -1
- package/dist/providers/adapters/anthropic-interactive-pool/control/inputInjection.js.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/promptRunner.d.ts.map +1 -1
- package/dist/providers/adapters/anthropic-interactive-pool/promptRunner.js +14 -2
- package/dist/providers/adapters/anthropic-interactive-pool/promptRunner.js.map +1 -1
- package/dist/providers/adapters/openai-codex/control/inputInjection.d.ts.map +1 -1
- package/dist/providers/adapters/openai-codex/control/inputInjection.js +31 -4
- package/dist/providers/adapters/openai-codex/control/inputInjection.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +13 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +3 -2
- package/scripts/lint-no-unfunneled-tmux-literal-send.js +78 -0
- package/src/data/builtin-manifest.json +21 -21
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/src/scaffold/templates.ts +13 -0
- package/upgrades/1.3.1125.md +97 -0
- package/upgrades/1.3.1126.md +44 -0
- package/upgrades/side-effects/bounded-attention-notification-surface.md +201 -0
- package/upgrades/side-effects/tmux-literal-send-ceiling.md +237 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+EH,OAAO,EAAE,cAAc,EAAkC,MAAM,2BAA2B,CAAC;AAU3F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E,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,EAQrD,oBAAoB,CAAC,EAAE,MAAM;IAC3B,YAAY,EAAE,OAAO,kBAAkB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,GACP,IAAI,CAwtBN;AAgmBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAg7qBtE;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"}
|
package/dist/commands/server.js
CHANGED
|
@@ -37,6 +37,7 @@ function localSlackRelayReadiness(stateDir) {
|
|
|
37
37
|
return slackReplyRelayReadiness(stateDir, template);
|
|
38
38
|
}
|
|
39
39
|
import { resolveStandardsRegistry } from '../core/standardsRegistryPath.js';
|
|
40
|
+
import { chunkLiteralForTmux, buildLiteralSendArgs } from '../core/tmuxLiteralSend.js';
|
|
40
41
|
import { parseStandardsRegistry } from '../core/StandardsRegistryParser.js';
|
|
41
42
|
import { loadConfig, ensureStateDir, detectTmuxPath, detectGeminiPath } from '../core/Config.js';
|
|
42
43
|
import { handleProcessLevelError } from '../core/uncaughtExceptionPolicy.js';
|
|
@@ -3415,11 +3416,28 @@ export async function startServer(options) {
|
|
|
3415
3416
|
// SUMMARY = batched every 30 min (degradations, coherence, orphan reports)
|
|
3416
3417
|
// DIGEST = batched every 2 hrs (updates, wake events, routine lifecycle)
|
|
3417
3418
|
// Principle: Log everything, notify selectively.
|
|
3419
|
+
// Bounded-attention-notification-surface (C2): built FROM CONFIG rather than
|
|
3420
|
+
// literals. Every key falls back to the previous hardcoded value when absent,
|
|
3421
|
+
// so an install with no `notificationBatcher` block behaves byte-for-byte as
|
|
3422
|
+
// before. NOTE the key is TOP-LEVEL: `messaging` is an array of adapters, so a
|
|
3423
|
+
// key nested there is unreachable (same trap as `outboundAdvisory`).
|
|
3424
|
+
const nbCfg = config.notificationBatcher ?? {};
|
|
3418
3425
|
const notificationBatcher = new NotificationBatcher({
|
|
3419
|
-
enabled: true,
|
|
3420
|
-
summaryIntervalMinutes: 30,
|
|
3421
|
-
digestIntervalMinutes: 120,
|
|
3426
|
+
enabled: nbCfg.enabled ?? true,
|
|
3427
|
+
summaryIntervalMinutes: nbCfg.summaryIntervalMinutes ?? 30,
|
|
3428
|
+
digestIntervalMinutes: nbCfg.digestIntervalMinutes ?? 120,
|
|
3429
|
+
maxMessagesPerTopicPerHour: nbCfg.maxMessagesPerTopicPerHour ?? 4,
|
|
3430
|
+
suppressionTtlHours: nbCfg.suppressionTtlHours ?? 24,
|
|
3431
|
+
maxHoldHours: nbCfg.maxHoldHours ?? 6,
|
|
3432
|
+
maxHeldItemsPerTopic: nbCfg.maxHeldItemsPerTopic ?? 200,
|
|
3433
|
+
quietHours: nbCfg.quietHours,
|
|
3422
3434
|
});
|
|
3435
|
+
// C3 persistence is wired UNCONDITIONALLY here, not inside the pool block:
|
|
3436
|
+
// a single-machine install never reaches that block, and it is the majority
|
|
3437
|
+
// case. With no resolver the ownership verdict is `unresolvable-no-pool`,
|
|
3438
|
+
// i.e. this machine is trivially the owner — a strict single-process limiter.
|
|
3439
|
+
// The pool block later calls configureBounds AGAIN to add the resolver.
|
|
3440
|
+
notificationBatcher.configureBounds({ stateDir: config.stateDir });
|
|
3423
3441
|
// State reference — set once StateManager is created, used by notify()
|
|
3424
3442
|
let _notifyState = null;
|
|
3425
3443
|
/**
|
|
@@ -14904,7 +14922,11 @@ export async function startServer(options) {
|
|
|
14904
14922
|
sendKeys(tmuxSession, text) {
|
|
14905
14923
|
try {
|
|
14906
14924
|
const target = `=${tmuxSession}:`;
|
|
14907
|
-
|
|
14925
|
+
// Chunked — see src/core/tmuxLiteralSend.ts (`send-keys -l` payload
|
|
14926
|
+
// is one argv element and blows ARG_MAX on large text).
|
|
14927
|
+
for (const chunk of chunkLiteralForTmux(text)) {
|
|
14928
|
+
execFileSync(tmuxBin, buildLiteralSendArgs(target, chunk), { encoding: 'utf-8', timeout: 5000 });
|
|
14929
|
+
}
|
|
14908
14930
|
execFileSync(tmuxBin, ['send-keys', '-t', target, 'Enter'], { encoding: 'utf-8', timeout: 5000 });
|
|
14909
14931
|
return true;
|
|
14910
14932
|
}
|
|
@@ -19155,6 +19177,25 @@ export async function startServer(options) {
|
|
|
19155
19177
|
});
|
|
19156
19178
|
_writeAdmissionOwnershipStore = ownershipStore;
|
|
19157
19179
|
const ownReg = sessionOwnershipRegistry;
|
|
19180
|
+
// C4.1 (bounded-attention-notification-surface): ONLY the machine that
|
|
19181
|
+
// owns a topic sends batched notifications into it. With exactly one
|
|
19182
|
+
// enforcer per topic the rolling-window limit is an ordinary
|
|
19183
|
+
// single-process rate limit — exact, with no shared counter, no machine
|
|
19184
|
+
// count, and no cross-machine call on the send path. Reaching this block
|
|
19185
|
+
// at all means a pool IS wired, so an unreadable placement resolves to
|
|
19186
|
+
// `unresolvable-pool` (HOLD) rather than to "I am the owner".
|
|
19187
|
+
notificationBatcher.configureBounds({
|
|
19188
|
+
stateDir: config.stateDir,
|
|
19189
|
+
ownershipResolver: (topicId) => {
|
|
19190
|
+
const self = _meshSelfId;
|
|
19191
|
+
if (!self)
|
|
19192
|
+
return 'unresolvable-pool';
|
|
19193
|
+
const owner = ownReg.ownerOf(String(topicId));
|
|
19194
|
+
if (!owner)
|
|
19195
|
+
return 'unresolvable-pool';
|
|
19196
|
+
return owner === self ? 'owner' : 'other';
|
|
19197
|
+
},
|
|
19198
|
+
});
|
|
19158
19199
|
// WS1.1: expose a read-only ownership lookup to the drain's
|
|
19159
19200
|
// spawn-boundary re-check (module-scope; the drain closure is defined
|
|
19160
19201
|
// before this block runs).
|
|
@@ -24193,6 +24234,11 @@ export async function startServer(options) {
|
|
|
24193
24234
|
// jargon / self-heal / CTA discipline and the user sees raw
|
|
24194
24235
|
// ops-pager output. See upgrades/side-effects/agent-health-alert-authority-routing.md.
|
|
24195
24236
|
toneGate: messagingToneGate ?? null,
|
|
24237
|
+
// C1 (bounded-attention-notification-surface): user-facing degradation
|
|
24238
|
+
// alerts default OFF. The console line, disk record, and feedback
|
|
24239
|
+
// submission are unaffected — only delivery to the operator stops.
|
|
24240
|
+
notifyUser: config.monitoring
|
|
24241
|
+
?.degradationReporter?.notifyUser === true,
|
|
24196
24242
|
});
|
|
24197
24243
|
// Never-silent degradation tracking (Resilient Degradation Ladder §4): dev-gated
|
|
24198
24244
|
// (live-on-dev / dark-on-fleet via resolveDevAgentGate). When enabled, a timer drives the
|