@claude-collective/cli 0.2.0 → 0.8.0
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/CHANGELOG.md +178 -0
- package/README.md +1 -1
- package/dist/chunk-3HBTELJN.js +114 -0
- package/dist/chunk-3HBTELJN.js.map +1 -0
- package/dist/chunk-3ZCB5K33.js +54 -0
- package/dist/chunk-3ZCB5K33.js.map +1 -0
- package/dist/chunk-66UDJBF6.js +96 -0
- package/dist/chunk-66UDJBF6.js.map +1 -0
- package/dist/chunk-6LS7XO3H.js +31 -0
- package/dist/chunk-6LS7XO3H.js.map +1 -0
- package/dist/chunk-A3J6IAXK.js +57 -0
- package/dist/chunk-A3J6IAXK.js.map +1 -0
- package/dist/chunk-A65SBAAJ.js +69 -0
- package/dist/chunk-A65SBAAJ.js.map +1 -0
- package/dist/chunk-ALEPJ6YN.js +80 -0
- package/dist/chunk-ALEPJ6YN.js.map +1 -0
- package/dist/chunk-C4ZTIYFR.js +84 -0
- package/dist/chunk-C4ZTIYFR.js.map +1 -0
- package/dist/chunk-CIY5UBRB.js +453 -0
- package/dist/chunk-CIY5UBRB.js.map +1 -0
- package/dist/chunk-DHET7RCE.js +50 -0
- package/dist/chunk-DHET7RCE.js.map +1 -0
- package/dist/chunk-DHFFRMF6.js +31 -0
- package/dist/chunk-DHFFRMF6.js.map +1 -0
- package/dist/chunk-DKGL77IY.js +307 -0
- package/dist/chunk-DKGL77IY.js.map +1 -0
- package/dist/chunk-ED73HCW2.js +315 -0
- package/dist/chunk-ED73HCW2.js.map +1 -0
- package/dist/chunk-FNOYEXUE.js +308 -0
- package/dist/chunk-FNOYEXUE.js.map +1 -0
- package/dist/chunk-G2FBJOZG.js +141 -0
- package/dist/chunk-G2FBJOZG.js.map +1 -0
- package/dist/chunk-HNDT5QRB.js +120 -0
- package/dist/chunk-HNDT5QRB.js.map +1 -0
- package/dist/chunk-K7PTOVX4.js +158 -0
- package/dist/chunk-K7PTOVX4.js.map +1 -0
- package/dist/chunk-LQTST4WY.js +91 -0
- package/dist/chunk-LQTST4WY.js.map +1 -0
- package/dist/chunk-LVKRVFYR.js +54 -0
- package/dist/chunk-LVKRVFYR.js.map +1 -0
- package/dist/chunk-M7YCPFIX.js +108 -0
- package/dist/chunk-M7YCPFIX.js.map +1 -0
- package/dist/chunk-MJSFR562.js +57 -0
- package/dist/chunk-MJSFR562.js.map +1 -0
- package/dist/chunk-MMDXNZPF.js +69 -0
- package/dist/chunk-MMDXNZPF.js.map +1 -0
- package/dist/chunk-MYAVQ23U.js +356 -0
- package/dist/chunk-MYAVQ23U.js.map +1 -0
- package/dist/chunk-NGBFJJ7Q.js +124 -0
- package/dist/chunk-NGBFJJ7Q.js.map +1 -0
- package/dist/chunk-OLBOTK3O.js +64 -0
- package/dist/chunk-OLBOTK3O.js.map +1 -0
- package/dist/chunk-PPNTD5LO.js +330 -0
- package/dist/chunk-PPNTD5LO.js.map +1 -0
- package/dist/chunk-Q2LH2DAB.js +392 -0
- package/dist/chunk-Q2LH2DAB.js.map +1 -0
- package/dist/chunk-Q6DR5QUH.js +547 -0
- package/dist/chunk-Q6DR5QUH.js.map +1 -0
- package/dist/chunk-QESUUPOE.js +241 -0
- package/dist/chunk-QESUUPOE.js.map +1 -0
- package/dist/chunk-QGGSLMO3.js +607 -0
- package/dist/chunk-QGGSLMO3.js.map +1 -0
- package/dist/chunk-SEBPPFUW.js +478 -0
- package/dist/chunk-SEBPPFUW.js.map +1 -0
- package/dist/chunk-SYQ7R2JO.js +95 -0
- package/dist/chunk-SYQ7R2JO.js.map +1 -0
- package/dist/chunk-TOPAIL5W.js +22 -0
- package/dist/chunk-TOPAIL5W.js.map +1 -0
- package/dist/chunk-U4VYHKPM.js +110 -0
- package/dist/chunk-U4VYHKPM.js.map +1 -0
- package/dist/chunk-UOWHJ6BE.js +83 -0
- package/dist/chunk-UOWHJ6BE.js.map +1 -0
- package/dist/chunk-XKEG3SCV.js +86 -0
- package/dist/chunk-XKEG3SCV.js.map +1 -0
- package/dist/chunk-XY3XDVMI.js +15599 -0
- package/dist/chunk-XY3XDVMI.js.map +1 -0
- package/dist/chunk-Y3V43XCU.js +76 -0
- package/dist/chunk-Y3V43XCU.js.map +1 -0
- package/dist/chunk-YKXBGCFD.js +129 -0
- package/dist/chunk-YKXBGCFD.js.map +1 -0
- package/dist/cli-v2/defaults/agent-mappings.yaml +185 -0
- package/dist/commands/build/marketplace.js +254 -0
- package/dist/commands/build/marketplace.js.map +1 -0
- package/dist/commands/build/plugins.js +324 -0
- package/dist/commands/build/plugins.js.map +1 -0
- package/dist/commands/build/stack.js +169 -0
- package/dist/commands/build/stack.js.map +1 -0
- package/dist/commands/compile.js +461 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/config/get.js +60 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/index.js +22 -0
- package/dist/commands/config/index.js.map +1 -0
- package/dist/commands/config/path.js +35 -0
- package/dist/commands/config/path.js.map +1 -0
- package/dist/commands/config/set-project.js +61 -0
- package/dist/commands/config/set-project.js.map +1 -0
- package/dist/commands/config/set.js +60 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/config/show.js +13 -0
- package/dist/commands/config/show.js.map +1 -0
- package/dist/commands/config/unset-project.js +57 -0
- package/dist/commands/config/unset-project.js.map +1 -0
- package/dist/commands/config/unset.js +56 -0
- package/dist/commands/config/unset.js.map +1 -0
- package/dist/commands/diff.js +755 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.js +413 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/edit.js +254 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/eject.js +208 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/info.js +205 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.js +915 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.js +44 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new/agent.js +230 -0
- package/dist/commands/new/agent.js.map +1 -0
- package/dist/commands/new/skill.js +204 -0
- package/dist/commands/new/skill.js.map +1 -0
- package/dist/commands/outdated.js +242 -0
- package/dist/commands/outdated.js.map +1 -0
- package/dist/commands/search.js +115 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/test-imports.js +92 -0
- package/dist/commands/test-imports.js.map +1 -0
- package/dist/commands/uninstall.js +309 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.js +428 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.js +375 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/commands/version/bump.js +95 -0
- package/dist/commands/version/bump.js.map +1 -0
- package/dist/commands/version/index.js +70 -0
- package/dist/commands/version/index.js.map +1 -0
- package/dist/commands/version/set.js +101 -0
- package/dist/commands/version/set.js.map +1 -0
- package/dist/commands/version/show.js +70 -0
- package/dist/commands/version/show.js.map +1 -0
- package/dist/components/common/confirm.js +9 -0
- package/dist/components/common/confirm.js.map +1 -0
- package/dist/components/common/message.js +24 -0
- package/dist/components/common/message.js.map +1 -0
- package/dist/components/common/spinner.js +14 -0
- package/dist/components/common/spinner.js.map +1 -0
- package/dist/components/wizard/category-grid.js +9 -0
- package/dist/components/wizard/category-grid.js.map +1 -0
- package/dist/components/wizard/category-grid.test.js +728 -0
- package/dist/components/wizard/category-grid.test.js.map +1 -0
- package/dist/components/wizard/section-progress.js +9 -0
- package/dist/components/wizard/section-progress.js.map +1 -0
- package/dist/components/wizard/section-progress.test.js +281 -0
- package/dist/components/wizard/section-progress.test.js.map +1 -0
- package/dist/components/wizard/step-approach.js +11 -0
- package/dist/components/wizard/step-approach.js.map +1 -0
- package/dist/components/wizard/step-build.js +15 -0
- package/dist/components/wizard/step-build.js.map +1 -0
- package/dist/components/wizard/step-build.test.js +729 -0
- package/dist/components/wizard/step-build.test.js.map +1 -0
- package/dist/components/wizard/step-confirm.js +9 -0
- package/dist/components/wizard/step-confirm.js.map +1 -0
- package/dist/components/wizard/step-refine.js +9 -0
- package/dist/components/wizard/step-refine.js.map +1 -0
- package/dist/components/wizard/step-refine.test.js +235 -0
- package/dist/components/wizard/step-refine.test.js.map +1 -0
- package/dist/components/wizard/step-stack-options.js +11 -0
- package/dist/components/wizard/step-stack-options.js.map +1 -0
- package/dist/components/wizard/step-stack.js +11 -0
- package/dist/components/wizard/step-stack.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.js +11 -0
- package/dist/components/wizard/wizard-tabs.js.map +1 -0
- package/dist/components/wizard/wizard.js +20 -0
- package/dist/components/wizard/wizard.js.map +1 -0
- package/dist/hooks/init.js +41 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/magic-string.es-RGXYGAW3.js +1316 -0
- package/dist/magic-string.es-RGXYGAW3.js.map +1 -0
- package/dist/stores/wizard-store.js +10 -0
- package/dist/stores/wizard-store.js.map +1 -0
- package/dist/stores/wizard-store.test.js +405 -0
- package/dist/stores/wizard-store.test.js.map +1 -0
- package/package.json +44 -25
- package/dist/cli/index.js +0 -6314
- package/dist/cli/index.js.map +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/lib/exit-codes.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var EXIT_CODES = {
|
|
9
|
+
/** Operation completed successfully */
|
|
10
|
+
SUCCESS: 0,
|
|
11
|
+
/** General error - operation failed */
|
|
12
|
+
ERROR: 1,
|
|
13
|
+
/** Invalid command-line arguments or options */
|
|
14
|
+
INVALID_ARGS: 2,
|
|
15
|
+
/** Network request failed (connection, timeout, etc.) */
|
|
16
|
+
NETWORK_ERROR: 3,
|
|
17
|
+
/** User cancelled the operation (Ctrl+C or prompt cancel) */
|
|
18
|
+
CANCELLED: 4
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// src/cli-v2/base-command.ts
|
|
22
|
+
init_esm_shims();
|
|
23
|
+
import { Command, Flags } from "@oclif/core";
|
|
24
|
+
var BaseCommand = class extends Command {
|
|
25
|
+
/**
|
|
26
|
+
* Base flags available to all commands.
|
|
27
|
+
* Commands should merge these with their own flags using spread syntax.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* static flags = {
|
|
31
|
+
* ...BaseCommand.baseFlags,
|
|
32
|
+
* myFlag: Flags.string({ description: "My custom flag" }),
|
|
33
|
+
* };
|
|
34
|
+
*/
|
|
35
|
+
static baseFlags = {
|
|
36
|
+
"dry-run": Flags.boolean({
|
|
37
|
+
description: "Preview operations without executing",
|
|
38
|
+
default: false
|
|
39
|
+
}),
|
|
40
|
+
source: Flags.string({
|
|
41
|
+
char: "s",
|
|
42
|
+
description: "Skills source path or URL",
|
|
43
|
+
required: false
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Loaded configuration - set by init hook and stored in config object.
|
|
48
|
+
* Available after command initialization.
|
|
49
|
+
*/
|
|
50
|
+
get sourceConfig() {
|
|
51
|
+
return this.config.sourceConfig;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Handle errors with proper exit codes.
|
|
55
|
+
* Logs the error message and exits the process.
|
|
56
|
+
*
|
|
57
|
+
* @param error - The error to handle
|
|
58
|
+
* @returns Never returns (exits process)
|
|
59
|
+
*/
|
|
60
|
+
handleError(error) {
|
|
61
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
62
|
+
this.error(message, { exit: EXIT_CODES.ERROR });
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Log a success message with a green checkmark.
|
|
66
|
+
*
|
|
67
|
+
* @param message - The success message to display
|
|
68
|
+
*/
|
|
69
|
+
logSuccess(message) {
|
|
70
|
+
this.log(`\u2713 ${message}`);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Log a warning message.
|
|
74
|
+
* Uses oclif's warn method which outputs to stderr.
|
|
75
|
+
*
|
|
76
|
+
* @param message - The warning message to display
|
|
77
|
+
*/
|
|
78
|
+
logWarning(message) {
|
|
79
|
+
this.warn(message);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Log an informational message.
|
|
83
|
+
*
|
|
84
|
+
* @param message - The info message to display
|
|
85
|
+
*/
|
|
86
|
+
logInfo(message) {
|
|
87
|
+
this.log(message);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
EXIT_CODES,
|
|
93
|
+
BaseCommand
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=chunk-SYQ7R2JO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/lib/exit-codes.ts","../src/cli-v2/base-command.ts"],"sourcesContent":["/**\n * CLI exit codes for standardized process termination.\n *\n * These follow Unix conventions where 0 = success, non-zero = error.\n * Use named constants instead of magic numbers for clarity and consistency.\n */\nexport const EXIT_CODES = {\n /** Operation completed successfully */\n SUCCESS: 0,\n /** General error - operation failed */\n ERROR: 1,\n /** Invalid command-line arguments or options */\n INVALID_ARGS: 2,\n /** Network request failed (connection, timeout, etc.) */\n NETWORK_ERROR: 3,\n /** User cancelled the operation (Ctrl+C or prompt cancel) */\n CANCELLED: 4,\n} as const;\n\nexport type ExitCode = (typeof EXIT_CODES)[keyof typeof EXIT_CODES];\n","/**\n * Base command class for all oclif commands in CLI v2.\n *\n * Provides:\n * - Shared flags (--dry-run, --source)\n * - Error handling with proper exit codes\n * - Common logging utilities\n * - Config access (set by init hook)\n */\nimport { Command, Flags } from \"@oclif/core\";\nimport { EXIT_CODES } from \"./lib/exit-codes.js\";\nimport type { ResolvedConfig } from \"./lib/config.js\";\n\nexport abstract class BaseCommand extends Command {\n /**\n * Base flags available to all commands.\n * Commands should merge these with their own flags using spread syntax.\n *\n * @example\n * static flags = {\n * ...BaseCommand.baseFlags,\n * myFlag: Flags.string({ description: \"My custom flag\" }),\n * };\n */\n static baseFlags = {\n \"dry-run\": Flags.boolean({\n description: \"Preview operations without executing\",\n default: false,\n }),\n source: Flags.string({\n char: \"s\",\n description: \"Skills source path or URL\",\n required: false,\n }),\n };\n\n /**\n * Loaded configuration - set by init hook and stored in config object.\n * Available after command initialization.\n */\n public get sourceConfig(): ResolvedConfig | undefined {\n return (this.config as any).sourceConfig;\n }\n\n /**\n * Handle errors with proper exit codes.\n * Logs the error message and exits the process.\n *\n * @param error - The error to handle\n * @returns Never returns (exits process)\n */\n protected handleError(error: unknown): never {\n const message = error instanceof Error ? error.message : String(error);\n this.error(message, { exit: EXIT_CODES.ERROR });\n }\n\n /**\n * Log a success message with a green checkmark.\n *\n * @param message - The success message to display\n */\n protected logSuccess(message: string): void {\n this.log(`✓ ${message}`);\n }\n\n /**\n * Log a warning message.\n * Uses oclif's warn method which outputs to stderr.\n *\n * @param message - The warning message to display\n */\n protected logWarning(message: string): void {\n this.warn(message);\n }\n\n /**\n * Log an informational message.\n *\n * @param message - The info message to display\n */\n protected logInfo(message: string): void {\n this.log(message);\n }\n}\n"],"mappings":";;;;;;AAAA;AAMO,IAAM,aAAa;AAAA;AAAA,EAExB,SAAS;AAAA;AAAA,EAET,OAAO;AAAA;AAAA,EAEP,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA,EAEf,WAAW;AACb;;;ACjBA;AASA,SAAS,SAAS,aAAa;AAIxB,IAAe,cAAf,cAAmC,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWhD,OAAO,YAAY;AAAA,IACjB,WAAW,MAAM,QAAQ;AAAA,MACvB,aAAa;AAAA,MACb,SAAS;AAAA,IACX,CAAC;AAAA,IACD,QAAQ,MAAM,OAAO;AAAA,MACnB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAW,eAA2C;AACpD,WAAQ,KAAK,OAAe;AAAA,EAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASU,YAAY,OAAuB;AAC3C,UAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACrE,SAAK,MAAM,SAAS,EAAE,MAAM,WAAW,MAAM,CAAC;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOU,WAAW,SAAuB;AAC1C,SAAK,IAAI,UAAK,OAAO,EAAE;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQU,WAAW,SAAuB;AAC1C,SAAK,KAAK,OAAO;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOU,QAAQ,SAAuB;AACvC,SAAK,IAAI,OAAO;AAAA,EAClB;AACF;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/utils/logger.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var verboseMode = false;
|
|
9
|
+
function setVerbose(enabled) {
|
|
10
|
+
verboseMode = enabled;
|
|
11
|
+
}
|
|
12
|
+
function verbose(msg) {
|
|
13
|
+
if (verboseMode) {
|
|
14
|
+
console.log(` ${msg}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
setVerbose,
|
|
20
|
+
verbose
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-TOPAIL5W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/utils/logger.ts"],"sourcesContent":["/**\n * Verbose logging utility.\n * Used by lib/ modules that don't have access to oclif command context.\n * In oclif commands, prefer using this.log() instead.\n */\n\nlet verboseMode = false;\n\nexport function setVerbose(enabled: boolean): void {\n verboseMode = enabled;\n}\n\nexport function verbose(msg: string): void {\n if (verboseMode) {\n console.log(` ${msg}`);\n }\n}\n"],"mappings":";;;;;;AAAA;AAMA,IAAI,cAAc;AAEX,SAAS,WAAW,SAAwB;AACjD,gBAAc;AAChB;AAEO,SAAS,QAAQ,KAAmB;AACzC,MAAI,aAAa;AACf,YAAQ,IAAI,KAAK,GAAG,EAAE;AAAA,EACxB;AACF;","names":[]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_SOURCE,
|
|
4
|
+
SOURCE_ENV_VAR,
|
|
5
|
+
formatAgentsSourceOrigin,
|
|
6
|
+
formatSourceOrigin,
|
|
7
|
+
getGlobalConfigPath,
|
|
8
|
+
getProjectConfigPath,
|
|
9
|
+
loadGlobalConfig,
|
|
10
|
+
loadProjectConfig,
|
|
11
|
+
resolveAgentsSource,
|
|
12
|
+
resolveSource
|
|
13
|
+
} from "./chunk-QESUUPOE.js";
|
|
14
|
+
import {
|
|
15
|
+
BaseCommand
|
|
16
|
+
} from "./chunk-SYQ7R2JO.js";
|
|
17
|
+
import {
|
|
18
|
+
init_esm_shims
|
|
19
|
+
} from "./chunk-DHET7RCE.js";
|
|
20
|
+
|
|
21
|
+
// src/cli-v2/commands/config/show.ts
|
|
22
|
+
init_esm_shims();
|
|
23
|
+
var ConfigShow = class _ConfigShow extends BaseCommand {
|
|
24
|
+
static summary = "Show current effective configuration";
|
|
25
|
+
static description = "Display the current effective configuration with all layers (env, project, global, default)";
|
|
26
|
+
static flags = {
|
|
27
|
+
...BaseCommand.baseFlags
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
await this.parse(_ConfigShow);
|
|
31
|
+
const projectDir = process.cwd();
|
|
32
|
+
this.log("\nClaude Collective Configuration\n");
|
|
33
|
+
const resolved = await resolveSource(void 0, projectDir);
|
|
34
|
+
this.log("Source:");
|
|
35
|
+
this.log(` ${resolved.source}`);
|
|
36
|
+
this.log(` (from ${formatSourceOrigin(resolved.sourceOrigin)})`);
|
|
37
|
+
this.log("");
|
|
38
|
+
this.log("Marketplace:");
|
|
39
|
+
if (resolved.marketplace) {
|
|
40
|
+
this.log(` ${resolved.marketplace}`);
|
|
41
|
+
} else {
|
|
42
|
+
this.log(` (not configured)`);
|
|
43
|
+
}
|
|
44
|
+
this.log("");
|
|
45
|
+
const agentsResolved = await resolveAgentsSource(void 0, projectDir);
|
|
46
|
+
this.log("Agents Source:");
|
|
47
|
+
if (agentsResolved.agentsSource) {
|
|
48
|
+
this.log(` ${agentsResolved.agentsSource}`);
|
|
49
|
+
this.log(
|
|
50
|
+
` (from ${formatAgentsSourceOrigin(agentsResolved.agentsSourceOrigin)})`
|
|
51
|
+
);
|
|
52
|
+
} else {
|
|
53
|
+
this.log(` (not configured - using local CLI)`);
|
|
54
|
+
}
|
|
55
|
+
this.log("");
|
|
56
|
+
this.log("Configuration Layers:");
|
|
57
|
+
this.log("");
|
|
58
|
+
const envValue = process.env[SOURCE_ENV_VAR];
|
|
59
|
+
this.log(` 1. Environment (${SOURCE_ENV_VAR}):`);
|
|
60
|
+
if (envValue) {
|
|
61
|
+
this.log(` ${envValue}`);
|
|
62
|
+
} else {
|
|
63
|
+
this.log(` (not set)`);
|
|
64
|
+
}
|
|
65
|
+
const projectConfig = await loadProjectConfig(projectDir);
|
|
66
|
+
const projectConfigPath = getProjectConfigPath(projectDir);
|
|
67
|
+
this.log(` 2. Project config:`);
|
|
68
|
+
this.log(` ${projectConfigPath}`);
|
|
69
|
+
if (projectConfig?.source || projectConfig?.marketplace || projectConfig?.agents_source) {
|
|
70
|
+
if (projectConfig?.source) {
|
|
71
|
+
this.log(` source: ${projectConfig.source}`);
|
|
72
|
+
}
|
|
73
|
+
if (projectConfig?.marketplace) {
|
|
74
|
+
this.log(` marketplace: ${projectConfig.marketplace}`);
|
|
75
|
+
}
|
|
76
|
+
if (projectConfig?.agents_source) {
|
|
77
|
+
this.log(` agents_source: ${projectConfig.agents_source}`);
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
this.log(` (not configured)`);
|
|
81
|
+
}
|
|
82
|
+
const globalConfig = await loadGlobalConfig();
|
|
83
|
+
const globalConfigPath = getGlobalConfigPath();
|
|
84
|
+
this.log(` 3. Global config:`);
|
|
85
|
+
this.log(` ${globalConfigPath}`);
|
|
86
|
+
if (globalConfig?.source || globalConfig?.marketplace || globalConfig?.agents_source) {
|
|
87
|
+
if (globalConfig?.source) {
|
|
88
|
+
this.log(` source: ${globalConfig.source}`);
|
|
89
|
+
}
|
|
90
|
+
if (globalConfig?.marketplace) {
|
|
91
|
+
this.log(` marketplace: ${globalConfig.marketplace}`);
|
|
92
|
+
}
|
|
93
|
+
if (globalConfig?.agents_source) {
|
|
94
|
+
this.log(` agents_source: ${globalConfig.agents_source}`);
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
this.log(` (not configured)`);
|
|
98
|
+
}
|
|
99
|
+
this.log(` 4. Default:`);
|
|
100
|
+
this.log(` ${DEFAULT_SOURCE}`);
|
|
101
|
+
this.log("");
|
|
102
|
+
this.log("Precedence: flag > env > project > global > default");
|
|
103
|
+
this.log("");
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
ConfigShow
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=chunk-U4VYHKPM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/commands/config/show.ts"],"sourcesContent":["import { BaseCommand } from \"../../base-command.js\";\nimport {\n resolveSource,\n resolveAgentsSource,\n loadGlobalConfig,\n loadProjectConfig,\n getGlobalConfigPath,\n getProjectConfigPath,\n formatSourceOrigin,\n formatAgentsSourceOrigin,\n DEFAULT_SOURCE,\n SOURCE_ENV_VAR,\n} from \"../../lib/config.js\";\n\nexport default class ConfigShow extends BaseCommand {\n static summary = \"Show current effective configuration\";\n static description =\n \"Display the current effective configuration with all layers (env, project, global, default)\";\n\n static flags = {\n ...BaseCommand.baseFlags,\n };\n\n async run(): Promise<void> {\n await this.parse(ConfigShow);\n\n const projectDir = process.cwd();\n\n this.log(\"\\nClaude Collective Configuration\\n\");\n\n const resolved = await resolveSource(undefined, projectDir);\n\n this.log(\"Source:\");\n this.log(` ${resolved.source}`);\n this.log(` (from ${formatSourceOrigin(resolved.sourceOrigin)})`);\n this.log(\"\");\n\n this.log(\"Marketplace:\");\n if (resolved.marketplace) {\n this.log(` ${resolved.marketplace}`);\n } else {\n this.log(` (not configured)`);\n }\n this.log(\"\");\n\n const agentsResolved = await resolveAgentsSource(undefined, projectDir);\n this.log(\"Agents Source:\");\n if (agentsResolved.agentsSource) {\n this.log(` ${agentsResolved.agentsSource}`);\n this.log(\n ` (from ${formatAgentsSourceOrigin(agentsResolved.agentsSourceOrigin)})`,\n );\n } else {\n this.log(` (not configured - using local CLI)`);\n }\n this.log(\"\");\n\n this.log(\"Configuration Layers:\");\n this.log(\"\");\n\n const envValue = process.env[SOURCE_ENV_VAR];\n this.log(` 1. Environment (${SOURCE_ENV_VAR}):`);\n if (envValue) {\n this.log(` ${envValue}`);\n } else {\n this.log(` (not set)`);\n }\n\n const projectConfig = await loadProjectConfig(projectDir);\n const projectConfigPath = getProjectConfigPath(projectDir);\n this.log(` 2. Project config:`);\n this.log(` ${projectConfigPath}`);\n if (\n projectConfig?.source ||\n projectConfig?.marketplace ||\n projectConfig?.agents_source\n ) {\n if (projectConfig?.source) {\n this.log(` source: ${projectConfig.source}`);\n }\n if (projectConfig?.marketplace) {\n this.log(` marketplace: ${projectConfig.marketplace}`);\n }\n if (projectConfig?.agents_source) {\n this.log(` agents_source: ${projectConfig.agents_source}`);\n }\n } else {\n this.log(` (not configured)`);\n }\n\n const globalConfig = await loadGlobalConfig();\n const globalConfigPath = getGlobalConfigPath();\n this.log(` 3. Global config:`);\n this.log(` ${globalConfigPath}`);\n if (\n globalConfig?.source ||\n globalConfig?.marketplace ||\n globalConfig?.agents_source\n ) {\n if (globalConfig?.source) {\n this.log(` source: ${globalConfig.source}`);\n }\n if (globalConfig?.marketplace) {\n this.log(` marketplace: ${globalConfig.marketplace}`);\n }\n if (globalConfig?.agents_source) {\n this.log(` agents_source: ${globalConfig.agents_source}`);\n }\n } else {\n this.log(` (not configured)`);\n }\n\n this.log(` 4. Default:`);\n this.log(` ${DEFAULT_SOURCE}`);\n\n this.log(\"\");\n this.log(\"Precedence: flag > env > project > global > default\");\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAcA,IAAqB,aAArB,MAAqB,oBAAmB,YAAY;AAAA,EAClD,OAAO,UAAU;AAAA,EACjB,OAAO,cACL;AAAA,EAEF,OAAO,QAAQ;AAAA,IACb,GAAG,YAAY;AAAA,EACjB;AAAA,EAEA,MAAM,MAAqB;AACzB,UAAM,KAAK,MAAM,WAAU;AAE3B,UAAM,aAAa,QAAQ,IAAI;AAE/B,SAAK,IAAI,qCAAqC;AAE9C,UAAM,WAAW,MAAM,cAAc,QAAW,UAAU;AAE1D,SAAK,IAAI,SAAS;AAClB,SAAK,IAAI,KAAK,SAAS,MAAM,EAAE;AAC/B,SAAK,IAAI,WAAW,mBAAmB,SAAS,YAAY,CAAC,GAAG;AAChE,SAAK,IAAI,EAAE;AAEX,SAAK,IAAI,cAAc;AACvB,QAAI,SAAS,aAAa;AACxB,WAAK,IAAI,KAAK,SAAS,WAAW,EAAE;AAAA,IACtC,OAAO;AACL,WAAK,IAAI,oBAAoB;AAAA,IAC/B;AACA,SAAK,IAAI,EAAE;AAEX,UAAM,iBAAiB,MAAM,oBAAoB,QAAW,UAAU;AACtE,SAAK,IAAI,gBAAgB;AACzB,QAAI,eAAe,cAAc;AAC/B,WAAK,IAAI,KAAK,eAAe,YAAY,E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eAAe;AAC/B,aAAK,IAAI,uBAAuB,aAAa,aAAa,EAAE;AAAA,MAC9D;AAAA,IACF,OAAO;AACL,WAAK,IAAI,uBAAuB;AAAA,IAClC;AAEA,SAAK,IAAI,eAAe;AACxB,SAAK,IAAI,QAAQ,cAAc,EAAE;AAEjC,SAAK,IAAI,EAAE;AACX,SAAK,IAAI,qDAAqD;AAC9D,SAAK,IAAI,EAAE;AAAA,EACb;AACF;","names":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/components/wizard/step-confirm.tsx
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { Box, Text, useInput } from "ink";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var formatDomainName = (domain) => {
|
|
11
|
+
const names = {
|
|
12
|
+
web: "Web",
|
|
13
|
+
api: "API",
|
|
14
|
+
cli: "CLI",
|
|
15
|
+
mobile: "Mobile"
|
|
16
|
+
};
|
|
17
|
+
return names[domain] || domain.charAt(0).toUpperCase() + domain.slice(1);
|
|
18
|
+
};
|
|
19
|
+
var StepConfirm = ({
|
|
20
|
+
matrix,
|
|
21
|
+
onComplete,
|
|
22
|
+
stackName,
|
|
23
|
+
selectedDomains,
|
|
24
|
+
domainSelections,
|
|
25
|
+
technologyCount,
|
|
26
|
+
skillCount,
|
|
27
|
+
installMode,
|
|
28
|
+
onBack
|
|
29
|
+
}) => {
|
|
30
|
+
useInput((input, key) => {
|
|
31
|
+
if (key.return) {
|
|
32
|
+
onComplete();
|
|
33
|
+
}
|
|
34
|
+
if (key.escape && onBack) {
|
|
35
|
+
onBack();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const domainsText = selectedDomains?.map(formatDomainName).join(" + ") || "";
|
|
39
|
+
const title = stackName ? `Ready to install ${stackName}` : `Ready to install your custom stack${domainsText ? ` (${domainsText})` : ""}`;
|
|
40
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: "green", children: title }),
|
|
42
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
43
|
+
domainSelections && selectedDomains && !stackName && /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginBottom: 1, children: selectedDomains.map((domain) => {
|
|
44
|
+
const selections = domainSelections[domain] || {};
|
|
45
|
+
const techs = Object.values(selections).flat();
|
|
46
|
+
if (techs.length === 0) return null;
|
|
47
|
+
return /* @__PURE__ */ jsxs(Text, { children: [
|
|
48
|
+
/* @__PURE__ */ jsxs(Text, { bold: true, children: [
|
|
49
|
+
formatDomainName(domain),
|
|
50
|
+
":"
|
|
51
|
+
] }),
|
|
52
|
+
" ",
|
|
53
|
+
/* @__PURE__ */ jsx(Text, { children: techs.join(", ") })
|
|
54
|
+
] }, domain);
|
|
55
|
+
}) }),
|
|
56
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginY: 1, children: [
|
|
57
|
+
technologyCount !== void 0 && /* @__PURE__ */ jsxs(Text, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Technologies:" }),
|
|
59
|
+
" ",
|
|
60
|
+
/* @__PURE__ */ jsx(Text, { bold: true, children: technologyCount })
|
|
61
|
+
] }),
|
|
62
|
+
skillCount !== void 0 && /* @__PURE__ */ jsxs(Text, { children: [
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Skills:" }),
|
|
64
|
+
" ",
|
|
65
|
+
/* @__PURE__ */ jsx(Text, { bold: true, children: skillCount }),
|
|
66
|
+
" ",
|
|
67
|
+
/* @__PURE__ */ jsx(Text, { color: "green", children: "(all verified)" })
|
|
68
|
+
] }),
|
|
69
|
+
installMode && /* @__PURE__ */ jsxs(Text, { children: [
|
|
70
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "Install mode:" }),
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ jsx(Text, { bold: true, children: installMode === "plugin" ? "Plugin" : "Local" })
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
76
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "ENTER confirm ESC back" })
|
|
77
|
+
] });
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
StepConfirm
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=chunk-UOWHJ6BE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/components/wizard/step-confirm.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box, Text, useInput } from \"ink\";\nimport type { MergedSkillsMatrix } from \"../../types-matrix.js\";\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport interface StepConfirmProps {\n matrix: MergedSkillsMatrix;\n onComplete: () => void;\n stackName?: string;\n selectedDomains?: string[];\n domainSelections?: Record<string, Record<string, string[]>>;\n technologyCount?: number;\n skillCount?: number;\n installMode?: \"plugin\" | \"local\";\n onBack?: () => void;\n}\n\n// =============================================================================\n// Helper Functions\n// =============================================================================\n\n/**\n * Format domain name for display.\n */\nconst formatDomainName = (domain: string): string => {\n const names: Record<string, string> = {\n web: \"Web\",\n api: \"API\",\n cli: \"CLI\",\n mobile: \"Mobile\",\n };\n return names[domain] || domain.charAt(0).toUpperCase() + domain.slice(1);\n};\n\n// =============================================================================\n// Component\n// =============================================================================\n\nexport const StepConfirm: React.FC<StepConfirmProps> = ({\n matrix,\n onComplete,\n stackName,\n selectedDomains,\n domainSelections,\n technologyCount,\n skillCount,\n installMode,\n onBack,\n}) => {\n useInput((input, key) => {\n if (key.return) {\n onComplete();\n }\n if (key.escape && onBack) {\n onBack();\n }\n });\n\n // Build title based on stack vs scratch path\n const domainsText = selectedDomains?.map(formatDomainName).join(\" + \") || \"\";\n const title = stackName\n ? `Ready to install ${stackName}`\n : `Ready to install your custom stack${domainsText ? ` (${domainsText})` : \"\"}`;\n\n return (\n <Box flexDirection=\"column\" paddingX={2}>\n <Text bold color=\"green\">\n {title}\n </Text>\n <Text> </Text>\n\n {/* Domain breakdown (for scratch path) */}\n {domainSelections && selectedDomains && !stackName && (\n <Box flexDirection=\"column\" marginBottom={1}>\n {selectedDomains.map((domain) => {\n const selections = domainSelections[domain] || {};\n const techs = Object.values(selections).flat();\n if (techs.length === 0) return null;\n return (\n <Text key={domain}>\n <Text bold>{formatDomainName(domain)}:</Text>{\" \"}\n <Text>{techs.join(\", \")}</Text>\n </Text>\n );\n })}\n </Box>\n )}\n\n {/* Summary stats */}\n <Box flexDirection=\"column\" marginY={1}>\n {technologyCount !== undefined && (\n <Text>\n <Text dimColor>Technologies:</Text>{\" \"}\n <Text bold>{technologyCount}</Text>\n </Text>\n )}\n {skillCount !== undefined && (\n <Text>\n <Text dimColor>Skills:</Text> <Text bold>{skillCount}</Text>{\" \"}\n <Text color=\"green\">(all verified)</Text>\n </Text>\n )}\n {installMode && (\n <Text>\n <Text dimColor>Install mode:</Text>{\" \"}\n <Text bold>{installMode === \"plugin\" ? \"Plugin\" : \"Local\"}</Text>\n </Text>\n )}\n </Box>\n\n <Text> </Text>\n <Text dimColor>ENTER confirm ESC back</Text>\n </Box>\n );\n};\n"],"mappings":";;;;;;AAAA;AACA,SAAS,KAAK,MAAM,gBAAgB;AAoE9B,cAcU,YAdV;AA1CN,IAAM,mBAAmB,CAAC,WAA2B;AACnD,QAAM,QAAgC;AAAA,IACpC,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,QAAQ;AAAA,EACV;AACA,SAAO,MAAM,MAAM,KAAK,OAAO,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC;AACzE;AAMO,IAAM,cAA0C,CAAC;AAAA,EACtD;AAAA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AAA,QAAO;AAAA,QAAC,oBAAC,QAAK,MAAI,MAAE,sBAAW;AAAA,QAAQ;AAAA,QAC7D,oBAAC,QAAK,OAAM,SAAQ,4BAAc;AAAA,SACpC;AAAA,MAED,eACC,qBAAC,QACC;AAAA,4BAAC,QAAK,UAAQ,MAAC,2BAAa;AAAA,QAAQ;AAAA,QACpC,oBAAC,QAAK,MAAI,MAAE,0BAAgB,WAAW,WAAW,SAAQ;AAAA,SAC5D;AAAA,OAEJ;AAAA,IAEA,oBAAC,QAAK,eAAC;AAAA,IACP,oBAAC,QAAK,UAAQ,MAAC,oCAAsB;AAAA,KACvC;AAEJ;","names":[]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
useWizardStore
|
|
4
|
+
} from "./chunk-K7PTOVX4.js";
|
|
5
|
+
import {
|
|
6
|
+
init_esm_shims
|
|
7
|
+
} from "./chunk-DHET7RCE.js";
|
|
8
|
+
|
|
9
|
+
// src/cli-v2/components/wizard/step-approach.tsx
|
|
10
|
+
init_esm_shims();
|
|
11
|
+
import { Box, Text } from "ink";
|
|
12
|
+
import { Select } from "@inkjs/ui";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var EXPERT_MODE_VALUE = "__expert_mode__";
|
|
15
|
+
var INSTALL_MODE_VALUE = "__install_mode__";
|
|
16
|
+
var StepApproach = () => {
|
|
17
|
+
const {
|
|
18
|
+
expertMode,
|
|
19
|
+
installMode,
|
|
20
|
+
toggleExpertMode,
|
|
21
|
+
toggleInstallMode,
|
|
22
|
+
setStep,
|
|
23
|
+
setApproach
|
|
24
|
+
} = useWizardStore();
|
|
25
|
+
const options = [
|
|
26
|
+
{
|
|
27
|
+
value: "stack",
|
|
28
|
+
label: "Use a pre-built template"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "scratch",
|
|
32
|
+
label: "Start from scratch"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: EXPERT_MODE_VALUE,
|
|
36
|
+
label: expertMode ? "Expert Mode: ON" : "Expert Mode: OFF"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: INSTALL_MODE_VALUE,
|
|
40
|
+
label: installMode === "local" ? "Install Mode: Local" : "Install Mode: Plugin"
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
const handleSelect = (value) => {
|
|
44
|
+
if (value === EXPERT_MODE_VALUE) {
|
|
45
|
+
toggleExpertMode();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (value === INSTALL_MODE_VALUE) {
|
|
49
|
+
toggleInstallMode();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (value === "stack") {
|
|
53
|
+
setApproach("stack");
|
|
54
|
+
setStep("stack");
|
|
55
|
+
} else if (value === "scratch") {
|
|
56
|
+
setApproach("scratch");
|
|
57
|
+
setStep("stack");
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
61
|
+
/* @__PURE__ */ jsxs(Box, { marginBottom: 1, flexDirection: "column", children: [
|
|
62
|
+
expertMode && /* @__PURE__ */ jsxs(Text, { color: "yellow", children: [
|
|
63
|
+
"Expert Mode is ON ",
|
|
64
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "- conflict checking disabled" })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ jsxs(Text, { color: "cyan", children: [
|
|
67
|
+
"Install Mode: ",
|
|
68
|
+
installMode === "plugin" ? "Plugin" : "Local",
|
|
69
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: installMode === "plugin" ? " - native Claude plugins" : " - copy to .claude/skills/" })
|
|
70
|
+
] })
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ jsx(Text, { children: "How would you like to set up your stack?" }),
|
|
73
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Select, { options, onChange: handleSelect }) }),
|
|
74
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
75
|
+
"\u2191",
|
|
76
|
+
"/",
|
|
77
|
+
"\u2193",
|
|
78
|
+
" navigate ENTER select ESC cancel"
|
|
79
|
+
] }) })
|
|
80
|
+
] });
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
StepApproach
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=chunk-XKEG3SCV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/components/wizard/step-approach.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box, Text } from \"ink\";\nimport { Select } from \"@inkjs/ui\";\nimport { useWizardStore } from \"../../stores/wizard-store.js\";\n\nconst EXPERT_MODE_VALUE = \"__expert_mode__\";\nconst INSTALL_MODE_VALUE = \"__install_mode__\";\n\nexport const StepApproach: React.FC = () => {\n const {\n expertMode,\n installMode,\n toggleExpertMode,\n toggleInstallMode,\n setStep,\n setApproach,\n } = useWizardStore();\n\n // Build options matching the original wizard\n const options = [\n {\n value: \"stack\",\n label: \"Use a pre-built template\",\n },\n {\n value: \"scratch\",\n label: \"Start from scratch\",\n },\n {\n value: EXPERT_MODE_VALUE,\n label: expertMode ? \"Expert Mode: ON\" : \"Expert Mode: OFF\",\n },\n {\n value: INSTALL_MODE_VALUE,\n label:\n installMode === \"local\"\n ? \"Install Mode: Local\"\n : \"Install Mode: Plugin\",\n },\n ];\n\n const handleSelect = (value: string) => {\n // Handle mode toggles - stay on this step\n if (value === EXPERT_MODE_VALUE) {\n toggleExpertMode();\n return;\n }\n\n if (value === INSTALL_MODE_VALUE) {\n toggleInstallMode();\n return;\n }\n\n // Navigate to next step based on approach\n if (value === \"stack\") {\n setApproach(\"stack\");\n setStep(\"stack\");\n } else if (value === \"scratch\") {\n setApproach(\"scratch\");\n setStep(\"stack\"); // Goes to domain selection in scratch mode\n }\n };\n\n return (\n <Box flexDirection=\"column\">\n {/* Mode status display */}\n <Box marginBottom={1} flexDirection=\"column\">\n {expertMode && (\n <Text color=\"yellow\">\n Expert Mode is ON <Text dimColor>- conflict checking disabled</Text>\n </Text>\n )}\n <Text color=\"cyan\">\n Install Mode: {installMode === \"plugin\" ? \"Plugin\" : \"Local\"}\n <Text dimColor>\n {installMode === \"plugin\"\n ? \" - native Claude plugins\"\n : \" - copy to .claude/skills/\"}\n </Text>\n </Text>\n </Box>\n\n <Text>How would you like to set up your stack?</Text>\n <Box marginTop={1}>\n <Select options={options} onChange={handleSelect} />\n </Box>\n <Box marginTop={1}>\n <Text dimColor>\n {\"\\u2191\"}/{\"\\u2193\"} navigate ENTER select ESC cancel\n </Text>\n </Box>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;AAAA;AACA,SAAS,KAAK,YAAY;AAC1B,SAAS,cAAc;AAkEb,SACoB,KADpB;AA/DV,IAAM,oBAAoB;AAC1B,IAAM,qBAAqB;AAEpB,IAAM,eAAyB,MAAM;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,eAAe;AAGnB,QAAM,UAAU;AAAA,IACd;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO,aAAa,oBAAoB;AAAA,IAC1C;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OACE,gBAAgB,UACZ,wBACA;AAAA,IACR;AAAA,EACF;AAEA,QAAM,eAAe,CAAC,UAAkB;AAEtC,QAAI,UAAU,mBAAmB;AAC/B,uBAAiB;AACjB;AAAA,IACF;AAEA,QAAI,UAAU,oBAAoB;AAChC,wBAAkB;AAClB;AAAA,IACF;AAG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