@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
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,184 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.8.0] - 2026-02-02
|
|
9
|
+
|
|
10
|
+
### Breaking Changes
|
|
11
|
+
|
|
12
|
+
- **Skill IDs normalized to kebab-case** - Skill IDs changed from path-based format with author suffix (e.g., `web/framework/react (@vince)`) to simple kebab-case (e.g., `web-framework-react`). Consumer configs and any code referencing old skill IDs must be updated.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Meta-stack** - New stack for meta-level development with 5 agents (skill-summoner, agent-summoner, documentor, pattern-scout, web-pattern-critique) mapped to methodology and research skills.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- `skill_aliases` in skills-matrix.yaml now map to normalized kebab-case IDs
|
|
21
|
+
- `DEFAULT_PRESELECTED_SKILLS` updated to use new ID format
|
|
22
|
+
- Simplified `skill-copier.ts`, `skill-plugin-compiler.ts`, `marketplace-generator.ts` - removed path parsing logic
|
|
23
|
+
|
|
24
|
+
### Removed
|
|
25
|
+
|
|
26
|
+
- `normalizeSkillId()` function - no longer needed since frontmatter contains canonical IDs
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **Uninstall command terminal state** - Added proper `exit()` calls to restore terminal after confirmation
|
|
31
|
+
|
|
32
|
+
[0.8.0]: https://github.com/claude-collective/cli/releases/tag/v0.8.0
|
|
33
|
+
|
|
34
|
+
## [0.7.0] - 2026-02-02
|
|
35
|
+
|
|
36
|
+
### Breaking Changes
|
|
37
|
+
|
|
38
|
+
- **Wizard flow redesigned** - New 5-step flow: Approach → Stack → Build → Refine → Confirm. The old category → subcategory linear flow is replaced with domain-based grid selection.
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **Domain-based navigation** - Categories now have a `domain` field (web, api, cli, mobile, shared) for filtering in the Build step
|
|
43
|
+
- **CategoryGrid component** - 2D grid selection with keyboard navigation (arrows, vim keys h/j/k/l), visual states (selected, recommended, discouraged, disabled)
|
|
44
|
+
- **WizardTabs component** - Horizontal 5-step progress indicator with completed/current/pending/skipped states
|
|
45
|
+
- **SectionProgress component** - Sub-step progress for multi-domain flows
|
|
46
|
+
- **StepBuild component** - Grid-based technology selection per domain, replaces linear category/subcategory flow
|
|
47
|
+
- **StepRefine component** - Skill source selection (verified skills, customize coming soon)
|
|
48
|
+
- **StepStackOptions component** - Options after stack selection (continue defaults or customize)
|
|
49
|
+
- **CLI domain support** - New `cli` category in skills-matrix with framework, prompts, testing subcategories
|
|
50
|
+
- **Wizard store v2** - Complete rewrite with history-based navigation, domain selections, grid focus state
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- `wizard.tsx` - Complete rewrite as orchestrator for new 5-step flow
|
|
55
|
+
- `step-approach.tsx` - Updated for v2 store
|
|
56
|
+
- `step-stack.tsx` - Now dual-purpose: stack selection (stack path) or domain selection (scratch path)
|
|
57
|
+
- `step-confirm.tsx` - Updated to show domain breakdown, technology/skill counts
|
|
58
|
+
- `wizard-store.ts` - Migrated to v2 state shape with approach, selectedDomains, domainSelections, stackAction, focusedRow/Col
|
|
59
|
+
|
|
60
|
+
### Removed
|
|
61
|
+
|
|
62
|
+
- `step-category.tsx` - Replaced by StepBuild with CategoryGrid
|
|
63
|
+
- `step-subcategory.tsx` - Replaced by StepBuild with CategoryGrid
|
|
64
|
+
- `selection-header.tsx` - No longer needed
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- **Skill resolution for stack defaults** - Selecting a stack with "Continue with defaults" now correctly includes all stack skills (was only including methodology skills)
|
|
69
|
+
- **Display names in Build step** - Technologies now show clean names ("React") instead of full IDs ("React (@vince)")
|
|
70
|
+
|
|
71
|
+
[0.7.0]: https://github.com/claude-collective/cli/releases/tag/v0.7.0
|
|
72
|
+
|
|
73
|
+
## [0.6.0] - 2026-02-01
|
|
74
|
+
|
|
75
|
+
### Breaking Changes
|
|
76
|
+
|
|
77
|
+
- **Skills now defined in stacks, not agents** - Previously, each agent YAML contained a `skills` field. Now, stacks define technology selections per agent in `config/stacks.yaml`. Skills are resolved via `skill_aliases` in the skills matrix. This fixes the bug where stacks got wrong skills (e.g., angular-stack getting React skills).
|
|
78
|
+
- **stacks.yaml schema changed** - Agents are now objects with subcategory→technology mappings (e.g., `web-developer: { framework: react, styling: scss-modules }`) instead of simple string lists.
|
|
79
|
+
- **Removed `skills` field from agent schema** - Agent YAMLs no longer contain skill definitions.
|
|
80
|
+
|
|
81
|
+
### Added
|
|
82
|
+
|
|
83
|
+
- **`stack` property in consumer config.yaml** - When a stack is selected, the resolved agent→skill mappings are stored in the project config for reproducibility.
|
|
84
|
+
- **`resolveAgentSkillsFromStack()`** - New function in resolver.ts to extract skills from stack configurations.
|
|
85
|
+
- **`resolveStackSkillsFromAliases()`** - New function in stacks-loader.ts to resolve technology selections to skill IDs via the matrix.
|
|
86
|
+
- **Phase 7 UX specification** - Comprehensive documentation for upcoming wizard UX redesign with domain-based navigation and grid-based skill selection.
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- `loadStackById()` now reads technology selections per agent from the new stacks.yaml format
|
|
91
|
+
- `getAgentSkills()` now accepts optional `stack` and `skillAliases` parameters for Phase 7 skill resolution
|
|
92
|
+
- `stackToResolvedStack()` extracts skills from stack configurations instead of agent YAMLs
|
|
93
|
+
- Stack plugin compiler now extracts skills via matrix aliases
|
|
94
|
+
|
|
95
|
+
### Removed
|
|
96
|
+
|
|
97
|
+
- `skills` field from all 18 agent YAMLs - skills now come from stacks
|
|
98
|
+
- `skills` property from agent.schema.json
|
|
99
|
+
|
|
100
|
+
[0.6.0]: https://github.com/claude-collective/cli/releases/tag/v0.6.0
|
|
101
|
+
|
|
102
|
+
## [0.5.1] - 2026-02-01
|
|
103
|
+
|
|
104
|
+
### Added
|
|
105
|
+
|
|
106
|
+
- **Auto-detection of installation mode** - CLI now automatically detects whether you have a local (`.claude/`) or plugin (`.claude/plugins/claude-collective/`) installation. No more `--output` flag needed for local mode.
|
|
107
|
+
- **`installMode` property in config.yaml** - new installations now store `installMode: local | plugin` explicitly in config
|
|
108
|
+
- **`detectInstallation()` utility** - shared function for consistent installation detection across commands
|
|
109
|
+
- **Local template support** - `compile` now uses templates from `.claude/templates/` if present (after running `eject templates`)
|
|
110
|
+
|
|
111
|
+
### Changed
|
|
112
|
+
|
|
113
|
+
- `cc compile` - auto-detects local mode and outputs to `.claude/agents` without needing `--output` flag
|
|
114
|
+
- `cc list` - now works for both local and plugin mode installations, shows mode in output
|
|
115
|
+
- `cc edit` - now works with local mode installations
|
|
116
|
+
- `nextjs-fullstack` stack - now includes all 18 agents (added `cli-tester` and `cli-migrator`)
|
|
117
|
+
|
|
118
|
+
### Fixed
|
|
119
|
+
|
|
120
|
+
- Local templates not being used after `eject templates` - compile now correctly checks for `.claude/templates/` before falling back to CLI bundled templates
|
|
121
|
+
|
|
122
|
+
[0.5.1]: https://github.com/claude-collective/cli/releases/tag/v0.5.1
|
|
123
|
+
|
|
124
|
+
## [0.5.0] - 2026-02-01
|
|
125
|
+
|
|
126
|
+
### Breaking Changes
|
|
127
|
+
|
|
128
|
+
- **Agent-centric configuration** - skills are now defined in agent YAMLs instead of stack config files. Stacks are now simple agent groupings in `config/stacks.yaml`. This is a significant architectural change that simplifies configuration but requires migration for custom stacks.
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
|
|
132
|
+
- **Skills in agent YAMLs** - each agent now defines its own skills with a `preloaded` flag to control what's included in the agent prompt
|
|
133
|
+
- **Centralized stacks.yaml** - all 7 stacks (nextjs-fullstack, angular, nuxt, remix, vue, solidjs, react-native) are now defined in `config/stacks.yaml` with agent lists and philosophy
|
|
134
|
+
- **stacks-loader** - new module to load stacks from config/stacks.yaml
|
|
135
|
+
- **resolveAgentSkills()** - function to extract skills from agent definitions
|
|
136
|
+
|
|
137
|
+
### Changed
|
|
138
|
+
|
|
139
|
+
- `loadStackById()` now loads from `config/stacks.yaml` (new format) instead of `src/stacks/*/config.yaml`
|
|
140
|
+
- `getAgentSkills()` priority order: compile config > agent skills > stack-based (legacy)
|
|
141
|
+
- `stackToResolvedStack()` now extracts skill IDs from agent definitions
|
|
142
|
+
- `build:stack` command deprecated (shows warning and exits)
|
|
143
|
+
|
|
144
|
+
### Removed
|
|
145
|
+
|
|
146
|
+
- Stack config files (`src/stacks/*/config.yaml`) - skills now come from agent YAMLs
|
|
147
|
+
- `suggested_stacks` section from `skills-matrix.yaml` - moved to `stacks.yaml`
|
|
148
|
+
|
|
149
|
+
### Internal
|
|
150
|
+
|
|
151
|
+
- Updated all 17 agent YAMLs with skills fields
|
|
152
|
+
- Deprecated `skill-agent-mappings.ts` (kept for wizard fallback)
|
|
153
|
+
- Updated tests to work with new stack format (passing Stack objects instead of writing config files)
|
|
154
|
+
|
|
155
|
+
[0.5.0]: https://github.com/claude-collective/cli/releases/tag/v0.5.0
|
|
156
|
+
|
|
157
|
+
## [0.4.0] - 2026-01-31
|
|
158
|
+
|
|
159
|
+
### Added
|
|
160
|
+
|
|
161
|
+
- **Methodology skills preselected** - foundational skills (anti-over-engineering, context-management, investigation-requirements, success-criteria, write-verification, improvement-protocol) are now selected by default in the wizard
|
|
162
|
+
- **CLI skills in nextjs-fullstack** - stack now includes cli-commander, cli-reviewing, and setup skills for posthog, email, and observability
|
|
163
|
+
- **Test isolation support** - `CC_CONFIG_HOME` environment variable allows overriding the global config directory
|
|
164
|
+
- **Comprehensive test suite** - 1000+ tests covering commands, components, and user journeys
|
|
165
|
+
|
|
166
|
+
### Internal
|
|
167
|
+
|
|
168
|
+
- Added cli-migrator and cli-tester agents for CLI development workflows
|
|
169
|
+
- Added research documentation for CLI testing strategies and stack simplification
|
|
170
|
+
|
|
171
|
+
[0.4.0]: https://github.com/claude-collective/cli/releases/tag/v0.4.0
|
|
172
|
+
|
|
173
|
+
## [0.3.0] - 2026-01-31
|
|
174
|
+
|
|
175
|
+
### Changed
|
|
176
|
+
|
|
177
|
+
- **CLI Framework Migration** - migrated from Commander.js + @clack/prompts to oclif + Ink for improved maintainability and extensibility
|
|
178
|
+
- All commands now use oclif's class-based command structure
|
|
179
|
+
- Interactive components now use Ink (React-based terminal UI)
|
|
180
|
+
- Wizard state management now uses Zustand
|
|
181
|
+
- Removed dependencies: commander, @clack/prompts, @clack/core, picocolors
|
|
182
|
+
- Added dependencies: @oclif/core, @oclif/plugin-\*, ink, react, @inkjs/ui, zustand
|
|
183
|
+
|
|
184
|
+
[0.3.0]: https://github.com/claude-collective/cli/releases/tag/v0.3.0
|
|
185
|
+
|
|
8
186
|
## [0.2.0] - 2026-01-30
|
|
9
187
|
|
|
10
188
|
### Added
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ skills live in the [claude-collective/skills](https://github.com/claude-collecti
|
|
|
51
51
|
| web | react 19, next.js, remix, vue, angular, solidjs, scss-modules, zustand, react-query |
|
|
52
52
|
| api | hono, drizzle, better-auth, posthog, resend, axiom+pino+sentry |
|
|
53
53
|
| mobile | react-native, expo |
|
|
54
|
-
| cli |
|
|
54
|
+
| cli | oclif, ink |
|
|
55
55
|
| infra | turborepo, github-actions, env config |
|
|
56
56
|
| security | auth patterns, xss prevention, secrets |
|
|
57
57
|
| meta | code reviewing, research methodology |
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
CLAUDE_DIR,
|
|
4
|
+
PLUGINS_SUBDIR,
|
|
5
|
+
PLUGIN_MANIFEST_DIR,
|
|
6
|
+
PLUGIN_MANIFEST_FILE
|
|
7
|
+
} from "./chunk-A3J6IAXK.js";
|
|
8
|
+
import {
|
|
9
|
+
verbose
|
|
10
|
+
} from "./chunk-TOPAIL5W.js";
|
|
11
|
+
import {
|
|
12
|
+
fileExists,
|
|
13
|
+
glob,
|
|
14
|
+
readFile
|
|
15
|
+
} from "./chunk-MMDXNZPF.js";
|
|
16
|
+
import {
|
|
17
|
+
init_esm_shims
|
|
18
|
+
} from "./chunk-DHET7RCE.js";
|
|
19
|
+
|
|
20
|
+
// src/cli-v2/lib/plugin-finder.ts
|
|
21
|
+
init_esm_shims();
|
|
22
|
+
import path from "path";
|
|
23
|
+
function getCollectivePluginDir(projectDir) {
|
|
24
|
+
const dir = projectDir ?? process.cwd();
|
|
25
|
+
return path.join(dir, CLAUDE_DIR, PLUGINS_SUBDIR, "claude-collective");
|
|
26
|
+
}
|
|
27
|
+
function getProjectPluginsDir(projectDir) {
|
|
28
|
+
const dir = projectDir ?? process.cwd();
|
|
29
|
+
return path.join(dir, CLAUDE_DIR, PLUGINS_SUBDIR);
|
|
30
|
+
}
|
|
31
|
+
function getPluginSkillsDir(pluginDir) {
|
|
32
|
+
return path.join(pluginDir, "skills");
|
|
33
|
+
}
|
|
34
|
+
function getPluginAgentsDir(pluginDir) {
|
|
35
|
+
return path.join(pluginDir, "agents");
|
|
36
|
+
}
|
|
37
|
+
function getPluginManifestPath(pluginDir) {
|
|
38
|
+
return path.join(pluginDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);
|
|
39
|
+
}
|
|
40
|
+
async function readPluginManifest(pluginDir) {
|
|
41
|
+
const manifestPath = getPluginManifestPath(pluginDir);
|
|
42
|
+
if (!await fileExists(manifestPath)) {
|
|
43
|
+
verbose(` No manifest at ${manifestPath}`);
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const content = await readFile(manifestPath);
|
|
48
|
+
const manifest = JSON.parse(content);
|
|
49
|
+
if (!manifest.name || typeof manifest.name !== "string") {
|
|
50
|
+
verbose(` Invalid manifest at ${manifestPath}: missing name`);
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return manifest;
|
|
54
|
+
} catch (error) {
|
|
55
|
+
verbose(` Failed to parse manifest at ${manifestPath}: ${error}`);
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function getPluginSkillIds(pluginSkillsDir, matrix) {
|
|
60
|
+
const skillFiles = await glob("**/SKILL.md", pluginSkillsDir);
|
|
61
|
+
const skillIds = [];
|
|
62
|
+
const nameToId = /* @__PURE__ */ new Map();
|
|
63
|
+
for (const [id, skill] of Object.entries(matrix.skills)) {
|
|
64
|
+
nameToId.set(skill.name.toLowerCase(), id);
|
|
65
|
+
if (skill.alias) {
|
|
66
|
+
nameToId.set(skill.alias.toLowerCase(), id);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const dirToId = /* @__PURE__ */ new Map();
|
|
70
|
+
for (const [id, skill] of Object.entries(matrix.skills)) {
|
|
71
|
+
const baseName = skill.name.toLowerCase().replace(/\s+/g, "-");
|
|
72
|
+
dirToId.set(baseName, id);
|
|
73
|
+
const idParts = id.split("/");
|
|
74
|
+
const lastPart = idParts[idParts.length - 1];
|
|
75
|
+
if (lastPart) {
|
|
76
|
+
dirToId.set(lastPart.toLowerCase(), id);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
for (const skillFile of skillFiles) {
|
|
80
|
+
const fullPath = path.join(pluginSkillsDir, skillFile);
|
|
81
|
+
const content = await readFile(fullPath);
|
|
82
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
83
|
+
if (frontmatterMatch) {
|
|
84
|
+
const frontmatter = frontmatterMatch[1];
|
|
85
|
+
const nameMatch = frontmatter.match(/^name:\s*["']?(.+?)["']?\s*$/m);
|
|
86
|
+
if (nameMatch) {
|
|
87
|
+
const skillName = nameMatch[1].trim();
|
|
88
|
+
const skillId2 = nameToId.get(skillName.toLowerCase());
|
|
89
|
+
if (skillId2) {
|
|
90
|
+
skillIds.push(skillId2);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const dirPath = path.dirname(skillFile);
|
|
96
|
+
const dirName = path.basename(dirPath);
|
|
97
|
+
const skillId = dirToId.get(dirName.toLowerCase());
|
|
98
|
+
if (skillId) {
|
|
99
|
+
skillIds.push(skillId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return skillIds;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
getCollectivePluginDir,
|
|
107
|
+
getProjectPluginsDir,
|
|
108
|
+
getPluginSkillsDir,
|
|
109
|
+
getPluginAgentsDir,
|
|
110
|
+
getPluginManifestPath,
|
|
111
|
+
readPluginManifest,
|
|
112
|
+
getPluginSkillIds
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=chunk-3HBTELJN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/lib/plugin-finder.ts"],"sourcesContent":["import path from \"path\";\nimport os from \"os\";\nimport { fileExists, readFile, glob } from \"../utils/fs\";\nimport { verbose } from \"../utils/logger\";\nimport {\n CLAUDE_DIR,\n PLUGINS_SUBDIR,\n PLUGIN_MANIFEST_DIR,\n PLUGIN_MANIFEST_FILE,\n} from \"../consts\";\nimport type { PluginManifest } from \"../../types\";\nimport type { MergedSkillsMatrix } from \"../types-matrix\";\n\nexport function getUserPluginsDir(): string {\n return path.join(os.homedir(), CLAUDE_DIR, PLUGINS_SUBDIR);\n}\n\nexport function getCollectivePluginDir(projectDir?: string): string {\n const dir = projectDir ?? process.cwd();\n return path.join(dir, CLAUDE_DIR, PLUGINS_SUBDIR, \"claude-collective\");\n}\n\nexport function getProjectPluginsDir(projectDir?: string): string {\n const dir = projectDir ?? process.cwd();\n return path.join(dir, CLAUDE_DIR, PLUGINS_SUBDIR);\n}\n\nexport function getPluginSkillsDir(pluginDir: string): string {\n return path.join(pluginDir, \"skills\");\n}\n\nexport function getPluginAgentsDir(pluginDir: string): string {\n return path.join(pluginDir, \"agents\");\n}\n\nexport function getPluginManifestPath(pluginDir: string): string {\n return path.join(pluginDir, PLUGIN_MANIFEST_DIR, PLUGIN_MANIFEST_FILE);\n}\n\nexport async function readPluginManifest(\n pluginDir: string,\n): Promise<PluginManifest | null> {\n const manifestPath = getPluginManifestPath(pluginDir);\n\n if (!(await fileExists(manifestPath))) {\n verbose(` No manifest at ${manifestPath}`);\n return null;\n }\n\n try {\n const content = await readFile(manifestPath);\n const manifest = JSON.parse(content) as PluginManifest;\n\n if (!manifest.name || typeof manifest.name !== \"string\") {\n verbose(` Invalid manifest at ${manifestPath}: missing name`);\n return null;\n }\n\n return manifest;\n } catch (error) {\n verbose(` Failed to parse manifest at ${manifestPath}: ${error}`);\n return null;\n }\n}\n\nexport async function getPluginSkillIds(\n pluginSkillsDir: string,\n matrix: MergedSkillsMatrix,\n): Promise<string[]> {\n const skillFiles = await glob(\"**/SKILL.md\", pluginSkillsDir);\n const skillIds: string[] = [];\n\n const nameToId = new Map<string, string>();\n for (const [id, skill] of Object.entries(matrix.skills)) {\n nameToId.set(skill.name.toLowerCase(), id);\n if (skill.alias) {\n nameToId.set(skill.alias.toLowerCase(), id);\n }\n }\n\n const dirToId = new Map<string, string>();\n for (const [id, skill] of Object.entries(matrix.skills)) {\n const baseName = skill.name.toLowerCase().replace(/\\s+/g, \"-\");\n dirToId.set(baseName, id);\n\n const idParts = id.split(\"/\");\n const lastPart = idParts[idParts.length - 1];\n if (lastPart) {\n dirToId.set(lastPart.toLowerCase(), id);\n }\n }\n\n for (const skillFile of skillFiles) {\n const fullPath = path.join(pluginSkillsDir, skillFile);\n const content = await readFile(fullPath);\n\n const frontmatterMatch = content.match(/^---\\n([\\s\\S]*?)\\n---/);\n if (frontmatterMatch) {\n const frontmatter = frontmatterMatch[1];\n const nameMatch = frontmatter.match(/^name:\\s*[\"']?(.+?)[\"']?\\s*$/m);\n if (nameMatch) {\n const skillName = nameMatch[1].trim();\n const skillId = nameToId.get(skillName.toLowerCase());\n if (skillId) {\n skillIds.push(skillId);\n continue;\n }\n }\n }\n\n const dirPath = path.dirname(skillFile);\n const dirName = path.basename(dirPath);\n const skillId = dirToId.get(dirName.toLowerCase());\n if (skillId) {\n skillIds.push(skillId);\n }\n }\n\n return skillIds;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA,OAAO,UAAU;AAiBV,SAAS,uBAAuB,YAA6B;AAClE,QAAM,MAAM,cAAc,QAAQ,IAAI;AACtC,SAAO,KAAK,KAAK,KAAK,YAAY,gBAAgB,mBAAmB;AACvE;AAEO,SAAS,qBAAqB,YAA6B;AAChE,QAAM,MAAM,cAAc,QAAQ,IAAI;AACtC,SAAO,KAAK,KAAK,KAAK,YAAY,cAAc;AAClD;AAEO,SAAS,mBAAmB,WAA2B;AAC5D,SAAO,KAAK,KAAK,WAAW,QAAQ;AACtC;AAEO,SAAS,mBAAmB,WAA2B;AAC5D,SAAO,KAAK,KAAK,WAAW,QAAQ;AACtC;AAEO,SAAS,sBAAsB,WAA2B;AAC/D,SAAO,KAAK,KAAK,WAAW,qBAAqB,oBAAoB;AACvE;AAEA,eAAsB,mBACpB,WACgC;AAChC,QAAM,eAAe,sBAAsB,SAAS;AAEpD,MAAI,CAAE,MAAM,WAAW,YAAY,GAAI;AACrC,YAAQ,oBAAoB,YAAY,EAAE;AAC1C,WAAO;AAAA,EACT;AAEA,MAAI;AACF,UAAM,UAAU,MAAM,SAAS,YAAY;AAC3C,UAAM,WAAW,KAAK,MAAM,OAAO;AAEnC,QAAI,CAAC,SAAS,QAAQ,OAAO,SAAS,SAAS,UAAU;AACvD,cAAQ,yBAAyB,YAAY,gBAAgB;AAC7D,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ,iCAAiC,YAAY,KAAK,KAAK,EAAE;AACjE,WAAO;AAAA,EACT;AACF;AAEA,eAAsB,kBACpB,iBACA,QACmB;AACnB,QAAM,aAAa,MAAM,KAAK,eAAe,eAAe;AAC5D,QAAM,WAAqB,CAAC;AAE5B,QAAM,WAAW,oBAAI,IAAoB;AACzC,aAAW,CAAC,IAAI,KAAK,KAAK,OAAO,QAAQ,OAAO,MAAM,GAAG;AACvD,aAAS,IAAI,MAAM,KAAK,YAAY,GAAG,EAAE;AACzC,QAAI,MAAM,OAAO;AACf,eAAS,IAAI,MAAM,MAAM,YAAY,GAAG,EAAE;AAAA,IAC5C;AAAA,EACF;AAEA,QAAM,UAAU,oBAAI,IAAoB;AACxC,aAAW,CAAC,IAAI,KAAK,KAAK,OAAO,QAAQ,OAAO,MAAM,GAAG;AACvD,UAAM,WAAW,MAAM,KAAK,YAAY,EAAE,QAAQ,QAAQ,GAAG;AAC7D,YAAQ,IAAI,UAAU,EAAE;AAExB,UAAM,UAAU,GAAG,MAAM,GAAG;AAC5B,UAAM,WAAW,QAAQ,QAAQ,SAAS,CAAC;AAC3C,QAAI,UAAU;AACZ,cAAQ,IAAI,SAAS,YAAY,GAAG,EAAE;AAAA,IACxC;AAAA,EACF;AAEA,aAAW,aAAa,YAAY;AAClC,UAAM,WAAW,KAAK,KAAK,iBAAiB,SAAS;AACrD,UAAM,UAAU,MAAM,SAAS,QAAQ;AAEvC,UAAM,mBAAmB,QAAQ,MAAM,uBAAuB;AAC9D,QAAI,kBAAkB;AACpB,YAAM,cAAc,iBAAiB,CAAC;AACtC,YAAM,YAAY,YAAY,MAAM,+BAA+B;AACnE,UAAI,WAAW;AACb,cAAM,YAAY,UAAU,CAAC,EAAE,KAAK;AACpC,cAAMA,WAAU,SAAS,IAAI,UAAU,YAAY,CAAC;AACpD,YAAIA,UAAS;AACX,mBAAS,KAAKA,QAAO;AACrB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,UAAU,KAAK,QAAQ,SAAS;AACtC,UAAM,UAAU,KAAK,SAAS,OAAO;AACrC,UAAM,UAAU,QAAQ,IAAI,QAAQ,YAAY,CAAC;AACjD,QAAI,SAAS;AACX,eAAS,KAAK,OAAO;AAAA,IACvB;AAAA,EACF;AAEA,SAAO;AACT;","names":["skillId"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
loadProjectConfig
|
|
4
|
+
} from "./chunk-MYAVQ23U.js";
|
|
5
|
+
import {
|
|
6
|
+
getCollectivePluginDir
|
|
7
|
+
} from "./chunk-3HBTELJN.js";
|
|
8
|
+
import {
|
|
9
|
+
CLAUDE_DIR
|
|
10
|
+
} from "./chunk-A3J6IAXK.js";
|
|
11
|
+
import {
|
|
12
|
+
directoryExists,
|
|
13
|
+
fileExists
|
|
14
|
+
} from "./chunk-MMDXNZPF.js";
|
|
15
|
+
import {
|
|
16
|
+
init_esm_shims
|
|
17
|
+
} from "./chunk-DHET7RCE.js";
|
|
18
|
+
|
|
19
|
+
// src/cli-v2/lib/installation.ts
|
|
20
|
+
init_esm_shims();
|
|
21
|
+
import path from "path";
|
|
22
|
+
async function detectInstallation(projectDir = process.cwd()) {
|
|
23
|
+
const localConfigPath = path.join(projectDir, CLAUDE_DIR, "config.yaml");
|
|
24
|
+
if (await fileExists(localConfigPath)) {
|
|
25
|
+
const loaded = await loadProjectConfig(projectDir);
|
|
26
|
+
const mode = loaded?.config?.installMode ?? "local";
|
|
27
|
+
if (mode === "local") {
|
|
28
|
+
return {
|
|
29
|
+
mode: "local",
|
|
30
|
+
configPath: localConfigPath,
|
|
31
|
+
agentsDir: path.join(projectDir, CLAUDE_DIR, "agents"),
|
|
32
|
+
skillsDir: path.join(projectDir, CLAUDE_DIR, "skills"),
|
|
33
|
+
projectDir
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const pluginDir = getCollectivePluginDir(projectDir);
|
|
38
|
+
const pluginConfigPath = path.join(pluginDir, "config.yaml");
|
|
39
|
+
if (await directoryExists(pluginDir)) {
|
|
40
|
+
return {
|
|
41
|
+
mode: "plugin",
|
|
42
|
+
configPath: pluginConfigPath,
|
|
43
|
+
agentsDir: path.join(pluginDir, "agents"),
|
|
44
|
+
skillsDir: path.join(pluginDir, "skills"),
|
|
45
|
+
projectDir
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
detectInstallation
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-3ZCB5K33.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/lib/installation.ts"],"sourcesContent":["/**\n * Installation detection utilities for Claude Collective.\n *\n * Detects whether a project uses local mode (.claude/config.yaml) or\n * plugin mode (.claude/plugins/claude-collective/).\n */\nimport path from \"path\";\nimport { directoryExists, fileExists } from \"../utils/fs\";\nimport { loadProjectConfig } from \"./project-config\";\nimport { getCollectivePluginDir } from \"./plugin-finder\";\nimport { CLAUDE_DIR } from \"../consts\";\n\nexport type InstallMode = \"local\" | \"plugin\";\n\nexport interface Installation {\n mode: InstallMode;\n configPath: string;\n agentsDir: string;\n skillsDir: string;\n projectDir: string;\n}\n\n/**\n * Detect the current installation mode by checking for local config first.\n * Priority: Local (.claude/config.yaml with installMode: local) > Plugin\n */\nexport async function detectInstallation(\n projectDir: string = process.cwd(),\n): Promise<Installation | null> {\n // 1. Check for local installation first\n const localConfigPath = path.join(projectDir, CLAUDE_DIR, \"config.yaml\");\n\n if (await fileExists(localConfigPath)) {\n const loaded = await loadProjectConfig(projectDir);\n\n // If config exists and has installMode: local (or no installMode, defaults to local)\n // treat it as local mode\n const mode: InstallMode = loaded?.config?.installMode ?? \"local\";\n\n if (mode === \"local\") {\n return {\n mode: \"local\",\n configPath: localConfigPath,\n agentsDir: path.join(projectDir, CLAUDE_DIR, \"agents\"),\n skillsDir: path.join(projectDir, CLAUDE_DIR, \"skills\"),\n projectDir,\n };\n }\n }\n\n // 2. Check for plugin installation\n const pluginDir = getCollectivePluginDir(projectDir);\n const pluginConfigPath = path.join(pluginDir, \"config.yaml\");\n\n if (await directoryExists(pluginDir)) {\n return {\n mode: \"plugin\",\n configPath: pluginConfigPath,\n agentsDir: path.join(pluginDir, \"agents\"),\n skillsDir: path.join(pluginDir, \"skills\"),\n projectDir,\n };\n }\n\n // No installation found\n return null;\n}\n\n/**\n * Get installation or throw with helpful error message\n */\nexport async function getInstallationOrThrow(\n projectDir: string = process.cwd(),\n): Promise<Installation> {\n const installation = await detectInstallation(projectDir);\n\n if (!installation) {\n throw new Error(\n \"No Claude Collective installation found.\\n\" +\n \"Run 'cc init' to create one.\",\n );\n }\n\n return installation;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAMA,OAAO,UAAU;AAoBjB,eAAsB,mBACpB,aAAqB,QAAQ,IAAI,GACH;AAE9B,QAAM,kBAAkB,KAAK,KAAK,YAAY,YAAY,aAAa;AAEvE,MAAI,MAAM,WAAW,eAAe,GAAG;AACrC,UAAM,SAAS,MAAM,kBAAkB,UAAU;AAIjD,UAAM,OAAoB,QAAQ,QAAQ,eAAe;AAEzD,QAAI,SAAS,SAAS;AACpB,aAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,WAAW,KAAK,KAAK,YAAY,YAAY,QAAQ;AAAA,QACrD,WAAW,KAAK,KAAK,YAAY,YAAY,QAAQ;AAAA,QACrD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAGA,QAAM,YAAY,uBAAuB,UAAU;AACnD,QAAM,mBAAmB,KAAK,KAAK,WAAW,aAAa;AAE3D,MAAI,MAAM,gBAAgB,SAAS,GAAG;AACpC,WAAO;AAAA,MACL,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,WAAW,KAAK,KAAK,WAAW,QAAQ;AAAA,MACxC,WAAW,KAAK,KAAK,WAAW,QAAQ;AAAA,MACxC;AAAA,IACF;AAAA,EACF;AAGA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// node_modules/ink-testing-library/build/index.js
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { EventEmitter } from "events";
|
|
9
|
+
import { render as inkRender } from "ink";
|
|
10
|
+
var Stdout = class extends EventEmitter {
|
|
11
|
+
get columns() {
|
|
12
|
+
return 100;
|
|
13
|
+
}
|
|
14
|
+
frames = [];
|
|
15
|
+
_lastFrame;
|
|
16
|
+
write = (frame) => {
|
|
17
|
+
this.frames.push(frame);
|
|
18
|
+
this._lastFrame = frame;
|
|
19
|
+
};
|
|
20
|
+
lastFrame = () => this._lastFrame;
|
|
21
|
+
};
|
|
22
|
+
var Stderr = class extends EventEmitter {
|
|
23
|
+
frames = [];
|
|
24
|
+
_lastFrame;
|
|
25
|
+
write = (frame) => {
|
|
26
|
+
this.frames.push(frame);
|
|
27
|
+
this._lastFrame = frame;
|
|
28
|
+
};
|
|
29
|
+
lastFrame = () => this._lastFrame;
|
|
30
|
+
};
|
|
31
|
+
var Stdin = class extends EventEmitter {
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
33
|
+
isTTY = true;
|
|
34
|
+
data = null;
|
|
35
|
+
// eslint-disable-line @typescript-eslint/ban-types
|
|
36
|
+
constructor(options = {}) {
|
|
37
|
+
super();
|
|
38
|
+
this.isTTY = options.isTTY ?? true;
|
|
39
|
+
}
|
|
40
|
+
write = (data) => {
|
|
41
|
+
this.data = data;
|
|
42
|
+
this.emit("readable");
|
|
43
|
+
this.emit("data", data);
|
|
44
|
+
};
|
|
45
|
+
setEncoding() {
|
|
46
|
+
}
|
|
47
|
+
setRawMode() {
|
|
48
|
+
}
|
|
49
|
+
resume() {
|
|
50
|
+
}
|
|
51
|
+
pause() {
|
|
52
|
+
}
|
|
53
|
+
ref() {
|
|
54
|
+
}
|
|
55
|
+
unref() {
|
|
56
|
+
}
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
58
|
+
read = () => {
|
|
59
|
+
const { data } = this;
|
|
60
|
+
this.data = null;
|
|
61
|
+
return data;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
var instances = [];
|
|
65
|
+
var render = (tree) => {
|
|
66
|
+
const stdout = new Stdout();
|
|
67
|
+
const stderr = new Stderr();
|
|
68
|
+
const stdin = new Stdin();
|
|
69
|
+
const instance = inkRender(tree, {
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
71
|
+
stdout,
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
73
|
+
stderr,
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
75
|
+
stdin,
|
|
76
|
+
debug: true,
|
|
77
|
+
exitOnCtrlC: false,
|
|
78
|
+
patchConsole: false
|
|
79
|
+
});
|
|
80
|
+
instances.push(instance);
|
|
81
|
+
return {
|
|
82
|
+
rerender: instance.rerender,
|
|
83
|
+
unmount: instance.unmount,
|
|
84
|
+
cleanup: instance.cleanup,
|
|
85
|
+
stdout,
|
|
86
|
+
stderr,
|
|
87
|
+
stdin,
|
|
88
|
+
frames: stdout.frames,
|
|
89
|
+
lastFrame: stdout.lastFrame
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
render
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=chunk-66UDJBF6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/ink-testing-library/source/index.ts"],"sourcesContent":[null],"mappings":";;;;;;AAAA;SAAQ,oBAAmB;AAC3B,SAAQ,UAAU,iBAA8C;AAGhE,IAAM,SAAN,cAAqB,aAAY;EAChC,IAAI,UAAO;AACV,WAAO;EACR;EAES,SAAmB,CAAA;EACpB;EAER,QAAQ,CAAC,UAAiB;AACzB,SAAK,OAAO,KAAK,KAAK;AACtB,SAAK,aAAa;EACnB;EAEA,YAAY,MAAM,KAAK;;AAGxB,IAAM,SAAN,cAAqB,aAAY;EACvB,SAAmB,CAAA;EACpB;EAER,QAAQ,CAAC,UAAiB;AACzB,SAAK,OAAO,KAAK,KAAK;AACtB,SAAK,aAAa;EACnB;EAEA,YAAY,MAAM,KAAK;;AAGxB,IAAM,QAAN,cAAoB,aAAY;;EAE/B,QAAQ;EACR,OAAsB;;EACtB,YAAY,UAA6B,CAAA,GAAE;AAC1C,UAAK;AACL,SAAK,QAAQ,QAAQ,SAAS;EAC/B;EAEA,QAAQ,CAAC,SAAgB;AACxB,SAAK,OAAO;AACZ,SAAK,KAAK,UAAU;AACpB,SAAK,KAAK,QAAQ,IAAI;EACvB;EAEA,cAAW;EAEX;EAEA,aAAU;EAEV;EAEA,SAAM;EAEN;EAEA,QAAK;EAEL;EAEA,MAAG;EAEH;EAEA,QAAK;EAEL;;EAGA,OAA4B,MAAK;AAChC,UAAM,EAAC,KAAI,IAAI;AACf,SAAK,OAAO;AACZ,WAAO;EACR;;AAcD,IAAM,YAA2B,CAAA;AAE1B,IAAM,SAAS,CAAC,SAAgC;AACtD,QAAM,SAAS,IAAI,OAAM;AACzB,QAAM,SAAS,IAAI,OAAM;AACzB,QAAM,QAAQ,IAAI,MAAK;AAEvB,QAAM,WAAW,UAAU,MAAM;;IAEhC;;IAEA;;IAEA;IACA,OAAO;IACP,aAAa;IACb,cAAc;GACd;AAED,YAAU,KAAK,QAAQ;AAEvB,SAAO;IACN,UAAU,SAAS;IACnB,SAAS,SAAS;IAClB,SAAS,SAAS;IAClB;IACA;IACA;IACA,QAAQ,OAAO;IACf,WAAW,OAAO;;AAEpB;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/lib/__tests__/test-constants.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var ARROW_UP = "\x1B[A";
|
|
9
|
+
var ARROW_DOWN = "\x1B[B";
|
|
10
|
+
var ARROW_LEFT = "\x1B[D";
|
|
11
|
+
var ARROW_RIGHT = "\x1B[C";
|
|
12
|
+
var ENTER = "\r";
|
|
13
|
+
var ESCAPE = "\x1B";
|
|
14
|
+
var TAB = " ";
|
|
15
|
+
var INPUT_DELAY_MS = 50;
|
|
16
|
+
var RENDER_DELAY_MS = 100;
|
|
17
|
+
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
ARROW_UP,
|
|
21
|
+
ARROW_DOWN,
|
|
22
|
+
ARROW_LEFT,
|
|
23
|
+
ARROW_RIGHT,
|
|
24
|
+
ENTER,
|
|
25
|
+
ESCAPE,
|
|
26
|
+
TAB,
|
|
27
|
+
INPUT_DELAY_MS,
|
|
28
|
+
RENDER_DELAY_MS,
|
|
29
|
+
delay
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-6LS7XO3H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/lib/__tests__/test-constants.ts"],"sourcesContent":["/**\n * Shared test constants for CLI tests.\n *\n * Contains keyboard escape sequences and timing constants for ink-testing-library tests.\n */\n\n// =============================================================================\n// Keyboard Escape Sequences\n// =============================================================================\n\n/** Arrow Up key escape sequence */\nexport const ARROW_UP = \"\\x1B[A\";\n\n/** Arrow Down key escape sequence */\nexport const ARROW_DOWN = \"\\x1B[B\";\n\n/** Arrow Left key escape sequence */\nexport const ARROW_LEFT = \"\\x1B[D\";\n\n/** Arrow Right key escape sequence */\nexport const ARROW_RIGHT = \"\\x1B[C\";\n\n/** Enter key */\nexport const ENTER = \"\\r\";\n\n/** Escape key */\nexport const ESCAPE = \"\\x1B\";\n\n/** Ctrl+C key */\nexport const CTRL_C = \"\\x03\";\n\n/** Tab key */\nexport const TAB = \"\\t\";\n\n/** Backspace key */\nexport const BACKSPACE = \"\\x7F\";\n\n/** Letter Y for ConfirmInput */\nexport const KEY_Y = \"y\";\n\n/** Letter N for ConfirmInput */\nexport const KEY_N = \"n\";\n\n// =============================================================================\n// Timing Constants\n// =============================================================================\n\n/** Delay after keyboard input to allow terminal to process (ms) */\nexport const INPUT_DELAY_MS = 50;\n\n/** Delay for render/rerender operations (ms) */\nexport const RENDER_DELAY_MS = 100;\n\n/** Delay for complex multi-step operations (ms) */\nexport const OPERATION_DELAY_MS = 150;\n\n// =============================================================================\n// Test Utilities\n// =============================================================================\n\n/**\n * Create a delay promise for async tests.\n *\n * @param ms - Milliseconds to wait\n * @returns Promise that resolves after the delay\n */\nexport const delay = (ms: number): Promise<void> =>\n new Promise((resolve) => setTimeout(resolve, ms));\n"],"mappings":";;;;;;AAAA;AAWO,IAAM,WAAW;AAGjB,IAAM,aAAa;AAGnB,IAAM,aAAa;AAGnB,IAAM,cAAc;AAGpB,IAAM,QAAQ;AAGd,IAAM,SAAS;AAMf,IAAM,MAAM;AAgBZ,IAAM,iBAAiB;AAGvB,IAAM,kBAAkB;AAexB,IAAM,QAAQ,CAAC,OACpB,IAAI,QAAQ,CAAC,YAAY,WAAW,SAAS,EAAE,CAAC;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-DHET7RCE.js";
|
|
5
|
+
|
|
6
|
+
// src/cli-v2/consts.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import path from "path";
|
|
9
|
+
import os from "os";
|
|
10
|
+
import { fileURLToPath } from "url";
|
|
11
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
var __dirname = path.dirname(__filename);
|
|
13
|
+
var isInDist = __dirname.includes("/dist");
|
|
14
|
+
var CLI_ROOT = isInDist ? path.resolve(__dirname, "..") : path.resolve(__dirname, "../..");
|
|
15
|
+
var PROJECT_ROOT = CLI_ROOT;
|
|
16
|
+
var CLAUDE_DIR = ".claude";
|
|
17
|
+
var PLUGINS_SUBDIR = "plugins";
|
|
18
|
+
var PLUGIN_MANIFEST_DIR = ".claude-plugin";
|
|
19
|
+
var PLUGIN_MANIFEST_FILE = "plugin.json";
|
|
20
|
+
var CACHE_DIR = path.join(os.homedir(), ".cache", "claude-collective");
|
|
21
|
+
var SKILLS_MATRIX_PATH = "config/skills-matrix.yaml";
|
|
22
|
+
var SKILLS_DIR_PATH = "src/skills";
|
|
23
|
+
var LOCAL_SKILLS_PATH = ".claude/skills";
|
|
24
|
+
var DIRS = {
|
|
25
|
+
agents: "src/agents",
|
|
26
|
+
skills: "src/skills",
|
|
27
|
+
stacks: "src/stacks",
|
|
28
|
+
templates: "src/agents/_templates",
|
|
29
|
+
commands: "src/commands"
|
|
30
|
+
};
|
|
31
|
+
var DEFAULT_VERSION = "1.0.0";
|
|
32
|
+
var DEFAULT_DISPLAY_VERSION = "0.0.0";
|
|
33
|
+
var DEFAULT_PRESELECTED_SKILLS = [
|
|
34
|
+
"meta-methodology-anti-over-engineering",
|
|
35
|
+
"meta-methodology-context-management",
|
|
36
|
+
"meta-methodology-improvement-protocol",
|
|
37
|
+
"meta-methodology-investigation-requirements",
|
|
38
|
+
"meta-methodology-success-criteria",
|
|
39
|
+
"meta-methodology-write-verification"
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
PROJECT_ROOT,
|
|
44
|
+
CLAUDE_DIR,
|
|
45
|
+
PLUGINS_SUBDIR,
|
|
46
|
+
PLUGIN_MANIFEST_DIR,
|
|
47
|
+
PLUGIN_MANIFEST_FILE,
|
|
48
|
+
CACHE_DIR,
|
|
49
|
+
SKILLS_MATRIX_PATH,
|
|
50
|
+
SKILLS_DIR_PATH,
|
|
51
|
+
LOCAL_SKILLS_PATH,
|
|
52
|
+
DIRS,
|
|
53
|
+
DEFAULT_VERSION,
|
|
54
|
+
DEFAULT_DISPLAY_VERSION,
|
|
55
|
+
DEFAULT_PRESELECTED_SKILLS
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=chunk-A3J6IAXK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli-v2/consts.ts"],"sourcesContent":["import path from \"path\";\nimport os from \"os\";\nimport { fileURLToPath } from \"url\";\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n\n// After tsup build, dist/ is flat, so we go up one level from dist/ to get CLI root\n// In development (src/cli-v2/consts.ts), we go up two levels\nconst isInDist = __dirname.includes(\"/dist\");\nexport const CLI_ROOT = isInDist\n ? path.resolve(__dirname, \"..\")\n : path.resolve(__dirname, \"../..\");\nexport const PROJECT_ROOT = CLI_ROOT;\n\nexport const OUTPUT_DIR = \".claude\";\nexport const GITHUB_REPO = \"claude-collective/skills\";\nexport const DEFAULT_MATRIX_PATH = \"src/config/skills-matrix.yaml\";\n\nexport const PLUGIN_NAME = \"claude-collective\";\n\nexport const CLAUDE_DIR = \".claude\";\nexport const PLUGINS_SUBDIR = \"plugins\";\nexport const PLUGIN_MANIFEST_DIR = \".claude-plugin\";\nexport const PLUGIN_MANIFEST_FILE = \"plugin.json\";\n\nexport const CACHE_DIR = path.join(os.homedir(), \".cache\", \"claude-collective\");\n\nexport const SKILLS_MATRIX_PATH = \"config/skills-matrix.yaml\";\nexport const SKILLS_DIR_PATH = \"src/skills\";\nexport const LOCAL_SKILLS_PATH = \".claude/skills\";\n\nexport const DIRS = {\n agents: \"src/agents\",\n skills: \"src/skills\",\n stacks: \"src/stacks\",\n templates: \"src/agents/_templates\",\n commands: \"src/commands\",\n} as const;\n\nexport const DEFAULT_VERSION = \"1.0.0\";\n\n/** Uses \"0.0.0\" to clearly indicate \"no version was explicitly set\" */\nexport const DEFAULT_DISPLAY_VERSION = \"0.0.0\";\n\n/**\n * Skills that are preselected by default in the wizard.\n * These are foundational methodology skills that apply to all projects.\n *\n * Note: Skill IDs are in normalized kebab-case format (no author suffix, slashes replaced with dashes).\n */\nexport const DEFAULT_PRESELECTED_SKILLS = [\n \"meta-methodology-anti-over-engineering\",\n \"meta-methodology-context-management\",\n \"meta-methodology-improvement-protocol\",\n \"meta-methodology-investigation-requirements\",\n \"meta-methodology-success-criteria\",\n \"meta-methodology-write-verification\",\n] as const;\n"],"mappings":";;;;;;AAAA;AAAA,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,SAAS,qBAAqB;AAE9B,IAAM,aAAa,cAAc,YAAY,GAAG;AAChD,IAAM,YAAY,KAAK,QAAQ,UAAU;AAIzC,IAAM,WAAW,UAAU,SAAS,OAAO;AACpC,IAAM,WAAW,WACpB,KAAK,QAAQ,WAAW,IAAI,IAC5B,KAAK,QAAQ,WAAW,OAAO;AAC5B,IAAM,eAAe;AAQrB,IAAM,aAAa;AACnB,IAAM,iBAAiB;AACvB,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AAE7B,IAAM,YAAY,KAAK,KAAK,GAAG,QAAQ,GAAG,UAAU,mBAAmB;AAEvE,IAAM,qBAAqB;AAC3B,IAAM,kBAAkB;AACxB,IAAM,oBAAoB;AAE1B,IAAM,OAAO;AAAA,EAClB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,UAAU;AACZ;AAEO,IAAM,kBAAkB;AAGxB,IAAM,0BAA0B;AAQhC,IAAM,6BAA6B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
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-stack-options.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 BACK_VALUE = "_back";
|
|
15
|
+
var DEFAULTS_VALUE = "defaults";
|
|
16
|
+
var CUSTOMIZE_VALUE = "customize";
|
|
17
|
+
var StepStackOptions = ({
|
|
18
|
+
stackName,
|
|
19
|
+
technologyCount
|
|
20
|
+
}) => {
|
|
21
|
+
const { setStep, setStackAction, goBack } = useWizardStore();
|
|
22
|
+
const options = [
|
|
23
|
+
{ value: BACK_VALUE, label: "\u2190 Back" },
|
|
24
|
+
{
|
|
25
|
+
value: DEFAULTS_VALUE,
|
|
26
|
+
label: `Continue with defaults (${technologyCount} technologies)`
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: CUSTOMIZE_VALUE,
|
|
30
|
+
label: "Customize technologies"
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
const handleSelect = (value) => {
|
|
34
|
+
if (value === BACK_VALUE) {
|
|
35
|
+
goBack();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (value === DEFAULTS_VALUE) {
|
|
39
|
+
setStackAction("defaults");
|
|
40
|
+
setStep("refine");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (value === CUSTOMIZE_VALUE) {
|
|
44
|
+
setStackAction("customize");
|
|
45
|
+
setStep("build");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
50
|
+
/* @__PURE__ */ jsxs(Text, { bold: true, children: [
|
|
51
|
+
"You selected: ",
|
|
52
|
+
/* @__PURE__ */ jsx(Text, { color: "cyan", children: stackName })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
55
|
+
/* @__PURE__ */ jsx(Text, { children: "What would you like to do?" }),
|
|
56
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Select, { options, onChange: handleSelect }) }),
|
|
57
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
58
|
+
"\u2191",
|
|
59
|
+
"/",
|
|
60
|
+
"\u2193",
|
|
61
|
+
" navigate ENTER select ESC back"
|
|
62
|
+
] }) })
|
|
63
|
+
] });
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
StepStackOptions
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=chunk-A65SBAAJ.js.map
|