@mstar-harness/cli 1.2.1 → 1.3.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.
@@ -4254,6 +4254,12 @@ var CODEX_AGENT_NAMES = [
4254
4254
  "writing-specialist",
4255
4255
  "prompt-engineer"
4256
4256
  ];
4257
+ var CODEX_ITERATION_SKILL_NAMES = [
4258
+ "iteration-start",
4259
+ "iteration-drive",
4260
+ "iteration-loop"
4261
+ ];
4262
+ var GLOBAL_ITERATION_SKILLS_WARNING = "Codex iteration commands (iteration-start / iteration-drive / iteration-loop) are installed as project-local skills under .agents/skills/ only. Global install skips them to avoid polluting other code agents. Re-run with --scope project to enable.";
4257
4263
  function globalMarketplacePath() {
4258
4264
  return GLOBAL_MARKETPLACE_PATH;
4259
4265
  }
@@ -4357,6 +4363,44 @@ function validateAgentLinks(scope) {
4357
4363
  }
4358
4364
  return errors2;
4359
4365
  }
4366
+ function iterationCommandSourcePath(skillName) {
4367
+ return path4.join(HARNESS_REPO_PATH, "commands", `${skillName}.md`);
4368
+ }
4369
+ function projectIterationSkillLinkPath(skillName) {
4370
+ return path4.join(resolveProjectRoot(), ".agents", "skills", skillName, "SKILL.md");
4371
+ }
4372
+ function iterationSkillGitignoreEntry(skillName) {
4373
+ return `.agents/skills/${skillName}`;
4374
+ }
4375
+ function ensureIterationSkillLinks(dryRun) {
4376
+ const notes = [];
4377
+ const projectRoot = resolveProjectRoot();
4378
+ for (const skillName of CODEX_ITERATION_SKILL_NAMES) {
4379
+ const source = iterationCommandSourcePath(skillName);
4380
+ const linkPath = projectIterationSkillLinkPath(skillName);
4381
+ notes.push(ensureSymlink(source, linkPath, dryRun));
4382
+ }
4383
+ const gitignoreEntries = CODEX_ITERATION_SKILL_NAMES.map(iterationSkillGitignoreEntry);
4384
+ notes.push(...appendGitignore(projectRoot, gitignoreEntries, dryRun));
4385
+ notes.push("Installed Codex project-scoped iteration skills under .agents/skills/ (iteration-start, iteration-drive, iteration-loop) — symlinked to harness commands/*.md.");
4386
+ return notes;
4387
+ }
4388
+ function validateIterationSkillLinks() {
4389
+ const errors2 = [];
4390
+ const projectRoot = resolveProjectRoot();
4391
+ const gitignorePath = path4.join(projectRoot, ".gitignore");
4392
+ const gitignore = fs3.existsSync(gitignorePath) ? fs3.readFileSync(gitignorePath, "utf8") : "";
4393
+ const lines = gitignore.split(/\r?\n/);
4394
+ for (const skillName of CODEX_ITERATION_SKILL_NAMES) {
4395
+ const source = iterationCommandSourcePath(skillName);
4396
+ const linkPath = projectIterationSkillLinkPath(skillName);
4397
+ errors2.push(...validateSymlink(source, linkPath));
4398
+ const entry = iterationSkillGitignoreEntry(skillName);
4399
+ if (!lines.includes(entry))
4400
+ errors2.push(`Missing .gitignore entry: ${entry}`);
4401
+ }
4402
+ return errors2;
4403
+ }
4360
4404
  function runInit(scope, dryRun) {
4361
4405
  const pathToMarketplace = marketplacePath(scope);
4362
4406
  const current = readJson(pathToMarketplace);
@@ -4368,6 +4412,9 @@ function runInit(scope, dryRun) {
4368
4412
  notes.push(ensureSymlink(HARNESS_REPO_PATH, path4.join(projectRoot, CODEX_PLUGIN_LINK), dryRun));
4369
4413
  notes.push(...appendGitignore(projectRoot, [CODEX_PLUGIN_LINK, ".codex/agents/*.toml"], dryRun));
4370
4414
  notes.push(...appendHarnessProjectGitignore(projectRoot, dryRun));
4415
+ notes.push(...ensureIterationSkillLinks(dryRun));
4416
+ } else {
4417
+ notes.push(GLOBAL_ITERATION_SKILLS_WARNING);
4371
4418
  }
4372
4419
  notes.push(...ensureAgentLinks(scope, dryRun));
4373
4420
  if (!dryRun)
@@ -4405,6 +4452,7 @@ function runDoctor(scope) {
4405
4452
  if (!lines.includes(entry))
4406
4453
  errors2.push(`Missing .gitignore entry: ${entry}`);
4407
4454
  }
4455
+ errors2.push(...validateIterationSkillLinks());
4408
4456
  }
4409
4457
  errors2.push(...validateAgentLinks(scope));
4410
4458
  return { location: pathToMarketplace, errors: errors2 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/cli",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "description": "Morning Star harness installer CLI (OpenCode, Cursor, Codex).",
5
5
  "license": "MIT",
6
6
  "repository": {