@vreko/cli 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +45 -0
  3. package/dist/CeremonyView-LQS7FTMK.js +134 -0
  4. package/dist/CeremonyView-LQS7FTMK.js.map +1 -0
  5. package/dist/InitApp-7K5DTYSW.js +1479 -0
  6. package/dist/InitApp-7K5DTYSW.js.map +1 -0
  7. package/dist/SkippedTestDetector-PJSKSOZR.js +7 -0
  8. package/dist/SkippedTestDetector-PJSKSOZR.js.map +1 -0
  9. package/dist/TuiApp-FX23XQBK.js +8 -0
  10. package/dist/TuiApp-FX23XQBK.js.map +1 -0
  11. package/dist/analysis-ABEO6RTN.js +8 -0
  12. package/dist/analysis-ABEO6RTN.js.map +1 -0
  13. package/dist/auth-XNBEBNPY.js +7669 -0
  14. package/dist/auth-XNBEBNPY.js.map +1 -0
  15. package/dist/ceremony-M7CXVBVA.js +45 -0
  16. package/dist/ceremony-M7CXVBVA.js.map +1 -0
  17. package/dist/chunk-A3QSZJPD.js +3147 -0
  18. package/dist/chunk-A3QSZJPD.js.map +1 -0
  19. package/dist/chunk-ASGZ5B6C.js +3969 -0
  20. package/dist/chunk-ASGZ5B6C.js.map +1 -0
  21. package/dist/chunk-DMXC2JTC.js +58 -0
  22. package/dist/chunk-DMXC2JTC.js.map +1 -0
  23. package/dist/chunk-EEBSK2IH.js +161 -0
  24. package/dist/chunk-EEBSK2IH.js.map +1 -0
  25. package/dist/chunk-EWOJGXRX.js +22 -0
  26. package/dist/chunk-EWOJGXRX.js.map +1 -0
  27. package/dist/chunk-F7GEJLP7.js +2389 -0
  28. package/dist/chunk-F7GEJLP7.js.map +1 -0
  29. package/dist/chunk-GOYL3F4T.js +605 -0
  30. package/dist/chunk-GOYL3F4T.js.map +1 -0
  31. package/dist/chunk-GRMRYWYS.js +17 -0
  32. package/dist/chunk-GRMRYWYS.js.map +1 -0
  33. package/dist/chunk-GSUGROXB.js +1951 -0
  34. package/dist/chunk-GSUGROXB.js.map +1 -0
  35. package/dist/chunk-H7773ONB.js +50 -0
  36. package/dist/chunk-H7773ONB.js.map +1 -0
  37. package/dist/chunk-HFQHU5LC.js +445 -0
  38. package/dist/chunk-HFQHU5LC.js.map +1 -0
  39. package/dist/chunk-IVHUBLJD.js +318 -0
  40. package/dist/chunk-IVHUBLJD.js.map +1 -0
  41. package/dist/chunk-KJWKY4L4.js +14 -0
  42. package/dist/chunk-KJWKY4L4.js.map +1 -0
  43. package/dist/chunk-MJVY2XUN.js +1793 -0
  44. package/dist/chunk-MJVY2XUN.js.map +1 -0
  45. package/dist/chunk-QWZVCJII.js +1797 -0
  46. package/dist/chunk-QWZVCJII.js.map +1 -0
  47. package/dist/chunk-VTSNRV3V.js +3237 -0
  48. package/dist/chunk-VTSNRV3V.js.map +1 -0
  49. package/dist/chunk-W5B4GTXR.js +1466 -0
  50. package/dist/chunk-W5B4GTXR.js.map +1 -0
  51. package/dist/chunk-WZEZLVOW.js +4995 -0
  52. package/dist/chunk-WZEZLVOW.js.map +1 -0
  53. package/dist/chunk-YPTTIXKC.js +199 -0
  54. package/dist/chunk-YPTTIXKC.js.map +1 -0
  55. package/dist/chunk-Z55UGM6X.js +6360 -0
  56. package/dist/chunk-Z55UGM6X.js.map +1 -0
  57. package/dist/chunk-ZIIRQODJ.js +110 -0
  58. package/dist/chunk-ZIIRQODJ.js.map +1 -0
  59. package/dist/chunk-ZSUQ4FMB.js +77 -0
  60. package/dist/chunk-ZSUQ4FMB.js.map +1 -0
  61. package/dist/client-JMTSZS3V.js +10 -0
  62. package/dist/client-JMTSZS3V.js.map +1 -0
  63. package/dist/deprecated-snap.js +19 -0
  64. package/dist/deprecated-snap.js.map +1 -0
  65. package/dist/dist-2KWBZFLA.js +14 -0
  66. package/dist/dist-2KWBZFLA.js.map +1 -0
  67. package/dist/dist-5ZYKNNU3.js +7 -0
  68. package/dist/dist-5ZYKNNU3.js.map +1 -0
  69. package/dist/dist-CP3RFHPI.js +11 -0
  70. package/dist/dist-CP3RFHPI.js.map +1 -0
  71. package/dist/gecko-53ITAGG6.js +56 -0
  72. package/dist/gecko-53ITAGG6.js.map +1 -0
  73. package/dist/guards-QAFC64NO.js +7 -0
  74. package/dist/guards-QAFC64NO.js.map +1 -0
  75. package/dist/index.js +57785 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/init-command-246JIVXM.js +7 -0
  78. package/dist/init-command-246JIVXM.js.map +1 -0
  79. package/dist/init-core-KAI7LCXZ.js +12 -0
  80. package/dist/init-core-KAI7LCXZ.js.map +1 -0
  81. package/dist/init-scan-RZNYDTUV.js +1919 -0
  82. package/dist/init-scan-RZNYDTUV.js.map +1 -0
  83. package/dist/local-service-adapter-6KNN6WQL.js +8 -0
  84. package/dist/local-service-adapter-6KNN6WQL.js.map +1 -0
  85. package/dist/secure-credentials-JXWAQLS2.js +306 -0
  86. package/dist/secure-credentials-JXWAQLS2.js.map +1 -0
  87. package/dist/tui-TPJPUS2R.js +111 -0
  88. package/dist/tui-TPJPUS2R.js.map +1 -0
  89. package/dist/vreko-dir-O3RLG7PI.js +8 -0
  90. package/dist/vreko-dir-O3RLG7PI.js.map +1 -0
  91. package/package.json +132 -0
  92. package/scripts/check-banned-words.ts +152 -0
  93. package/scripts/hooks/posttooluse-file-notify.sh +108 -0
  94. package/scripts/hooks/pretooluse-fragile-guard.sh +82 -0
  95. package/scripts/post-install-notice.js +24 -0
  96. package/scripts/postinstall.mjs +84 -0
  97. package/scripts/preuninstall.mjs +34 -0
  98. package/scripts/verify-jsx-transform.mjs +55 -0
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env node
2
+ import { __name } from './chunk-EWOJGXRX.js';
3
+ import { parse } from '@babel/parser';
4
+
5
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
6
+ function detectSkippedTests(code, filePath) {
7
+ const skipped = [];
8
+ try {
9
+ let visit2 = function(node) {
10
+ if (node.type === "CallExpression") {
11
+ const callee = node.callee;
12
+ if (callee.type === "MemberExpression" && callee.property.type === "Identifier" && callee.property.name === "skip" && callee.object.type === "Identifier") {
13
+ const testType = callee.object.name;
14
+ if (testType === "describe" || testType === "it" || testType === "test") {
15
+ let name;
16
+ if (node.arguments.length > 0) {
17
+ const firstArg = node.arguments[0];
18
+ if (firstArg.type === "StringLiteral") {
19
+ name = firstArg.value;
20
+ } else if (firstArg.type === "TemplateLiteral" && firstArg.quasis.length === 1) {
21
+ name = firstArg.quasis[0].value.raw;
22
+ }
23
+ }
24
+ skipped.push({
25
+ type: testType,
26
+ name,
27
+ line: node.loc?.start.line ?? 0,
28
+ column: node.loc?.start.column ?? 0,
29
+ file: filePath
30
+ });
31
+ }
32
+ }
33
+ }
34
+ for (const key of Object.keys(node)) {
35
+ const value = node[key];
36
+ if (value && typeof value === "object") {
37
+ if (Array.isArray(value)) {
38
+ for (const item of value) {
39
+ if (item && typeof item === "object" && "type" in item) {
40
+ visit2(item);
41
+ }
42
+ }
43
+ } else if ("type" in value) {
44
+ visit2(value);
45
+ }
46
+ }
47
+ }
48
+ };
49
+ var visit = visit2;
50
+ __name(visit2, "visit");
51
+ const ast = parse(code, {
52
+ sourceType: "module",
53
+ plugins: [
54
+ "typescript",
55
+ "jsx"
56
+ ],
57
+ errorRecovery: true
58
+ });
59
+ visit2(ast.program);
60
+ return {
61
+ file: filePath,
62
+ skipped,
63
+ parsed: true
64
+ };
65
+ } catch (error) {
66
+ return {
67
+ file: filePath,
68
+ skipped: [],
69
+ parsed: false,
70
+ error: error instanceof Error ? error.message : String(error)
71
+ };
72
+ }
73
+ }
74
+ __name(detectSkippedTests, "detectSkippedTests");
75
+ function analyzeSkippedTests(files) {
76
+ const results = [];
77
+ for (const [filePath, content] of files) {
78
+ if (filePath.includes(".test.") || filePath.includes(".spec.") || filePath.includes("__tests__")) {
79
+ results.push(detectSkippedTests(content, filePath));
80
+ }
81
+ }
82
+ return results;
83
+ }
84
+ __name(analyzeSkippedTests, "analyzeSkippedTests");
85
+ function getSkippedTestSummary(results) {
86
+ const summary = {
87
+ totalSkipped: 0,
88
+ byType: {
89
+ describe: 0,
90
+ it: 0,
91
+ test: 0
92
+ },
93
+ filesWithSkipped: []
94
+ };
95
+ for (const result of results) {
96
+ if (result.skipped.length > 0) {
97
+ summary.filesWithSkipped.push(result.file);
98
+ summary.totalSkipped += result.skipped.length;
99
+ for (const test of result.skipped) {
100
+ summary.byType[test.type]++;
101
+ }
102
+ }
103
+ }
104
+ return summary;
105
+ }
106
+ __name(getSkippedTestSummary, "getSkippedTestSummary");
107
+
108
+ export { analyzeSkippedTests, detectSkippedTests, getSkippedTestSummary };
109
+ //# sourceMappingURL=chunk-ZIIRQODJ.js.map
110
+ //# sourceMappingURL=chunk-ZIIRQODJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/core/src/analysis/static/SkippedTestDetector.ts"],"names":["filePath","visit","item","value","code","skipped","detectSkippedTests","analyzeSkippedTests","files","content","includes","results","getSkippedTestSummary","summary","totalSkipped","byType","Object","node","key","describe","it","filesWithSkipped","result","file"],"mappings":"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","file":"chunk-ZIIRQODJ.js","sourcesContent":["/**\n * Skipped Test Detector\n *\n * Uses @babel/parser to detect skipped tests (describe.skip, it.skip, test.skip)\n * in test files. This helps AI agents identify RED PHASE TDD tests that may\n * be ready to enable.\n *\n * @module analysis/static/SkippedTestDetector\n */\n\nimport { parse } from \"@babel/parser\";\nimport type { Node } from \"@babel/types\";\n\nexport interface SkippedTest {\n\t/** Test type: describe, it, or test */\n\ttype: \"describe\" | \"it\" | \"test\";\n\t/** Test name if extractable */\n\tname?: string;\n\t/** Line number (1-indexed) */\n\tline: number;\n\t/** Column number (1-indexed) */\n\tcolumn: number;\n\t/** File path */\n\tfile: string;\n}\n\nexport interface SkippedTestResult {\n\t/** File analyzed */\n\tfile: string;\n\t/** Skipped tests found */\n\tskipped: SkippedTest[];\n\t/** Whether parsing succeeded */\n\tparsed: boolean;\n\t/** Parse error if any */\n\terror?: string;\n}\n\n/**\n * Detect skipped tests in a file's source code\n *\n * @param code - Source code to analyze\n * @param filePath - Path to file (for error reporting)\n * @returns Detection result with skipped tests\n *\n * @example\n * ```typescript\n * const result = detectSkippedTests(`\n * describe.skip(\"Feature\", () => {\n * it(\"should work\", () => {});\n * });\n * `, \"feature.test.ts\");\n *\n * // result.skipped = [{ type: \"describe\", name: \"Feature\", line: 2, ... }]\n * ```\n */\nexport function detectSkippedTests(code: string, filePath: string): SkippedTestResult {\n\tconst skipped: SkippedTest[] = [];\n\n\ttry {\n\t\tconst ast = parse(code, {\n\t\t\tsourceType: \"module\",\n\t\t\tplugins: [\"typescript\", \"jsx\"],\n\t\t\terrorRecovery: true,\n\t\t});\n\n\t\t// Simple AST traversal without @babel/traverse (to avoid extra dependency in MCP)\n\t\tfunction visit(node: Node) {\n\t\t\tif (node.type === \"CallExpression\") {\n\t\t\t\tconst callee = node.callee;\n\n\t\t\t\t// Check for .skip pattern: describe.skip, it.skip, test.skip\n\t\t\t\tif (\n\t\t\t\t\tcallee.type === \"MemberExpression\" &&\n\t\t\t\t\tcallee.property.type === \"Identifier\" &&\n\t\t\t\t\tcallee.property.name === \"skip\" &&\n\t\t\t\t\tcallee.object.type === \"Identifier\"\n\t\t\t\t) {\n\t\t\t\t\tconst testType = callee.object.name;\n\t\t\t\t\tif (testType === \"describe\" || testType === \"it\" || testType === \"test\") {\n\t\t\t\t\t\t// Try to extract test name from first argument\n\t\t\t\t\t\tlet name: string | undefined;\n\t\t\t\t\t\tif (node.arguments.length > 0) {\n\t\t\t\t\t\t\tconst firstArg = node.arguments[0];\n\t\t\t\t\t\t\tif (firstArg.type === \"StringLiteral\") {\n\t\t\t\t\t\t\t\tname = firstArg.value;\n\t\t\t\t\t\t\t} else if (firstArg.type === \"TemplateLiteral\" && firstArg.quasis.length === 1) {\n\t\t\t\t\t\t\t\tname = firstArg.quasis[0].value.raw;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tskipped.push({\n\t\t\t\t\t\t\ttype: testType as \"describe\" | \"it\" | \"test\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tline: node.loc?.start.line ?? 0,\n\t\t\t\t\t\t\tcolumn: node.loc?.start.column ?? 0,\n\t\t\t\t\t\t\tfile: filePath,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Also check for skip() as method call: describe(\"name\", () => { /* intentionally empty */ }).skip\n\t\t\t\t// This is less common but supported by some frameworks\n\t\t\t}\n\n\t\t\t// Recursively visit all properties that could contain nodes\n\t\t\tfor (const key of Object.keys(node)) {\n\t\t\t\tconst value = (node as unknown as Record<string, unknown>)[key];\n\t\t\t\tif (value && typeof value === \"object\") {\n\t\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\t\tfor (const item of value) {\n\t\t\t\t\t\t\tif (item && typeof item === \"object\" && \"type\" in item) {\n\t\t\t\t\t\t\t\tvisit(item as Node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (\"type\" in value) {\n\t\t\t\t\t\tvisit(value as Node);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvisit(ast.program as unknown as Node);\n\n\t\treturn { file: filePath, skipped, parsed: true };\n\t} catch (error) {\n\t\treturn {\n\t\t\tfile: filePath,\n\t\t\tskipped: [],\n\t\t\tparsed: false,\n\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t};\n\t}\n}\n\n/**\n * Analyze multiple files for skipped tests\n *\n * @param files - Map of file path to content\n * @returns Array of results for each file\n */\nexport function analyzeSkippedTests(files: Map<string, string>): SkippedTestResult[] {\n\tconst results: SkippedTestResult[] = [];\n\n\tfor (const [filePath, content] of files) {\n\t\t// Only analyze test files\n\t\tif (filePath.includes(\".test.\") || filePath.includes(\".spec.\") || filePath.includes(\"__tests__\")) {\n\t\t\tresults.push(detectSkippedTests(content, filePath));\n\t\t}\n\t}\n\n\treturn results;\n}\n\n/**\n * Get summary of skipped tests across all files\n */\nexport function getSkippedTestSummary(results: SkippedTestResult[]): {\n\ttotalSkipped: number;\n\tbyType: { describe: number; it: number; test: number };\n\tfilesWithSkipped: string[];\n} {\n\tconst summary = {\n\t\ttotalSkipped: 0,\n\t\tbyType: { describe: 0, it: 0, test: 0 },\n\t\tfilesWithSkipped: [] as string[],\n\t};\n\n\tfor (const result of results) {\n\t\tif (result.skipped.length > 0) {\n\t\t\tsummary.filesWithSkipped.push(result.file);\n\t\t\tsummary.totalSkipped += result.skipped.length;\n\t\t\tfor (const test of result.skipped) {\n\t\t\t\tsummary.byType[test.type]++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn summary;\n}\n"]}
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+ import { __name } from './chunk-EWOJGXRX.js';
3
+ import 'fs';
4
+ import 'path';
5
+ import { Command } from 'commander';
6
+
7
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
8
+ function createInitCommand() {
9
+ return new Command("init").description("Bootstrap Vreko for a repository").argument("[path]", "Workspace path (default: current directory)").option("-y, --yes", "Skip confirmation prompts").option("--non-interactive", "Run without prompts").option("--json", "Output structured JSON summary").option("--force", "Re-initialize even if already set up").option("--dry-run", "Show what would be configured").option("--skip-mcp", "Skip MCP configuration").option("--skip-service", "Skip service registration").option("--api-key <key>", "API key for Pro features").option("--dev", "Use local dev mode for MCP").option("--npm", "Use npm/npx mode for MCP").option("-q, --quiet", "Suppress informational output").option("-v, --verbose", "Show detailed detection reasoning").action(async (pathArg, options) => {
10
+ if (options.json || options.nonInteractive || !process.stdin.isTTY) {
11
+ const { createInitCommand: createCoreInit } = await import('./init-core-KAI7LCXZ.js');
12
+ const coreCmd = createCoreInit();
13
+ const argv = [
14
+ "node",
15
+ "init"
16
+ ];
17
+ if (pathArg) {
18
+ argv.push(pathArg);
19
+ }
20
+ if (options.json) {
21
+ argv.push("--json");
22
+ }
23
+ if (options.nonInteractive) {
24
+ argv.push("--non-interactive");
25
+ }
26
+ if (options.yes) {
27
+ argv.push("--yes");
28
+ }
29
+ if (options.force) {
30
+ argv.push("--force");
31
+ }
32
+ if (options.dryRun) {
33
+ argv.push("--dry-run");
34
+ }
35
+ if (options.skipMcp) {
36
+ argv.push("--skip-mcp");
37
+ }
38
+ if (options.skipService) {
39
+ argv.push("--skip-service");
40
+ }
41
+ if (options.quiet) {
42
+ argv.push("--quiet");
43
+ }
44
+ if (options.verbose) {
45
+ argv.push("--verbose");
46
+ }
47
+ if (options.dev) {
48
+ argv.push("--dev");
49
+ }
50
+ if (options.npm) {
51
+ argv.push("--npm");
52
+ }
53
+ if (options.apiKey) {
54
+ argv.push("--api-key", options.apiKey);
55
+ }
56
+ await coreCmd.parseAsync(argv, {
57
+ from: "node"
58
+ });
59
+ return;
60
+ }
61
+ const { render } = await import('ink');
62
+ const React = await import('react');
63
+ const { InitApp: App } = await import('./InitApp-7K5DTYSW.js');
64
+ const initProfile = "VIRGIN";
65
+ const { waitUntilExit } = render(React.createElement(App, {
66
+ pathArg,
67
+ options,
68
+ initProfile
69
+ }));
70
+ await waitUntilExit();
71
+ });
72
+ }
73
+ __name(createInitCommand, "createInitCommand");
74
+
75
+ export { createInitCommand };
76
+ //# sourceMappingURL=chunk-ZSUQ4FMB.js.map
77
+ //# sourceMappingURL=chunk-ZSUQ4FMB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/init/init-command.ts"],"names":["createInitCommand","Command","description","argument","option","action","pathArg","options","json","nonInteractive","process","stdin","isTTY","createCoreInit","coreCmd","argv","push","yes","force","dryRun","skipMcp","skipService","quiet","verbose","dev","npm","apiKey","parseAsync","from","render","React","InitApp","App","initProfile","waitUntilExit","createElement"],"mappings":"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","file":"chunk-ZSUQ4FMB.js","sourcesContent":["import { existsSync } from \"node:fs\";\nimport { join, resolve } from \"node:path\";\nimport type { BootProfileType } from \"@vreko/contracts/local-service\";\nimport { Command } from \"commander\";\n\ndeclare const __CLI_VERSION__: string | undefined;\n\n/**\n * Derive the correct BootProfileType from filesystem state.\n * VIRGIN: no .vreko/config.json - first-time init, Detection frame must render.\n * WARM_RETURN: config exists - already initialized; InitApp exits via its guard.\n * WARM_RETURN rendering path is deferred (P2-Medium post-launch work).\n */\nfunction deriveInitProfile(pathArg: string | undefined): BootProfileType {\n\tconst workspacePath = resolve(pathArg || process.cwd());\n\treturn existsSync(join(workspacePath, \".vreko\", \"config.json\")) ? \"WARM_RETURN\" : \"VIRGIN\";\n}\n\n// Export the command maker\nexport function createInitCommand(): Command {\n\treturn new Command(\"init\")\n\t\t.description(\"Bootstrap Vreko for a repository\")\n\t\t.argument(\"[path]\", \"Workspace path (default: current directory)\")\n\t\t.option(\"-y, --yes\", \"Skip confirmation prompts\")\n\t\t.option(\"--non-interactive\", \"Run without prompts\")\n\t\t.option(\"--json\", \"Output structured JSON summary\")\n\t\t.option(\"--force\", \"Re-initialize even if already set up\")\n\t\t.option(\"--dry-run\", \"Show what would be configured\")\n\t\t.option(\"--skip-mcp\", \"Skip MCP configuration\")\n\t\t.option(\"--skip-service\", \"Skip service registration\")\n\t\t.option(\"--api-key <key>\", \"API key for Pro features\")\n\t\t.option(\"--dev\", \"Use local dev mode for MCP\")\n\t\t.option(\"--npm\", \"Use npm/npx mode for MCP\")\n\t\t.option(\"-q, --quiet\", \"Suppress informational output\")\n\t\t.option(\"-v, --verbose\", \"Show detailed detection reasoning\")\n\t\t.action(async (pathArg: string | undefined, options) => {\n\t\t\t// Guard: if non-TTY, --json, or --non-interactive, delegate to core init\n\t\t\t// The TUI requires a TTY with raw mode support and crashes without one.\n\t\t\tif (options.json || options.nonInteractive || !process.stdin.isTTY) {\n\t\t\t\tconst { createInitCommand: createCoreInit } = await import(\"./init-core.js\");\n\t\t\t\tconst coreCmd = createCoreInit();\n\t\t\t\t// Build argv array for commander parsing\n\t\t\t\tconst argv = [\"node\", \"init\"];\n\t\t\t\tif (pathArg) {\n\t\t\t\t\targv.push(pathArg);\n\t\t\t\t}\n\t\t\t\tif (options.json) {\n\t\t\t\t\targv.push(\"--json\");\n\t\t\t\t}\n\t\t\t\tif (options.nonInteractive) {\n\t\t\t\t\targv.push(\"--non-interactive\");\n\t\t\t\t}\n\t\t\t\tif (options.yes) {\n\t\t\t\t\targv.push(\"--yes\");\n\t\t\t\t}\n\t\t\t\tif (options.force) {\n\t\t\t\t\targv.push(\"--force\");\n\t\t\t\t}\n\t\t\t\tif (options.dryRun) {\n\t\t\t\t\targv.push(\"--dry-run\");\n\t\t\t\t}\n\t\t\t\tif (options.skipMcp) {\n\t\t\t\t\targv.push(\"--skip-mcp\");\n\t\t\t\t}\n\t\t\t\tif (options.skipService) {\n\t\t\t\t\targv.push(\"--skip-service\");\n\t\t\t\t}\n\t\t\t\tif (options.quiet) {\n\t\t\t\t\targv.push(\"--quiet\");\n\t\t\t\t}\n\t\t\t\tif (options.verbose) {\n\t\t\t\t\targv.push(\"--verbose\");\n\t\t\t\t}\n\t\t\t\tif (options.dev) {\n\t\t\t\t\targv.push(\"--dev\");\n\t\t\t\t}\n\t\t\t\tif (options.npm) {\n\t\t\t\t\targv.push(\"--npm\");\n\t\t\t\t}\n\t\t\t\tif (options.apiKey) {\n\t\t\t\t\targv.push(\"--api-key\", options.apiKey);\n\t\t\t\t}\n\t\t\t\tawait coreCmd.parseAsync(argv, { from: \"node\" });\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TTY mode: render the TUI with the correct boot profile.\n\t\t\tconst { render } = await import(\"ink\");\n\t\t\tconst React = await import(\"react\");\n\t\t\tconst { InitApp: App } = await import(\"../../ui/init/InitApp.js\");\n\t\t\t// Always VIRGIN in TUI - WARM_RETURN skips scan so profile state stays\n\t\t\t// null and activation never renders. Re-init runs the full flow instead.\n\t\t\tconst initProfile = \"VIRGIN\" as const;\n\t\t\tconst { waitUntilExit } = render(React.createElement(App, { pathArg, options, initProfile }));\n\t\t\tawait waitUntilExit();\n\t\t});\n}\n"]}
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ export { checkDatabaseConnection, closeDatabaseConnection, combinedSchema, db, pool } from './chunk-Z55UGM6X.js';
3
+ import './chunk-WZEZLVOW.js';
4
+ import './chunk-KJWKY4L4.js';
5
+ import './chunk-VTSNRV3V.js';
6
+ import './chunk-EWOJGXRX.js';
7
+
8
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
9
+ //# sourceMappingURL=client-JMTSZS3V.js.map
10
+ //# sourceMappingURL=client-JMTSZS3V.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"client-JMTSZS3V.js"}
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import chalk from 'chalk';
3
+
4
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
5
+ `
6
+ ${chalk.yellow.bold("\u26A0\uFE0F DEPRECATION WARNING")}
7
+
8
+ The ${chalk.red('"snap"')} command is deprecated and will be removed in v4.0.0
9
+
10
+ ${chalk.green("Please use one of these instead:")}
11
+ ${chalk.cyan("vr")} <command> ${chalk.dim("(recommended - short form)")}
12
+ ${chalk.cyan("vreko")} <command> ${chalk.dim("(explicit form)")}
13
+
14
+ ${chalk.dim("Update your scripts and aliases now to avoid disruption.")}
15
+ ${chalk.dim("See: https://docs.vreko.dev/cli/migration")}
16
+ `;
17
+ import('./index.js');
18
+ //# sourceMappingURL=deprecated-snap.js.map
19
+ //# sourceMappingURL=deprecated-snap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deprecated-snap.ts"],"names":["chalk","yellow","bold","red","green","cyan","dim"],"mappings":";;;;AAgB6B;EAC3BA,KAAAA,CAAMC,MAAAA,CAAOC,IAAAA,CAAK,mCAAA,CAAA;;MAEdF,KAAAA,CAAMG,GAAAA,CAAI,QAAA,CAAA,CAAA;;EAEdH,KAAAA,CAAMI,KAAAA,CAAM,kCAAA,CAAA;AACVJ,EAAAA,EAAAA,KAAAA,CAAMK,KAAK,IAAA,CAAA,qBAA0BL,KAAAA,CAAMM,GAAAA,CAAI,4BAAA,CAAA;AAC/CN,EAAAA,EAAAA,KAAAA,CAAMK,KAAK,OAAA,CAAA,eAAuBL,KAAAA,CAAMM,GAAAA,CAAI,iBAAA,CAAA;;EAE9CN,KAAAA,CAAMM,GAAAA,CAAI,0DAAA,CAAA;EACVN,KAAAA,CAAMM,GAAAA,CAAI,2CAAA,CAAA;;AAIZ,OAAO,YAAA,CAAA","file":"deprecated-snap.js","sourcesContent":["/**\n * Deprecated \"snap\" Binary Wrapper\n *\n * This wrapper provides backward compatibility for users who have the old\n * \"snap\" command installed. It shows a deprecation warning and forwards\n * to the main CLI.\n *\n * Timeline:\n * - v3.1.0: Added with deprecation warning\n * - v4.0.0: Will be removed (breaking change)\n *\n * @module deprecated-snap\n */\n\nimport chalk from \"chalk\";\n\nconst _DEPRECATION_MESSAGE = `\n${chalk.yellow.bold(\"⚠️ DEPRECATION WARNING\")}\n\nThe ${chalk.red('\"snap\"')} command is deprecated and will be removed in v4.0.0\n\n${chalk.green(\"Please use one of these instead:\")}\n ${chalk.cyan(\"vr\")} <command> ${chalk.dim(\"(recommended - short form)\")}\n ${chalk.cyan(\"vreko\")} <command> ${chalk.dim(\"(explicit form)\")}\n\n${chalk.dim(\"Update your scripts and aliases now to avoid disruption.\")}\n${chalk.dim(\"See: https://docs.vreko.dev/cli/migration\")}\n`;\n\n// Forward to actual CLI\nimport(\"./index.js\");\n"]}
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ export { AccountSchema, AiChatSchema, AttributionServiceImpl, EntitlementsServiceImpl, InvitationSchema, MCPService, MemberSchema, OrganizationSchema, OrganizationUpdateSchema, PasskeySchema, PurchaseInsertSchema, PurchaseSchema, PurchaseUpdateSchema, SagaOrchestratorImpl, SessionSchema, SnapshotStoreDb, TelemetrySinkDb, TelemetrySinkDbAdapter, UserSchema, UserUpdateSchema, VerificationSchema, anonymizeEmail, anonymizeUserData, anonymizeUserId, appendFalsePositivePatterns, calculateDecayedWeight, cleanupExpiredData, clearCapabilityCache, closeTestDb, countAllOrganizations, countAllUsers, createPurchase, createTestUser, createTierUpgradeSagaWithDeps, createUser, createUserAccount, databaseService, deletePurchaseBySubscriptionId, deleteUserApiKeys, deleteUserData, exportUserData, extensionLinkTokens, extensionSessions as extensionSessionsAuth, findSimilarPatterns, generateOrganizationSlug, getAccountById, getCacheMetrics, getCapabilities, getCapabilityAuditHistory, getInvitationById, getMCPService, getOrganizationById, getOrganizationBySlug, getOrganizationMembership, getOrganizationWithPurchasesAndMembersCount, getOrganizations, getOrganizationsWithMembers, getPendingInvitationByEmail, getPurchaseById, getPurchaseBySubscriptionId, getPurchasesByOrganizationId, getPurchasesByUserId, getTestDb, getUserByEmail, getUserById, getUserPrivacyPreferences, getUsers, getVectorStats, getWorkspaceLinkById, getWorkspaceLinksByUserId, handleTierDowngrade, handleTierUpgrade, healthCheck, incrementDetectionsAnalyzed, insertPatternWithEmbedding, invalidateCapabilityCache, isPgvectorEnabled, linkWorkspace, logAnonymizedEvent, logCapabilityAudit, mergeSignalIntoPattern, recordFalsePositiveSignal, resetCacheMetrics, resetCapabilities, resolveTierByWorkspaceId, sagaPersistence, sanitizeForLogging, searchSimilarPatterns, shouldRetainData, signalToPattern, testInTransaction, truncateAllTables, unlinkAllWorkspacesForUser, unlinkWorkspace, updateCapabilities, updateOrganization, updatePatternEmbedding, updatePurchase, updateUser, updateWorkspaceTier } from './chunk-ASGZ5B6C.js';
3
+ export { closeRedis, getRedisClient, initializeRedis, isRedisAvailable } from './chunk-IVHUBLJD.js';
4
+ import './chunk-A3QSZJPD.js';
5
+ import './chunk-GOYL3F4T.js';
6
+ export { TOPUP_PACKS, account, activationCodeRedemptions, activationCodes, adminAuditLog, adminEmailSends, adminTierChanges, agentSuggestions, aiChanges, aiChangesRelations, analysisEvents, apiKeyMetadata, apiKeyUsage, apiKeys, apiUsage, apiUsageLogs, burnInviteCode, checkDatabaseConnection, clientTokens, combinedSchema, creditJobTypeEnum, creditTopups, creditTransactionStatusEnum, creditTransactionTypeEnum, creditsLedger, db, deviceTrials, emailDeliveries, emailPreferences, extensionSessions, featureUsage, feedback, fileSnapshotSessions, fingerprints, getTopupPackDetails, inviteCodes, isValidPackSize, leads, loops, mcpActivityEvents, mcpAggregatedLearnings, mcpSessions, member, newsletterSubscribers, orgDailyMetrics, organization, pendingApiKeys, pioneerCodeStatusEnum, pioneerCodes, pioneerRedemptions, pioneers, policyEvaluations, pool, postAcceptOutcomes, purchase, rateLimitViolations, responseCache, retentionConfig, rollbackEvents, ruleViolations, scheduledEmails, postgres_exports as schema, securityEvents, snapshotFiles, snapshots, subscriptions, superAdmins, telemetryDailyStats, telemetryEvents, telemetryIdempotencyKeys, telemetryOutbox, topupStatusEnum, usageLimits, user, userProductMetrics, userSafetyProfiles, vrekoSchema, waitlist, waitlistAuditLogs, waitlistReferrals, waitlistTasks } from './chunk-Z55UGM6X.js';
7
+ import './chunk-WZEZLVOW.js';
8
+ import './chunk-KJWKY4L4.js';
9
+ import './chunk-VTSNRV3V.js';
10
+ import './chunk-EWOJGXRX.js';
11
+
12
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
13
+ //# sourceMappingURL=dist-2KWBZFLA.js.map
14
+ //# sourceMappingURL=dist-2KWBZFLA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"dist-2KWBZFLA.js"}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ export { createManagedMetadata, detectAIClients, detectMCPProcesses, detectWorkspaceConfig, evictCachedPath, getAllCachedPaths, getCachedPath, getClient, getClientConfigPath, getConfigDirWithMigration, getConfiguredClients, getOrCreateIdentity, getServerKey, getVrekoConfigDir, getVrekoMCPConfig, injectWorkspacePath, isCommandExecutable2 as isCommandExecutable, isOwnedByThisInstall, isVrekoMCPRunning, patchApiKeyInClientConfig, readClientConfig, removeVrekoConfig, repairClientConfig, resetIdentityCache, resolveNodePath, resolveVrekoBinaryPath, setCachedPath, validateClientConfig, validateConfig, validateWorkspacePath, writeClientConfig } from './chunk-MJVY2XUN.js';
3
+ import './chunk-EWOJGXRX.js';
4
+
5
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
6
+ //# sourceMappingURL=dist-5ZYKNNU3.js.map
7
+ //# sourceMappingURL=dist-5ZYKNNU3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"dist-5ZYKNNU3.js"}
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ export { AgentAction, AgentRole, AgentSession, AnalyticsEvents, CORRELATION_ANALYSES, CORRELATION_COHORTS, KEY_METRIC_ALERTS, OTelInstrumentationProvider, RETENTION_COHORTS, TelemetryClient, addSentryBreadcrumb, attributionChain, captureError, captureMessage, checkDatabaseConnection, checkErrorBudget, checkHttpService, checkRedisConnection, clearSentryUser, conductorSessionInsights, createAlert, createCohort, createGracefulShutdown, createHealthCheck, createSentryMiddleware, decisionsWithSkips, deleteAlert, deleteCohort, detectSurface, drainAndCloseServer, emitPhaseEvent, emitRatchetScores, failedGatesInLastNRuns, flushSentry, gatesFailingFirstAttempt, getAlerts, getAnalyticsEnv, getAnalyticsSuperProperties, getCohort, getCohortMembers, getCohorts, getCorrelationAnalysis, getDeploymentEnv, getEnvironmentInfo, getErrorRate, getMetrics, gitCommitsWithoutProvenance, initSentry, isDevelopment, isProduction, neon_exports as neon, performCorrelationAnalysis, preStopDelay, prometheus_exports as prometheus, recordAction, recordDecision, recordError, recordGate, recordSuccess, registerKeyMetricAlerts, resetMetrics, setSentryUser, startSentryTransaction, toggleAlert, updateCohort, validateMetadata } from './chunk-A3QSZJPD.js';
3
+ export { cache_exports as cache, logger, makeWatcher, resiliency_exports as resiliency } from './chunk-GOYL3F4T.js';
4
+ export { LogLevel, NoOpInstrumentationProvider } from './chunk-WZEZLVOW.js';
5
+ import './chunk-KJWKY4L4.js';
6
+ import './chunk-VTSNRV3V.js';
7
+ import './chunk-EWOJGXRX.js';
8
+
9
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
10
+ //# sourceMappingURL=dist-CP3RFHPI.js.map
11
+ //# sourceMappingURL=dist-CP3RFHPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"dist-CP3RFHPI.js"}
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import { cliState } from './chunk-GRMRYWYS.js';
3
+ import { __name } from './chunk-EWOJGXRX.js';
4
+
5
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
6
+
7
+ // src/ui/gecko/index.ts
8
+ var geckoRenderFn = null;
9
+ var geckoClearSeq = null;
10
+ var resizeTimer;
11
+ process.on("SIGWINCH", () => {
12
+ clearTimeout(resizeTimer);
13
+ resizeTimer = setTimeout(() => {
14
+ if (geckoRenderFn && geckoClearSeq) {
15
+ process.stdout.write(geckoClearSeq);
16
+ process.stdout.write(geckoRenderFn());
17
+ }
18
+ }, 16);
19
+ });
20
+ function computeClearSequence(output) {
21
+ const lines = output.split("\n").filter((_, i, arr) => i < arr.length - 1 || arr[arr.length - 1] !== "");
22
+ const count = lines.length;
23
+ if (count === 0) return "";
24
+ let seq = "";
25
+ for (let i = 0; i < count; i++) {
26
+ seq += "\x1B[2K";
27
+ if (i < count - 1) seq += "\x1B[1A";
28
+ }
29
+ seq += "\r";
30
+ return seq;
31
+ }
32
+ __name(computeClearSequence, "computeClearSequence");
33
+ function detectOverlayCapability() {
34
+ if (!process.stdout.isTTY) return "none";
35
+ if (process.env.CI) return "none";
36
+ if (cliState.renderMode !== "ink") return "none";
37
+ return "unicode";
38
+ }
39
+ __name(detectOverlayCapability, "detectOverlayCapability");
40
+ function renderGeckoArt(capability) {
41
+ if (capability === "none") return "";
42
+ return " \u2584\u2580\u2580\u2580\u2580\u2584 vreko\n(\xB4 \xB7 \xB7`) protecting your code\n | |\n \u02DA \u02DA\n";
43
+ }
44
+ __name(renderGeckoArt, "renderGeckoArt");
45
+ function writeGeckoOverlay(renderFn) {
46
+ geckoRenderFn = renderFn;
47
+ const output = renderFn();
48
+ if (!output) return;
49
+ geckoClearSeq = computeClearSequence(output);
50
+ process.stdout.write(output);
51
+ }
52
+ __name(writeGeckoOverlay, "writeGeckoOverlay");
53
+
54
+ export { detectOverlayCapability, renderGeckoArt, writeGeckoOverlay };
55
+ //# sourceMappingURL=gecko-53ITAGG6.js.map
56
+ //# sourceMappingURL=gecko-53ITAGG6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/gecko/index.ts"],"names":["geckoRenderFn","geckoClearSeq","resizeTimer","process","on","clearTimeout","setTimeout","stdout","write","computeClearSequence","output","lines","split","filter","_","i","arr","length","count","seq","detectOverlayCapability","isTTY","env","CI","cliState","renderMode","renderGeckoArt","capability","writeGeckoOverlay","renderFn"],"mappings":";;;;;;;AAwBA,IAAIA,aAAAA,GAAuC,IAAA;AAC3C,IAAIC,aAAAA,GAA+B,IAAA;AACnC,IAAIC,WAAAA;AAMJC,OAAAA,CAAQC,EAAAA,CAAG,YAAY,MAAA;AACtBC,EAAAA,YAAAA,CAAaH,WAAAA,CAAAA;AACbA,EAAAA,WAAAA,GAAcI,WAAW,MAAA;AACxB,IAAA,IAAIN,iBAAiBC,aAAAA,EAAe;AACnCE,MAAAA,OAAAA,CAAQI,MAAAA,CAAOC,MAAMP,aAAAA,CAAAA;AACrBE,MAAAA,OAAAA,CAAQI,MAAAA,CAAOC,KAAAA,CAAMR,aAAAA,EAAAA,CAAAA;AACtB,IAAA;AACD,EAAA,CAAA,EAAG,EAAA,CAAA;AACJ,CAAA,CAAA;AAUA,SAASS,qBAAqBC,MAAAA,EAAc;AAC3C,EAAA,MAAMC,QAAQD,MAAAA,CAAOE,KAAAA,CAAM,IAAA,CAAA,CAAMC,MAAAA,CAAO,CAACC,CAAAA,EAAGC,CAAAA,EAAGC,QAAQD,CAAAA,GAAIC,GAAAA,CAAIC,SAAS,CAAA,IAAKD,GAAAA,CAAIA,IAAIC,MAAAA,GAAS,CAAA,MAAO,EAAA,CAAA;AACrG,EAAA,MAAMC,QAAQP,KAAAA,CAAMM,MAAAA;AACpB,EAAA,IAAIC,KAAAA,KAAU,GAAG,OAAO,EAAA;AACxB,EAAA,IAAIC,GAAAA,GAAM,EAAA;AACV,EAAA,KAAA,IAASJ,CAAAA,GAAI,CAAA,EAAGA,CAAAA,GAAIG,KAAAA,EAAOH,CAAAA,EAAAA,EAAK;AAC/BI,IAAAA,GAAAA,IAAO,SAAA;AACP,IAAA,IAAIJ,CAAAA,GAAIG,KAAAA,GAAQ,CAAA,EAAGC,GAAAA,IAAO,SAAA;AAC3B,EAAA;AACAA,EAAAA,GAAAA,IAAO,IAAA;AACP,EAAA,OAAOA,GAAAA;AACR;AAXSV,MAAAA,CAAAA,oBAAAA,EAAAA,sBAAAA,CAAAA;AA4BF,SAASW,uBAAAA,GAAAA;AACf,EAAA,IAAI,CAACjB,OAAAA,CAAQI,MAAAA,CAAOc,KAAAA,EAAO,OAAO,MAAA;AAClC,EAAA,IAAIlB,OAAAA,CAAQmB,GAAAA,CAAIC,EAAAA,EAAI,OAAO,MAAA;AAC3B,EAAA,IAAIC,QAAAA,CAASC,UAAAA,KAAe,KAAA,EAAO,OAAO,MAAA;AAC1C,EAAA,OAAO,SAAA;AACR;AALgBL,MAAAA,CAAAA,uBAAAA,EAAAA,yBAAAA,CAAAA;AAWT,SAASM,eAAeC,UAAAA,EAA6B;AAC3D,EAAA,IAAIA,UAAAA,KAAe,QAAQ,OAAO,EAAA;AAClC,EAAA,OAAO,mHAAA;AACR;AAHgBD,MAAAA,CAAAA,cAAAA,EAAAA,gBAAAA,CAAAA;AAYT,SAASE,kBAAkBC,QAAAA,EAAsB;AACvD7B,EAAAA,aAAAA,GAAgB6B,QAAAA;AAChB,EAAA,MAAMnB,SAASmB,QAAAA,EAAAA;AACf,EAAA,IAAI,CAACnB,MAAAA,EAAQ;AACbT,EAAAA,aAAAA,GAAgBQ,qBAAqBC,MAAAA,CAAAA;AACrCP,EAAAA,OAAAA,CAAQI,MAAAA,CAAOC,MAAME,MAAAA,CAAAA;AACtB;AANgBkB,MAAAA,CAAAA,iBAAAA,EAAAA,mBAAAA,CAAAA","file":"gecko-53ITAGG6.js","sourcesContent":["/**\n * Gecko Overlay - terminal capability detection and Unicode art rendering.\n *\n * detectOverlayCapability() probes environment for graphics protocol support.\n * writeGeckoOverlay() writes the 4-line gecko art before Ink render().\n * SIGWINCH handler re-renders on terminal resize with 16ms debounce.\n *\n * Phase 32 delivers \"unicode\" and \"none\" only. Kitty/sixel detection is deferred.\n *\n * @module ui/gecko\n */\n\nimport { cliState } from \"../../cli-state.js\";\n\n// =============================================================================\n// TYPES\n// =============================================================================\n\nexport type OverlayCapability = \"kitty\" | \"sixel\" | \"unicode\" | \"none\";\n\n// =============================================================================\n// MODULE-LEVEL MUTABLE STATE\n// =============================================================================\n\nlet geckoRenderFn: (() => string) | null = null;\nlet geckoClearSeq: string | null = null;\nlet resizeTimer: NodeJS.Timeout | undefined;\n\n// =============================================================================\n// SIGWINCH HANDLER - registered at module load time\n// =============================================================================\n\nprocess.on(\"SIGWINCH\", () => {\n\tclearTimeout(resizeTimer);\n\tresizeTimer = setTimeout(() => {\n\t\tif (geckoRenderFn && geckoClearSeq) {\n\t\t\tprocess.stdout.write(geckoClearSeq);\n\t\t\tprocess.stdout.write(geckoRenderFn());\n\t\t}\n\t}, 16);\n});\n\n// =============================================================================\n// PRIVATE HELPERS\n// =============================================================================\n\n/**\n * Compute the ANSI escape sequence to erase N lines of output.\n * Leaves cursor at the start (column 0) of the first erased line.\n */\nfunction computeClearSequence(output: string): string {\n\tconst lines = output.split(\"\\n\").filter((_, i, arr) => i < arr.length - 1 || arr[arr.length - 1] !== \"\");\n\tconst count = lines.length;\n\tif (count === 0) return \"\";\n\tlet seq = \"\";\n\tfor (let i = 0; i < count; i++) {\n\t\tseq += \"\\x1b[2K\"; // erase current line\n\t\tif (i < count - 1) seq += \"\\x1b[1A\"; // move up\n\t}\n\tseq += \"\\r\"; // carriage return\n\treturn seq;\n}\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\n\n/**\n * Detect the terminal overlay capability for the current environment.\n *\n * Priority order:\n * 1. !isTTY → \"none\"\n * 2. CI → \"none\"\n * 3. renderMode !== \"ink\" → \"none\"\n * 4. Otherwise → \"unicode\"\n *\n * Kitty and sixel protocol detection is deferred to a future phase.\n */\nexport function detectOverlayCapability(): OverlayCapability {\n\tif (!process.stdout.isTTY) return \"none\";\n\tif (process.env.CI) return \"none\";\n\tif (cliState.renderMode !== \"ink\") return \"none\";\n\treturn \"unicode\";\n}\n\n/**\n * Render the 4-line gecko art as a string.\n * Returns an empty string when capability is \"none\".\n */\nexport function renderGeckoArt(capability: OverlayCapability): string {\n\tif (capability === \"none\") return \"\";\n\treturn \" ▄▀▀▀▀▄ vreko\\n(´ · ·`) protecting your code\\n | |\\n ˚ ˚\\n\";\n}\n\n/**\n * Write the gecko art overlay to stdout and set up the SIGWINCH replay state.\n *\n * Stores renderFn and the computed clear sequence at module level so the\n * SIGWINCH handler can re-render on terminal resize. Write is best-effort -\n * no try/catch; TUI must still mount even if stdout.write fails.\n */\nexport function writeGeckoOverlay(renderFn: () => string): void {\n\tgeckoRenderFn = renderFn;\n\tconst output = renderFn();\n\tif (!output) return;\n\tgeckoClearSeq = computeClearSequence(output);\n\tprocess.stdout.write(output);\n}\n"]}
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ export { TerminalCapabilities, detectCapabilities, getRenderMode, isInteractive, supportsColor, termWidth, visual } from './chunk-H7773ONB.js';
3
+ import './chunk-EWOJGXRX.js';
4
+
5
+ process.env.VREKO_CLI='true';process.env.NODE_NO_WARNINGS='1';
6
+ //# sourceMappingURL=guards-QAFC64NO.js.map
7
+ //# sourceMappingURL=guards-QAFC64NO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"guards-QAFC64NO.js"}