prizmkit 1.1.101 → 1.1.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +1 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +14 -2
  4. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +9 -3
  5. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +5 -1
  6. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +62 -4
  7. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +13 -13
  8. package/bundled/dev-pipeline/templates/agent-prompts/dev-implement.md +1 -1
  9. package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +1 -1
  10. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
  11. package/bundled/dev-pipeline/templates/bootstrap-tier1.md +6 -7
  12. package/bundled/dev-pipeline/templates/bootstrap-tier2.md +1 -1
  13. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +1 -1
  14. package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +7 -7
  15. package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +7 -7
  16. package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +8 -17
  17. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -2
  18. package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +1 -3
  19. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -3
  20. package/bundled/dev-pipeline/templates/sections/phase0-test-baseline.md +3 -8
  21. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +2 -2
  22. package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +1 -1
  23. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +11 -7
  24. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +107 -11
  25. package/bundled/dev-pipeline/tests/test_unified_cli.py +76 -0
  26. package/bundled/skills/_metadata.json +1 -1
  27. package/package.json +1 -1
  28. package/src/config.js +9 -7
  29. package/src/external-skills.js +14 -14
  30. package/src/manifest.js +8 -3
  31. package/src/platforms.js +25 -0
  32. package/src/scaffold.js +11 -6
  33. package/src/upgrade.js +11 -2
package/src/scaffold.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  } from './metadata.js';
28
28
  import { generateGitignore } from './gitignore-template.js';
29
29
  import { buildManifest, writeManifest } from './manifest.js';
30
- import { defaultCliForPlatform, expandPlatforms, isKnownPlatform, platformLabel, projectMemoryFile } from './platforms.js';
30
+ import { defaultCliForPlatform, expandPlatforms, isKnownPlatform, platformLabel, projectMemoryFile, resolvePayloadPlatforms } from './platforms.js';
31
31
  import { normalizeRuntime, runtimeLabel } from './runtimes.js';
32
32
 
33
33
  const __scaffoldDirname = dirname(fileURLToPath(import.meta.url));
@@ -1436,6 +1436,7 @@ export async function scaffold(config) {
1436
1436
  throw new Error(`Unknown platform "${platform}". Expected codebuddy, claude, codex, or all.`);
1437
1437
  }
1438
1438
  const platforms = expandPlatforms(platform);
1439
+ const payloadPlatforms = resolvePayloadPlatforms(platform, aiCli);
1439
1440
 
1440
1441
  if (dryRun) {
1441
1442
  console.log(chalk.yellow('\n [DRY RUN] 预览将要安装的内容:\n'));
@@ -1446,8 +1447,8 @@ export async function scaffold(config) {
1446
1447
 
1447
1448
  console.log('');
1448
1449
 
1449
- for (const p of platforms) {
1450
- console.log(chalk.bold(` 正在安装 ${platformLabel(p)} 环境...\n`));
1450
+ for (const p of payloadPlatforms) {
1451
+ console.log(chalk.bold(` 正在安装 ${platformLabel(p)} 环境...${platforms.includes(p) ? '' : chalk.gray(' (AI CLI payload)')}\n`));
1451
1452
 
1452
1453
  // 1. Skills
1453
1454
  console.log(chalk.blue(' 技能文件:'));
@@ -1515,7 +1516,7 @@ export async function scaffold(config) {
1515
1516
  const skillDef = knownSkills.find(s => s.name === name);
1516
1517
  if (skillDef) {
1517
1518
  try {
1518
- await installExternalSkill(skillDef, platform, projectRoot, dryRun);
1519
+ await installExternalSkill(skillDef, platform, projectRoot, dryRun, aiCli);
1519
1520
  console.log(chalk.green(` ✓ ${name} (external)`));
1520
1521
  } catch (e) {
1521
1522
  console.log(chalk.yellow(` ⚠ ${name} 安装失败,跳过: ${e.message}`));
@@ -1523,7 +1524,7 @@ export async function scaffold(config) {
1523
1524
  }
1524
1525
  }
1525
1526
  if (!dryRun) {
1526
- await cleanExternalSkillArtifacts(projectRoot, platform);
1527
+ await cleanExternalSkillArtifacts(projectRoot, platform, aiCli);
1527
1528
  }
1528
1529
  }
1529
1530
 
@@ -1545,7 +1546,7 @@ export async function scaffold(config) {
1545
1546
  // 11. Clean up stray .codebuddy/ directory left by third-party tools (e.g. npx skills)
1546
1547
  // when installing for Claude Code only. CodeBuddy files should never appear in a
1547
1548
  // claude-only install.
1548
- if (!dryRun && !platforms.includes('codebuddy')) {
1549
+ if (!dryRun && !payloadPlatforms.includes('codebuddy')) {
1549
1550
  const strayCbDir = path.join(projectRoot, '.codebuddy');
1550
1551
  if (await fs.pathExists(strayCbDir)) {
1551
1552
  const entries = await fs.readdir(strayCbDir);
@@ -1584,6 +1585,7 @@ export async function scaffold(config) {
1584
1585
  aiCli,
1585
1586
  rulesPreset: rulesPresetName,
1586
1587
  extras: activeExtras,
1588
+ payloadPlatforms,
1587
1589
  });
1588
1590
  await writeManifest(projectRoot, manifest);
1589
1591
  console.log(chalk.green(' ✓ .prizmkit/manifest.json'));
@@ -1632,6 +1634,9 @@ export async function scaffold(config) {
1632
1634
  console.log(chalk.gray(` 安装统计:`));
1633
1635
  console.log(chalk.gray(` 技能: ${suiteLabel}`));
1634
1636
  console.log(chalk.gray(` 平台: ${platforms.map(platformLabel).join(' + ')}`));
1637
+ if (payloadPlatforms.length !== platforms.length || payloadPlatforms.some(p => !platforms.includes(p))) {
1638
+ console.log(chalk.gray(` AI CLI 载荷平台: ${payloadPlatforms.map(platformLabel).join(' + ')}`));
1639
+ }
1635
1640
  console.log(chalk.gray(` 运行时: ${runtimeLabel(runtime)}`));
1636
1641
  console.log(chalk.gray(` 团队: ${team ? '已启用' : '未启用'}`));
1637
1642
  console.log(chalk.gray(` 流水线: ${pipeline ? '已安装' : '未安装'}`));
package/src/upgrade.js CHANGED
@@ -27,6 +27,7 @@ import {
27
27
  installGitHook,
28
28
  installGitignore,
29
29
  installProjectMemory,
30
+ installTeamConfig,
30
31
  resolvePipelineFileList,
31
32
  findStaleManagedPipelineFiles,
32
33
  removeStaleManagedPipelineFiles,
@@ -34,7 +35,7 @@ import {
34
35
  resolveSkillList,
35
36
  EXTRAS_REGISTRY,
36
37
  } from './scaffold.js';
37
- import { expandPlatforms, platformLabel } from './platforms.js';
38
+ import { platformLabel, resolvePayloadPlatforms } from './platforms.js';
38
39
  import { normalizeRuntime, runtimeLabel } from './runtimes.js';
39
40
 
40
41
  const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -276,6 +277,8 @@ export async function runUpgrade(directory, options = {}) {
276
277
  ...(!oldManifest?.files?.extras ? Object.keys(EXTRAS_REGISTRY) : []),
277
278
  ])].filter(name => EXTRAS_REGISTRY[name]); // only keep extras that still exist in registry
278
279
 
280
+ const payloadPlatforms = resolvePayloadPlatforms(platform, aiCli);
281
+
279
282
  // 4. Build new manifest and compute diff
280
283
  const newManifest = buildManifest({
281
284
  version: pkg.version,
@@ -290,6 +293,7 @@ export async function runUpgrade(directory, options = {}) {
290
293
  aiCli,
291
294
  rulesPreset,
292
295
  extras: extrasToInstall,
296
+ payloadPlatforms,
293
297
  });
294
298
 
295
299
  // Preserve original installedAt
@@ -349,7 +353,7 @@ export async function runUpgrade(directory, options = {}) {
349
353
  }
350
354
 
351
355
  // 7. Execute
352
- const platforms = expandPlatforms(platform);
356
+ const platforms = payloadPlatforms;
353
357
 
354
358
  // 7a. Remove orphaned files
355
359
  if (diff.skills.removed.length || diff.agents.removed.length || diff.rules.removed.length || diff.pipeline.removed.length || staleManagedPipelineFiles.length) {
@@ -396,6 +400,11 @@ export async function runUpgrade(directory, options = {}) {
396
400
  console.log(chalk.blue('\n Settings & Rules:'));
397
401
  await installSettings(p, projectRoot, { pipeline, rules: rulesPreset }, dryRun, runtime);
398
402
 
403
+ if (team) {
404
+ console.log(chalk.blue('\n Team Config:'));
405
+ await installTeamConfig(p, projectRoot, dryRun);
406
+ }
407
+
399
408
  console.log('');
400
409
  }
401
410