strikethroo 3.14.3 → 3.16.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.
Files changed (93) hide show
  1. package/README.md +52 -31
  2. package/dist/__tests__/fixtures/review-gate.d.ts +59 -0
  3. package/dist/__tests__/fixtures/review-gate.d.ts.map +1 -0
  4. package/dist/__tests__/fixtures/review-gate.js +150 -0
  5. package/dist/__tests__/fixtures/review-gate.js.map +1 -0
  6. package/dist/cli.js +19 -0
  7. package/dist/cli.js.map +1 -1
  8. package/dist/export-profile.d.ts +50 -0
  9. package/dist/export-profile.d.ts.map +1 -0
  10. package/dist/export-profile.js +321 -0
  11. package/dist/export-profile.js.map +1 -0
  12. package/dist/harnesses/registry.d.ts +4 -2
  13. package/dist/harnesses/registry.d.ts.map +1 -1
  14. package/dist/harnesses/registry.js +4 -2
  15. package/dist/harnesses/registry.js.map +1 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +67 -3
  18. package/dist/index.js.map +1 -1
  19. package/dist/profiles.d.ts +163 -0
  20. package/dist/profiles.d.ts.map +1 -0
  21. package/dist/profiles.js +561 -0
  22. package/dist/profiles.js.map +1 -0
  23. package/dist/types.d.ts +37 -0
  24. package/dist/types.d.ts.map +1 -1
  25. package/dist/types.js +15 -1
  26. package/dist/types.js.map +1 -1
  27. package/dist-web/assets/{arc-CsLKjSmD.js → arc-DMHUv2NY.js} +1 -1
  28. package/dist-web/assets/{architectureDiagram-3BPJPVTR-CUdI2ZME.js → architectureDiagram-3BPJPVTR-CeAAqVS4.js} +1 -1
  29. package/dist-web/assets/{blockDiagram-GPEHLZMM-BzGl3sJ5.js → blockDiagram-GPEHLZMM-Hns_u_jz.js} +1 -1
  30. package/dist-web/assets/{c4Diagram-AAUBKEIU-B9BcD268.js → c4Diagram-AAUBKEIU-BH3RLVAi.js} +1 -1
  31. package/dist-web/assets/channel-Dk0dEQIT.js +1 -0
  32. package/dist-web/assets/{chunk-2J33WTMH-jrfdvIhS.js → chunk-2J33WTMH-h6Ws9VXu.js} +1 -1
  33. package/dist-web/assets/{chunk-4BX2VUAB-BppnV9t3.js → chunk-4BX2VUAB-BSBeNNnS.js} +1 -1
  34. package/dist-web/assets/{chunk-55IACEB6-Dgig1qV7.js → chunk-55IACEB6-BmUY060b.js} +1 -1
  35. package/dist-web/assets/{chunk-727SXJPM-CssKzpPg.js → chunk-727SXJPM-CmemMVvQ.js} +1 -1
  36. package/dist-web/assets/{chunk-AQP2D5EJ-DWYbdfaL.js → chunk-AQP2D5EJ-LQpUb_FL.js} +1 -1
  37. package/dist-web/assets/{chunk-FMBD7UC4-Cbt7Dqxf.js → chunk-FMBD7UC4-wk7OYcdf.js} +1 -1
  38. package/dist-web/assets/{chunk-ND2GUHAM-2W-YdHxx.js → chunk-ND2GUHAM-O3K3rkHW.js} +1 -1
  39. package/dist-web/assets/{chunk-QZHKN3VN-BSLdTa36.js → chunk-QZHKN3VN-CvppUbp9.js} +1 -1
  40. package/dist-web/assets/classDiagram-4FO5ZUOK-gqDJqcDV.js +1 -0
  41. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-gqDJqcDV.js +1 -0
  42. package/dist-web/assets/{cose-bilkent-S5V4N54A-D0_MX2M6.js → cose-bilkent-S5V4N54A-Cf1nQ4V_.js} +1 -1
  43. package/dist-web/assets/{dagre-BM42HDAG-DGXkicI6.js → dagre-BM42HDAG-YyP7mwPP.js} +1 -1
  44. package/dist-web/assets/{diagram-2AECGRRQ-DMfWZxh-.js → diagram-2AECGRRQ-BmAtTKkQ.js} +1 -1
  45. package/dist-web/assets/{diagram-5GNKFQAL-IChrzosS.js → diagram-5GNKFQAL-Bem8_DUK.js} +1 -1
  46. package/dist-web/assets/{diagram-KO2AKTUF-C7IVA_Py.js → diagram-KO2AKTUF-0gNyY9-f.js} +1 -1
  47. package/dist-web/assets/{diagram-LMA3HP47-UQXc1x2n.js → diagram-LMA3HP47-CJJh_IUU.js} +1 -1
  48. package/dist-web/assets/{diagram-OG6HWLK6-Z69O_NXy.js → diagram-OG6HWLK6-DJcCho7F.js} +1 -1
  49. package/dist-web/assets/{erDiagram-TEJ5UH35-xrgfPZU-.js → erDiagram-TEJ5UH35-D-TI_EbX.js} +1 -1
  50. package/dist-web/assets/{flowDiagram-I6XJVG4X-Co-y5e2I.js → flowDiagram-I6XJVG4X-BUrB4EYN.js} +1 -1
  51. package/dist-web/assets/{ganttDiagram-6RSMTGT7-C9TOh3M1.js → ganttDiagram-6RSMTGT7-C9_ItheP.js} +1 -1
  52. package/dist-web/assets/{gitGraphDiagram-PVQCEYII-iBpK83U-.js → gitGraphDiagram-PVQCEYII-DYQEmll0.js} +1 -1
  53. package/dist-web/assets/{index-DaaOiRou.js → index-DULKNhw0.js} +4 -4
  54. package/dist-web/assets/{index-6RY653Ds.js → index-X-a-o-AT.js} +1 -1
  55. package/dist-web/assets/{index-D4y2EDE-.js → index-mEUl0sqe.js} +1 -1
  56. package/dist-web/assets/{infoDiagram-5YYISTIA-C-_CUdyF.js → infoDiagram-5YYISTIA-B06Tp7cb.js} +1 -1
  57. package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-zPkWZ6FX.js → ishikawaDiagram-YF4QCWOH-DY9iP3P6.js} +1 -1
  58. package/dist-web/assets/{journeyDiagram-JHISSGLW-CsTWcFHo.js → journeyDiagram-JHISSGLW-Bk4MV49m.js} +1 -1
  59. package/dist-web/assets/{kanban-definition-UN3LZRKU-CCsrhCu2.js → kanban-definition-UN3LZRKU-B9-wsNt9.js} +1 -1
  60. package/dist-web/assets/{linear-DlkSJnhW.js → linear-DEY9HwQB.js} +1 -1
  61. package/dist-web/assets/{mermaid.core-BM7nlTu6.js → mermaid.core-Cn0e4l6V.js} +4 -4
  62. package/dist-web/assets/{mindmap-definition-RKZ34NQL-C5tQ7zJH.js → mindmap-definition-RKZ34NQL-pN4Q2WNG.js} +1 -1
  63. package/dist-web/assets/{pieDiagram-4H26LBE5-CsK9eMOa.js → pieDiagram-4H26LBE5-DTkPv6S2.js} +1 -1
  64. package/dist-web/assets/{quadrantDiagram-W4KKPZXB-CsUwvpcD.js → quadrantDiagram-W4KKPZXB-BS9LhTv0.js} +1 -1
  65. package/dist-web/assets/{requirementDiagram-4Y6WPE33-CzQDuhAP.js → requirementDiagram-4Y6WPE33-BlSOLsQe.js} +1 -1
  66. package/dist-web/assets/{sankeyDiagram-5OEKKPKP-BTa3-BBs.js → sankeyDiagram-5OEKKPKP-B1xl-B1U.js} +1 -1
  67. package/dist-web/assets/{sequenceDiagram-3UESZ5HK-CPPduAn5.js → sequenceDiagram-3UESZ5HK-BoiYrW_0.js} +1 -1
  68. package/dist-web/assets/{stateDiagram-AJRCARHV-T5j3NpOr.js → stateDiagram-AJRCARHV-BxvfZYDK.js} +1 -1
  69. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-XGZY1tGg.js +1 -0
  70. package/dist-web/assets/{timeline-definition-PNZ67QCA-BG2gG3_T.js → timeline-definition-PNZ67QCA-CUEbrRkc.js} +1 -1
  71. package/dist-web/assets/{vennDiagram-CIIHVFJN-B3LyjiD_.js → vennDiagram-CIIHVFJN-CgQiBucH.js} +1 -1
  72. package/dist-web/assets/{wardley-L42UT6IY-CTsJTFG9.js → wardley-L42UT6IY-BsGW6T55.js} +1 -1
  73. package/dist-web/assets/{wardleyDiagram-YWT4CUSO-cmPISkrt.js → wardleyDiagram-YWT4CUSO-Cq3RMp6B.js} +1 -1
  74. package/dist-web/assets/{xychartDiagram-2RQKCTM6-BWy_dUgl.js → xychartDiagram-2RQKCTM6-WaoV-V3f.js} +1 -1
  75. package/dist-web/index.html +1 -1
  76. package/package.json +3 -3
  77. package/templates/harness/skills/st-code-review/SKILL.md +309 -0
  78. package/templates/harness/skills/st-code-review/scripts/code-review.cjs +1539 -0
  79. package/templates/harness/skills/st-code-review/scripts/find-strikethroo-root.cjs +116 -0
  80. package/templates/harness/skills/st-code-review/scripts/validate-plan-blueprint.cjs +429 -0
  81. package/templates/harness/skills/st-execute-blueprint/SKILL.md +48 -1
  82. package/templates/harness/skills/st-execute-blueprint/scripts/capture-base-commit.cjs +325 -0
  83. package/templates/harness/skills/st-execute-blueprint/scripts/dispatch-task-execution.cjs +46 -26
  84. package/templates/harness/skills/st-execute-task/scripts/dispatch-task-execution.cjs +46 -26
  85. package/templates/harness/skills/st-full-workflow/SKILL.md +48 -1
  86. package/templates/harness/skills/st-full-workflow/scripts/capture-base-commit.cjs +325 -0
  87. package/templates/harness/skills/st-full-workflow/scripts/dispatch-task-execution.cjs +46 -26
  88. package/templates/strikethroo/config/hooks/CODE_REVIEW.md +60 -0
  89. package/templates/strikethroo/config/schemas/self-review-v2.xsd +437 -0
  90. package/dist-web/assets/channel-CN9J8c_F.js +0 -1
  91. package/dist-web/assets/classDiagram-4FO5ZUOK-DHR8VHf9.js +0 -1
  92. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-DHR8VHf9.js +0 -1
  93. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-CXpXsXHt.js +0 -1
@@ -0,0 +1,561 @@
1
+ "use strict";
2
+ /**
3
+ * Profile Package Contract and Import Preparation
4
+ *
5
+ * Defines the manifest schema (`profile.yaml`) and on-disk surface every
6
+ * profile package — local folder or cloned repository — must satisfy, and
7
+ * owns the import steps that run before any workspace mutation: source
8
+ * resolution (local folder / GitHub shorthand / git URL), shallow-clone
9
+ * materialization of remote profiles, contract validation, and staging of
10
+ * the effective template tree (shipped defaults + profile overlay).
11
+ *
12
+ * Validation is side-effect-free: it only reads the package directory.
13
+ * Materialization and staging write only to temp directories under the OS
14
+ * temp root, and every temp directory is removed on every exit path.
15
+ */
16
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ var desc = Object.getOwnPropertyDescriptor(m, k);
19
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
+ desc = { enumerable: true, get: function() { return m[k]; } };
21
+ }
22
+ Object.defineProperty(o, k2, desc);
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || (function () {
33
+ var ownKeys = function(o) {
34
+ ownKeys = Object.getOwnPropertyNames || function (o) {
35
+ var ar = [];
36
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
37
+ return ar;
38
+ };
39
+ return ownKeys(o);
40
+ };
41
+ return function (mod) {
42
+ if (mod && mod.__esModule) return mod;
43
+ var result = {};
44
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
45
+ __setModuleDefault(result, mod);
46
+ return result;
47
+ };
48
+ })();
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.PROFILE_MANIFEST_SCHEMA_VERSION = void 0;
51
+ exports.validateProfilePackage = validateProfilePackage;
52
+ exports.resolveProfileSource = resolveProfileSource;
53
+ exports.prepareProfileImport = prepareProfileImport;
54
+ const child_process_1 = require("child_process");
55
+ const fs = __importStar(require("fs-extra"));
56
+ const os = __importStar(require("os"));
57
+ const path = __importStar(require("path"));
58
+ const util_1 = require("util");
59
+ const yaml = __importStar(require("js-yaml"));
60
+ const types_1 = require("./types");
61
+ const execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
62
+ /**
63
+ * Manifest schema version this CLI build understands.
64
+ *
65
+ * Profiles live in external repositories the CLI can never migrate, so a
66
+ * manifest declaring a different version is refused with a message naming
67
+ * both versions and the upgrade direction.
68
+ */
69
+ exports.PROFILE_MANIFEST_SCHEMA_VERSION = 1;
70
+ /**
71
+ * Kebab-case: lowercase alphanumeric segments separated by single hyphens
72
+ */
73
+ const KEBAB_CASE_PATTERN = /^[a-z0-9]+(-[a-z0-9]+)*$/;
74
+ /**
75
+ * Directories allowed directly under `config/`, each holding only `*.md` files
76
+ */
77
+ const ALLOWED_CONFIG_SUBDIRS = ['hooks', 'templates', 'shared'];
78
+ /**
79
+ * Files allowed directly under `config/`
80
+ */
81
+ const ALLOWED_CONFIG_ROOT_FILES = ['config.yaml', 'STRIKETHROO.md'];
82
+ /**
83
+ * Validate a profile package directory against the contract.
84
+ *
85
+ * Checks, in order: `profile.yaml` exists and parses as a YAML mapping, the
86
+ * manifest fields satisfy the schema, and the `config/` surface contains only
87
+ * allowed files. Top-level entries other than `profile.yaml` and `config/`
88
+ * are ignored (a repository may carry `README.md`, `.git`, etc.).
89
+ *
90
+ * @param profileDir - Absolute or relative path to the package root
91
+ * @returns The parsed manifest on success
92
+ * @throws ProfileError naming the offending field or file on any violation
93
+ */
94
+ async function validateProfilePackage(profileDir) {
95
+ const manifest = await readManifest(profileDir);
96
+ await validateConfigSurface(profileDir);
97
+ return manifest;
98
+ }
99
+ /**
100
+ * GitHub `<user>/<repo-name>` shorthand, tested only after the existing-path
101
+ * check fails
102
+ */
103
+ const GITHUB_SHORTHAND_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\/[A-Za-z0-9._-]+$/;
104
+ /**
105
+ * Prefix for every temp directory this module creates under the OS temp root
106
+ */
107
+ const PROFILE_TEMP_PREFIX = 'strikethroo-profile-';
108
+ /**
109
+ * Resolve a `--profile` value to its source.
110
+ *
111
+ * Resolution order is contractual: (a) the value names an existing directory
112
+ * on disk → local package folder; (b) the value matches the GitHub
113
+ * `<user>/<repo-name>` shorthand → expanded to the canonical GitHub clone
114
+ * URL; (c) otherwise → treated verbatim as a git URL (covers GitLab, ssh
115
+ * URLs, and any git host). The existing-path check runs first, so a relative
116
+ * local path that happens to look like `user/repo` resolves as the folder.
117
+ *
118
+ * @param value - The raw `--profile` argument
119
+ * @returns The resolved source kind and location
120
+ * @throws ProfileError when the value names an existing non-directory path
121
+ */
122
+ async function resolveProfileSource(value) {
123
+ const localPath = path.resolve(value);
124
+ if (await fs.pathExists(localPath)) {
125
+ const stat = await fs.stat(localPath);
126
+ if (!stat.isDirectory()) {
127
+ throw new types_1.ProfileError(`Profile path exists but is not a directory: ${localPath}. ` +
128
+ `A profile source must be a package folder, a <user>/<repo> GitHub shorthand, ` +
129
+ `or a git URL.`);
130
+ }
131
+ // Bare-repo heuristic (minimal by design): an existing directory that
132
+ // carries no profile.yaml but does look like a git repository (a HEAD
133
+ // file or a .git entry) cannot be a usable local package, while git
134
+ // happily clones a local repo path as a URL. Treat it as a clone URL so
135
+ // `--profile /path/to/profile.git` (bare) materializes via clone instead
136
+ // of failing validation on the raw repository directory.
137
+ if (await isGitRepoWithoutManifest(localPath)) {
138
+ return { kind: 'git', location: localPath };
139
+ }
140
+ return { kind: 'local', location: localPath };
141
+ }
142
+ if (GITHUB_SHORTHAND_PATTERN.test(value)) {
143
+ return { kind: 'git', location: `https://github.com/${value}.git` };
144
+ }
145
+ return { kind: 'git', location: value };
146
+ }
147
+ /**
148
+ * Resolve, materialize, validate, and stage a profile for import.
149
+ *
150
+ * Steps, in order: resolve the source; shallow-clone remote profiles into a
151
+ * temp directory (local folders are read in place); validate the package
152
+ * against the contract BEFORE any staging, so an invalid profile never
153
+ * produces a staging tree; copy the shipped template tree into a temp
154
+ * staging directory and overlay the profile's `config/` files.
155
+ *
156
+ * Every temp directory is removed on every failure path before the error is
157
+ * rethrown. On success the caller receives `cleanup` and must invoke it once
158
+ * the copy machinery has consumed `stagingDir`.
159
+ *
160
+ * @param profileValue - The raw `--profile` argument
161
+ * @param shippedTemplateDir - Path to the shipped `templates/strikethroo/` tree
162
+ * @returns The staging directory, validated manifest, resolved source, and cleanup
163
+ * @throws ProfileError on resolution, clone, validation, or staging failure
164
+ */
165
+ async function prepareProfileImport(profileValue, shippedTemplateDir) {
166
+ const tempDirs = [];
167
+ const cleanup = async () => {
168
+ // fs.remove is a no-op for already-gone paths, so cleanup is idempotent.
169
+ await Promise.all(tempDirs.map(dir => fs.remove(dir)));
170
+ };
171
+ try {
172
+ const source = await resolveProfileSource(profileValue);
173
+ const profileDir = source.kind === 'local'
174
+ ? source.location
175
+ : await cloneRemoteProfile(source.location, tempDirs);
176
+ const manifest = await validateProfilePackage(profileDir);
177
+ const stagingDir = await stageEffectiveTemplates(shippedTemplateDir, profileDir, tempDirs);
178
+ return { stagingDir, manifest, source: source.location, cleanup };
179
+ }
180
+ catch (error) {
181
+ await cleanup();
182
+ throw error;
183
+ }
184
+ }
185
+ /**
186
+ * Shallow-clone a remote profile into a fresh temp directory.
187
+ *
188
+ * The temp directory is registered in `tempDirs` before the clone starts so
189
+ * the caller's cleanup covers a half-written clone.
190
+ *
191
+ * @param url - Git clone URL (or local repo path git accepts as one)
192
+ * @param tempDirs - Accumulator of temp directories to clean up
193
+ * @returns Path to the cloned package root
194
+ * @throws ProfileError when git is missing from PATH or the clone fails
195
+ */
196
+ async function cloneRemoteProfile(url, tempDirs) {
197
+ const cloneDir = await makeTempDir();
198
+ tempDirs.push(cloneDir);
199
+ try {
200
+ // git clones into an existing empty directory without complaint.
201
+ await execFileAsync('git', ['clone', '--depth', '1', url, cloneDir]);
202
+ }
203
+ catch (error) {
204
+ if (isEnoentError(error)) {
205
+ throw new types_1.ProfileError(`Cannot clone profile from ${url}: 'git' was not found on PATH. ` +
206
+ `Install git to import remote profiles, or import the profile from a ` +
207
+ `local folder — local-folder imports need no git.`, error);
208
+ }
209
+ throw new types_1.ProfileError(`Failed to clone profile from ${url}: ${formatCause(error)}. ` +
210
+ `Check that the URL is correct and reachable; local-folder imports need no git.`, error);
211
+ }
212
+ return cloneDir;
213
+ }
214
+ /**
215
+ * Build the effective template tree: shipped defaults + profile overlay.
216
+ *
217
+ * Copies the shipped `templates/strikethroo/` tree into a fresh temp staging
218
+ * directory, then copies the profile's `config/` files over it. The staging
219
+ * directory mirrors the shipped tree exactly, so downstream copy machinery
220
+ * needs only a source-path parameter.
221
+ *
222
+ * @param shippedTemplateDir - Path to the shipped template tree
223
+ * @param profileDir - Path to the validated package root
224
+ * @param tempDirs - Accumulator of temp directories to clean up
225
+ * @returns Path to the staging directory
226
+ * @throws ProfileError when either copy fails
227
+ */
228
+ async function stageEffectiveTemplates(shippedTemplateDir, profileDir, tempDirs) {
229
+ const stagingDir = await makeTempDir();
230
+ tempDirs.push(stagingDir);
231
+ try {
232
+ await fs.copy(shippedTemplateDir, stagingDir);
233
+ await fs.copy(path.join(profileDir, 'config'), path.join(stagingDir, 'config'), {
234
+ overwrite: true,
235
+ });
236
+ }
237
+ catch (error) {
238
+ throw new types_1.ProfileError(`Failed to stage the effective template tree for the profile: ${formatCause(error)}`, error);
239
+ }
240
+ return stagingDir;
241
+ }
242
+ /**
243
+ * Create a temp directory under the OS temp root with this module's prefix
244
+ * @returns Absolute path to the new directory
245
+ * @throws ProfileError when the directory cannot be created
246
+ */
247
+ async function makeTempDir() {
248
+ try {
249
+ return await fs.mkdtemp(path.join(os.tmpdir(), PROFILE_TEMP_PREFIX));
250
+ }
251
+ catch (error) {
252
+ throw new types_1.ProfileError(`Failed to create a temporary directory under ${os.tmpdir()}: ${formatCause(error)}`, error);
253
+ }
254
+ }
255
+ /**
256
+ * Detect a directory that is a git repository but not a profile package
257
+ * @param dirPath - Absolute path to the existing directory
258
+ * @returns True when profile.yaml is absent and a HEAD file or .git entry exists
259
+ */
260
+ async function isGitRepoWithoutManifest(dirPath) {
261
+ if (await fs.pathExists(path.join(dirPath, 'profile.yaml'))) {
262
+ return false;
263
+ }
264
+ return ((await fs.pathExists(path.join(dirPath, 'HEAD'))) ||
265
+ (await fs.pathExists(path.join(dirPath, '.git'))));
266
+ }
267
+ /**
268
+ * Type guard for an ENOENT spawn failure (binary missing from PATH)
269
+ * @param error - Caught value
270
+ * @returns True when the error carries code 'ENOENT'
271
+ */
272
+ function isEnoentError(error) {
273
+ return (typeof error === 'object' && error !== null && error.code === 'ENOENT');
274
+ }
275
+ /**
276
+ * Read and validate `profile.yaml` from the package root
277
+ * @param profileDir - Path to the package root
278
+ * @returns The validated manifest
279
+ */
280
+ async function readManifest(profileDir) {
281
+ const manifestPath = path.join(profileDir, 'profile.yaml');
282
+ if (!(await fs.pathExists(manifestPath))) {
283
+ throw new types_1.ProfileError(`Profile manifest not found: expected profile.yaml at the package root (${profileDir})`);
284
+ }
285
+ let rawContent;
286
+ try {
287
+ rawContent = await fs.readFile(manifestPath, 'utf-8');
288
+ }
289
+ catch (error) {
290
+ throw new types_1.ProfileError(`Failed to read profile.yaml in ${profileDir}: ${formatCause(error)}`, error);
291
+ }
292
+ let parsed;
293
+ try {
294
+ parsed = yaml.load(rawContent);
295
+ }
296
+ catch (error) {
297
+ throw new types_1.ProfileError(`Failed to parse profile.yaml in ${profileDir} as YAML: ${formatCause(error)}`, error);
298
+ }
299
+ if (!isPlainObject(parsed)) {
300
+ throw new types_1.ProfileError(`Invalid profile.yaml in ${profileDir}: expected a YAML mapping of manifest fields, ` +
301
+ `got ${describeType(parsed)}`);
302
+ }
303
+ return validateManifestFields(parsed);
304
+ }
305
+ /**
306
+ * Validate the parsed manifest mapping field by field
307
+ * @param data - Parsed YAML mapping
308
+ * @returns The validated manifest
309
+ */
310
+ function validateManifestFields(data) {
311
+ const schemaVersion = data.schema_version;
312
+ if (schemaVersion === undefined || schemaVersion === null) {
313
+ throw new types_1.ProfileError("Invalid profile.yaml: required field 'schema_version' is missing " +
314
+ `(this CLI supports schema v${exports.PROFILE_MANIFEST_SCHEMA_VERSION})`);
315
+ }
316
+ if (typeof schemaVersion !== 'number' || !Number.isInteger(schemaVersion)) {
317
+ throw new types_1.ProfileError(`Invalid profile.yaml: field 'schema_version' must be an integer, got ${describeType(schemaVersion)}`);
318
+ }
319
+ if (schemaVersion !== exports.PROFILE_MANIFEST_SCHEMA_VERSION) {
320
+ if (schemaVersion > exports.PROFILE_MANIFEST_SCHEMA_VERSION) {
321
+ throw new types_1.ProfileError(`Profile manifest schema v${schemaVersion} is newer than this CLI supports ` +
322
+ `(v${exports.PROFILE_MANIFEST_SCHEMA_VERSION}). Update the strikethroo CLI to import this profile.`);
323
+ }
324
+ throw new types_1.ProfileError(`Profile manifest schema v${schemaVersion} is older than this CLI supports ` +
325
+ `(v${exports.PROFILE_MANIFEST_SCHEMA_VERSION}). Update the profile to manifest schema ` +
326
+ `v${exports.PROFILE_MANIFEST_SCHEMA_VERSION}.`);
327
+ }
328
+ const name = data.name;
329
+ if (typeof name !== 'string' || name.length === 0) {
330
+ throw new types_1.ProfileError("Invalid profile.yaml: required field 'name' must be a non-empty string, " +
331
+ `got ${describeType(name)}`);
332
+ }
333
+ if (!KEBAB_CASE_PATTERN.test(name)) {
334
+ throw new types_1.ProfileError(`Invalid profile.yaml: field 'name' must be kebab-case ` +
335
+ `(lowercase letters, digits, and single hyphens), got '${name}'`);
336
+ }
337
+ const description = data.description;
338
+ if (typeof description !== 'string' || description.trim().length === 0) {
339
+ throw new types_1.ProfileError("Invalid profile.yaml: required field 'description' must be a non-empty string, " +
340
+ `got ${describeType(description)}`);
341
+ }
342
+ const manifest = {
343
+ schema_version: schemaVersion,
344
+ name,
345
+ description,
346
+ };
347
+ const purpose = validateOptionalString(data, 'purpose');
348
+ if (purpose !== undefined) {
349
+ manifest.purpose = purpose;
350
+ }
351
+ const author = validateOptionalString(data, 'author');
352
+ if (author !== undefined) {
353
+ manifest.author = author;
354
+ }
355
+ if (data.tags !== undefined && data.tags !== null) {
356
+ if (!Array.isArray(data.tags)) {
357
+ throw new types_1.ProfileError(`Invalid profile.yaml: field 'tags' must be a list of strings, got ${describeType(data.tags)}`);
358
+ }
359
+ for (const [index, tag] of data.tags.entries()) {
360
+ if (typeof tag !== 'string') {
361
+ throw new types_1.ProfileError(`Invalid profile.yaml: field 'tags[${index}]' must be a string, got ${describeType(tag)}`);
362
+ }
363
+ }
364
+ manifest.tags = data.tags;
365
+ }
366
+ const requires = validateRequirementList(data, 'requires');
367
+ if (requires !== undefined) {
368
+ manifest.requires = requires;
369
+ }
370
+ const recommends = validateRequirementList(data, 'recommends');
371
+ if (recommends !== undefined) {
372
+ manifest.recommends = recommends;
373
+ }
374
+ return manifest;
375
+ }
376
+ /**
377
+ * Validate an optional string field on the manifest mapping
378
+ * @param data - Parsed YAML mapping
379
+ * @param field - Field name to check
380
+ * @returns The string value, or undefined when the field is absent
381
+ */
382
+ function validateOptionalString(data, field) {
383
+ const value = data[field];
384
+ if (value === undefined || value === null) {
385
+ return undefined;
386
+ }
387
+ if (typeof value !== 'string') {
388
+ throw new types_1.ProfileError(`Invalid profile.yaml: field '${field}' must be a string, got ${describeType(value)}`);
389
+ }
390
+ return value;
391
+ }
392
+ /**
393
+ * Validate an optional `requires`/`recommends` list on the manifest mapping
394
+ * @param data - Parsed YAML mapping
395
+ * @param field - Either 'requires' or 'recommends'
396
+ * @returns The validated entries, or undefined when the field is absent
397
+ */
398
+ function validateRequirementList(data, field) {
399
+ const value = data[field];
400
+ if (value === undefined || value === null) {
401
+ return undefined;
402
+ }
403
+ if (!Array.isArray(value)) {
404
+ throw new types_1.ProfileError(`Invalid profile.yaml: field '${field}' must be a list of {kind, name, install?} entries, ` +
405
+ `got ${describeType(value)}`);
406
+ }
407
+ return value.map((entry, index) => {
408
+ if (!isPlainObject(entry)) {
409
+ throw new types_1.ProfileError(`Invalid profile.yaml: field '${field}[${index}]' must be a mapping with 'kind' and ` +
410
+ `'name', got ${describeType(entry)}`);
411
+ }
412
+ const kind = entry.kind;
413
+ if (kind !== 'skill' && kind !== 'tool') {
414
+ throw new types_1.ProfileError(`Invalid profile.yaml: field '${field}[${index}].kind' must be 'skill' or 'tool', ` +
415
+ `got ${describeType(kind)}`);
416
+ }
417
+ const name = entry.name;
418
+ if (typeof name !== 'string' || name.trim().length === 0) {
419
+ throw new types_1.ProfileError(`Invalid profile.yaml: field '${field}[${index}].name' must be a non-empty string, ` +
420
+ `got ${describeType(name)}`);
421
+ }
422
+ const requirement = { kind, name };
423
+ const install = entry.install;
424
+ if (install !== undefined && install !== null) {
425
+ if (typeof install !== 'string') {
426
+ throw new types_1.ProfileError(`Invalid profile.yaml: field '${field}[${index}].install' must be a string, ` +
427
+ `got ${describeType(install)}`);
428
+ }
429
+ requirement.install = install;
430
+ }
431
+ return requirement;
432
+ });
433
+ }
434
+ /**
435
+ * Validate the package's `config/` surface against the allowlist.
436
+ *
437
+ * Allowed contents, relative to `config/`: `hooks/<name>.md`,
438
+ * `templates/<name>.md`, `shared/<name>.md`, `config.yaml`, `STRIKETHROO.md`.
439
+ * Everything else — dotfiles, `schemas/`, unexpected directories or
440
+ * extensions, traversal-shaped names — is rejected. No partial acceptance.
441
+ *
442
+ * @param profileDir - Path to the package root
443
+ */
444
+ async function validateConfigSurface(profileDir) {
445
+ const configDir = path.join(profileDir, 'config');
446
+ if (!(await fs.pathExists(configDir))) {
447
+ throw new types_1.ProfileError(`Profile package is missing its config/ directory: expected ${configDir}`);
448
+ }
449
+ const configStat = await fs.stat(configDir);
450
+ if (!configStat.isDirectory()) {
451
+ throw new types_1.ProfileError(`Profile package config/ must be a directory: ${configDir}`);
452
+ }
453
+ const rootEntries = await readEntries(configDir);
454
+ for (const entry of rootEntries) {
455
+ rejectUnsafeSegment(entry.name, entry.name);
456
+ if (entry.isFile()) {
457
+ if (!ALLOWED_CONFIG_ROOT_FILES.includes(entry.name)) {
458
+ throw new types_1.ProfileError(`Profile package contains a file outside the allowed config surface: ` +
459
+ `config/${entry.name} (allowed at config/ root: ` +
460
+ `${ALLOWED_CONFIG_ROOT_FILES.join(', ')})`);
461
+ }
462
+ continue;
463
+ }
464
+ if (entry.isDirectory()) {
465
+ if (!ALLOWED_CONFIG_SUBDIRS.includes(entry.name)) {
466
+ throw new types_1.ProfileError(`Profile package contains a directory outside the allowed config surface: ` +
467
+ `config/${entry.name}/ (allowed directories: ` +
468
+ `${ALLOWED_CONFIG_SUBDIRS.join(', ')})`);
469
+ }
470
+ await validateMarkdownOnlyDir(path.join(configDir, entry.name), entry.name);
471
+ continue;
472
+ }
473
+ throw new types_1.ProfileError(`Profile package contains an unsupported entry (not a regular file or directory): ` +
474
+ `config/${entry.name}`);
475
+ }
476
+ }
477
+ /**
478
+ * Validate that a config subdirectory contains only flat `*.md` files
479
+ * @param dirPath - Absolute path to the subdirectory
480
+ * @param relDir - Path of the subdirectory relative to `config/`
481
+ */
482
+ async function validateMarkdownOnlyDir(dirPath, relDir) {
483
+ const entries = await readEntries(dirPath);
484
+ for (const entry of entries) {
485
+ const relPath = `${relDir}/${entry.name}`;
486
+ rejectUnsafeSegment(entry.name, relPath);
487
+ if (entry.isDirectory()) {
488
+ throw new types_1.ProfileError(`Profile package contains a nested directory outside the allowed config surface: ` +
489
+ `config/${relPath}/ (config/${relDir}/ may only contain .md files)`);
490
+ }
491
+ if (!entry.isFile() || !entry.name.endsWith('.md')) {
492
+ throw new types_1.ProfileError(`Profile package contains a file outside the allowed config surface: ` +
493
+ `config/${relPath} (config/${relDir}/ may only contain .md files)`);
494
+ }
495
+ }
496
+ }
497
+ /**
498
+ * Read directory entries, wrapping filesystem failures in ProfileError
499
+ * @param dirPath - Absolute path to the directory
500
+ * @returns Directory entries with type information
501
+ */
502
+ async function readEntries(dirPath) {
503
+ try {
504
+ return await fs.readdir(dirPath, { withFileTypes: true });
505
+ }
506
+ catch (error) {
507
+ throw new types_1.ProfileError(`Failed to read profile package directory ${dirPath}: ${formatCause(error)}`, error);
508
+ }
509
+ }
510
+ /**
511
+ * Reject dotfile, traversal, and separator-bearing entry names
512
+ * @param segment - Single directory entry name
513
+ * @param relPath - Path relative to `config/` for error reporting
514
+ */
515
+ function rejectUnsafeSegment(segment, relPath) {
516
+ if (segment === '..' || segment === '.') {
517
+ throw new types_1.ProfileError(`Profile package contains a path-traversal entry name in its config surface: ` +
518
+ `config/${relPath}`);
519
+ }
520
+ if (segment.includes('/') || segment.includes('\\') || segment.includes('\0')) {
521
+ throw new types_1.ProfileError(`Profile package contains an entry name with a path separator in its config surface: ` +
522
+ `config/${relPath}`);
523
+ }
524
+ if (segment.startsWith('.')) {
525
+ throw new types_1.ProfileError(`Profile package contains a dotfile inside its config surface: config/${relPath}`);
526
+ }
527
+ }
528
+ /**
529
+ * Type guard for a plain object (YAML mapping)
530
+ * @param value - Value to check
531
+ * @returns True when the value is a non-null, non-array object
532
+ */
533
+ function isPlainObject(value) {
534
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
535
+ }
536
+ /**
537
+ * Describe a value's type for error messages
538
+ * @param value - Value to describe
539
+ * @returns Human-readable type description
540
+ */
541
+ function describeType(value) {
542
+ if (value === null) {
543
+ return 'null';
544
+ }
545
+ if (value === undefined) {
546
+ return 'missing';
547
+ }
548
+ if (Array.isArray(value)) {
549
+ return 'a list';
550
+ }
551
+ return `${typeof value} (${JSON.stringify(value)})`;
552
+ }
553
+ /**
554
+ * Extract a readable message from an unknown thrown value
555
+ * @param error - Caught value
556
+ * @returns The error message, or a string rendering of the value
557
+ */
558
+ function formatCause(error) {
559
+ return error instanceof Error ? error.message : String(error);
560
+ }
561
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2GH,wDAIC;AAiED,oDA6BC;AAoBD,oDAyBC;AAxPD,iDAAyC;AACzC,6CAA+B;AAC/B,uCAAyB;AACzB,2CAA6B;AAC7B,+BAAiC;AACjC,8CAAgC;AAChC,mCAAuC;AAEvC,MAAM,aAAa,GAAG,IAAA,gBAAS,EAAC,wBAAQ,CAAC,CAAC;AAE1C;;;;;;GAMG;AACU,QAAA,+BAA+B,GAAG,CAAC,CAAC;AA6DjD;;GAEG;AACH,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AAEtD;;GAEG;AACH,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAEzE;;GAEG;AAC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AAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,oBAAY,CACpB,sFAAsF;YACpF,UAAU,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,oBAAY,CACpB,wEAAwE,OAAO,EAAE,CAClF,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,SAAS,YAAY,CAAC,KAAc;IAClC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,GAAG,OAAO,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
package/dist/types.d.ts CHANGED
@@ -25,6 +25,11 @@ export interface InitOptions {
25
25
  * Force overwrite all files without prompting
26
26
  */
27
27
  force?: boolean;
28
+ /**
29
+ * Optional strikethroo profile to import: local folder path,
30
+ * <user>/<repo> GitHub shorthand, or full git URL
31
+ */
32
+ profile?: string;
28
33
  }
29
34
  /**
30
35
  * Configuration for directory structure
@@ -242,6 +247,24 @@ export interface InitMetadata {
242
247
  * Map of relative file paths to SHA-256 hashes
243
248
  */
244
249
  files: Record<string, string>;
250
+ /**
251
+ * Provenance of the strikethroo profile imported at init time.
252
+ * Absent when no profile was used; display/forensics-only.
253
+ */
254
+ profile?: {
255
+ /**
256
+ * Profile name from its manifest
257
+ */
258
+ name: string;
259
+ /**
260
+ * Resolved source: clone URL or absolute local package path
261
+ */
262
+ source: string;
263
+ /**
264
+ * ISO timestamp of the import
265
+ */
266
+ importedAt: string;
267
+ };
245
268
  }
246
269
  /**
247
270
  * Represents a file conflict detected during init
@@ -272,4 +295,18 @@ export interface FileConflict {
272
295
  * User's resolution choice for file conflicts
273
296
  */
274
297
  export type ConflictResolution = 'keep' | 'overwrite' | 'keep-all' | 'overwrite-all';
298
+ /**
299
+ * Error raised when a profile package fails resolution, validation, or import.
300
+ *
301
+ * Thrown before any workspace mutation so a failed import never leaves a
302
+ * partially applied profile behind.
303
+ */
304
+ export declare class ProfileError extends Error {
305
+ /**
306
+ * Underlying error that triggered this failure, when one exists
307
+ * (e.g. a YAML parse error or filesystem error being wrapped).
308
+ */
309
+ readonly cause?: unknown;
310
+ constructor(message: string, cause?: unknown);
311
+ }
275
312
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,yEAOtB,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WA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