@runcontext/cli 0.1.1 → 0.2.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.
- package/LICENSE +21 -0
- package/dist/index.js +537 -381
- package/dist/index.js.map +1 -1
- package/package.json +21 -12
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/commands/build.ts","../src/formatters/pretty.ts","../src/formatters/json.ts","../src/commands/lint.ts","../src/commands/init.ts","../src/commands/explain.ts","../src/commands/fix.ts","../src/commands/dev.ts","../src/commands/site.ts","../src/commands/serve.ts"],"sourcesContent":["import { Command } from 'commander';\nimport { buildCommand } from './commands/build.js';\nimport { lintCommand } from './commands/lint.js';\nimport { initCommand } from './commands/init.js';\nimport { explainCommand } from './commands/explain.js';\nimport { fixCommand } from './commands/fix.js';\nimport { devCommand } from './commands/dev.js';\nimport { siteCommand } from './commands/site.js';\nimport { serveCommand } from './commands/serve.js';\n\nconst program = new Command();\n\nprogram\n .name('context')\n .version('0.1.0')\n .description('ContextKit — Git-native institutional context compiler');\n\nprogram.addCommand(buildCommand);\nprogram.addCommand(lintCommand);\nprogram.addCommand(initCommand);\nprogram.addCommand(explainCommand);\nprogram.addCommand(fixCommand);\nprogram.addCommand(devCommand);\nprogram.addCommand(siteCommand);\nprogram.addCommand(serveCommand);\n\nawait program.parseAsync(process.argv);\n","import { Command } from 'commander';\nimport path from 'node:path';\nimport fs from 'node:fs';\nimport {\n loadConfig,\n compile,\n emitManifest,\n LintEngine,\n ALL_RULES,\n} from '@runcontext/core';\nimport type { Diagnostic, Severity } from '@runcontext/core';\nimport { formatDiagnostics } from '../formatters/pretty.js';\nimport { formatDiagnosticsJson } from '../formatters/json.js';\n\nexport const buildCommand = new Command('build')\n .description('Compile context files and emit manifest')\n .option('--format <format>', 'output format for diagnostics (pretty|json)', 'pretty')\n .action(async (opts: { format: string }) => {\n try {\n const config = await loadConfig(process.cwd());\n\n const rootDir = config.paths?.rootDir || process.cwd();\n const contextDir = path.resolve(rootDir, config.paths?.contextDir || 'context');\n const distDir = path.resolve(rootDir, config.paths?.distDir || 'dist');\n\n // Compile context files\n const { graph, diagnostics: compileDiags } = await compile({ contextDir, config });\n\n // Run lint engine\n const engine = new LintEngine(config.lint?.rules as Record<string, Severity | 'off'> | undefined);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const lintDiags = engine.run(graph);\n\n // Merge diagnostics\n const allDiags: Diagnostic[] = [...compileDiags, ...lintDiags];\n\n // Display diagnostics\n if (allDiags.length > 0) {\n const output =\n opts.format === 'json'\n ? formatDiagnosticsJson(allDiags)\n : formatDiagnostics(allDiags);\n console.error(output);\n }\n\n // Emit manifest\n const manifest = emitManifest(graph, config);\n\n // Ensure dist directory exists\n fs.mkdirSync(distDir, { recursive: true });\n\n const manifestPath = path.join(distDir, 'context.manifest.json');\n fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf-8');\n\n // Print summary\n const summary = [\n `Built manifest: ${manifest.concepts.length} concepts`,\n `${manifest.products.length} products`,\n `${manifest.policies.length} policies`,\n `${manifest.entities.length} entities`,\n `${manifest.terms.length} terms`,\n `${manifest.owners.length} owners`,\n ].join(', ');\n console.log(summary);\n console.log(`Manifest written to ${manifestPath}`);\n\n // Exit with error if any errors found\n const hasErrors = allDiags.some((d) => d.severity === 'error');\n if (hasErrors) {\n process.exit(1);\n }\n } catch (err) {\n console.error('Build failed:', (err as Error).message);\n process.exit(1);\n }\n });\n","import chalk from 'chalk';\nimport type { Diagnostic } from '@runcontext/core';\n\n/**\n * Format diagnostics as human-readable colored terminal output.\n *\n * Each diagnostic is rendered as:\n * file:line:col severity ruleId message\n *\n * A summary line is appended at the end.\n */\nexport function formatDiagnostics(diagnostics: Diagnostic[]): string {\n if (diagnostics.length === 0) {\n return chalk.green('No issues found.');\n }\n\n const lines: string[] = [];\n let errorCount = 0;\n let warningCount = 0;\n\n for (const d of diagnostics) {\n const location = `${d.source.file}:${d.source.line}:${d.source.col}`;\n const severityLabel =\n d.severity === 'error'\n ? chalk.red('error')\n : chalk.yellow('warning');\n\n if (d.severity === 'error') {\n errorCount++;\n } else {\n warningCount++;\n }\n\n lines.push(` ${location} ${severityLabel} ${chalk.dim(d.ruleId)} ${d.message}`);\n }\n\n lines.push('');\n\n const parts: string[] = [];\n if (errorCount > 0) {\n parts.push(chalk.red(`${errorCount} error${errorCount !== 1 ? 's' : ''}`));\n }\n if (warningCount > 0) {\n parts.push(chalk.yellow(`${warningCount} warning${warningCount !== 1 ? 's' : ''}`));\n }\n lines.push(parts.join(', '));\n\n return lines.join('\\n');\n}\n","import type { Diagnostic } from '@runcontext/core';\n\n/**\n * Format diagnostics as a JSON string with 2-space indentation.\n */\nexport function formatDiagnosticsJson(diagnostics: Diagnostic[]): string {\n return JSON.stringify(diagnostics, null, 2);\n}\n","import { Command } from 'commander';\nimport path from 'node:path';\nimport {\n loadConfig,\n compile,\n LintEngine,\n ALL_RULES,\n} from '@runcontext/core';\nimport type { Diagnostic, Severity } from '@runcontext/core';\nimport { formatDiagnostics } from '../formatters/pretty.js';\nimport { formatDiagnosticsJson } from '../formatters/json.js';\n\nexport const lintCommand = new Command('lint')\n .description('Lint context files and report diagnostics')\n .option('--format <format>', 'output format (pretty|json)', 'pretty')\n .option('--fix', 'apply autofixes (placeholder)')\n .action(async (opts: { format: string; fix?: boolean }) => {\n if (opts.fix) {\n console.log(\"Use 'context fix' for autofixes.\");\n return;\n }\n\n try {\n const config = await loadConfig(process.cwd());\n\n const rootDir = config.paths?.rootDir || process.cwd();\n const contextDir = path.resolve(rootDir, config.paths?.contextDir || 'context');\n\n // Compile context files\n const { graph, diagnostics: compileDiags } = await compile({ contextDir, config });\n\n // Run lint engine\n const engine = new LintEngine(config.lint?.rules as Record<string, Severity | 'off'> | undefined);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const lintDiags = engine.run(graph);\n\n // Merge diagnostics\n const allDiags: Diagnostic[] = [...compileDiags, ...lintDiags];\n\n // Format output\n const output =\n opts.format === 'json'\n ? formatDiagnosticsJson(allDiags)\n : formatDiagnostics(allDiags);\n console.log(output);\n\n // Exit with error if any errors found\n const hasErrors = allDiags.some((d) => d.severity === 'error');\n if (hasErrors) {\n process.exit(1);\n }\n } catch (err) {\n console.error('Lint failed:', (err as Error).message);\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nconst SAMPLE_CONCEPT = `kind: concept\nid: example-concept\ndefinition: An example concept to get you started.\nowner: example-team\ntags:\n - example\nstatus: draft\n`;\n\nconst SAMPLE_OWNER = `kind: owner\nid: example-team\ndisplayName: Example Team\nemail: team@example.com\n`;\n\nfunction generateConfig(projectName: string): string {\n return `project:\n id: ${projectName}\n displayName: \"${projectName}\"\n version: \"0.1.0\"\n\npaths:\n contextDir: context\n distDir: dist\n\nlint:\n defaultSeverity: warning\n`;\n}\n\nexport const initCommand = new Command('init')\n .description('Create a new ContextKit project')\n .option('--name <name>', 'project name (defaults to directory basename)')\n .action((opts: { name?: string }) => {\n const cwd = process.cwd();\n const projectName = opts.name || path.basename(cwd);\n\n const dirs = [\n 'context/concepts',\n 'context/products',\n 'context/policies',\n 'context/entities',\n 'context/owners',\n 'context/terms',\n ];\n\n const files: Array<{ path: string; content: string }> = [\n { path: 'context/concepts/example-concept.ctx.yaml', content: SAMPLE_CONCEPT },\n { path: 'context/owners/example-team.owner.yaml', content: SAMPLE_OWNER },\n { path: 'contextkit.config.yaml', content: generateConfig(projectName) },\n ];\n\n // Create directories\n const created: string[] = [];\n for (const dir of dirs) {\n const fullPath = path.join(cwd, dir);\n fs.mkdirSync(fullPath, { recursive: true });\n created.push(dir + '/');\n }\n\n // Create files\n for (const file of files) {\n const fullPath = path.join(cwd, file.path);\n if (!fs.existsSync(fullPath)) {\n fs.writeFileSync(fullPath, file.content, 'utf-8');\n created.push(file.path);\n } else {\n console.log(` Skipped (already exists): ${file.path}`);\n }\n }\n\n console.log(`Initialized ContextKit project \"${projectName}\":`);\n for (const item of created) {\n console.log(` created ${item}`);\n }\n });\n","import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport chalk from 'chalk';\nimport type { Manifest } from '@runcontext/core';\n\nexport const explainCommand = new Command('explain')\n .description('Look up a node by ID in the manifest')\n .argument('<id>', 'node ID to look up')\n .option('--manifest <path>', 'path to manifest file', 'dist/context.manifest.json')\n .action((id: string, opts: { manifest: string }) => {\n const manifestPath = path.resolve(process.cwd(), opts.manifest);\n\n if (!fs.existsSync(manifestPath)) {\n console.error(`Manifest not found at ${manifestPath}. Run 'context build' first.`);\n process.exit(1);\n }\n\n let manifest: Manifest;\n try {\n const raw = fs.readFileSync(manifestPath, 'utf-8');\n manifest = JSON.parse(raw) as Manifest;\n } catch {\n console.error(`Failed to read manifest at ${manifestPath}`);\n process.exit(1);\n }\n\n // Look up by index\n const entry = manifest.indexes?.byId?.[id];\n if (!entry) {\n console.error(`Node \"${id}\" not found in manifest.`);\n process.exit(1);\n }\n\n const { kind, index } = entry;\n const collection = (manifest as Record<string, unknown>)[kind + 's'] as Record<string, unknown>[];\n if (!collection || !collection[index]) {\n console.error(`Node \"${id}\" not found in \"${kind}s\" collection.`);\n process.exit(1);\n }\n\n const node = collection[index];\n\n // Display formatted info\n console.log(chalk.bold(`${kind}: ${id}`));\n console.log('');\n\n const fields: Array<[string, unknown]> = Object.entries(node).filter(\n ([key]) => key !== 'id',\n );\n\n for (const [key, value] of fields) {\n if (value === undefined || value === null) continue;\n\n if (Array.isArray(value)) {\n console.log(` ${chalk.dim(key + ':')} ${value.join(', ')}`);\n } else if (typeof value === 'object') {\n console.log(` ${chalk.dim(key + ':')} ${JSON.stringify(value)}`);\n } else {\n console.log(` ${chalk.dim(key + ':')} ${String(value)}`);\n }\n }\n });\n","import { Command } from 'commander';\nimport path from 'node:path';\nimport fs from 'node:fs';\nimport chalk from 'chalk';\nimport {\n loadConfig,\n compile,\n LintEngine,\n ALL_RULES,\n applyFixes,\n} from '@runcontext/core';\nimport type { Diagnostic, Severity } from '@runcontext/core';\nimport { formatDiagnostics } from '../formatters/pretty.js';\nimport { formatDiagnosticsJson } from '../formatters/json.js';\n\nexport const fixCommand = new Command('fix')\n .description('Apply autofixes to context files')\n .option('--write', 'write fixes to disk (default: dry-run)')\n .option('--format <format>', 'output format for diagnostics (pretty|json)', 'pretty')\n .action(async (opts: { write?: boolean; format: string }) => {\n try {\n const config = await loadConfig(process.cwd());\n\n const rootDir = config.paths?.rootDir || process.cwd();\n const contextDir = path.resolve(rootDir, config.paths?.contextDir || 'context');\n\n // Compile context files\n const { graph, diagnostics: compileDiags } = await compile({ contextDir, config });\n\n // Run lint engine\n const engine = new LintEngine(config.lint?.rules as Record<string, Severity | 'off'> | undefined);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const lintDiags = engine.run(graph);\n\n // Merge diagnostics\n const allDiags: Diagnostic[] = [...compileDiags, ...lintDiags];\n\n // Separate fixable from unfixable\n const fixableDiags = allDiags.filter((d) => d.fixable && d.fix);\n const unfixableDiags = allDiags.filter((d) => !d.fixable || !d.fix);\n\n if (fixableDiags.length === 0) {\n console.log(chalk.green('No fixable issues found.'));\n if (unfixableDiags.length > 0) {\n console.log('');\n console.log(chalk.yellow(`${unfixableDiags.length} unfixable issue(s) remain:`));\n const output =\n opts.format === 'json'\n ? formatDiagnosticsJson(unfixableDiags)\n : formatDiagnostics(unfixableDiags);\n console.log(output);\n const hasErrors = unfixableDiags.some((d) => d.severity === 'error');\n if (hasErrors) {\n process.exit(1);\n }\n }\n return;\n }\n\n // Apply fixes\n const results = applyFixes(fixableDiags);\n\n if (opts.write) {\n // Write fixes to disk\n for (const result of results) {\n fs.writeFileSync(result.file, result.newContent, 'utf-8');\n }\n\n const totalEdits = results.reduce((sum, r) => sum + r.editsApplied, 0);\n console.log(\n chalk.green(`Fixed ${totalEdits} issue(s) in ${results.length} file(s).`)\n );\n\n // Report remaining unfixable issues\n if (unfixableDiags.length > 0) {\n console.log('');\n console.log(chalk.yellow(`${unfixableDiags.length} unfixable issue(s) remain:`));\n const output =\n opts.format === 'json'\n ? formatDiagnosticsJson(unfixableDiags)\n : formatDiagnostics(unfixableDiags);\n console.log(output);\n }\n } else {\n // Dry-run mode: show what would be fixed\n console.log(chalk.cyan('Dry run — no files changed. Use --write to apply fixes.\\n'));\n\n console.log(chalk.bold(`${fixableDiags.length} fixable issue(s) found:\\n`));\n\n for (const diag of fixableDiags) {\n const location = `${diag.source.file}:${diag.source.line}:${diag.source.col}`;\n const severityLabel =\n diag.severity === 'error'\n ? chalk.red('error')\n : chalk.yellow('warning');\n console.log(` ${location} ${severityLabel} ${chalk.dim(diag.ruleId)} ${diag.message}`);\n if (diag.fix) {\n console.log(` ${chalk.green('fix:')} ${diag.fix.description}`);\n }\n }\n\n console.log('');\n console.log(\n `Would fix ${results.reduce((s, r) => s + r.editsApplied, 0)} issue(s) in ${results.length} file(s).`\n );\n\n if (unfixableDiags.length > 0) {\n console.log('');\n console.log(chalk.yellow(`${unfixableDiags.length} unfixable issue(s) would remain.`));\n }\n }\n\n // Exit with error if unfixable errors remain\n const hasUnfixableErrors = unfixableDiags.some((d) => d.severity === 'error');\n if (hasUnfixableErrors) {\n process.exit(1);\n }\n } catch (err) {\n console.error('Fix failed:', (err as Error).message);\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport path from 'node:path';\nimport chalk from 'chalk';\nimport { watch } from 'chokidar';\nimport {\n loadConfig,\n compile,\n LintEngine,\n ALL_RULES,\n} from '@runcontext/core';\nimport type { Diagnostic, Severity } from '@runcontext/core';\n\nexport const devCommand = new Command('dev')\n .description('Watch context files and rebuild on change')\n .action(async () => {\n try {\n const config = await loadConfig(process.cwd());\n\n const rootDir = config.paths?.rootDir || process.cwd();\n const contextDir = path.resolve(rootDir, config.paths?.contextDir || 'context');\n\n const watchPattern = path.join(contextDir, '**/*.{yaml,yml}');\n\n console.log(chalk.cyan(`Watching ${watchPattern} for changes...\\n`));\n\n // Run an initial compile + lint\n await runBuild(contextDir, config);\n\n // Set up debounced watcher\n let debounceTimer: ReturnType<typeof setTimeout> | null = null;\n\n const watcher = watch(watchPattern, {\n ignoreInitial: true,\n persistent: true,\n });\n\n watcher.on('all', (_event: string, _filePath: string) => {\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n debounceTimer = setTimeout(async () => {\n debounceTimer = null;\n await runBuild(contextDir, config);\n }, 100);\n });\n\n watcher.on('error', (error: Error) => {\n console.error(chalk.red(`Watcher error: ${error.message}`));\n });\n\n // Handle clean exit\n const cleanup = () => {\n console.log(chalk.dim('\\nStopping watch mode...'));\n watcher.close().then(() => {\n process.exit(0);\n });\n };\n\n process.on('SIGINT', cleanup);\n process.on('SIGTERM', cleanup);\n } catch (err) {\n console.error('Dev mode failed:', (err as Error).message);\n process.exit(1);\n }\n });\n\nasync function runBuild(\n contextDir: string,\n config: Awaited<ReturnType<typeof loadConfig>>,\n): Promise<void> {\n const separator = chalk.dim('─'.repeat(60));\n const timestamp = new Date().toLocaleTimeString();\n\n console.log(separator);\n console.log(chalk.bold(`[${timestamp}] Rebuilding...\\n`));\n\n try {\n // Compile context files\n const { graph, diagnostics: compileDiags } = await compile({ contextDir, config });\n\n // Run lint engine\n const engine = new LintEngine(config.lint?.rules as Record<string, Severity | 'off'> | undefined);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const lintDiags = engine.run(graph);\n\n // Merge diagnostics\n const allDiags: Diagnostic[] = [...compileDiags, ...lintDiags];\n\n if (allDiags.length === 0) {\n console.log(chalk.green('No issues found.\\n'));\n return;\n }\n\n // Print diagnostics summary\n let errorCount = 0;\n let warningCount = 0;\n let fixableCount = 0;\n\n for (const d of allDiags) {\n if (d.severity === 'error') errorCount++;\n else warningCount++;\n if (d.fixable) fixableCount++;\n\n const location = `${d.source.file}:${d.source.line}:${d.source.col}`;\n const severityLabel =\n d.severity === 'error'\n ? chalk.red('error')\n : chalk.yellow('warning');\n console.log(` ${location} ${severityLabel} ${chalk.dim(d.ruleId)} ${d.message}`);\n }\n\n console.log('');\n const parts: string[] = [];\n if (errorCount > 0) {\n parts.push(chalk.red(`${errorCount} error${errorCount !== 1 ? 's' : ''}`));\n }\n if (warningCount > 0) {\n parts.push(chalk.yellow(`${warningCount} warning${warningCount !== 1 ? 's' : ''}`));\n }\n if (fixableCount > 0) {\n parts.push(chalk.cyan(`${fixableCount} fixable`));\n }\n console.log(parts.join(', ') + '\\n');\n } catch (err) {\n console.error(chalk.red(`Build error: ${(err as Error).message}\\n`));\n }\n}\n","import { readFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport { Command } from 'commander';\nimport { generateSite } from '@runcontext/site';\nimport type { Manifest } from '@runcontext/core';\n\nexport const siteCommand = new Command('site')\n .description('Site generator commands');\n\nsiteCommand\n .command('build')\n .description('Build the context documentation site')\n .option('--manifest <path>', 'Path to manifest file', 'dist/context.manifest.json')\n .option('--output <dir>', 'Output directory', 'dist/site')\n .option('--title <title>', 'Site title')\n .option('--base-path <path>', 'Base path for links (e.g., /docs)')\n .action(async (opts: { manifest: string; output: string; title?: string; basePath?: string }) => {\n const manifestPath = resolve(opts.manifest);\n\n let manifestJson: string;\n try {\n manifestJson = await readFile(manifestPath, 'utf-8');\n } catch {\n console.error(`Error: Could not read manifest file at ${manifestPath}`);\n console.error('Run \"context build\" first to generate the manifest.');\n process.exitCode = 1;\n return;\n }\n\n let manifest: Manifest;\n try {\n manifest = JSON.parse(manifestJson) as Manifest;\n } catch {\n console.error(`Error: Invalid JSON in manifest file at ${manifestPath}`);\n process.exitCode = 1;\n return;\n }\n\n const outputDir = resolve(opts.output);\n\n console.log(`Building site from ${manifestPath}...`);\n\n await generateSite({\n manifest,\n outputDir,\n title: opts.title,\n basePath: opts.basePath,\n });\n\n console.log(`Site generated at ${outputDir}`);\n });\n","import { Command } from 'commander';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport type { Manifest } from '@runcontext/core';\n\nexport const serveCommand = new Command('serve')\n .description('Start the MCP server')\n .option('--stdio', 'Use stdio transport (default)')\n .option('--http <port>', 'Use HTTP/SSE transport on the given port', parseInt)\n .option('--manifest <path>', 'Path to manifest file', 'dist/context.manifest.json')\n .action(async (opts: { stdio?: boolean; http?: number; manifest: string }) => {\n try {\n // Resolve manifest path\n const manifestPath = path.resolve(process.cwd(), opts.manifest);\n if (!fs.existsSync(manifestPath)) {\n console.error(`Manifest not found: ${manifestPath}`);\n console.error('Run \"context build\" first to generate the manifest.');\n process.exit(1);\n }\n\n const manifestData = JSON.parse(fs.readFileSync(manifestPath, 'utf-8')) as Manifest;\n\n // Dynamic import to avoid loading MCP deps when not needed\n const { createContextMcpServer } = await import('@runcontext/mcp');\n\n const server = createContextMcpServer(manifestData);\n\n if (opts.http) {\n // HTTP/SSE transport via express + StreamableHTTPServerTransport\n const { StreamableHTTPServerTransport } = await import(\n '@modelcontextprotocol/sdk/server/streamableHttp.js'\n );\n const { createMcpExpressApp } = await import(\n '@modelcontextprotocol/sdk/server/express.js'\n );\n const { randomUUID } = await import('node:crypto');\n\n const app = createMcpExpressApp();\n const transport = new StreamableHTTPServerTransport({\n sessionIdGenerator: () => randomUUID(),\n });\n\n app.all('/mcp', (req, res) => {\n transport.handleRequest(req, res);\n });\n\n await server.connect(transport);\n\n const port = opts.http;\n app.listen(port, () => {\n console.log(`ContextKit MCP server listening on http://127.0.0.1:${port}/mcp`);\n });\n } else {\n // Default: stdio transport\n const { StdioServerTransport } = await import(\n '@modelcontextprotocol/sdk/server/stdio.js'\n );\n\n const transport = new StdioServerTransport();\n await server.connect(transport);\n\n // In stdio mode, log to stderr so stdout stays clean for MCP protocol\n console.error('ContextKit MCP server running on stdio');\n }\n } catch (err) {\n console.error('Failed to start MCP server:', (err as Error).message);\n process.exit(1);\n }\n });\n"],"mappings":";;;AAAA,SAAS,WAAAA,gBAAe;;;ACAxB,SAAS,eAAe;AACxB,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf;AAAA,EACE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AAM,OAAO,KAAK;AAClB,UAAI,OAAO,MAAM,MAAM;AACrB,gBAAQ,IAAI,uDAAuD,IAAI,MAAM;AAAA,MAC/E,CAAC;AAAA,IACH,OAAO;AAEL,YAAM,EAAE,qBAAqB,IAAI,MAAM,OACrC,2CACF;AAEA,YAAM,YAAY,IAAI,qBAAqB;AAC3C,YAAM,OAAO,QAAQ,SAAS;AAG9B,cAAQ,MAAM,wCAAwC;AAAA,IACxD;AAAA,EACF,SAAS,KAAK;AACZ,YAAQ,MAAM,+BAAgC,IAAc,OAAO;AACnE,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF,CAAC;;;AV1DH,IAAM,UAAU,IAAIE,SAAQ;AAE5B,QACG,KAAK,SAAS,EACd,QAAQ,OAAO,EACf,YAAY,6DAAwD;AAEvE,QAAQ,WAAW,YAAY;AAC/B,QAAQ,WAAW,WAAW;AAC9B,QAAQ,WAAW,WAAW;AAC9B,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,UAAU;AAC7B,QAAQ,WAAW,UAAU;AAC7B,QAAQ,WAAW,WAAW;AAC9B,QAAQ,WAAW,YAAY;AAE/B,MAAM,QAAQ,WAAW,QAAQ,IAAI;","names":["Command","Command","path","loadConfig","compile","LintEngine","ALL_RULES","Command","loadConfig","path","compile","LintEngine","ALL_RULES","Command","fs","path","Command","fs","path","chalk","Command","path","fs","chalk","loadConfig","compile","LintEngine","ALL_RULES","Command","loadConfig","path","compile","LintEngine","ALL_RULES","chalk","fs","Command","path","chalk","loadConfig","compile","LintEngine","ALL_RULES","Command","Command","fs","path","Command"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/commands/lint.ts","../src/formatters/pretty.ts","../src/formatters/json.ts","../src/commands/build.ts","../src/commands/tier.ts","../src/commands/explain.ts","../src/commands/fix.ts","../src/commands/dev.ts","../src/commands/init.ts","../src/commands/site.ts","../src/commands/serve.ts","../src/commands/validate-osi.ts"],"sourcesContent":["// ContextKit CLI v0.2\n\nimport { Command } from 'commander';\nimport { lintCommand } from './commands/lint.js';\nimport { buildCommand } from './commands/build.js';\nimport { tierCommand } from './commands/tier.js';\nimport { explainCommand } from './commands/explain.js';\nimport { fixCommand } from './commands/fix.js';\nimport { devCommand } from './commands/dev.js';\nimport { initCommand } from './commands/init.js';\nimport { siteCommand } from './commands/site.js';\nimport { serveCommand } from './commands/serve.js';\nimport { validateOsiCommand } from './commands/validate-osi.js';\n\nconst program = new Command();\n\nprogram\n .name('context')\n .description('ContextKit — AI-ready metadata governance over OSI')\n .version('0.2.0');\n\n// Register all commands\nprogram.addCommand(lintCommand);\nprogram.addCommand(buildCommand);\nprogram.addCommand(tierCommand);\nprogram.addCommand(explainCommand);\nprogram.addCommand(fixCommand);\nprogram.addCommand(devCommand);\nprogram.addCommand(initCommand);\nprogram.addCommand(siteCommand);\nprogram.addCommand(serveCommand);\nprogram.addCommand(validateOsiCommand);\n\nprogram.parse();\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport {\n compile,\n loadConfig,\n LintEngine,\n ALL_RULES,\n type Diagnostic,\n type Severity,\n type MetadataTier,\n} from '@runcontext/core';\nimport { formatDiagnostics } from '../formatters/pretty.js';\nimport { formatJson } from '../formatters/json.js';\n\nexport const lintCommand = new Command('lint')\n .description('Run all lint rules against context files')\n .option('--context-dir <path>', 'Path to context directory')\n .option('--format <type>', 'Output format: pretty or json', 'pretty')\n .action(async (opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n\n // Compile the context graph\n const { graph, diagnostics: compileDiags } = await compile({\n contextDir,\n config,\n });\n\n // Run lint engine\n const overrides = config.lint?.severity_overrides as\n | Record<string, Severity | 'off'>\n | undefined;\n const engine = new LintEngine(overrides);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const lintDiags = engine.run(graph);\n\n // Merge compile diagnostics with lint diagnostics\n const allDiags: Diagnostic[] = [...compileDiags, ...lintDiags];\n\n // Enforce minimum_tier policy\n if (config.minimum_tier) {\n const tierOrder: MetadataTier[] = ['none', 'bronze', 'silver', 'gold'];\n const minIdx = tierOrder.indexOf(config.minimum_tier);\n for (const [modelName, score] of graph.tiers) {\n const actualIdx = tierOrder.indexOf(score.tier);\n if (actualIdx < minIdx) {\n allDiags.push({\n ruleId: 'tier/minimum-tier',\n severity: 'error',\n message: `Model \"${modelName}\" is tier \"${score.tier}\" but minimum_tier is \"${config.minimum_tier}\"`,\n location: { file: `model:${modelName}`, line: 1, column: 1 },\n fixable: false,\n });\n }\n }\n }\n\n // Output results\n if (opts.format === 'json') {\n console.log(formatJson(allDiags));\n } else {\n console.log(formatDiagnostics(allDiags));\n }\n\n // Exit with code 1 if there are errors\n const hasErrors = allDiags.some((d) => d.severity === 'error');\n if (hasErrors) {\n process.exit(1);\n }\n } catch (err) {\n console.error(chalk.red(`Lint failed: ${(err as Error).message}`));\n process.exit(1);\n }\n });\n","import chalk from 'chalk';\nimport type { Diagnostic, TierScore, TierCheckResult } from '@runcontext/core';\n\n/**\n * Format an array of diagnostics as colorized, human-readable text.\n */\nexport function formatDiagnostics(diagnostics: Diagnostic[]): string {\n if (diagnostics.length === 0) {\n return chalk.green('No issues found.');\n }\n\n const lines: string[] = [];\n\n for (const d of diagnostics) {\n const icon =\n d.severity === 'error' ? chalk.red('error') : chalk.yellow('warning');\n const loc = chalk.gray(\n `${d.location.file}:${d.location.line}:${d.location.column}`,\n );\n const rule = chalk.gray(`[${d.ruleId}]`);\n const fixTag = d.fixable ? chalk.blue(' (fixable)') : '';\n\n lines.push(` ${icon} ${d.message} ${rule}${fixTag}`);\n lines.push(` ${loc}`);\n }\n\n const errorCount = diagnostics.filter((d) => d.severity === 'error').length;\n const warnCount = diagnostics.filter((d) => d.severity === 'warning').length;\n\n lines.push('');\n const parts: string[] = [];\n if (errorCount > 0) parts.push(chalk.red(`${errorCount} error(s)`));\n if (warnCount > 0) parts.push(chalk.yellow(`${warnCount} warning(s)`));\n lines.push(parts.join(', '));\n\n return lines.join('\\n');\n}\n\n/**\n * Format a tier score as colorized, human-readable text.\n */\nexport function formatTierScore(score: TierScore): string {\n const lines: string[] = [];\n\n const tierColor = getTierColor(score.tier);\n lines.push(\n `${chalk.bold(score.model)}: ${tierColor(score.tier.toUpperCase())}`,\n );\n lines.push('');\n\n lines.push(formatTierSection('Bronze', score.bronze.passed, score.bronze.checks));\n lines.push(formatTierSection('Silver', score.silver.passed, score.silver.checks));\n lines.push(formatTierSection('Gold', score.gold.passed, score.gold.checks));\n\n return lines.join('\\n');\n}\n\nfunction formatTierSection(\n label: string,\n passed: boolean,\n checks: TierCheckResult[],\n): string {\n const lines: string[] = [];\n const status = passed ? chalk.green('PASS') : chalk.red('FAIL');\n lines.push(` ${label}: ${status}`);\n\n for (const check of checks) {\n const icon = check.passed ? chalk.green(' +') : chalk.red(' -');\n lines.push(` ${icon} ${check.label}`);\n if (check.detail && !check.passed) {\n lines.push(chalk.gray(` ${check.detail}`));\n }\n }\n\n return lines.join('\\n');\n}\n\nfunction getTierColor(tier: string): (text: string) => string {\n switch (tier) {\n case 'gold':\n return chalk.yellow;\n case 'silver':\n return chalk.white;\n case 'bronze':\n return chalk.hex('#CD7F32');\n default:\n return chalk.gray;\n }\n}\n\n/**\n * Format a generic info message.\n */\nexport function formatInfo(message: string): string {\n return chalk.blue(message);\n}\n\n/**\n * Format an error message.\n */\nexport function formatError(message: string): string {\n return chalk.red(`Error: ${message}`);\n}\n\n/**\n * Format a success message.\n */\nexport function formatSuccess(message: string): string {\n return chalk.green(message);\n}\n","/**\n * Format any value as pretty-printed JSON.\n */\nexport function formatJson(data: unknown): string {\n return JSON.stringify(data, null, 2);\n}\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport fs from 'node:fs';\nimport { compile, loadConfig, emitManifest } from '@runcontext/core';\nimport { formatJson } from '../formatters/json.js';\nimport { formatSuccess, formatError } from '../formatters/pretty.js';\n\nexport const buildCommand = new Command('build')\n .description('Compile context files and emit manifest JSON')\n .option('--context-dir <path>', 'Path to context directory')\n .option('--output-dir <path>', 'Path to output directory')\n .option('--format <type>', 'Output format: pretty or json', 'pretty')\n .action(async (opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n const outputDir = opts.outputDir\n ? path.resolve(opts.outputDir)\n : path.resolve(config.output_dir);\n\n // Compile the context graph\n const { graph, diagnostics } = await compile({ contextDir, config });\n\n // Check for compile errors\n const errors = diagnostics.filter((d) => d.severity === 'error');\n if (errors.length > 0) {\n if (opts.format === 'json') {\n console.log(formatJson({ success: false, errors }));\n } else {\n console.error(\n chalk.red(`Build failed with ${errors.length} error(s):`),\n );\n for (const e of errors) {\n console.error(chalk.red(` - ${e.message} [${e.ruleId}]`));\n }\n }\n process.exit(1);\n }\n\n // Emit manifest\n const manifest = emitManifest(graph, config);\n\n // Write to output directory\n fs.mkdirSync(outputDir, { recursive: true });\n const outputPath = path.join(outputDir, 'contextkit-manifest.json');\n fs.writeFileSync(outputPath, JSON.stringify(manifest, null, 2), 'utf-8');\n\n if (opts.format === 'json') {\n console.log(formatJson({ success: true, outputPath, manifest }));\n } else {\n console.log(formatSuccess(`Manifest written to ${outputPath}`));\n }\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport { compile, loadConfig, computeTier, type TierScore } from '@runcontext/core';\nimport { formatTierScore, formatError } from '../formatters/pretty.js';\nimport { formatJson } from '../formatters/json.js';\n\nexport const tierCommand = new Command('tier')\n .description('Show tier scorecard for one or all models')\n .argument('[model-name]', 'Specific model name to check')\n .option('--context-dir <path>', 'Path to context directory')\n .option('--format <type>', 'Output format: pretty or json', 'pretty')\n .action(async (modelName: string | undefined, opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n\n const { graph } = await compile({ contextDir, config });\n\n let scores: TierScore[];\n\n if (modelName) {\n // Single model\n if (!graph.models.has(modelName)) {\n console.error(formatError(`Model '${modelName}' not found.`));\n const available = [...graph.models.keys()].join(', ');\n if (available) {\n console.error(chalk.gray(`Available models: ${available}`));\n }\n process.exit(1);\n }\n scores = [computeTier(modelName, graph)];\n } else {\n // All models\n scores = [...graph.models.keys()].map((name) =>\n computeTier(name, graph),\n );\n }\n\n if (scores.length === 0) {\n console.log(\n opts.format === 'json'\n ? formatJson([])\n : chalk.yellow('No models found.'),\n );\n return;\n }\n\n if (opts.format === 'json') {\n console.log(formatJson(scores));\n } else {\n for (const score of scores) {\n console.log(formatTierScore(score));\n console.log('');\n }\n }\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport { compile, loadConfig } from '@runcontext/core';\nimport { formatJson } from '../formatters/json.js';\nimport { formatError } from '../formatters/pretty.js';\n\nexport const explainCommand = new Command('explain')\n .description('Look up models, terms, or owners by name and show details')\n .argument('<name>', 'Name of a model, term, or owner to look up')\n .option('--context-dir <path>', 'Path to context directory')\n .option('--format <type>', 'Output format: pretty or json', 'pretty')\n .action(async (name: string, opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n\n const { graph } = await compile({ contextDir, config });\n\n const results: Array<{ type: string; name: string; data: unknown }> = [];\n\n // Search models\n if (graph.models.has(name)) {\n results.push({ type: 'model', name, data: graph.models.get(name) });\n }\n\n // Search terms\n if (graph.terms.has(name)) {\n results.push({ type: 'term', name, data: graph.terms.get(name) });\n }\n\n // Search owners\n if (graph.owners.has(name)) {\n results.push({ type: 'owner', name, data: graph.owners.get(name) });\n }\n\n // Search governance\n if (graph.governance.has(name)) {\n results.push({\n type: 'governance',\n name,\n data: graph.governance.get(name),\n });\n }\n\n // Search rules\n if (graph.rules.has(name)) {\n results.push({ type: 'rules', name, data: graph.rules.get(name) });\n }\n\n // Search lineage\n if (graph.lineage.has(name)) {\n results.push({ type: 'lineage', name, data: graph.lineage.get(name) });\n }\n\n if (results.length === 0) {\n console.error(formatError(`No matching entity found for '${name}'.`));\n process.exit(1);\n }\n\n if (opts.format === 'json') {\n console.log(formatJson(results));\n } else {\n for (const result of results) {\n console.log(chalk.bold(`${result.type}: ${result.name}`));\n console.log(chalk.gray('---'));\n console.log(JSON.stringify(result.data, null, 2));\n console.log('');\n }\n }\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport fs from 'node:fs';\nimport {\n compile,\n loadConfig,\n LintEngine,\n ALL_RULES,\n applyFixes,\n type Severity,\n} from '@runcontext/core';\nimport { formatSuccess, formatError } from '../formatters/pretty.js';\nimport { formatJson } from '../formatters/json.js';\n\nexport const fixCommand = new Command('fix')\n .description('Auto-fix lint issues')\n .option('--context-dir <path>', 'Path to context directory')\n .option('--format <type>', 'Output format: pretty or json', 'pretty')\n .option('--dry-run', 'Show what would be fixed without writing files')\n .action(async (opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n\n // Compile and lint\n const { graph } = await compile({ contextDir, config });\n\n const overrides = config.lint?.severity_overrides as\n | Record<string, Severity | 'off'>\n | undefined;\n const engine = new LintEngine(overrides);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const diagnostics = engine.run(graph);\n\n const fixable = diagnostics.filter((d) => d.fixable);\n\n if (fixable.length === 0) {\n if (opts.format === 'json') {\n console.log(formatJson({ fixedFiles: [], fixCount: 0 }));\n } else {\n console.log(chalk.green('No fixable issues found.'));\n }\n return;\n }\n\n // Apply fixes\n const readFile = (filePath: string) =>\n fs.readFileSync(filePath, 'utf-8');\n const fixedFiles = applyFixes(fixable, readFile);\n\n if (opts.dryRun) {\n if (opts.format === 'json') {\n const entries = [...fixedFiles.entries()].map(([file, content]) => ({\n file,\n content,\n }));\n console.log(\n formatJson({ dryRun: true, fixCount: fixable.length, entries }),\n );\n } else {\n console.log(\n chalk.yellow(`Dry run: ${fixable.length} issue(s) would be fixed in ${fixedFiles.size} file(s):`),\n );\n for (const file of fixedFiles.keys()) {\n console.log(chalk.gray(` ${file}`));\n }\n }\n return;\n }\n\n // Write fixed files\n for (const [file, content] of fixedFiles) {\n fs.writeFileSync(file, content, 'utf-8');\n }\n\n if (opts.format === 'json') {\n console.log(\n formatJson({\n fixedFiles: [...fixedFiles.keys()],\n fixCount: fixable.length,\n }),\n );\n } else {\n console.log(\n formatSuccess(\n `Fixed ${fixable.length} issue(s) in ${fixedFiles.size} file(s).`,\n ),\n );\n }\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport {\n compile,\n loadConfig,\n LintEngine,\n ALL_RULES,\n type Severity,\n} from '@runcontext/core';\nimport { formatDiagnostics } from '../formatters/pretty.js';\n\nasync function runLint(contextDir: string): Promise<void> {\n const config = loadConfig(process.cwd());\n\n const { graph, diagnostics: compileDiags } = await compile({\n contextDir,\n config,\n });\n\n const overrides = config.lint?.severity_overrides as\n | Record<string, Severity | 'off'>\n | undefined;\n const engine = new LintEngine(overrides);\n for (const rule of ALL_RULES) {\n engine.register(rule);\n }\n const lintDiags = engine.run(graph);\n const allDiags = [...compileDiags, ...lintDiags];\n\n console.clear();\n console.log(chalk.gray(`[${new Date().toLocaleTimeString()}] Linting...`));\n console.log(formatDiagnostics(allDiags));\n console.log('');\n}\n\nexport const devCommand = new Command('dev')\n .description('Watch mode — re-run lint on file changes')\n .option('--context-dir <path>', 'Path to context directory')\n .action(async (opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n\n console.log(chalk.blue(`Watching ${contextDir} for changes...`));\n console.log(chalk.gray('Press Ctrl+C to stop.\\n'));\n\n // Initial lint run\n await runLint(contextDir);\n\n // Dynamic import of chokidar for watch mode\n const { watch } = await import('chokidar');\n\n let debounceTimer: ReturnType<typeof setTimeout> | null = null;\n\n const watcher = watch(contextDir, {\n ignored: /(^|[/\\\\])\\../, // ignore dotfiles\n persistent: true,\n ignoreInitial: true,\n });\n\n watcher.on('all', (_event, _filePath) => {\n if (debounceTimer) clearTimeout(debounceTimer);\n debounceTimer = setTimeout(async () => {\n try {\n await runLint(contextDir);\n } catch (err) {\n console.error(\n chalk.red(`Lint error: ${(err as Error).message}`),\n );\n }\n }, 300);\n });\n } catch (err) {\n console.error(chalk.red(`Dev mode failed: ${(err as Error).message}`));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport fs from 'node:fs';\nimport { formatSuccess, formatError } from '../formatters/pretty.js';\n\nconst EXAMPLE_OSI = `version: \"1.0\"\n\nsemantic_model:\n - name: example-model\n description: An example semantic model\n ai_context:\n instructions: \"Use this model for general analytics queries\"\n synonyms: [\"example\", \"sample model\"]\n\n datasets:\n - name: example_table\n source: warehouse.public.example_table\n primary_key: [id]\n description: \"Example table\"\n fields:\n - name: id\n expression:\n dialects:\n - dialect: ANSI_SQL\n expression: id\n description: \"Primary key\"\n type: number\n - name: name\n expression:\n dialects:\n - dialect: ANSI_SQL\n expression: name\n description: \"Name field\"\n type: string\n`;\n\nconst EXAMPLE_GOVERNANCE = `model: example-model\nowner: data-team\nclassification: internal\nsecurity:\n pii: false\n access_level: internal\ndatasets:\n example_table:\n grain: one row per example entity\n fields:\n id:\n description: \"Primary key\"\n name:\n description: \"Name field\"\n`;\n\nconst EXAMPLE_TERM = `glossary:\n - term: Example Term\n definition: A sample glossary term to demonstrate the format\n aliases: [\"sample term\"]\n owner: data-team\n`;\n\nconst EXAMPLE_OWNER = `team: data-team\nname: Data Team\nemail: data-team@example.com\nslack: \"#data-team\"\nmembers:\n - name: Jane Doe\n role: lead\n`;\n\nconst EXAMPLE_CONFIG = `context_dir: context\noutput_dir: dist\nminimum_tier: bronze\n`;\n\nexport const initCommand = new Command('init')\n .description('Scaffold a v0.2 ContextKit project structure')\n .option('--dir <path>', 'Root directory for the project', '.')\n .action(async (opts) => {\n try {\n const rootDir = path.resolve(opts.dir);\n const contextDir = path.join(rootDir, 'context');\n\n // Create directory structure\n const dirs = [\n path.join(contextDir, 'models'),\n path.join(contextDir, 'governance'),\n path.join(contextDir, 'glossary'),\n path.join(contextDir, 'owners'),\n ];\n\n for (const dir of dirs) {\n fs.mkdirSync(dir, { recursive: true });\n }\n\n // Write example files (only if they don't already exist)\n const files: Array<{ path: string; content: string }> = [\n {\n path: path.join(contextDir, 'models', 'example-model.osi.yaml'),\n content: EXAMPLE_OSI,\n },\n {\n path: path.join(\n contextDir,\n 'governance',\n 'example-model.governance.yaml',\n ),\n content: EXAMPLE_GOVERNANCE,\n },\n {\n path: path.join(contextDir, 'glossary', 'glossary.term.yaml'),\n content: EXAMPLE_TERM,\n },\n {\n path: path.join(contextDir, 'owners', 'data-team.owner.yaml'),\n content: EXAMPLE_OWNER,\n },\n {\n path: path.join(rootDir, 'contextkit.config.yaml'),\n content: EXAMPLE_CONFIG,\n },\n ];\n\n let created = 0;\n let skipped = 0;\n\n for (const file of files) {\n if (fs.existsSync(file.path)) {\n console.log(chalk.gray(` skip ${path.relative(rootDir, file.path)} (exists)`));\n skipped++;\n } else {\n fs.writeFileSync(file.path, file.content, 'utf-8');\n console.log(chalk.green(` create ${path.relative(rootDir, file.path)}`));\n created++;\n }\n }\n\n console.log('');\n console.log(\n formatSuccess(\n `Initialized ContextKit project: ${created} file(s) created, ${skipped} skipped.`,\n ),\n );\n console.log('');\n console.log(chalk.gray('Next steps:'));\n console.log(chalk.gray(' 1. Edit the example files in context/'));\n console.log(chalk.gray(' 2. Run: context lint'));\n console.log(chalk.gray(' 3. Run: context build'));\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport { compile, loadConfig, emitManifest } from '@runcontext/core';\nimport { formatError } from '../formatters/pretty.js';\n\nexport const siteCommand = new Command('site')\n .description('Build a static documentation site from compiled context')\n .option('--context-dir <path>', 'Path to context directory')\n .option('--output-dir <path>', 'Path to site output directory')\n .action(async (opts) => {\n try {\n const config = loadConfig(process.cwd());\n const contextDir = opts.contextDir\n ? path.resolve(opts.contextDir)\n : path.resolve(config.context_dir);\n\n // Compile the context graph\n const { graph } = await compile({ contextDir, config });\n const manifest = emitManifest(graph, config);\n\n // Try to import the site generator\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- dynamic import\n let buildSite: ((...args: any[]) => Promise<void>) | undefined;\n try {\n const siteModule = await import('@runcontext/site');\n buildSite = siteModule.buildSite;\n } catch {\n // @runcontext/site not yet implemented\n }\n\n if (!buildSite) {\n console.log(\n chalk.yellow(\n 'Site generator is not yet available. Install @runcontext/site to enable this command.',\n ),\n );\n process.exit(0);\n }\n\n const outputDir = opts.outputDir\n ? path.resolve(opts.outputDir)\n : path.resolve(config.site?.base_path ?? 'site');\n\n await buildSite(manifest, config, outputDir);\n console.log(chalk.green(`Site built to ${outputDir}`));\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport { formatError } from '../formatters/pretty.js';\n\nexport const serveCommand = new Command('serve')\n .description('Start the MCP server (stdio transport)')\n .option('--context-dir <path>', 'Path to context directory')\n .action(async (opts) => {\n try {\n // Dynamic import — @runcontext/mcp is an optional peer\n let startServer: ((options?: { contextDir?: string; rootDir?: string }) => Promise<unknown>) | undefined;\n try {\n const mcpModule = await import('@runcontext/mcp');\n startServer = mcpModule.startServer;\n } catch {\n // @runcontext/mcp not installed\n }\n\n if (!startServer) {\n console.log(\n chalk.yellow(\n 'MCP server is not available. Install @runcontext/mcp to enable this command.',\n ),\n );\n process.exit(1);\n }\n\n console.log(chalk.blue('Starting MCP server (stdio transport)...'));\n await startServer({\n contextDir: opts.contextDir,\n rootDir: process.cwd(),\n });\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n","import { Command } from 'commander';\nimport chalk from 'chalk';\nimport path from 'node:path';\nimport { parseFile, osiDocumentSchema } from '@runcontext/core';\nimport { formatJson } from '../formatters/json.js';\nimport { formatError, formatSuccess } from '../formatters/pretty.js';\n\nexport const validateOsiCommand = new Command('validate-osi')\n .description('Validate a single OSI file against the schema')\n .argument('<file>', 'Path to the OSI YAML file')\n .option('--format <type>', 'Output format: pretty or json', 'pretty')\n .action(async (file: string, opts) => {\n try {\n const filePath = path.resolve(file);\n\n // Parse the file\n const parsed = await parseFile(filePath, 'model');\n\n // Validate against the schema\n const result = osiDocumentSchema.safeParse(parsed.data);\n\n if (result.success) {\n if (opts.format === 'json') {\n console.log(\n formatJson({\n valid: true,\n file: filePath,\n data: result.data,\n }),\n );\n } else {\n console.log(formatSuccess(`${filePath} is valid.`));\n }\n } else {\n const issues = result.error.issues.map((issue) => ({\n path: issue.path.join('.'),\n message: issue.message,\n }));\n\n if (opts.format === 'json') {\n console.log(\n formatJson({\n valid: false,\n file: filePath,\n issues,\n }),\n );\n } else {\n console.error(chalk.red(`Validation failed for ${filePath}:`));\n for (const issue of issues) {\n console.error(chalk.red(` ${issue.path}: ${issue.message}`));\n }\n }\n process.exit(1);\n }\n } catch (err) {\n console.error(formatError((err as Error).message));\n process.exit(1);\n }\n });\n"],"mappings":";;;AAEA,SAAS,WAAAA,iBAAe;;;ACFxB,SAAS,eAAe;AACxB,OAAOC,YAAW;AAClB,OAAO,UAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;;;ACXP,OAAO,WAAW;AAMX,SAAS,kBAAkB,aAAmC;AACnE,MAAI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,QAAQ,WAAW,YAAY;AAC/B,QAAQ,WAAW,kBAAkB;AAErC,QAAQ,MAAM;","names":["Command","chalk","chalk","Command","chalk","path","compile","loadConfig","Command","loadConfig","path","compile","chalk","Command","chalk","path","compile","loadConfig","Command","loadConfig","path","compile","chalk","Command","chalk","path","compile","loadConfig","Command","loadConfig","path","compile","chalk","Command","chalk","path","fs","compile","loadConfig","LintEngine","ALL_RULES","Command","loadConfig","path","compile","LintEngine","ALL_RULES","chalk","fs","Command","chalk","path","compile","loadConfig","LintEngine","ALL_RULES","loadConfig","compile","LintEngine","ALL_RULES","chalk","Command","path","Command","chalk","path","fs","Command","path","fs","chalk","Command","chalk","path","compile","loadConfig","emitManifest","Command","loadConfig","path","compile","emitManifest","chalk","Command","chalk","Command","chalk","Command","chalk","path","Command","path","chalk","Command"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runcontext/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CLI for ContextKit — lint, build, fix, and serve institutional context",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Eric Kittelson",
|
|
@@ -10,28 +10,37 @@
|
|
|
10
10
|
"url": "https://github.com/erickittelson/ContextKit.git",
|
|
11
11
|
"directory": "packages/cli"
|
|
12
12
|
},
|
|
13
|
-
"keywords": [
|
|
13
|
+
"keywords": [
|
|
14
|
+
"contextkit",
|
|
15
|
+
"cli",
|
|
16
|
+
"lint",
|
|
17
|
+
"build",
|
|
18
|
+
"yaml",
|
|
19
|
+
"mcp"
|
|
20
|
+
],
|
|
14
21
|
"type": "module",
|
|
15
22
|
"bin": {
|
|
16
23
|
"context": "./dist/index.js"
|
|
17
24
|
},
|
|
18
|
-
"files": [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"clean": "rm -rf dist"
|
|
22
|
-
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
23
28
|
"dependencies": {
|
|
24
|
-
"@runcontext/core": "^0.1.1",
|
|
25
|
-
"@runcontext/mcp": "^0.1.1",
|
|
26
|
-
"@runcontext/site": "^0.1.1",
|
|
27
29
|
"chalk": "^5.4.0",
|
|
28
30
|
"chokidar": "^4.0.0",
|
|
29
|
-
"commander": "^14.0.0"
|
|
31
|
+
"commander": "^14.0.0",
|
|
32
|
+
"@runcontext/core": "^0.2.1",
|
|
33
|
+
"@runcontext/mcp": "^0.2.1",
|
|
34
|
+
"@runcontext/site": "^0.2.1"
|
|
30
35
|
},
|
|
31
36
|
"devDependencies": {
|
|
32
37
|
"@types/node": "^25.3.3",
|
|
33
38
|
"tsup": "^8.4.0",
|
|
34
39
|
"typescript": "^5.7.0",
|
|
35
40
|
"vitest": "^3.2.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsup",
|
|
44
|
+
"clean": "rm -rf dist"
|
|
36
45
|
}
|
|
37
|
-
}
|
|
46
|
+
}
|