wyrm-mcp 7.2.0 → 7.2.2

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 (156) hide show
  1. package/LICENSE +26 -667
  2. package/NOTICE +14 -33
  3. package/dist/activation.d.ts.map +1 -1
  4. package/dist/activation.js +1 -44
  5. package/dist/activation.js.map +1 -1
  6. package/dist/agent-daemon.js +4 -281
  7. package/dist/agent-loop.js +7 -332
  8. package/dist/analytics.js +13 -236
  9. package/dist/attribution.js +1 -49
  10. package/dist/audit.js +2 -457
  11. package/dist/auto-capture.js +3 -138
  12. package/dist/auto-orchestrator.js +1 -325
  13. package/dist/autoconfig.js +39 -840
  14. package/dist/buddy-runner.js +1 -109
  15. package/dist/buddy.js +14 -564
  16. package/dist/build-flags.js +1 -17
  17. package/dist/capabilities.js +3 -183
  18. package/dist/capture.js +1 -56
  19. package/dist/causality.js +6 -107
  20. package/dist/cli.js +20 -281
  21. package/dist/cloud/cli.js +5 -541
  22. package/dist/cloud/client.js +1 -221
  23. package/dist/cloud/crypto.js +1 -85
  24. package/dist/cloud/machine-id.js +2 -113
  25. package/dist/cloud/recovery.js +1 -60
  26. package/dist/cloud/sync-engine.js +7 -543
  27. package/dist/cloud-backup.js +5 -579
  28. package/dist/cloud-profile.js +1 -138
  29. package/dist/cloud-sync-entrypoint.js +1 -47
  30. package/dist/cloud-sync.js +2 -309
  31. package/dist/constellation.js +12 -168
  32. package/dist/context-build-budgeted.js +4 -144
  33. package/dist/context-ranking.js +1 -69
  34. package/dist/crypto.js +1 -179
  35. package/dist/daemon-write-endpoint.js +1 -290
  36. package/dist/daemon-writer.js +2 -406
  37. package/dist/database.js +43 -1110
  38. package/dist/deprecations.js +2 -162
  39. package/dist/design.js +13 -141
  40. package/dist/event-replication.js +1 -112
  41. package/dist/events-sse.js +7 -43
  42. package/dist/events.js +6 -238
  43. package/dist/failure-patterns.js +42 -659
  44. package/dist/federation.js +12 -236
  45. package/dist/goals.js +13 -101
  46. package/dist/golden.js +3 -355
  47. package/dist/handlers/agent.js +4 -165
  48. package/dist/handlers/alias-adapters.js +1 -129
  49. package/dist/handlers/aliases.js +1 -171
  50. package/dist/handlers/audit.js +1 -87
  51. package/dist/handlers/boundary.js +1 -221
  52. package/dist/handlers/capture.js +73 -1109
  53. package/dist/handlers/causality.js +7 -114
  54. package/dist/handlers/cloud.js +85 -382
  55. package/dist/handlers/companion.js +28 -459
  56. package/dist/handlers/datalake.js +7 -187
  57. package/dist/handlers/dispatch-context.js +0 -22
  58. package/dist/handlers/entity.js +25 -256
  59. package/dist/handlers/events.js +16 -335
  60. package/dist/handlers/failure.js +13 -340
  61. package/dist/handlers/goals.js +4 -296
  62. package/dist/handlers/intelligence.js +126 -674
  63. package/dist/handlers/invoicing.js +1 -70
  64. package/dist/handlers/mcpclient.js +6 -137
  65. package/dist/handlers/orchestration.js +40 -125
  66. package/dist/handlers/output-schemas.js +1 -24
  67. package/dist/handlers/presence.js +3 -99
  68. package/dist/handlers/project.js +28 -182
  69. package/dist/handlers/prompts.js +6 -157
  70. package/dist/handlers/quest.js +4 -224
  71. package/dist/handlers/recall.js +11 -218
  72. package/dist/handlers/registry.js +1 -167
  73. package/dist/handlers/resources.js +1 -288
  74. package/dist/handlers/review.js +11 -74
  75. package/dist/handlers/run.js +17 -487
  76. package/dist/handlers/search.js +15 -326
  77. package/dist/handlers/session.js +28 -615
  78. package/dist/handlers/share.js +8 -184
  79. package/dist/handlers/shims.js +1 -464
  80. package/dist/handlers/skill.js +67 -449
  81. package/dist/handlers/survivors.js +1 -120
  82. package/dist/handlers/symbols.js +8 -109
  83. package/dist/handlers/syncops.js +4 -302
  84. package/dist/handlers/types.js +1 -27
  85. package/dist/harvest.js +5 -191
  86. package/dist/hours.js +7 -156
  87. package/dist/http-auth.js +3 -321
  88. package/dist/http-fast.js +21 -1137
  89. package/dist/icons.js +1 -47
  90. package/dist/index.js +2 -924
  91. package/dist/indexer.js +4 -145
  92. package/dist/intelligence.js +31 -261
  93. package/dist/internal-dispatch.js +3 -212
  94. package/dist/keyset.js +1 -110
  95. package/dist/knowledge-graph.js +12 -176
  96. package/dist/license.d.ts +11 -0
  97. package/dist/license.d.ts.map +1 -1
  98. package/dist/license.js +2 -414
  99. package/dist/license.js.map +1 -1
  100. package/dist/logger.js +2 -199
  101. package/dist/maintenance.js +2 -148
  102. package/dist/mcp-client.js +6 -262
  103. package/dist/memory-artifacts.js +30 -449
  104. package/dist/migrate-prompt.js +2 -124
  105. package/dist/migrations.js +40 -655
  106. package/dist/performance.js +1 -228
  107. package/dist/presence.js +11 -140
  108. package/dist/priority-embed.js +5 -164
  109. package/dist/providers/embedding-provider.js +1 -196
  110. package/dist/readonly-gate.js +1 -29
  111. package/dist/rehydration.js +9 -157
  112. package/dist/reindex.js +1 -88
  113. package/dist/render-target.js +21 -514
  114. package/dist/render.js +4 -280
  115. package/dist/repl-guard.js +1 -173
  116. package/dist/replication-daemon-entrypoint.js +1 -31
  117. package/dist/replication-daemon.js +2 -262
  118. package/dist/resilience.js +1 -591
  119. package/dist/reverse-bridge.js +5 -360
  120. package/dist/security.js +1 -244
  121. package/dist/session-seen.js +3 -51
  122. package/dist/setup.js +1 -260
  123. package/dist/skill-author.js +5 -168
  124. package/dist/spec-kit.js +1 -191
  125. package/dist/sqlite-busy.js +1 -154
  126. package/dist/statusline.js +11 -315
  127. package/dist/sub-agent.js +13 -262
  128. package/dist/summarizer.js +13 -139
  129. package/dist/symbols.js +7 -283
  130. package/dist/sync.js +5 -359
  131. package/dist/tasks-dispatch.js +1 -84
  132. package/dist/tasks.js +1 -282
  133. package/dist/token-budget.js +1 -143
  134. package/dist/tool-analytics.js +7 -129
  135. package/dist/tool-annotations.js +1 -365
  136. package/dist/tool-manifest-v2.json +1 -1
  137. package/dist/tool-manifest.json +1 -1
  138. package/dist/tool-profiles.js +1 -75
  139. package/dist/trace-harvest.js +6 -244
  140. package/dist/types.js +1 -30
  141. package/dist/ui-dashboard.js +41 -50
  142. package/dist/ulid.js +1 -81
  143. package/dist/validate.js +1 -129
  144. package/dist/vault.js +1 -534
  145. package/dist/vectors.js +3 -184
  146. package/dist/version-check.js +4 -136
  147. package/dist/visibility.js +19 -155
  148. package/dist/wyrm-cli.js +98 -2451
  149. package/dist/wyrm-cli.js.map +1 -1
  150. package/dist/wyrm-guard.js +14 -424
  151. package/dist/wyrm-loop.js +3 -150
  152. package/dist/wyrm-manifest.json +1 -1
  153. package/dist/wyrm-statusline-daemon.js +1 -11
  154. package/dist/wyrm-statusline.js +4 -56
  155. package/dist/wyrm-ui.js +9 -77
  156. package/package.json +4 -2
@@ -1,57 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * wyrm-statusline — print a single statusline string and exit.
4
- *
5
- * Designed to be invoked from a client's statusline hook every few seconds.
6
- * Spawns the wyrm-statusline-daemon if not already running (detached, idle-
7
- * times out after 5min). Per-call latency target: ≤ 50ms warm.
8
- *
9
- * Usage:
10
- * wyrm-statusline # default, uses $PWD
11
- * wyrm-statusline --cwd /path # explicit cwd
12
- * wyrm-statusline --session 142 # explicit session id
13
- * wyrm-statusline --json # emit raw JSON instead of formatted text
14
- *
15
- * @copyright 2026 Ghost Protocol (Pvt) Ltd.
16
- */
17
- import { queryDaemon } from './statusline.js';
18
- function parseArgs(argv) {
19
- let cwd = process.cwd();
20
- let sessionId;
21
- let json = false;
22
- for (let i = 2; i < argv.length; i++) {
23
- const a = argv[i];
24
- if (a === '--cwd')
25
- cwd = argv[++i];
26
- else if (a === '--session')
27
- sessionId = Number(argv[++i]);
28
- else if (a === '--json')
29
- json = true;
30
- }
31
- return { cwd, sessionId, json };
32
- }
33
- async function main() {
34
- const { cwd, sessionId, json } = parseArgs(process.argv);
35
- try {
36
- // Forward the binary's per-call env so each invocation can toggle
37
- // privacy / savings without daemon restart.
38
- const resp = await queryDaemon({
39
- cwd,
40
- sessionId,
41
- privateMode: process.env.WYRM_STATUSLINE_PRIVATE === '1',
42
- showSavings: process.env.WYRM_STATUSLINE_SHOW_SAVINGS === '1',
43
- });
44
- if (json) {
45
- process.stdout.write(`${JSON.stringify(resp.raw)}\n`);
46
- }
47
- else {
48
- process.stdout.write(`${resp.text}\n`);
49
- }
50
- }
51
- catch (e) {
52
- // Statusline must never crash a client's status bar — always print SOMETHING.
53
- process.stdout.write(`󱅝 Wyrm\n`);
54
- }
55
- }
56
- main();
57
- //# sourceMappingURL=wyrm-statusline.js.map
2
+ import{queryDaemon as i}from"./statusline.js";function c(s){let o=process.cwd(),n,e=!1;for(let t=2;t<s.length;t++){const r=s[t];r==="--cwd"?o=s[++t]:r==="--session"?n=Number(s[++t]):r==="--json"&&(e=!0)}return{cwd:o,sessionId:n,json:e}}async function p(){const{cwd:s,sessionId:o,json:n}=c(process.argv);try{const e=await i({cwd:s,sessionId:o,privateMode:process.env.WYRM_STATUSLINE_PRIVATE==="1",showSavings:process.env.WYRM_STATUSLINE_SHOW_SAVINGS==="1"});n?process.stdout.write(`${JSON.stringify(e.raw)}
3
+ `):process.stdout.write(`${e.text}
4
+ `)}catch{process.stdout.write(`\u{F115D} Wyrm
5
+ `)}}p();
package/dist/wyrm-ui.js CHANGED
@@ -1,78 +1,10 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * 󱅝 wyrm-ui open the Wyrm web dashboard in the operator's default browser.
4
- *
5
- * 1. Probes localhost:WYRM_HTTP_PORT (default 3333) for /health.
6
- * 2. If a server is already up, opens the browser at /ui.
7
- * 3. If nothing is running, delegates to `wyrm serve --ui` the canonical
8
- * http-fast dashboard (silver-dragon logo + /dragon-mark.svg + live data
9
- * endpoints) with localhost dev-auth which starts the server AND opens the
10
- * browser itself. (Before 6.8.1 this spawned `wyrm-http`, a *different*
11
- * server whose static /ui never carried the brand mark — the two-dashboard
12
- * split. Both bind :3333, so converging the launcher fixes the inconsistency.)
13
- *
14
- * Cross-OS shell-out: `xdg-open` (Linux/Termux), `open` (macOS), `start` (Win).
15
- *
16
- * @copyright 2026 Ghost Protocol (Pvt) Ltd.
17
- * @license AGPL-3.0-or-later — dual-licensed; commercial terms: ghosts.lk@proton.me. See LICENSE.
18
- */
19
- import { spawn } from 'child_process';
20
- const PORT = parseInt(process.env.WYRM_HTTP_PORT ?? '3333', 10) || 3333;
21
- const HOST = '127.0.0.1';
22
- const URL_BASE = `http://${HOST}:${PORT}`;
23
- async function isHttpUp() {
24
- try {
25
- const r = await fetch(`${URL_BASE}/health`, { signal: AbortSignal.timeout(1500) });
26
- return r.ok;
27
- }
28
- catch {
29
- return false;
30
- }
31
- }
32
- function platformOpenCmd(target) {
33
- switch (process.platform) {
34
- case 'darwin': return ['open', [target]];
35
- case 'win32': return ['cmd', ['/c', 'start', '""', target]];
36
- default: return ['xdg-open', [target]]; // linux / freebsd / termux
37
- }
38
- }
39
- function openBrowser(target) {
40
- const [cmd, argv] = platformOpenCmd(target);
41
- try {
42
- const proc = spawn(cmd, argv, { detached: true, stdio: 'ignore' });
43
- proc.unref();
44
- process.stdout.write(`󱅝 Opened ${target}\n`);
45
- }
46
- catch (e) {
47
- process.stderr.write(`[wyrm-ui] could not launch browser via ${cmd}: ${e.message}\n`);
48
- process.stdout.write(`Open this URL manually: ${target}\n`);
49
- }
50
- }
51
- async function main() {
52
- const target = `${URL_BASE}/ui`;
53
- // Already running → just open the dashboard at /ui (exact path; http-fast's
54
- // /ui route is an exact match, not a static-dir prefix).
55
- if (await isHttpUp()) {
56
- openBrowser(target);
57
- return;
58
- }
59
- // Nothing up → `wyrm serve --ui` starts the http-fast dashboard (with the
60
- // silver dragon), enables localhost dev-auth so the browser can load /ui,
61
- // and opens the browser itself. Don't double-open here.
62
- process.stderr.write(`[wyrm-ui] starting \`wyrm serve --ui\` detached on :${PORT}\n`);
63
- try {
64
- const proc = spawn('wyrm', ['serve', '--ui'], { detached: true, stdio: 'ignore' });
65
- proc.unref();
66
- process.stdout.write(`󱅝 Launching the Wyrm dashboard at ${target}\n`);
67
- }
68
- catch (e) {
69
- process.stderr.write(`[wyrm-ui] could not start the server: ${e.message}\n`);
70
- process.stdout.write(`Run it manually: wyrm serve --ui\n`);
71
- process.exit(1);
72
- }
73
- }
74
- main().catch((e) => {
75
- process.stderr.write(`[wyrm-ui] fatal: ${e.message}\n`);
76
- process.exit(1);
77
- });
78
- //# sourceMappingURL=wyrm-ui.js.map
2
+ import{spawn as s}from"child_process";const n=parseInt(process.env.WYRM_HTTP_PORT??"3333",10)||3333,i="127.0.0.1",o=`http://${i}:${n}`;async function a(){try{return(await fetch(`${o}/health`,{signal:AbortSignal.timeout(1500)})).ok}catch{return!1}}function u(r){switch(process.platform){case"darwin":return["open",[r]];case"win32":return["cmd",["/c","start",'""',r]];default:return["xdg-open",[r]]}}function p(r){const[t,c]=u(r);try{s(t,c,{detached:!0,stdio:"ignore"}).unref(),process.stdout.write(`\u{F115D} Opened ${r}
3
+ `)}catch(e){process.stderr.write(`[wyrm-ui] could not launch browser via ${t}: ${e.message}
4
+ `),process.stdout.write(`Open this URL manually: ${r}
5
+ `)}}async function d(){const r=`${o}/ui`;if(await a()){p(r);return}process.stderr.write(`[wyrm-ui] starting \`wyrm serve --ui\` detached on :${n}
6
+ `);try{s("wyrm",["serve","--ui"],{detached:!0,stdio:"ignore"}).unref(),process.stdout.write(`\u{F115D} Launching the Wyrm dashboard at ${r}
7
+ `)}catch(t){process.stderr.write(`[wyrm-ui] could not start the server: ${t.message}
8
+ `),process.stdout.write(`Run it manually: wyrm serve --ui
9
+ `),process.exit(1)}}d().catch(r=>{process.stderr.write(`[wyrm-ui] fatal: ${r.message}
10
+ `),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wyrm-mcp",
3
- "version": "7.2.0",
3
+ "version": "7.2.2",
4
4
  "description": "Local-first persistent memory for AI agents over MCP. Ground truths, negative learning (recorded failures block repeats), decision causality, hybrid recall, live memory streams, run-attributed fleet memory — a structured SQLite memory on your machine, no cloud or LLM required. Claude / Copilot / Cursor / Windsurf / Codex.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,6 +33,7 @@
33
33
  "postinstall": "node scripts/postinstall.cjs",
34
34
  "build": "tsc && chmod +x dist/*.js && node scripts/gen-tool-manifest.mjs && node scripts/check-annotation-coverage.mjs",
35
35
  "build:official": "npm run build && node scripts/bake-official.mjs",
36
+ "build:closed": "npm run build:official && node scripts/minify-dist.mjs",
36
37
  "start": "node dist/index.js",
37
38
  "fast": "node dist/http-fast.js",
38
39
  "setup": "node dist/setup.js",
@@ -76,7 +77,7 @@
76
77
  "agent-fleet"
77
78
  ],
78
79
  "author": "Ghost Protocol (Pvt) Ltd <ryan@ghosts.lk>",
79
- "license": "AGPL-3.0-or-later",
80
+ "license": "UNLICENSED",
80
81
  "homepage": "https://wyrm.ghosts.lk",
81
82
  "repository": {
82
83
  "type": "git",
@@ -96,6 +97,7 @@
96
97
  "@types/node": "^22.19.19",
97
98
  "@typescript-eslint/eslint-plugin": "^8.60.0",
98
99
  "@typescript-eslint/parser": "^8.60.0",
100
+ "esbuild": "^0.28.1",
99
101
  "eslint": "^10.4.0",
100
102
  "jest": "^30.4.2",
101
103
  "ts-jest": "^29.4.11",