instar 1.3.574 → 1.3.575

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.
@@ -24,9 +24,6 @@ export declare const WS2_SEND_WIRED_STORES: ReadonlyArray<string>;
24
24
  * - userRegistry: fully seamed manager (emitPut + emitDelete); its canonical write
25
25
  * instance lives in the AgentServer, so it needs the emitter plumbed there before it
26
26
  * can be wired (WS2-SEND-2b).
27
- * - topicOperator: seamed put-only (a topic rebinds, never unbinds — no emitDelete by
28
- * construction); its authoritative writer is the AgentServer's TopicOperatorStore, so it
29
- * needs the emitter plumbed there before it can be wired (WS2-SEND-2b).
30
27
  * - preferences: NO manager emit seam yet — it rode the deprecated `preferences-sync`
31
28
  * verb; needs a manager emit hook before it can be wired (WS2-SEND-3).
32
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ws2SendWiring.d.ts","sourceRoot":"","sources":["../../src/core/ws2SendWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;+CAE+C;AAC/C,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAKtD,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC,MAAM,CAIxD,CAAC;AAEH,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAEjE,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAI1D;AAED,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6FAA6F;IAC7F,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,EAAE,EAAE,OAAO,CAAC;CACb;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,kBAAkB,CAW9F"}
1
+ {"version":3,"file":"ws2SendWiring.d.ts","sourceRoot":"","sources":["../../src/core/ws2SendWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;+CAE+C;AAC/C,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAMtD,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,aAAa,CAAC,MAAM,CAGxD,CAAC;AAEH,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,CAAC;AAEjE,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAI1D;AAED,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6FAA6F;IAC7F,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,EAAE,EAAE,OAAO,CAAC;CACb;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,kBAAkB,CAW9F"}
@@ -22,6 +22,7 @@ export const WS2_SEND_WIRED_STORES = Object.freeze([
22
22
  'relationships',
23
23
  'knowledge',
24
24
  'evolutionActions',
25
+ 'topicOperator',
25
26
  ]);
26
27
  /**
27
28
  * Stores registered for RECEIVE but whose SEND wiring is a KNOWN, enumerated
@@ -29,15 +30,11 @@ export const WS2_SEND_WIRED_STORES = Object.freeze([
29
30
  * - userRegistry: fully seamed manager (emitPut + emitDelete); its canonical write
30
31
  * instance lives in the AgentServer, so it needs the emitter plumbed there before it
31
32
  * can be wired (WS2-SEND-2b).
32
- * - topicOperator: seamed put-only (a topic rebinds, never unbinds — no emitDelete by
33
- * construction); its authoritative writer is the AgentServer's TopicOperatorStore, so it
34
- * needs the emitter plumbed there before it can be wired (WS2-SEND-2b).
35
33
  * - preferences: NO manager emit seam yet — it rode the deprecated `preferences-sync`
36
34
  * verb; needs a manager emit hook before it can be wired (WS2-SEND-3).
37
35
  */
38
36
  export const WS2_SEND_PENDING_STORES = Object.freeze([
39
37
  'userRegistry',
40
- 'topicOperator',
41
38
  'preferences',
42
39
  ]);
43
40
  /** Classify a registered store's send-wiring status. */
@@ -1 +1 @@
1
- {"version":3,"file":"ws2SendWiring.js","sourceRoot":"","sources":["../../src/core/ws2SendWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;+CAE+C;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAA0B,MAAM,CAAC,MAAM,CAAC;IACxE,WAAW;IACX,eAAe;IACf,WAAW;IACX,kBAAkB;CACnB,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA0B,MAAM,CAAC,MAAM,CAAC;IAC1E,cAAc;IACd,eAAe;IACf,aAAa;CACd,CAAC,CAAC;AAKH,wDAAwD;AACxD,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAC1D,IAAI,uBAAuB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC9D,OAAO,cAAc,CAAC;AACxB,CAAC;AAWD;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,gBAAuC;IACxE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QACpC,IAAI,MAAM,KAAK,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,K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C,IAAI,CAAC,KAAK,CAAC,CAAC;aACrC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;YAC9C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;AACzE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.574",
3
+ "version": "1.3.575",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-06-15T18:18:56.240Z",
5
- "instarVersion": "1.3.574",
4
+ "generatedAt": "2026-06-15T18:40:34.283Z",
5
+ "instarVersion": "1.3.575",
6
6
  "entryCount": 201,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -0,0 +1,44 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ The `topicOperator` store is now wired into the WS2 send-side (a PII kind; WS2-SEND-2b).
9
+ Its authoritative writer is the AgentServer's own `TopicOperatorStore`, so the generic
10
+ emitter (#1168) is attached to `server.getTopicOperatorStore()` right after the AgentServer
11
+ is constructed, and `topicOperator` flips PENDING→WIRED in the send-wiring ratchet. The
12
+ union reader + disclosure-minimized projection already shipped (WS2.6). PUT-ONLY by
13
+ construction — a topic rebinds, never unbinds. Dark by default
14
+ (`multiMachine.stateSync.topicOperator`). No new route/verb/config-default/migration.
15
+
16
+ ## What to Tell Your User
17
+
18
+ - **Who-runs-which-topic now travels across machines**: "If you run me on more than one
19
+ machine, the verified operator I bound for a topic on one machine is visible as advisory
20
+ context on the others — so a topic's operator isn't re-learned from scratch per machine.
21
+ Only the platform-verified identity crosses (the verified user id + display name) — a name
22
+ that merely appears in a message can never become an operator. Crucially, a binding that
23
+ arrives from another machine is treated as a HINT, never as the final word on 'who is my
24
+ operator here' — only a binding I make locally from an authenticated sender is
25
+ authoritative. It stays off until you ask me to turn on multi-machine sync." ⚗️
26
+ Experimental — ships dark.
27
+
28
+ ## Summary of New Capabilities
29
+
30
+ | Capability | How to Use |
31
+ |-----------|-----------|
32
+ | Cross-machine visibility of verified topic-operator bindings (advisory) | Automatic once `multiMachine.stateSync.topicOperator` is enabled (off by default) |
33
+ | Put-only by construction — a rebind supersedes by HLC; a topic never unbinds | Automatic |
34
+ | Know-Your-Principal preserved — a replicated record is never authoritative for inbound resolution | Automatic (local authenticated bind always wins) |
35
+
36
+ ## Evidence
37
+
38
+ Verified by a two-instance in-process E2E
39
+ (`tests/e2e/ws2-topicoperator-cross-instance.test.ts`): a `setOperator` bind on instance A
40
+ is read back on B through the bypass-proof union reader as a foreign-origin record keyed on
41
+ (topicId + verified uid), carrying only the verified uid + lowercased names + platform; and
42
+ an idempotent re-bind with a later `boundAt` re-replicates the latest record (put-only —
43
+ there is no delete path). `tsc --noEmit` clean; the new e2e (2) passes; the ws2-send-wiring
44
+ integration ratchet (4) accepts the PENDING→WIRED move.
@@ -0,0 +1,45 @@
1
+ # Side-Effects Review — WS2-SEND-2b: topicOperator send-side replication
2
+
3
+ **Version / slug:** `ws2-send-2b-topicoperator`
4
+ **Date:** `2026-06-15`
5
+ **Author:** `Instar Agent (echo)`
6
+ **Second-pass reviewer:** `not required` (no block/allow/lifecycle authority — additive, dark-gated data-replication wiring; see §4)
7
+
8
+ ## Summary of the change
9
+
10
+ Extends WS2 send-side emission to the `topicOperator` store (a PII kind; WS2-SEND-2b). Unlike the seamed memory stores, topicOperator's authoritative writer is the AgentServer's OWN `TopicOperatorStore` (constructed internally at `AgentServer.ts:1092`, bound from the authenticated sender via `setOperator`). server.ts has no canonical instance of its own, so the emitter is attached AFTER the AgentServer exists, in server.ts right after `_agentServerRef = server`, via `server.getTopicOperatorStore()?.setOperatorReplicationEmitter(...)`. `ws2SendWiring.ts` moves `topicOperator` PENDING→WIRED. The union reader + projection already shipped (WS2.6). New e2e round-trip.
11
+
12
+ **PUT-ONLY by construction** — a topic-operator binding is rebound, never erased (the manager has no emitDelete path; the receive side resolves the latest binding by HLC). Wiring put-only is the COMPLETE correct behavior, not a deferred gap.
13
+
14
+ ## Decision-point inventory
15
+
16
+ - `ReplicatedRecordEmitter.emit` dark gate (`stateSync.topicOperator.enabled`) — **pass-through** — pre-existing; `topicOperator` becomes a registered emit target. Default false ⇒ no-op.
17
+ - `TopicOperatorStore.setOperator` emit funnel — **pass-through** — already fires emitPut on a real bind/rebind; this attaches a real emitter.
18
+ - `ws2SendWiring` ratchet — **modify** — `topicOperator` reclassified PENDING→WIRED.
19
+
20
+ ---
21
+
22
+ ## 1. Over-block
23
+ No block/allow surface. The emitter never rejects a bind; null recordKey / null projection / over-cap is a counted no-op and the local bind always succeeds.
24
+
25
+ ## 2. Under-block
26
+ Not applicable (no block surface). PUT-ONLY is the correct, complete design: a topic rebinds (a new put supersedes by HLC), never unbinds, so there is no emitDelete to wire. A `buildTopicOperatorTombstoneData` helper exists for symmetry but no manager event fires it — by construction, not omission.
27
+
28
+ ## 3. Level-of-abstraction fit
29
+ Correct layer. The attach point is at the server-composition layer (where the AgentServer and its store exist), which is the only place the authoritative TopicOperatorStore is reachable. The projection lives in `TopicOperatorReplicatedStore` beside the receive-side schema.
30
+
31
+ ## 4. Signal vs authority compliance
32
+ Compliant. No blocking authority. The emitter is additive/best-effort (the funnel swallows + counts faults; a bind can never fail because replication did). **Know Your Principal (REQ-M14):** only the platform-verified `uid` + lowercased display names are emitted — a content name can NEVER become an operator. A replicated topic-operator record is UNTRUSTED peer data and is NEVER the authoritative answer to "who is my verified operator of this topic?" — only the LOCAL bind from an authenticated sender is authoritative. The union read is advisory HIGH-tier. Per `docs/signal-vs-authority.md`.
33
+
34
+ ## 5. Interactions
35
+ - Uses server.ts's single `replicatedRecordEmitter` (in scope at the attach point, constructed earlier). Distinct store key/kind from the other WS2 stores. No double-fire (rides the single setOperator funnel).
36
+ - Touches `server.ts` + `ws2SendWiring.ts` (the shared WS2-SEND files) → serialized on top of merged evolutionActions; no parallel WS2-SEND PRs.
37
+
38
+ ## 6. External surfaces
39
+ Dark by default (`multiMachine.stateSync.topicOperator`). Off ⇒ byte-identical single-machine behavior. On (multi-machine, opt-in): crosses the sha-keyed (topicId + verified uid) projection — platform, uid, lowercased names, boundAt. Same at-rest honesty as relationships (transit encrypted; at-rest plaintext per machine). A received record is quoted `<replicated-untrusted-data>`, advisory only — never adopted as the operator.
40
+
41
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
42
+ **Replicated (put-only).** Path: `TopicOperatorStore.setOperator → emit → CoherenceJournal.emitReplicatedRecord → peer serve/apply → ReplicatedPeerStreamReader → topicOperatorUnionReader`. Identity = sha(topicId + verified uid). A rebind re-emits the latest record (HLC-ordered); there is no delete (a topic never unbinds). Verified end-to-end by the new e2e (put round-trip + idempotent rebind replicates the latest boundAt).
43
+
44
+ ## 8. Rollback cost
45
+ Trivial. Dark by default. Back-out = revert the server.ts + ws2SendWiring.ts change or set the flag false (instant, no migration). Receive-side + envelope schema already shipped, unaffected.