skillset 0.15.0 → 0.15.1

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 (3) hide show
  1. package/dist/cli.js +43 -30
  2. package/dist/create.js +43 -30
  3. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7206,7 +7206,7 @@ var skillsetFeatureRegistry = defineFeatureRegistry([
7206
7206
  id: "output-safety",
7207
7207
  kind: "workflow",
7208
7208
  renderOwner: "packages/core/src/output-safety.ts",
7209
- sourceShape: "generated .skillset.lock ownership plus current rendered output paths",
7209
+ sourceShape: "generated skillset.lock ownership plus current rendered output paths",
7210
7210
  status: "implemented",
7211
7211
  summary: "Protects unmanaged generated-output collisions and target-side edits with reversible backups.",
7212
7212
  targetSupport: notTargetRuntime(),
@@ -9145,7 +9145,7 @@ function targetNativeSurface(relativePath) {
9145
9145
  }
9146
9146
 
9147
9147
  // packages/core/src/render-result-collector.ts
9148
- var LOCK_FILE = ".skillset.lock";
9148
+ var LOCK_FILE = "skillset.lock";
9149
9149
  var TARGETS2 = ["claude", "codex"];
9150
9150
  function collectRenderResults(graph, rendered, options) {
9151
9151
  const mapOutputPath = options.mapOutputPath ?? ((path) => path);
@@ -9739,7 +9739,7 @@ function renderValidatedToml(value, label) {
9739
9739
  function validateGeneratedStructuredOutput(args) {
9740
9740
  const label = structuredOutputLabel(args);
9741
9741
  try {
9742
- if (args.targetPath.endsWith(".json") || args.targetPath.endsWith(".skillset.lock")) {
9742
+ if (args.targetPath.endsWith(".json") || args.targetPath.endsWith("skillset.lock")) {
9743
9743
  validateJson(args.content, label);
9744
9744
  } else if (args.targetPath.endsWith(".yaml") || args.targetPath.endsWith(".yml")) {
9745
9745
  validateYaml(args.content, label);
@@ -9841,7 +9841,7 @@ function structuredOutputLabel(args) {
9841
9841
  }
9842
9842
 
9843
9843
  // packages/core/src/output-safety.ts
9844
- var WORKSPACE_LOCK_FILE = ".skillset.lock";
9844
+ var WORKSPACE_LOCK_FILE = "skillset.lock";
9845
9845
  var OUTPUT_BACKUP_ROOT = ".skillset/build/backups";
9846
9846
  async function readManagedOutputState(rootPath, liveOutputRoots, includeWorkspaceLock, outPath) {
9847
9847
  const paths = new Set;
@@ -12161,7 +12161,7 @@ function renderRepositoryReadmes(graph) {
12161
12161
  "",
12162
12162
  "- `.claude-plugin/marketplace.json` indexes the generated plugins.",
12163
12163
  "- `plugins/<plugin-id>/` contains each Claude plugin bundle.",
12164
- "- `.skillset.lock` records deterministic generated-state provenance.",
12164
+ "- `skillset.lock` records deterministic generated-state provenance.",
12165
12165
  ""
12166
12166
  ].join(`
12167
12167
  `)));
@@ -12173,7 +12173,7 @@ function renderRepositoryReadmes(graph) {
12173
12173
  "Generated Codex plugin repository.",
12174
12174
  "",
12175
12175
  "- `plugins/<plugin-id>/` contains each Codex plugin bundle.",
12176
- "- `.skillset.lock` records deterministic generated-state provenance.",
12176
+ "- `skillset.lock` records deterministic generated-state provenance.",
12177
12177
  ""
12178
12178
  ].join(`
12179
12179
  `)));
@@ -13175,7 +13175,7 @@ function renderLockFiles(graph, lockRoots) {
13175
13175
  sourceRoot: graph.sourceRoot,
13176
13176
  target: lock.target
13177
13177
  };
13178
- rendered.push(textFile(join6(outputRoot, ".skillset.lock"), renderValidatedJson(value, `${outputRoot}/.skillset.lock`)));
13178
+ rendered.push(textFile(join6(outputRoot, "skillset.lock"), renderValidatedJson(value, `${outputRoot}/skillset.lock`)));
13179
13179
  }
13180
13180
  return rendered;
13181
13181
  }
@@ -13583,7 +13583,7 @@ async function exists3(path) {
13583
13583
  }
13584
13584
  }
13585
13585
  function validateRenderedFile(file) {
13586
- if (file.sourcePath !== undefined || file.path.endsWith(".skillset.lock")) {
13586
+ if (file.sourcePath !== undefined || file.path.endsWith("skillset.lock")) {
13587
13587
  validateGeneratedStructuredOutput({
13588
13588
  content: textDecoder.decode(file.content),
13589
13589
  targetPath: file.path,
@@ -14482,7 +14482,7 @@ async function outputRootsFor(rootPath, outputs, plugins, standaloneSkills, rule
14482
14482
  for (const outputRoot of configuredOutputRoots(outputs)) {
14483
14483
  if (roots.has(outputRoot.path))
14484
14484
  continue;
14485
- if (await exists5(join8(resolveInside(rootPath, outputRoot.path), ".skillset.lock"))) {
14485
+ if (await exists5(join8(resolveInside(rootPath, outputRoot.path), "skillset.lock"))) {
14486
14486
  roots.set(outputRoot.path, outputRoot);
14487
14487
  }
14488
14488
  }
@@ -14922,12 +14922,12 @@ function outputPathsForLock(outputRoot, lock) {
14922
14922
  return paths;
14923
14923
  }
14924
14924
  function outputRootForLockPath(lockPath) {
14925
- if (lockPath === ".skillset.lock")
14925
+ if (lockPath === "skillset.lock")
14926
14926
  return ".";
14927
14927
  return dirname7(lockPath).replaceAll("\\", "/");
14928
14928
  }
14929
14929
  function isLockFilePath(path) {
14930
- return path === ".skillset.lock" || path.endsWith("/.skillset.lock");
14930
+ return path === "skillset.lock" || path.endsWith("/skillset.lock");
14931
14931
  }
14932
14932
  async function diagnoseMissingManagedOutputs(rootPath, rendered, previousManagedPaths) {
14933
14933
  const diagnostics = [];
@@ -16125,7 +16125,7 @@ function errorMessage(error) {
16125
16125
  function collectLockItems(rendered) {
16126
16126
  const matches = [];
16127
16127
  for (const file of rendered) {
16128
- if (!file.path.endsWith(".skillset.lock"))
16128
+ if (!file.path.endsWith("skillset.lock"))
16129
16129
  continue;
16130
16130
  let parsed;
16131
16131
  try {
@@ -16194,7 +16194,7 @@ function joinOutputRoot2(outputRoot, file) {
16194
16194
  function lockPathForEntry(entry) {
16195
16195
  if (entry === undefined)
16196
16196
  return;
16197
- return joinOutputRoot2(entry.outputRoot, ".skillset.lock");
16197
+ return joinOutputRoot2(entry.outputRoot, "skillset.lock");
16198
16198
  }
16199
16199
  function refusedSourceSuggestion(generatedPath, entries, message, nextSteps, sourcePath) {
16200
16200
  const lockPath = lockPathForEntry(entries[0]);
@@ -16333,7 +16333,7 @@ function normalizeRepoPath(rootPath, inputPath) {
16333
16333
  var textDecoder4 = new TextDecoder;
16334
16334
 
16335
16335
  // packages/core/src/normalized-output-tree.ts
16336
- var DEFAULT_STRUCTURED_JSON_BASENAMES = new Set([".skillset.lock"]);
16336
+ var DEFAULT_STRUCTURED_JSON_BASENAMES = new Set(["skillset.lock"]);
16337
16337
 
16338
16338
  // packages/core/src/deterministic-projection.ts
16339
16339
  var textEncoder4 = new TextEncoder;
@@ -17690,7 +17690,7 @@ function kindForSourceUnitId(id) {
17690
17690
  return "root-config";
17691
17691
  }
17692
17692
  async function sourceInventoryFromLock(rootPath, _options) {
17693
- const lockPath = resolveInside(rootPath, ".skillset.lock");
17693
+ const lockPath = resolveInside(rootPath, "skillset.lock");
17694
17694
  if (!await exists7(lockPath))
17695
17695
  return;
17696
17696
  let parsed;
@@ -17731,7 +17731,7 @@ async function sourceInventoryFromLock(rootPath, _options) {
17731
17731
  if (units.length === 0)
17732
17732
  return;
17733
17733
  return {
17734
- baseline: { hashSchema, kind: "source-inventory", label: ".skillset.lock" },
17734
+ baseline: { hashSchema, kind: "source-inventory", label: "skillset.lock" },
17735
17735
  inventory: { hashSchema, units }
17736
17736
  };
17737
17737
  }
@@ -19504,7 +19504,7 @@ async function maybeCandidate(candidates, rootPath, path2, kind) {
19504
19504
  candidates.push({ kind, path: relative14(rootPath, absolutePath).replaceAll("\\", "/") });
19505
19505
  }
19506
19506
  async function isManagedCandidate(path2) {
19507
- return await pathExists(join15(path2, ".skillset.lock")) || await pathExists(join15(dirname11(path2), ".skillset.lock"));
19507
+ return await pathExists(join15(path2, "skillset.lock")) || await pathExists(join15(dirname11(path2), "skillset.lock"));
19508
19508
  }
19509
19509
  function compareCandidate(left, right) {
19510
19510
  return `${left.kind}:${left.path}` < `${right.kind}:${right.path}` ? -1 : `${left.kind}:${left.path}` > `${right.kind}:${right.path}` ? 1 : 0;
@@ -20153,7 +20153,7 @@ function renderAdoptReportMarkdown(report, opts) {
20153
20153
  lines.push(`- ${summary}`);
20154
20154
  }
20155
20155
  lines.push("");
20156
- lines.push("Full structured render results are in `report.json` and in the isolated `.skillset.lock` files when the isolated build completes.", "");
20156
+ lines.push("Full structured render results are in `report.json` and in the isolated `skillset.lock` files when the isolated build completes.", "");
20157
20157
  }
20158
20158
  lines.push("## Cutover", "");
20159
20159
  lines.push(`1. Review the generated mirror under \`${ISOLATED_OUT_ROOT}/\` against the originals.`);
@@ -21902,23 +21902,17 @@ async function runSkillsetTest(rootPath, name, options = {}) {
21902
21902
  targetFilter: declaration.targets
21903
21903
  };
21904
21904
  const runId = makeRunId(declaration.name);
21905
- const buildRoot = resolveInside(rootPath, join21(sourceDir, TEST_BUILD_DIR));
21905
+ const buildRoot = resolveInside(rootPath, testBuildRoot(sourceDir));
21906
21906
  const runsRoot = join21(buildRoot, "runs");
21907
21907
  const runPath = join21(runsRoot, runId);
21908
21908
  const workspacePath = join21(runPath, "workspace");
21909
21909
  const stagingRoot = await mkdtemp4(join21(tmpdir3(), "skillset-test-"));
21910
21910
  const stagingWorkspacePath = join21(stagingRoot, "workspace");
21911
- const stagingSourcePath = join21(stagingWorkspacePath, sourceDir);
21912
- const sourcePath = resolveInside(rootPath, sourceDir);
21913
- const workspaceLockPath = resolveInside(rootPath, ".skillset.lock");
21914
- const ignoredSourceBuildPath = resolveInside(rootPath, join21(sourceDir, "build"));
21911
+ const workspaceLockPath = resolveInside(rootPath, "skillset.lock");
21915
21912
  try {
21916
21913
  await mkdir11(stagingWorkspacePath, { recursive: true });
21917
- await cp(sourcePath, stagingSourcePath, {
21918
- filter: (path2) => !isSameOrInside2(ignoredSourceBuildPath, path2),
21919
- recursive: true
21920
- });
21921
- await copyIfExists(workspaceLockPath, join21(stagingWorkspacePath, ".skillset.lock"));
21914
+ await copyTestSource(graph, stagingWorkspacePath);
21915
+ await copyIfExists(workspaceLockPath, join21(stagingWorkspacePath, "skillset.lock"));
21922
21916
  await copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspaceLockPath, sourceDir);
21923
21917
  const assertions = [];
21924
21918
  let generatedFiles = 0;
@@ -22348,7 +22342,20 @@ async function copyIfExists(sourcePath, targetPath) {
22348
22342
  if (!await pathExists2(sourcePath))
22349
22343
  return;
22350
22344
  await mkdir11(dirname16(targetPath), { recursive: true });
22351
- await cp(sourcePath, targetPath);
22345
+ await cp(sourcePath, targetPath, { recursive: true });
22346
+ }
22347
+ async function copyTestSource(graph, stagingWorkspacePath) {
22348
+ const ignoredSourceBuildPath = resolveInside(graph.rootPath, sourceBuildRoot(graph.sourceDir));
22349
+ if (graph.sourceDir !== ".") {
22350
+ await cp(graph.sourcePath, join21(stagingWorkspacePath, graph.sourceDir), {
22351
+ filter: (path2) => !isSameOrInside2(ignoredSourceBuildPath, path2),
22352
+ recursive: true
22353
+ });
22354
+ return;
22355
+ }
22356
+ await copyIfExists(graph.rootConfigPath, join21(stagingWorkspacePath, "skillset.yaml"));
22357
+ await copyIfExists(graph.sourceRootPath, join21(stagingWorkspacePath, graph.sourceRoot));
22358
+ await copyIfExists(resolveInside(graph.rootPath, "changes"), join21(stagingWorkspacePath, "changes"));
22352
22359
  }
22353
22360
  async function copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspaceLockPath, sourceDir) {
22354
22361
  if (!await pathExists2(workspaceLockPath))
@@ -22361,7 +22368,7 @@ async function copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspa
22361
22368
  }
22362
22369
  if (!isJsonRecord(lock) || !Array.isArray(lock.items))
22363
22370
  return;
22364
- const ignoredSourceBuildPath = resolveInside(rootPath, join21(sourceDir, "build"));
22371
+ const ignoredSourceBuildPath = resolveInside(rootPath, sourceBuildRoot(sourceDir));
22365
22372
  for (const item of lock.items) {
22366
22373
  if (!isJsonRecord(item) || !Array.isArray(item.files))
22367
22374
  continue;
@@ -22375,6 +22382,12 @@ async function copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspa
22375
22382
  }
22376
22383
  }
22377
22384
  }
22385
+ function testBuildRoot(sourceDir) {
22386
+ return sourceDir === "." ? join21(".skillset", TEST_BUILD_DIR) : join21(sourceDir, TEST_BUILD_DIR);
22387
+ }
22388
+ function sourceBuildRoot(sourceDir) {
22389
+ return sourceDir === "." ? ".skillset/build" : join21(sourceDir, "build");
22390
+ }
22378
22391
  function makeRunId(name) {
22379
22392
  const stamp = new Date().toISOString().replace(/[-:]/g, "").replace(/\.\d{3}Z$/, "Z");
22380
22393
  const digest2 = createHash8("sha256").update(`${name}:${stamp}:${randomBytes2(8).toString("hex")}`).digest("hex").slice(0, 8);
package/dist/create.js CHANGED
@@ -7206,7 +7206,7 @@ var skillsetFeatureRegistry = defineFeatureRegistry([
7206
7206
  id: "output-safety",
7207
7207
  kind: "workflow",
7208
7208
  renderOwner: "packages/core/src/output-safety.ts",
7209
- sourceShape: "generated .skillset.lock ownership plus current rendered output paths",
7209
+ sourceShape: "generated skillset.lock ownership plus current rendered output paths",
7210
7210
  status: "implemented",
7211
7211
  summary: "Protects unmanaged generated-output collisions and target-side edits with reversible backups.",
7212
7212
  targetSupport: notTargetRuntime(),
@@ -9145,7 +9145,7 @@ function targetNativeSurface(relativePath) {
9145
9145
  }
9146
9146
 
9147
9147
  // packages/core/src/render-result-collector.ts
9148
- var LOCK_FILE = ".skillset.lock";
9148
+ var LOCK_FILE = "skillset.lock";
9149
9149
  var TARGETS2 = ["claude", "codex"];
9150
9150
  function collectRenderResults(graph, rendered, options) {
9151
9151
  const mapOutputPath = options.mapOutputPath ?? ((path) => path);
@@ -9739,7 +9739,7 @@ function renderValidatedToml(value, label) {
9739
9739
  function validateGeneratedStructuredOutput(args) {
9740
9740
  const label = structuredOutputLabel(args);
9741
9741
  try {
9742
- if (args.targetPath.endsWith(".json") || args.targetPath.endsWith(".skillset.lock")) {
9742
+ if (args.targetPath.endsWith(".json") || args.targetPath.endsWith("skillset.lock")) {
9743
9743
  validateJson(args.content, label);
9744
9744
  } else if (args.targetPath.endsWith(".yaml") || args.targetPath.endsWith(".yml")) {
9745
9745
  validateYaml(args.content, label);
@@ -9841,7 +9841,7 @@ function structuredOutputLabel(args) {
9841
9841
  }
9842
9842
 
9843
9843
  // packages/core/src/output-safety.ts
9844
- var WORKSPACE_LOCK_FILE = ".skillset.lock";
9844
+ var WORKSPACE_LOCK_FILE = "skillset.lock";
9845
9845
  var OUTPUT_BACKUP_ROOT = ".skillset/build/backups";
9846
9846
  async function readManagedOutputState(rootPath, liveOutputRoots, includeWorkspaceLock, outPath) {
9847
9847
  const paths = new Set;
@@ -12161,7 +12161,7 @@ function renderRepositoryReadmes(graph) {
12161
12161
  "",
12162
12162
  "- `.claude-plugin/marketplace.json` indexes the generated plugins.",
12163
12163
  "- `plugins/<plugin-id>/` contains each Claude plugin bundle.",
12164
- "- `.skillset.lock` records deterministic generated-state provenance.",
12164
+ "- `skillset.lock` records deterministic generated-state provenance.",
12165
12165
  ""
12166
12166
  ].join(`
12167
12167
  `)));
@@ -12173,7 +12173,7 @@ function renderRepositoryReadmes(graph) {
12173
12173
  "Generated Codex plugin repository.",
12174
12174
  "",
12175
12175
  "- `plugins/<plugin-id>/` contains each Codex plugin bundle.",
12176
- "- `.skillset.lock` records deterministic generated-state provenance.",
12176
+ "- `skillset.lock` records deterministic generated-state provenance.",
12177
12177
  ""
12178
12178
  ].join(`
12179
12179
  `)));
@@ -13175,7 +13175,7 @@ function renderLockFiles(graph, lockRoots) {
13175
13175
  sourceRoot: graph.sourceRoot,
13176
13176
  target: lock.target
13177
13177
  };
13178
- rendered.push(textFile(join6(outputRoot, ".skillset.lock"), renderValidatedJson(value, `${outputRoot}/.skillset.lock`)));
13178
+ rendered.push(textFile(join6(outputRoot, "skillset.lock"), renderValidatedJson(value, `${outputRoot}/skillset.lock`)));
13179
13179
  }
13180
13180
  return rendered;
13181
13181
  }
@@ -13583,7 +13583,7 @@ async function exists3(path) {
13583
13583
  }
13584
13584
  }
13585
13585
  function validateRenderedFile(file) {
13586
- if (file.sourcePath !== undefined || file.path.endsWith(".skillset.lock")) {
13586
+ if (file.sourcePath !== undefined || file.path.endsWith("skillset.lock")) {
13587
13587
  validateGeneratedStructuredOutput({
13588
13588
  content: textDecoder.decode(file.content),
13589
13589
  targetPath: file.path,
@@ -14482,7 +14482,7 @@ async function outputRootsFor(rootPath, outputs, plugins, standaloneSkills, rule
14482
14482
  for (const outputRoot of configuredOutputRoots(outputs)) {
14483
14483
  if (roots.has(outputRoot.path))
14484
14484
  continue;
14485
- if (await exists5(join8(resolveInside(rootPath, outputRoot.path), ".skillset.lock"))) {
14485
+ if (await exists5(join8(resolveInside(rootPath, outputRoot.path), "skillset.lock"))) {
14486
14486
  roots.set(outputRoot.path, outputRoot);
14487
14487
  }
14488
14488
  }
@@ -14922,12 +14922,12 @@ function outputPathsForLock(outputRoot, lock) {
14922
14922
  return paths;
14923
14923
  }
14924
14924
  function outputRootForLockPath(lockPath) {
14925
- if (lockPath === ".skillset.lock")
14925
+ if (lockPath === "skillset.lock")
14926
14926
  return ".";
14927
14927
  return dirname7(lockPath).replaceAll("\\", "/");
14928
14928
  }
14929
14929
  function isLockFilePath(path) {
14930
- return path === ".skillset.lock" || path.endsWith("/.skillset.lock");
14930
+ return path === "skillset.lock" || path.endsWith("/skillset.lock");
14931
14931
  }
14932
14932
  async function diagnoseMissingManagedOutputs(rootPath, rendered, previousManagedPaths) {
14933
14933
  const diagnostics = [];
@@ -16125,7 +16125,7 @@ function errorMessage(error) {
16125
16125
  function collectLockItems(rendered) {
16126
16126
  const matches = [];
16127
16127
  for (const file of rendered) {
16128
- if (!file.path.endsWith(".skillset.lock"))
16128
+ if (!file.path.endsWith("skillset.lock"))
16129
16129
  continue;
16130
16130
  let parsed;
16131
16131
  try {
@@ -16194,7 +16194,7 @@ function joinOutputRoot2(outputRoot, file) {
16194
16194
  function lockPathForEntry(entry) {
16195
16195
  if (entry === undefined)
16196
16196
  return;
16197
- return joinOutputRoot2(entry.outputRoot, ".skillset.lock");
16197
+ return joinOutputRoot2(entry.outputRoot, "skillset.lock");
16198
16198
  }
16199
16199
  function refusedSourceSuggestion(generatedPath, entries, message, nextSteps, sourcePath) {
16200
16200
  const lockPath = lockPathForEntry(entries[0]);
@@ -16333,7 +16333,7 @@ function normalizeRepoPath(rootPath, inputPath) {
16333
16333
  var textDecoder4 = new TextDecoder;
16334
16334
 
16335
16335
  // packages/core/src/normalized-output-tree.ts
16336
- var DEFAULT_STRUCTURED_JSON_BASENAMES = new Set([".skillset.lock"]);
16336
+ var DEFAULT_STRUCTURED_JSON_BASENAMES = new Set(["skillset.lock"]);
16337
16337
 
16338
16338
  // packages/core/src/deterministic-projection.ts
16339
16339
  var textEncoder4 = new TextEncoder;
@@ -17690,7 +17690,7 @@ function kindForSourceUnitId(id) {
17690
17690
  return "root-config";
17691
17691
  }
17692
17692
  async function sourceInventoryFromLock(rootPath, _options) {
17693
- const lockPath = resolveInside(rootPath, ".skillset.lock");
17693
+ const lockPath = resolveInside(rootPath, "skillset.lock");
17694
17694
  if (!await exists7(lockPath))
17695
17695
  return;
17696
17696
  let parsed;
@@ -17731,7 +17731,7 @@ async function sourceInventoryFromLock(rootPath, _options) {
17731
17731
  if (units.length === 0)
17732
17732
  return;
17733
17733
  return {
17734
- baseline: { hashSchema, kind: "source-inventory", label: ".skillset.lock" },
17734
+ baseline: { hashSchema, kind: "source-inventory", label: "skillset.lock" },
17735
17735
  inventory: { hashSchema, units }
17736
17736
  };
17737
17737
  }
@@ -19504,7 +19504,7 @@ async function maybeCandidate(candidates, rootPath, path2, kind) {
19504
19504
  candidates.push({ kind, path: relative14(rootPath, absolutePath).replaceAll("\\", "/") });
19505
19505
  }
19506
19506
  async function isManagedCandidate(path2) {
19507
- return await pathExists(join15(path2, ".skillset.lock")) || await pathExists(join15(dirname11(path2), ".skillset.lock"));
19507
+ return await pathExists(join15(path2, "skillset.lock")) || await pathExists(join15(dirname11(path2), "skillset.lock"));
19508
19508
  }
19509
19509
  function compareCandidate(left, right) {
19510
19510
  return `${left.kind}:${left.path}` < `${right.kind}:${right.path}` ? -1 : `${left.kind}:${left.path}` > `${right.kind}:${right.path}` ? 1 : 0;
@@ -20153,7 +20153,7 @@ function renderAdoptReportMarkdown(report, opts) {
20153
20153
  lines.push(`- ${summary}`);
20154
20154
  }
20155
20155
  lines.push("");
20156
- lines.push("Full structured render results are in `report.json` and in the isolated `.skillset.lock` files when the isolated build completes.", "");
20156
+ lines.push("Full structured render results are in `report.json` and in the isolated `skillset.lock` files when the isolated build completes.", "");
20157
20157
  }
20158
20158
  lines.push("## Cutover", "");
20159
20159
  lines.push(`1. Review the generated mirror under \`${ISOLATED_OUT_ROOT}/\` against the originals.`);
@@ -21902,23 +21902,17 @@ async function runSkillsetTest(rootPath, name, options = {}) {
21902
21902
  targetFilter: declaration.targets
21903
21903
  };
21904
21904
  const runId = makeRunId(declaration.name);
21905
- const buildRoot = resolveInside(rootPath, join21(sourceDir, TEST_BUILD_DIR));
21905
+ const buildRoot = resolveInside(rootPath, testBuildRoot(sourceDir));
21906
21906
  const runsRoot = join21(buildRoot, "runs");
21907
21907
  const runPath = join21(runsRoot, runId);
21908
21908
  const workspacePath = join21(runPath, "workspace");
21909
21909
  const stagingRoot = await mkdtemp4(join21(tmpdir3(), "skillset-test-"));
21910
21910
  const stagingWorkspacePath = join21(stagingRoot, "workspace");
21911
- const stagingSourcePath = join21(stagingWorkspacePath, sourceDir);
21912
- const sourcePath = resolveInside(rootPath, sourceDir);
21913
- const workspaceLockPath = resolveInside(rootPath, ".skillset.lock");
21914
- const ignoredSourceBuildPath = resolveInside(rootPath, join21(sourceDir, "build"));
21911
+ const workspaceLockPath = resolveInside(rootPath, "skillset.lock");
21915
21912
  try {
21916
21913
  await mkdir11(stagingWorkspacePath, { recursive: true });
21917
- await cp(sourcePath, stagingSourcePath, {
21918
- filter: (path2) => !isSameOrInside2(ignoredSourceBuildPath, path2),
21919
- recursive: true
21920
- });
21921
- await copyIfExists(workspaceLockPath, join21(stagingWorkspacePath, ".skillset.lock"));
21914
+ await copyTestSource(graph, stagingWorkspacePath);
21915
+ await copyIfExists(workspaceLockPath, join21(stagingWorkspacePath, "skillset.lock"));
21922
21916
  await copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspaceLockPath, sourceDir);
21923
21917
  const assertions = [];
21924
21918
  let generatedFiles = 0;
@@ -22348,7 +22342,20 @@ async function copyIfExists(sourcePath, targetPath) {
22348
22342
  if (!await pathExists2(sourcePath))
22349
22343
  return;
22350
22344
  await mkdir11(dirname16(targetPath), { recursive: true });
22351
- await cp(sourcePath, targetPath);
22345
+ await cp(sourcePath, targetPath, { recursive: true });
22346
+ }
22347
+ async function copyTestSource(graph, stagingWorkspacePath) {
22348
+ const ignoredSourceBuildPath = resolveInside(graph.rootPath, sourceBuildRoot(graph.sourceDir));
22349
+ if (graph.sourceDir !== ".") {
22350
+ await cp(graph.sourcePath, join21(stagingWorkspacePath, graph.sourceDir), {
22351
+ filter: (path2) => !isSameOrInside2(ignoredSourceBuildPath, path2),
22352
+ recursive: true
22353
+ });
22354
+ return;
22355
+ }
22356
+ await copyIfExists(graph.rootConfigPath, join21(stagingWorkspacePath, "skillset.yaml"));
22357
+ await copyIfExists(graph.sourceRootPath, join21(stagingWorkspacePath, graph.sourceRoot));
22358
+ await copyIfExists(resolveInside(graph.rootPath, "changes"), join21(stagingWorkspacePath, "changes"));
22352
22359
  }
22353
22360
  async function copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspaceLockPath, sourceDir) {
22354
22361
  if (!await pathExists2(workspaceLockPath))
@@ -22361,7 +22368,7 @@ async function copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspa
22361
22368
  }
22362
22369
  if (!isJsonRecord(lock) || !Array.isArray(lock.items))
22363
22370
  return;
22364
- const ignoredSourceBuildPath = resolveInside(rootPath, join21(sourceDir, "build"));
22371
+ const ignoredSourceBuildPath = resolveInside(rootPath, sourceBuildRoot(sourceDir));
22365
22372
  for (const item of lock.items) {
22366
22373
  if (!isJsonRecord(item) || !Array.isArray(item.files))
22367
22374
  continue;
@@ -22375,6 +22382,12 @@ async function copyWorkspaceManagedFiles(rootPath, stagingWorkspacePath, workspa
22375
22382
  }
22376
22383
  }
22377
22384
  }
22385
+ function testBuildRoot(sourceDir) {
22386
+ return sourceDir === "." ? join21(".skillset", TEST_BUILD_DIR) : join21(sourceDir, TEST_BUILD_DIR);
22387
+ }
22388
+ function sourceBuildRoot(sourceDir) {
22389
+ return sourceDir === "." ? ".skillset/build" : join21(sourceDir, "build");
22390
+ }
22378
22391
  function makeRunId(name) {
22379
22392
  const stamp = new Date().toISOString().replace(/[-:]/g, "").replace(/\.\d{3}Z$/, "Z");
22380
22393
  const digest2 = createHash8("sha256").update(`${name}:${stamp}:${randomBytes2(8).toString("hex")}`).digest("hex").slice(0, 8);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillset",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Source-first compiler for Claude and Codex agent loadouts.",
5
5
  "type": "module",
6
6
  "files": [