@buaa_smat/hometrans 26.0.4-devecocli.1 → 26.0.5

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 (134) hide show
  1. package/README.md +440 -0
  2. package/agents/code-reviewer.md +2 -0
  3. package/agents/model-render-worker.md +1 -1
  4. package/dist/cli/config-store.js +128 -0
  5. package/dist/cli/config.js +48 -0
  6. package/dist/cli/editors.json +114 -0
  7. package/dist/cli/env-vars.js +127 -0
  8. package/dist/cli/index.js +76 -0
  9. package/dist/cli/init.js +2618 -0
  10. package/dist/cli/uninstall.js +406 -0
  11. package/dist/platform/compose.js +228 -0
  12. package/dist/platform/frontmatter.js +151 -0
  13. package/dist/platform/installer.js +417 -0
  14. package/dist/platform/language.js +77 -0
  15. package/dist/platform/registry.js +337 -0
  16. package/dist/platform/transform.js +363 -0
  17. package/dist/platform/types.js +9 -0
  18. package/dist/platform/validate.js +152 -0
  19. package/dist/utils/regex.js +7 -0
  20. package/env-requirements.json +536 -0
  21. package/i18n/agents/code-reviewer.md +2 -0
  22. package/i18n/agents/model-render-worker.md +1 -1
  23. package/i18n/skills/a2h-app-migrate/SKILL.md +51 -3
  24. package/i18n/skills/a2h-app-migrate/references/workflow.yaml +140 -32
  25. package/i18n/skills/a2h-app-migrate/scripts/dag_graph.mjs +297 -0
  26. package/i18n/skills/a2h-app-migrate/scripts/validate_workflow.mjs +134 -21
  27. package/i18n/skills/a2h-app-migrate/test/test_finalize.mjs +21 -4
  28. package/i18n/skills/a2h-app-migrate/test/test_image_probe.mjs +3 -3
  29. package/i18n/skills/a2h-app-migrate/test/test_resume_plan.mjs +1 -1
  30. package/i18n/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +1 -1
  31. package/i18n/skills/a2h-app-migrate/test/test_utg_static_done.mjs +12 -5
  32. package/i18n/skills/a2h-arkts-logic-coder/SKILL.md +7 -8
  33. package/i18n/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -1
  34. package/i18n/skills/a2h-arkts-logic-coder/references/code-generation.md +27 -15
  35. package/i18n/skills/a2h-batch-ui-align/SKILL.md +1 -1
  36. package/i18n/skills/a2h-batch-ui-align/references/cards/widgets.md +4 -0
  37. package/i18n/skills/a2h-batch-ui-align/references/checker-rules.md +36 -0
  38. package/i18n/skills/a2h-batch-ui-align/references/conversion-procedure.md +4 -0
  39. package/i18n/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +4 -0
  40. package/i18n/skills/a2h-batch-ui-align/references/step5-convert.md +3 -3
  41. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/main.ts +8 -0
  42. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_in_linear.ts +164 -0
  43. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/self_drawn_sheet.ts +105 -0
  44. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/staggered_lanes.ts +127 -0
  45. package/i18n/skills/a2h-batch-ui-align/scripts/static_check/rules/window_size_constant.ts +114 -0
  46. package/i18n/skills/a2h-page-specgen/references/scenario-authoring.md +4 -1
  47. package/i18n/skills/a2h-page-specgen/references/spec-example.md +35 -5
  48. package/i18n/skills/a2h-page-specgen/references/spec-template.md +4 -4
  49. package/i18n/skills/a2h-spec-generate/SKILL.md +3 -1
  50. package/i18n/skills/a2h-spec-generate/references/fusion-task-contract.md +15 -3
  51. package/i18n/skills/a2h-spec-generate/references/review-checklist.md +1 -0
  52. package/i18n/skills/a2h-spec-generate/references/spec-sample-complex.md +16 -0
  53. package/i18n/skills/a2h-spec-generate/references/spec-sample-transfer.md +16 -0
  54. package/i18n/skills/a2h-spec-generate/references/spec-samples.md +5 -1
  55. package/i18n/skills/a2h-spec-generate/references/synthesis-rules.md +21 -1
  56. package/i18n/skills/a2h-spec-generate/references/worker-rules.md +25 -2
  57. package/i18n/skills/a2h-spec-generate/scripts/check_spec.ts +121 -6
  58. package/i18n/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +2 -1
  59. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +3 -0
  60. package/i18n/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +16 -2
  61. package/i18n/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +11 -2
  62. package/i18n/skills/a2h-spec-generate/test/check-spec.test.ts +35 -0
  63. package/package.json +8 -8
  64. package/resource/choose_editor.png +0 -0
  65. package/resource/convert_pipeline_process.svg +114 -0
  66. package/resource/project_architecture.svg +120 -0
  67. package/resource/set_environment.png +0 -0
  68. package/resource/set_multimodel.png +0 -0
  69. package/resource/set_sdk.png +0 -0
  70. package/resource/title_dark.png +0 -0
  71. package/skills/a2h-app-migrate/SKILL.md +53 -5
  72. package/skills/a2h-app-migrate/references/workflow.yaml +140 -32
  73. package/skills/a2h-app-migrate/scripts/assert_dag_complete.mjs +226 -0
  74. package/skills/a2h-app-migrate/scripts/dag_graph.mjs +297 -0
  75. package/skills/a2h-app-migrate/scripts/dag_process_executor.mjs +199 -0
  76. package/skills/a2h-app-migrate/scripts/dag_production_executor.mjs +897 -0
  77. package/skills/a2h-app-migrate/scripts/dag_runner.mjs +1767 -0
  78. package/skills/a2h-app-migrate/scripts/ledger.mjs +15 -2
  79. package/skills/a2h-app-migrate/scripts/lib-yaml-lite.mjs +8 -2
  80. package/skills/a2h-app-migrate/scripts/resume_plan.mjs +3 -8
  81. package/skills/a2h-app-migrate/scripts/validate_workflow.mjs +134 -21
  82. package/skills/a2h-app-migrate/test/test_dag_complete.mjs +222 -0
  83. package/skills/a2h-app-migrate/test/test_dag_production.mjs +670 -0
  84. package/skills/a2h-app-migrate/test/test_dag_runner.mjs +423 -0
  85. package/skills/a2h-app-migrate/test/test_finalize.mjs +21 -4
  86. package/skills/a2h-app-migrate/test/test_image_probe.mjs +1 -1
  87. package/skills/a2h-app-migrate/test/test_resume_plan.mjs +16 -1
  88. package/skills/a2h-app-migrate/test/test_reuse_static_utg.mjs +1 -1
  89. package/skills/a2h-app-migrate/test/test_utg_static_done.mjs +12 -5
  90. package/skills/a2h-arkts-logic-coder/SKILL.md +7 -8
  91. package/skills/a2h-arkts-logic-coder/references/ISSUES.md +1 -1
  92. package/skills/a2h-arkts-logic-coder/references/code-generation.md +27 -15
  93. package/skills/a2h-batch-ui-align/SKILL.md +1 -1
  94. package/skills/a2h-batch-ui-align/references/cards/widgets.md +4 -0
  95. package/skills/a2h-batch-ui-align/references/checker-rules.md +36 -0
  96. package/skills/a2h-batch-ui-align/references/conversion-procedure.md +4 -0
  97. package/skills/a2h-batch-ui-align/references/mappings/android-to-harmonyOS-ui-layout-mapping-reference.md +4 -0
  98. package/skills/a2h-batch-ui-align/references/step5-convert.md +3 -3
  99. package/skills/a2h-batch-ui-align/scripts/group_queue.mjs +49 -3
  100. package/skills/a2h-batch-ui-align/scripts/static_check/core/android.ts +36 -0
  101. package/skills/a2h-batch-ui-align/scripts/static_check/main.ts +8 -0
  102. package/skills/a2h-batch-ui-align/scripts/static_check/registry.ts +8 -0
  103. package/skills/a2h-batch-ui-align/scripts/static_check/rules/overlay_in_linear.ts +164 -0
  104. package/skills/a2h-batch-ui-align/scripts/static_check/rules/self_drawn_sheet.ts +105 -0
  105. package/skills/a2h-batch-ui-align/scripts/static_check/rules/staggered_lanes.ts +127 -0
  106. package/skills/a2h-batch-ui-align/scripts/static_check/rules/window_size_constant.ts +114 -0
  107. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_coolmall_ds1123.test.mjs +433 -0
  108. package/skills/a2h-batch-ui-align/scripts/tests/arkts_static_check_overlay_in_linear.test.mjs +288 -0
  109. package/skills/a2h-batch-ui-align/scripts/tests/group_queue.test.mjs +46 -0
  110. package/skills/a2h-page-specgen/references/scenario-authoring.md +4 -1
  111. package/skills/a2h-page-specgen/references/spec-example.md +35 -5
  112. package/skills/a2h-page-specgen/references/spec-template.md +4 -4
  113. package/skills/a2h-spec-generate/SKILL.md +3 -1
  114. package/skills/a2h-spec-generate/references/fusion-task-contract.md +15 -3
  115. package/skills/a2h-spec-generate/references/review-checklist.md +1 -0
  116. package/skills/a2h-spec-generate/references/spec-sample-complex.md +16 -0
  117. package/skills/a2h-spec-generate/references/spec-sample-transfer.md +16 -0
  118. package/skills/a2h-spec-generate/references/spec-samples.md +5 -1
  119. package/skills/a2h-spec-generate/references/synthesis-rules.md +21 -1
  120. package/skills/a2h-spec-generate/references/worker-rules.md +25 -2
  121. package/skills/a2h-spec-generate/scripts/check-fused-spec.mjs +3 -1
  122. package/skills/a2h-spec-generate/scripts/check_spec.ts +262 -6
  123. package/skills/a2h-spec-generate/scripts/reqgen/src/fusion/task-contract.ts +12 -2
  124. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-behavior-e2e.test.ts +3 -0
  125. package/skills/a2h-spec-generate/scripts/reqgen/test/fusion-spec.test.ts +16 -2
  126. package/skills/a2h-spec-generate/test/check-fused-spec.test.mjs +54 -3
  127. package/skills/a2h-spec-generate/test/check-spec.test.ts +247 -0
  128. package/devecocli-plugin/common.ts +0 -2271
  129. package/devecocli-plugin/content-resolver.ts +0 -363
  130. package/devecocli-plugin/install.ts +0 -72
  131. package/devecocli-plugin/uninstall.ts +0 -26
  132. package/devecocli-plugin/update.ts +0 -77
  133. package/index.js +0 -1643
  134. package/plugin.jsonc +0 -12
@@ -0,0 +1,114 @@
1
+ {
2
+ "editors": [
3
+ {
4
+ "name": "claude-code",
5
+ "displayName": "Claude Code",
6
+ "markerDir": "~/.claude",
7
+ "skillsDir": "~/.claude/skills",
8
+ "agentsDir": "~/.claude/agents",
9
+ "commandsDir": "~/.claude/commands",
10
+ "agentFormat": "claude",
11
+ "commandKeepKeys": [
12
+ "description",
13
+ "argument-hint",
14
+ "allowed-tools",
15
+ "model",
16
+ "disable-model-invocation",
17
+ "context"
18
+ ]
19
+ },
20
+ {
21
+ "name": "cursor",
22
+ "displayName": "Cursor",
23
+ "markerDir": "~/.cursor",
24
+ "skillsDir": "~/.cursor/skills",
25
+ "agentsDir": "~/.cursor/agents",
26
+ "commandsDir": "~/.cursor/commands",
27
+ "agentFormat": "cursor",
28
+ "commandKeepKeys": ["description"]
29
+ },
30
+ {
31
+ "name": "opencode",
32
+ "displayName": "OpenCode",
33
+ "markerDir": "~/.config/opencode",
34
+ "skillsDir": "~/.config/opencode/skills",
35
+ "agentsDir": "~/.config/opencode/agents",
36
+ "commandsDir": "~/.config/opencode/commands",
37
+ "agentFormat": "passthrough",
38
+ "skillDescriptionLimit": 1024,
39
+ "commandKeepKeys": ["description", "agent", "subtask", "model"]
40
+ },
41
+ {
42
+ "name": "deveco",
43
+ "displayName": "DevEco Code",
44
+ "markerDir": "~/.config/deveco",
45
+ "skillsDir": "~/.config/deveco/skills",
46
+ "agentsDir": "~/.config/deveco/agents",
47
+ "commandsDir": "~/.config/deveco/commands",
48
+ "agentFormat": "passthrough",
49
+ "skillDescriptionLimit": 1024,
50
+ "commandKeepKeys": ["description", "agent", "subtask", "model"]
51
+ },
52
+ {
53
+ "name": "codex",
54
+ "displayName": "Codex",
55
+ "markerDir": "~/.codex",
56
+ "rootEnvVar": "CODEX_HOME",
57
+ "skillsDir": "~/.codex/skills",
58
+ "agentsDir": "~/.codex/agents",
59
+ "commandsDir": null,
60
+ "agentFormat": "codex-toml",
61
+ "commandKeepKeys": [],
62
+ "commandsAsSkills": true,
63
+ "legacyDirs": [{ "commandsDir": "~/.codex/prompts" }]
64
+ },
65
+ {
66
+ "name": "codebuddy",
67
+ "displayName": "CodeBuddy",
68
+ "markerDir": "~/.codebuddy",
69
+ "skillsDir": "~/.codebuddy/skills",
70
+ "agentsDir": "~/.codebuddy/agents",
71
+ "commandsDir": "~/.codebuddy/commands",
72
+ "agentFormat": "codebuddy",
73
+ "commandKeepKeys": [
74
+ "description",
75
+ "argument-hint",
76
+ "model",
77
+ "allowed-tools",
78
+ "disable-model-invocation"
79
+ ]
80
+ },
81
+ {
82
+ "name": "trae",
83
+ "displayName": "Trae",
84
+ "markerDir": "~/.trae",
85
+ "skillsDir": "~/.trae/skills",
86
+ "agentsDir": "~/.trae/agents",
87
+ "commandsDir": "~/.trae/commands",
88
+ "agentFormat": "trae",
89
+ "commandKeepKeys": ["name", "description"]
90
+ },
91
+ {
92
+ "name": "qoder",
93
+ "displayName": "Qoder",
94
+ "markerDir": "~/.qoder",
95
+ "skillsDir": "~/.qoder/skills",
96
+ "agentsDir": "~/.qoder/agents",
97
+ "commandsDir": "~/.qoder/commands",
98
+ "agentFormat": "qoder",
99
+ "commandKeepKeys": ["description"]
100
+ },
101
+ {
102
+ "name": "atomcode",
103
+ "displayName": "AtomCode",
104
+ "markerDir": "~/.atomcode",
105
+ "skillsDir": "~/.atomcode/skills",
106
+ "agentsDir": "~/.atomcode/agents",
107
+ "commandsDir": null,
108
+ "agentFormat": "atomcode-role",
109
+ "commandKeepKeys": [],
110
+ "commandsAsSkills": true,
111
+ "legacyDirs": [{ "commandsDir": "~/.atomcode/commands" }]
112
+ }
113
+ ]
114
+ }
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Persist the SDK paths `ht init` resolves as real OS environment variables —
3
+ * the only place they are kept (there is no config file); tools, shells and
4
+ * skills read them straight from the environment.
5
+ *
6
+ * Cross-platform:
7
+ * - Windows: `setx NAME "VALUE"` — writes to the per-user environment (HKCU);
8
+ * visible in newly opened terminals.
9
+ * - macOS / Linux: a marked, idempotent block of `export NAME="VALUE"` lines
10
+ * appended to the user's shell rc file (~/.zshrc / ~/.bashrc / ~/.profile).
11
+ */
12
+ import { execFileSync } from 'node:child_process';
13
+ import fs from 'node:fs/promises';
14
+ import os from 'node:os';
15
+ import path from 'node:path';
16
+ import { escapeRegExp } from '../utils/regex.js';
17
+ const BLOCK_BEGIN = '# >>> hometrans env >>>';
18
+ const BLOCK_END = '# <<< hometrans env <<<';
19
+ /** Pick the shell rc file to write exports into, based on $SHELL. */
20
+ export function unixProfilePath(homeDir, shell) {
21
+ if (shell.includes('zsh'))
22
+ return path.join(homeDir, '.zshrc');
23
+ if (shell.includes('bash'))
24
+ return path.join(homeDir, '.bashrc');
25
+ return path.join(homeDir, '.profile');
26
+ }
27
+ /** Build the managed export block for POSIX shells. */
28
+ export function buildUnixBlock(vars) {
29
+ const lines = vars.map(([name, value]) => `export ${name}="${value.replace(/(["\\$`])/g, '\\$1')}"`);
30
+ return [BLOCK_BEGIN, ...lines, BLOCK_END].join('\n');
31
+ }
32
+ /** Insert or replace the marked block in `content`, returning the new content. */
33
+ export function upsertBlock(content, block) {
34
+ const re = new RegExp(`${escapeRegExp(BLOCK_BEGIN)}[\\s\\S]*?${escapeRegExp(BLOCK_END)}`);
35
+ if (re.test(content))
36
+ return content.replace(re, block);
37
+ const trimmed = content.replace(/\s*$/, '');
38
+ return (trimmed ? `${trimmed}\n\n` : '') + `${block}\n`;
39
+ }
40
+ /**
41
+ * Strip the managed hometrans block (including surrounding blank lines) from
42
+ * `content`. Returns the new content and whether anything was removed.
43
+ */
44
+ export function stripBlock(content) {
45
+ const re = new RegExp(`\\n*${escapeRegExp(BLOCK_BEGIN)}[\\s\\S]*?${escapeRegExp(BLOCK_END)}\\n*`);
46
+ if (!re.test(content))
47
+ return { content, changed: false };
48
+ const next = content.replace(re, '\n').replace(/\n{3,}/g, '\n\n');
49
+ return { content: next, changed: true };
50
+ }
51
+ async function persistUnix(vars) {
52
+ const profile = unixProfilePath(os.homedir(), process.env.SHELL ?? '');
53
+ let content = '';
54
+ try {
55
+ content = await fs.readFile(profile, 'utf-8');
56
+ }
57
+ catch {
58
+ content = '';
59
+ }
60
+ await fs.writeFile(profile, upsertBlock(content, buildUnixBlock(vars)), 'utf-8');
61
+ return profile;
62
+ }
63
+ function persistWindows(vars) {
64
+ for (const [name, value] of vars) {
65
+ // No shell: each value is passed as a single argv, so spaces are safe.
66
+ execFileSync('setx', [name, value], { stdio: ['ignore', 'ignore', 'ignore'] });
67
+ }
68
+ }
69
+ /**
70
+ * Persist `vars` to the machine's per-user environment. Returns a short note
71
+ * describing where they were written and how to activate them.
72
+ */
73
+ export async function persistEnvVars(vars) {
74
+ if (vars.length === 0)
75
+ return 'no values to set';
76
+ if (process.platform === 'win32') {
77
+ persistWindows(vars);
78
+ return 'written to the Windows user environment (setx) — open a new terminal to use them';
79
+ }
80
+ const profile = await persistUnix(vars);
81
+ return `written to ${profile} — run \`source ${profile}\` or open a new terminal to use them`;
82
+ }
83
+ function removeWindows(names) {
84
+ let removed = 0;
85
+ for (const name of names) {
86
+ try {
87
+ // Delete the value from the per-user environment (HKCU\Environment),
88
+ // mirroring how `setx` writes it. Missing values throw — ignore those.
89
+ execFileSync('reg', ['delete', 'HKCU\\Environment', '/v', name, '/f'], {
90
+ stdio: ['ignore', 'ignore', 'ignore'],
91
+ });
92
+ removed++;
93
+ }
94
+ catch {
95
+ // value wasn't present — nothing to remove
96
+ }
97
+ }
98
+ return removed;
99
+ }
100
+ /**
101
+ * Remove previously persisted HomeTrans env vars from the machine.
102
+ * - Windows: `reg delete HKCU\Environment /v NAME /f` for each name.
103
+ * - macOS / Linux: strip the marked export block from the shell rc file
104
+ * (the `names` are ignored — the whole managed block is removed).
105
+ * Returns a short note describing what happened.
106
+ */
107
+ export async function removeEnvVars(names) {
108
+ if (process.platform === 'win32') {
109
+ const removed = removeWindows(names);
110
+ return removed > 0
111
+ ? `removed ${removed} variable(s) from the Windows user environment — open a new terminal to refresh`
112
+ : 'no HomeTrans variables found in the Windows user environment';
113
+ }
114
+ const profile = unixProfilePath(os.homedir(), process.env.SHELL ?? '');
115
+ let content;
116
+ try {
117
+ content = await fs.readFile(profile, 'utf-8');
118
+ }
119
+ catch {
120
+ return 'no shell profile found — nothing to remove';
121
+ }
122
+ const { content: next, changed } = stripBlock(content);
123
+ if (!changed)
124
+ return `no HomeTrans export block found in ${profile}`;
125
+ await fs.writeFile(profile, next, 'utf-8');
126
+ return `removed the HomeTrans export block from ${profile} — open a new terminal to refresh`;
127
+ }
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ import { Command, Option } from 'commander';
3
+ import { createRequire } from 'node:module';
4
+ import chalk from 'chalk';
5
+ import { initCommand, createOfflineBundle } from './init.js';
6
+ import { configCommand } from './config.js';
7
+ import { uninstallCommand } from './uninstall.js';
8
+ import { INSTALL_LANGUAGES } from '../platform/language.js';
9
+ const _require = createRequire(import.meta.url);
10
+ const pkg = _require('../../package.json');
11
+ /**
12
+ * Global Ctrl-C safety net.
13
+ *
14
+ * inquirer intercepts Ctrl-C as a keypress *inside* a prompt (raw mode) and the
15
+ * per-command catches print a tailored "Cancelled" notice there. But Ctrl-C
16
+ * pressed *outside* a prompt — e.g. while `init` is copying files or `uninstall`
17
+ * is deleting — arrives as an OS SIGINT, which Node would otherwise terminate on
18
+ * silently. This handler guarantees a cancel notice in that case too.
19
+ *
20
+ */
21
+ let interrupted = false;
22
+ function onSigint() {
23
+ if (interrupted)
24
+ process.exit(130);
25
+ interrupted = true;
26
+ console.log(chalk.yellow('\n Cancelled by Ctrl-C. No further changes will be made.\n'));
27
+ process.exit(130);
28
+ }
29
+ process.on('SIGINT', onSigint);
30
+ const program = new Command();
31
+ program
32
+ .name('hometrans')
33
+ .description('HomeTrans installer — distribute Android-to-HarmonyOS skills and agents into AI editors')
34
+ .version(pkg.version);
35
+ program
36
+ .command('init')
37
+ .description('Initialize HomeTrans — select editors and install skills and agents')
38
+ .option('-a, --all', 'Skip interactive selection and configure all editors')
39
+ .option('--force', 'Overwrite existing items without asking (disables the conflict prompt)')
40
+ .addOption(new Option('--lang <lang>', 'Language of the installed content (asked interactively when omitted; --all defaults to zh)')
41
+ .choices([...INSTALL_LANGUAGES]))
42
+ .option('--offline-bundle <dir>', 'Install dependencies offline from a bundle created by `ht offline-bundle` (no network access needed). ' +
43
+ 'Pick the bundle tarball matching the machine (see hometransTarballs in its manifest.json)')
44
+ .action(async (opts) => {
45
+ await initCommand(opts);
46
+ });
47
+ program
48
+ .command('offline-bundle')
49
+ .description('Create an offline dependency bundle for air-gapped machines: packs a self-contained ' +
50
+ 'hometrans tarball (whole dependency closure inside; one cross-platform build unless a ' +
51
+ 'runtime dependency ships native binaries), writes install.sh / install.ps1 bootstrap ' +
52
+ 'scripts that auto-select the right tarball on the offline machine, and seeds an npm ' +
53
+ 'cache usable by old AND new npm (packument accept-variant cloning). Every skill is ' +
54
+ 'Node-only, so no Python/pip wheels are bundled. The offline machine installs and ' +
55
+ 'initializes with one command: install.sh / install.ps1 (tarball install + ' +
56
+ '`ht init --offline-bundle` in the same process).')
57
+ .argument('<dir>', 'directory to create the bundle in')
58
+ .action(async (dir) => {
59
+ await createOfflineBundle(dir);
60
+ });
61
+ program
62
+ .command('config')
63
+ .description('Show the bundled editor table and the SDK environment variables the skills read (read-only; there is no config file).')
64
+ .action(async () => {
65
+ await configCommand();
66
+ });
67
+ program
68
+ .command('uninstall')
69
+ .description('Remove all hometrans skills and agents from configured editors')
70
+ .action(async () => {
71
+ await uninstallCommand();
72
+ });
73
+ program.parseAsync(process.argv).catch((err) => {
74
+ console.error(err instanceof Error ? err.message : err);
75
+ process.exit(1);
76
+ });