@uzysjung/agent-harness 26.179.0 → 26.181.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.
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ import {
31
31
  RETIRED_HOOK_WIRING_REFS,
32
32
  RETIRED_PATHS,
33
33
  RETIRED_SKILL_IDS,
34
+ RULES_BLOCK,
34
35
  SCAFFOLD_BANNER_LINES,
35
36
  SHARED_FILES,
36
37
  SKILLS_BLOCK,
@@ -94,6 +95,7 @@ import {
94
95
  isOutsideProject,
95
96
  isTrack,
96
97
  isUnfilledScaffold,
98
+ jsonKeys,
97
99
  jsonSha,
98
100
  keyId,
99
101
  legacyDroppedKeys,
@@ -147,7 +149,7 @@ import {
147
149
  withoutAppleDouble,
148
150
  wrapHarnessBlock,
149
151
  writeInstallLog
150
- } from "./chunk-LRPCXEUU.js";
152
+ } from "./chunk-MIHX6XYD.js";
151
153
 
152
154
  // node_modules/sisteransi/src/index.js
153
155
  var require_src = __commonJS({
@@ -1969,9 +1971,16 @@ function renameSlashes(text) {
1969
1971
  return text.replaceAll("/uzys:", "/uzys-");
1970
1972
  }
1971
1973
  var RULES_NOTE = [
1972
- "> \uD558\uB124\uC2A4\uAC00 \uC124\uCE58\uD55C \uB8F0\uC774 \uC5EC\uAE30 \uBCF8\uBB38\uC73C\uB85C \uB4E4\uC5B4\uC628\uB2E4. \uC774 \uD504\uB85C\uC81D\uD2B8\uC5D0\uC11C\uB9CC \uC9C0\uD0AC \uADDC\uCE59\uC744 \uC138\uC6B0\uBA74 \uC774 \uBB38\uC11C\uC5D0",
1973
- "> \uC774\uC5B4 \uC4F0\uAC70\uB098, \uD558\uC704 \uB514\uB809\uD130\uB9AC\uC5D0 `AGENTS.md` \uB97C \uB450\uBA74 \uADF8 \uBC94\uC704\uC5D0\uC11C \uB354 \uAD6C\uCCB4\uC801\uC778 \uADDC\uCE59\uC774 \uB41C\uB2E4."
1974
+ "> \uD558\uB124\uC2A4\uAC00 \uC124\uCE58\uD55C \uB8F0\uC774 \uC5EC\uAE30 \uBCF8\uBB38\uC73C\uB85C \uB4E4\uC5B4\uC628\uB2E4. \uC774 \uD504\uB85C\uC81D\uD2B8\uC5D0\uC11C\uB9CC \uC9C0\uD0AC \uADDC\uCE59\uC744 \uC138\uC6B0\uBA74 \uC774 \uC808 **\uC704\uC5D0** `## ` \uC808\uB85C",
1975
+ "> \uC4F0\uAC70\uB098, \uD558\uC704 \uB514\uB809\uD130\uB9AC\uC5D0 `AGENTS.md` \uB97C \uB450\uBA74 \uADF8 \uBC94\uC704\uC5D0\uC11C \uB354 \uAD6C\uCCB4\uC801\uC778 \uADDC\uCE59\uC774 \uB41C\uB2E4."
1974
1976
  ].join("\n");
1977
+ var RULES_POINTER = [
1978
+ "> \uD558\uB124\uC2A4 \uB8F0\uC740 `.agents/rules/` \uC5D0 \uC788\uB2E4. Antigravity \uB294 \uADF8 \uD3F4\uB354\uB97C \uC9C1\uC811, OpenCode \uB294 `opencode.json` \uC758",
1979
+ "> `instructions` \uB85C \uC77D\uB294\uB2E4. \uC774 \uD504\uB85C\uC81D\uD2B8\uB9CC\uC758 \uADDC\uCE59\uC740 \uC774 \uC808 **\uC704\uC5D0** `## ` \uC808\uB85C \uC4F4\uB2E4."
1980
+ ].join("\n");
1981
+ function hasRulesPointer(text) {
1982
+ return text.includes(RULES_POINTER);
1983
+ }
1975
1984
  var CODEX_SIZE_NOTE = [
1976
1985
  ">",
1977
1986
  "> Codex \uB294 **\uD569\uCE5C \uD06C\uAE30**\uAC00 `project_doc_max_bytes`(\uAE30\uBCF8 32 KiB)\uC5D0 \uB2FF\uC73C\uBA74 **\uAC70\uAE30\uC11C \uC77D\uAE30\uB97C \uBA48\uCD98\uB2E4** \u2014 \uB4A4\uC5D0 \uC624\uB294",
@@ -2016,12 +2025,18 @@ function pruneTemplate(template, empty) {
2016
2025
  function renderAgentsMd(params) {
2017
2026
  const clis = agentsMdClis(params.clis);
2018
2027
  if (clis.length === 0) throw new Error("renderAgentsMd: empty CLI set");
2019
- const inlineRules = clis.includes("codex") || clis.includes("opencode");
2028
+ const pointer = params.rulesViaInstructions === true && !clis.includes("codex");
2029
+ const inlineRules = !pointer && (clis.includes("codex") || clis.includes("opencode"));
2020
2030
  const leads = clis.flatMap((c3) => PROTECTED_LEAD[c3] ?? []);
2021
2031
  const values = {
2022
- "{HARNESS_RULES_NOTE}": inlineRules ? clis.includes("codex") ? `${RULES_NOTE}
2023
- ${CODEX_SIZE_NOTE}` : RULES_NOTE : "",
2024
- "{HARNESS_RULES}": inlineRules ? params.harnessRules : "",
2032
+ "{HARNESS_RULES}": pointer ? wrapHarnessBlock(RULES_BLOCK, RULES_POINTER) : inlineRules ? wrapHarnessBlock(
2033
+ RULES_BLOCK,
2034
+ [
2035
+ clis.includes("codex") ? `${RULES_NOTE}
2036
+ ${CODEX_SIZE_NOTE}` : RULES_NOTE,
2037
+ params.harnessRules.trimEnd()
2038
+ ].filter((part) => part !== "").join("\n\n")
2039
+ ) : "",
2025
2040
  "{SESSION_START}": clis.includes("codex") ? CODEX_SESSION_START : "",
2026
2041
  "{PROTECTED_FILES_LEAD}": leads.length === 0 ? "" : `${leads.join("\n")} \uADF8 \uC704\uC5D0:`
2027
2042
  };
@@ -2304,7 +2319,11 @@ function ruleHeadings(harnessRoot) {
2304
2319
  }
2305
2320
  function renderRulesBlock(rules) {
2306
2321
  if (rules.length === 0) return "";
2307
- return rules.map((r) => r.body.replace(/^#\s+/, "## ")).join("\n\n---\n\n");
2322
+ const ordered = [
2323
+ ...rules.filter((r) => r.paths.length === 0),
2324
+ ...rules.filter((r) => r.paths.length > 0)
2325
+ ];
2326
+ return ordered.map((r) => r.body.replace(/^#\s+/, "## ")).join("\n\n---\n\n");
2308
2327
  }
2309
2328
 
2310
2329
  // src/shared-write.ts
@@ -2449,12 +2468,28 @@ function agentsMdModel(disk, recordedByHarness, recordedBlock = false) {
2449
2468
  if (legacy) return "sections";
2450
2469
  return "block";
2451
2470
  }
2452
- function writeAgentsMd(params) {
2453
- const abs = join10(params.projectDir, AGENTS_MD);
2471
+ function agentsMdState(projectDir, baseline, record) {
2472
+ const abs = join10(projectDir, AGENTS_MD);
2454
2473
  const disk = existsSync9(abs) ? readFileSync6(abs, "utf8") : null;
2455
- const recordedBlock = (params.record.portions ?? []).some((p2) => p2.path === AGENTS_MD);
2474
+ const recordedBlock = (record.portions ?? []).some((p2) => p2.path === AGENTS_MD);
2475
+ return {
2476
+ abs,
2477
+ disk,
2478
+ recordedBlock,
2479
+ model: agentsMdModel(disk, baseline.has(AGENTS_MD), recordedBlock)
2480
+ };
2481
+ }
2482
+ function agentsMdModelFor(projectDir, baseline, record) {
2483
+ return agentsMdState(projectDir, baseline, record).model;
2484
+ }
2485
+ function writeAgentsMd(params) {
2486
+ const { abs, disk, recordedBlock, model } = agentsMdState(
2487
+ params.projectDir,
2488
+ params.baseline,
2489
+ params.record
2490
+ );
2456
2491
  const recordedByHarness = params.baseline.has(AGENTS_MD);
2457
- if (agentsMdModel(disk, recordedByHarness, recordedBlock) === "sections") {
2492
+ if (model === "sections") {
2458
2493
  const legacyUnrecorded = disk !== null && !recordedByHarness && isLegacyHarnessAgentsMd(disk);
2459
2494
  const merged = mergeAgentsMdDetailed({
2460
2495
  rendered: params.rendered,
@@ -2611,7 +2646,10 @@ function runAgentsMdTransform(params) {
2611
2646
  skillIds
2612
2647
  ),
2613
2648
  harnessRules: renderRulesBlock(portRules(harnessRoot, params.rules)),
2614
- clis
2649
+ clis,
2650
+ // #944 R2-B1 — 위치 안내는 절 모델에만. 첫 접촉 블록은 늘 인라인이다 — 설치자가 블록을 고치면 굳어서, 굳은 위치 안내는 CLI
2651
+ // 집합이 바뀐 뒤(Antigravity 가 빠지거나 Codex 가 들어오면) 가리킬 룰이 없다
2652
+ rulesViaInstructions: params.rulesViaInstructions && agentsMdModelFor(projectDir, baseline, shared2) === "sections"
2615
2653
  });
2616
2654
  const agentsMd = writeAgentsMd({
2617
2655
  projectDir,
@@ -3226,6 +3264,16 @@ function renderOpencodeMcp(mcp) {
3226
3264
  Object.entries(mcp.mcpServers).map(([name, cfg]) => [`mcp.${name}`, toOpencode(cfg)])
3227
3265
  );
3228
3266
  }
3267
+ var RULES_INSTRUCTION = ".agents/rules/*.md";
3268
+ var RULES_INSTRUCTION_KEY = `instructions[=${RULES_INSTRUCTION}]`;
3269
+ function renderOpencodePortion(mcp, rulesInstruction) {
3270
+ const out = new Map(renderOpencodeMcp(mcp));
3271
+ if (rulesInstruction) out.set(RULES_INSTRUCTION_KEY, RULES_INSTRUCTION);
3272
+ return out;
3273
+ }
3274
+ function hasRulesInstruction(text) {
3275
+ return jsonKeys.read(text, [RULES_INSTRUCTION_KEY])?.has(RULES_INSTRUCTION_KEY) === true;
3276
+ }
3229
3277
  function renderOpencodeJson(params) {
3230
3278
  const config = parseTemplate(params.template);
3231
3279
  if (params.mcp) {
@@ -3272,7 +3320,7 @@ function runOpencodeTransform(params) {
3272
3320
  });
3273
3321
  ensureDir(projectDir);
3274
3322
  const opencodeJsonPath = join18(projectDir, OPENCODE_JSON);
3275
- const render = renderOpencodeMcp(mcp);
3323
+ const render = renderOpencodePortion(mcp, params.rulesInstruction === true);
3276
3324
  const opencodeJson = writeShared({
3277
3325
  projectDir,
3278
3326
  path: OPENCODE_JSON,
@@ -3316,6 +3364,7 @@ function runOpencodeTransform(params) {
3316
3364
  return {
3317
3365
  opencodeJsonPath,
3318
3366
  opencodeJson,
3367
+ rulesViaInstructions: rulesInstructionOnDisk(opencodeJsonPath),
3319
3368
  skillFiles,
3320
3369
  retiredCommands,
3321
3370
  forgetCommands,
@@ -3323,6 +3372,13 @@ function runOpencodeTransform(params) {
3323
3372
  };
3324
3373
  }
3325
3374
  var OPENCODE_JSON = "opencode.json";
3375
+ function rulesInstructionOnDisk(path) {
3376
+ try {
3377
+ return existsSync14(path) && hasRulesInstruction(readFileSync13(path, "utf8"));
3378
+ } catch {
3379
+ return false;
3380
+ }
3381
+ }
3326
3382
  function readRequired3(path) {
3327
3383
  if (!existsSync14(path)) {
3328
3384
  throw new Error(`OpenCode transform: required source missing: ${path}`);
@@ -3380,6 +3436,13 @@ function adapterExcluded(harnessRoot, excluded) {
3380
3436
  }
3381
3437
  return out;
3382
3438
  }
3439
+ function wroteEveryRule(harnessRoot, projectDir, report, rules) {
3440
+ if (report === null) return false;
3441
+ const written = new Set(report.harnessRuleFiles);
3442
+ return portRules(harnessRoot, rules).every(
3443
+ (r) => written.has(join19(projectDir, ".agents", "rules", `${r.name}.md`))
3444
+ );
3445
+ }
3383
3446
  function mcpSources(harnessRoot) {
3384
3447
  return {
3385
3448
  templateMcpPath: join19(harnessRoot, "templates/mcp.json"),
@@ -3467,6 +3530,7 @@ function runCliTransforms(params) {
3467
3530
  }
3468
3531
  journal?.done("codex");
3469
3532
  }
3533
+ const agentsSet = agentsMdClis([...cli, ...recordedClis2]);
3470
3534
  let opencode = null;
3471
3535
  if (cli.includes("opencode")) {
3472
3536
  opencode = runOpencodeTransform({
@@ -3477,6 +3541,12 @@ function runCliTransforms(params) {
3477
3541
  baseline,
3478
3542
  refreshOnly,
3479
3543
  shared: shared2,
3544
+ // #944 (ADR-116) — Antigravity 가 집합(이번 선택 ∪ 기록)에 있고 Codex 가 `AGENTS.md` 를 읽지 않고 그 파일이 절 모델일 때
3545
+ // 원소를 둔다. Antigravity 를 안 고른 부분 실행도 원소를 걷지 않는다(F2 — 그 실행의 `AGENTS.md` 는 D2 ③ 으로 인라인이라 두 번
3546
+ // 읽고, 다음 update 가 포인터로 모은다). 첫 접촉 블록(`block`)은 늘 인라인이라(R2-B1) 원소를 두면 OpenCode 가 늘 두 번 읽는다 —
3547
+ // 모델은 `writeAgentsMd` 와 같은 판정이고 그 파일은 앞의 변환이 쓰지 않는다. 쓰기 주체는 이 변환 하나다 — `AGENTS.md` 쪽은
3548
+ // 결과(`rulesViaInstructions`)만 읽는다
3549
+ rulesInstruction: agentsSet.includes("antigravity") && !agentsSet.includes("codex") && agentsMdModelFor(projectDir, baseline, shared2) === "sections",
3480
3550
  ...writerParams
3481
3551
  });
3482
3552
  absorb(opencode);
@@ -3498,16 +3568,20 @@ function runCliTransforms(params) {
3498
3568
  absorb(antigravity);
3499
3569
  journal?.done("antigravity");
3500
3570
  }
3501
- const agentsSet = agentsMdClis([...cli, ...recordedClis2]);
3502
3571
  let agentsMd = null;
3503
3572
  if (agentsSet.length > 0) {
3504
3573
  const beyondThisRun = agentsSet.some((c3) => !cli.includes(c3));
3574
+ const agentsRules = beyondThisRun && params.cumulativeRules !== void 0 ? params.cumulativeRules : rules;
3505
3575
  agentsMd = runAgentsMdTransform({
3506
3576
  harnessRoot,
3507
3577
  projectDir,
3508
3578
  clis: agentsSet,
3509
3579
  selectedInternalSkills,
3510
- rules: beyondThisRun && params.cumulativeRules !== void 0 ? params.cumulativeRules : rules,
3580
+ rules: agentsRules,
3581
+ // #944 (ADR-116) — 룰 본문 대신 위치 안내는 이번 실행이 OpenCode 의 도달을 **보장했을 때만**(집합이 아니라 쓴 결과로):
3582
+ // ① Codex ∉ 집합 ② opencode 변환이 이번에 돌았다 ③ Antigravity 가 이번 룰을 전부 `.agents/rules/` 에 썼다 ④ 그 뒤
3583
+ // 디스크의 `opencode.json` 에 룰 원소가 있다. 하나라도 거짓이면 인라인 — OpenCode 가 룰을 0번 받는 실행은 없다
3584
+ rulesViaInstructions: !agentsSet.includes("codex") && opencode?.rulesViaInstructions === true && wroteEveryRule(harnessRoot, projectDir, antigravity, agentsRules),
3511
3585
  baseline,
3512
3586
  refreshOnly,
3513
3587
  // ADR-099 R2 — 기록이 이 파일을 읽는 CLI 를 깔린 것으로 말하면 없어도 만든다(26.164.0 이하 Antigravity 단독 설치본은
@@ -4796,7 +4870,10 @@ function renderedKeyIds(harnessRoot, input, clis) {
4796
4870
  add(".codex/config.toml", TABLES_REGION);
4797
4871
  }
4798
4872
  if (clis.includes("opencode")) {
4799
- for (const key of renderOpencodeMcp(mcp).keys()) add("opencode.json", key);
4873
+ const rulesInstruction = clis.includes("antigravity") && !clis.includes("codex");
4874
+ for (const key of renderOpencodePortion(mcp, rulesInstruction).keys()) {
4875
+ add("opencode.json", key);
4876
+ }
4800
4877
  }
4801
4878
  if (clis.some(isAgentsMdCli)) add("AGENTS.md", AGENTS_BLOCK_NAME);
4802
4879
  return out;
@@ -7054,6 +7131,13 @@ function listHookFiles(hookDir) {
7054
7131
  return readdirSync5(hookDir, { withFileTypes: true }).filter((e2) => e2.isFile() && e2.name.endsWith(".sh")).map((e2) => resolve(hookDir, e2.name));
7055
7132
  }
7056
7133
 
7134
+ // src/shell-arg.ts
7135
+ init_esm_shims();
7136
+ var SHELL_SPECIAL = /[\s*?[\]{}()$`'"\\;&|<>!]/;
7137
+ function shellArg(s) {
7138
+ return SHELL_SPECIAL.test(s) ? `'${s.replaceAll("'", `'\\''`)}'` : s;
7139
+ }
7140
+
7057
7141
  // src/commands/install-render.ts
7058
7142
  init_esm_shims();
7059
7143
  import { existsSync as existsSync22, readdirSync as readdirSync6, readFileSync as readFileSync24 } from "fs";
@@ -7376,7 +7460,7 @@ function residentEntriesOnDisk(spec) {
7376
7460
  file: join32(abs, e2.name)
7377
7461
  })) : [];
7378
7462
  };
7379
- const rules = surface === "claude" ? mdFiles(join32(".claude", "rules"), "rules") : rulesInline(spec.cli) ? planned.filter((e2) => e2.target.startsWith(".claude/rules/")) : mdFiles(join32(".agents", "rules"), "rules", "uzys-harness.md");
7463
+ const rules = surface === "claude" ? mdFiles(join32(".claude", "rules"), "rules") : rulesInline(spec) ? planned.filter((e2) => e2.target.startsWith(".claude/rules/")) : mdFiles(join32(".agents", "rules"), "rules", "uzys-harness.md");
7380
7464
  const slot = hasClaude ? join32(".claude", "skills") : join32(".agents", "skills");
7381
7465
  const skills = planned.filter((e2) => e2.target.startsWith(".claude/skills/")).map((e2) => ({
7382
7466
  ...e2,
@@ -7398,7 +7482,7 @@ function contextFilesOnDisk(spec) {
7398
7482
  return files.map((f) => join32(spec.projectDir, f));
7399
7483
  }
7400
7484
  function rulesInsideAgentsMd(spec, cost) {
7401
- if (anchorSurface(spec.cli).scaffold !== "agents-md" || !rulesInline(spec.cli)) return cost;
7485
+ if (anchorSurface(spec.cli).scaffold !== "agents-md" || !rulesInline(spec)) return cost;
7402
7486
  const rendered = spec.updateOnly === void 0 || spec.updateOnly.includes("external");
7403
7487
  return makeResidentCost({
7404
7488
  ...cost,
@@ -7407,8 +7491,10 @@ function rulesInsideAgentsMd(spec, cost) {
7407
7491
  contextNote: "whole file, incl. your text"
7408
7492
  });
7409
7493
  }
7410
- function rulesInline(cli) {
7411
- return cli.includes("codex") || cli.includes("opencode");
7494
+ function rulesInline(spec) {
7495
+ if (!spec.cli.includes("codex") && !spec.cli.includes("opencode")) return false;
7496
+ const agents = join32(spec.projectDir, "AGENTS.md");
7497
+ return !(existsSync22(agents) && hasRulesPointer(readFileSync24(agents, "utf8")));
7412
7498
  }
7413
7499
  function renderCliArtifacts(log, spec, report) {
7414
7500
  const agentsReport = report.agentsMd ?? null;
@@ -7587,8 +7673,14 @@ function sharedLeftRow(f) {
7587
7673
  return assetRow("skip", f.path, `${parts.join(" \xB7 ")}${legacy}`);
7588
7674
  }
7589
7675
  function opencodeMcpPart(r) {
7590
- const names = harnessKeysInFile(r).map((k2) => /^mcp\.(.+)$/.exec(k2)?.[1]).filter((n) => n !== void 0 && !n.endsWith("{}"));
7591
- return names.length > 0 ? `harness mcp: ${names.join(" \xB7 ")}` : "no harness part in the file";
7676
+ const keys = harnessKeysInFile(r);
7677
+ const names = keys.map((k2) => /^mcp\.(.+)$/.exec(k2)?.[1]).filter((n) => n !== void 0 && !n.endsWith("{}"));
7678
+ const instructions = keys.flatMap((k2) => /^instructions\[=(.*)\]$/.exec(k2)?.[1] ?? []);
7679
+ const parts = [
7680
+ ...names.length > 0 ? [`harness mcp: ${names.join(" \xB7 ")}`] : [],
7681
+ ...instructions.length > 0 ? [`harness instructions: ${instructions.join(" \xB7 ")}`] : []
7682
+ ];
7683
+ return parts.length > 0 ? parts.join(" \xB7 ") : "no harness part in the file";
7592
7684
  }
7593
7685
  function configRegionsPart(r) {
7594
7686
  const order = (k2) => k2 === "top" ? 0 : 1;
@@ -7795,7 +7887,7 @@ function renderPhase1Rows(log, baseline, verbose = false) {
7795
7887
  assetRow(
7796
7888
  "skip",
7797
7889
  "to keep it out",
7798
- `deleting is undone by the next update \u2014 re-run \`agent-harness install\` with your usual flags plus ${withoutArgs.map((a) => `--without ${a}`).join(" ")}, then delete it again (${KEPT_OUT_SCOPE})`
7890
+ `deleting is undone by the next update \u2014 re-run \`agent-harness install\` with your usual flags plus ${withoutArgs.map((a) => `--without ${shellArg(a)}`).join(" ")}, then delete it again (${KEPT_OUT_SCOPE})`
7799
7891
  )
7800
7892
  );
7801
7893
  }
@@ -8326,7 +8418,7 @@ var GITIGNORE_RECORD_DIR_NOTE = "now ignores only the harness's runtime files \u
8326
8418
  function excludedKeyParts(f) {
8327
8419
  const parts = [];
8328
8420
  if (f.removedOut.length > 0) {
8329
- const asked = f.removedOut.map((id) => `--without ${id}`).join(" ");
8421
+ const asked = f.removedOut.map((id) => `--without ${shellArg(id)}`).join(" ");
8330
8422
  parts.push(`removed the harness part: ${f.removedOut.join(", ")} (you asked: ${asked})`);
8331
8423
  }
8332
8424
  if (f.removedEdited.length > 0) {
@@ -8359,18 +8451,18 @@ function catalogRemovedRows(items) {
8359
8451
  const only = next ? assetCliSupport(next).map((cli) => CLI_DISPLAY_NAMES[cli]).join(" \xB7 ") : "\uB2E4\uB978 CLI";
8360
8452
  parts.push(`${e2.replacedBy} \uB294 ${only} \uC804\uC6A9\uC774\uB77C \uC774 \uC124\uCE58\uBCF8\uC758 CLI \uC5D0\uB294 \uAE54\uB9AC\uC9C0 \uC54A\uB294\uB2E4`);
8361
8453
  } else {
8362
- parts.push(`\uC0C8 \uAC83\uC740 agent-harness install --with ${e2.replacedBy}`);
8454
+ parts.push(`\uC0C8 \uAC83\uC740 agent-harness install --with ${shellArg(e2.replacedBy)}`);
8363
8455
  }
8364
- parts.push(`\uC61B \uAC83\uC744 \uCE58\uC6B0\uB824\uBA74 agent-harness uninstall --only ${e2.id}`);
8456
+ parts.push(`\uC61B \uAC83\uC744 \uCE58\uC6B0\uB824\uBA74 agent-harness uninstall --only ${shellArg(e2.id)}`);
8365
8457
  } else {
8366
- parts.push(`\uCE58\uC6B0\uB824\uBA74 agent-harness uninstall --only ${e2.id}`);
8458
+ parts.push(`\uCE58\uC6B0\uB824\uBA74 agent-harness uninstall --only ${shellArg(e2.id)}`);
8367
8459
  }
8368
8460
  return assetRow("skip", e2.id, parts.join(" \xB7 "));
8369
8461
  });
8370
8462
  }
8371
8463
  function excludedStillThereRows(items) {
8372
8464
  return items.map(
8373
- (e2) => e2.catalog ? ` ${c.yellow(symbol.skip)} ${e2.id} \u2014 excluded, so the harness no longer updates it (still installed). To manage it again: run install (without --without ${e2.id}; add --with ${e2.id} if it is opt-in) \xB7 remove it: agent-harness uninstall --only ${e2.id}` : ` ${c.yellow(symbol.skip)} ${e2.id} \u2014 excluded (still on disk \u2014 an earlier install put it there; the harness does not delete it. Remove the file yourself, or run uninstall) \xB7 to manage it again: run install without --without ${e2.id}`
8465
+ (e2) => e2.catalog ? ` ${c.yellow(symbol.skip)} ${e2.id} \u2014 excluded, so the harness no longer updates it (still installed). To manage it again: run install (without --without ${shellArg(e2.id)}; add --with ${shellArg(e2.id)} if it is opt-in) \xB7 remove it: agent-harness uninstall --only ${shellArg(e2.id)}` : ` ${c.yellow(symbol.skip)} ${e2.id} \u2014 excluded (still on disk \u2014 an earlier install put it there; the harness does not delete it. Remove the file yourself, or run uninstall) \xB7 to manage it again: run install without --without ${shellArg(e2.id)}`
8374
8466
  );
8375
8467
  }
8376
8468
  function installedByExternalPhase(id) {
@@ -8378,7 +8470,7 @@ function installedByExternalPhase(id) {
8378
8470
  }
8379
8471
  function releasedRows(items, notInstalled = /* @__PURE__ */ new Map()) {
8380
8472
  return items.map(
8381
- (r) => notInstalled.has(r.id) ? ` ${c.yellow(symbol.skip)} ${r.id} \u2014 selected again, but ${notInstalled.get(r.id)}: this install did not pass --without ${r.id}` : r.again ? ` ${c.green("\u21BA")} ${r.id} \u2014 dropped earlier, installed again: this install did not pass --without ${r.id}` : ` ${c.green("\u21BA")} ${r.id} \u2014 no longer excluded: ${r.tail} (this install did not pass --without ${r.id})`
8473
+ (r) => notInstalled.has(r.id) ? ` ${c.yellow(symbol.skip)} ${r.id} \u2014 selected again, but ${notInstalled.get(r.id)}: this install did not pass --without ${shellArg(r.id)}` : r.again ? ` ${c.green("\u21BA")} ${r.id} \u2014 dropped earlier, installed again: this install did not pass --without ${shellArg(r.id)}` : ` ${c.green("\u21BA")} ${r.id} \u2014 no longer excluded: ${r.tail} (this install did not pass --without ${shellArg(r.id)})`
8382
8474
  );
8383
8475
  }
8384
8476
  function legacyReleasedCatalogRows(ids) {
@@ -8388,7 +8480,7 @@ function legacyReleasedCatalogRows(ids) {
8388
8480
  }
8389
8481
  var KEPT_OUT_SCOPE = "kept out by update; a later install without that flag brings it back";
8390
8482
  function restoredKeysPart(ids) {
8391
- const drop = ids.map((id) => `--without ${id}`).join(" ");
8483
+ const drop = ids.map((id) => `--without ${shellArg(id)}`).join(" ");
8392
8484
  return `was missing \u2014 restored: ${ids.join(", ")} ${c.dim(`(drop it: install \u2026 ${drop} \u2014 ${KEPT_OUT_SCOPE})`)}`;
8393
8485
  }
8394
8486
  function unrestoredPart(names) {
@@ -8396,7 +8488,7 @@ function unrestoredPart(names) {
8396
8488
  }
8397
8489
  function restoredFilePart(f) {
8398
8490
  const how = f.how === void 0 ? "" : ` \u2014 ${f.how}`;
8399
- const drop = f.ids !== void 0 && f.ids.length > 0 ? ` ${c.dim(`(drop it: install \u2026 ${f.ids.map((id) => `--without ${id}`).join(" ")} \u2014 ${KEPT_OUT_SCOPE})`)}` : f.clis.length === 0 ? "" : ` ${c.dim(`(drop this CLI for good: ${f.clis.map((cli) => `agent-harness uninstall --cli ${cli}`).join(" and ")})`)}`;
8491
+ const drop = f.ids !== void 0 && f.ids.length > 0 ? ` ${c.dim(`(drop it: install \u2026 ${f.ids.map((id) => `--without ${shellArg(id)}`).join(" ")} \u2014 ${KEPT_OUT_SCOPE})`)}` : f.clis.length === 0 ? "" : ` ${c.dim(`(drop this CLI for good: ${f.clis.map((cli) => `agent-harness uninstall --cli ${cli}`).join(" and ")})`)}`;
8400
8492
  return `was missing \u2014 restored${how}${drop}`;
8401
8493
  }
8402
8494
  function legacyRestoredRow(ids) {
@@ -8728,7 +8820,7 @@ function unknownKeyWarning(id, flag, keys) {
8728
8820
  const prefix = id.slice(0, id.indexOf(":") + 1);
8729
8821
  const same = [...keys].filter((k2) => k2.startsWith(prefix)).sort();
8730
8822
  const shown = same.length > 0 ? same : [...keys].sort();
8731
- return shown.length > 0 ? `[WARN] Unknown key id '${id}' (${flag}). Skipping. Key ids this install writes: ${shown.join(", ")}` : `[WARN] Unknown key id '${id}' (${flag}). Skipping. This install writes no harness part with that name`;
8823
+ return shown.length > 0 ? `[WARN] Unknown key id '${id}' (${flag}). Skipping. Key ids this install writes: ${shown.map(shellArg).join(", ")}` : `[WARN] Unknown key id '${id}' (${flag}). Skipping. This install writes no harness part with that name`;
8732
8824
  }
8733
8825
  function conflictingIds(options) {
8734
8826
  const without = new Set(normalizeRepeatable(options.without));
@@ -8860,7 +8952,7 @@ function formatSelectionRows(log, projectDir) {
8860
8952
  rows.push(` ${day} migration (26.162\u201326.163 record): ${parts.join(" \xB7 ")}`);
8861
8953
  continue;
8862
8954
  }
8863
- if (ev.without?.length) parts.push(`--without ${ev.without.join(", ")}`);
8955
+ if (ev.without?.length) parts.push(`--without ${ev.without.map(shellArg).join(", ")}`);
8864
8956
  if (ev.with?.length) parts.push(`re-added ${ev.with.join(", ")}`);
8865
8957
  const tags = [ev.via === "wizard" ? "wizard" : "", ev.interrupted ? "interrupted" : ""].filter(Boolean).join(", ");
8866
8958
  rows.push(` ${day} install ${parts.join(" \xB7 ")}${tags ? ` (${tags})` : ""}`);
@@ -10077,6 +10169,7 @@ var TRACK_LABELS = {
10077
10169
  "csr-fastapi": "csr-fastapi \u2014 Vite + React + FastAPI",
10078
10170
  "ssr-htmx": "ssr-htmx \u2014 htmx + FastAPI (Python) + daisyUI",
10079
10171
  "ssr-htmx-fastify": "ssr-htmx-fastify \u2014 htmx + Fastify (Node) + daisyUI",
10172
+ "ssr-htmx-hono": "ssr-htmx-hono \u2014 htmx + Hono (TypeScript) + daisyUI",
10080
10173
  "ssr-nextjs": "ssr-nextjs \u2014 Next.js (App Router)",
10081
10174
  data: "data \u2014 Python data / DuckDB / PySide6",
10082
10175
  executive: "executive \u2014 proposals / DD / pitch (no agent-skills)",
@@ -11284,6 +11377,9 @@ function rerenderAgentsMd(ctx, set, log) {
11284
11377
  projectDir,
11285
11378
  clis: agentsMdClis(set),
11286
11379
  ...recordedRenderInputs(projectDir, log, log.spec.tracks.filter(isTrack)),
11380
+ // #944 (ADR-116) — 이 경로는 `opencode.json` 을 쓰지 않아 OpenCode 의 도달을 보장하지 못한다 — 늘 인라인. 다음 update 가
11381
+ // 조건이 맞으면 위치 안내로 되돌린다(ADR-103 결정 2 의 "다음 update 와 같은 바이트" 는 이 경우에 깨진다 — ADR-116)
11382
+ rulesViaInstructions: false,
11287
11383
  baseline: new Map((log.externalFiles ?? []).map((f) => [f.path, f.sha256])),
11288
11384
  refreshOnly: true,
11289
11385
  installedByRecord: true,