@bstage-sdk/cli 0.6.0 → 0.6.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.
package/dist/MIGRATION.md CHANGED
@@ -88,6 +88,8 @@
88
88
 
89
89
  - `bstage ai install`·`update`·`doctor`가 혼합 레포를 지원한다 — 스킬은 sdk 세트와 liquid 세트의 **합집합**(5종)을 설치하고, `AGENTS.md` 관리 영역은 두 구조와 혼합 규칙(어느 방식으로 만들지 · sdk 페이지 `user`·`admin` 금지 · `bstage build`·`dev --kind` 동작)을 담은 **혼합 본문**이 된다. `mixed`는 판정으로만 나오며 `--kind`로 지정하는 값이 아니다 — 혼합 레포에 `--kind sdk|liquid`를 주면 판정과 어긋나 멈춘다.
90
90
  - `bstage doctor`는 혼합 레포에서 스킬 검사를 건너뛰지 않고 두 세트를 모두 보며, liquid 검증 결과도 함께 낸다. `--json`의 `skillsSkipped`는 항상 `false`다(필드는 비파괴적으로 남긴다).
91
+ - **레포 종류가 바뀐 뒤의 `AGENTS.md`** — sdk 레포에 liquid 템플릿을 더해 혼합이 되면 관리 영역 마커 버전은 그대로라, 예전에는 옛 sdk 본문이 "최신"으로 남았다. 이제 `bstage ai install`·`update`·`doctor`가 본문을 현재 종류의 렌더 결과와 비교해 다르면 갱신(`update`)·`stale`로 본다. 자유 영역은 보존된다.
92
+ - **관리 영역이 이 CLI보다 새 버전이면 하향임을 알린다.** 프로젝트에 고정된 옛 CLI로 `ai install`·`update`·`doctor`를 돌리면 새 CLI가 놓은 관리 영역을 옛 본문으로 되돌리게 된다 — 그 사실을 알리고 최신 CLI로 다시 실행하라고 안내한다. 덮어쓰기 자체는 막지 않는다(마커 버전은 파일 안의 자기선언 값이다).
91
93
  - `bstage-onboarding`·`bstage-liquid` 스킬과 `AGENTS.md`의 "한 레포에 한 방식만" 문구를 공존 규칙(예약 이름 · `dev --kind liquid`)으로 바꿨다.
92
94
 
93
95
  **적용**
package/dist/index.js CHANGED
@@ -4621,9 +4621,12 @@ import { readFile as readFile8 } from "fs/promises";
4621
4621
  import { join as join14 } from "path";
4622
4622
  import {
4623
4623
  VERSION as TOOLKIT_VERSION,
4624
+ AGENTS_MANAGED_VERSION,
4624
4625
  agentsMdStatus,
4625
4626
  compareVersions,
4627
+ extractManagedBlock,
4626
4628
  parseAgentsIdentity as parseAgentsIdentity2,
4629
+ readManagedVersion as readManagedVersion2,
4627
4630
  readSkillStamp as readSkillStamp2,
4628
4631
  renderManagedBlock,
4629
4632
  sanitizeIdentity as sanitizeIdentity2,
@@ -4663,12 +4666,18 @@ async function diagnoseAgentsMd(root, pkgName, kind = "sdk") {
4663
4666
  return { status: "missing", managedBlock: null };
4664
4667
  }
4665
4668
  const status = agentsMdStatus(content);
4666
- if (status === "ok") return { status, managedBlock: null };
4667
4669
  const parsed = parseAgentsIdentity2(content);
4668
4670
  const projectName = sanitizeIdentity2(parsed.projectName) ?? sanitizeIdentity2(pkgName) ?? "custom-templates";
4669
4671
  const space = sanitizeIdentity2(parsed.space) ?? projectName.split("-custom-templates-")[0] ?? projectName;
4670
4672
  const target = resolveProjectTarget(root);
4671
- return { status, managedBlock: renderManagedBlock({ space, projectName, target, kind }) };
4673
+ const block = renderManagedBlock({ space, projectName, target, kind });
4674
+ if (status === "ok") {
4675
+ if (extractManagedBlock(content) === block) return { status, managedBlock: null };
4676
+ const fileVersion = readManagedVersion2(content);
4677
+ const downgrade = fileVersion !== null && fileVersion > AGENTS_MANAGED_VERSION;
4678
+ return downgrade ? { status: "stale", managedBlock: block, downgrade: true } : { status: "stale", managedBlock: block };
4679
+ }
4680
+ return { status, managedBlock: block };
4672
4681
  }
4673
4682
 
4674
4683
  // src/commands/doctor/report.ts
@@ -4960,6 +4969,14 @@ function printAgentsMd(r) {
4960
4969
  console.log(pc15.dim(" \xB7 \uD30C\uC77C \uC5C6\uC74C \u2014 bstage \uD504\uB85C\uC81D\uD2B8\uB77C\uBA74 init/\uB9C8\uC774\uADF8\uB808\uC774\uC158\uC73C\uB85C \uC0DD\uC131\uD558\uC138\uC694."));
4961
4970
  break;
4962
4971
  case "stale":
4972
+ if (r.agentsMd.downgrade) {
4973
+ console.log(
4974
+ pc15.yellow(" ! \uAD00\uB9AC \uC601\uC5ED\uC774 \uC774 CLI\uBCF4\uB2E4 \uC0C8 \uBC84\uC804") + pc15.dim(
4975
+ " \u2014 \uC774 CLI\uAC00 \uC624\uB798\uB3FC \uAC31\uC2E0\uD558\uBA74 \uC61B \uBCF8\uBB38\uC73C\uB85C \uB418\uB3CC\uC544\uAC11\uB2C8\uB2E4(\uD558\uD5A5). \uCD5C\uC2E0 CLI(npx @bstage-sdk/cli@latest)\uB85C \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694."
4976
+ )
4977
+ );
4978
+ break;
4979
+ }
4963
4980
  console.log(
4964
4981
  pc15.yellow(" \u2192 \uAD00\uB9AC \uC601\uC5ED\uC774 \uC624\uB798\uB428") + pc15.dim(" \u2014 `bstage ai update`\uB85C \uAC31\uC2E0(\uC790\uC720 \uC601\uC5ED\uC740 \uBCF4\uC874).")
4965
4982
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bstage-sdk/cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "bstage SDK CLI — build b.stage templates",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -32,14 +32,14 @@
32
32
  "liquidjs": "^10.24.0",
33
33
  "picocolors": "^1.1.1",
34
34
  "vite": "^7.0.0",
35
- "@bstage-sdk/ai-toolkit": "0.6.0",
36
- "@bstage-sdk/core": "0.6.0"
35
+ "@bstage-sdk/ai-toolkit": "0.6.1",
36
+ "@bstage-sdk/core": "0.6.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^25.5.0",
40
40
  "tsup": "^8.0.0",
41
41
  "typescript": "^5.5.0",
42
- "@bstage-sdk/design": "0.6.0"
42
+ "@bstage-sdk/design": "0.6.1"
43
43
  },
44
44
  "license": "MIT",
45
45
  "scripts": {