phaedo-mcp 0.2.2 → 0.3.1

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 (68) hide show
  1. package/NOTICE +17 -0
  2. package/README.md +182 -19
  3. package/action-binding.js +82 -0
  4. package/agreement.js +86 -2
  5. package/ap2.js +214 -0
  6. package/autonomy-promotion.js +280 -0
  7. package/build-package.mjs +25 -10
  8. package/capture-a11y.js +116 -0
  9. package/capture-local.js +85 -0
  10. package/capture-sync.js +99 -0
  11. package/consult-core.js +126 -8
  12. package/consult-policy.js +427 -33
  13. package/consult-runtime.js +60 -0
  14. package/consult.js +29 -1
  15. package/delegation-sync.js +95 -0
  16. package/escalation-policy.sample.json +13 -0
  17. package/escalation.js +383 -0
  18. package/fingerprint-source.js +112 -13
  19. package/health.js +54 -0
  20. package/hooks/pre-ship.mjs +409 -0
  21. package/hooks/session-end.mjs +244 -0
  22. package/hooks/stop-capture.mjs +140 -0
  23. package/install.mjs +226 -36
  24. package/lib/capture-home.js +46 -0
  25. package/lib/domain.js +101 -0
  26. package/lib/is-main.js +40 -0
  27. package/lib/phaedo-crypto.js +17 -1
  28. package/package.json +29 -5
  29. package/phone-source.js +85 -12
  30. package/projection.js +4 -1
  31. package/pull.js +19 -3
  32. package/receipts-sync.js +197 -0
  33. package/receipts.js +34 -3
  34. package/server.js +323 -54
  35. package/server.json +3 -3
  36. package/ship-actions.js +164 -0
  37. package/ship-readout.js +106 -0
  38. package/signing-audit.js +111 -0
  39. package/signing-request.js +217 -0
  40. package/signing.js +176 -0
  41. package/vendor/authored-source.js +250 -0
  42. package/vendor/capabilities.js +203 -0
  43. package/vendor/capture/capture-core.js +67 -0
  44. package/vendor/capture/detectors.js +287 -0
  45. package/vendor/capture/exchanges.js +77 -0
  46. package/vendor/capture/model-detect.js +195 -0
  47. package/vendor/capture/owner.js +35 -0
  48. package/vendor/capture/package.json +4 -0
  49. package/vendor/capture/source-id.js +56 -0
  50. package/vendor/capture/state.js +148 -0
  51. package/vendor/capture/transcript.js +184 -0
  52. package/vendor/commitments.js +169 -0
  53. package/vendor/context-block.js +251 -18
  54. package/vendor/envelope.js +50 -4
  55. package/vendor/extraction/capture-combine.js +160 -0
  56. package/vendor/extraction/catalog.js +232 -0
  57. package/vendor/extraction/delta-lift.js +109 -0
  58. package/vendor/extraction/fingerprint-update.js +227 -0
  59. package/vendor/extraction/package.json +4 -0
  60. package/vendor/extraction/persist.js +45 -0
  61. package/vendor/extraction/reconcile.js +310 -0
  62. package/vendor/extraction/resolve.js +178 -0
  63. package/vendor/extraction/rule-promotion.js +103 -0
  64. package/vendor/kdf.js +20 -1
  65. package/vendor/protocol.js +7 -0
  66. package/vendor/signal-ledger.js +402 -0
  67. package/vendor/trait-phrases.js +656 -0
  68. package/vendored-files.mjs +86 -0
@@ -0,0 +1,86 @@
1
+ // The single source of truth for WHICH monorepo modules the published MCP server carries.
2
+ //
3
+ // Two consumers have to agree on this list and previously each kept its own copy:
4
+ // - mcp/build-package.mjs copies them into mcp/vendor/ at pack time
5
+ // - scripts/export-public-repo.mjs ships them into the public open-core repo
6
+ //
7
+ // They drifted, and the drift was invisible because each list is correct in isolation.
8
+ // `commitments.js` was added to the vendor set when §5.7 shipped (v0.1.49) and never added
9
+ // to the export, and the export never carried `capture/` or the extraction modules at all —
10
+ // so the public repo could not run `npm run build` or `npm test`, because `mcp/vendor/` is
11
+ // gitignored there and rebuilt at pack time. Nobody noticed because nothing exercised the
12
+ // public tree end to end.
13
+ //
14
+ // Same shape as the other "two lists that must agree" bugs in this codebase: make it ONE
15
+ // list, and assert the tie. scripts/test_public_export.mjs is the assertion.
16
+ //
17
+ // NOTE ON WHAT IS PUBLIC: every file named here already ships publicly, verbatim, inside the
18
+ // `phaedo-mcp` npm tarball. Listing them for the open-core git repo discloses nothing new.
19
+ // The proprietary parts — the trained models, the corpus generation, the extension and mobile
20
+ // surfaces — are not here and must not be added.
21
+
22
+ /** Root-level modules vendored into mcp/vendor/. */
23
+ export const ROOT_FILES = [
24
+ 'authored-source.js',
25
+ 'capabilities.js',
26
+ 'context-block.js',
27
+ 'protocol.js',
28
+ 'envelope.js',
29
+ 'kdf.js',
30
+ 'identity.js',
31
+ 'commitments.js',
32
+ // extraction/reconcile.js imports it (per-source signal ledgers, multi-browser sync).
33
+ 'signal-ledger.js',
34
+ // extraction/rule-promotion.js imports it (one plain sentence per trait, 2026-10-08).
35
+ 'trait-phrases.js',
36
+ ];
37
+
38
+ /** capture/ — the capture hook + tier-3 fold closure, vendored to mcp/vendor/capture/. */
39
+ export const CAPTURE_FILES = [
40
+ 'transcript.js',
41
+ 'exchanges.js',
42
+ 'capture-core.js',
43
+ 'detectors.js',
44
+ 'model-detect.js',
45
+ 'source-id.js',
46
+ 'state.js',
47
+ 'owner.js',
48
+ 'package.json',
49
+ ];
50
+
51
+ /** extraction/ — vendored to mcp/vendor/extraction/. */
52
+ export const EXTRACTION_FILES = [
53
+ 'delta-lift.js',
54
+ 'persist.js',
55
+ 'reconcile.js',
56
+ 'rule-promotion.js',
57
+ 'capture-combine.js',
58
+ 'fingerprint-update.js',
59
+ 'resolve.js',
60
+ 'catalog.js',
61
+ 'package.json',
62
+ ];
63
+
64
+ /**
65
+ * Extra root modules the PUBLIC repo needs that are NOT vendored into the npm package.
66
+ *
67
+ * These exist so the public tree's own test suites can actually run. Shipping a repo whose
68
+ * tests are present but unrunnable is worse than not shipping them: it reads as coverage
69
+ * that does not exist.
70
+ *
71
+ * - `sync-merge.js` — mcp/test-delegation-sync.mjs locks the extension-side merge round-trip
72
+ * through `../sync-merge.js`.
73
+ * - `migration.js` — spec/test-schemas.mjs imports it (§4.2 envelope + §4.7 layer-key
74
+ * migration; the producer↔schema tie asserts against it).
75
+ * - `export.js` — spec/test-vectors.mjs needs it for the §8.2 bootstrap-export vectors.
76
+ * - `user-config.js` — spec/test-schemas.mjs imports it (§5 User Configuration sibling
77
+ * artifact; the schema tie asserts the producer against it).
78
+ *
79
+ * Unlike ROOT_FILES these are NOT already public via the npm tarball, so adding to this list
80
+ * is a real disclosure decision. `migration.js`, `export.js` and `user-config.js` were
81
+ * owner-approved 2026-07-25 on a stated test: each is a reference implementation of a
82
+ * PUBLISHED spec section (§4.2/§4.7, §8.2, §5) containing no model, no corpus and no key
83
+ * material — which is precisely what an open-core spec repo is for. Each was read before
84
+ * being added, not assumed. Apply the same test before adding anything else here.
85
+ */
86
+ export const EXPORT_ONLY_ROOT_FILES = ['sync-merge.js', 'migration.js', 'export.js', 'user-config.js'];