instar 1.3.538 → 1.3.540
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 +87 -6
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +23 -21
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CredentialAuditEmit.d.ts +82 -0
- package/dist/core/CredentialAuditEmit.d.ts.map +1 -0
- package/dist/core/CredentialAuditEmit.js +132 -0
- package/dist/core/CredentialAuditEmit.js.map +1 -0
- package/dist/core/CredentialManualLevers.d.ts +57 -0
- package/dist/core/CredentialManualLevers.d.ts.map +1 -0
- package/dist/core/CredentialManualLevers.js +0 -0
- package/dist/core/CredentialManualLevers.js.map +1 -0
- package/dist/core/CredentialRestoreEnrollment.d.ts +76 -0
- package/dist/core/CredentialRestoreEnrollment.d.ts.map +1 -0
- package/dist/core/CredentialRestoreEnrollment.js +76 -0
- package/dist/core/CredentialRestoreEnrollment.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +83 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts +12 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +51 -37
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/types.d.ts +7 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/guardManifest.js +4 -4
- package/dist/monitoring/guardManifest.js.map +1 -1
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +16 -11
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +20 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +20 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +213 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/scripts/lib/dark-gate-attribution.js +7 -2
- package/scripts/lint-dev-agent-dark-gate.js +19 -1
- package/src/data/builtin-manifest.json +64 -64
- package/upgrades/1.3.539.md +29 -0
- package/upgrades/1.3.540.md +70 -0
- package/upgrades/side-effects/dev-agent-dark-gate-teeth.md +201 -0
- package/upgrades/side-effects/ws52-step7-routes-audit.md +39 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CredentialRestoreEnrollment — the teardown lever (spec §2.8, build-plan §7).
|
|
3
|
+
*
|
|
4
|
+
* `POST /credentials/restore-enrollment` moves every slot back to its enrollment layout (N
|
|
5
|
+
* ordinary §2.3 swaps back), then the operator darks the feature — at which point ledger ==
|
|
6
|
+
* enrollment and raw `configHome` reads are truthful again (the ordered-rollback the spec names).
|
|
7
|
+
*
|
|
8
|
+
* This module owns the ONE piece the plain swap executor does not: the per-slot DECISION of
|
|
9
|
+
* whether a slot's current blob may be EXCHANGED back into a healthy enrollment slot, or must be
|
|
10
|
+
* PARKED ONE-DIRECTIONALLY (moved out / the slot vacated for operator re-auth, NEVER exchanged in).
|
|
11
|
+
*
|
|
12
|
+
* ── Why a quarantine bypass that retains everything else (spec §0.g + §2.8) ──
|
|
13
|
+
* restore-enrollment is a TEARDOWN, not a balancing move, so it carries a QUARANTINE BYPASS — it
|
|
14
|
+
* must operate ON quarantined slots (the degraded state rollback exists for), or §2.3 step-1 would
|
|
15
|
+
* hard-block it exactly when it is needed. Per §0.g a bypass drops ONLY the named guard: it RETAINS
|
|
16
|
+
* 1. parse (an unparseable blob is parked, never exchanged)
|
|
17
|
+
* 2. refresh-token-present (a refresh-token-less blob is parked, never exchanged)
|
|
18
|
+
* 3. IDENTITY-COHERENCE (access-tenant == refresh-lineage; the §2.7 Frankenstein gap)
|
|
19
|
+
*
|
|
20
|
+
* ── The Frankenstein gap (spec §2.8 round-4) ──
|
|
21
|
+
* "Parses + has a refresh token" is NOT sufficient. A legacy `AccountSwitcher` slip can leave
|
|
22
|
+
* B's access token grafted onto A's PRESERVED refresh token: the blob parses, carries a refresh
|
|
23
|
+
* token, and the oracle (on B's still-valid access token) resolves it to B — yet on first refresh
|
|
24
|
+
* the client exchanges A's refresh token and silently resurrects A (a §0.d violation). So before
|
|
25
|
+
* any exchange, the blob's access-token identity (oracle) MUST equal its refresh-token lineage's
|
|
26
|
+
* expected account. A blob that fails coherence — Frankenstein, revoked-grant, access/refresh
|
|
27
|
+
* tenant mismatch — is parked ONE-DIRECTIONALLY exactly like an unparseable one, NEVER exchanged
|
|
28
|
+
* into a healthy slot (a teardown that exchanges garbage into a good slot, then post-commit-verify
|
|
29
|
+
* quarantines THAT slot, would spread corruption during the exact degraded state rollback is for).
|
|
30
|
+
*
|
|
31
|
+
* This module is the DECISION (coherence classification + the park plan). It performs NO keychain
|
|
32
|
+
* writes itself — the route drives the actual exchange through the §2.3 CredentialSwapExecutor and
|
|
33
|
+
* the actual park through the ledger quarantine + an attention item. Pure + injectable.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Classify a slot's current blob for restore-enrollment. Returns a COHERENT verdict (safe to
|
|
37
|
+
* EXCHANGE back to its enrollment slot) ONLY when ALL THREE retained preconditions hold:
|
|
38
|
+
* parse + refresh-token-present + identity-coherence (accessTenant === refreshLineage).
|
|
39
|
+
* Any failure → an INCOHERENT verdict with `park: 'one-directional'` and a named reason — the
|
|
40
|
+
* caller must vacate the slot for operator re-auth and NEVER exchange this blob into a healthy slot.
|
|
41
|
+
*
|
|
42
|
+
* The oracle-down cheap proxy is the caller's job: it supplies `refreshLineage` from the ledger's
|
|
43
|
+
* expected tenant for the slot, and `accessTenant` may be null (oracle unavailable). When BOTH are
|
|
44
|
+
* known and equal → coherent; when the oracle is down (accessTenant null) we CANNOT certify
|
|
45
|
+
* coherence → one-directional park (the safe direction: never exchange an unverifiable blob).
|
|
46
|
+
*/
|
|
47
|
+
export function classifyRestoreCoherence(blob, probe) {
|
|
48
|
+
// 1. Parse — an unparseable/absent oauth is parked one-directionally.
|
|
49
|
+
if (!blob.oauth || typeof blob.oauth !== 'object') {
|
|
50
|
+
return { coherent: false, reason: 'blob is unparseable or has no claudeAiOauth — parked for re-auth', park: 'one-directional' };
|
|
51
|
+
}
|
|
52
|
+
// 2. Refresh-token-present — a refresh-token-less blob cannot be a healthy lineage.
|
|
53
|
+
if (typeof blob.oauth.refreshToken !== 'string' || !blob.oauth.refreshToken) {
|
|
54
|
+
return { coherent: false, reason: 'blob carries no refresh token — parked for re-auth', park: 'one-directional' };
|
|
55
|
+
}
|
|
56
|
+
// 3. Identity-coherence — access-tenant MUST equal refresh-lineage (the Frankenstein gap).
|
|
57
|
+
if (!probe.accessTenant) {
|
|
58
|
+
// Oracle could not confirm the access-token identity → CANNOT certify coherence. Park (safe
|
|
59
|
+
// direction): never exchange a blob we cannot identity-verify back into a healthy slot.
|
|
60
|
+
return { coherent: false, reason: 'access-token identity unavailable (oracle down) — cannot certify coherence, parked', park: 'one-directional' };
|
|
61
|
+
}
|
|
62
|
+
if (!probe.refreshLineage) {
|
|
63
|
+
return { coherent: false, reason: 'no expected refresh-lineage for slot — cannot certify coherence, parked', park: 'one-directional' };
|
|
64
|
+
}
|
|
65
|
+
if (probe.accessTenant !== probe.refreshLineage) {
|
|
66
|
+
// The §2.7 Frankenstein blob: access resolves to one account, refresh lineage belongs to
|
|
67
|
+
// another. Exchanging it would resurrect the refresh-lineage account on first refresh.
|
|
68
|
+
return {
|
|
69
|
+
coherent: false,
|
|
70
|
+
reason: `identity-incoherent: access-tenant != refresh-lineage — parked one-directionally, never exchanged into a healthy slot`,
|
|
71
|
+
park: 'one-directional',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return { coherent: true, tenant: probe.accessTenant };
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=CredentialRestoreEnrollment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CredentialRestoreEnrollment.js","sourceRoot":"","sources":["../../src/core/CredentialRestoreEnrollment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AA6BH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAiB,EAAE,KAAqB;IAC/E,sEAAsE;IACtE,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAClD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,kEAAkE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAClI,CAAC;IACD,oFAAoF;IACpF,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC5E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,oDAAoD,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACpH,CAAC;IACD,2FAA2F;IAC3F,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QACxB,4FAA4F;QAC5F,wFAAwF;QACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,oFAAoF,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACpJ,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAC1B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,yEAAyE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACzI,CAAC;IACD,IAAI,KAAK,CAAC,YAAY,KAAK,KAAK,CAAC,cAAc,EAAE,CAAC;QAChD,yFAAyF;QACzF,uFAAuF;QACvF,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,uHAAuH;YAC/H,IAAI,EAAE,iBAAiB;SACxB,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;AACxD,CAAC"}
|
|
@@ -118,6 +118,7 @@ export declare class PostUpdateMigrator {
|
|
|
118
118
|
private migrateCommitmentOwnerBackfill;
|
|
119
119
|
private migrateMultiMachinePostureReviewDimension;
|
|
120
120
|
private migrateCartographerDevGate;
|
|
121
|
+
private migrateDevGateTeethStrip;
|
|
121
122
|
private migrateHonestProgressMessagingDefaults;
|
|
122
123
|
/**
|
|
123
124
|
* Seed the interactive first-launch onboarding flags into every EXISTING
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostUpdateMigrator.d.ts","sourceRoot":"","sources":["../../src/core/PostUpdateMigrator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAwCH,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC3B,MAAM,yBAAyB,CAAC;AAyBjC,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,kCAAkC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,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AiClC,OAAO,CAAC,0BAA0B;IA8ElC,OAAO,CAAC,0BAA0B;IA8IlC,OAAO,CAAC,gBAAgB;IAmJxB,OAAO,CAAC,6BAA6B;CAoCtC"}
|
|
@@ -258,6 +258,7 @@ export class PostUpdateMigrator {
|
|
|
258
258
|
this.migrateWorktreeMisplacedFloodItems(result);
|
|
259
259
|
this.migrateSubscriptionPoolInteractiveReady(result);
|
|
260
260
|
this.migrateCartographerDevGate(result);
|
|
261
|
+
this.migrateDevGateTeethStrip(result);
|
|
261
262
|
this.migrateCommitmentOwnerBackfill(result);
|
|
262
263
|
this.migrateMultiMachinePostureReviewDimension(result);
|
|
263
264
|
this.migrateConformanceGateAutoInvoke(result);
|
|
@@ -531,6 +532,88 @@ export class PostUpdateMigrator {
|
|
|
531
532
|
result.skipped.push('cartographer-dev-gate: no default-shaped false to strip (marker set)');
|
|
532
533
|
}
|
|
533
534
|
}
|
|
535
|
+
// ── DEV-AGENT-DARK-GATE-TEETH (CMT-1438): strip stale persisted `enabled: false`
|
|
536
|
+
// for the 4 features moved out of the retired `deliberate-fleet-default` bucket
|
|
537
|
+
// into DEV_GATED_FEATURES. Same mechanism + rationale as migrateCartographerDevGate:
|
|
538
|
+
// removing the ConfigDefaults literal only lets the gate decide when `enabled` is
|
|
539
|
+
// ABSENT, but applyDefaults is add-missing-only — so an agent (e.g. Echo) that
|
|
540
|
+
// already persisted the old default `false` keeps it and the feature stays DARK on
|
|
541
|
+
// the very dev agent meant to dogfood it. This one-shot, dev-agent-only strip frees
|
|
542
|
+
// a DEFAULT-SHAPED `false` at exactly the 4 allowlisted, D4-code-grounded-safe paths.
|
|
543
|
+
//
|
|
544
|
+
// Lossy-but-precedented (D5): the `false` value alone can't distinguish a stale
|
|
545
|
+
// default from a deliberate pre-migration operator choice; the run-once marker means
|
|
546
|
+
// each path's `false` is touched at most ONCE — a LATER operator-set `false` is never
|
|
547
|
+
// re-stripped (re-add it to deliberately keep a flag off). Same accepted tradeoff as
|
|
548
|
+
// the cartographer strip. Allowlist is HARDCODED (never "the dev-gated ones"
|
|
549
|
+
// dynamically) and deliberately EXCLUDES the 3 D4-held exclusions
|
|
550
|
+
// (correctionLearning / apprenticeshipCycleSla / geminiCapacityEscalation), which
|
|
551
|
+
// keep their persisted `false`. Idempotent, existence-checked, dev-agent-only.
|
|
552
|
+
migrateDevGateTeethStrip(result) {
|
|
553
|
+
const configPath = path.join(this.config.stateDir, 'config.json');
|
|
554
|
+
if (!fs.existsSync(configPath)) {
|
|
555
|
+
result.skipped.push('dev-gate-teeth: config.json not found');
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
let config;
|
|
559
|
+
try {
|
|
560
|
+
config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
561
|
+
}
|
|
562
|
+
catch (err) {
|
|
563
|
+
result.errors.push(`dev-gate-teeth: config.json read failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
const migrations = (config._instar_migrations ?? []);
|
|
567
|
+
const marker = 'dev-gate-teeth-strip';
|
|
568
|
+
if (migrations.some(m => m.startsWith(marker))) {
|
|
569
|
+
result.skipped.push('dev-gate-teeth: already migrated');
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
// Dev-agent-only: a fleet agent's `false` is the correct dark default and is left
|
|
573
|
+
// untouched (marker NOT set here, so a later promotion can still run once).
|
|
574
|
+
if (config.developmentAgent !== true) {
|
|
575
|
+
result.skipped.push('dev-gate-teeth: not a development agent');
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
// The 4 newly-DEV_GATED leaf flags, all under config.monitoring. HARDCODED — the
|
|
579
|
+
// 3 D4-held exclusion paths are deliberately NOT in this list.
|
|
580
|
+
const monitoring = config.monitoring;
|
|
581
|
+
const stripped = [];
|
|
582
|
+
if (monitoring && typeof monitoring === 'object' && !Array.isArray(monitoring)) {
|
|
583
|
+
const mon = monitoring;
|
|
584
|
+
const allowlist = ['parallelWorkSentinel', 'failureLearning', 'releaseReadiness', 'bootHealthBeacon'];
|
|
585
|
+
for (const key of allowlist) {
|
|
586
|
+
const sub = mon[key];
|
|
587
|
+
if (sub && typeof sub === 'object' && !Array.isArray(sub)) {
|
|
588
|
+
const subObj = sub;
|
|
589
|
+
if (subObj.enabled === false) {
|
|
590
|
+
delete subObj.enabled;
|
|
591
|
+
stripped.push(`monitoring.${key}.enabled`);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
// Record the marker even when nothing was stripped, so it runs exactly once
|
|
597
|
+
// (value-already-absent / operator-set-true cases are terminal too).
|
|
598
|
+
const now = new Date().toISOString();
|
|
599
|
+
migrations.push(`${marker}-${now}`);
|
|
600
|
+
config._instar_migrations = migrations;
|
|
601
|
+
try {
|
|
602
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
603
|
+
}
|
|
604
|
+
catch (err) {
|
|
605
|
+
result.errors.push(`dev-gate-teeth: config.json write failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
606
|
+
return;
|
|
607
|
+
}
|
|
608
|
+
if (stripped.length > 0) {
|
|
609
|
+
// Report each stripped path (CMT-1438 round-3 finding): a non-Echo dev operator
|
|
610
|
+
// sees exactly which flags were freed and can deliberately re-disable any.
|
|
611
|
+
result.upgraded.push(`dev-gate-teeth: stripped default-shaped \`enabled: false\` at ${stripped.join(', ')} so the developmentAgent gate resolves them live (CMT-1438; re-add \`enabled: false\` to deliberately keep one off — it will not be re-stripped)`);
|
|
612
|
+
}
|
|
613
|
+
else {
|
|
614
|
+
result.skipped.push('dev-gate-teeth: no default-shaped false to strip (marker set)');
|
|
615
|
+
}
|
|
616
|
+
}
|
|
534
617
|
// ── HONEST-PROGRESS-MESSAGING D (Config surface + migration parity) ──
|
|
535
618
|
//
|
|
536
619
|
// The honest-messaging behavior reaches every agent via the monitors' code
|