dino-spec 13.6.0 → 13.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +5 -82
  2. package/bin/dino-hud.js +1 -1
  3. package/bin/dino.js +1 -1
  4. package/dist/commands/hud.d.ts +8 -1
  5. package/dist/commands/hud.d.ts.map +1 -1
  6. package/dist/commands/hud.js +18 -4
  7. package/dist/commands/hud.js.map +1 -1
  8. package/dist/core/agents/context-isolation.js +26 -26
  9. package/dist/core/config/feature-flags.d.ts +1 -25
  10. package/dist/core/config/feature-flags.d.ts.map +1 -1
  11. package/dist/core/config/feature-flags.js +1 -7
  12. package/dist/core/config/feature-flags.js.map +1 -1
  13. package/dist/core/context/auto-injection-engine.d.ts +1 -10
  14. package/dist/core/context/auto-injection-engine.d.ts.map +1 -1
  15. package/dist/core/context/auto-injection-engine.js +2 -45
  16. package/dist/core/context/auto-injection-engine.js.map +1 -1
  17. package/dist/core/context/context-health.d.ts +2 -27
  18. package/dist/core/context/context-health.d.ts.map +1 -1
  19. package/dist/core/context/context-health.js +12 -98
  20. package/dist/core/context/context-health.js.map +1 -1
  21. package/dist/core/context/index.d.ts +2 -3
  22. package/dist/core/context/index.d.ts.map +1 -1
  23. package/dist/core/context/index.js +2 -18
  24. package/dist/core/context/index.js.map +1 -1
  25. package/dist/core/context/lazy-loader.d.ts +1 -44
  26. package/dist/core/context/lazy-loader.d.ts.map +1 -1
  27. package/dist/core/context/lazy-loader.js +1 -59
  28. package/dist/core/context/lazy-loader.js.map +1 -1
  29. package/dist/core/context-repl/index.d.ts +3 -8
  30. package/dist/core/context-repl/index.d.ts.map +1 -1
  31. package/dist/core/context-repl/index.js +3 -11
  32. package/dist/core/context-repl/index.js.map +1 -1
  33. package/dist/core/context-repl/types.d.ts +1 -277
  34. package/dist/core/context-repl/types.d.ts.map +1 -1
  35. package/dist/core/context-repl/types.js +1 -52
  36. package/dist/core/context-repl/types.js.map +1 -1
  37. package/dist/core/generator/claude-md.js +1 -1
  38. package/dist/core/provider/storage.d.ts.map +1 -1
  39. package/dist/core/provider/storage.js +2 -1
  40. package/dist/core/provider/storage.js.map +1 -1
  41. package/dist/hooks/post-edit.js +0 -73
  42. package/dist/hooks/post-edit.js.map +1 -1
  43. package/dist/hooks/session-start.js +0 -115
  44. package/dist/hooks/session-start.js.map +1 -1
  45. package/dist/hooks/types.js +1 -1
  46. package/dist/hooks/user-prompt-submit.js +0 -100
  47. package/dist/hooks/user-prompt-submit.js.map +1 -1
  48. package/dist/hud/config-tui.d.ts +25 -0
  49. package/dist/hud/config-tui.d.ts.map +1 -0
  50. package/dist/hud/config-tui.js +199 -0
  51. package/dist/hud/config-tui.js.map +1 -0
  52. package/dist/hud/config.d.ts +28 -3
  53. package/dist/hud/config.d.ts.map +1 -1
  54. package/dist/hud/config.js +60 -8
  55. package/dist/hud/config.js.map +1 -1
  56. package/dist/hud/index.d.ts.map +1 -1
  57. package/dist/hud/index.js +1 -0
  58. package/dist/hud/index.js.map +1 -1
  59. package/dist/hud/models.d.ts +58 -0
  60. package/dist/hud/models.d.ts.map +1 -0
  61. package/dist/hud/models.js +124 -0
  62. package/dist/hud/models.js.map +1 -0
  63. package/dist/hud/render/budget-bar.d.ts +2 -0
  64. package/dist/hud/render/budget-bar.d.ts.map +1 -1
  65. package/dist/hud/render/budget-bar.js +8 -5
  66. package/dist/hud/render/budget-bar.js.map +1 -1
  67. package/dist/hud/stdin.d.ts +3 -0
  68. package/dist/hud/stdin.d.ts.map +1 -1
  69. package/dist/hud/stdin.js +29 -2
  70. package/dist/hud/stdin.js.map +1 -1
  71. package/dist/hud/token-estimator.d.ts +79 -0
  72. package/dist/hud/token-estimator.d.ts.map +1 -0
  73. package/dist/hud/token-estimator.js +126 -0
  74. package/dist/hud/token-estimator.js.map +1 -0
  75. package/dist/hud/types.d.ts +2 -0
  76. package/dist/hud/types.d.ts.map +1 -1
  77. package/dist/mcp/server.d.ts +1 -2
  78. package/dist/mcp/server.d.ts.map +1 -1
  79. package/dist/mcp/server.js +3 -12
  80. package/dist/mcp/server.js.map +1 -1
  81. package/dist/mcp/tool-tiers.d.ts.map +1 -1
  82. package/dist/mcp/tool-tiers.js +0 -5
  83. package/dist/mcp/tool-tiers.js.map +1 -1
  84. package/dist/mcp/tools/index.d.ts +2 -7
  85. package/dist/mcp/tools/index.d.ts.map +1 -1
  86. package/dist/mcp/tools/index.js +2 -25
  87. package/dist/mcp/tools/index.js.map +1 -1
  88. package/dist/mcp-server.d.ts.map +1 -1
  89. package/dist/mcp-server.js +5 -9
  90. package/dist/mcp-server.js.map +1 -1
  91. package/dist/rules/index.js +2 -2
  92. package/dist/utils/exec.js +2 -2
  93. package/dist/utils/exec.js.map +1 -1
  94. package/dist/utils/gitignore.d.ts.map +1 -1
  95. package/dist/utils/gitignore.js +0 -5
  96. package/dist/utils/gitignore.js.map +1 -1
  97. package/package.json +77 -76
  98. package/dist/core/context/focus-resource-loader.d.ts +0 -143
  99. package/dist/core/context/focus-resource-loader.d.ts.map +0 -1
  100. package/dist/core/context/focus-resource-loader.js +0 -305
  101. package/dist/core/context/focus-resource-loader.js.map +0 -1
  102. package/dist/core/context-repl/__tests__/repl-environment.test.d.ts +0 -7
  103. package/dist/core/context-repl/__tests__/repl-environment.test.d.ts.map +0 -1
  104. package/dist/core/context-repl/__tests__/repl-environment.test.js +0 -335
  105. package/dist/core/context-repl/__tests__/repl-environment.test.js.map +0 -1
  106. package/dist/core/context-repl/context-window-monitor.d.ts +0 -181
  107. package/dist/core/context-repl/context-window-monitor.d.ts.map +0 -1
  108. package/dist/core/context-repl/context-window-monitor.js +0 -309
  109. package/dist/core/context-repl/context-window-monitor.js.map +0 -1
  110. package/dist/core/context-repl/repl-environment.d.ts +0 -66
  111. package/dist/core/context-repl/repl-environment.d.ts.map +0 -1
  112. package/dist/core/context-repl/repl-environment.js +0 -795
  113. package/dist/core/context-repl/repl-environment.js.map +0 -1
  114. package/dist/mcp/focus-filter.d.ts +0 -74
  115. package/dist/mcp/focus-filter.d.ts.map +0 -1
  116. package/dist/mcp/focus-filter.js +0 -229
  117. package/dist/mcp/focus-filter.js.map +0 -1
  118. package/dist/mcp/tools/auto-inject.d.ts +0 -36
  119. package/dist/mcp/tools/auto-inject.d.ts.map +0 -1
  120. package/dist/mcp/tools/auto-inject.js +0 -143
  121. package/dist/mcp/tools/auto-inject.js.map +0 -1
  122. package/dist/mcp/tools/auto-unload.d.ts +0 -29
  123. package/dist/mcp/tools/auto-unload.d.ts.map +0 -1
  124. package/dist/mcp/tools/auto-unload.js +0 -151
  125. package/dist/mcp/tools/auto-unload.js.map +0 -1
  126. package/dist/mcp/tools/context-repl.d.ts +0 -48
  127. package/dist/mcp/tools/context-repl.d.ts.map +0 -1
  128. package/dist/mcp/tools/context-repl.js +0 -290
  129. package/dist/mcp/tools/context-repl.js.map +0 -1
  130. package/dist/mcp/tools/health.d.ts +0 -29
  131. package/dist/mcp/tools/health.d.ts.map +0 -1
  132. package/dist/mcp/tools/health.js +0 -171
  133. package/dist/mcp/tools/health.js.map +0 -1
@@ -1,151 +0,0 @@
1
- /**
2
- * Auto-Unload Tools Module - v13.5.0
3
- *
4
- * MCP tool for automatic context unloading based on budget pressure.
5
- * Wires the auto-unload-engine to be callable from hooks and manually.
6
- *
7
- * Tools:
8
- * - dino_auto_unload - Unload cold context to free budget
9
- */
10
- import { defineTool, registry, } from '../registry.js';
11
- import { executeAutoUnload, } from '../../core/context/auto-unload-engine.js';
12
- import { loadAccessPatterns, } from '../../core/context/access-tracker.js';
13
- import { createLazyContext, } from '../../core/context/lazy-loader.js';
14
- import { join } from 'path';
15
- import { FileSystem } from '../../utils/file-system.js';
16
- // =============================================================================
17
- // State Loading
18
- // =============================================================================
19
- /**
20
- * Get current budget percentage from session or budget file
21
- */
22
- async function getCurrentBudget(projectDir) {
23
- const budgetPath = join(projectDir, '.dino', 'context-budget.json');
24
- if (await FileSystem.exists(budgetPath)) {
25
- const data = await FileSystem.readJsonSafe(budgetPath);
26
- if (data && data.limit > 0) {
27
- return Math.round((data.estimated / data.limit) * 100);
28
- }
29
- }
30
- // Fallback to session.md
31
- const sessionPath = join(projectDir, '.dino', 'session.md');
32
- if (await FileSystem.exists(sessionPath)) {
33
- const content = await FileSystem.readFileSafe(sessionPath);
34
- if (content) {
35
- const match = content.match(/Budget.*?(\d+)%/);
36
- if (match) {
37
- return parseInt(match[1], 10);
38
- }
39
- }
40
- }
41
- return 50; // Default
42
- }
43
- /**
44
- * Map aggressiveness level to minimum coldness threshold
45
- */
46
- function getMinColdness(aggressiveness) {
47
- switch (aggressiveness) {
48
- case 'aggressive':
49
- return 0.3; // Unload even moderately cold resources
50
- case 'light':
51
- return 0.7; // Only unload very cold resources
52
- case 'medium':
53
- default:
54
- return 0.5; // Default threshold
55
- }
56
- }
57
- // =============================================================================
58
- // Tool Handlers
59
- // =============================================================================
60
- /**
61
- * Auto-unload handler
62
- */
63
- async function handleAutoUnload(params, projectDir) {
64
- // Load states
65
- const accessState = await loadAccessPatterns(projectDir);
66
- const lazyState = createLazyContext();
67
- // Get budget
68
- const budgetPercentage = params.budgetPercentage ?? await getCurrentBudget(projectDir);
69
- // Get aggressiveness
70
- const aggressiveness = params.aggressiveness ?? 'medium';
71
- const minColdness = params.minColdness ?? getMinColdness(aggressiveness);
72
- // Execute auto-unload
73
- const result = await executeAutoUnload(lazyState, accessState, {
74
- budgetPercentage,
75
- minColdness,
76
- }, projectDir);
77
- const lines = [];
78
- lines.push('# Auto-Unload Result');
79
- lines.push('');
80
- if (result.executed) {
81
- lines.push(`**Status:** Executed`);
82
- lines.push(`**Tokens freed:** ~${result.totalTokensFreed}`);
83
- lines.push(`**Budget:** ${result.budgetBefore}% -> ${result.budgetAfter}%`);
84
- lines.push('');
85
- if (result.unloaded.length > 0) {
86
- lines.push('## Unloaded Resources');
87
- for (const item of result.unloaded) {
88
- lines.push(`- ${item.file} (~${item.tokensFreed} tokens, coldness: ${item.coldnessScore.toFixed(2)})`);
89
- }
90
- }
91
- }
92
- else {
93
- lines.push(`**Status:** Skipped`);
94
- lines.push(`**Reason:** ${result.reason}`);
95
- lines.push(`**Budget:** ${result.budgetBefore}%`);
96
- }
97
- lines.push('');
98
- lines.push(`**Aggressiveness:** ${aggressiveness}`);
99
- lines.push(`**Min coldness threshold:** ${minColdness}`);
100
- return lines.join('\n');
101
- }
102
- // =============================================================================
103
- // Tool Definitions
104
- // =============================================================================
105
- /**
106
- * Auto-unload tool definition
107
- */
108
- export const autoUnloadTool = defineTool({
109
- name: 'dino_auto_unload',
110
- description: 'Automatically unload cold context resources to free budget (v13.5.0). Part of auto context engineering.',
111
- category: 'retrieval',
112
- inputSchema: {
113
- type: 'object',
114
- properties: {
115
- budgetPercentage: {
116
- type: 'number',
117
- description: 'Current budget percentage 0-100. Auto-detected if not provided.',
118
- },
119
- aggressiveness: {
120
- type: 'string',
121
- enum: ['light', 'medium', 'aggressive'],
122
- description: 'How aggressively to unload (default: medium). Light=70%, Medium=80%, Aggressive=90%.',
123
- },
124
- minColdness: {
125
- type: 'number',
126
- description: 'Minimum coldness score 0-1 to unload (overrides aggressiveness).',
127
- },
128
- },
129
- required: [],
130
- },
131
- handler: handleAutoUnload,
132
- whenToUse: 'Use to free up context budget by unloading cold resources. Called by session-start hook at budget thresholds (70%, 80%, 90%).',
133
- relatedTools: ['dino_health_check', 'dino_auto_inject'],
134
- version: '13.5.0',
135
- });
136
- // =============================================================================
137
- // Exports
138
- // =============================================================================
139
- /**
140
- * All auto-unload tools
141
- */
142
- export const autoUnloadTools = [
143
- autoUnloadTool,
144
- ];
145
- /**
146
- * Register all auto-unload tools with the registry
147
- */
148
- export function registerAutoUnloadTools() {
149
- registry.registerTools(autoUnloadTools);
150
- }
151
- //# sourceMappingURL=auto-unload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auto-unload.js","sourceRoot":"","sources":["../../../src/mcp/tools/auto-unload.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,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EAAE,WAAW;IACrB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iEAAiE;aAC/E;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC;gBACvC,WAAW,EAAE,sFAAsF;aACpG;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kEAAkE;aAChF;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,OAAO,EAAE,gBAAgB;IACzB,SAAS,EAAE,+HAA+H;IAC1I,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;IACvD,OAAO,EAAE,QAAQ;CAClB,CAAC,CAAC;AAEH,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAqB;IAC/C,cAAgC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Context REPL Tools Module - v13.6.0
3
- *
4
- * MCP tools for REPL environment operations.
5
- * Provides programmatic access to context with controlled window growth.
6
- *
7
- * Tools:
8
- * - dino_repl_execute - Execute query in REPL environment
9
- * - dino_repl_peek - Peek at context structure
10
- * - dino_repl_grep - Search within loaded context
11
- *
12
- * Part of RLM-style Context REPL Environment.
13
- */
14
- import { type ToolDefinition } from '../registry.js';
15
- import { type GrepOptions, type ContextQuery } from '../../core/context-repl/index.js';
16
- interface REPLExecuteInput {
17
- code: string | ContextQuery;
18
- maxTokens?: number;
19
- }
20
- interface REPLPeekInput {
21
- pattern?: string;
22
- }
23
- interface REPLGrepInput {
24
- query: string;
25
- options?: GrepOptions | string;
26
- }
27
- /**
28
- * dino_repl_execute - Execute query in REPL environment
29
- */
30
- declare const replExecuteTool: ToolDefinition<REPLExecuteInput>;
31
- /**
32
- * dino_repl_peek - Peek at context structure
33
- */
34
- declare const replPeekTool: ToolDefinition<REPLPeekInput>;
35
- /**
36
- * dino_repl_grep - Search within loaded context
37
- */
38
- declare const replGrepTool: ToolDefinition<REPLGrepInput>;
39
- /**
40
- * All context REPL tools
41
- */
42
- export declare const contextReplTools: ToolDefinition<unknown>[];
43
- /**
44
- * Register context REPL tools with the registry
45
- */
46
- export declare function registerContextReplTools(): void;
47
- export { replExecuteTool, replPeekTool, replGrepTool, };
48
- //# sourceMappingURL=context-repl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-repl.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/context-repl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,YAAY,EAElB,MAAM,kCAAkC,CAAC;AAwE1C,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,aAAa;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;CAChC;AAiLD;;GAEG;AACH,QAAA,MAAM,eAAe,kCAmBnB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,YAAY,+BAchB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,YAAY,+BAmBhB,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,OAAO,CAAC,EAIrD,CAAC;AAEF;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C;AAMD,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,GACb,CAAC"}
@@ -1,290 +0,0 @@
1
- /**
2
- * Context REPL Tools Module - v13.6.0
3
- *
4
- * MCP tools for REPL environment operations.
5
- * Provides programmatic access to context with controlled window growth.
6
- *
7
- * Tools:
8
- * - dino_repl_execute - Execute query in REPL environment
9
- * - dino_repl_peek - Peek at context structure
10
- * - dino_repl_grep - Search within loaded context
11
- *
12
- * Part of RLM-style Context REPL Environment.
13
- */
14
- import { defineTool, registry, } from '../registry.js';
15
- import { REPLEnvironment, REPL_OPERATION_TIMEOUT_MS, } from '../../core/context-repl/index.js';
16
- import { isFeatureEnabled } from '../../core/config/feature-flags.js';
17
- // =============================================================================
18
- // Constants
19
- // =============================================================================
20
- const REPL_RATE_LIMIT_PER_MINUTE = 10;
21
- // =============================================================================
22
- // Rate Limiting
23
- // =============================================================================
24
- /**
25
- * Simple rate limiter for REPL operations
26
- */
27
- class REPLRateLimiter {
28
- callCounts = new Map();
29
- isAllowed(toolName) {
30
- const now = Date.now();
31
- const entry = this.callCounts.get(toolName);
32
- if (!entry || now >= entry.resetAt) {
33
- // Reset window
34
- this.callCounts.set(toolName, {
35
- count: 1,
36
- resetAt: now + 60000, // 1 minute from now
37
- });
38
- return true;
39
- }
40
- if (entry.count >= REPL_RATE_LIMIT_PER_MINUTE) {
41
- return false;
42
- }
43
- entry.count++;
44
- return true;
45
- }
46
- getRemainingCalls(toolName) {
47
- const now = Date.now();
48
- const entry = this.callCounts.get(toolName);
49
- if (!entry || now >= entry.resetAt) {
50
- return REPL_RATE_LIMIT_PER_MINUTE;
51
- }
52
- return Math.max(0, REPL_RATE_LIMIT_PER_MINUTE - entry.count);
53
- }
54
- }
55
- const rateLimiter = new REPLRateLimiter();
56
- // =============================================================================
57
- // REPL Environment Singleton
58
- // =============================================================================
59
- let replInstance = null;
60
- function getREPLInstance(projectDir) {
61
- if (!replInstance) {
62
- replInstance = new REPLEnvironment({ projectDir });
63
- }
64
- return replInstance;
65
- }
66
- // =============================================================================
67
- // Tool Handlers
68
- // =============================================================================
69
- /**
70
- * Execute handler
71
- * Runs a query in the REPL environment
72
- */
73
- async function handleExecute(params, projectDir) {
74
- // Check feature flag
75
- const enabled = await isFeatureEnabled('enableReplEnvironment', projectDir);
76
- if (!enabled) {
77
- return 'REPL environment is disabled. Set `enableReplEnvironment: true` in .dino/config.json to enable.';
78
- }
79
- // Check rate limit
80
- if (!rateLimiter.isAllowed('dino_repl_execute')) {
81
- const remaining = rateLimiter.getRemainingCalls('dino_repl_execute');
82
- return `Rate limit exceeded. Try again in a moment. (Limit: ${REPL_RATE_LIMIT_PER_MINUTE} calls/minute)`;
83
- }
84
- const repl = getREPLInstance(projectDir);
85
- try {
86
- // Execute with timeout
87
- const resultPromise = repl.execute(params.code);
88
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Operation timeout')), REPL_OPERATION_TIMEOUT_MS));
89
- const result = await Promise.race([resultPromise, timeoutPromise]);
90
- return formatREPLResult(result);
91
- }
92
- catch (error) {
93
- return formatError('Execute operation failed', error);
94
- }
95
- }
96
- /**
97
- * Peek handler
98
- * Peeks at context structure without loading full content
99
- */
100
- async function handlePeek(params, projectDir) {
101
- // Check feature flag
102
- const enabled = await isFeatureEnabled('enableReplEnvironment', projectDir);
103
- if (!enabled) {
104
- return 'REPL environment is disabled. Set `enableReplEnvironment: true` in .dino/config.json to enable.';
105
- }
106
- // Check rate limit
107
- if (!rateLimiter.isAllowed('dino_repl_peek')) {
108
- const remaining = rateLimiter.getRemainingCalls('dino_repl_peek');
109
- return `Rate limit exceeded. Try again in a moment. (Limit: ${REPL_RATE_LIMIT_PER_MINUTE} calls/minute)`;
110
- }
111
- const repl = getREPLInstance(projectDir);
112
- try {
113
- // Execute with timeout
114
- const resultPromise = repl.peek(params.pattern);
115
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Operation timeout')), REPL_OPERATION_TIMEOUT_MS));
116
- const result = await Promise.race([resultPromise, timeoutPromise]);
117
- return formatREPLResult(result);
118
- }
119
- catch (error) {
120
- return formatError('Peek operation failed', error);
121
- }
122
- }
123
- /**
124
- * Grep handler
125
- * Searches within loaded context
126
- */
127
- async function handleGrep(params, projectDir) {
128
- // Check feature flag
129
- const enabled = await isFeatureEnabled('enableReplEnvironment', projectDir);
130
- if (!enabled) {
131
- return 'REPL environment is disabled. Set `enableReplEnvironment: true` in .dino/config.json to enable.';
132
- }
133
- // Check rate limit
134
- if (!rateLimiter.isAllowed('dino_repl_grep')) {
135
- const remaining = rateLimiter.getRemainingCalls('dino_repl_grep');
136
- return `Rate limit exceeded. Try again in a moment. (Limit: ${REPL_RATE_LIMIT_PER_MINUTE} calls/minute)`;
137
- }
138
- const repl = getREPLInstance(projectDir);
139
- try {
140
- // Parse options if provided as JSON string
141
- let options;
142
- if (params.options) {
143
- try {
144
- options = typeof params.options === 'string' ? JSON.parse(params.options) : params.options;
145
- }
146
- catch {
147
- return formatError('Invalid options', new Error('Options must be a valid JSON string'));
148
- }
149
- }
150
- // Execute with timeout
151
- const resultPromise = repl.grep(params.query, options);
152
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Operation timeout')), REPL_OPERATION_TIMEOUT_MS));
153
- const result = await Promise.race([resultPromise, timeoutPromise]);
154
- return formatREPLResult(result);
155
- }
156
- catch (error) {
157
- return formatError('Grep operation failed', error);
158
- }
159
- }
160
- // =============================================================================
161
- // Formatting
162
- // =============================================================================
163
- /**
164
- * Format REPL result for display
165
- */
166
- function formatREPLResult(result) {
167
- const lines = [];
168
- if (result.success) {
169
- lines.push('# REPL Result\n');
170
- lines.push(`**Status:** Success`);
171
- lines.push(`**Tokens used:** ${result.tokensUsed}`);
172
- lines.push(`**Execution time:** ${result.executionTimeMs}ms\n`);
173
- if (result.warnings && result.warnings.length > 0) {
174
- lines.push('## Warnings');
175
- for (const warning of result.warnings) {
176
- lines.push(`- ${warning}`);
177
- }
178
- lines.push('');
179
- }
180
- lines.push('## Data\n');
181
- lines.push('```json');
182
- lines.push(JSON.stringify(result.data, null, 2));
183
- lines.push('```');
184
- }
185
- else {
186
- lines.push('# REPL Result\n');
187
- lines.push(`**Status:** Failed`);
188
- lines.push(`**Error:** ${result.error}\n`);
189
- lines.push(`**Execution time:** ${result.executionTimeMs}ms`);
190
- }
191
- return lines.join('\n');
192
- }
193
- /**
194
- * Format error message
195
- */
196
- function formatError(message, error) {
197
- const errorMessage = error instanceof Error ? error.message : String(error);
198
- return `# Error\n\n${message}: ${errorMessage}`;
199
- }
200
- // =============================================================================
201
- // Tool Definitions
202
- // =============================================================================
203
- /**
204
- * dino_repl_execute - Execute query in REPL environment
205
- */
206
- const replExecuteTool = defineTool({
207
- name: 'dino_repl_execute',
208
- description: 'Execute a query or code in the REPL environment. Returns structured results with token usage. Timeout: 30s. Rate limit: 10 calls/minute.',
209
- category: 'retrieval',
210
- inputSchema: {
211
- type: 'object',
212
- properties: {
213
- code: {
214
- type: 'string',
215
- description: 'Query string (natural language, shorthand, or JSON-stringified ContextQuery object)',
216
- },
217
- maxTokens: {
218
- type: 'number',
219
- description: 'Maximum tokens to return (default: 2000)',
220
- },
221
- },
222
- required: ['code'],
223
- },
224
- handler: handleExecute,
225
- });
226
- /**
227
- * dino_repl_peek - Peek at context structure
228
- */
229
- const replPeekTool = defineTool({
230
- name: 'dino_repl_peek',
231
- description: 'Peek at context structure without loading full content. Returns metadata (file count, categories, samples). Read-only operation. Timeout: 30s. Rate limit: 10 calls/minute.',
232
- category: 'retrieval',
233
- inputSchema: {
234
- type: 'object',
235
- properties: {
236
- pattern: {
237
- type: 'string',
238
- description: 'Optional glob pattern to filter files (e.g., "src/**/*.ts")',
239
- },
240
- },
241
- },
242
- handler: handlePeek,
243
- });
244
- /**
245
- * dino_repl_grep - Search within loaded context
246
- */
247
- const replGrepTool = defineTool({
248
- name: 'dino_repl_grep',
249
- description: 'Search for a pattern within loaded context. Returns matching results with file paths and line numbers. Read-only operation. Options: ignoreCase, filesOnly, maxMatches, includeLineNumbers (pass as JSON string). Timeout: 30s. Rate limit: 10 calls/minute.',
250
- category: 'retrieval',
251
- inputSchema: {
252
- type: 'object',
253
- properties: {
254
- query: {
255
- type: 'string',
256
- description: 'Search pattern (string or regex)',
257
- },
258
- options: {
259
- type: 'string',
260
- description: 'JSON string of options: {"ignoreCase": boolean, "filesOnly": boolean, "maxMatches": number, "includeLineNumbers": boolean}',
261
- },
262
- },
263
- required: ['query'],
264
- },
265
- handler: handleGrep,
266
- });
267
- // =============================================================================
268
- // Tool Registration
269
- // =============================================================================
270
- /**
271
- * All context REPL tools
272
- */
273
- export const contextReplTools = [
274
- replExecuteTool,
275
- replPeekTool,
276
- replGrepTool,
277
- ];
278
- /**
279
- * Register context REPL tools with the registry
280
- */
281
- export function registerContextReplTools() {
282
- for (const tool of contextReplTools) {
283
- registry.registerTool(tool);
284
- }
285
- }
286
- // =============================================================================
287
- // Exports
288
- // =============================================================================
289
- export { replExecuteTool, replPeekTool, replGrepTool, };
290
- //# sourceMappingURL=context-repl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-repl.js","sourceRoot":"","sources":["../../../src/mcp/tools/context-repl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,UAAU,EACV,QAAQ,GAET,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EAIf,yBAAyB,GAC1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,eAAe;IACX,UAAU,GAAoD,IAAI,GAAG,EAAE,CAAC;IAEhF,SAAS,CAAC,QAAgB;QACxB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC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AE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4HAA4H;aAC1I;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;IACD,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC;AAEH,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA8B;IACzD,eAA0C;IAC1C,YAAuC;IACvC,YAAuC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;QACpC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,GACb,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Health Monitor Tools Module - v13.5.0
3
- *
4
- * MCP tool for context health monitoring.
5
- * Wires the context-health engine to be callable from hooks and manually.
6
- *
7
- * Tools:
8
- * - dino_health_check - Check context health status
9
- */
10
- import { type ToolDefinition } from '../registry.js';
11
- interface HealthCheckInput {
12
- budgetPercentage?: number;
13
- focusArea?: string;
14
- verbose?: string;
15
- }
16
- /**
17
- * Health check tool definition
18
- */
19
- export declare const healthCheckTool: ToolDefinition<HealthCheckInput>;
20
- /**
21
- * All health tools
22
- */
23
- export declare const healthTools: ToolDefinition[];
24
- /**
25
- * Register all health tools with the registry
26
- */
27
- export declare function registerHealthTools(): void;
28
- export {};
29
- //# sourceMappingURL=health.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/health.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAwBxB,UAAU,gBAAgB;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA6ID;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,gBAAgB,CA2B3D,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,cAAc,EAEvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}