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.
- package/LICENSE +26 -667
- package/NOTICE +14 -33
- package/dist/activation.d.ts.map +1 -1
- package/dist/activation.js +1 -44
- package/dist/activation.js.map +1 -1
- package/dist/agent-daemon.js +4 -281
- package/dist/agent-loop.js +7 -332
- package/dist/analytics.js +13 -236
- package/dist/attribution.js +1 -49
- package/dist/audit.js +2 -457
- package/dist/auto-capture.js +3 -138
- package/dist/auto-orchestrator.js +1 -325
- package/dist/autoconfig.js +39 -840
- package/dist/buddy-runner.js +1 -109
- package/dist/buddy.js +14 -564
- package/dist/build-flags.js +1 -17
- package/dist/capabilities.js +3 -183
- package/dist/capture.js +1 -56
- package/dist/causality.js +6 -107
- package/dist/cli.js +20 -281
- package/dist/cloud/cli.js +5 -541
- package/dist/cloud/client.js +1 -221
- package/dist/cloud/crypto.js +1 -85
- package/dist/cloud/machine-id.js +2 -113
- package/dist/cloud/recovery.js +1 -60
- package/dist/cloud/sync-engine.js +7 -543
- package/dist/cloud-backup.js +5 -579
- package/dist/cloud-profile.js +1 -138
- package/dist/cloud-sync-entrypoint.js +1 -47
- package/dist/cloud-sync.js +2 -309
- package/dist/constellation.js +12 -168
- package/dist/context-build-budgeted.js +4 -144
- package/dist/context-ranking.js +1 -69
- package/dist/crypto.js +1 -179
- package/dist/daemon-write-endpoint.js +1 -290
- package/dist/daemon-writer.js +2 -406
- package/dist/database.js +43 -1110
- package/dist/deprecations.js +2 -162
- package/dist/design.js +13 -141
- package/dist/event-replication.js +1 -112
- package/dist/events-sse.js +7 -43
- package/dist/events.js +6 -238
- package/dist/failure-patterns.js +42 -659
- package/dist/federation.js +12 -236
- package/dist/goals.js +13 -101
- package/dist/golden.js +3 -355
- package/dist/handlers/agent.js +4 -165
- package/dist/handlers/alias-adapters.js +1 -129
- package/dist/handlers/aliases.js +1 -171
- package/dist/handlers/audit.js +1 -87
- package/dist/handlers/boundary.js +1 -221
- package/dist/handlers/capture.js +73 -1109
- package/dist/handlers/causality.js +7 -114
- package/dist/handlers/cloud.js +85 -382
- package/dist/handlers/companion.js +28 -459
- package/dist/handlers/datalake.js +7 -187
- package/dist/handlers/dispatch-context.js +0 -22
- package/dist/handlers/entity.js +25 -256
- package/dist/handlers/events.js +16 -335
- package/dist/handlers/failure.js +13 -340
- package/dist/handlers/goals.js +4 -296
- package/dist/handlers/intelligence.js +126 -674
- package/dist/handlers/invoicing.js +1 -70
- package/dist/handlers/mcpclient.js +6 -137
- package/dist/handlers/orchestration.js +40 -125
- package/dist/handlers/output-schemas.js +1 -24
- package/dist/handlers/presence.js +3 -99
- package/dist/handlers/project.js +28 -182
- package/dist/handlers/prompts.js +6 -157
- package/dist/handlers/quest.js +4 -224
- package/dist/handlers/recall.js +11 -218
- package/dist/handlers/registry.js +1 -167
- package/dist/handlers/resources.js +1 -288
- package/dist/handlers/review.js +11 -74
- package/dist/handlers/run.js +17 -487
- package/dist/handlers/search.js +15 -326
- package/dist/handlers/session.js +28 -615
- package/dist/handlers/share.js +8 -184
- package/dist/handlers/shims.js +1 -464
- package/dist/handlers/skill.js +67 -449
- package/dist/handlers/survivors.js +1 -120
- package/dist/handlers/symbols.js +8 -109
- package/dist/handlers/syncops.js +4 -302
- package/dist/handlers/types.js +1 -27
- package/dist/harvest.js +5 -191
- package/dist/hours.js +7 -156
- package/dist/http-auth.js +3 -321
- package/dist/http-fast.js +21 -1137
- package/dist/icons.js +1 -47
- package/dist/index.js +2 -924
- package/dist/indexer.js +4 -145
- package/dist/intelligence.js +31 -261
- package/dist/internal-dispatch.js +3 -212
- package/dist/keyset.js +1 -110
- package/dist/knowledge-graph.js +12 -176
- package/dist/license.d.ts +11 -0
- package/dist/license.d.ts.map +1 -1
- package/dist/license.js +2 -414
- package/dist/license.js.map +1 -1
- package/dist/logger.js +2 -199
- package/dist/maintenance.js +2 -148
- package/dist/mcp-client.js +6 -262
- package/dist/memory-artifacts.js +30 -449
- package/dist/migrate-prompt.js +2 -124
- package/dist/migrations.js +40 -655
- package/dist/performance.js +1 -228
- package/dist/presence.js +11 -140
- package/dist/priority-embed.js +5 -164
- package/dist/providers/embedding-provider.js +1 -196
- package/dist/readonly-gate.js +1 -29
- package/dist/rehydration.js +9 -157
- package/dist/reindex.js +1 -88
- package/dist/render-target.js +21 -514
- package/dist/render.js +4 -280
- package/dist/repl-guard.js +1 -173
- package/dist/replication-daemon-entrypoint.js +1 -31
- package/dist/replication-daemon.js +2 -262
- package/dist/resilience.js +1 -591
- package/dist/reverse-bridge.js +5 -360
- package/dist/security.js +1 -244
- package/dist/session-seen.js +3 -51
- package/dist/setup.js +1 -260
- package/dist/skill-author.js +5 -168
- package/dist/spec-kit.js +1 -191
- package/dist/sqlite-busy.js +1 -154
- package/dist/statusline.js +11 -315
- package/dist/sub-agent.js +13 -262
- package/dist/summarizer.js +13 -139
- package/dist/symbols.js +7 -283
- package/dist/sync.js +5 -359
- package/dist/tasks-dispatch.js +1 -84
- package/dist/tasks.js +1 -282
- package/dist/token-budget.js +1 -143
- package/dist/tool-analytics.js +7 -129
- package/dist/tool-annotations.js +1 -365
- package/dist/tool-manifest-v2.json +1 -1
- package/dist/tool-manifest.json +1 -1
- package/dist/tool-profiles.js +1 -75
- package/dist/trace-harvest.js +6 -244
- package/dist/types.js +1 -30
- package/dist/ui-dashboard.js +41 -50
- package/dist/ulid.js +1 -81
- package/dist/validate.js +1 -129
- package/dist/vault.js +1 -534
- package/dist/vectors.js +3 -184
- package/dist/version-check.js +4 -136
- package/dist/visibility.js +19 -155
- package/dist/wyrm-cli.js +98 -2451
- package/dist/wyrm-cli.js.map +1 -1
- package/dist/wyrm-guard.js +14 -424
- package/dist/wyrm-loop.js +3 -150
- package/dist/wyrm-manifest.json +1 -1
- package/dist/wyrm-statusline-daemon.js +1 -11
- package/dist/wyrm-statusline.js +4 -56
- package/dist/wyrm-ui.js +9 -77
- package/package.json +4 -2
package/dist/tool-annotations.js
CHANGED
|
@@ -1,365 +1 @@
|
|
|
1
|
-
/** Per-tool MCP annotations for every advertised tool. */
|
|
2
|
-
export const TOOL_ANNOTATIONS = {
|
|
3
|
-
// Registers discovered projects + optional watch-dir rows; re-scan converges.
|
|
4
|
-
wyrm_scan_projects: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
5
|
-
wyrm_list_projects: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
6
|
-
wyrm_project_context: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
7
|
-
wyrm_global_context: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
8
|
-
// Per-project-per-day session is reused (getTodaySession), but objectives APPEND on every call
|
|
9
|
-
// and unknown projects are auto-registered; also triggers archiveOldSessions.
|
|
10
|
-
wyrm_session_start: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
11
|
-
// Appends completed/issues/notes to the session row.
|
|
12
|
-
wyrm_session_update: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
13
|
-
// Creates a new quest row per call — no dedup.
|
|
14
|
-
wyrm_quest_add: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
15
|
-
wyrm_quest_complete: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
16
|
-
wyrm_all_quests: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
17
|
-
// Despite the name, VERIFIED pure read: returns head cursor + recent window; no subscriber row
|
|
18
|
-
// is created (events.ts subscribeEvents is SELECT-only).
|
|
19
|
-
wyrm_events_subscribe: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
20
|
-
// Description itself says idempotent / safe to re-poll.
|
|
21
|
-
wyrm_events_since: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
22
|
-
// Appends an event to the stream.
|
|
23
|
-
wyrm_events_publish: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
24
|
-
// Ingests peer events with origin_seq dedup — replication is convergent; re-run safe.
|
|
25
|
-
wyrm_events_replicate: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
26
|
-
// Mixed-action daemon manager: action=stop kills the replication daemon, peer_remove deletes
|
|
27
|
-
// peers (destructive per partition rule); start/status/tick are benign.
|
|
28
|
-
wyrm_replication: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
29
|
-
// Writes Wyrm-managed blocks into client config/instruction files; re-run converges on the
|
|
30
|
-
// managed block.
|
|
31
|
-
wyrm_embed: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
32
|
-
// Authors + deploys skill files + registers; same-name convergence not verified, so not
|
|
33
|
-
// claimed.
|
|
34
|
-
wyrm_skill_create: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
35
|
-
// Writes review-queue candidates only; description and implementation both claim re-runs skip
|
|
36
|
-
// already-harvested items.
|
|
37
|
-
wyrm_harvest: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
38
|
-
// Writes needs_review candidates; deduped + idempotent per 6.13 design.
|
|
39
|
-
wyrm_auto_capture: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
40
|
-
// T040: harvests harness traces into run-tagged needs_review candidates;
|
|
41
|
-
// local extractor only (no cloud LLM); deduped via ax: sig — idempotent.
|
|
42
|
-
wyrm_capture_trace: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
43
|
-
wyrm_data_insert: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
44
|
-
wyrm_data_batch_insert: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
45
|
-
wyrm_data_query: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
46
|
-
wyrm_data_categories: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
47
|
-
// 'Register or update' — upsert by skill name.
|
|
48
|
-
wyrm_skill_register: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
49
|
-
wyrm_skill_list: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
50
|
-
wyrm_skill_get: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
51
|
-
// Deletes the skill from the registry; end-state convergent.
|
|
52
|
-
wyrm_skill_delete: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
53
|
-
wyrm_skill_activate: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
54
|
-
// Reversible soft toggle — not destructive.
|
|
55
|
-
wyrm_skill_deactivate: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
56
|
-
wyrm_skill_search: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
57
|
-
wyrm_skill_stats: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
58
|
-
wyrm_skill_graph: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
59
|
-
// Creates quests from a spec dir; re-register dedup not verified.
|
|
60
|
-
wyrm_spec_register: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
61
|
-
// Keyed set — converges.
|
|
62
|
-
wyrm_set_global: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
63
|
-
wyrm_search: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
64
|
-
// Imports/exports .wyrm folder files — writes to project dirs; convergent sync.
|
|
65
|
-
wyrm_sync: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
66
|
-
wyrm_stats: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
67
|
-
// Writes embedding config; may download models (network); converges.
|
|
68
|
-
wyrm_vector_setup: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
69
|
-
// Rebuilds derived embedding vectors — regenerable, not destructive.
|
|
70
|
-
wyrm_reindex: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
71
|
-
// Vacuum + archives old sessions (data moved out of active view). Spec FR-3 explicitly assigns
|
|
72
|
-
// destructiveHint to maintenance.
|
|
73
|
-
wyrm_maintenance: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
74
|
-
wyrm_usage: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
75
|
-
// Writes MCP server entries into detected AI-client config files; re-run converges.
|
|
76
|
-
wyrm_setup: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
77
|
-
// VERIFIED: auto-orchestrator classification has no DB writes.
|
|
78
|
-
wyrm_orchestrate_task: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
79
|
-
// TRAP: lives in 6.x READ_ONLY_TOOLS (caching set) but the tool can UPDATE config — proof that
|
|
80
|
-
// set was curated for caching, not authority.
|
|
81
|
-
wyrm_orchestration_config: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
82
|
-
wyrm_orchestration_stats: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
83
|
-
wyrm_license: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
84
|
-
// License activation; same key converges.
|
|
85
|
-
wyrm_activate: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
86
|
-
wyrm_analytics_dashboard: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
87
|
-
wyrm_cost_report: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
88
|
-
// Device-egress: uploads an encrypted backup to cloud storage; each call may create a new
|
|
89
|
-
// backup object.
|
|
90
|
-
wyrm_cloud_backup: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
91
|
-
// Mixed-action daemon manager (start|stop|status): stop halts background multi-device sync
|
|
92
|
-
// (destructive per partition rule); also device-egress.
|
|
93
|
-
wyrm_cloud_sync: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
94
|
-
wyrm_encrypt_setup: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
95
|
-
// Entity creation; name-dedup not verified.
|
|
96
|
-
wyrm_entity_add: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
97
|
-
// Creates a relationship edge; duplicate-edge guard not verified.
|
|
98
|
-
wyrm_entity_link: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
99
|
-
wyrm_entity_search: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
100
|
-
wyrm_entity_graph: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
101
|
-
wyrm_entity_path: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
102
|
-
// Genuinely destructive: combines aliases, redirects relationships, DELETES the source entity.
|
|
103
|
-
wyrm_entity_merge: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
104
|
-
// Creates a new memory artifact per call.
|
|
105
|
-
wyrm_remember: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
106
|
-
// VERIFIED: only write is access-tracking metadata (last_accessed_at, access_count) on returned
|
|
107
|
-
// artifacts — content-immutable. Its presence in 6.x WRITE_TOOLS is for cache-invalidation
|
|
108
|
-
// correctness, not authority.
|
|
109
|
-
wyrm_recall: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
110
|
-
// Each call increments reuse counters and shifts confidence — accruing by design.
|
|
111
|
-
wyrm_feedback: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
112
|
-
// Read-only assembly; budgeted path may log savings telemetry only.
|
|
113
|
-
wyrm_context_build: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
114
|
-
// Keyed supersession: same (category,key) re-set marks old is_current=0 + inserts the new
|
|
115
|
-
// current row — end state converges; version history accrues.
|
|
116
|
-
wyrm_truth_set: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
117
|
-
wyrm_truth_get: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
118
|
-
// Saves a reasoning scaffold; upsert behavior not verified.
|
|
119
|
-
wyrm_scaffold_save: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
120
|
-
wyrm_scaffold_get: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
121
|
-
// Queues candidate artifacts from a session; re-distill dedup not verified.
|
|
122
|
-
wyrm_distill: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
123
|
-
// VERIFIED: reject executes a hard `DELETE FROM memory_artifacts` — permanent. Approve flips
|
|
124
|
-
// needs_review=0. Both converge (second reject returns not-found).
|
|
125
|
-
wyrm_review: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
126
|
-
// Auto-classifies then writes a quest/truth/artifact OR routes to the review queue (low
|
|
127
|
-
// confidence / truth-category conflict); no dedup.
|
|
128
|
-
wyrm_capture: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
129
|
-
// Read-only by DEFAULT, but log_session:true creates a session row (db.createSession,
|
|
130
|
-
// index.ts ~5541) — WORST-ACTION RULE (the wyrm_sync_import precedent): annotate the write,
|
|
131
|
-
// non-idempotent because every log_session call INSERTs another row.
|
|
132
|
-
wyrm_session_prime: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
133
|
-
// Genuinely destructive (removes stale artifacts) but dry-run by DEFAULT — actual deletion
|
|
134
|
-
// requires dry_run:false + confirm_ids.
|
|
135
|
-
wyrm_prune: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
136
|
-
// Device-egress: writes an encrypted snapshot file outside the DB.
|
|
137
|
-
wyrm_sync_export: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
138
|
-
// restore_mode:'restore' OVERWRITES the local DB from a snapshot; 'preview' is read-only —
|
|
139
|
-
// annotate for the worst action.
|
|
140
|
-
wyrm_sync_import: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
141
|
-
// Writes review-queue candidates from commits; dedup-by-hash not verified.
|
|
142
|
-
wyrm_import_git: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
143
|
-
wyrm_import_pr: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
144
|
-
// Creates ground truths from rules files; re-import convergence not verified.
|
|
145
|
-
wyrm_import_rules: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
146
|
-
// Opt-in write of a Wyrm-managed block into copilot-instructions/.cursor rules; converges.
|
|
147
|
-
wyrm_inject_prompt: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
148
|
-
// Buddy Protocol peer entry point — read-only context assembly for a calling peer.
|
|
149
|
-
buddy: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
150
|
-
// Read-only greeting + project state; federate:true performs network reads of peers.
|
|
151
|
-
wyrm_buddy: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
152
|
-
// Keyed design-token upsert.
|
|
153
|
-
wyrm_token_set: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
154
|
-
wyrm_token_get: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
155
|
-
// Deletes a design token (recoverable only by re-setting).
|
|
156
|
-
wyrm_token_delete: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
157
|
-
wyrm_reference_add: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
158
|
-
wyrm_reference_list: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
159
|
-
wyrm_reference_search: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
160
|
-
wyrm_capabilities: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
161
|
-
wyrm_intro: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
162
|
-
// Rewrites the Wyrm-managed block in client instruction files; converges.
|
|
163
|
-
wyrm_migrate_prompt: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
164
|
-
wyrm_constellation: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
165
|
-
wyrm_digest: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
166
|
-
// Network read of npm registry; only write is its own 24h cache row (telemetry-class).
|
|
167
|
-
wyrm_check_update: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
168
|
-
// Replaces the globally installed wyrm-mcp binary (npm install -g) — process/binary mutation;
|
|
169
|
-
// converges on latest.
|
|
170
|
-
wyrm_self_update: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
171
|
-
// Identical (scope,target,description) coalesces into one row but occurrences++ on every call —
|
|
172
|
-
// accrual by design.
|
|
173
|
-
wyrm_failure_record: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
174
|
-
// v7 F2 review fix: the check itself stays a pure read of canonical memory (exact-signature
|
|
175
|
-
// then FTS-fuzzy match), but every BLOCKED verdict now appends one failure_blocks analytics
|
|
176
|
-
// row (T017 — the canonical input to wyrm_stats view=failures) beside the pre-existing
|
|
177
|
-
// best-effort savings telemetry. readOnlyHint stays true under the canonical-memory reading
|
|
178
|
-
// (the audited telemetry-class exception, asserted in tool-annotations.test.ts);
|
|
179
|
-
// idempotentHint is now FALSE — repeating a blocked check observably accrues
|
|
180
|
-
// blocked.total / this_run counts on another tool's surface.
|
|
181
|
-
wyrm_failure_check: { readOnlyHint: true, destructiveHint: false, idempotentHint: false },
|
|
182
|
-
wyrm_failure_list: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
183
|
-
// Keeps history; excludes from future checks — reversible, not destructive.
|
|
184
|
-
wyrm_failure_resolve: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
185
|
-
// Heartbeat upsert — converges per agent_id.
|
|
186
|
-
wyrm_presence_announce: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
187
|
-
wyrm_presence_list: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
188
|
-
// Description says idempotent; removes own presence row + drops own quest claims — designed
|
|
189
|
-
// clean exit, not destructive.
|
|
190
|
-
wyrm_presence_release: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
191
|
-
// CAS claim — outcome depends on contention; not safely retryable as a no-op.
|
|
192
|
-
wyrm_quest_claim: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
193
|
-
wyrm_quest_release: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
194
|
-
// Adds a decision edge; duplicate-edge guard not verified.
|
|
195
|
-
wyrm_decided_because: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
196
|
-
wyrm_decision_downstream: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
197
|
-
wyrm_decision_upstream: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
198
|
-
// Cascade-invalidates every downstream decision (recursive) — the blast-radius tool; re-run
|
|
199
|
-
// converges.
|
|
200
|
-
wyrm_decision_invalidate: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
201
|
-
// Rebuilds the derived symbol index — regenerable, not destructive.
|
|
202
|
-
wyrm_symbol_index: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
203
|
-
wyrm_symbol_search: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
204
|
-
wyrm_symbol_callers: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
205
|
-
wyrm_symbol_stats: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
206
|
-
wyrm_hours_report: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
207
|
-
// VERIFIED: returns invoice markdown in the response — writes no file.
|
|
208
|
-
wyrm_invoice_generate: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
209
|
-
wyrm_session_rehydrate: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
210
|
-
// Appends to the hash chain — every call adds a new entry by design.
|
|
211
|
-
wyrm_audit_log: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
212
|
-
wyrm_audit_verify: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
213
|
-
// VERIFIED: returns the JSON bundle in the response — writes no file.
|
|
214
|
-
wyrm_audit_export: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
215
|
-
// Read-only context assembly + local LLM call; output nondeterministic. DISCLOSED: every call
|
|
216
|
-
// INSERTs into llm_query_log (query first 1000 chars + answer first 4000 chars,
|
|
217
|
-
// src/sub-agent.ts ~304) — telemetry-class content-bearing query log per the convention above.
|
|
218
|
-
wyrm_ask: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
219
|
-
// Sets is_shared=1 — converges.
|
|
220
|
-
wyrm_share: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
221
|
-
// Revokes team visibility (mission-rule destructive: removes data from team view on next sync);
|
|
222
|
-
// local row preserved.
|
|
223
|
-
wyrm_unshare: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
224
|
-
wyrm_sync_conflicts: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
225
|
-
// mode:'kept_remote' OVERWRITES the local row with the remote payload — local edit is lost;
|
|
226
|
-
// resolution converges.
|
|
227
|
-
wyrm_sync_resolve: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
228
|
-
// Creates a new goal per call.
|
|
229
|
-
wyrm_goal_set: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
230
|
-
wyrm_goal_list: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
231
|
-
wyrm_goal_complete: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
232
|
-
wyrm_goal_pause: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
233
|
-
wyrm_goal_resume: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
234
|
-
// Record kept for audit — reversible-by-policy, not destructive.
|
|
235
|
-
wyrm_goal_abandon: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
236
|
-
wyrm_goal_iterations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
237
|
-
// Runs the OODA loop: LLM decides + executes whitelisted internal tools (read-mostly + bounded
|
|
238
|
-
// writes) — mutates state, nondeterministic.
|
|
239
|
-
wyrm_act: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
240
|
-
// Starts the wyrm-loop daemon as a detached process; already-running converges.
|
|
241
|
-
wyrm_agent_init: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
242
|
-
wyrm_agent_status: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
243
|
-
// SIGTERM-then-SIGKILL on the daemon (mission-rule destructive: stop/restart).
|
|
244
|
-
wyrm_agent_stop: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
245
|
-
// Daemon kill + respawn (mission-rule destructive: stop/restart).
|
|
246
|
-
wyrm_agent_restart: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
247
|
-
// Registers/updates an outbound MCP server config.
|
|
248
|
-
wyrm_mcp_register: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
249
|
-
wyrm_mcp_list: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
250
|
-
// Spawns the target server one-shot to call tools/list — subprocess + possibly network, but no
|
|
251
|
-
// local state mutation.
|
|
252
|
-
wyrm_mcp_tools: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
253
|
-
// Config kept in DB — reversible.
|
|
254
|
-
wyrm_mcp_disable: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
255
|
-
// Proxies an arbitrary tool on an external MCP server — effects depend entirely on the target
|
|
256
|
-
// tool (open-world); result logged locally. Cannot honestly claim read-only or idempotent.
|
|
257
|
-
wyrm_call_external: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
258
|
-
wyrm_tool_analytics: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
|
|
259
|
-
// ── v7 F3 (T022): the frozen-surface noun shims (src/handlers/shims.ts) ──
|
|
260
|
-
// Each shim is a thin action-discriminated router onto its members' original
|
|
261
|
-
// dispatcher cases, so its annotation is the WORST-ACTION fold of the member
|
|
262
|
-
// annotations above: readOnly ⇔ every member readOnly, destructive ⇔ any
|
|
263
|
-
// member destructive, idempotent ⇔ every member idempotent. Derivation is
|
|
264
|
-
// LOCKED by tests/tool-annotations.test.ts (computed from SHIM_ROUTES
|
|
265
|
-
// against this registry), so a member reclassification can never silently
|
|
266
|
-
// leave a shim's fold stale.
|
|
267
|
-
wyrm_quest: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
268
|
-
wyrm_session: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
269
|
-
// destructive: action=delete (wyrm_skill_delete)
|
|
270
|
-
wyrm_skill: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
271
|
-
// destructive: action=merge (wyrm_entity_merge)
|
|
272
|
-
wyrm_entity: { readOnlyHint: false, destructiveHint: true, idempotentHint: false },
|
|
273
|
-
// destructive: action=invalidate (wyrm_decision_invalidate cascade)
|
|
274
|
-
wyrm_decision_trace: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
275
|
-
wyrm_goal: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
276
|
-
wyrm_presence: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
277
|
-
wyrm_mcp: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
278
|
-
// audit_log appends one hash-chained row per call — non-idempotent write.
|
|
279
|
-
wyrm_audit: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
280
|
-
wyrm_project: { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
|
|
281
|
-
// destructive: action=delete (wyrm_token_delete)
|
|
282
|
-
wyrm_design_token: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
|
|
283
|
-
wyrm_reference: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
284
|
-
// ── v7 F3 (T027): the run loop (src/handlers/run.ts) ──
|
|
285
|
-
// Worst-action: start/join/debrief/end all write (runs, run_agents,
|
|
286
|
-
// review-queue artifacts, runs.status). NOT destructive: end resolves
|
|
287
|
-
// failures (additive note, never deletes) and releases quest claims —
|
|
288
|
-
// ephemeral TTL leases, re-claimable, same class as wyrm_quest_release.
|
|
289
|
-
// Non-idempotent: start without an explicit run_id mints a fresh ULID
|
|
290
|
-
// per call; debrief re-queues when its dedup signature misses.
|
|
291
|
-
wyrm_run: { readOnlyHint: false, destructiveHint: false, idempotentHint: false },
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* Merge the registry entry into a tool definition for the tools/list
|
|
295
|
-
* response. Pure + additive: unknown tools pass through untouched (the
|
|
296
|
-
* build-time coverage gate, not this function, is what fails on a missing
|
|
297
|
-
* entry — ListTools must never throw).
|
|
298
|
-
*/
|
|
299
|
-
export function annotateTool(tool) {
|
|
300
|
-
const annotations = TOOL_ANNOTATIONS[tool.name];
|
|
301
|
-
return annotations ? { ...tool, annotations } : tool;
|
|
302
|
-
}
|
|
303
|
-
/** Annotate a whole profile-filtered tool list at ListTools-build time. */
|
|
304
|
-
export function annotateTools(tools) {
|
|
305
|
-
return tools.map(annotateTool);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* FEATHERWEIGHT follow-up (#3, default-scenario ListTools shrink) — elide
|
|
309
|
-
* annotation-hint fields whose value equals the MCP spec default (and thus
|
|
310
|
-
* carries ZERO information to a spec-compliant consumer), at WIRE-BUILD time
|
|
311
|
-
* only. The central TOOL_ANNOTATIONS map stays the full audited source of
|
|
312
|
-
* truth (the coverage gate + tool-annotations.test.ts still see every hint);
|
|
313
|
-
* this trims pure-default bytes off the serialized tools/list result.
|
|
314
|
-
*
|
|
315
|
-
* SPEC DEFAULTS (verbatim from @modelcontextprotocol/sdk ToolAnnotationsSchema
|
|
316
|
-
* — the authoritative wire contract this server speaks):
|
|
317
|
-
* - readOnlyHint Default: false
|
|
318
|
-
* - destructiveHint Default: true — "meaningful only when readOnlyHint == false"
|
|
319
|
-
* - idempotentHint Default: false — "meaningful only when readOnlyHint == false"
|
|
320
|
-
* - openWorldHint Default: true
|
|
321
|
-
*
|
|
322
|
-
* LOSSLESS ELISION RULES (each elided field is exactly recoverable by a
|
|
323
|
-
* spec-compliant consumer reading the documented default; meaningfulness
|
|
324
|
-
* regime is preserved):
|
|
325
|
-
* - readOnlyHint : keep iff === true (true ≠ default false). Eliding a
|
|
326
|
-
* `false` leaves it absent ⇒ consumer reads default false ⇒ SAME value,
|
|
327
|
-
* AND keeps destructive/idempotent in their meaningful (!readOnly) regime.
|
|
328
|
-
* - destructiveHint: meaningless when readOnlyHint is true (spec) ⇒ elide.
|
|
329
|
-
* Otherwise keep iff === false (false ≠ default true); a `true` = default ⇒ elide.
|
|
330
|
-
* - idempotentHint : meaningless when readOnlyHint is true (spec) ⇒ elide.
|
|
331
|
-
* Otherwise keep iff === true (true ≠ default false); a `false` = default ⇒ elide.
|
|
332
|
-
* - openWorldHint : keep iff === false (false ≠ default true). (Unused today —
|
|
333
|
-
* F1 left it unassigned — but handled for forward-safety.)
|
|
334
|
-
* - title : free-text, never a boolean default ⇒ always preserved.
|
|
335
|
-
*
|
|
336
|
-
* The `annotations` KEY is always kept (an all-default tool serializes as
|
|
337
|
-
* `"annotations":{}`) so the §7 "100% of advertised tools annotated" wire
|
|
338
|
-
* invariant (annotations !== undefined) is untouched — only the redundant
|
|
339
|
-
* per-field bytes are dropped. Pure + non-mutating: fresh objects, no
|
|
340
|
-
* Date/random, deterministic ⇒ byte-stable across calls.
|
|
341
|
-
*/
|
|
342
|
-
export function elideDefaultAnnotations(tools) {
|
|
343
|
-
return tools.map((tool) => {
|
|
344
|
-
const a = tool.annotations;
|
|
345
|
-
if (!a)
|
|
346
|
-
return tool;
|
|
347
|
-
const out = {};
|
|
348
|
-
if (a.title !== undefined)
|
|
349
|
-
out.title = a.title;
|
|
350
|
-
const readOnly = a.readOnlyHint === true;
|
|
351
|
-
if (readOnly)
|
|
352
|
-
out.readOnlyHint = true; // true ≠ default(false) — informative
|
|
353
|
-
// destructiveHint/idempotentHint are spec-meaningful ONLY when !readOnly.
|
|
354
|
-
if (!readOnly) {
|
|
355
|
-
if (a.destructiveHint === false)
|
|
356
|
-
out.destructiveHint = false; // false ≠ default(true)
|
|
357
|
-
if (a.idempotentHint === true)
|
|
358
|
-
out.idempotentHint = true; // true ≠ default(false)
|
|
359
|
-
}
|
|
360
|
-
if (a.openWorldHint === false)
|
|
361
|
-
out.openWorldHint = false; // false ≠ default(true)
|
|
362
|
-
return { ...tool, annotations: out };
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
//# sourceMappingURL=tool-annotations.js.map
|
|
1
|
+
const s={wyrm_scan_projects:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_list_projects:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_project_context:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_global_context:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_session_start:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_session_update:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_quest_add:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_quest_complete:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_all_quests:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_events_subscribe:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_events_since:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_events_publish:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_events_replicate:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_replication:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1},wyrm_embed:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_skill_create:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_harvest:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_auto_capture:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_capture_trace:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_data_insert:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_data_batch_insert:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_data_query:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_data_categories:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_skill_register:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_skill_list:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_skill_get:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_skill_delete:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_skill_activate:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_skill_deactivate:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_skill_search:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_skill_stats:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_skill_graph:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_spec_register:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_set_global:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_search:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_sync:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_stats:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_vector_setup:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_reindex:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_maintenance:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_usage:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_setup:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_orchestrate_task:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_orchestration_config:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_orchestration_stats:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_license:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_activate:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_analytics_dashboard:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_cost_report:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_cloud_backup:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_cloud_sync:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1},wyrm_encrypt_setup:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_entity_add:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_entity_link:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_entity_search:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_entity_graph:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_entity_path:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_entity_merge:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1},wyrm_remember:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_recall:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_feedback:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_context_build:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_truth_set:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_truth_get:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_scaffold_save:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_scaffold_get:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_distill:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_review:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_capture:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_session_prime:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_prune:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_sync_export:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_sync_import:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1},wyrm_import_git:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_import_pr:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_import_rules:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_inject_prompt:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},buddy:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_buddy:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_token_set:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_token_get:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_token_delete:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_reference_add:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_reference_list:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_reference_search:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_capabilities:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_intro:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_migrate_prompt:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_constellation:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_digest:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_check_update:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_self_update:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_failure_record:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_failure_check:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!1},wyrm_failure_list:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_failure_resolve:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_presence_announce:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_presence_list:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_presence_release:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_quest_claim:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_quest_release:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_decided_because:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_decision_downstream:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_decision_upstream:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_decision_invalidate:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_symbol_index:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_symbol_search:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_symbol_callers:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_symbol_stats:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_hours_report:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_invoice_generate:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_session_rehydrate:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_audit_log:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_audit_verify:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_audit_export:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_ask:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_share:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_unshare:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_sync_conflicts:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_sync_resolve:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_goal_set:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_goal_list:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_goal_complete:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_goal_pause:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_goal_resume:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_goal_abandon:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_goal_iterations:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_act:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_agent_init:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_agent_status:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_agent_stop:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_agent_restart:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_mcp_register:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_mcp_list:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_mcp_tools:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_mcp_disable:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_call_external:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_tool_analytics:{readOnlyHint:!0,destructiveHint:!1,idempotentHint:!0},wyrm_quest:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_session:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_skill:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1},wyrm_entity:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1},wyrm_decision_trace:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_goal:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_presence:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_mcp:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_audit:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_project:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0},wyrm_design_token:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0},wyrm_reference:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1},wyrm_run:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1}};function a(e){const i=s[e.name];return i?{...e,annotations:i}:e}function l(e){return e.map(a)}function d(e){return e.map(i=>{const t=i.annotations;if(!t)return i;const n={};t.title!==void 0&&(n.title=t.title);const r=t.readOnlyHint===!0;return r&&(n.readOnlyHint=!0),r||(t.destructiveHint===!1&&(n.destructiveHint=!1),t.idempotentHint===!0&&(n.idempotentHint=!0)),t.openWorldHint===!1&&(n.openWorldHint=!1),{...i,annotations:n}})}export{s as TOOL_ANNOTATIONS,a as annotateTool,l as annotateTools,d as elideDefaultAnnotations};
|
package/dist/tool-manifest.json
CHANGED
package/dist/tool-profiles.js
CHANGED
|
@@ -1,75 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Tool profiles — Wyrm 7.0 (v7 F3, T022): the FROZEN advertised surface.
|
|
3
|
-
*
|
|
4
|
-
* 6.x curated 137 tools into essential(25)/standard(62)/full(137) and sniffed
|
|
5
|
-
* client names to pick one. 7.0 freezes the default surface to the ~31-verb
|
|
6
|
-
* survivor set (spec FR-4): hot-path singles + action-param noun shims. Every
|
|
7
|
-
* 6.x name stays CALLABLE through the alias spine (src/handlers/aliases.ts);
|
|
8
|
-
* only ADVERTISEMENT shrinks.
|
|
9
|
-
*
|
|
10
|
-
* Profiles now mirror the wyrm-manifest tiers (spec FR-4, formalized by T024):
|
|
11
|
-
* - 'standard' (the default): the frozen survivor surface (~31).
|
|
12
|
-
* - 'essential': the always-load core 4 — session_prime, recall, capture,
|
|
13
|
-
* failure_check (spec FR-4 "core" tier).
|
|
14
|
-
* - 'legacy': EVERYTHING — all 6.x names plus the shims. `WYRM_PROFILE=full`
|
|
15
|
-
* is a permanent synonym of 'legacy' (the 6.x env contract preserved:
|
|
16
|
-
* full has always meant "every tool").
|
|
17
|
-
*
|
|
18
|
-
* v7 F3 (T022): client-name sniffing DELETED (Article V — the manifest tiers
|
|
19
|
-
* replace it; no vendor/client special-casing). The ONLY lever is the
|
|
20
|
-
* WYRM_PROFILE env var.
|
|
21
|
-
*
|
|
22
|
-
* (Surface counts pinned by tests/tool-surface-integrity.test.ts and the live
|
|
23
|
-
* byte-stability suite — update together.)
|
|
24
|
-
*
|
|
25
|
-
* @copyright 2026 Ghost Protocol (Pvt) Ltd.
|
|
26
|
-
* @license AGPL-3.0-or-later — dual-licensed; commercial terms: ghosts.lk@proton.me. See LICENSE.
|
|
27
|
-
*/
|
|
28
|
-
import { SURVIVOR_TOOLS } from './handlers/survivors.js';
|
|
29
|
-
/**
|
|
30
|
-
* The always-load core (spec FR-4 manifest "core" tier): the 4 tools a
|
|
31
|
-
* cap-constrained client needs for consult-memory-first to work at all.
|
|
32
|
-
*/
|
|
33
|
-
export const CORE_TOOLS = new Set([
|
|
34
|
-
'wyrm_session_prime',
|
|
35
|
-
'wyrm_recall',
|
|
36
|
-
'wyrm_capture',
|
|
37
|
-
'wyrm_failure_check',
|
|
38
|
-
]);
|
|
39
|
-
/** The frozen default surface — re-exported view of the FR-4 survivor set. */
|
|
40
|
-
export const FROZEN_TOOLS = SURVIVOR_TOOLS;
|
|
41
|
-
/**
|
|
42
|
-
* Pick the active profile for a session — from the WYRM_PROFILE env var ONLY
|
|
43
|
-
* (T022 deleted the client-name heuristic). 'full' is a permanent synonym of
|
|
44
|
-
* 'legacy'; anything else (including unset) gets the frozen default.
|
|
45
|
-
*/
|
|
46
|
-
export function resolveProfile(opts = {}) {
|
|
47
|
-
const env = (opts.envOverride ?? process.env.WYRM_PROFILE ?? '').toLowerCase();
|
|
48
|
-
if (env === 'full' || env === 'legacy')
|
|
49
|
-
return 'legacy';
|
|
50
|
-
if (env === 'essential')
|
|
51
|
-
return 'essential';
|
|
52
|
-
return 'standard';
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Filter a list of tools by the active profile. 'legacy' passes everything —
|
|
56
|
-
* including the hidden aliases — through (WYRM_PROFILE=legacy re-advertises
|
|
57
|
-
* the whole 6.x surface).
|
|
58
|
-
*/
|
|
59
|
-
export function filterByProfile(tools, profile) {
|
|
60
|
-
if (profile === 'legacy')
|
|
61
|
-
return tools;
|
|
62
|
-
const allowed = profile === 'essential' ? CORE_TOOLS : FROZEN_TOOLS;
|
|
63
|
-
return tools.filter((t) => allowed.has(t.name));
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* For diagnostics — count visibility per profile.
|
|
67
|
-
*/
|
|
68
|
-
export function profileStats(totalTools) {
|
|
69
|
-
return {
|
|
70
|
-
essential: CORE_TOOLS.size,
|
|
71
|
-
standard: FROZEN_TOOLS.size,
|
|
72
|
-
legacy: totalTools,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=tool-profiles.js.map
|
|
1
|
+
import{SURVIVOR_TOOLS as a}from"./handlers/survivors.js";const t=new Set(["wyrm_session_prime","wyrm_recall","wyrm_capture","wyrm_failure_check"]),n=a;function l(e={}){const r=(e.envOverride??process.env.WYRM_PROFILE??"").toLowerCase();return r==="full"||r==="legacy"?"legacy":r==="essential"?"essential":"standard"}function c(e,r){if(r==="legacy")return e;const s=r==="essential"?t:n;return e.filter(i=>s.has(i.name))}function f(e){return{essential:t.size,standard:n.size,legacy:e}}export{t as CORE_TOOLS,n as FROZEN_TOOLS,c as filterByProfile,f as profileStats,l as resolveProfile};
|