instar 1.3.1335 → 1.3.1336

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.
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "35448db940d659661ebdfb09761439033f93a15157540ee2f6eecf825488e1e6",
5
- "packageVersion": "1.3.1335",
5
+ "packageVersion": "1.3.1336",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "192708e0596041ea998bfadb1f25e4bf3ad421836bc2968f5161f8540f091c41",
2
+ "sha256": "aca43025a5acfdf9c9a6eee3c9fc8a023d94ca429fcf36c65993528a00272429",
3
3
  "registrySha256": "35448db940d659661ebdfb09761439033f93a15157540ee2f6eecf825488e1e6",
4
- "packageVersion": "1.3.1335"
4
+ "packageVersion": "1.3.1336"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "35448db940d659661ebdfb09761439033f93a15157540ee2f6eecf825488e1e6",
3
3
  "articleCount": 92,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1335"
5
+ "packageVersion": "1.3.1336"
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityManager.d.ts","sourceRoot":"","sources":["../../src/identity/IdentityManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqBH,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAElB,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,qBAAqB;IACpC,gGAAgG;IAChG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,+FAA+F;IAC/F,cAAc,CAAC,EAAE,MAAM,CA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AAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAkC;gBAEtC,QAAQ,EAAE,MAAM;IAK5B;;;;;;;;;OASG;IACH,MAAM,CAAC,OAAO,GAAE,qBAA0B,GAAG,oBAAoB;IA8DjE;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,GAAE,mBAAwB,GAAG,iBAAiB,GAAG,IAAI;IAmEjE;;OAEG;IACH,GAAG,IAAI,iBAAiB,GAAG,IAAI;IAI/B;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;;OAGG;IACH,OAAO,IAAI,YAAY,GAAG,IAAI;IAM9B,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,WAAW;CAGpB"}
@@ -107,7 +107,15 @@ export class CanonicalIdentityManager {
107
107
  return null;
108
108
  const file = loaded.raw;
109
109
  let privateKey;
110
- if (file.privateKeyEncryption === 'none') {
110
+ // The pairing installer (installAgentIdentityFromPairing) writes a
111
+ // plaintext key with no `privateKeyEncryption` field (spec:
112
+ // joined-machine-unified-trust). An ABSENT field therefore means 'none'.
113
+ // readIdentityKeyFile has already validated that file as a plaintext pair
114
+ // (32-byte seed whose public key matches), so a ciphertext key without the
115
+ // field never reaches here. A field that is present but holds anything
116
+ // other than the two known methods is still refused below.
117
+ const declaresNoEncryption = file.privateKeyEncryption === 'none' || !('privateKeyEncryption' in loaded.raw);
118
+ if (declaresNoEncryption) {
111
119
  privateKey = loaded.privateKey;
112
120
  }
113
121
  else if (file.privateKeyEncryption === 'xchacha20-poly1305+argon2id') {
@@ -129,13 +137,17 @@ export class CanonicalIdentityManager {
129
137
  else {
130
138
  throw new Error(`Unknown encryption method: ${file.privateKeyEncryption}`);
131
139
  }
140
+ // The installer shape also carries no canonicalId / displayFingerprint.
141
+ // Both are pure functions of the public key, so derive them when absent
142
+ // (or empty).
143
+ const canonicalId = file.canonicalId || computeCanonicalId(loaded.publicKey);
132
144
  const identity = {
133
145
  version: file.version,
134
146
  publicKey: loaded.publicKey,
135
147
  privateKey,
136
148
  x25519PublicKey: deriveX25519PublicKey(privateKey),
137
- canonicalId: file.canonicalId,
138
- displayFingerprint: file.displayFingerprint,
149
+ canonicalId,
150
+ displayFingerprint: file.displayFingerprint || computeDisplayFingerprint(canonicalId),
139
151
  createdAt: file.createdAt,
140
152
  recoveryCommitment: file.recoveryCommitment,
141
153
  migrationComplete: file.migrationComplete,
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityManager.js","sourceRoot":"","sources":["../../src/identity/IdentityManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,GAIxB,MAAM,YAAY,CAAC;AAsBpB,wEAAwE;AAExE,MAAM,OAAO,wBAAwB;IAClB,QAAQ,CAAS;IACjB,YAAY,CAAS;IAC9B,QAAQ,GAA6B,IAAI,CAAC;IAElD,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,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": "1.3.1336",
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-10-09T16:37:23.676Z",
5
- "instarVersion": "1.3.1335",
4
+ "generatedAt": "2026-10-09T17:55:56.614Z",
5
+ "instarVersion": "1.3.1336",
6
6
  "entryCount": 203,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "generatedFrom": "source-tree",
4
4
  "registrySha256": "35448db940d659661ebdfb09761439033f93a15157540ee2f6eecf825488e1e6",
5
- "packageVersion": "1.3.1335",
5
+ "packageVersion": "1.3.1336",
6
6
  "guards": [
7
7
  {
8
8
  "ref": "docs/audits/phase-b/f10-triage.md",
@@ -1,5 +1,5 @@
1
1
  {
2
- "sha256": "192708e0596041ea998bfadb1f25e4bf3ad421836bc2968f5161f8540f091c41",
2
+ "sha256": "aca43025a5acfdf9c9a6eee3c9fc8a023d94ca429fcf36c65993528a00272429",
3
3
  "registrySha256": "35448db940d659661ebdfb09761439033f93a15157540ee2f6eecf825488e1e6",
4
- "packageVersion": "1.3.1335"
4
+ "packageVersion": "1.3.1336"
5
5
  }
@@ -2,5 +2,5 @@
2
2
  "sha256": "35448db940d659661ebdfb09761439033f93a15157540ee2f6eecf825488e1e6",
3
3
  "articleCount": 92,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1335"
5
+ "packageVersion": "1.3.1336"
6
6
  }
@@ -0,0 +1,23 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ A bug fix (spec: `docs/specs/joined-machine-unified-trust.md`, ACT-072). A machine that joined an existing agent by pairing saves the agent's identity file without a `privateKeyEncryption` field, because the key it saves is not encrypted. `CanonicalIdentityManager.load()` refused any file without that field (`Unknown encryption method: undefined`), so the unified trust layer (authorization policy, trust audit log, invitations, verified pairing, MoltBridge identity) never started on a joined machine; the boot only logged `Unified trust system init failed (non-fatal)`.
9
+
10
+ The loader now reads a missing field as "not encrypted", which is what the pairing installer means and what every other reader of the file already assumed. It accepts the file only after the existing checks pass: the private key must be a 32-byte seed whose public key matches. The two identifiers the short file lacks (`canonicalId`, `displayFingerprint`) are computed from the public key. A field that is present but unknown is still refused, and a malformed key is still refused with the file left untouched. Nothing is written to disk.
11
+
12
+ ## What to Tell Your User
13
+
14
+ If you run me on more than one computer, my trust settings now work on every one of them, not just the first. Before, a computer that joined later quietly ran without them. It fixes itself the next time that computer starts; there is nothing to do.
15
+
16
+ ## Summary of New Capabilities
17
+
18
+ - No new capability. Joined machines regain the unified trust layer the first machine already had.
19
+
20
+ ## Evidence
21
+
22
+ - `tests/unit/identity/IdentityKeyFile.test.ts`: the installer shape loads with the right key and identifiers and the file unchanged; a declared unknown or `null` method, a non-seed private key, and a mismatched pair are still refused.
23
+ - `tests/integration/joined-machine-unified-trust.test.ts`: a real source identity, sealed and installed by the real pairing code, then `createUnifiedTrustSystem` on the joiner: no error, same identity as the source, and a signature made on the joiner verifies against the source key. Both tests fail on the previous code.
@@ -0,0 +1,98 @@
1
+ # Side-Effects Review — Unified trust initialises on a machine that joined via pairing
2
+
3
+ **Version / slug:** `joined-machine-unified-trust`
4
+ **Date:** `2026-10-09`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `independent reviewer subagent (see below)`
7
+
8
+ Spec: docs/specs/joined-machine-unified-trust.md (approved under the operator's standing approval, 2026-10-08 14:49). Tracking: ACT-072. Tier 2 (identity keys are a safety surface).
9
+
10
+ ## Summary of the change
11
+
12
+ `CanonicalIdentityManager.load()` (`src/identity/IdentityManager.ts`) threw `Unknown encryption method: undefined` on the canonical `identity.json` that the pairing installer (`installAgentIdentityFromPairing`) writes, because that file has no `privateKeyEncryption`, `canonicalId` or `displayFingerprint` field. `createUnifiedTrustSystem` calls that loader, so on every machine that joined via pairing the boot logged `Unified trust system init failed (non-fatal)` and the unified trust layer never started.
13
+
14
+ - **`src/identity/IdentityManager.ts`** — an ABSENT `privateKeyEncryption` field is read as `'none'`; `canonicalId` and `displayFingerprint` are derived from the public key when absent or empty. This change adds no write (the existing ACT-062 hex repair still runs first for any file).
15
+ - **`tests/unit/identity/IdentityKeyFile.test.ts`** — the PR #2150 test that pinned the refusal is replaced by both sides of the boundary.
16
+ - **`tests/integration/joined-machine-unified-trust.test.ts` (new)** — real seal → real installer write → `createUnifiedTrustSystem`.
17
+
18
+ No config key, route, hook, template section or state schema is added.
19
+
20
+ ## Decision-point inventory
21
+
22
+ - Does the loader accept a canonical file with no declared encryption — **modify** — invariant: accept only when the field is absent AND the shared reader has validated a 32-byte plaintext seed whose public key matches. A present-but-unknown value (including `null`) is still refused.
23
+
24
+ ---
25
+
26
+ ## 1. Over-block
27
+
28
+ No issue identified. The change only removes a refusal; the refusals that remain (malformed key, mismatched pair, unknown declared method) are unchanged.
29
+
30
+ ## 2. Under-block
31
+
32
+ - Could the widening admit a bad key? No: with the field absent, `readIdentityKeyFile` treats the file as plaintext and requires a 32-byte private seed whose derived public key equals the stored one, before the loader branch runs. A ciphertext key shipped without its label (an encrypted source identity handed over by pairing) is refused there. Unit and integration tests pin it.
33
+ - A stored non-empty `canonicalId` / `displayFingerprint` that disagrees with the public key is used as stored, exactly as before this change. Unchanged.
34
+ - A joined machine still has no `recoveryCommitment` / `recoverySalt` (the handover does not carry them), so recovery-phrase rotation is unavailable there. Pre-existing and unaffected.
35
+
36
+ ## 3. Level-of-abstraction fit
37
+
38
+ The loader is the one reader that disagreed with every other reader of this file about an absent field (`readIdentityKeyFile`, `TelegramOriginBoot`, the window send-time guard all read absent as "not encrypted"). Fixing the loader fixes new and already-joined machines with no migration; changing the installer would have required a migration that rewrites private-key files.
39
+
40
+ ## 4. Signal vs authority compliance
41
+
42
+ No blocking authority is added; a deterministic invariant on key bytes stays the arbiter. Compliant with `docs/signal-vs-authority.md`.
43
+
44
+ ## 4b. Judgment-point check
45
+
46
+ No judgment-shaped decision point (all invariant).
47
+
48
+ ## 5. Interactions
49
+
50
+ Unified trust now starts on joined machines, so they behave like the machine they joined. Concretely, the consumers of `ctx.unifiedTrust` in `src/server/routes.ts` that returned "no trust manager" before now get the real one on a joined machine:
51
+ - Threadline pairing list / verify / deny routes and the verified-pairing credential-share gate use the real trust manager instead of their no-trust-manager branch.
52
+ - A2A local-route trust (`threadline.localRouteTrust`, dev-gated, dry-run by default) now evaluates on a joined machine instead of counting "no trust manager". In dry-run it only logs and counts; enforcement remains the operator's explicit `dryRun: false`.
53
+ - MoltBridge (only when `moltbridge.enabled`) initialises with the agent identity — the same identity as the source machine.
54
+ These are the same behaviours the source machine already had; no new behaviour exists anywhere that did not exist on the first machine.
55
+
56
+ ## 6. External surfaces
57
+
58
+ - Boot log on a joined machine: `Unified trust system initialized (identity: <displayFingerprint>)` replaces `Unified trust system init failed (non-fatal): Unknown encryption method: undefined`.
59
+ - No file is rewritten; no route, protocol or wire change.
60
+
61
+ ## 6b. Operator-surface quality
62
+
63
+ No operator surface added.
64
+
65
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
66
+
67
+ The agent identity stays unified (moved only by the sealed pairing handover). This change removes a cross-machine incoherence: the trust layer existed on the first machine and not on joiners. Each machine reads its own canonical file (machine-local by the protected trust-anchor rule, spec marker `physical-credential-locality`); the derived identifiers are a pure function of the public key, so every machine computes the same values with no coordination. No user-facing notice, URL, topic binding or durable state is added.
68
+
69
+ ## 8. Rollback cost
70
+
71
+ Revert the commit. The previous loader refuses the installer shape again (the pre-fix state). No file was rewritten, so nothing on disk needs repair.
72
+
73
+ ## Conclusion
74
+
75
+ The build follows the spec. Ungated: it repairs a permanent failure and is inert for any machine whose canonical file declares its encryption (every minted identity does). Clear to ship.
76
+
77
+ ## Evidence pointers
78
+
79
+ - `tests/unit/identity/IdentityKeyFile.test.ts` — "CanonicalIdentityManager.load — the pairing installer shape (ACT-072)": accepted with derived identifiers and file unchanged; the same shape stored as hex repaired then loaded with no field added; empty identifiers derived; declared unknown, `null` and empty methods refused; non-seed private key refused and file untouched; mismatched pair refused. The acceptance test was confirmed to fail on the previous loader.
80
+ - `tests/integration/joined-machine-unified-trust.test.ts` — real canonical identity → `readAgentIdentityForHandover` → `sealIdentityForJoiner` → `installAgentIdentityFromPairing` → `createUnifiedTrustSystem`: same public key, canonicalId and displayFingerprint as the source, file byte-identical, a signature with the loaded key verifies against the source key; a malformed installer-shaped file still throws `IdentityFileInvalidError` and is untouched. Confirmed to fail on the previous loader with `Unknown encryption method: undefined`.
81
+
82
+ ## Class-Closure Declaration (display-only mirror)
83
+
84
+ Not applicable: no self-triggered controller and no agent-authored-artifact defect. The class is "one reader disagrees with the writer about an absent field"; every other reader of this file already read absent as plaintext.
85
+
86
+ ## Second-pass review
87
+
88
+ **Reviewer:** independent adversarial/security reviewer subagent (read the spec, the diff and every reader of the canonical file; ran no tests). The codex GPT-tier spec review (`gpt-6-astra`) also ran; its findings are in the convergence report.
89
+ **Independent read of the artifact: concur**
90
+
91
+ Nothing material. Confirmed: the widening admits only a validated plaintext pair (the shared reader runs first; ciphertext without its label is 72 bytes and is refused); the `in` check survives a hex repair (the repair spreads the raw object and adds no encryption field); the derived identifiers equal what `create()`, `Migration.ts` and `KeyRotation.ts` compute, and the handover ships the source public key unchanged; no other reader needs these fields from disk (`AgentServer` reads only `publicKey`; `routes.ts` and `TelegramOriginBoot` already read absent as plaintext; MoltBridge reads the loaded identity).
92
+
93
+ Minor findings and what was done:
94
+ 1. Empty stored identifiers passed through `??`. **Fixed:** empty is derived; test added.
95
+ 2. No test for a hex-stored installer shape or a declared empty method. **Fixed:** both added.
96
+ 3. Recovery data is not carried by the handover. **Recorded** in the spec and the under-block section (pre-existing).
97
+ 4. MoltBridge (when enabled) now initialises on a joined machine under the same identity. **Recorded** in the spec's multi-machine posture and §5 (intended).
98
+ 5. A stored non-empty `canonicalId` is not checked against the key. **Recorded** (pre-existing, unchanged).