decibel-tools-mcp 1.0.6 → 1.0.8

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 (38) hide show
  1. package/README.md +35 -3
  2. package/dist/server.js +0 -0
  3. package/dist/tools/corpus/index.d.ts +5 -0
  4. package/dist/tools/corpus/index.d.ts.map +1 -0
  5. package/dist/tools/corpus/index.js +95 -0
  6. package/dist/tools/corpus/index.js.map +1 -0
  7. package/dist/tools/corpus.d.ts +33 -0
  8. package/dist/tools/corpus.d.ts.map +1 -0
  9. package/dist/tools/corpus.js +180 -0
  10. package/dist/tools/corpus.js.map +1 -0
  11. package/dist/tools/designer/index.d.ts +4 -0
  12. package/dist/tools/designer/index.d.ts.map +1 -1
  13. package/dist/tools/designer/index.js +177 -1
  14. package/dist/tools/designer/index.js.map +1 -1
  15. package/dist/tools/designer.d.ts +81 -0
  16. package/dist/tools/designer.d.ts.map +1 -1
  17. package/dist/tools/designer.js +304 -0
  18. package/dist/tools/designer.js.map +1 -1
  19. package/dist/tools/index.d.ts.map +1 -1
  20. package/dist/tools/index.js +4 -0
  21. package/dist/tools/index.js.map +1 -1
  22. package/dist/tools/registry.d.ts +3 -0
  23. package/dist/tools/registry.d.ts.map +1 -0
  24. package/dist/tools/registry.js +189 -0
  25. package/dist/tools/registry.js.map +1 -0
  26. package/dist/tools/toolsIndex.d.ts +5 -0
  27. package/dist/tools/toolsIndex.d.ts.map +1 -0
  28. package/dist/tools/toolsIndex.js +37 -0
  29. package/dist/tools/toolsIndex.js.map +1 -0
  30. package/dist/tools/vector/index.d.ts +9 -0
  31. package/dist/tools/vector/index.d.ts.map +1 -0
  32. package/dist/tools/vector/index.js +299 -0
  33. package/dist/tools/vector/index.js.map +1 -0
  34. package/dist/tools/vector.d.ts +153 -0
  35. package/dist/tools/vector.d.ts.map +1 -0
  36. package/dist/tools/vector.js +395 -0
  37. package/dist/tools/vector.js.map +1 -0
  38. package/package.json +1 -1
@@ -0,0 +1,189 @@
1
+ // ============================================================================
2
+ // Registry Tools
3
+ // ============================================================================
4
+ // MCP tools for managing the project registry.
5
+ // ============================================================================
6
+ import { z } from 'zod';
7
+ import { listProjects, registerProject, unregisterProject, addProjectAlias, getRegistryFilePath, resolveProject, } from '../projectRegistry.js';
8
+ // ============================================================================
9
+ // Tool Registration
10
+ // ============================================================================
11
+ export function registerRegistryTools(server) {
12
+ // -------------------------------------------------------------------------
13
+ // registry_list - List all registered projects
14
+ // -------------------------------------------------------------------------
15
+ server.tool('registry_list', 'List all registered projects in the Decibel registry. Shows project IDs, paths, and aliases.', {}, async () => {
16
+ const projects = listProjects();
17
+ const registryPath = getRegistryFilePath();
18
+ if (projects.length === 0) {
19
+ return {
20
+ content: [
21
+ {
22
+ type: 'text',
23
+ text: JSON.stringify({
24
+ registryPath,
25
+ projects: [],
26
+ message: 'No projects registered. Use registry_add to register a project.',
27
+ }, null, 2),
28
+ },
29
+ ],
30
+ };
31
+ }
32
+ return {
33
+ content: [
34
+ {
35
+ type: 'text',
36
+ text: JSON.stringify({
37
+ registryPath,
38
+ projectCount: projects.length,
39
+ projects: projects.map((p) => ({
40
+ id: p.id,
41
+ name: p.name,
42
+ path: p.path,
43
+ aliases: p.aliases || [],
44
+ })),
45
+ }, null, 2),
46
+ },
47
+ ],
48
+ };
49
+ });
50
+ // -------------------------------------------------------------------------
51
+ // registry_add - Register a new project
52
+ // -------------------------------------------------------------------------
53
+ server.tool('registry_add', 'Register a project in the Decibel registry. The project path must contain a .decibel folder.', {
54
+ id: z.string().describe('Unique project ID (typically the directory name)'),
55
+ path: z.string().describe('Absolute path to the project root (must contain .decibel/)'),
56
+ name: z.string().optional().describe('Human-readable project name'),
57
+ aliases: z
58
+ .array(z.string())
59
+ .optional()
60
+ .describe('Alternative names/shortcuts for this project'),
61
+ }, async ({ id, path, name, aliases }) => {
62
+ try {
63
+ registerProject({ id, path, name, aliases });
64
+ return {
65
+ content: [
66
+ {
67
+ type: 'text',
68
+ text: JSON.stringify({
69
+ success: true,
70
+ message: `Project "${id}" registered successfully`,
71
+ project: { id, path, name, aliases },
72
+ }, null, 2),
73
+ },
74
+ ],
75
+ };
76
+ }
77
+ catch (err) {
78
+ return {
79
+ content: [
80
+ {
81
+ type: 'text',
82
+ text: JSON.stringify({
83
+ success: false,
84
+ error: err instanceof Error ? err.message : String(err),
85
+ }, null, 2),
86
+ },
87
+ ],
88
+ };
89
+ }
90
+ });
91
+ // -------------------------------------------------------------------------
92
+ // registry_remove - Remove a project from the registry
93
+ // -------------------------------------------------------------------------
94
+ server.tool('registry_remove', 'Remove a project from the Decibel registry. Does not delete project files.', {
95
+ id: z.string().describe('Project ID to remove'),
96
+ }, async ({ id }) => {
97
+ const removed = unregisterProject(id);
98
+ return {
99
+ content: [
100
+ {
101
+ type: 'text',
102
+ text: JSON.stringify({
103
+ success: removed,
104
+ message: removed
105
+ ? `Project "${id}" removed from registry`
106
+ : `Project "${id}" not found in registry`,
107
+ }, null, 2),
108
+ },
109
+ ],
110
+ };
111
+ });
112
+ // -------------------------------------------------------------------------
113
+ // registry_alias - Add an alias to an existing project
114
+ // -------------------------------------------------------------------------
115
+ server.tool('registry_alias', 'Add an alias (shortcut name) to an existing project in the registry.', {
116
+ id: z.string().describe('Project ID to add alias to'),
117
+ alias: z.string().describe('Alias to add (e.g., "senken" as alias for "senken-trading-agent")'),
118
+ }, async ({ id, alias }) => {
119
+ try {
120
+ addProjectAlias(id, alias);
121
+ return {
122
+ content: [
123
+ {
124
+ type: 'text',
125
+ text: JSON.stringify({
126
+ success: true,
127
+ message: `Alias "${alias}" added to project "${id}"`,
128
+ }, null, 2),
129
+ },
130
+ ],
131
+ };
132
+ }
133
+ catch (err) {
134
+ return {
135
+ content: [
136
+ {
137
+ type: 'text',
138
+ text: JSON.stringify({
139
+ success: false,
140
+ error: err instanceof Error ? err.message : String(err),
141
+ }, null, 2),
142
+ },
143
+ ],
144
+ };
145
+ }
146
+ });
147
+ // -------------------------------------------------------------------------
148
+ // registry_resolve - Test resolution of a project ID
149
+ // -------------------------------------------------------------------------
150
+ server.tool('registry_resolve', 'Test resolution of a project ID/alias. Shows which project would be resolved and how.', {
151
+ projectId: z.string().describe('Project ID, alias, or path to resolve'),
152
+ }, async ({ projectId }) => {
153
+ try {
154
+ const entry = resolveProject(projectId);
155
+ return {
156
+ content: [
157
+ {
158
+ type: 'text',
159
+ text: JSON.stringify({
160
+ success: true,
161
+ input: projectId,
162
+ resolved: {
163
+ id: entry.id,
164
+ name: entry.name,
165
+ path: entry.path,
166
+ aliases: entry.aliases,
167
+ },
168
+ }, null, 2),
169
+ },
170
+ ],
171
+ };
172
+ }
173
+ catch (err) {
174
+ return {
175
+ content: [
176
+ {
177
+ type: 'text',
178
+ text: JSON.stringify({
179
+ success: false,
180
+ input: projectId,
181
+ error: err instanceof Error ? err.message : String(err),
182
+ }, null, 2),
183
+ },
184
+ ],
185
+ };
186
+ }
187
+ });
188
+ }
189
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAC/E,+CAA+C;AAC/C,+EAA+E;AAG/E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAE/B,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,4EAA4E;IAC5E,+CAA+C;IAC/C,4EAA4E;IAC5E,MAAM,CAAC,IAAI,CACT,eAAe,EACf,8FAA8F,EAC9F,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;QAChC,MAAM,YAAY,GAAG,mBAAmB,EAAE,CAAC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AC;IACH,CAAC,CACF,CAAC;IAEF,4EAA4E;IAC5E,qDAAqD;IACrD,4EAA4E;IAC5E,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,uFAAuF,EACvF;QACE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACxE,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QACtB,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;YACxC,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;4BACE,OAAO,EAAE,IAAI;4BACb,KAAK,EAAE,SAAS;4BAChB,QAAQ,EAAE;gCACR,EAAE,EAAE,KAAK,CAAC,EAAE;gCACZ,IAAI,EAAE,KAAK,CAAC,IAAI;gCAChB,IAAI,EAAE,KAAK,CAAC,IAAI;gCAChB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;4BACE,OAAO,EAAE,KAAK;4BACd,KAAK,EAAE,SAAS;4BAChB,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;yBACxD,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ToolSpec } from './types.js';
2
+ export declare const modularTools: ToolSpec[];
3
+ export declare const modularToolMap: Map<string, ToolSpec>;
4
+ export declare function getModularToolNames(): string[];
5
+ //# sourceMappingURL=toolsIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolsIndex.d.ts","sourceRoot":"","sources":["../../src/tools/toolsIndex.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAOtC,eAAO,MAAM,YAAY,EAAE,QAAQ,EAelC,CAAC;AAMF,eAAO,MAAM,cAAc,uBAE1B,CAAC;AAMF,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C"}
@@ -0,0 +1,37 @@
1
+ // ============================================================================
2
+ // Tools Aggregator
3
+ // ============================================================================
4
+ // Central registry of all modular tools.
5
+ // Domains are added here as they are migrated from server.ts.
6
+ // ============================================================================
7
+ import { registryTools } from './registry/index.js';
8
+ // ============================================================================
9
+ // Aggregate All Tools
10
+ // ============================================================================
11
+ export const modularTools = [
12
+ ...registryTools,
13
+ // Add more domains as they are migrated:
14
+ // ...sentinelTools,
15
+ // ...architectTools,
16
+ // ...dojoTools,
17
+ // ...designerTools,
18
+ // ...oracleTools,
19
+ // ...contextTools,
20
+ // ...frictionTools,
21
+ // ...roadmapTools,
22
+ // ...voiceTools,
23
+ // ...agenticTools,
24
+ // ...learningsTools,
25
+ // ...provenanceTools,
26
+ ];
27
+ // ============================================================================
28
+ // Tool Map for Fast Lookup
29
+ // ============================================================================
30
+ export const modularToolMap = new Map(modularTools.map(t => [t.definition.name, t]));
31
+ // ============================================================================
32
+ // Helper to get tool names (for debugging)
33
+ // ============================================================================
34
+ export function getModularToolNames() {
35
+ return modularTools.map(t => t.definition.name);
36
+ }
37
+ //# sourceMappingURL=toolsIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolsIndex.js","sourceRoot":"","sources":["../../src/tools/toolsIndex.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAC/E,yCAAyC;AACzC,8DAA8D;AAC9D,+EAA+E;AAG/E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,YAAY,GAAe;IACtC,GAAG,aAAa;IAChB,yCAAyC;IACzC,oBAAoB;IACpB,qBAAqB;IACrB,gBAAgB;IAChB,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;CACvB,CAAC;AAEF,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CACnC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAC9C,CAAC;AAEF,+EAA+E;AAC/E,2CAA2C;AAC3C,+EAA+E;AAE/E,MAAM,UAAU,mBAAmB;IACjC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ToolSpec } from '../types.js';
2
+ export declare const vectorCreateRunTool: ToolSpec;
3
+ export declare const vectorLogEventTool: ToolSpec;
4
+ export declare const vectorCompleteRunTool: ToolSpec;
5
+ export declare const vectorListRunsTool: ToolSpec;
6
+ export declare const vectorGetRunTool: ToolSpec;
7
+ export declare const vectorScorePromptTool: ToolSpec;
8
+ export declare const vectorTools: ToolSpec[];
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/vector/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAkCvC,eAAO,MAAM,mBAAmB,EAAE,QA+DjC,CAAC;AAMF,eAAO,MAAM,kBAAkB,EAAE,QA+ChC,CAAC;AAMF,eAAO,MAAM,qBAAqB,EAAE,QAsCnC,CAAC;AAMF,eAAO,MAAM,kBAAkB,EAAE,QAqChC,CAAC;AAMF,eAAO,MAAM,gBAAgB,EAAE,QAkC9B,CAAC;AAMF,eAAO,MAAM,qBAAqB,EAAE,QA8BnC,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,QAAQ,EAOjC,CAAC"}
@@ -0,0 +1,299 @@
1
+ // ============================================================================
2
+ // Vector Domain Tools
3
+ // ============================================================================
4
+ // MCP tools for Vector - AI session tracking and analysis.
5
+ // Enables agents to log events, track runs, and calculate inference load.
6
+ // ============================================================================
7
+ import { toolSuccess, toolError, requireFields } from '../shared/index.js';
8
+ import { createRun, logEvent, completeRun, listRuns, getRun, scorePrompt, } from '../vector.js';
9
+ // ============================================================================
10
+ // Constants
11
+ // ============================================================================
12
+ const VALID_AGENT_TYPES = ['claude-code', 'cursor', 'replit', 'chatgpt', 'custom'];
13
+ const VALID_EVENT_TYPES = [
14
+ 'prompt_received', 'plan_proposed', 'assumption_made', 'clarifying_question',
15
+ 'command_ran', 'file_touched', 'test_result', 'backtrack', 'error',
16
+ 'user_correction', 'run_completed'
17
+ ];
18
+ // ============================================================================
19
+ // Create Run Tool
20
+ // ============================================================================
21
+ export const vectorCreateRunTool = {
22
+ definition: {
23
+ name: 'vector_create_run',
24
+ description: 'Start a new agent run for Vector tracking. Creates a run folder in .decibel/runs/ with prompt.json and events.jsonl. Use this at the start of any significant agent session to enable drift analysis.',
25
+ inputSchema: {
26
+ type: 'object',
27
+ properties: {
28
+ projectId: {
29
+ type: 'string',
30
+ description: 'Optional project identifier. Uses default project if not specified.',
31
+ },
32
+ agent: {
33
+ type: 'object',
34
+ description: 'Information about the AI agent',
35
+ properties: {
36
+ type: {
37
+ type: 'string',
38
+ enum: ['claude-code', 'cursor', 'replit', 'chatgpt', 'custom'],
39
+ description: 'The type of AI agent',
40
+ },
41
+ version: {
42
+ type: 'string',
43
+ description: 'Optional version string of the agent',
44
+ },
45
+ },
46
+ required: ['type'],
47
+ },
48
+ raw_prompt: {
49
+ type: 'string',
50
+ description: 'The original prompt from the user',
51
+ },
52
+ intent: {
53
+ type: 'object',
54
+ description: 'Optional parsed intent from the prompt',
55
+ properties: {
56
+ goal: { type: 'string', description: 'What the prompt is trying to achieve' },
57
+ scope: { type: 'array', items: { type: 'string' }, description: 'Files/modules in scope' },
58
+ non_goals: { type: 'array', items: { type: 'string' }, description: 'Explicit exclusions' },
59
+ constraints: { type: 'array', items: { type: 'string' }, description: 'Rules to follow' },
60
+ acceptance: { type: 'array', items: { type: 'string' }, description: 'Success criteria' },
61
+ risk_posture: { type: 'string', enum: ['safe', 'moderate', 'aggressive'] },
62
+ },
63
+ },
64
+ },
65
+ required: ['agent', 'raw_prompt'],
66
+ },
67
+ },
68
+ handler: async (args) => {
69
+ try {
70
+ const input = args;
71
+ requireFields(input, 'agent', 'raw_prompt');
72
+ requireFields(input.agent, 'type');
73
+ if (!VALID_AGENT_TYPES.includes(input.agent.type)) {
74
+ throw new Error(`Invalid agent type: ${input.agent.type}. Must be one of: ${VALID_AGENT_TYPES.join(', ')}`);
75
+ }
76
+ const result = await createRun(input);
77
+ return toolSuccess(result);
78
+ }
79
+ catch (err) {
80
+ return toolError(err instanceof Error ? err.message : String(err));
81
+ }
82
+ },
83
+ };
84
+ // ============================================================================
85
+ // Log Event Tool
86
+ // ============================================================================
87
+ export const vectorLogEventTool = {
88
+ definition: {
89
+ name: 'vector_log_event',
90
+ description: 'Log an event to an existing run. Events are appended to events.jsonl and used by Vector to analyze drift, assumptions, and session flow.',
91
+ inputSchema: {
92
+ type: 'object',
93
+ properties: {
94
+ projectId: {
95
+ type: 'string',
96
+ description: 'Optional project identifier. Uses default project if not specified.',
97
+ },
98
+ run_id: {
99
+ type: 'string',
100
+ description: 'The run ID to log the event to (e.g., "RUN-2026-01-10T...")',
101
+ },
102
+ type: {
103
+ type: 'string',
104
+ enum: [
105
+ 'plan_proposed', 'assumption_made', 'clarifying_question',
106
+ 'command_ran', 'file_touched', 'test_result', 'backtrack',
107
+ 'error', 'user_correction'
108
+ ],
109
+ description: 'The type of event. Use prompt_received and run_completed via create/complete tools.',
110
+ },
111
+ payload: {
112
+ type: 'object',
113
+ description: 'Event-specific payload data. Structure depends on event type.',
114
+ },
115
+ },
116
+ required: ['run_id', 'type'],
117
+ },
118
+ },
119
+ handler: async (args) => {
120
+ try {
121
+ const input = args;
122
+ requireFields(input, 'run_id', 'type');
123
+ if (!VALID_EVENT_TYPES.includes(input.type)) {
124
+ throw new Error(`Invalid event type: ${input.type}. Must be one of: ${VALID_EVENT_TYPES.join(', ')}`);
125
+ }
126
+ const result = await logEvent(input);
127
+ return toolSuccess(result);
128
+ }
129
+ catch (err) {
130
+ return toolError(err instanceof Error ? err.message : String(err));
131
+ }
132
+ },
133
+ };
134
+ // ============================================================================
135
+ // Complete Run Tool
136
+ // ============================================================================
137
+ export const vectorCompleteRunTool = {
138
+ definition: {
139
+ name: 'vector_complete_run',
140
+ description: 'Mark a run as complete with a summary. Creates summary.md and logs the run_completed event. Call this when an agent session ends.',
141
+ inputSchema: {
142
+ type: 'object',
143
+ properties: {
144
+ projectId: {
145
+ type: 'string',
146
+ description: 'Optional project identifier. Uses default project if not specified.',
147
+ },
148
+ run_id: {
149
+ type: 'string',
150
+ description: 'The run ID to complete',
151
+ },
152
+ success: {
153
+ type: 'boolean',
154
+ description: 'Whether the run completed successfully',
155
+ },
156
+ summary: {
157
+ type: 'string',
158
+ description: 'Optional summary of what was accomplished or why it failed',
159
+ },
160
+ },
161
+ required: ['run_id', 'success'],
162
+ },
163
+ },
164
+ handler: async (args) => {
165
+ try {
166
+ const input = args;
167
+ requireFields(input, 'run_id', 'success');
168
+ const result = await completeRun(input);
169
+ return toolSuccess(result);
170
+ }
171
+ catch (err) {
172
+ return toolError(err instanceof Error ? err.message : String(err));
173
+ }
174
+ },
175
+ };
176
+ // ============================================================================
177
+ // List Runs Tool
178
+ // ============================================================================
179
+ export const vectorListRunsTool = {
180
+ definition: {
181
+ name: 'vector_list_runs',
182
+ description: 'List recent runs for a project. Returns run metadata including agent, timestamps, event count, and completion status.',
183
+ inputSchema: {
184
+ type: 'object',
185
+ properties: {
186
+ projectId: {
187
+ type: 'string',
188
+ description: 'Optional project identifier. Uses default project if not specified.',
189
+ },
190
+ limit: {
191
+ type: 'integer',
192
+ description: 'Maximum number of runs to return (default: 20)',
193
+ },
194
+ agent_type: {
195
+ type: 'string',
196
+ enum: ['claude-code', 'cursor', 'replit', 'chatgpt', 'custom'],
197
+ description: 'Filter runs by agent type',
198
+ },
199
+ },
200
+ },
201
+ },
202
+ handler: async (args) => {
203
+ try {
204
+ const input = args;
205
+ if (input.agent_type && !VALID_AGENT_TYPES.includes(input.agent_type)) {
206
+ throw new Error(`Invalid agent type: ${input.agent_type}. Must be one of: ${VALID_AGENT_TYPES.join(', ')}`);
207
+ }
208
+ const result = await listRuns(input);
209
+ return toolSuccess(result);
210
+ }
211
+ catch (err) {
212
+ return toolError(err instanceof Error ? err.message : String(err));
213
+ }
214
+ },
215
+ };
216
+ // ============================================================================
217
+ // Get Run Tool
218
+ // ============================================================================
219
+ export const vectorGetRunTool = {
220
+ definition: {
221
+ name: 'vector_get_run',
222
+ description: 'Get details of a specific run including prompt and optionally all events. Use this to analyze a session for drift and assumptions.',
223
+ inputSchema: {
224
+ type: 'object',
225
+ properties: {
226
+ projectId: {
227
+ type: 'string',
228
+ description: 'Optional project identifier. Uses default project if not specified.',
229
+ },
230
+ run_id: {
231
+ type: 'string',
232
+ description: 'The run ID to retrieve',
233
+ },
234
+ include_events: {
235
+ type: 'boolean',
236
+ description: 'Include the full event stream (default: false)',
237
+ },
238
+ },
239
+ required: ['run_id'],
240
+ },
241
+ },
242
+ handler: async (args) => {
243
+ try {
244
+ const input = args;
245
+ requireFields(input, 'run_id');
246
+ const result = await getRun(input);
247
+ return toolSuccess(result);
248
+ }
249
+ catch (err) {
250
+ return toolError(err instanceof Error ? err.message : String(err));
251
+ }
252
+ },
253
+ };
254
+ // ============================================================================
255
+ // Score Prompt Tool
256
+ // ============================================================================
257
+ export const vectorScorePromptTool = {
258
+ definition: {
259
+ name: 'vector_score_prompt',
260
+ description: 'Calculate the inference load score for a prompt. Returns a 0-100 score indicating how much the agent will have to guess, with breakdown and suggestions for improvement. Higher score = more risk of drift.',
261
+ inputSchema: {
262
+ type: 'object',
263
+ properties: {
264
+ prompt: {
265
+ type: 'string',
266
+ description: 'The prompt text to analyze',
267
+ },
268
+ projectId: {
269
+ type: 'string',
270
+ description: 'Optional project identifier for context-aware scoring (future enhancement)',
271
+ },
272
+ },
273
+ required: ['prompt'],
274
+ },
275
+ },
276
+ handler: async (args) => {
277
+ try {
278
+ const input = args;
279
+ requireFields(input, 'prompt');
280
+ const result = scorePrompt(input);
281
+ return toolSuccess(result);
282
+ }
283
+ catch (err) {
284
+ return toolError(err instanceof Error ? err.message : String(err));
285
+ }
286
+ },
287
+ };
288
+ // ============================================================================
289
+ // Export All Tools
290
+ // ============================================================================
291
+ export const vectorTools = [
292
+ vectorCreateRunTool,
293
+ vectorLogEventTool,
294
+ vectorCompleteRunTool,
295
+ vectorListRunsTool,
296
+ vectorGetRunTool,
297
+ vectorScorePromptTool,
298
+ ];
299
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/vector/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAC/E,2DAA2D;AAC3D,0EAA0E;AAC1E,+EAA+E;AAG/E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EACL,SAAS,EAET,QAAQ,EAER,WAAW,EAEX,QAAQ,EAER,MAAM,EAEN,WAAW,GAIZ,MAAM,cAAc,CAAC;AAEtB,+EAA+E;AAC/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