@triedotdev/mcp 1.0.164 → 1.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/{chunk-5TRCQAOE.js → chunk-2Z3TQNNK.js} +16 -5
- package/dist/chunk-2Z3TQNNK.js.map +1 -0
- package/dist/{chunk-5BYSJ7XT.js → chunk-GTKYBOXL.js} +13 -2
- package/dist/{chunk-5BYSJ7XT.js.map → chunk-GTKYBOXL.js.map} +1 -1
- package/dist/{chunk-D6E4Q4I6.js → chunk-HOGKPDZA.js} +302 -58
- package/dist/chunk-HOGKPDZA.js.map +1 -0
- package/dist/{chunk-LR46VMIE.js → chunk-JEZ7XJQN.js} +5 -5
- package/dist/{chunk-ERMLZJTK.js → chunk-JNUOW2JS.js} +13 -13
- package/dist/{chunk-62JD7MIS.js → chunk-LG5CBK6A.js} +15 -35
- package/dist/chunk-LG5CBK6A.js.map +1 -0
- package/dist/{chunk-LLDZDU2Y.js → chunk-LR5M4RTN.js} +79 -1
- package/dist/chunk-LR5M4RTN.js.map +1 -0
- package/dist/{chunk-Y4B3VEL7.js → chunk-MVVPJ73K.js} +438 -202
- package/dist/chunk-MVVPJ73K.js.map +1 -0
- package/dist/chunk-OBQ74FOU.js +27 -0
- package/dist/chunk-OBQ74FOU.js.map +1 -0
- package/dist/{chunk-IRZXBQVQ.js → chunk-S36IO3EE.js} +134 -101
- package/dist/chunk-S36IO3EE.js.map +1 -0
- package/dist/{chunk-HFVPHQL3.js → chunk-TQOO6A4G.js} +9 -9
- package/dist/{chunk-OKK4QNK3.js → chunk-UXRW2YSP.js} +86 -12
- package/dist/chunk-UXRW2YSP.js.map +1 -0
- package/dist/{chunk-ACU3IXZG.js → chunk-ZKKKLRZZ.js} +7 -7
- package/dist/cli/main.js +215 -57
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/yolo-daemon.js +15 -14
- package/dist/cli/yolo-daemon.js.map +1 -1
- package/dist/{fast-analyzer-LLZ6FLP5.js → fast-analyzer-NJQO3TFD.js} +3 -3
- package/dist/{goal-manager-D6XKE3FY.js → goal-manager-DVX24UPZ.js} +5 -5
- package/dist/{goal-validator-4DDL7NBP.js → goal-validator-6Y5CDEMJ.js} +5 -5
- package/dist/{hypothesis-RI3Q33JB.js → hypothesis-UKPGOYY2.js} +5 -5
- package/dist/index.js +16 -15
- package/dist/index.js.map +1 -1
- package/dist/{issue-store-DUR5UTYK.js → issue-store-UZAPI5DU.js} +3 -3
- package/dist/{ledger-ZTR63P3L.js → ledger-CNFCJKHX.js} +8 -2
- package/dist/project-state-AHPA77SM.js +28 -0
- package/dist/server/mcp-server.js +16 -15
- package/dist/sync-M2FSWPBC.js +12 -0
- package/dist/{tiered-storage-FHHAJR4P.js → tiered-storage-OP74NPJY.js} +2 -2
- package/dist/tiered-storage-OP74NPJY.js.map +1 -0
- package/dist/{trie-agent-NYSPGZYS.js → trie-agent-6SWUHCVO.js} +12 -12
- package/dist/trie-agent-6SWUHCVO.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-5TRCQAOE.js.map +0 -1
- package/dist/chunk-62JD7MIS.js.map +0 -1
- package/dist/chunk-D6E4Q4I6.js.map +0 -1
- package/dist/chunk-IRZXBQVQ.js.map +0 -1
- package/dist/chunk-LLDZDU2Y.js.map +0 -1
- package/dist/chunk-OKK4QNK3.js.map +0 -1
- package/dist/chunk-Y4B3VEL7.js.map +0 -1
- /package/dist/{chunk-LR46VMIE.js.map → chunk-JEZ7XJQN.js.map} +0 -0
- /package/dist/{chunk-ERMLZJTK.js.map → chunk-JNUOW2JS.js.map} +0 -0
- /package/dist/{chunk-HFVPHQL3.js.map → chunk-TQOO6A4G.js.map} +0 -0
- /package/dist/{chunk-ACU3IXZG.js.map → chunk-ZKKKLRZZ.js.map} +0 -0
- /package/dist/{fast-analyzer-LLZ6FLP5.js.map → fast-analyzer-NJQO3TFD.js.map} +0 -0
- /package/dist/{goal-manager-D6XKE3FY.js.map → goal-manager-DVX24UPZ.js.map} +0 -0
- /package/dist/{goal-validator-4DDL7NBP.js.map → goal-validator-6Y5CDEMJ.js.map} +0 -0
- /package/dist/{hypothesis-RI3Q33JB.js.map → hypothesis-UKPGOYY2.js.map} +0 -0
- /package/dist/{issue-store-DUR5UTYK.js.map → issue-store-UZAPI5DU.js.map} +0 -0
- /package/dist/{ledger-ZTR63P3L.js.map → ledger-CNFCJKHX.js.map} +0 -0
- /package/dist/{tiered-storage-FHHAJR4P.js.map → project-state-AHPA77SM.js.map} +0 -0
- /package/dist/{trie-agent-NYSPGZYS.js.map → sync-M2FSWPBC.js.map} +0 -0
package/dist/cli/yolo-daemon.js
CHANGED
|
@@ -3,34 +3,35 @@ import {
|
|
|
3
3
|
InteractiveDashboard,
|
|
4
4
|
StreamingManager,
|
|
5
5
|
TrieWatchTool
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-HOGKPDZA.js";
|
|
7
7
|
import "../chunk-JVMBCWKS.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-JNUOW2JS.js";
|
|
9
9
|
import "../chunk-WCN7S3EI.js";
|
|
10
10
|
import "../chunk-Q5EKA5YA.js";
|
|
11
11
|
import "../chunk-VR4VWXXU.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-2Z3TQNNK.js";
|
|
13
|
+
import "../chunk-JEZ7XJQN.js";
|
|
14
14
|
import "../chunk-T63OHG4Q.js";
|
|
15
15
|
import {
|
|
16
16
|
isTrieInitialized
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-LG5CBK6A.js";
|
|
18
|
+
import "../chunk-ZKKKLRZZ.js";
|
|
19
|
+
import "../chunk-OBQ74FOU.js";
|
|
19
20
|
import "../chunk-GDWA3CH3.js";
|
|
20
21
|
import "../chunk-TN5WEKWI.js";
|
|
21
22
|
import "../chunk-ZV2K6M7T.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-LLDZDU2Y.js";
|
|
24
|
-
import "../chunk-VUL52BQL.js";
|
|
25
|
-
import "../chunk-FQ45QP5A.js";
|
|
26
|
-
import "../chunk-5BYSJ7XT.js";
|
|
27
|
-
import "../chunk-IRZXBQVQ.js";
|
|
28
|
-
import "../chunk-EFWVF6TI.js";
|
|
23
|
+
import "../chunk-TQOO6A4G.js";
|
|
29
24
|
import "../chunk-SY6KQG44.js";
|
|
30
25
|
import "../chunk-OMR4YCBS.js";
|
|
26
|
+
import "../chunk-VUL52BQL.js";
|
|
31
27
|
import "../chunk-6NLHFIYA.js";
|
|
28
|
+
import "../chunk-LR5M4RTN.js";
|
|
29
|
+
import "../chunk-FQ45QP5A.js";
|
|
30
|
+
import "../chunk-S36IO3EE.js";
|
|
31
|
+
import "../chunk-GTKYBOXL.js";
|
|
32
|
+
import "../chunk-EFWVF6TI.js";
|
|
32
33
|
import "../chunk-ME2OERF5.js";
|
|
33
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-MVVPJ73K.js";
|
|
34
35
|
import "../chunk-43X6JBEM.js";
|
|
35
36
|
import {
|
|
36
37
|
getWorkingDirectory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli/yolo-daemon.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Trie Watch - File Watcher\n * \n * Watches a directory for changes and checks for goal violations.\n * \n * Usage:\n * trie watch [options] # Watch for changes\n * \n * See `trie watch --help` for all options.\n */\n\nimport { watch, existsSync, statSync } from 'fs';\nimport { readdir } from 'fs/promises';\nimport { join, extname, basename, resolve } from 'path';\nimport { StreamingManager } from '../utils/streaming.js';\nimport { InteractiveDashboard } from './interactive-dashboard.js';\nimport { getWorkingDirectory } from '../utils/workspace.js';\nimport { isInteractiveMode, setInteractiveMode } from '../utils/progress.js';\nimport { isTrieInitialized } from '../utils/trie-init.js';\nimport { TrieWatchTool } from '../tools/watch.js';\n\n// File extensions to watch\nconst WATCH_EXTENSIONS = new Set([\n '.ts', '.tsx', '.js', '.jsx', '.mjs',\n '.vue', '.svelte', '.astro',\n '.py', '.go', '.rs'\n]);\n\n// Directories to skip\nconst SKIP_DIRS = new Set([\n 'node_modules', '.git', 'dist', 'build', '.next', '.nuxt',\n 'coverage', '.turbo', '.cache', '__pycache__', '.venv'\n]);\n\ninterface DaemonConfig {\n directory: string;\n debounceMs: number;\n jsonOutput: boolean;\n format?: 'text' | 'json';\n output?: string;\n parallel?: boolean;\n cache?: boolean;\n maxConcurrency?: number;\n streaming?: boolean;\n interactive?: boolean;\n workers?: boolean;\n timeoutMs?: number;\n files?: string[];\n /** User count for cost estimation (default: 250) */\n userCount?: number;\n /** Run once and exit (for pre-commit hooks) */\n once?: boolean;\n /** Only scan staged files (for pre-commit hooks) */\n stagedOnly?: boolean;\n /** Exit code to use on failure: 'never', 'critical', 'serious' */\n failOn?: 'never' | 'critical' | 'serious';\n}\n\ninterface DaemonStats {\n filesScanned: number;\n issuesFound: number;\n errors: number;\n startTime: number;\n}\n\nclass WatchDaemon {\n private config: DaemonConfig;\n private stats: DaemonStats;\n private watchers: Map<string, ReturnType<typeof watch>> = new Map();\n private pendingFiles: Set<string> = new Set();\n private debounceTimer: NodeJS.Timeout | null = null;\n private isProcessing = false;\n private streamingManager: StreamingManager | undefined = undefined;\n private dashboard: InteractiveDashboard | undefined = undefined;\n private trieWatchTool: TrieWatchTool;\n\n constructor(config: DaemonConfig) {\n this.config = config;\n this.stats = {\n filesScanned: 0,\n issuesFound: 0,\n errors: 0,\n startTime: Date.now()\n };\n this.trieWatchTool = new TrieWatchTool();\n }\n\n /**\n * Start the daemon\n */\n async start(): Promise<void> {\n // Enable global interactive mode only when:\n // 1. Both stdout AND stdin are TTY\n // 2. stdin supports setRawMode (required by Ink)\n // (git hooks/CI often have non-TTY stdin, and some terminals don't support raw mode)\n const hasInteractiveTTY =\n process.stdout.isTTY === true && \n process.stdin.isTTY === true &&\n typeof process.stdin.setRawMode === 'function';\n if (this.config.interactive !== false && hasInteractiveTTY && !this.config.once) {\n setInteractiveMode(true);\n }\n if (!isTrieInitialized(this.config.directory)) {\n if (!isInteractiveMode()) {\n console.error('Trie is not initialized for this project.');\n console.error('Run `trie init` first.');\n }\n process.exit(1);\n }\n\n // If in once mode (pre-commit hook), just exit - the hook itself queries the ledger\n if (this.config.once) {\n console.log('Pre-commit mode detected - hook should query ledger directly');\n process.exit(0);\n }\n\n this.log('info', 'Starting Trie Watch', {\n directory: this.config.directory,\n debounceMs: this.config.debounceMs\n });\n if (!isInteractiveMode()) {\n console.error('\\nTrie is watching for goal violations.\\n');\n }\n\n // Validate directory\n if (!existsSync(this.config.directory)) {\n this.log('error', 'Directory not found', { directory: this.config.directory });\n process.exit(1);\n }\n\n // Start interactive dashboard if enabled\n if (isInteractiveMode()) {\n this.streamingManager = new StreamingManager();\n this.dashboard = new InteractiveDashboard();\n this.streamingManager.subscribe(update => this.dashboard?.handleStreamUpdate(update));\n await this.dashboard.start();\n this.streamingManager.reportWatchStatus({\n watching: true,\n directories: 0,\n debounceMs: this.config.debounceMs\n });\n }\n\n // Initialize the TrieWatchTool for goal checking\n await this.trieWatchTool.execute({\n action: 'start',\n directory: this.config.directory,\n debounceMs: this.config.debounceMs\n });\n\n // Start watching\n await this.watchDirectory(this.config.directory);\n this.streamingManager?.reportWatchStatus({\n watching: true,\n directories: this.watchers.size,\n debounceMs: this.config.debounceMs\n });\n this.log('info', 'Watching for changes...', { \n directories: this.watchers.size \n });\n\n // Handle graceful shutdown\n process.on('SIGINT', () => this.shutdown('SIGINT'));\n process.on('SIGTERM', () => this.shutdown('SIGTERM'));\n }\n\n /**\n * Watch a directory recursively\n */\n private async watchDirectory(dir: string): Promise<void> {\n if (!existsSync(dir)) return;\n\n try {\n const stat = statSync(dir);\n if (!stat.isDirectory()) return;\n\n const dirName = basename(dir);\n if (SKIP_DIRS.has(dirName) || dirName.startsWith('.')) return;\n\n // Watch this directory\n const watcher = watch(dir, { persistent: true }, (_eventType, filename) => {\n if (!filename) return;\n\n const fullPath = join(dir, filename);\n const ext = extname(filename).toLowerCase();\n\n if (!WATCH_EXTENSIONS.has(ext)) return;\n if (!existsSync(fullPath)) return;\n\n this.pendingFiles.add(fullPath);\n this.streamingManager?.reportWatchChange(fullPath);\n this.scheduleProcessing();\n });\n\n this.watchers.set(dir, watcher);\n\n // Recursively watch subdirectories\n const entries = await readdir(dir, { withFileTypes: true });\n for (const entry of entries) {\n if (entry.isDirectory()) {\n await this.watchDirectory(join(dir, entry.name));\n }\n }\n } catch (error) {\n // Skip inaccessible directories\n }\n }\n\n /**\n * Schedule processing of pending files (debounced)\n */\n private scheduleProcessing(): void {\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n\n this.debounceTimer = setTimeout(() => {\n this.processPendingFiles();\n }, this.config.debounceMs);\n }\n\n /**\n * Process all pending files\n */\n private async processPendingFiles(): Promise<void> {\n if (this.isProcessing || this.pendingFiles.size === 0) return;\n\n this.isProcessing = true;\n const files = Array.from(this.pendingFiles);\n this.pendingFiles.clear();\n\n this.log('info', 'Processing changed files', { \n count: files.length,\n files: files.map(f => basename(f))\n });\n\n try {\n // Trigger goal violation checking via TrieWatchTool\n // The tool handles AI-powered goal checking, priority scoring, caching, etc.\n const result = await this.trieWatchTool.execute({\n action: 'status'\n });\n\n // Extract issues from the result\n const statusMatch = result.content?.[0]?.text?.match(/Issues Found: (\\d+)/);\n if (statusMatch && statusMatch[1]) {\n const issuesFound = parseInt(statusMatch[1], 10);\n this.stats.issuesFound += issuesFound;\n \n if (issuesFound > 0) {\n this.log('info', 'Goal violations detected', { \n count: issuesFound,\n files: files.length \n });\n }\n }\n } catch (error) {\n this.log('error', 'Failed to check for goal violations', { \n error: error instanceof Error ? error.message : String(error)\n });\n this.stats.errors++;\n }\n \n this.isProcessing = false;\n }\n\n\n /**\n * Log a message\n */\n private log(level: 'info' | 'warn' | 'error', message: string, data?: Record<string, unknown>): void {\n const timestamp = new Date().toISOString();\n const uptime = Math.round((Date.now() - this.stats.startTime) / 1000);\n\n // Suppress human-readable logs when interactive dashboard is active\n if (!this.config.jsonOutput && isInteractiveMode()) {\n return;\n }\n\n if (this.config.jsonOutput) {\n console.log(JSON.stringify({\n timestamp,\n level,\n message,\n uptime,\n ...data,\n stats: this.stats\n }));\n } else {\n const levelEmoji = { info: '[i]', warn: '[!]', error: '[X]' }[level];\n const dataStr = data ? ` ${JSON.stringify(data)}` : '';\n console.log(`[${timestamp}] ${levelEmoji} ${message}${dataStr}`);\n }\n }\n\n /**\n * Graceful shutdown\n */\n private async shutdown(signal: string): Promise<void> {\n this.log('info', 'Shutting down', { signal, stats: this.stats });\n\n // Stop the TrieWatchTool\n try {\n await this.trieWatchTool.execute({ action: 'stop' });\n } catch (error) {\n // Ignore errors during shutdown\n }\n\n // Close all watchers\n for (const watcher of this.watchers.values()) {\n watcher.close();\n }\n\n // Clear timers\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n\n if (this.streamingManager) {\n this.streamingManager.reportWatchStatus({\n watching: false,\n directories: 0\n });\n }\n if (this.dashboard) {\n this.dashboard.stop();\n }\n\n process.exit(0);\n }\n}\n\n/**\n * Parse command line arguments\n */\nfunction parseArgs(): DaemonConfig {\n const args = process.argv.slice(2);\n const config: DaemonConfig = {\n // Silent mode for initial workspace detection (TUI will handle display)\n directory: getWorkingDirectory(undefined, true),\n debounceMs: 1000,\n jsonOutput: false,\n // Default to interactive mode for TTY terminals\n interactive: process.stdout.isTTY === true\n };\n\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n const nextArg = args[i + 1];\n\n switch (arg) {\n case '--dir':\n case '-d':\n config.directory = resolve(nextArg || '.');\n i++;\n break;\n case '--debounce':\n case '-D':\n config.debounceMs = parseInt(nextArg || '1000', 10);\n i++;\n break;\n case '--json':\n config.jsonOutput = true;\n break;\n case '--format':\n if (nextArg) {\n config.format = nextArg === 'json' ? 'json' : 'text';\n i++;\n }\n break;\n case '--output':\n if (nextArg) {\n config.output = nextArg;\n i++;\n }\n break;\n case '--parallel':\n config.parallel = true;\n break;\n case '--no-parallel':\n config.parallel = false;\n break;\n case '--cache':\n config.cache = true;\n break;\n case '--no-cache':\n config.cache = false;\n break;\n case '--force-rescan':\n case '--force':\n config.cache = false; // Force rescan by disabling cache\n break;\n case '--max-concurrency':\n config.maxConcurrency = parseInt(nextArg || '4', 10);\n i++;\n break;\n case '--streaming':\n config.streaming = true;\n break;\n case '--no-streaming':\n config.streaming = false;\n break;\n case '--interactive':\n config.interactive = true;\n break;\n case '--no-interactive':\n config.interactive = false;\n break;\n case '--once':\n // One-shot mode (e.g. pre-commit hook): never use interactive dashboard\n config.interactive = false;\n config.once = true;\n break;\n case '--staged-only':\n // Only check staged files (for pre-commit hooks)\n config.stagedOnly = true;\n break;\n case '--fail-on':\n if (nextArg && ['never', 'critical', 'serious'].includes(nextArg)) {\n config.failOn = nextArg as 'never' | 'critical' | 'serious';\n i++;\n }\n break;\n case '--workers':\n config.workers = true;\n break;\n case '--no-workers':\n config.workers = false;\n break;\n case '--timeout':\n config.timeoutMs = parseInt(nextArg || '120000', 10);\n i++;\n break;\n case '--files':\n if (nextArg) {\n config.files = nextArg.split(',').map(f => f.trim()).filter(Boolean);\n i++;\n }\n break;\n case '--users':\n case '-u':\n config.userCount = parseInt(nextArg || '250', 10);\n i++;\n break;\n case '--help':\n case '-h':\n console.log(`\nTrie Watch - File Watcher\n\nUSAGE:\n trie watch [options] Watch for changes\n\nOPTIONS:\n --dir, -d <path> Directory to watch (default: current directory)\n --debounce, -D <ms> Debounce time in ms (default: 1000)\n --users, -u <count> User count for cost estimation (default: 250)\n\nOUTPUT:\n --json Output as JSON (for log aggregation)\n\nDISPLAY:\n --interactive Enable interactive dashboard (default for TTY)\n --no-interactive Disable interactive dashboard (for CI/scripts)\n\nEXAMPLES:\n trie watch # Watch current directory\n trie watch --no-interactive # CI mode: watch without dashboard\n`);\n process.exit(0);\n }\n }\n\n return config;\n}\n\n// Run the daemon\nconst config = parseArgs();\nconst daemon = new WatchDaemon(config);\ndaemon.start().catch(error => {\n if (!process.stdout.isTTY || process.argv.includes('--non-interactive')) {\n console.error('Failed to start daemon:', error);\n }\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,OAAO,YAAY,gBAAgB;AAC5C,SAAS,eAAe;AACxB,SAAS,MAAM,SAAS,UAAU,eAAe;AASjD,IAAM,mBAAmB,oBAAI,IAAI;AAAA,EAC/B;AAAA,EAAO;AAAA,EAAQ;AAAA,EAAO;AAAA,EAAQ;AAAA,EAC9B;AAAA,EAAQ;AAAA,EAAW;AAAA,EACnB;AAAA,EAAO;AAAA,EAAO;AAChB,CAAC;AAGD,IAAM,YAAY,oBAAI,IAAI;AAAA,EACxB;AAAA,EAAgB;AAAA,EAAQ;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAS;AAAA,EAClD;AAAA,EAAY;AAAA,EAAU;AAAA,EAAU;AAAA,EAAe;AACjD,CAAC;AAiCD,IAAM,cAAN,MAAkB;AAAA,EACR;AAAA,EACA;AAAA,EACA,WAAkD,oBAAI,IAAI;AAAA,EAC1D,eAA4B,oBAAI,IAAI;AAAA,EACpC,gBAAuC;AAAA,EACvC,eAAe;AAAA,EACf,mBAAiD;AAAA,EACjD,YAA8C;AAAA,EAC9C;AAAA,EAER,YAAYA,SAAsB;AAChC,SAAK,SAASA;AACd,SAAK,QAAQ;AAAA,MACX,cAAc;AAAA,MACd,aAAa;AAAA,MACb,QAAQ;AAAA,MACR,WAAW,KAAK,IAAI;AAAA,IACtB;AACA,SAAK,gBAAgB,IAAI,cAAc;AAAA,EACzC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAuB;AAK3B,UAAM,oBACJ,QAAQ,OAAO,UAAU,QACzB,QAAQ,MAAM,UAAU,QACxB,OAAO,QAAQ,MAAM,eAAe;AACtC,QAAI,KAAK,OAAO,gBAAgB,SAAS,qBAAqB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a;AACpB;AAAA,MACF,KAAK;AACH,YAAI,WAAW,CAAC,SAAS,YAAY,SAAS,EAAE,SAAS,OAAO,GAAG;AACjE,UAAAA,QAAO,SAAS;AAChB;AAAA,QACF;AACA;AAAA,MACF,KAAK;AACH,QAAAA,QAAO,UAAU;AACjB;AAAA,MACF,KAAK;AACH,QAAAA,QAAO,UAAU;AACjB;AAAA,MACF,KAAK;AACH,QAAAA,QAAO,YAAY,SAAS,WAAW,UAAU,EAAE;AACnD;AACA;AAAA,MACF,KAAK;AACH,YAAI,SAAS;AACX,UAAAA,QAAO,QAAQ,QAAQ,MAAM,GAAG,EAAE,IAAI,OAAK,EAAE,KAAK,CAAC,EAAE,OAAO,OAAO;AACnE;AAAA,QACF;AACA;AAAA,MACF,KAAK;AAAA,MACL,KAAK;AACH,QAAAA,QAAO,YAAY,SAAS,WAAW,OAAO,EAAE;AAChD;AACA;AAAA,MACF,KAAK;AAAA,MACL,KAAK;AACH,gBAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAqBnB;AACO,gBAAQ,KAAK,CAAC;AAAA,IAClB;AAAA,EACF;AAEA,SAAOA;AACT;AAGA,IAAM,SAAS,UAAU;AACzB,IAAM,SAAS,IAAI,YAAY,MAAM;AACrC,OAAO,MAAM,EAAE,MAAM,WAAS;AAC5B,MAAI,CAAC,QAAQ,OAAO,SAAS,QAAQ,KAAK,SAAS,mBAAmB,GAAG;AACvE,YAAQ,MAAM,2BAA2B,KAAK;AAAA,EAChD;AACA,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["config"]}
|
|
1
|
+
{"version":3,"sources":["../../src/cli/yolo-daemon.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Trie Watch - File Watcher\n * \n * Watches a directory for changes and checks for goal violations.\n * \n * Usage:\n * trie watch [options] # Watch for changes\n * \n * See `trie watch --help` for all options.\n */\n\nimport { watch, existsSync, statSync } from 'fs';\nimport { readdir } from 'fs/promises';\nimport { join, extname, basename, resolve } from 'path';\nimport { StreamingManager } from '../utils/streaming.js';\nimport { InteractiveDashboard } from './interactive-dashboard.js';\nimport { getWorkingDirectory } from '../utils/workspace.js';\nimport { isInteractiveMode, setInteractiveMode } from '../utils/progress.js';\nimport { isTrieInitialized } from '../utils/trie-init.js';\nimport { TrieWatchTool } from '../tools/watch.js';\n\n// File extensions to watch\nconst WATCH_EXTENSIONS = new Set([\n '.ts', '.tsx', '.js', '.jsx', '.mjs',\n '.vue', '.svelte', '.astro',\n '.py', '.go', '.rs'\n]);\n\n// Directories to skip\nconst SKIP_DIRS = new Set([\n 'node_modules', '.git', 'dist', 'build', '.next', '.nuxt',\n 'coverage', '.turbo', '.cache', '__pycache__', '.venv'\n]);\n\ninterface DaemonConfig {\n directory: string;\n debounceMs: number;\n jsonOutput: boolean;\n format?: 'text' | 'json';\n output?: string;\n parallel?: boolean;\n cache?: boolean;\n maxConcurrency?: number;\n streaming?: boolean;\n interactive?: boolean;\n workers?: boolean;\n timeoutMs?: number;\n files?: string[];\n /** User count for cost estimation (default: 250) */\n userCount?: number;\n /** Run once and exit (for pre-commit hooks) */\n once?: boolean;\n /** Only scan staged files (for pre-commit hooks) */\n stagedOnly?: boolean;\n /** Exit code to use on failure: 'never', 'critical', 'serious' */\n failOn?: 'never' | 'critical' | 'serious';\n}\n\ninterface DaemonStats {\n filesScanned: number;\n issuesFound: number;\n errors: number;\n startTime: number;\n}\n\nclass WatchDaemon {\n private config: DaemonConfig;\n private stats: DaemonStats;\n private watchers: Map<string, ReturnType<typeof watch>> = new Map();\n private pendingFiles: Set<string> = new Set();\n private debounceTimer: NodeJS.Timeout | null = null;\n private isProcessing = false;\n private streamingManager: StreamingManager | undefined = undefined;\n private dashboard: InteractiveDashboard | undefined = undefined;\n private trieWatchTool: TrieWatchTool;\n\n constructor(config: DaemonConfig) {\n this.config = config;\n this.stats = {\n filesScanned: 0,\n issuesFound: 0,\n errors: 0,\n startTime: Date.now()\n };\n this.trieWatchTool = new TrieWatchTool();\n }\n\n /**\n * Start the daemon\n */\n async start(): Promise<void> {\n // Enable global interactive mode only when:\n // 1. Both stdout AND stdin are TTY\n // 2. stdin supports setRawMode (required by Ink)\n // (git hooks/CI often have non-TTY stdin, and some terminals don't support raw mode)\n const hasInteractiveTTY =\n process.stdout.isTTY === true && \n process.stdin.isTTY === true &&\n typeof process.stdin.setRawMode === 'function';\n if (this.config.interactive !== false && hasInteractiveTTY && !this.config.once) {\n setInteractiveMode(true);\n }\n if (!isTrieInitialized(this.config.directory)) {\n if (!isInteractiveMode()) {\n console.error('Trie is not initialized for this project.');\n console.error('Run `trie init` first.');\n }\n process.exit(1);\n }\n\n // If in once mode (pre-commit hook), just exit - the hook itself queries the ledger\n if (this.config.once) {\n console.log('Pre-commit mode detected - hook should query ledger directly');\n process.exit(0);\n }\n\n this.log('info', 'Starting Trie Watch', {\n directory: this.config.directory,\n debounceMs: this.config.debounceMs\n });\n if (!isInteractiveMode()) {\n console.error('\\nTrie is watching for goal violations.\\n');\n }\n\n // Validate directory\n if (!existsSync(this.config.directory)) {\n this.log('error', 'Directory not found', { directory: this.config.directory });\n process.exit(1);\n }\n\n // Start interactive dashboard if enabled\n if (isInteractiveMode()) {\n this.streamingManager = new StreamingManager();\n this.dashboard = new InteractiveDashboard();\n this.streamingManager.subscribe(update => this.dashboard?.handleStreamUpdate(update));\n await this.dashboard.start();\n this.streamingManager.reportWatchStatus({\n watching: true,\n directories: 0,\n debounceMs: this.config.debounceMs\n });\n }\n\n // Initialize the TrieWatchTool for goal checking\n await this.trieWatchTool.execute({\n action: 'start',\n directory: this.config.directory,\n debounceMs: this.config.debounceMs\n });\n\n // Start watching\n await this.watchDirectory(this.config.directory);\n this.streamingManager?.reportWatchStatus({\n watching: true,\n directories: this.watchers.size,\n debounceMs: this.config.debounceMs\n });\n this.log('info', 'Watching for changes...', { \n directories: this.watchers.size \n });\n\n // Handle graceful shutdown\n process.on('SIGINT', () => this.shutdown('SIGINT'));\n process.on('SIGTERM', () => this.shutdown('SIGTERM'));\n }\n\n /**\n * Watch a directory recursively\n */\n private async watchDirectory(dir: string): Promise<void> {\n if (!existsSync(dir)) return;\n\n try {\n const stat = statSync(dir);\n if (!stat.isDirectory()) return;\n\n const dirName = basename(dir);\n if (SKIP_DIRS.has(dirName) || dirName.startsWith('.')) return;\n\n // Watch this directory\n const watcher = watch(dir, { persistent: true }, (_eventType, filename) => {\n if (!filename) return;\n\n const fullPath = join(dir, filename);\n const ext = extname(filename).toLowerCase();\n\n if (!WATCH_EXTENSIONS.has(ext)) return;\n if (!existsSync(fullPath)) return;\n\n this.pendingFiles.add(fullPath);\n this.streamingManager?.reportWatchChange(fullPath);\n this.scheduleProcessing();\n });\n\n this.watchers.set(dir, watcher);\n\n // Recursively watch subdirectories\n const entries = await readdir(dir, { withFileTypes: true });\n for (const entry of entries) {\n if (entry.isDirectory()) {\n await this.watchDirectory(join(dir, entry.name));\n }\n }\n } catch (error) {\n // Skip inaccessible directories\n }\n }\n\n /**\n * Schedule processing of pending files (debounced)\n */\n private scheduleProcessing(): void {\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n\n this.debounceTimer = setTimeout(() => {\n this.processPendingFiles();\n }, this.config.debounceMs);\n }\n\n /**\n * Process all pending files\n */\n private async processPendingFiles(): Promise<void> {\n if (this.isProcessing || this.pendingFiles.size === 0) return;\n\n this.isProcessing = true;\n const files = Array.from(this.pendingFiles);\n this.pendingFiles.clear();\n\n this.log('info', 'Processing changed files', { \n count: files.length,\n files: files.map(f => basename(f))\n });\n\n try {\n // Trigger goal violation checking via TrieWatchTool\n // The tool handles AI-powered goal checking, priority scoring, caching, etc.\n const result = await this.trieWatchTool.execute({\n action: 'status'\n });\n\n // Extract issues from the result\n const statusMatch = result.content?.[0]?.text?.match(/Issues Found: (\\d+)/);\n if (statusMatch && statusMatch[1]) {\n const issuesFound = parseInt(statusMatch[1], 10);\n this.stats.issuesFound += issuesFound;\n \n if (issuesFound > 0) {\n this.log('info', 'Goal violations detected', { \n count: issuesFound,\n files: files.length \n });\n }\n }\n } catch (error) {\n this.log('error', 'Failed to check for goal violations', { \n error: error instanceof Error ? error.message : String(error)\n });\n this.stats.errors++;\n }\n \n this.isProcessing = false;\n }\n\n\n /**\n * Log a message\n */\n private log(level: 'info' | 'warn' | 'error', message: string, data?: Record<string, unknown>): void {\n const timestamp = new Date().toISOString();\n const uptime = Math.round((Date.now() - this.stats.startTime) / 1000);\n\n // Suppress human-readable logs when interactive dashboard is active\n if (!this.config.jsonOutput && isInteractiveMode()) {\n return;\n }\n\n if (this.config.jsonOutput) {\n console.log(JSON.stringify({\n timestamp,\n level,\n message,\n uptime,\n ...data,\n stats: this.stats\n }));\n } else {\n const levelEmoji = { info: '[i]', warn: '[!]', error: '[X]' }[level];\n const dataStr = data ? ` ${JSON.stringify(data)}` : '';\n console.log(`[${timestamp}] ${levelEmoji} ${message}${dataStr}`);\n }\n }\n\n /**\n * Graceful shutdown\n */\n private async shutdown(signal: string): Promise<void> {\n this.log('info', 'Shutting down', { signal, stats: this.stats });\n\n // Stop the TrieWatchTool\n try {\n await this.trieWatchTool.execute({ action: 'stop' });\n } catch (error) {\n // Ignore errors during shutdown\n }\n\n // Close all watchers\n for (const watcher of this.watchers.values()) {\n watcher.close();\n }\n\n // Clear timers\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n\n if (this.streamingManager) {\n this.streamingManager.reportWatchStatus({\n watching: false,\n directories: 0\n });\n }\n if (this.dashboard) {\n this.dashboard.stop();\n }\n\n process.exit(0);\n }\n}\n\n/**\n * Parse command line arguments\n */\nfunction parseArgs(): DaemonConfig {\n const args = process.argv.slice(2);\n const config: DaemonConfig = {\n // Silent mode for initial workspace detection (TUI will handle display)\n directory: getWorkingDirectory(undefined, true),\n debounceMs: 1000,\n jsonOutput: false,\n // Default to interactive mode for TTY terminals\n interactive: process.stdout.isTTY === true\n };\n\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n const nextArg = args[i + 1];\n\n switch (arg) {\n case '--dir':\n case '-d':\n config.directory = resolve(nextArg || '.');\n i++;\n break;\n case '--debounce':\n case '-D':\n config.debounceMs = parseInt(nextArg || '1000', 10);\n i++;\n break;\n case '--json':\n config.jsonOutput = true;\n break;\n case '--format':\n if (nextArg) {\n config.format = nextArg === 'json' ? 'json' : 'text';\n i++;\n }\n break;\n case '--output':\n if (nextArg) {\n config.output = nextArg;\n i++;\n }\n break;\n case '--parallel':\n config.parallel = true;\n break;\n case '--no-parallel':\n config.parallel = false;\n break;\n case '--cache':\n config.cache = true;\n break;\n case '--no-cache':\n config.cache = false;\n break;\n case '--force-rescan':\n case '--force':\n config.cache = false; // Force rescan by disabling cache\n break;\n case '--max-concurrency':\n config.maxConcurrency = parseInt(nextArg || '4', 10);\n i++;\n break;\n case '--streaming':\n config.streaming = true;\n break;\n case '--no-streaming':\n config.streaming = false;\n break;\n case '--interactive':\n config.interactive = true;\n break;\n case '--no-interactive':\n config.interactive = false;\n break;\n case '--once':\n // One-shot mode (e.g. pre-commit hook): never use interactive dashboard\n config.interactive = false;\n config.once = true;\n break;\n case '--staged-only':\n // Only check staged files (for pre-commit hooks)\n config.stagedOnly = true;\n break;\n case '--fail-on':\n if (nextArg && ['never', 'critical', 'serious'].includes(nextArg)) {\n config.failOn = nextArg as 'never' | 'critical' | 'serious';\n i++;\n }\n break;\n case '--workers':\n config.workers = true;\n break;\n case '--no-workers':\n config.workers = false;\n break;\n case '--timeout':\n config.timeoutMs = parseInt(nextArg || '120000', 10);\n i++;\n break;\n case '--files':\n if (nextArg) {\n config.files = nextArg.split(',').map(f => f.trim()).filter(Boolean);\n i++;\n }\n break;\n case '--users':\n case '-u':\n config.userCount = parseInt(nextArg || '250', 10);\n i++;\n break;\n case '--help':\n case '-h':\n console.log(`\nTrie Watch - File Watcher\n\nUSAGE:\n trie watch [options] Watch for changes\n\nOPTIONS:\n --dir, -d <path> Directory to watch (default: current directory)\n --debounce, -D <ms> Debounce time in ms (default: 1000)\n --users, -u <count> User count for cost estimation (default: 250)\n\nOUTPUT:\n --json Output as JSON (for log aggregation)\n\nDISPLAY:\n --interactive Enable interactive dashboard (default for TTY)\n --no-interactive Disable interactive dashboard (for CI/scripts)\n\nEXAMPLES:\n trie watch # Watch current directory\n trie watch --no-interactive # CI mode: watch without dashboard\n`);\n process.exit(0);\n }\n }\n\n return config;\n}\n\n// Run the daemon\nconst config = parseArgs();\nconst daemon = new WatchDaemon(config);\ndaemon.start().catch(error => {\n if (!process.stdout.isTTY || process.argv.includes('--non-interactive')) {\n console.error('Failed to start daemon:', error);\n }\n process.exit(1);\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,OAAO,YAAY,gBAAgB;AAC5C,SAAS,eAAe;AACxB,SAAS,MAAM,SAAS,UAAU,eAAe;AASjD,IAAM,mBAAmB,oBAAI,IAAI;AAAA,EAC/B;AAAA,EAAO;AAAA,EAAQ;AAAA,EAAO;AAAA,EAAQ;AAAA,EAC9B;AAAA,EAAQ;AAAA,EAAW;AAAA,EACnB;AAAA,EAAO;AAAA,EAAO;AAChB,CAAC;AAGD,IAAM,YAAY,oBAAI,IAAI;AAAA,EACxB;AAAA,EAAgB;AAAA,EAAQ;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAS;AAAA,EAClD;AAAA,EAAY;AAAA,EAAU;AAAA,EAAU;AAAA,EAAe;AACjD,CAAC;AAiCD,IAAM,cAAN,MAAkB;AAAA,EACR;AAAA,EACA;AAAA,EACA,WAAkD,oBAAI,IAAI;AAAA,EAC1D,eAA4B,oBAAI,IAAI;AAAA,EACpC,gBAAuC;AAAA,EACvC,eAAe;AAAA,EACf,mBAAiD;AAAA,EACjD,YAA8C;AAAA,EAC9C;AAAA,EAER,YAAYA,SAAsB;AAChC,SAAK,SAASA;AACd,SAAK,QAAQ;AAA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I,CAAC,QAAQ,OAAO,SAAS,QAAQ,KAAK,SAAS,mBAAmB,GAAG;AACvE,YAAQ,MAAM,2BAA2B,KAAK;AAAA,EAChD;AACA,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["config"]}
|
|
@@ -37,7 +37,7 @@ async function analyzeFilesRapidly(goals, projectPath, options = {}) {
|
|
|
37
37
|
onProgress
|
|
38
38
|
);
|
|
39
39
|
} else {
|
|
40
|
-
const { checkFilesForGoalViolations } = await import("./goal-validator-
|
|
40
|
+
const { checkFilesForGoalViolations } = await import("./goal-validator-6Y5CDEMJ.js");
|
|
41
41
|
newViolations = await checkFilesForGoalViolations(
|
|
42
42
|
goals,
|
|
43
43
|
projectPath,
|
|
@@ -171,7 +171,7 @@ async function analyzeWithSmartBatching(codebaseIndex, filesToScan, goals, proje
|
|
|
171
171
|
const end = Math.min(start + adaptiveBatchSize, filesToScan.length);
|
|
172
172
|
const batchFiles = filesToScan.slice(start, end);
|
|
173
173
|
onProgress?.(`Fast analysis (${i + 1}/${totalBatches}): ${batchFiles.length} files...`);
|
|
174
|
-
const { checkFilesForGoalViolations } = await import("./goal-validator-
|
|
174
|
+
const { checkFilesForGoalViolations } = await import("./goal-validator-6Y5CDEMJ.js");
|
|
175
175
|
const batchResults = await checkFilesForGoalViolations(
|
|
176
176
|
goals,
|
|
177
177
|
projectPath,
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
analyzeFilesRapidly,
|
|
214
214
|
getAnalysisStats
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=fast-analyzer-
|
|
216
|
+
//# sourceMappingURL=fast-analyzer-NJQO3TFD.js.map
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
calculateAdaptiveScanFrequency,
|
|
5
5
|
clearGoalManagers,
|
|
6
6
|
getGoalManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2Z3TQNNK.js";
|
|
8
8
|
import "./chunk-T63OHG4Q.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-S36IO3EE.js";
|
|
10
|
+
import "./chunk-GTKYBOXL.js";
|
|
11
11
|
import "./chunk-EFWVF6TI.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-MVVPJ73K.js";
|
|
13
13
|
import "./chunk-43X6JBEM.js";
|
|
14
14
|
import "./chunk-VVITXIHN.js";
|
|
15
15
|
import "./chunk-KDHN2ZQE.js";
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
clearGoalManagers,
|
|
22
22
|
getGoalManager
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=goal-manager-
|
|
24
|
+
//# sourceMappingURL=goal-manager-DVX24UPZ.js.map
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
measureInitialGoalValue,
|
|
5
5
|
recordGoalViolationCaught,
|
|
6
6
|
recordGoalViolationFixed
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ZKKKLRZZ.js";
|
|
8
|
+
import "./chunk-S36IO3EE.js";
|
|
9
|
+
import "./chunk-GTKYBOXL.js";
|
|
10
10
|
import "./chunk-EFWVF6TI.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-MVVPJ73K.js";
|
|
12
12
|
import "./chunk-43X6JBEM.js";
|
|
13
13
|
import "./chunk-VVITXIHN.js";
|
|
14
14
|
import "./chunk-KDHN2ZQE.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
recordGoalViolationCaught,
|
|
21
21
|
recordGoalViolationFixed
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=goal-validator-
|
|
23
|
+
//# sourceMappingURL=goal-validator-6Y5CDEMJ.js.map
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
clearHypothesisEngines,
|
|
4
4
|
gatherEvidenceForHypothesis,
|
|
5
5
|
getHypothesisEngine
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JEZ7XJQN.js";
|
|
7
7
|
import "./chunk-T63OHG4Q.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-S36IO3EE.js";
|
|
9
|
+
import "./chunk-GTKYBOXL.js";
|
|
10
10
|
import "./chunk-EFWVF6TI.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-MVVPJ73K.js";
|
|
12
12
|
import "./chunk-43X6JBEM.js";
|
|
13
13
|
import "./chunk-VVITXIHN.js";
|
|
14
14
|
import "./chunk-KDHN2ZQE.js";
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
gatherEvidenceForHypothesis,
|
|
20
20
|
getHypothesisEngine
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=hypothesis-
|
|
22
|
+
//# sourceMappingURL=hypothesis-UKPGOYY2.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
startServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UXRW2YSP.js";
|
|
5
5
|
import "./chunk-ACU2RJUJ.js";
|
|
6
6
|
import "./chunk-ZBXW244P.js";
|
|
7
7
|
import "./chunk-OLNZJ3XV.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-HOGKPDZA.js";
|
|
9
9
|
import "./chunk-JVMBCWKS.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-JNUOW2JS.js";
|
|
11
11
|
import "./chunk-WCN7S3EI.js";
|
|
12
12
|
import "./chunk-Q5EKA5YA.js";
|
|
13
13
|
import "./chunk-VR4VWXXU.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2Z3TQNNK.js";
|
|
15
|
+
import "./chunk-JEZ7XJQN.js";
|
|
16
16
|
import "./chunk-T63OHG4Q.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-LG5CBK6A.js";
|
|
18
|
+
import "./chunk-ZKKKLRZZ.js";
|
|
19
|
+
import "./chunk-OBQ74FOU.js";
|
|
19
20
|
import "./chunk-GDWA3CH3.js";
|
|
20
21
|
import "./chunk-TN5WEKWI.js";
|
|
21
22
|
import "./chunk-ZV2K6M7T.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-LLDZDU2Y.js";
|
|
24
|
-
import "./chunk-VUL52BQL.js";
|
|
25
|
-
import "./chunk-FQ45QP5A.js";
|
|
26
|
-
import "./chunk-5BYSJ7XT.js";
|
|
27
|
-
import "./chunk-IRZXBQVQ.js";
|
|
28
|
-
import "./chunk-EFWVF6TI.js";
|
|
23
|
+
import "./chunk-TQOO6A4G.js";
|
|
29
24
|
import "./chunk-SY6KQG44.js";
|
|
30
25
|
import "./chunk-OMR4YCBS.js";
|
|
26
|
+
import "./chunk-VUL52BQL.js";
|
|
31
27
|
import "./chunk-6NLHFIYA.js";
|
|
28
|
+
import "./chunk-LR5M4RTN.js";
|
|
29
|
+
import "./chunk-FQ45QP5A.js";
|
|
30
|
+
import "./chunk-S36IO3EE.js";
|
|
31
|
+
import "./chunk-GTKYBOXL.js";
|
|
32
|
+
import "./chunk-EFWVF6TI.js";
|
|
32
33
|
import "./chunk-ME2OERF5.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-MVVPJ73K.js";
|
|
34
35
|
import "./chunk-43X6JBEM.js";
|
|
35
36
|
import "./chunk-VVITXIHN.js";
|
|
36
37
|
import "./chunk-KDHN2ZQE.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { startServer } from './server/mcp-server.js';\n\n// Start the MCP server\nstartServer().catch((error) => {\n console.error('Fatal error:', error);\n process.exit(1);\n});"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { startServer } from './server/mcp-server.js';\n\n// Start the MCP server\nstartServer().catch((error) => {\n console.error('Fatal error:', error);\n process.exit(1);\n});"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,YAAY,EAAE,MAAM,CAAC,UAAU;AAC7B,UAAQ,MAAM,gBAAgB,KAAK;AACnC,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
resolveGoalViolation,
|
|
12
12
|
searchIssues,
|
|
13
13
|
storeIssues
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S36IO3EE.js";
|
|
15
15
|
import "./chunk-EFWVF6TI.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-MVVPJ73K.js";
|
|
17
17
|
import "./chunk-43X6JBEM.js";
|
|
18
18
|
import "./chunk-VVITXIHN.js";
|
|
19
19
|
import "./chunk-KDHN2ZQE.js";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
searchIssues,
|
|
33
33
|
storeIssues
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=issue-store-
|
|
35
|
+
//# sourceMappingURL=issue-store-UZAPI5DU.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ConcurrentModificationError,
|
|
2
3
|
appendIssuesToLedger,
|
|
3
4
|
compressOldBlocks,
|
|
4
5
|
computeMerkleRoot,
|
|
@@ -7,6 +8,7 @@ import {
|
|
|
7
8
|
getCorrectionStats,
|
|
8
9
|
getEntryCorrectionHistory,
|
|
9
10
|
getLedgerBlocks,
|
|
11
|
+
getLedgerBlocksWithHash,
|
|
10
12
|
getLedgerEntries,
|
|
11
13
|
getLedgerSyncStatus,
|
|
12
14
|
getStorageStats,
|
|
@@ -14,18 +16,20 @@ import {
|
|
|
14
16
|
loadArchivedBlocks,
|
|
15
17
|
migrateLegacyLedger,
|
|
16
18
|
pushLedgerToShared,
|
|
19
|
+
saveLedgerOptimistic,
|
|
17
20
|
shouldCompress,
|
|
18
21
|
signLedgerEntry,
|
|
19
22
|
syncLedgerFromShared,
|
|
20
23
|
verifyBlockSignatures,
|
|
21
24
|
verifyLedger,
|
|
22
25
|
verifyLedgerEntry
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MVVPJ73K.js";
|
|
24
27
|
import "./chunk-43X6JBEM.js";
|
|
25
28
|
import "./chunk-VVITXIHN.js";
|
|
26
29
|
import "./chunk-KDHN2ZQE.js";
|
|
27
30
|
import "./chunk-DGUM43GV.js";
|
|
28
31
|
export {
|
|
32
|
+
ConcurrentModificationError,
|
|
29
33
|
appendIssuesToLedger,
|
|
30
34
|
compressOldBlocks,
|
|
31
35
|
computeMerkleRoot,
|
|
@@ -34,6 +38,7 @@ export {
|
|
|
34
38
|
getCorrectionStats,
|
|
35
39
|
getEntryCorrectionHistory,
|
|
36
40
|
getLedgerBlocks,
|
|
41
|
+
getLedgerBlocksWithHash,
|
|
37
42
|
getLedgerEntries,
|
|
38
43
|
getLedgerSyncStatus,
|
|
39
44
|
getStorageStats,
|
|
@@ -41,6 +46,7 @@ export {
|
|
|
41
46
|
loadArchivedBlocks,
|
|
42
47
|
migrateLegacyLedger,
|
|
43
48
|
pushLedgerToShared,
|
|
49
|
+
saveLedgerOptimistic,
|
|
44
50
|
shouldCompress,
|
|
45
51
|
signLedgerEntry,
|
|
46
52
|
syncLedgerFromShared,
|
|
@@ -48,4 +54,4 @@ export {
|
|
|
48
54
|
verifyLedger,
|
|
49
55
|
verifyLedgerEntry
|
|
50
56
|
};
|
|
51
|
-
//# sourceMappingURL=ledger-
|
|
57
|
+
//# sourceMappingURL=ledger-CNFCJKHX.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentMetricsSchema,
|
|
3
|
+
GoalSchema,
|
|
4
|
+
HypothesisSchema,
|
|
5
|
+
ProjectState,
|
|
6
|
+
ProjectStateDataSchema,
|
|
7
|
+
RiskBudgetSchema,
|
|
8
|
+
TimingContextSchema,
|
|
9
|
+
clearProjectStates,
|
|
10
|
+
getProjectState
|
|
11
|
+
} from "./chunk-GTKYBOXL.js";
|
|
12
|
+
import "./chunk-EFWVF6TI.js";
|
|
13
|
+
import "./chunk-43X6JBEM.js";
|
|
14
|
+
import "./chunk-VVITXIHN.js";
|
|
15
|
+
import "./chunk-KDHN2ZQE.js";
|
|
16
|
+
import "./chunk-DGUM43GV.js";
|
|
17
|
+
export {
|
|
18
|
+
AgentMetricsSchema,
|
|
19
|
+
GoalSchema,
|
|
20
|
+
HypothesisSchema,
|
|
21
|
+
ProjectState,
|
|
22
|
+
ProjectStateDataSchema,
|
|
23
|
+
RiskBudgetSchema,
|
|
24
|
+
TimingContextSchema,
|
|
25
|
+
clearProjectStates,
|
|
26
|
+
getProjectState
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=project-state-AHPA77SM.js.map
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCPServer,
|
|
3
3
|
startServer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UXRW2YSP.js";
|
|
5
5
|
import "../chunk-ACU2RJUJ.js";
|
|
6
6
|
import "../chunk-ZBXW244P.js";
|
|
7
7
|
import "../chunk-OLNZJ3XV.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-HOGKPDZA.js";
|
|
9
9
|
import "../chunk-JVMBCWKS.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-JNUOW2JS.js";
|
|
11
11
|
import "../chunk-WCN7S3EI.js";
|
|
12
12
|
import "../chunk-Q5EKA5YA.js";
|
|
13
13
|
import "../chunk-VR4VWXXU.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-2Z3TQNNK.js";
|
|
15
|
+
import "../chunk-JEZ7XJQN.js";
|
|
16
16
|
import "../chunk-T63OHG4Q.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-LG5CBK6A.js";
|
|
18
|
+
import "../chunk-ZKKKLRZZ.js";
|
|
19
|
+
import "../chunk-OBQ74FOU.js";
|
|
19
20
|
import "../chunk-GDWA3CH3.js";
|
|
20
21
|
import "../chunk-TN5WEKWI.js";
|
|
21
22
|
import "../chunk-ZV2K6M7T.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-LLDZDU2Y.js";
|
|
24
|
-
import "../chunk-VUL52BQL.js";
|
|
25
|
-
import "../chunk-FQ45QP5A.js";
|
|
26
|
-
import "../chunk-5BYSJ7XT.js";
|
|
27
|
-
import "../chunk-IRZXBQVQ.js";
|
|
28
|
-
import "../chunk-EFWVF6TI.js";
|
|
23
|
+
import "../chunk-TQOO6A4G.js";
|
|
29
24
|
import "../chunk-SY6KQG44.js";
|
|
30
25
|
import "../chunk-OMR4YCBS.js";
|
|
26
|
+
import "../chunk-VUL52BQL.js";
|
|
31
27
|
import "../chunk-6NLHFIYA.js";
|
|
28
|
+
import "../chunk-LR5M4RTN.js";
|
|
29
|
+
import "../chunk-FQ45QP5A.js";
|
|
30
|
+
import "../chunk-S36IO3EE.js";
|
|
31
|
+
import "../chunk-GTKYBOXL.js";
|
|
32
|
+
import "../chunk-EFWVF6TI.js";
|
|
32
33
|
import "../chunk-ME2OERF5.js";
|
|
33
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-MVVPJ73K.js";
|
|
34
35
|
import "../chunk-43X6JBEM.js";
|
|
35
36
|
import "../chunk-VVITXIHN.js";
|
|
36
37
|
import "../chunk-KDHN2ZQE.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exportToJson,
|
|
3
|
+
importFromJson
|
|
4
|
+
} from "./chunk-OBQ74FOU.js";
|
|
5
|
+
import "./chunk-VVITXIHN.js";
|
|
6
|
+
import "./chunk-KDHN2ZQE.js";
|
|
7
|
+
import "./chunk-DGUM43GV.js";
|
|
8
|
+
export {
|
|
9
|
+
exportToJson,
|
|
10
|
+
importFromJson
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=sync-M2FSWPBC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TieredStorage,
|
|
3
3
|
getStorage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LR5M4RTN.js";
|
|
5
5
|
import "./chunk-VVITXIHN.js";
|
|
6
6
|
import "./chunk-KDHN2ZQE.js";
|
|
7
7
|
import "./chunk-DGUM43GV.js";
|
|
@@ -9,4 +9,4 @@ export {
|
|
|
9
9
|
TieredStorage,
|
|
10
10
|
getStorage
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=tiered-storage-
|
|
12
|
+
//# sourceMappingURL=tiered-storage-OP74NPJY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TrieAgent,
|
|
3
3
|
getTrieAgent
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-JNUOW2JS.js";
|
|
5
|
+
import "./chunk-2Z3TQNNK.js";
|
|
6
|
+
import "./chunk-JEZ7XJQN.js";
|
|
7
7
|
import "./chunk-T63OHG4Q.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-LLDZDU2Y.js";
|
|
10
|
-
import "./chunk-VUL52BQL.js";
|
|
11
|
-
import "./chunk-FQ45QP5A.js";
|
|
12
|
-
import "./chunk-5BYSJ7XT.js";
|
|
13
|
-
import "./chunk-IRZXBQVQ.js";
|
|
14
|
-
import "./chunk-EFWVF6TI.js";
|
|
8
|
+
import "./chunk-TQOO6A4G.js";
|
|
15
9
|
import "./chunk-SY6KQG44.js";
|
|
16
10
|
import "./chunk-OMR4YCBS.js";
|
|
11
|
+
import "./chunk-VUL52BQL.js";
|
|
17
12
|
import "./chunk-6NLHFIYA.js";
|
|
18
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-LR5M4RTN.js";
|
|
14
|
+
import "./chunk-FQ45QP5A.js";
|
|
15
|
+
import "./chunk-S36IO3EE.js";
|
|
16
|
+
import "./chunk-GTKYBOXL.js";
|
|
17
|
+
import "./chunk-EFWVF6TI.js";
|
|
18
|
+
import "./chunk-MVVPJ73K.js";
|
|
19
19
|
import "./chunk-43X6JBEM.js";
|
|
20
20
|
import "./chunk-VVITXIHN.js";
|
|
21
21
|
import "./chunk-KDHN2ZQE.js";
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
TrieAgent,
|
|
25
25
|
getTrieAgent
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=trie-agent-
|
|
27
|
+
//# sourceMappingURL=trie-agent-6SWUHCVO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED