instar 1.3.748 → 1.3.749

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 (71) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +136 -2
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/HttpLeaseTransport.d.ts +22 -0
  5. package/dist/core/HttpLeaseTransport.d.ts.map +1 -1
  6. package/dist/core/HttpLeaseTransport.js +37 -3
  7. package/dist/core/HttpLeaseTransport.js.map +1 -1
  8. package/dist/core/LeaseCoordinator.d.ts +22 -0
  9. package/dist/core/LeaseCoordinator.d.ts.map +1 -1
  10. package/dist/core/LeaseCoordinator.js +11 -0
  11. package/dist/core/LeaseCoordinator.js.map +1 -1
  12. package/dist/core/MachinePoolRegistry.d.ts +11 -0
  13. package/dist/core/MachinePoolRegistry.d.ts.map +1 -1
  14. package/dist/core/MachinePoolRegistry.js +29 -1
  15. package/dist/core/MachinePoolRegistry.js.map +1 -1
  16. package/dist/core/PeerPresencePuller.d.ts +26 -1
  17. package/dist/core/PeerPresencePuller.d.ts.map +1 -1
  18. package/dist/core/PeerPresencePuller.js +15 -1
  19. package/dist/core/PeerPresencePuller.js.map +1 -1
  20. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  21. package/dist/core/PostUpdateMigrator.js +16 -0
  22. package/dist/core/PostUpdateMigrator.js.map +1 -1
  23. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  24. package/dist/core/devGatedFeatures.js +6 -0
  25. package/dist/core/devGatedFeatures.js.map +1 -1
  26. package/dist/core/machineCoherenceAdvert.d.ts +108 -0
  27. package/dist/core/machineCoherenceAdvert.d.ts.map +1 -0
  28. package/dist/core/machineCoherenceAdvert.js +160 -0
  29. package/dist/core/machineCoherenceAdvert.js.map +1 -0
  30. package/dist/core/machineCoherenceManifest.d.ts +133 -0
  31. package/dist/core/machineCoherenceManifest.d.ts.map +1 -0
  32. package/dist/core/machineCoherenceManifest.js +293 -0
  33. package/dist/core/machineCoherenceManifest.js.map +1 -0
  34. package/dist/core/types.d.ts +21 -0
  35. package/dist/core/types.d.ts.map +1 -1
  36. package/dist/core/types.js.map +1 -1
  37. package/dist/monitoring/MachineCoherenceSentinel.d.ts +240 -0
  38. package/dist/monitoring/MachineCoherenceSentinel.d.ts.map +1 -0
  39. package/dist/monitoring/MachineCoherenceSentinel.js +336 -0
  40. package/dist/monitoring/MachineCoherenceSentinel.js.map +1 -0
  41. package/dist/monitoring/guardManifest.d.ts.map +1 -1
  42. package/dist/monitoring/guardManifest.js +25 -0
  43. package/dist/monitoring/guardManifest.js.map +1 -1
  44. package/dist/monitoring/machineCoherenceEpisode.d.ts +152 -0
  45. package/dist/monitoring/machineCoherenceEpisode.d.ts.map +1 -0
  46. package/dist/monitoring/machineCoherenceEpisode.js +92 -0
  47. package/dist/monitoring/machineCoherenceEpisode.js.map +1 -0
  48. package/dist/monitoring/machineCoherenceEpisodeManager.d.ts +210 -0
  49. package/dist/monitoring/machineCoherenceEpisodeManager.d.ts.map +1 -0
  50. package/dist/monitoring/machineCoherenceEpisodeManager.js +724 -0
  51. package/dist/monitoring/machineCoherenceEpisodeManager.js.map +1 -0
  52. package/dist/monitoring/machineCoherenceEvaluate.d.ts +129 -0
  53. package/dist/monitoring/machineCoherenceEvaluate.d.ts.map +1 -0
  54. package/dist/monitoring/machineCoherenceEvaluate.js +183 -0
  55. package/dist/monitoring/machineCoherenceEvaluate.js.map +1 -0
  56. package/dist/scaffold/templates.d.ts.map +1 -1
  57. package/dist/scaffold/templates.js +6 -0
  58. package/dist/scaffold/templates.js.map +1 -1
  59. package/dist/server/AgentServer.d.ts +1 -0
  60. package/dist/server/AgentServer.d.ts.map +1 -1
  61. package/dist/server/AgentServer.js +1 -0
  62. package/dist/server/AgentServer.js.map +1 -1
  63. package/dist/server/routes.d.ts +1 -0
  64. package/dist/server/routes.d.ts.map +1 -1
  65. package/dist/server/routes.js +12 -0
  66. package/dist/server/routes.js.map +1 -1
  67. package/package.json +1 -1
  68. package/src/data/builtin-manifest.json +64 -64
  69. package/src/scaffold/templates.ts +6 -0
  70. package/upgrades/1.3.749.md +35 -0
  71. package/upgrades/side-effects/machine-coherence-guard.md +229 -0
@@ -1 +1 @@
1
- {"version":3,"file":"devGatedFeatures.d.ts","sourceRoot":"","sources":["../../src/core/devGatedFeatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,EA4d/C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,sBAAsB,GACtB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EA2JnD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAO5E"}
1
+ {"version":3,"file":"devGatedFeatures.d.ts","sourceRoot":"","sources":["../../src/core/devGatedFeatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;OAMG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,EAoe/C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,sBAAsB,GACtB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EA2JnD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAO5E"}
@@ -318,6 +318,12 @@ export const DEV_GATED_FEATURES = [
318
318
  description: 'Stranded-inbound detector (stranded-inbound-self-heal) — surfaces a Telegram/Slack topic whose owner machine is online-by-heartbeat but unable to serve (quota-walled or adapter-disconnected) while a healthy machine holds the lease, so inbound is silently dead for that topic. Raises ONE aggregated attention item per (owner-machine, stranding window).',
319
319
  justification: 'PURE SIGNAL — its sole output is an advisory attention item; it MUTATES NOTHING (no ownership CAS, no pin write, no session kill, no direct user message). Lease-holder is the sole actor and a single-machine agent is a strict no-op, so across machines exactly one raises the item (no duplicate-voice). Synchronous + LLM-free + acquires NO spawn-cap slot (asserted by test); reads only the in-memory ownership cache + the replicated heartbeat pool view, with an explicit fail-closed staleness bound (every uncertainty — missing field, stale beat, underivable scope, pool view unavailable — routes to SKIP, never manufactures a strand). It can only ever ADD an attention item, already bounded by the existing AttentionTopicGuard flood ceiling. No egress beyond the operator-facing item, no spend, no destructive action. Runs live (no destructive write warrants a dry-run) on dev / dark on fleet. Auto-failover is a tracked v2 with named prerequisites.',
320
320
  },
321
+ {
322
+ name: 'machineCoherence',
323
+ configPath: 'monitoring.machineCoherence.enabled',
324
+ description: 'Machine-coherence guard (machine-coherence-guard, roadmap 4.1 F4/P0-1) \u2014 the pool-wide version/flag/protocol/manifest skew EVALUATOR + episode/alarm machinery. Detects the F4 class (a dev-gated mesh feature resolving LIVE on one of the agent\u2019s machines and DARK on another silently halves a cross-machine guarantee) and raises ONE deduped episode-scoped attention item from exactly ONE elected machine. NOTE: only the evaluator/alarm ride this gate \u2014 the \u00a73.2 advert EMISSION ships live unconditionally (M3).',
325
+ justification: 'SIGNAL-ONLY \u2014 it never blocks, equalizes, or restarts anything; its sole output is one episode-scoped attention item (and the \u00a74.2.1 fix is operator-approval-gated per episode, never autonomous). Fully deterministic (Tier 0, no LLM call, no spend), no egress beyond the existing signed mesh reads, fails toward silence on evaluator error. Ships dryRun:true even on dev (dry-run FIRST: counters record would-raise, NO item) with the D7 soak criterion gating each rollout rung; single-machine agents are a strict no-op at every layer.',
326
+ },
321
327
  {
322
328
  name: 'yieldSafety',
323
329
  configPath: 'monitoring.yieldSafety.enabled',
@@ -1 +1 @@
1
- {"version":3,"file":"devGatedFeatures.js","sourceRoot":"","sources":["../../src/core/devGatedFeatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAoBH,MAAM,CAAC,MAAM,kBAAkB,GAAsB;IACnD;QACE,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE,6CAA6C;QACzD,WAAW,EAAE,+MAA+M;QAC5N,aAAa,EAAE,ikBAAikB;KACjlB;IACD;QACE,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,iCAAiC;QAC7C,WAAW,EAAE,sPAAsP;QACnQ,aAAa,EAAE,uhBAAuhB;KACviB;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EA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AAgB;QAC5B,QAAQ,EAAE,sBAAsB;QAChC,MAAM,EAAE,gQAAgQ;KACzQ;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,MAAe,EAAE,UAAkB;IACjE,IAAI,GAAG,GAAY,MAAM,CAAC;IAC1B,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACxC,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAC;QAC7D,GAAG,GAAI,GAA+B,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Machine-coherence advert — build + receive-clamp (machine-coherence-guard §3.2).
3
+ *
4
+ * The advert is ONE bounded, self-describing block riding the existing 30s
5
+ * capacity-heartbeat / presence-pull machinery (no new channel). Emission is
6
+ * UNCONDITIONAL (spec M3, normative): every machine running a version that
7
+ * carries this code emits the advert regardless of the sentinel's dev-gate /
8
+ * enabled / dryRun state — only the EVALUATOR + alarm are dev-gated (§7).
9
+ * Rationale (pinned against the founding F4 incident): a gated advert would
10
+ * leave the dark side of an asymmetric pair advert-less, and the live side
11
+ * would misclassify the exact F4 topology as "peer predates the guard".
12
+ *
13
+ * The receive clamp (spec M4, R5-N3) is NEW build work: peers' adverts are
14
+ * type-clamped AND format-clamped on receive in the puller's narrowing step —
15
+ * every rendered peer string is restricted to a safe alphabet (the L2 exposure
16
+ * invariant forbids peer free text in operator-facing surfaces). A clamp-
17
+ * REJECTED advert is stored as an explicit rejection marker that REPLACES the
18
+ * peer's stored advert for evaluation (rejected ≠ absent, by construction —
19
+ * persistent malformation surfaces LOUDLY as `advert-rejected`, never silence).
20
+ */
21
+ import { type CoherenceConfigView } from './machineCoherenceManifest.js';
22
+ /** The guard's own resolved posture on a machine (spec §3.2 N2; feeds the §3.4 election). */
23
+ export type CoherenceGuardPosture = 'live' | 'dry-run' | 'dark';
24
+ /**
25
+ * The alarm marker (spec §3.2, R2-M1/M2): present on a machine's advert iff
26
+ * that machine currently holds an OPEN local machine-coherence attention item
27
+ * it SUCCESSFULLY RAISED (the `itemRaisedAt` stamp — item-RAISED, never mere
28
+ * episode-open, R4-M1). Content-free: per-row truncated hashes over N1
29
+ * row-identity keys — never free text.
30
+ */
31
+ export interface CoherenceAlarmMarker {
32
+ /** The holder's own local episode id — N4 format, clamped /^mc-\d{1,29}$/ (R3-N9). */
33
+ episodeId: string;
34
+ /**
35
+ * PER-ROW truncated hashes (16 lowercase hex each) of the item's CURRENTLY-
36
+ * CONFIRMED §3.3 row identities, sorted, ≤ 72 entries. A LIST deliberately:
37
+ * coverage checks are INTERSECTION tests (R3-M4/N2) — an UNLISTED row is NOT
38
+ * covered, everywhere (overflow fails toward RAISING).
39
+ */
40
+ rowIdentityHashes: string[];
41
+ /** Receive-clamp honesty ONLY — structurally unreachable for a legal manifest; NEVER grants coverage (R3-M4). */
42
+ rowsTruncated?: boolean;
43
+ }
44
+ /** The §3.2 advert block — sibling to `seamlessnessFlags` on the capacity heartbeat. */
45
+ export interface CoherenceAdvert {
46
+ /** ProcessIntegrity.runningVersion — executing code, not disk. */
47
+ instarVersion: string;
48
+ /** SEAMLESSNESS_PROTOCOL_VERSION. */
49
+ protocolVersion: number;
50
+ /** sha256 over sorted manifest entries (key+resolution+readSource) — M7. */
51
+ manifestHash: string;
52
+ /** The guard's OWN resolved posture on this machine (N2; feeds the §3.4 election). */
53
+ guard: CoherenceGuardPosture;
54
+ /** Sender-side monotonic advert generation (M5; FORENSIC-ONLY — resets on restart, NEVER a freshness check; R2-L1). */
55
+ beatSeq: number;
56
+ /** Manifest-resolved effective values, clamped scalars. */
57
+ flags: Record<string, string>;
58
+ /** Present iff THIS machine holds an OPEN, successfully-RAISED local machine-coherence item (R2-M1/M2, R4-M1). */
59
+ alarm?: CoherenceAlarmMarker;
60
+ }
61
+ /** A stored clamp-rejection marker — REPLACES the peer's advert for evaluation (M4: rejected ≠ absent). */
62
+ export interface CoherenceAdvertRejection {
63
+ atMs: number;
64
+ reason: string;
65
+ }
66
+ /**
67
+ * Resolve the guard's OWN posture from config (the same resolution the
68
+ * manifest's `monitoring.machineCoherence` row uses): 'live' | 'dry-run' |
69
+ * 'dark'. The manifest row resolves to 'live'/'dry-run'/'off' — 'off' maps to
70
+ * the advert's 'dark'.
71
+ */
72
+ export declare function resolveSelfGuardPosture(view: CoherenceConfigView): CoherenceGuardPosture;
73
+ /**
74
+ * Build this machine's advert for one heartbeat. Pure given its inputs;
75
+ * recomputed each beat (a boot-read entry re-advertises within one beat of the
76
+ * restart that applied it; a live-read entry within one beat of the PATCH).
77
+ * The caller owns `beatSeq` increment and the alarm marker (episode state).
78
+ */
79
+ export declare function buildCoherenceAdvert(view: CoherenceConfigView, opts: {
80
+ /** ProcessIntegrity.runningVersion; pass 'unknown' only when genuinely unavailable. */
81
+ instarVersion: string;
82
+ beatSeq: number;
83
+ alarm?: CoherenceAlarmMarker;
84
+ }): CoherenceAdvert;
85
+ /** Result of the receive clamp: a clean (rebuilt) advert, or a named rejection. */
86
+ export type ClampAdvertResult = {
87
+ ok: true;
88
+ advert: CoherenceAdvert;
89
+ markerDropReason?: string;
90
+ } | {
91
+ ok: false;
92
+ reason: string;
93
+ };
94
+ /**
95
+ * The M4 receive-side clamp, applied in the puller's narrowing step. Every
96
+ * field is validated and the advert REBUILT from validated values (never a
97
+ * pass-through of the raw peer object). Failure directions per spec §3.2:
98
+ * - a malformed ADVERT → `{ ok: false, reason }` — the caller stores a
99
+ * rejection marker replacing the peer's advert (classification
100
+ * `advert-rejected`, surfaced loudly — never silence);
101
+ * - a malformed alarm MARKER (bad episodeId format / bad row hash) → the
102
+ * MARKER is dropped with a named reason, the advert's other fields STAND
103
+ * (R3-N9 — appends render only clamp-passed ids);
104
+ * - `rowIdentityHashes` longer than the 72-row bound → truncated + flagged
105
+ * `rowsTruncated` (receive-clamp honesty; truncation NEVER grants coverage).
106
+ */
107
+ export declare function clampCoherenceAdvert(raw: unknown): ClampAdvertResult;
108
+ //# sourceMappingURL=machineCoherenceAdvert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machineCoherenceAdvert.d.ts","sourceRoot":"","sources":["../../src/core/machineCoherenceAdvert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAgBL,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAEvC,6FAA6F;AAC7F,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iHAAiH;IACjH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wFAAwF;AACxF,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,eAAe,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,KAAK,EAAE,qBAAqB,CAAC;IAC7B,uHAAuH;IACvH,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,kHAAkH;IAClH,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B;AAED,2GAA2G;AAC3G,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,GAAG,qBAAqB,CAKxF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAE;IACJ,uFAAuF;IACvF,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,GACA,eAAe,CAUjB;AAED,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GACzB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,eAAe,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAMlC;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,iBAAiB,CAwFpE"}
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Machine-coherence advert — build + receive-clamp (machine-coherence-guard §3.2).
3
+ *
4
+ * The advert is ONE bounded, self-describing block riding the existing 30s
5
+ * capacity-heartbeat / presence-pull machinery (no new channel). Emission is
6
+ * UNCONDITIONAL (spec M3, normative): every machine running a version that
7
+ * carries this code emits the advert regardless of the sentinel's dev-gate /
8
+ * enabled / dryRun state — only the EVALUATOR + alarm are dev-gated (§7).
9
+ * Rationale (pinned against the founding F4 incident): a gated advert would
10
+ * leave the dark side of an asymmetric pair advert-less, and the live side
11
+ * would misclassify the exact F4 topology as "peer predates the guard".
12
+ *
13
+ * The receive clamp (spec M4, R5-N3) is NEW build work: peers' adverts are
14
+ * type-clamped AND format-clamped on receive in the puller's narrowing step —
15
+ * every rendered peer string is restricted to a safe alphabet (the L2 exposure
16
+ * invariant forbids peer free text in operator-facing surfaces). A clamp-
17
+ * REJECTED advert is stored as an explicit rejection marker that REPLACES the
18
+ * peer's stored advert for evaluation (rejected ≠ absent, by construction —
19
+ * persistent malformation surfaces LOUDLY as `advert-rejected`, never silence).
20
+ */
21
+ import { buildCoherenceFlags, selfManifestHash, selfProtocolVersion, resolveFlagValue, COHERENCE_CRITICAL_FLAGS, MC_MAX_ENTRIES, MC_KEY_MAX, MC_VALUE_ALPHABET, MC_VERSION_ALPHABET, MC_MANIFEST_HASH_RE, MC_EPISODE_ID_RE, MC_MARKER_ROWS_MAX, MC_FLAGS_BYTES_MAX, MC_MARKER_BYTES_MAX, MC_BLOCK_BYTES_MAX, } from './machineCoherenceManifest.js';
22
+ /**
23
+ * Resolve the guard's OWN posture from config (the same resolution the
24
+ * manifest's `monitoring.machineCoherence` row uses): 'live' | 'dry-run' |
25
+ * 'dark'. The manifest row resolves to 'live'/'dry-run'/'off' — 'off' maps to
26
+ * the advert's 'dark'.
27
+ */
28
+ export function resolveSelfGuardPosture(view) {
29
+ const entry = COHERENCE_CRITICAL_FLAGS.find((f) => f.key === 'monitoring.machineCoherence');
30
+ if (!entry)
31
+ return 'dark';
32
+ const v = resolveFlagValue(entry, view);
33
+ return v === 'live' ? 'live' : v === 'dry-run' ? 'dry-run' : 'dark';
34
+ }
35
+ /**
36
+ * Build this machine's advert for one heartbeat. Pure given its inputs;
37
+ * recomputed each beat (a boot-read entry re-advertises within one beat of the
38
+ * restart that applied it; a live-read entry within one beat of the PATCH).
39
+ * The caller owns `beatSeq` increment and the alarm marker (episode state).
40
+ */
41
+ export function buildCoherenceAdvert(view, opts) {
42
+ return {
43
+ instarVersion: opts.instarVersion,
44
+ protocolVersion: selfProtocolVersion(),
45
+ manifestHash: selfManifestHash(),
46
+ guard: resolveSelfGuardPosture(view),
47
+ beatSeq: opts.beatSeq,
48
+ flags: buildCoherenceFlags(view),
49
+ ...(opts.alarm ? { alarm: opts.alarm } : {}),
50
+ };
51
+ }
52
+ const GUARD_POSTURES = ['live', 'dry-run', 'dark'];
53
+ const KEY_ALPHABET = /^[A-Za-z0-9._-]{1,64}$/;
54
+ const ROW_HASH_RE = /^[0-9a-f]{16}$/;
55
+ /**
56
+ * The M4 receive-side clamp, applied in the puller's narrowing step. Every
57
+ * field is validated and the advert REBUILT from validated values (never a
58
+ * pass-through of the raw peer object). Failure directions per spec §3.2:
59
+ * - a malformed ADVERT → `{ ok: false, reason }` — the caller stores a
60
+ * rejection marker replacing the peer's advert (classification
61
+ * `advert-rejected`, surfaced loudly — never silence);
62
+ * - a malformed alarm MARKER (bad episodeId format / bad row hash) → the
63
+ * MARKER is dropped with a named reason, the advert's other fields STAND
64
+ * (R3-N9 — appends render only clamp-passed ids);
65
+ * - `rowIdentityHashes` longer than the 72-row bound → truncated + flagged
66
+ * `rowsTruncated` (receive-clamp honesty; truncation NEVER grants coverage).
67
+ */
68
+ export function clampCoherenceAdvert(raw) {
69
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw)) {
70
+ return { ok: false, reason: 'not-an-object' };
71
+ }
72
+ const a = raw;
73
+ const instarVersion = a.instarVersion;
74
+ if (typeof instarVersion !== 'string' || !MC_VERSION_ALPHABET.test(instarVersion)) {
75
+ return { ok: false, reason: 'instar-version-format' };
76
+ }
77
+ const protocolVersion = a.protocolVersion;
78
+ if (typeof protocolVersion !== 'number' || !Number.isFinite(protocolVersion)) {
79
+ return { ok: false, reason: 'protocol-version-not-numeric' };
80
+ }
81
+ const manifestHash = a.manifestHash;
82
+ if (typeof manifestHash !== 'string' || !MC_MANIFEST_HASH_RE.test(manifestHash)) {
83
+ return { ok: false, reason: 'manifest-hash-format' };
84
+ }
85
+ const guard = a.guard;
86
+ if (typeof guard !== 'string' || !GUARD_POSTURES.includes(guard)) {
87
+ return { ok: false, reason: 'guard-posture-format' };
88
+ }
89
+ const beatSeq = a.beatSeq;
90
+ if (typeof beatSeq !== 'number' || !Number.isFinite(beatSeq) || beatSeq < 0) {
91
+ return { ok: false, reason: 'beat-seq-not-numeric' };
92
+ }
93
+ const rawFlags = a.flags;
94
+ if (!rawFlags || typeof rawFlags !== 'object' || Array.isArray(rawFlags)) {
95
+ return { ok: false, reason: 'flags-not-an-object' };
96
+ }
97
+ const flagEntries = Object.entries(rawFlags);
98
+ if (flagEntries.length > MC_MAX_ENTRIES) {
99
+ return { ok: false, reason: 'flags-entry-count' };
100
+ }
101
+ const flags = {};
102
+ for (const [k, v] of flagEntries) {
103
+ if (!KEY_ALPHABET.test(k) || k.length > MC_KEY_MAX)
104
+ return { ok: false, reason: 'flag-key-format' };
105
+ if (typeof v !== 'string' || !MC_VALUE_ALPHABET.test(v))
106
+ return { ok: false, reason: 'flag-value-format' };
107
+ flags[k] = v;
108
+ }
109
+ // Byte budgets are measured on the REBUILT serialization (structural join
110
+ // bytes inside the measurement — R4-L4).
111
+ const base = { instarVersion, protocolVersion, manifestHash, guard: guard, beatSeq, flags };
112
+ if (Buffer.byteLength(JSON.stringify(base), 'utf8') > MC_FLAGS_BYTES_MAX) {
113
+ return { ok: false, reason: 'advert-oversize' };
114
+ }
115
+ // Alarm marker: validated separately — a bad marker drops the MARKER, never
116
+ // the advert (the advert's other fields stand; R3-N9).
117
+ let markerDropReason;
118
+ let alarm;
119
+ if (a.alarm !== undefined) {
120
+ const m = a.alarm;
121
+ if (!m || typeof m !== 'object' || Array.isArray(m)) {
122
+ markerDropReason = 'marker-not-an-object';
123
+ }
124
+ else {
125
+ const mo = m;
126
+ const episodeId = mo.episodeId;
127
+ const rawRows = mo.rowIdentityHashes;
128
+ if (typeof episodeId !== 'string' || !MC_EPISODE_ID_RE.test(episodeId)) {
129
+ markerDropReason = 'episode-id-format';
130
+ }
131
+ else if (!Array.isArray(rawRows)) {
132
+ markerDropReason = 'row-hashes-not-a-list';
133
+ }
134
+ else if (rawRows.some((h) => typeof h !== 'string' || !ROW_HASH_RE.test(h))) {
135
+ markerDropReason = 'row-hash-format';
136
+ }
137
+ else {
138
+ const truncated = rawRows.length > MC_MARKER_ROWS_MAX;
139
+ const rows = rawRows.slice(0, MC_MARKER_ROWS_MAX);
140
+ const candidate = {
141
+ episodeId,
142
+ rowIdentityHashes: rows,
143
+ ...(truncated || mo.rowsTruncated === true ? { rowsTruncated: true } : {}),
144
+ };
145
+ if (Buffer.byteLength(JSON.stringify(candidate), 'utf8') > MC_MARKER_BYTES_MAX) {
146
+ markerDropReason = 'marker-oversize';
147
+ }
148
+ else {
149
+ alarm = candidate;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ const advert = { ...base, ...(alarm ? { alarm } : {}) };
155
+ if (Buffer.byteLength(JSON.stringify(advert), 'utf8') > MC_BLOCK_BYTES_MAX) {
156
+ return { ok: false, reason: 'block-oversize' };
157
+ }
158
+ return { ok: true, advert, ...(markerDropReason ? { markerDropReason } : {}) };
159
+ }
160
+ //# sourceMappingURL=machineCoherenceAdvert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machineCoherenceAdvert.js","sourceRoot":"","sources":["../../src/core/machineCoherenceAdvert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,GAEnB,MAAM,+BAA+B,CAAC;AAkDvC;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAyB;IAC/D,MAAM,KAAK,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,6BAA6B,CAAC,CAAC;IAC5F,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,CAAC,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACxC,OAAO,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;AACtE,CAAC;AAED;;;;;GAKG;AACH,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CAAC;gBACpB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAoB,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACzE,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,kBAAkB,EAAE,CAAC;QAC3E,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACjF,CAAC"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * machineCoherenceManifest.ts — the coherence-critical manifest (spec §3.1).
3
+ *
4
+ * A fleet-uniform, code-shipped catalog of the flags/versions whose skew across
5
+ * an agent's OWN machines silently halves a cross-machine guarantee (the F4
6
+ * incident class). The manifest ships ATOMIC with the code — every machine on
7
+ * version V evaluates the SAME set — so a key present on one side only is
8
+ * VERSION skew (already alarmed by the version dimension), never phantom flag
9
+ * skew. Spec: docs/specs/machine-coherence-guard.md §3.1/§3.3.
10
+ *
11
+ * Purity contract: this module is pure + deterministic (no I/O, no clock, no
12
+ * LLM). The evaluator (MachineCoherenceSentinel) and the advert builder both
13
+ * consume it; the manifest-size ratchet + membership-drift guard (§3.1 "N5")
14
+ * are unit tests over the exports here.
15
+ *
16
+ * Faithful elaborations of the spec's §3.1 interface sketch (documented, not
17
+ * silent — see the side-effects artifact):
18
+ * - `dryRunConfigPath?` — the spec's `resolution: 'dev-gate+dryRun'` (and the
19
+ * "(+ dryRun)" raw rows) inherently need to know WHERE the dry-run flag
20
+ * lives; the sketch omitted it. It is folded into the effective value.
21
+ * - The F4 pair (`ws13PinReplicate` + `ws13Reconcile`) is TWO independent
22
+ * entries sharing one guarantee line, so each key is compared on its own —
23
+ * strictly finer-grained than a compound row, never coarser.
24
+ */
25
+ /** How the effective value is computed. */
26
+ export type CoherenceResolution = 'raw' | 'dev-gate' | 'dev-gate+dryRun';
27
+ /** Where a manifest entry's REAL consumer reads its input from (spec §3.1 M8). */
28
+ export type CoherenceReadSource = 'boot' | 'live';
29
+ export interface CoherenceCriticalFlag {
30
+ /** Stable key, e.g. 'seamlessness.ws13PinReplicate'. */
31
+ key: string;
32
+ /** Dotted config path to the entry's input value. */
33
+ configPath: string;
34
+ /** How the effective value is computed. */
35
+ resolution: CoherenceResolution;
36
+ /**
37
+ * Dotted config path to the dry-run flag folded into the effective value.
38
+ * Present for every `dev-gate+dryRun` entry and for the "(+ dryRun)" raw
39
+ * rows. Absent → dry-run is not a dimension for this key.
40
+ */
41
+ dryRunConfigPath?: string;
42
+ /**
43
+ * Where the entry's REAL consumer reads it from (spec §3.1 M8): 'boot' = the
44
+ * boot-time config object (a change needs a restart to take effect) | 'live'
45
+ * = liveConfig (a PATCH /config changes behavior with NO restart, e.g.
46
+ * sessionPool.stage). The resolver MUST read each entry the way its real
47
+ * consumer does, or the advert lies about effective behavior.
48
+ */
49
+ readSource: CoherenceReadSource;
50
+ /** One line: the cross-machine guarantee a mixed pool halves (alarm body). */
51
+ guarantee: string;
52
+ }
53
+ /**
54
+ * The 7 WS2 replicated stores whose per-store `enabled` (+ dryRun) is
55
+ * coherence-critical (replicated-memory reach: a non-advertising peer silently
56
+ * drops the kind). Shipped as a CODE constant, NOT config-derived, so the
57
+ * manifest is fleet-uniform (a fleet config with no stateSync block still
58
+ * carries all 7 rows — same set on every machine at version V).
59
+ */
60
+ export declare const COHERENCE_STATE_SYNC_STORES: readonly ["preferences", "relationships", "learnings", "knowledge", "evolutionActions", "userRegistry", "topicOperator"];
61
+ /**
62
+ * COHERENCE_CRITICAL_FLAGS — the manifest (spec §3.1 table). Fleet-uniform,
63
+ * code-shipped. Order is stable (drives manifestHash determinism after sort).
64
+ */
65
+ export declare const COHERENCE_CRITICAL_FLAGS: CoherenceCriticalFlag[];
66
+ /**
67
+ * Explicit membership-exclusion list (spec §3.1 "N5" membership drift guard):
68
+ * every `multiMachine.*` DEV_GATED_FEATURES entry not in the manifest must be
69
+ * named here with a one-line reason. Adding a new coherence-relevant dev-gated
70
+ * flag without a manifest decision fails the drift-guard build test — the F4
71
+ * class cannot be silently re-created for future flags.
72
+ */
73
+ export interface CoherenceManifestExclusion {
74
+ configPath: string;
75
+ reason: string;
76
+ }
77
+ export declare const COHERENCE_MANIFEST_EXCLUSIONS: CoherenceManifestExclusion[];
78
+ export declare const MC_MAX_ENTRIES = 64;
79
+ export declare const MC_KEY_MAX = 64;
80
+ export declare const MC_VALUE_MAX = 32;
81
+ /** fixed-fields + flags portion of the advert, serialized. */
82
+ export declare const MC_FLAGS_BYTES_MAX = 2048;
83
+ /** the §3.2 alarm marker sub-budget. */
84
+ export declare const MC_MARKER_BYTES_MAX = 1536;
85
+ /** whole coherenceAdvert block. */
86
+ export declare const MC_BLOCK_BYTES_MAX = 3584;
87
+ /** alarm marker rowIdentityHashes clamp (>= any ratchet-passing manifest's row count). */
88
+ export declare const MC_MARKER_ROWS_MAX = 72;
89
+ /** per-row identity hash length (truncated, hex). */
90
+ export declare const MC_ROW_HASH_LEN = 16;
91
+ /** Effective-value alphabet for a clamped scalar (spec §3.1/M4/R5-N3). */
92
+ export declare const MC_VALUE_ALPHABET: RegExp;
93
+ /** instarVersion alphabet (spec §3.2 M4 receive clamp). */
94
+ export declare const MC_VERSION_ALPHABET: RegExp;
95
+ /** manifestHash: 64 lowercase hex. */
96
+ export declare const MC_MANIFEST_HASH_RE: RegExp;
97
+ /** episodeId format (spec §3.2 N4). */
98
+ export declare const MC_EPISODE_ID_RE: RegExp;
99
+ /** Read a dotted config path off a plain object (undefined on any miss). */
100
+ export declare function getByPath(obj: unknown, dotted: string): unknown;
101
+ /** The config view the resolver reads: a boot config object + optional live getter. */
102
+ export interface CoherenceConfigView {
103
+ /** The full boot-time agent config object. */
104
+ boot: Record<string, unknown>;
105
+ /**
106
+ * Optional live-config getter (liveConfig.get(path, fallback)). Used for
107
+ * `readSource: 'live'` entries so a PATCH /config change is reflected with no
108
+ * restart. Absent → live entries fall back to the boot value.
109
+ */
110
+ liveGet?: (path: string, fallback: unknown) => unknown;
111
+ }
112
+ /**
113
+ * Resolve one manifest entry's effective value against a config view.
114
+ * Deterministic; identical across two machines on the same manifest generation.
115
+ * Returns a clamped scalar string ('live' | 'dry-run' | 'off' | a stage class).
116
+ */
117
+ export declare function resolveFlagValue(entry: CoherenceCriticalFlag, view: CoherenceConfigView): string;
118
+ /**
119
+ * Build the manifest-resolved effective-value map (advert `flags`). Keys are the
120
+ * manifest keys, values clamped scalars. Deterministic + pure.
121
+ */
122
+ export declare function buildCoherenceFlags(view: CoherenceConfigView): Record<string, string>;
123
+ /**
124
+ * Compute the manifest hash — sha256 over the sorted ENTRIES (key + resolution
125
+ * + readSource), NOT just the key list (spec §3.1 M7: two builds can share keys
126
+ * but differ in resolution semantics). Lowercase hex, 64 chars.
127
+ */
128
+ export declare function computeManifestHash(flags?: CoherenceCriticalFlag[]): string;
129
+ /** The manifest hash for THIS build's shipped manifest (memoized-safe, pure). */
130
+ export declare function selfManifestHash(): string;
131
+ /** Protocol version this build advertises (mirrors the seamlessness layer). */
132
+ export declare function selfProtocolVersion(): number;
133
+ //# sourceMappingURL=machineCoherenceManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machineCoherenceManifest.d.ts","sourceRoot":"","sources":["../../src/core/machineCoherenceManifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,2CAA2C;AAC3C,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,UAAU,GAAG,iBAAiB,CAAC;AAEzE,kFAAkF;AAClF,MAAM,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