prjct-cli 0.15.1 → 0.17.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 +35 -0
- package/bin/dev.js +0 -1
- package/bin/serve.js +19 -20
- package/core/agentic/agent-router.ts +79 -14
- package/core/agentic/command-executor/command-executor.ts +2 -74
- package/core/agentic/services.ts +0 -48
- package/core/agentic/template-loader.ts +35 -1
- package/core/commands/base.ts +96 -77
- package/core/commands/planning.ts +13 -2
- package/core/commands/setup.ts +3 -85
- package/core/errors.ts +209 -0
- package/core/infrastructure/config-manager.ts +22 -5
- package/core/infrastructure/setup.ts +5 -50
- package/core/storage/storage-manager.ts +42 -6
- package/core/utils/logger.ts +19 -12
- package/package.json +2 -4
- package/templates/agentic/subagent-generation.md +109 -0
- package/templates/commands/sync.md +74 -13
- package/templates/subagents/domain/backend.md +105 -0
- package/templates/subagents/domain/database.md +118 -0
- package/templates/subagents/domain/devops.md +148 -0
- package/templates/subagents/domain/frontend.md +99 -0
- package/templates/subagents/domain/testing.md +169 -0
- package/templates/subagents/workflow/prjct-planner.md +158 -0
- package/templates/subagents/workflow/prjct-shipper.md +179 -0
- package/templates/subagents/workflow/prjct-workflow.md +98 -0
- package/bin/generate-views.js +0 -209
- package/bin/migrate-to-json.js +0 -742
- package/core/agentic/context-filter.ts +0 -365
- package/core/agentic/parallel-tools.ts +0 -165
- package/core/agentic/response-templates.ts +0 -164
- package/core/agentic/semantic-compression.ts +0 -273
- package/core/agentic/think-blocks.ts +0 -202
- package/core/agentic/validation-rules.ts +0 -313
- package/core/domain/agent-matcher.ts +0 -130
- package/core/domain/agent-validator.ts +0 -250
- package/core/domain/architect-session.ts +0 -315
- package/core/domain/product-standards.ts +0 -106
- package/core/domain/smart-cache.ts +0 -167
- package/core/domain/task-analyzer.ts +0 -296
- package/core/infrastructure/legacy-installer-detector/cleanup.ts +0 -216
- package/core/infrastructure/legacy-installer-detector/detection.ts +0 -95
- package/core/infrastructure/legacy-installer-detector/index.ts +0 -171
- package/core/infrastructure/legacy-installer-detector/migration.ts +0 -87
- package/core/infrastructure/legacy-installer-detector/types.ts +0 -42
- package/core/infrastructure/legacy-installer-detector.ts +0 -7
- package/core/infrastructure/migrator/file-operations.ts +0 -125
- package/core/infrastructure/migrator/index.ts +0 -288
- package/core/infrastructure/migrator/project-scanner.ts +0 -90
- package/core/infrastructure/migrator/reports.ts +0 -117
- package/core/infrastructure/migrator/types.ts +0 -124
- package/core/infrastructure/migrator/validation.ts +0 -94
- package/core/infrastructure/migrator/version-migration.ts +0 -117
- package/core/infrastructure/migrator.ts +0 -10
- package/core/infrastructure/uuid-migration.ts +0 -750
- package/templates/commands/migrate-all.md +0 -96
- package/templates/commands/migrate.md +0 -140
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version Migration
|
|
3
|
-
* Handles migration between prjct versions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import configManager from '../config-manager'
|
|
7
|
-
import type { Author, VersionMigrationResult } from './types'
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Check if a project needs migration
|
|
11
|
-
*/
|
|
12
|
-
export async function needsMigration(projectPath: string): Promise<boolean> {
|
|
13
|
-
const structureMigration = await configManager.needsMigration(projectPath)
|
|
14
|
-
if (structureMigration) return true
|
|
15
|
-
|
|
16
|
-
const config = await configManager.readConfig(projectPath)
|
|
17
|
-
if (config && config.version && config.version.startsWith('0.2.')) {
|
|
18
|
-
return true
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return false
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Migrate config from 0.2.x to 0.3.0 (move authors to global config)
|
|
26
|
-
*/
|
|
27
|
-
export async function migrateConfigTo030(projectPath: string): Promise<VersionMigrationResult> {
|
|
28
|
-
const result: VersionMigrationResult = {
|
|
29
|
-
success: false,
|
|
30
|
-
message: '',
|
|
31
|
-
oldVersion: null,
|
|
32
|
-
newVersion: '0.3.0',
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
const localConfig = await configManager.readConfig(projectPath)
|
|
37
|
-
if (!localConfig) {
|
|
38
|
-
result.message = 'No config found'
|
|
39
|
-
return result
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
result.oldVersion = localConfig.version || null
|
|
43
|
-
const projectId = localConfig.projectId
|
|
44
|
-
|
|
45
|
-
const globalConfig = await configManager.readGlobalConfig(projectId)
|
|
46
|
-
if (globalConfig && globalConfig.authors && globalConfig.authors.length > 0) {
|
|
47
|
-
const needsCleanup =
|
|
48
|
-
localConfig.authors ||
|
|
49
|
-
localConfig.author ||
|
|
50
|
-
localConfig.version ||
|
|
51
|
-
localConfig.created ||
|
|
52
|
-
localConfig.lastSync
|
|
53
|
-
|
|
54
|
-
if (needsCleanup) {
|
|
55
|
-
delete localConfig.authors
|
|
56
|
-
delete localConfig.author
|
|
57
|
-
delete localConfig.version
|
|
58
|
-
delete localConfig.created
|
|
59
|
-
delete localConfig.lastSync
|
|
60
|
-
await configManager.writeConfig(projectPath, localConfig)
|
|
61
|
-
}
|
|
62
|
-
result.success = true
|
|
63
|
-
result.message = 'Authors already in global config, cleaned up local config'
|
|
64
|
-
return result
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
let authors: Author[] = []
|
|
68
|
-
const now = new Date().toISOString()
|
|
69
|
-
|
|
70
|
-
if (localConfig.authors && Array.isArray(localConfig.authors)) {
|
|
71
|
-
authors = localConfig.authors
|
|
72
|
-
} else if (localConfig.author) {
|
|
73
|
-
authors = [
|
|
74
|
-
{
|
|
75
|
-
name: localConfig.author.name || 'Unknown',
|
|
76
|
-
email: localConfig.author.email || '',
|
|
77
|
-
github: localConfig.author.github || '',
|
|
78
|
-
firstContribution: localConfig.created || now,
|
|
79
|
-
lastActivity: localConfig.lastSync || now,
|
|
80
|
-
},
|
|
81
|
-
]
|
|
82
|
-
} else {
|
|
83
|
-
authors = [
|
|
84
|
-
{
|
|
85
|
-
name: 'Unknown',
|
|
86
|
-
email: '',
|
|
87
|
-
github: '',
|
|
88
|
-
firstContribution: now,
|
|
89
|
-
lastActivity: now,
|
|
90
|
-
},
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const newGlobalConfig = {
|
|
95
|
-
projectId,
|
|
96
|
-
authors,
|
|
97
|
-
version: '0.3.0',
|
|
98
|
-
created: localConfig.created || now,
|
|
99
|
-
lastSync: now,
|
|
100
|
-
}
|
|
101
|
-
await configManager.writeGlobalConfig(projectId, newGlobalConfig)
|
|
102
|
-
|
|
103
|
-
delete localConfig.authors
|
|
104
|
-
delete localConfig.author
|
|
105
|
-
delete localConfig.version
|
|
106
|
-
delete localConfig.created
|
|
107
|
-
delete localConfig.lastSync
|
|
108
|
-
await configManager.writeConfig(projectPath, localConfig)
|
|
109
|
-
|
|
110
|
-
result.success = true
|
|
111
|
-
result.message = `Migrated ${authors.length} author(s) to global config`
|
|
112
|
-
return result
|
|
113
|
-
} catch (error) {
|
|
114
|
-
result.message = `Migration failed: ${(error as Error).message}`
|
|
115
|
-
return result
|
|
116
|
-
}
|
|
117
|
-
}
|