wyrm-mcp 7.3.2 → 7.3.3
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.
- package/README.md +8 -14
- package/dist/activation.js +59 -1
- package/dist/agent-daemon.js +281 -4
- package/dist/agent-loop.js +332 -7
- package/dist/analytics.js +236 -13
- package/dist/attribution.js +49 -1
- package/dist/audit.js +457 -2
- package/dist/auto-capture.js +138 -3
- package/dist/auto-orchestrator.js +325 -1
- package/dist/autoconfig.d.ts +50 -0
- package/dist/autoconfig.d.ts.map +1 -1
- package/dist/autoconfig.js +1115 -39
- package/dist/autoconfig.js.map +1 -1
- package/dist/buddy-runner.js +109 -1
- package/dist/buddy.js +564 -14
- package/dist/build-flags.js +15 -1
- package/dist/capabilities.js +183 -3
- package/dist/capture.js +56 -1
- package/dist/causality.js +148 -8
- package/dist/cli.js +281 -20
- package/dist/cloud/cli.js +541 -5
- package/dist/cloud/client.js +221 -1
- package/dist/cloud/crypto.js +85 -1
- package/dist/cloud/machine-id.js +113 -2
- package/dist/cloud/recovery.js +60 -1
- package/dist/cloud/sync-engine.js +543 -7
- package/dist/cloud-backup.js +579 -5
- package/dist/cloud-profile.js +138 -1
- package/dist/cloud-sync-entrypoint.js +47 -1
- package/dist/cloud-sync.js +309 -2
- package/dist/connectors/bridge-source.d.ts +46 -0
- package/dist/connectors/bridge-source.d.ts.map +1 -0
- package/dist/connectors/bridge-source.js +77 -0
- package/dist/connectors/bridge-source.js.map +1 -0
- package/dist/connectors/index.d.ts +24 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +69 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/ingest.d.ts +16 -0
- package/dist/connectors/ingest.d.ts.map +1 -0
- package/dist/connectors/ingest.js +116 -0
- package/dist/connectors/ingest.js.map +1 -0
- package/dist/connectors/types.d.ts +99 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +17 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/constellation.js +168 -12
- package/dist/content-signature.js +45 -1
- package/dist/context-build-budgeted.js +144 -4
- package/dist/context-ranking.js +69 -1
- package/dist/crypto.js +179 -1
- package/dist/daemon-write-endpoint.js +290 -1
- package/dist/daemon-writer.js +406 -2
- package/dist/database.js +1278 -53
- package/dist/deprecations.js +162 -2
- package/dist/design.js +141 -13
- package/dist/event-replication.js +112 -1
- package/dist/events-sse.js +43 -7
- package/dist/events.js +238 -6
- package/dist/failure-patterns.d.ts +107 -0
- package/dist/failure-patterns.d.ts.map +1 -1
- package/dist/failure-patterns.js +924 -43
- package/dist/failure-patterns.js.map +1 -1
- package/dist/federation.js +236 -12
- package/dist/goals.js +101 -13
- package/dist/golden.js +355 -3
- package/dist/handlers/agent.js +165 -4
- package/dist/handlers/alias-adapters.js +129 -1
- package/dist/handlers/aliases.js +171 -1
- package/dist/handlers/audit.js +87 -1
- package/dist/handlers/boundary.js +221 -1
- package/dist/handlers/capture.js +1114 -73
- package/dist/handlers/causality.js +119 -9
- package/dist/handlers/cloud.js +382 -85
- package/dist/handlers/companion.js +459 -28
- package/dist/handlers/datalake.js +187 -7
- package/dist/handlers/dispatch-context.js +22 -0
- package/dist/handlers/entity.js +256 -25
- package/dist/handlers/events.js +335 -16
- package/dist/handlers/failure.d.ts.map +1 -1
- package/dist/handlers/failure.js +408 -13
- package/dist/handlers/failure.js.map +1 -1
- package/dist/handlers/goals.js +296 -4
- package/dist/handlers/intelligence.js +681 -126
- package/dist/handlers/invoicing.js +70 -1
- package/dist/handlers/mcpclient.js +137 -6
- package/dist/handlers/orchestration.js +125 -40
- package/dist/handlers/output-schemas.js +24 -1
- package/dist/handlers/presence.js +99 -3
- package/dist/handlers/project.js +182 -28
- package/dist/handlers/prompts.js +157 -6
- package/dist/handlers/quest.js +224 -4
- package/dist/handlers/recall.js +237 -13
- package/dist/handlers/registry.js +167 -1
- package/dist/handlers/resources.js +288 -1
- package/dist/handlers/review.js +74 -11
- package/dist/handlers/run.js +498 -16
- package/dist/handlers/search.js +338 -15
- package/dist/handlers/session.js +643 -31
- package/dist/handlers/share.js +184 -8
- package/dist/handlers/shims.js +464 -1
- package/dist/handlers/skill.js +449 -67
- package/dist/handlers/survivors.js +120 -1
- package/dist/handlers/symbols.js +109 -8
- package/dist/handlers/syncops.js +302 -4
- package/dist/handlers/types.js +27 -1
- package/dist/harvest.js +191 -5
- package/dist/hours.js +156 -7
- package/dist/http-auth.js +321 -3
- package/dist/http-fast.js +1302 -22
- package/dist/icons.js +47 -1
- package/dist/importers.js +268 -1
- package/dist/index.js +840 -2
- package/dist/indexer.js +145 -4
- package/dist/intelligence.js +261 -31
- package/dist/internal-dispatch.js +212 -3
- package/dist/keyset.js +110 -1
- package/dist/knowledge-graph.js +176 -12
- package/dist/license.js +441 -2
- package/dist/logger.js +199 -2
- package/dist/maintenance.js +148 -2
- package/dist/mcp-client.js +262 -6
- package/dist/memory-artifacts.js +596 -32
- package/dist/migrate-prompt.js +124 -2
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +799 -42
- package/dist/migrations.js.map +1 -1
- package/dist/performance.js +228 -1
- package/dist/presence.js +140 -11
- package/dist/priority-embed.js +164 -5
- package/dist/providers/embedding-provider.js +196 -1
- package/dist/readonly-gate.js +29 -1
- package/dist/receipt.js +43 -1
- package/dist/rehydration.js +157 -9
- package/dist/reindex.js +88 -1
- package/dist/render-target.js +544 -21
- package/dist/render.js +280 -4
- package/dist/repl-guard.js +173 -1
- package/dist/replication-daemon-entrypoint.js +31 -1
- package/dist/replication-daemon.js +262 -2
- package/dist/rerank.js +142 -1
- package/dist/resilience.js +591 -1
- package/dist/reverse-bridge.js +360 -5
- package/dist/security.js +244 -1
- package/dist/session-seen.js +51 -3
- package/dist/setup.js +260 -1
- package/dist/skill-author.js +168 -5
- package/dist/spec-kit.js +191 -1
- package/dist/sqlite-busy.js +154 -1
- package/dist/statusline.js +315 -11
- package/dist/sub-agent.js +262 -13
- package/dist/summarizer.js +139 -13
- package/dist/symbols.js +283 -7
- package/dist/sync.js +359 -5
- package/dist/tasks-dispatch.js +84 -1
- package/dist/tasks.js +282 -1
- package/dist/token-budget.js +143 -1
- package/dist/tool-analytics.js +129 -7
- package/dist/tool-annotations.js +365 -1
- package/dist/tool-manifest-v2.json +1 -1
- package/dist/tool-manifest.json +1 -1
- package/dist/tool-profiles.js +75 -1
- package/dist/trace-harvest.js +244 -6
- package/dist/types.js +30 -1
- package/dist/ui-dashboard.js +50 -41
- package/dist/ulid.js +81 -1
- package/dist/usage-tracker.js +66 -1
- package/dist/validate.js +129 -1
- package/dist/vault.js +534 -1
- package/dist/vector-init.js +67 -1
- package/dist/vectors.js +184 -3
- package/dist/version-check.js +136 -4
- package/dist/visibility.js +155 -19
- package/dist/wyrm-cli.js +2845 -101
- package/dist/wyrm-cli.js.map +1 -1
- package/dist/wyrm-guard.d.ts.map +1 -1
- package/dist/wyrm-guard.js +475 -14
- package/dist/wyrm-guard.js.map +1 -1
- package/dist/wyrm-loop.js +150 -3
- package/dist/wyrm-manifest.json +1 -1
- package/dist/wyrm-statusline-daemon.js +11 -1
- package/dist/wyrm-statusline.js +56 -4
- package/dist/wyrm-ui.js +77 -9
- package/package.json +1 -1
package/dist/migrate-prompt.js
CHANGED
|
@@ -1,2 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* wyrm_migrate_prompt — rewrite operator client-config Wyrm blocks
|
|
3
|
+
* (spec 018 phase 5).
|
|
4
|
+
*
|
|
5
|
+
* Reads existing client instruction files (.cursor/rules,
|
|
6
|
+
* .github/copilot-instructions.md, etc.), diffs the Wyrm-injected block
|
|
7
|
+
* (between `<!-- wyrm:start -->` / `<!-- wyrm:end -->` markers) against
|
|
8
|
+
* the current `WYRM_INJECT_BLOCK`, and updates ONLY the Wyrm block — any
|
|
9
|
+
* operator-authored content outside the markers is preserved verbatim.
|
|
10
|
+
*
|
|
11
|
+
* Dry-run by default. Operator must pass `apply: true` to write changes.
|
|
12
|
+
*
|
|
13
|
+
* @copyright 2026 Ghost Protocol (Pvt) Ltd.
|
|
14
|
+
* @license Proprietary — (c) 2026 Ghost Protocol (Pvt) Ltd. All rights reserved. See LICENSE.
|
|
15
|
+
*/
|
|
16
|
+
import { readFileSync, writeFileSync, existsSync } from 'fs';
|
|
17
|
+
import { join } from 'path';
|
|
18
|
+
const MARKER_START = '<!-- wyrm:start -->';
|
|
19
|
+
const MARKER_END = '<!-- wyrm:end -->';
|
|
20
|
+
const CLIENT_TARGETS = [
|
|
21
|
+
'.github/copilot-instructions.md',
|
|
22
|
+
'.cursor/rules',
|
|
23
|
+
'.cursor/rules.md',
|
|
24
|
+
'.windsurfrules',
|
|
25
|
+
'CLAUDE.md',
|
|
26
|
+
'.claude/instructions.md',
|
|
27
|
+
];
|
|
28
|
+
function shortHash(s) {
|
|
29
|
+
// Cheap deterministic fingerprint — not cryptographic.
|
|
30
|
+
let h = 0;
|
|
31
|
+
for (let i = 0; i < s.length; i++) {
|
|
32
|
+
h = (h << 5) - h + s.charCodeAt(i);
|
|
33
|
+
h |= 0;
|
|
34
|
+
}
|
|
35
|
+
return h.toString(36);
|
|
36
|
+
}
|
|
37
|
+
export function migrateOne(filePath, newBlock, apply) {
|
|
38
|
+
if (!existsSync(filePath)) {
|
|
39
|
+
return { file: filePath, status: 'file-not-found' };
|
|
40
|
+
}
|
|
41
|
+
let body;
|
|
42
|
+
try {
|
|
43
|
+
body = readFileSync(filePath, 'utf-8');
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
return { file: filePath, status: 'error', detail: String(e) };
|
|
47
|
+
}
|
|
48
|
+
const startIdx = body.indexOf(MARKER_START);
|
|
49
|
+
const endIdx = body.indexOf(MARKER_END);
|
|
50
|
+
if (startIdx === -1 || endIdx === -1 || endIdx < startIdx) {
|
|
51
|
+
return { file: filePath, status: 'missing-markers', detail: 'No Wyrm-managed block found; nothing to migrate.' };
|
|
52
|
+
}
|
|
53
|
+
const before = body.slice(0, startIdx);
|
|
54
|
+
const oldBlock = body.slice(startIdx, endIdx + MARKER_END.length);
|
|
55
|
+
const after = body.slice(endIdx + MARKER_END.length);
|
|
56
|
+
if (oldBlock === newBlock) {
|
|
57
|
+
return { file: filePath, status: 'unchanged' };
|
|
58
|
+
}
|
|
59
|
+
const proposed = {
|
|
60
|
+
oldChars: oldBlock.length,
|
|
61
|
+
newChars: newBlock.length,
|
|
62
|
+
oldHash: shortHash(oldBlock),
|
|
63
|
+
newHash: shortHash(newBlock),
|
|
64
|
+
};
|
|
65
|
+
if (!apply) {
|
|
66
|
+
return { file: filePath, status: 'updated', proposedDiff: proposed, detail: 'Would rewrite (dry-run).' };
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
writeFileSync(filePath, `${before}${newBlock}${after}`, 'utf-8');
|
|
70
|
+
return { file: filePath, status: 'updated', proposedDiff: proposed };
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
return { file: filePath, status: 'error', detail: String(e) };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function migrateProject(opts) {
|
|
77
|
+
return CLIENT_TARGETS.map((rel) => migrateOne(join(opts.projectPath, rel), opts.newBlock, opts.apply));
|
|
78
|
+
}
|
|
79
|
+
export function renderMigrationReport(results, applied) {
|
|
80
|
+
const updated = results.filter((r) => r.status === 'updated');
|
|
81
|
+
const unchanged = results.filter((r) => r.status === 'unchanged');
|
|
82
|
+
const missing = results.filter((r) => r.status === 'missing-markers');
|
|
83
|
+
const notFound = results.filter((r) => r.status === 'file-not-found');
|
|
84
|
+
const errors = results.filter((r) => r.status === 'error');
|
|
85
|
+
const lines = [];
|
|
86
|
+
lines.push(` **Migrate Prompt** — ${applied ? 'applied' : 'dry-run'}`);
|
|
87
|
+
lines.push('');
|
|
88
|
+
if (updated.length > 0) {
|
|
89
|
+
lines.push(`### ${applied ? 'Updated' : 'Would update'} (${updated.length})`);
|
|
90
|
+
for (const r of updated) {
|
|
91
|
+
const diff = r.proposedDiff ? ` · ${r.proposedDiff.oldChars}→${r.proposedDiff.newChars} chars` : '';
|
|
92
|
+
lines.push(`- ${r.file}${diff}`);
|
|
93
|
+
}
|
|
94
|
+
lines.push('');
|
|
95
|
+
}
|
|
96
|
+
if (unchanged.length > 0) {
|
|
97
|
+
lines.push(`### Already current (${unchanged.length})`);
|
|
98
|
+
for (const r of unchanged)
|
|
99
|
+
lines.push(`- ${r.file}`);
|
|
100
|
+
lines.push('');
|
|
101
|
+
}
|
|
102
|
+
if (missing.length > 0) {
|
|
103
|
+
lines.push(`### No Wyrm block — run \`wyrm_inject_prompt\` first (${missing.length})`);
|
|
104
|
+
for (const r of missing)
|
|
105
|
+
lines.push(`- ${r.file}`);
|
|
106
|
+
lines.push('');
|
|
107
|
+
}
|
|
108
|
+
if (notFound.length > 0 && notFound.length < 5) {
|
|
109
|
+
lines.push(`### Not found (${notFound.length})`);
|
|
110
|
+
for (const r of notFound)
|
|
111
|
+
lines.push(`- ${r.file}`);
|
|
112
|
+
lines.push('');
|
|
113
|
+
}
|
|
114
|
+
if (errors.length > 0) {
|
|
115
|
+
lines.push(`### Errors (${errors.length})`);
|
|
116
|
+
for (const r of errors)
|
|
117
|
+
lines.push(`- ${r.file} — ${r.detail}`);
|
|
118
|
+
}
|
|
119
|
+
if (updated.length === 0 && missing.length === 0 && errors.length === 0 && unchanged.length === 0) {
|
|
120
|
+
lines.push('_No Wyrm-managed client config found in this project._');
|
|
121
|
+
}
|
|
122
|
+
return lines.join('\n');
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=migrate-prompt.js.map
|
package/dist/migrations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../src/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,KAAK,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,EAgsDjC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,SAAS,EAAE,CAuChE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAQ9D"}
|