@harmonyos-arkts/d2h 0.1.26 → 0.1.28

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 (52) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/AGENTS.md +2 -0
  3. package/README.md +34 -2
  4. package/agents/d2h.md +24 -23
  5. package/dist/bin/install-opencode.js +36 -24
  6. package/dist/src/install-codex.js +5 -126
  7. package/dist/src/install-skills.js +147 -0
  8. package/dist/src/install-tui-extension.js +133 -0
  9. package/dist/src/install-vscode.js +2 -2
  10. package/dist/src/toolchain.js +2 -2
  11. package/docs/environment-check.md +3 -3
  12. package/package.json +6 -6
  13. package/skills/arkts-mvvm-architecture/SKILL.md +2 -0
  14. package/skills/d2h-architecture-plan/SKILL.md +21 -19
  15. package/skills/d2h-architecture-plan/references/architecture-plan.example.json +122 -0
  16. package/skills/d2h-architecture-plan/references/directory-creation.md +27 -29
  17. package/skills/d2h-architecture-plan/references/hybrid-design.md +13 -15
  18. package/skills/d2h-architecture-plan/references/json-contract.md +49 -0
  19. package/skills/d2h-architecture-plan/references/layout-reference.md +30 -27
  20. package/skills/d2h-architecture-plan/references/plan-contract.md +27 -32
  21. package/skills/d2h-architecture-plan/references/source-review.md +1 -1
  22. package/skills/d2h-architecture-plan/scripts/architecture_plan.py +147 -0
  23. package/skills/d2h-architecture-plan/scripts/test_architecture_plan.py +241 -0
  24. package/skills/d2h-dashboard/SKILL.md +12 -1
  25. package/skills/d2h-spec-develop/SKILL.md +52 -42
  26. package/skills/d2h-spec-generate/SKILL.md +30 -29
  27. package/skills/d2h-spec-plan/SKILL.md +20 -16
  28. package/skills/d2h-spec-plan/agents/openai.yaml +3 -3
  29. package/skills/d2h-spec-plan/references/plan-contract.md +32 -7
  30. package/skills/d2h-spec-plan/references/planning-method.md +12 -62
  31. package/skills/d2h-spec-plan/references/planning-review.md +9 -21
  32. package/skills/d2h-spec-plan/references/round-scope-assessment.md +12 -39
  33. package/skills/d2h-spec-plan/references/work-packets.md +6 -28
  34. package/{install-opencode.sh → tooling/install-opencode.sh} +3 -3
  35. package/{opencode → tooling/opencode}/interactive-tools/advance-progress-demo.mjs +1 -1
  36. package/{opencode → tooling/opencode}/interactive-tools/demo.mjs +3 -3
  37. package/{opencode → tooling/opencode}/interactive-tools/prepare-demo.mjs +1 -1
  38. package/{scripts → tooling/scripts}/check-environment.mjs +3 -3
  39. /package/{opencode → tooling/opencode}/agents.json +0 -0
  40. /package/{opencode → tooling/opencode}/interactive-tools/browser-host.ts +0 -0
  41. /package/{opencode → tooling/opencode}/interactive-tools/core.ts +0 -0
  42. /package/{opencode → tooling/opencode}/interactive-tools/demo-workflow.ts +0 -0
  43. /package/{opencode → tooling/opencode}/interactive-tools/package-lock.json +0 -0
  44. /package/{opencode → tooling/opencode}/interactive-tools/package.json +0 -0
  45. /package/{opencode → tooling/opencode}/interactive-tools/panel.ts +0 -0
  46. /package/{opencode → tooling/opencode}/interactive-tools/prepare-progress-demo.mjs +0 -0
  47. /package/{opencode → tooling/opencode}/interactive-tools/progress.ts +0 -0
  48. /package/{opencode → tooling/opencode}/interactive-tools/server-legacy.mjs +0 -0
  49. /package/{opencode → tooling/opencode}/interactive-tools/server.mjs +0 -0
  50. /package/{opencode → tooling/opencode}/interactive-tools/tui.tsx +0 -0
  51. /package/{opencode → tooling/opencode}/vscode-d2h-package.json +0 -0
  52. /package/{opencode → tooling/opencode}/vscode-d2h-plugin.mjs +0 -0
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { fileURLToPath, pathToFileURL } from 'node:url';
4
- import { demoWorkflow } from '../../dist/opencode/interactive-tools/demo-workflow.js';
4
+ import { demoWorkflow } from '../../../dist/opencode/interactive-tools/demo-workflow.js';
5
5
 
6
6
  const root = path.dirname(fileURLToPath(import.meta.url));
7
7
  const project = path.resolve(process.argv[2] || path.join(root, '../../../validation/interactive-tools-mvp', `opencode-${Date.now()}`));
@@ -6,7 +6,7 @@ import { spawn, spawnSync } from 'node:child_process';
6
6
  import { fileURLToPath, pathToFileURL } from 'node:url';
7
7
  import { parseArgs } from 'node:util';
8
8
 
9
- const DEFAULT_REQUIREMENTS = fileURLToPath(new URL('../skills/managing-d2h-toolchain/environment-requirements.json', import.meta.url));
9
+ const DEFAULT_REQUIREMENTS = fileURLToPath(new URL('../../skills/managing-d2h-toolchain/environment-requirements.json', import.meta.url));
10
10
  const VERSION_TOOLS = ['node', 'python', 'git', 'npm', 'java', 'python-json5', 'appgraph', 'droid2hmos', 'hvigor', 'ohpm', 'devecocli'];
11
11
  const CATEGORY_LABELS = {
12
12
  runtime: '运行环境',
@@ -354,7 +354,7 @@ export function parseOptions(argv) {
354
354
  timeout: { type: 'string', default: '15' }, 'output-dir': { type: 'string' }, help: { type: 'boolean', short: 'h' },
355
355
  } });
356
356
  if (!/^\d+$/.test(values.timeout) || Number(values.timeout) < 1 || Number(values.timeout) > 60) throw new Error('--timeout 必须为 1–60 的整数');
357
- return { pluginRoot: values['plugin-root'] || fileURLToPath(new URL('../', import.meta.url)),
357
+ return { pluginRoot: values['plugin-root'] || fileURLToPath(new URL('../../', import.meta.url)),
358
358
  requirementsFile: values.requirements ? path.resolve(values.requirements) : DEFAULT_REQUIREMENTS,
359
359
  androidProject: values['android-project'], sdkPath: values['sdk-path'],
360
360
  harmonyProject: values['harmony-project'],
@@ -366,7 +366,7 @@ export async function main(argv = process.argv.slice(2)) {
366
366
  let options;
367
367
  try { options = parseOptions(argv); } catch (error) { console.error(error.message); return 2; }
368
368
  if (options.help) {
369
- console.log('用法:node scripts/check-environment.mjs [--plugin-root <path>] [--android-project <path>]\n [--harmony-project <path>] [--sdk-path <path>] [--requirements <json>]\n [--timeout <1–60 秒>] [--output-dir <path>]\n默认版本约束来自 skills/managing-d2h-toolchain/environment-requirements.json。只写报告,不自动安装依赖或修改配置。');
369
+ console.log('用法:node tooling/scripts/check-environment.mjs [--plugin-root <path>] [--android-project <path>]\n [--harmony-project <path>] [--sdk-path <path>] [--requirements <json>]\n [--timeout <1–60 秒>] [--output-dir <path>]\n默认版本约束来自 skills/managing-d2h-toolchain/environment-requirements.json。只写报告,不自动安装依赖或修改配置。');
370
370
  return 0;
371
371
  }
372
372
  const report = await collect(options);
File without changes