prjct-cli 1.6.7 → 1.6.8
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 +56 -5
- package/core/agentic/chain-of-thought.ts +3 -1
- package/core/agentic/ground-truth.ts +12 -5
- package/core/agentic/index.ts +14 -2
- package/core/agentic/memory-system.ts +86 -23
- package/core/agentic/services.ts +1 -1
- package/core/agentic/template-executor.ts +4 -4
- package/core/agentic/template-loader.ts +2 -8
- package/core/bus/bus.ts +0 -1
- package/core/bus/index.ts +1 -1
- package/core/cli/start.ts +0 -2
- package/core/commands/base.ts +2 -2
- package/core/commands/planning.ts +1 -1
- package/core/constants/index.ts +19 -0
- package/core/context/generator.ts +0 -2
- package/core/context-tools/files-tool.ts +0 -6
- package/core/context-tools/imports-tool.ts +0 -6
- package/core/context-tools/recent-tool.ts +0 -6
- package/core/context-tools/signatures-tool.ts +0 -6
- package/core/context-tools/summary-tool.ts +0 -6
- package/core/context-tools/token-counter.ts +0 -13
- package/core/infrastructure/agent-detector.ts +0 -13
- package/core/infrastructure/ai-provider.ts +0 -29
- package/core/infrastructure/author-detector.ts +0 -14
- package/core/infrastructure/config-manager.ts +1 -1
- package/core/infrastructure/setup.ts +0 -3
- package/core/plugin/hooks.ts +0 -2
- package/core/plugin/index.ts +0 -13
- package/core/plugin/loader.ts +0 -2
- package/core/plugin/registry.ts +0 -2
- package/core/services/agent-service.ts +1 -1
- package/core/services/context-generator.ts +1 -1
- package/core/services/diff-generator.ts +0 -12
- package/core/services/hooks-service.ts +0 -1
- package/core/services/memory-service.ts +1 -1
- package/core/services/project-service.ts +1 -1
- package/core/services/sync-service.ts +1 -1
- package/core/services/watch-service.ts +1 -1
- package/core/storage/index.ts +1 -1
- package/core/storage/storage.ts +0 -2
- package/core/utils/animations.ts +0 -18
- package/core/utils/cache.ts +0 -6
- package/core/utils/collection-filters.ts +0 -24
- package/core/utils/date-helper.ts +0 -20
- package/core/utils/file-helper.ts +0 -26
- package/core/utils/help.ts +0 -9
- package/core/utils/jsonl-helper.ts +0 -21
- package/core/utils/markdown-builder.ts +0 -3
- package/core/utils/next-steps.ts +0 -2
- package/core/utils/runtime.ts +0 -11
- package/core/utils/session-helper.ts +0 -12
- package/core/utils/version.ts +0 -12
- package/core/workflow/workflow-preferences.ts +4 -13
- package/dist/bin/prjct.mjs +200 -300
- package/dist/core/infrastructure/command-installer.js +1 -26
- package/dist/core/infrastructure/setup.js +1 -28
- package/dist/core/utils/version.js +0 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.6.8] - 2026-02-07
|
|
4
|
+
|
|
5
|
+
### Refactoring
|
|
6
|
+
|
|
7
|
+
- standardize export patterns to ESM (PRJ-99) (#132)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.6.9] - 2026-02-07
|
|
11
|
+
|
|
12
|
+
### Refactor
|
|
13
|
+
- **Standardize export patterns to ESM (PRJ-99)**: Removed redundant `export default { ... }` CJS-compat patterns from 33 files across `core/`. Updated 19 import sites to use namespace imports (`import * as X`). Cleaned 3 barrel re-exports in `agentic/index.ts`, `bus/index.ts`, and `storage/index.ts`. 3 function-collection modules (chain-of-thought, ground-truth, template-loader) retain proper singleton defaults for test mocking compatibility. Net reduction of 274 lines.
|
|
14
|
+
|
|
15
|
+
### Implementation Details
|
|
16
|
+
Removed the redundant pattern where files had both named exports (`export function X`) and a CJS-compat default export object (`export default { X, Y, Z }`). All 33 cleaned files already had proper named exports, making the default objects unnecessary. Import sites referencing removed defaults were converted to `import * as X from` namespace imports, which preserves the `X.method()` usage pattern.
|
|
17
|
+
|
|
18
|
+
### Learnings
|
|
19
|
+
- Bun enforces read-only properties on ESM namespace objects (`import * as X`) — direct property assignment for test mocking fails at runtime
|
|
20
|
+
- Function-collection modules that need test mocking should export a named singleton object as default, consistent with class-instance modules like `pathManager`, `loopDetector`
|
|
21
|
+
- Barrel file (`index.ts`) re-exports of `default` must be updated when removing default exports from source modules
|
|
22
|
+
|
|
23
|
+
### Test Plan
|
|
24
|
+
|
|
25
|
+
#### For QA
|
|
26
|
+
1. Run `bun run build` — should complete with no errors
|
|
27
|
+
2. Run `bun run test` — all 416 tests should pass (1 pre-existing timeout flake in DependencyValidator)
|
|
28
|
+
3. Run `bun run lint` — no lint errors
|
|
29
|
+
4. Run `npx tsc -p core/tsconfig.json --noEmit` — no type errors
|
|
30
|
+
5. Verify `prjct sync --yes` still works end-to-end
|
|
31
|
+
|
|
32
|
+
#### For Users
|
|
33
|
+
**What changed:** Internal refactor only — no API or CLI behavior changes.
|
|
34
|
+
**How to use:** No user action needed.
|
|
35
|
+
**Breaking changes:** None.
|
|
36
|
+
|
|
37
|
+
## [1.6.8] - 2026-02-07
|
|
38
|
+
|
|
39
|
+
### Documentation
|
|
40
|
+
- **Add JSDoc to CachedStore class methods (PRJ-91)**: Enhanced all 12 public/protected methods on the `CachedStore<T>` base class with comprehensive JSDoc including `@param`, `@returns`, `@throws`, `@example`, and `@typeParam` annotations. Improved class-level documentation with usage example and cross-references to subclasses.
|
|
41
|
+
|
|
42
|
+
### Test Plan
|
|
43
|
+
|
|
44
|
+
#### For QA
|
|
45
|
+
1. Build (`bun run build`) — should succeed
|
|
46
|
+
2. Typecheck (`npx tsc -p core/tsconfig.json --noEmit`) — should pass
|
|
47
|
+
3. Verify JSDoc renders in IDE hover tooltips for CachedStore methods
|
|
48
|
+
|
|
49
|
+
#### For Users
|
|
50
|
+
**What changed:** Better IDE documentation for CachedStore internals.
|
|
51
|
+
**Breaking changes:** None
|
|
52
|
+
|
|
53
|
+
|
|
3
54
|
## [1.6.7] - 2026-02-07
|
|
4
55
|
|
|
5
56
|
### Bug Fixes
|
|
@@ -787,7 +838,7 @@ Added visual workflow status template showing:
|
|
|
787
838
|
- add automatic npm publication and update detection system
|
|
788
839
|
- publish prjct-cli to npm registry
|
|
789
840
|
- remove bun and homebrew installation methods
|
|
790
|
-
- add natural language interface with
|
|
841
|
+
- add natural language interface with multi-language support
|
|
791
842
|
- add interactive workflow system with capability detection and installation
|
|
792
843
|
- release v0.3.0 with interactive editor selection and codebase analysis
|
|
793
844
|
- add project management workflows for analyzing, tracking, and fixing tasks
|
|
@@ -810,7 +861,7 @@ Added visual workflow status template showing:
|
|
|
810
861
|
- make Linear/JIRA templates explicitly ignore MCP tools
|
|
811
862
|
- remove MCP inheritance from Linear/JIRA templates
|
|
812
863
|
- standardize confirmation pattern across all commands (#85)
|
|
813
|
-
- LLM
|
|
864
|
+
- LLM must handle the prompts, not the CLI - PRJ-149 (#84)
|
|
814
865
|
- Claude over-plans simple commands like p. sync - PRJ-148 (#83)
|
|
815
866
|
- implement silent memory application - PRJ-103 (#69)
|
|
816
867
|
- ignore tar warning in release workflow - PRJ-147
|
|
@@ -1436,14 +1487,14 @@ Implemented hierarchical agent resolution allowing AGENTS.md files at any direct
|
|
|
1436
1487
|
|
|
1437
1488
|
### Bug Fixes
|
|
1438
1489
|
|
|
1439
|
-
- LLM
|
|
1490
|
+
- LLM must handle the prompts, not the CLI - PRJ-149 (#84)
|
|
1440
1491
|
|
|
1441
1492
|
|
|
1442
1493
|
## [0.55.3] - 2026-01-30
|
|
1443
1494
|
|
|
1444
1495
|
### Fixed
|
|
1445
1496
|
|
|
1446
|
-
- **LLM
|
|
1497
|
+
- **LLM must handle the prompts, not the CLI** (PRJ-149)
|
|
1447
1498
|
- Added `--json` flag to `prjct sync` for non-interactive mode
|
|
1448
1499
|
- CLI now detects non-TTY mode and outputs structured JSON instead of interactive prompts
|
|
1449
1500
|
- Updated `sync.md` template so LLM uses AskUserQuestion for confirmation
|
|
@@ -1653,7 +1704,7 @@ Implemented hierarchical agent resolution allowing AGENTS.md files at any direct
|
|
|
1653
1704
|
### Added
|
|
1654
1705
|
|
|
1655
1706
|
- **Workflow hooks via natural language** (PRJ-137)
|
|
1656
|
-
- Configure hooks with `p. workflow "
|
|
1707
|
+
- Configure hooks with `p. workflow "before ship run the tests"`
|
|
1657
1708
|
- Supports before/after hooks for task, done, ship, sync commands
|
|
1658
1709
|
- Three scopes: permanent (persisted), session, one-time
|
|
1659
1710
|
- Uses existing memory system for storage
|
|
@@ -229,4 +229,6 @@ function formatPlan(result: ReasoningResult): string {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
export { requiresReasoning, reason, formatPlan, REASONING_REQUIRED_COMMANDS }
|
|
232
|
-
|
|
232
|
+
|
|
233
|
+
const chainOfThought = { requiresReasoning, reason, formatPlan, REASONING_REQUIRED_COMMANDS }
|
|
234
|
+
export default chainOfThought
|
|
@@ -686,14 +686,21 @@ export function requiresVerification(commandName: string): boolean {
|
|
|
686
686
|
return ['done', 'ship', 'feature', 'spec', 'now', 'init', 'sync', 'analyze'].includes(commandName)
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
-
|
|
690
|
-
// Default Export
|
|
691
|
-
// =============================================================================
|
|
692
|
-
|
|
693
|
-
export default {
|
|
689
|
+
const groundTruth = {
|
|
694
690
|
verify,
|
|
695
691
|
prepareCommand,
|
|
696
692
|
requiresVerification,
|
|
697
693
|
verifiers,
|
|
698
694
|
formatWarnings,
|
|
695
|
+
formatDuration,
|
|
696
|
+
escapeRegex,
|
|
697
|
+
verifyDone,
|
|
698
|
+
verifyShip,
|
|
699
|
+
verifyFeature,
|
|
700
|
+
verifyNow,
|
|
701
|
+
verifyInit,
|
|
702
|
+
verifySync,
|
|
703
|
+
verifyAnalyze,
|
|
704
|
+
verifySpec,
|
|
699
705
|
}
|
|
706
|
+
export default groundTruth
|
package/core/agentic/index.ts
CHANGED
|
@@ -104,7 +104,13 @@ export type {
|
|
|
104
104
|
export { default as AgentRouter } from './agent-router'
|
|
105
105
|
// ============ Utilities ============
|
|
106
106
|
// Chain of thought, services
|
|
107
|
-
export {
|
|
107
|
+
export {
|
|
108
|
+
default as chainOfThought,
|
|
109
|
+
formatPlan,
|
|
110
|
+
REASONING_REQUIRED_COMMANDS,
|
|
111
|
+
reason,
|
|
112
|
+
requiresReasoning,
|
|
113
|
+
} from './chain-of-thought'
|
|
108
114
|
// ============ Execution ============
|
|
109
115
|
// Command execution, loop detection
|
|
110
116
|
export {
|
|
@@ -174,7 +180,13 @@ export { default as promptBuilder } from './prompt-builder'
|
|
|
174
180
|
export { default as services } from './services'
|
|
175
181
|
export { default as smartContext } from './smart-context'
|
|
176
182
|
export { default as templateExecutor, TemplateExecutor } from './template-executor'
|
|
177
|
-
export {
|
|
183
|
+
export {
|
|
184
|
+
clearCache,
|
|
185
|
+
default as templateLoader,
|
|
186
|
+
getAllowedTools,
|
|
187
|
+
load,
|
|
188
|
+
parseFrontmatter,
|
|
189
|
+
} from './template-loader'
|
|
178
190
|
// ============ Tools ============
|
|
179
191
|
// Tool and template management
|
|
180
192
|
export { default as toolRegistry } from './tool-registry'
|
|
@@ -65,17 +65,26 @@ import { calculateConfidence, MEMORY_TAGS } from '../types/memory'
|
|
|
65
65
|
// =============================================================================
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Abstract base class for project-scoped, disk-backed stores with in-memory caching.
|
|
69
69
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
70
|
+
* Provides lazy loading, automatic directory creation on save, and project-scoped
|
|
71
|
+
* cache invalidation. Subclasses only need to define the filename, default data
|
|
72
|
+
* structure, and optionally a subdirectory or post-load normalization hook.
|
|
73
73
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* -
|
|
77
|
-
*
|
|
78
|
-
*
|
|
74
|
+
* Extended by {@link PatternStore} and {@link SemanticMemories}.
|
|
75
|
+
*
|
|
76
|
+
* @typeParam T - The shape of the stored data (e.g., `Patterns`, `MemoryDatabase`)
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* class MyStore extends CachedStore<MyData> {
|
|
81
|
+
* protected getFilename() { return 'my-data.json' }
|
|
82
|
+
* protected getDefault() { return { items: [] } }
|
|
83
|
+
* }
|
|
84
|
+
*
|
|
85
|
+
* const store = new MyStore()
|
|
86
|
+
* const data = await store.load('project-id')
|
|
87
|
+
* ```
|
|
79
88
|
*/
|
|
80
89
|
export abstract class CachedStore<T> {
|
|
81
90
|
private _data: T | null = null
|
|
@@ -83,24 +92,33 @@ export abstract class CachedStore<T> {
|
|
|
83
92
|
private _projectId: string | null = null
|
|
84
93
|
|
|
85
94
|
/**
|
|
86
|
-
*
|
|
95
|
+
* Return the filename for this store (e.g., `'patterns.json'`).
|
|
96
|
+
* @returns The JSON filename used for disk persistence
|
|
87
97
|
*/
|
|
88
98
|
protected abstract getFilename(): string
|
|
89
99
|
|
|
90
100
|
/**
|
|
91
|
-
*
|
|
101
|
+
* Return the default data structure when the file does not exist on disk.
|
|
102
|
+
* @returns A fresh default instance of `T`
|
|
92
103
|
*/
|
|
93
104
|
protected abstract getDefault(): T
|
|
94
105
|
|
|
95
106
|
/**
|
|
96
|
-
* Optional
|
|
107
|
+
* Optional subdirectory within the project's `memory/` folder.
|
|
108
|
+
* Override to nest the store file under a subfolder.
|
|
109
|
+
*
|
|
110
|
+
* @returns Subdirectory name, or `null` to store directly in `memory/`
|
|
97
111
|
*/
|
|
98
112
|
protected getSubdirectory(): string | null {
|
|
99
113
|
return null
|
|
100
114
|
}
|
|
101
115
|
|
|
102
116
|
/**
|
|
103
|
-
*
|
|
117
|
+
* Build the full filesystem path for this store's JSON file.
|
|
118
|
+
*
|
|
119
|
+
* @param projectId - The project identifier used for path resolution
|
|
120
|
+
* @returns Absolute path to the store file
|
|
121
|
+
* (e.g., `~/.prjct-cli/projects/{id}/memory/patterns.json`)
|
|
104
122
|
*/
|
|
105
123
|
protected getPath(projectId: string): string {
|
|
106
124
|
const basePath = path.join(pathManager.getGlobalProjectPath(projectId), 'memory')
|
|
@@ -114,8 +132,20 @@ export abstract class CachedStore<T> {
|
|
|
114
132
|
}
|
|
115
133
|
|
|
116
134
|
/**
|
|
117
|
-
* Load data from disk
|
|
118
|
-
*
|
|
135
|
+
* Load data from disk with project-scoped caching.
|
|
136
|
+
*
|
|
137
|
+
* Returns cached data immediately if already loaded for the same project.
|
|
138
|
+
* Otherwise reads from disk, falling back to {@link getDefault} when the
|
|
139
|
+
* file does not exist. Calls {@link afterLoad} after a successful disk read.
|
|
140
|
+
*
|
|
141
|
+
* @param projectId - The project identifier
|
|
142
|
+
* @returns The loaded (or cached) data
|
|
143
|
+
* @throws {Error} If the file read fails for reasons other than ENOENT
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```ts
|
|
147
|
+
* const patterns = await patternStore.load('my-project-id')
|
|
148
|
+
* ```
|
|
119
149
|
*/
|
|
120
150
|
async load(projectId: string): Promise<T> {
|
|
121
151
|
// Return cached if same project and loaded
|
|
@@ -146,15 +176,25 @@ export abstract class CachedStore<T> {
|
|
|
146
176
|
}
|
|
147
177
|
|
|
148
178
|
/**
|
|
149
|
-
* Hook for subclasses to normalize data after loading
|
|
150
|
-
*
|
|
179
|
+
* Hook for subclasses to normalize or migrate data after loading from disk.
|
|
180
|
+
*
|
|
181
|
+
* Called once per disk read (not on cache hits). Override to ensure
|
|
182
|
+
* structural invariants — e.g., adding missing index keys.
|
|
183
|
+
*
|
|
184
|
+
* @param _data - The freshly loaded data to normalize (mutate in place)
|
|
151
185
|
*/
|
|
152
186
|
protected afterLoad(_data: T): void {
|
|
153
187
|
// Override in subclass if needed
|
|
154
188
|
}
|
|
155
189
|
|
|
156
190
|
/**
|
|
157
|
-
*
|
|
191
|
+
* Persist the current in-memory data to disk.
|
|
192
|
+
*
|
|
193
|
+
* Creates parent directories automatically if they don't exist.
|
|
194
|
+
* No-op if no data has been loaded yet.
|
|
195
|
+
*
|
|
196
|
+
* @param projectId - The project identifier for path resolution
|
|
197
|
+
* @throws {Error} If the file write fails
|
|
158
198
|
*/
|
|
159
199
|
async save(projectId: string): Promise<void> {
|
|
160
200
|
if (!this._data) return
|
|
@@ -165,21 +205,39 @@ export abstract class CachedStore<T> {
|
|
|
165
205
|
}
|
|
166
206
|
|
|
167
207
|
/**
|
|
168
|
-
*
|
|
208
|
+
* Access the cached data without triggering a disk read.
|
|
209
|
+
*
|
|
210
|
+
* @returns The cached data, or `null` if nothing has been loaded
|
|
169
211
|
*/
|
|
170
212
|
protected getData(): T | null {
|
|
171
213
|
return this._data
|
|
172
214
|
}
|
|
173
215
|
|
|
174
216
|
/**
|
|
175
|
-
*
|
|
217
|
+
* Replace the in-memory data directly. Does not persist to disk —
|
|
218
|
+
* call {@link save} afterwards if persistence is needed.
|
|
219
|
+
*
|
|
220
|
+
* @param data - The new data to cache
|
|
176
221
|
*/
|
|
177
222
|
protected setData(data: T): void {
|
|
178
223
|
this._data = data
|
|
179
224
|
}
|
|
180
225
|
|
|
181
226
|
/**
|
|
182
|
-
*
|
|
227
|
+
* Atomically load, transform, and save data in one operation.
|
|
228
|
+
*
|
|
229
|
+
* @param projectId - The project identifier
|
|
230
|
+
* @param updater - Pure function that receives current data and returns updated data
|
|
231
|
+
* @returns The updated data after saving
|
|
232
|
+
* @throws {Error} If load or save fails
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* await store.update('my-project', (data) => ({
|
|
237
|
+
* ...data,
|
|
238
|
+
* count: data.count + 1,
|
|
239
|
+
* }))
|
|
240
|
+
* ```
|
|
183
241
|
*/
|
|
184
242
|
async update(projectId: string, updater: (data: T) => T): Promise<T> {
|
|
185
243
|
const data = await this.load(projectId)
|
|
@@ -190,7 +248,11 @@ export abstract class CachedStore<T> {
|
|
|
190
248
|
}
|
|
191
249
|
|
|
192
250
|
/**
|
|
193
|
-
* Check
|
|
251
|
+
* Check whether data has been loaded into the cache.
|
|
252
|
+
*
|
|
253
|
+
* @param projectId - If provided, checks that data is loaded for this specific project.
|
|
254
|
+
* If omitted, returns `true` if any project's data is cached.
|
|
255
|
+
* @returns `true` if data is loaded (and matches the project, when specified)
|
|
194
256
|
*/
|
|
195
257
|
isLoaded(projectId?: string): boolean {
|
|
196
258
|
if (projectId) {
|
|
@@ -200,7 +262,8 @@ export abstract class CachedStore<T> {
|
|
|
200
262
|
}
|
|
201
263
|
|
|
202
264
|
/**
|
|
203
|
-
*
|
|
265
|
+
* Clear the in-memory cache, forcing a fresh disk read on the next {@link load} call.
|
|
266
|
+
* Does not delete or modify the file on disk.
|
|
204
267
|
*/
|
|
205
268
|
reset(): void {
|
|
206
269
|
this._data = null
|
package/core/agentic/services.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import { services } from './services'
|
|
13
13
|
*
|
|
14
14
|
* // Instead of:
|
|
15
|
-
* import templateLoader from './template-loader'
|
|
15
|
+
* import * as templateLoader from './template-loader'
|
|
16
16
|
* import contextBuilder from './context-builder'
|
|
17
17
|
* // ... 12 more imports
|
|
18
18
|
*
|
|
@@ -208,11 +208,11 @@ You are executing a prjct command as ${context.agentName}. Follow the template-f
|
|
|
208
208
|
b) What technologies exist in this project
|
|
209
209
|
c) What agents are available in ${context.paths.agentsDir}
|
|
210
210
|
|
|
211
|
-
- **
|
|
212
|
-
(
|
|
211
|
+
- **IMPORTANT**: The agents in ${context.paths.agentsDir} are already project-specific
|
|
212
|
+
(they were generated during p. sync with the actual project technologies)
|
|
213
213
|
|
|
214
|
-
-
|
|
215
|
-
-
|
|
214
|
+
- ALWAYS use the specialist if one exists for the domain
|
|
215
|
+
- Only use the generalist if there is NO agent for that domain
|
|
216
216
|
|
|
217
217
|
- Check if task should be fragmented (read: ${context.paths.taskFragmentation})
|
|
218
218
|
- If agents loaded, check their skills and load from ${context.paths.skillsDir}
|
|
@@ -105,11 +105,5 @@ export function clearCache(): void {
|
|
|
105
105
|
cacheOrder.length = 0
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
export default {
|
|
111
|
-
load,
|
|
112
|
-
parseFrontmatter,
|
|
113
|
-
getAllowedTools,
|
|
114
|
-
clearCache,
|
|
115
|
-
}
|
|
108
|
+
const templateLoader = { load, parseFrontmatter, getAllowedTools, clearCache }
|
|
109
|
+
export default templateLoader
|
package/core/bus/bus.ts
CHANGED
package/core/bus/index.ts
CHANGED
package/core/cli/start.ts
CHANGED
package/core/commands/base.ts
CHANGED
|
@@ -20,9 +20,9 @@ import type {
|
|
|
20
20
|
CommandResult,
|
|
21
21
|
ProjectContext,
|
|
22
22
|
} from '../types'
|
|
23
|
-
import dateHelper from '../utils/date-helper'
|
|
23
|
+
import * as dateHelper from '../utils/date-helper'
|
|
24
24
|
import * as fileHelper from '../utils/file-helper'
|
|
25
|
-
import jsonlHelper from '../utils/jsonl-helper'
|
|
25
|
+
import * as jsonlHelper from '../utils/jsonl-helper'
|
|
26
26
|
import out from '../utils/output'
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import path from 'node:path'
|
|
7
|
-
import authorDetector from '../infrastructure/author-detector'
|
|
7
|
+
import * as authorDetector from '../infrastructure/author-detector'
|
|
8
8
|
import commandInstaller from '../infrastructure/command-installer'
|
|
9
9
|
import { generateUUID } from '../schemas'
|
|
10
10
|
import type { Priority, TaskSection, TaskType } from '../schemas/state'
|
package/core/constants/index.ts
CHANGED
|
@@ -323,6 +323,25 @@ export const EVENT_LIMITS = {
|
|
|
323
323
|
HISTORY_MAX: 100,
|
|
324
324
|
} as const
|
|
325
325
|
|
|
326
|
+
// =============================================================================
|
|
327
|
+
// Workflow Help Strings (user-facing, no magic strings)
|
|
328
|
+
// =============================================================================
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Example commands shown in workflow preferences help.
|
|
332
|
+
* Keeps UI copy in English and centralized.
|
|
333
|
+
*/
|
|
334
|
+
export const WORKFLOW_HELP = {
|
|
335
|
+
/** Message when no workflow preferences are configured */
|
|
336
|
+
NO_PREFERENCES: 'No workflow preferences configured.',
|
|
337
|
+
/** Example: set a before-ship hook to run tests */
|
|
338
|
+
SET_EXAMPLE: 'p. workflow before ship run the tests',
|
|
339
|
+
/** Example: modify workflow to run npm test */
|
|
340
|
+
MODIFY_EXAMPLE: 'p. workflow before ship run npm test',
|
|
341
|
+
/** Example: remove the ship hook */
|
|
342
|
+
REMOVE_EXAMPLE: 'p. workflow remove the ship hook',
|
|
343
|
+
} as const
|
|
344
|
+
|
|
326
345
|
// =============================================================================
|
|
327
346
|
// Combined Exports
|
|
328
347
|
// =============================================================================
|
|
@@ -575,9 +575,3 @@ function isTestFile(filePath: string): boolean {
|
|
|
575
575
|
lower.endsWith('_test.py')
|
|
576
576
|
)
|
|
577
577
|
}
|
|
578
|
-
|
|
579
|
-
// =============================================================================
|
|
580
|
-
// Exports
|
|
581
|
-
// =============================================================================
|
|
582
|
-
|
|
583
|
-
export default { findRelevantFiles }
|
|
@@ -395,9 +395,3 @@ async function buildDependencyTree(
|
|
|
395
395
|
|
|
396
396
|
return node
|
|
397
397
|
}
|
|
398
|
-
|
|
399
|
-
// =============================================================================
|
|
400
|
-
// Exports
|
|
401
|
-
// =============================================================================
|
|
402
|
-
|
|
403
|
-
export default { analyzeImports }
|
|
@@ -299,9 +299,3 @@ function shouldIgnore(filePath: string): boolean {
|
|
|
299
299
|
|
|
300
300
|
return false
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
// =============================================================================
|
|
304
|
-
// Exports
|
|
305
|
-
// =============================================================================
|
|
306
|
-
|
|
307
|
-
export default { getRecentFiles }
|
|
@@ -493,9 +493,3 @@ function cleanSignature(signature: string): string {
|
|
|
493
493
|
.replace(/\s+/g, ' ') // Normalize whitespace
|
|
494
494
|
.trim()
|
|
495
495
|
}
|
|
496
|
-
|
|
497
|
-
// =============================================================================
|
|
498
|
-
// Exports
|
|
499
|
-
// =============================================================================
|
|
500
|
-
|
|
501
|
-
export default { extractSignatures, extractDirectorySignatures }
|
|
@@ -299,9 +299,3 @@ function buildSummaryText(
|
|
|
299
299
|
|
|
300
300
|
return parts.join('\n')
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
// =============================================================================
|
|
304
|
-
// Exports
|
|
305
|
-
// =============================================================================
|
|
306
|
-
|
|
307
|
-
export default { summarizeFile, summarizeDirectory }
|
|
@@ -271,16 +271,3 @@ export function formatCompressionRate(rate: number): string {
|
|
|
271
271
|
// =============================================================================
|
|
272
272
|
|
|
273
273
|
export { formatCostSaved }
|
|
274
|
-
|
|
275
|
-
export default {
|
|
276
|
-
countTokens,
|
|
277
|
-
measureCompression,
|
|
278
|
-
noCompression,
|
|
279
|
-
combineMetrics,
|
|
280
|
-
formatTokenCount,
|
|
281
|
-
formatCompressionRate,
|
|
282
|
-
formatCostSaved,
|
|
283
|
-
CHARS_PER_TOKEN,
|
|
284
|
-
MODEL_PRICING,
|
|
285
|
-
DEFAULT_MODEL,
|
|
286
|
-
}
|
|
@@ -133,16 +133,3 @@ export async function isClaude(): Promise<boolean> {
|
|
|
133
133
|
export async function isTerminal(): Promise<boolean> {
|
|
134
134
|
return !(await isClaude())
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
// ============ Default Export (backwards compat) ============
|
|
138
|
-
|
|
139
|
-
export default {
|
|
140
|
-
detect,
|
|
141
|
-
isClaudeEnvironment,
|
|
142
|
-
getClaudeAgent,
|
|
143
|
-
getTerminalAgent,
|
|
144
|
-
setAgent,
|
|
145
|
-
reset,
|
|
146
|
-
isClaude,
|
|
147
|
-
isTerminal,
|
|
148
|
-
}
|
|
@@ -529,32 +529,3 @@ export async function selectProvider(): Promise<ProviderSelectionResult> {
|
|
|
529
529
|
detection,
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
|
|
533
|
-
// =============================================================================
|
|
534
|
-
// Exports
|
|
535
|
-
// =============================================================================
|
|
536
|
-
|
|
537
|
-
export default {
|
|
538
|
-
Providers,
|
|
539
|
-
ClaudeProvider,
|
|
540
|
-
GeminiProvider,
|
|
541
|
-
CursorProvider,
|
|
542
|
-
AntigravityProvider,
|
|
543
|
-
WindsurfProvider,
|
|
544
|
-
detectProvider,
|
|
545
|
-
detectAllProviders,
|
|
546
|
-
detectAntigravity,
|
|
547
|
-
getActiveProvider,
|
|
548
|
-
hasProviderConfig,
|
|
549
|
-
getProviderBranding,
|
|
550
|
-
getGlobalContextPath,
|
|
551
|
-
getGlobalSettingsPath,
|
|
552
|
-
getSkillsPath,
|
|
553
|
-
getCommandsDir,
|
|
554
|
-
getProjectCommandsPath,
|
|
555
|
-
selectProvider,
|
|
556
|
-
detectCursorProject,
|
|
557
|
-
needsCursorRouterRegeneration,
|
|
558
|
-
detectWindsurfProject,
|
|
559
|
-
needsWindsurfRouterRegeneration,
|
|
560
|
-
}
|
|
@@ -131,17 +131,3 @@ export function formatAuthor(author: DetectedAuthorInfo): string {
|
|
|
131
131
|
|
|
132
132
|
return parts.join(' ') || 'Unknown'
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
// ============ Default Export (backwards compat) ============
|
|
136
|
-
|
|
137
|
-
export default {
|
|
138
|
-
detect,
|
|
139
|
-
detectAuthorForLogs,
|
|
140
|
-
detectGitHubUsername,
|
|
141
|
-
detectGitName,
|
|
142
|
-
detectGitEmail,
|
|
143
|
-
isGitHubCLIAvailable,
|
|
144
|
-
isGitConfigured,
|
|
145
|
-
getConfigStatus,
|
|
146
|
-
formatAuthor,
|
|
147
|
-
}
|
|
@@ -18,7 +18,7 @@ import type { Author, GlobalConfig, LocalConfig } from '../types'
|
|
|
18
18
|
import { isNotFoundError } from '../types/fs'
|
|
19
19
|
import { getTimestamp } from '../utils/date-helper'
|
|
20
20
|
import { VERSION } from '../utils/version'
|
|
21
|
-
import authorDetector from './author-detector'
|
|
21
|
+
import * as authorDetector from './author-detector'
|
|
22
22
|
import pathManager from './path-manager'
|
|
23
23
|
|
|
24
24
|
// Re-export types for convenience
|