project-librarian 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/README.ko.md +1 -1
- package/README.md +1 -1
- package/SKILL.md +1 -0
- package/dist/agent-surfaces.js +1 -0
- package/dist/hooks.js +5 -2
- package/dist/init-project-wiki.js +5 -0
- package/dist/install-skill.js +17 -0
- package/dist/native/linux-arm64/project-librarian-indexer +0 -0
- package/dist/native/linux-x64-musl/project-librarian-indexer +0 -0
- package/dist/native/project-librarian-indexer-manifest.json +6 -6
- package/dist/native/win32-arm64/project-librarian-indexer.exe +0 -0
- package/dist/native/win32-x64/project-librarian-indexer.exe +0 -0
- package/docs/cli-reference.md +1 -1
- package/docs/ko/cli-reference.md +1 -1
- package/docs/ko/usage.md +2 -1
- package/docs/usage.md +2 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -41,7 +41,7 @@ npx project-librarian@latest install --scope project --agents all
|
|
|
41
41
|
npx project-librarian@latest update
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
이 명령은 관리 설정 파일, 에이전트 훅, 위키 운영/메타 파일, 기존 프로젝트 범위 스킬 복사본을 갱신합니다. 현재 `wiki/`는 보존하고 migration flag는 거부하므로 위키를 `wiki_legacy*`로 바꾸지 않습니다.
|
|
44
|
+
이 명령은 관리 설정 파일, 에이전트 훅, 위키 운영/메타 파일, 기존 프로젝트 범위 스킬 복사본을 갱신합니다. 기존 공유 `.agents/skills/project-librarian/` 복사본도 특정 에이전트 설정 표면을 암묵적으로 추가하지 않고 갱신합니다. 현재 `wiki/`는 보존하고 migration flag는 거부하므로 위키를 `wiki_legacy*`로 바꾸지 않습니다.
|
|
45
45
|
|
|
46
46
|
특정 프로젝트 표면을 의도적으로 추가하거나 갱신할 때는 `--agents`를 명시합니다.
|
|
47
47
|
|
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ To refresh an existing setup without migrating the wiki, run:
|
|
|
41
41
|
npx project-librarian@latest update
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
That updates managed setup files, agent hooks, wiki operating/meta files, and existing project-scoped skill copies. It preserves the current `wiki/` and rejects migration flags, so it will not rename the wiki to `wiki_legacy*`.
|
|
44
|
+
That updates managed setup files, agent hooks, wiki operating/meta files, and existing project-scoped skill copies. Existing shared `.agents/skills/project-librarian/` copies are refreshed without implying any agent-specific setup surface. It preserves the current `wiki/` and rejects migration flags, so it will not rename the wiki to `wiki_legacy*`.
|
|
45
45
|
|
|
46
46
|
Use `--agents` when you intentionally want to add or refresh a specific project surface:
|
|
47
47
|
|
package/SKILL.md
CHANGED
|
@@ -37,6 +37,7 @@ Supported actions:
|
|
|
37
37
|
Prefer an already installed local runner over network package execution:
|
|
38
38
|
|
|
39
39
|
- In the project-librarian source repository, use `node dist/init-project-wiki.js` when `dist/init-project-wiki.js` exists.
|
|
40
|
+
- In a target repository with a shared project-scoped skill install, use `node .agents/skills/project-librarian/dist/init-project-wiki.js`.
|
|
40
41
|
- In a target repository with a project-scoped Codex skill install, use `node .codex/skills/project-librarian/dist/init-project-wiki.js`.
|
|
41
42
|
- In a target repository with a project-scoped Claude skill install, use `node .claude/skills/project-librarian/dist/init-project-wiki.js`.
|
|
42
43
|
- In a target repository with a project-scoped Cursor skill install, use `node .cursor/skills/project-librarian/dist/init-project-wiki.js`.
|
package/dist/agent-surfaces.js
CHANGED
|
@@ -20,6 +20,7 @@ const agentSurfaceProjectSkillFiles = {
|
|
|
20
20
|
gemini: [".gemini/skills/project-librarian/SKILL.md"],
|
|
21
21
|
};
|
|
22
22
|
const projectLibrarianCommonInstallFiles = [
|
|
23
|
+
".agents/skills/project-librarian/SKILL.md",
|
|
23
24
|
"wiki/startup.md",
|
|
24
25
|
"wiki/index.md",
|
|
25
26
|
"wiki/AGENTS.md",
|
package/dist/hooks.js
CHANGED
|
@@ -149,6 +149,7 @@ const mcpServerName = "project-librarian";
|
|
|
149
149
|
// runner wins; absent any local install we register the published binary.
|
|
150
150
|
const localRunnerCandidates = [
|
|
151
151
|
"tools/project-librarian/dist/init-project-wiki.js",
|
|
152
|
+
".agents/skills/project-librarian/dist/init-project-wiki.js",
|
|
152
153
|
".codex/skills/project-librarian/dist/init-project-wiki.js",
|
|
153
154
|
".claude/skills/project-librarian/dist/init-project-wiki.js",
|
|
154
155
|
".cursor/skills/project-librarian/dist/init-project-wiki.js",
|
|
@@ -458,7 +459,7 @@ function wikiScope(files) {
|
|
|
458
459
|
else if (file.startsWith(".gemini/hooks/") || file === ".gemini/settings.json") add("gemini-hooks");
|
|
459
460
|
else if (file === "AGENTS.md" || file === "CLAUDE.md" || file === "GEMINI.md") add("agents");
|
|
460
461
|
else if (file.startsWith(".githooks/")) add("git-hooks");
|
|
461
|
-
else if (file.startsWith("tools/project-librarian/")) add("skill");
|
|
462
|
+
else if (file.startsWith("tools/project-librarian/") || file.startsWith(".agents/skills/project-librarian/")) add("skill");
|
|
462
463
|
}
|
|
463
464
|
return scopes.length === 0 ? "none" : scopes.join(", ");
|
|
464
465
|
}
|
|
@@ -467,6 +468,7 @@ function validationTrailers() {
|
|
|
467
468
|
const home = process.env.HOME || "";
|
|
468
469
|
const lintScript = [
|
|
469
470
|
"tools/project-librarian/dist/init-project-wiki.js",
|
|
471
|
+
".agents/skills/project-librarian/dist/init-project-wiki.js",
|
|
470
472
|
path.join(home, ".codex/skills/project-librarian/dist/init-project-wiki.js"),
|
|
471
473
|
path.join(home, ".claude/skills/project-librarian/dist/init-project-wiki.js"),
|
|
472
474
|
path.join(home, ".cursor/skills/project-librarian/dist/init-project-wiki.js"),
|
|
@@ -517,7 +519,8 @@ const wikiFiles = staged.filter((file) => {
|
|
|
517
519
|
|| file === ".gemini/settings.json"
|
|
518
520
|
|| file.startsWith(".gemini/hooks/")
|
|
519
521
|
|| file.startsWith(".githooks/")
|
|
520
|
-
|| file.startsWith("tools/project-librarian/")
|
|
522
|
+
|| file.startsWith("tools/project-librarian/")
|
|
523
|
+
|| file.startsWith(".agents/skills/project-librarian/");
|
|
521
524
|
});
|
|
522
525
|
|
|
523
526
|
if (wikiFiles.length === 0) process.exit(0);
|
|
@@ -328,6 +328,7 @@ function runInitCommand() {
|
|
|
328
328
|
const projectSkillSyncSurfaces = args_1.command === "update"
|
|
329
329
|
? (0, install_skill_1.installedProjectSkillSurfaces)().filter((surface) => (0, agent_surfaces_1.includesAgentSurface)(selectedAgentSurfaces, surface))
|
|
330
330
|
: [];
|
|
331
|
+
const syncSharedProjectSkill = args_1.command === "update" && (0, install_skill_1.hasSharedProjectSkillInstall)();
|
|
331
332
|
const shouldWriteSurface = (surface) => (0, agent_surfaces_1.includesAgentSurface)(selectedAgentSurfaces, surface);
|
|
332
333
|
const writeCodexSurface = shouldWriteSurface("codex");
|
|
333
334
|
const writeClaudeSurface = shouldWriteSurface("claude");
|
|
@@ -357,6 +358,10 @@ function runInitCommand() {
|
|
|
357
358
|
for (const result of (0, install_skill_1.syncProjectSkillInstall)(surface))
|
|
358
359
|
results.push(result);
|
|
359
360
|
}
|
|
361
|
+
if (syncSharedProjectSkill) {
|
|
362
|
+
for (const result of (0, install_skill_1.syncSharedProjectSkillInstall)())
|
|
363
|
+
results.push(result);
|
|
364
|
+
}
|
|
360
365
|
// B1 fallback: sync the CURRENT startup.md TL;DR into the managed AGENTS.md block
|
|
361
366
|
// so non-interactive `codex exec` (which does not run SessionStart hooks) still
|
|
362
367
|
// gets compact startup context. Routers are starter files written later in this
|
package/dist/install-skill.js
CHANGED
|
@@ -34,8 +34,11 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.projectSkillTarget = projectSkillTarget;
|
|
37
|
+
exports.sharedProjectSkillTarget = sharedProjectSkillTarget;
|
|
37
38
|
exports.installedProjectSkillSurfaces = installedProjectSkillSurfaces;
|
|
39
|
+
exports.hasSharedProjectSkillInstall = hasSharedProjectSkillInstall;
|
|
38
40
|
exports.syncProjectSkillInstall = syncProjectSkillInstall;
|
|
41
|
+
exports.syncSharedProjectSkillInstall = syncSharedProjectSkillInstall;
|
|
39
42
|
exports.runInstallSkillMode = runInstallSkillMode;
|
|
40
43
|
const fs = __importStar(require("node:fs"));
|
|
41
44
|
const os = __importStar(require("node:os"));
|
|
@@ -43,6 +46,7 @@ const path = __importStar(require("node:path"));
|
|
|
43
46
|
const agent_surfaces_1 = require("./agent-surfaces");
|
|
44
47
|
const args_1 = require("./args");
|
|
45
48
|
const skillName = "project-librarian";
|
|
49
|
+
const sharedProjectSkillRelativeRoot = path.join(".agents", "skills", skillName);
|
|
46
50
|
const packageFiles = [
|
|
47
51
|
"SKILL.md",
|
|
48
52
|
"dist",
|
|
@@ -121,6 +125,9 @@ function projectSkillRelativeRoot(agent) {
|
|
|
121
125
|
function projectSkillTarget(agent) {
|
|
122
126
|
return path.join(process.cwd(), projectSkillRelativeRoot(agent));
|
|
123
127
|
}
|
|
128
|
+
function sharedProjectSkillTarget() {
|
|
129
|
+
return path.join(process.cwd(), sharedProjectSkillRelativeRoot);
|
|
130
|
+
}
|
|
124
131
|
function installTarget(agent, scope) {
|
|
125
132
|
const base = scope === "user" ? userAgentRoot(agent) : path.join(process.cwd(), projectAgentRoot(agent));
|
|
126
133
|
return path.join(base, "skills", skillName);
|
|
@@ -247,6 +254,9 @@ function copyPath(source, target, targetRoot, dryRun) {
|
|
|
247
254
|
function installedProjectSkillSurfaces() {
|
|
248
255
|
return agent_surfaces_1.allAgentSurfaces.filter((agent) => fs.existsSync(path.join(projectSkillTarget(agent), "SKILL.md")));
|
|
249
256
|
}
|
|
257
|
+
function hasSharedProjectSkillInstall() {
|
|
258
|
+
return fs.existsSync(path.join(sharedProjectSkillTarget(), "SKILL.md"));
|
|
259
|
+
}
|
|
250
260
|
function copyPackageFiles(targetRoot, dryRun, labelRoot = targetRoot) {
|
|
251
261
|
const root = packageRoot();
|
|
252
262
|
const packageRows = packageFiles.map((relativePath) => {
|
|
@@ -269,6 +279,13 @@ function syncProjectSkillInstall(agent) {
|
|
|
269
279
|
return [label, status];
|
|
270
280
|
});
|
|
271
281
|
}
|
|
282
|
+
function syncSharedProjectSkillInstall() {
|
|
283
|
+
return copyPackageFiles(sharedProjectSkillTarget(), false, sharedProjectSkillRelativeRoot).map(([label, status]) => {
|
|
284
|
+
if (status === "dry-run")
|
|
285
|
+
throw new Error("shared project skill sync does not support dry-run status");
|
|
286
|
+
return [label, status];
|
|
287
|
+
});
|
|
288
|
+
}
|
|
272
289
|
function runInstallSkillMode() {
|
|
273
290
|
const scope = installScope();
|
|
274
291
|
const agents = installAgents();
|
|
Binary file
|
|
Binary file
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"architecture": "arm64",
|
|
22
22
|
"format": "elf",
|
|
23
23
|
"path": "dist/native/linux-arm64/project-librarian-indexer",
|
|
24
|
-
"sha256": "
|
|
25
|
-
"size":
|
|
24
|
+
"sha256": "88146d5bbe5b77bb53e2cbe872ad6d2a8a93a58fa1b53671841cc94463443f46",
|
|
25
|
+
"size": 3065568,
|
|
26
26
|
"triple": "linux-arm64"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"architecture": "x64",
|
|
46
46
|
"format": "elf",
|
|
47
47
|
"path": "dist/native/linux-x64-musl/project-librarian-indexer",
|
|
48
|
-
"sha256": "
|
|
49
|
-
"size":
|
|
48
|
+
"sha256": "811221a87fe5d8ef9f67f4eafe4386ef7aa03bdc1601e89fa191c0e0d7b0dcd5",
|
|
49
|
+
"size": 3247424,
|
|
50
50
|
"triple": "linux-x64-musl"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"architecture": "arm64",
|
|
54
54
|
"format": "pe",
|
|
55
55
|
"path": "dist/native/win32-arm64/project-librarian-indexer.exe",
|
|
56
|
-
"sha256": "
|
|
56
|
+
"sha256": "69aeecd89d8ec8e7e4e85adfdf15cd682df9eaa14b8e6d0e99f445eeb70e6267",
|
|
57
57
|
"size": 2098688,
|
|
58
58
|
"triple": "win32-arm64"
|
|
59
59
|
},
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"architecture": "x64",
|
|
62
62
|
"format": "pe",
|
|
63
63
|
"path": "dist/native/win32-x64/project-librarian-indexer.exe",
|
|
64
|
-
"sha256": "
|
|
64
|
+
"sha256": "ae493dbea6ddd4cd6831ad9a21db07df0c6e2989602e6048dfbfa9aa1eb80ee5",
|
|
65
65
|
"size": 2375680,
|
|
66
66
|
"triple": "win32-x64"
|
|
67
67
|
}
|
|
Binary file
|
|
Binary file
|
package/docs/cli-reference.md
CHANGED
|
@@ -9,7 +9,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
|
|
|
9
9
|
|
|
10
10
|
`install-skill` remains a compatibility alias for `install`.
|
|
11
11
|
|
|
12
|
-
`update` is the explicit existing-project update command. It rejects `--migrate` and `--adopt-existing`; use top-level `--migrate` when legacy docs or wiki content should be preserved into `wiki_legacy*` and reviewed. When project-scoped Project Librarian skill installs already exist for the selected agent surfaces, `update` copies the current package's reusable skill files and required local-runner runtime dependencies into those project skill directories before refreshing the managed setup.
|
|
12
|
+
`update` is the explicit existing-project update command. It rejects `--migrate` and `--adopt-existing`; use top-level `--migrate` when legacy docs or wiki content should be preserved into `wiki_legacy*` and reviewed. When project-scoped Project Librarian skill installs already exist for the selected agent surfaces, `update` copies the current package's reusable skill files and required local-runner runtime dependencies into those project skill directories before refreshing the managed setup. An existing shared `.agents/skills/project-librarian/` install is synchronized independently without selecting agent-specific setup surfaces.
|
|
13
13
|
|
|
14
14
|
### Important Options
|
|
15
15
|
|
package/docs/ko/cli-reference.md
CHANGED
|
@@ -9,7 +9,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
|
|
|
9
9
|
|
|
10
10
|
`install-skill`은 `install`의 호환성 별칭으로 계속 지원됩니다.
|
|
11
11
|
|
|
12
|
-
`update`는 기존 프로젝트 갱신을 명시하는 명령입니다. `--migrate`와 `--adopt-existing`를 거부합니다. 기존 문서나 위키 내용을 `wiki_legacy*`로 보존하고 검토해야 한다면 top-level `--migrate`를 사용합니다. 선택된 에이전트 표면에 프로젝트 범위 Project Librarian 스킬 설치가 이미 있으면 `update`는 현재 패키지의 재사용 가능한 스킬 파일과 로컬 실행기에 필요한 필수 런타임 의존성을 해당 프로젝트 스킬 디렉터리에 복사한 뒤 관리 설정을 갱신합니다.
|
|
12
|
+
`update`는 기존 프로젝트 갱신을 명시하는 명령입니다. `--migrate`와 `--adopt-existing`를 거부합니다. 기존 문서나 위키 내용을 `wiki_legacy*`로 보존하고 검토해야 한다면 top-level `--migrate`를 사용합니다. 선택된 에이전트 표면에 프로젝트 범위 Project Librarian 스킬 설치가 이미 있으면 `update`는 현재 패키지의 재사용 가능한 스킬 파일과 로컬 실행기에 필요한 필수 런타임 의존성을 해당 프로젝트 스킬 디렉터리에 복사한 뒤 관리 설정을 갱신합니다. 기존 공유 `.agents/skills/project-librarian/` 설치는 에이전트별 설정 표면을 선택하지 않고 별도로 동기화합니다.
|
|
13
13
|
|
|
14
14
|
### 주요 옵션
|
|
15
15
|
|
package/docs/ko/usage.md
CHANGED
|
@@ -34,7 +34,7 @@ npx project-librarian@latest install --scope project --agents all
|
|
|
34
34
|
|
|
35
35
|
마이그레이션 없는 기존 설정 갱신은 저장소에 이미 있는 에이전트 표면만 보존해서 갱신합니다. 따라서 Codex와 Claude 파일만 있던 저장소는 일반 갱신만으로 Cursor나 Gemini 파일이 새로 생기지 않습니다. 새 표면을 의도적으로 추가하려면 `project-librarian update --agents cursor` 또는 `project-librarian update --agents all`처럼 명시합니다. 목록에 없는 표면을 삭제하지는 않습니다.
|
|
36
36
|
|
|
37
|
-
`project-librarian update`는 선택된 표면에 이미 프로젝트 범위 Project Librarian 스킬 설치가 있으면 현재 실행 중인 패키지의 재사용 가능한 스킬 파일과 프로젝트 로컬 실행기에 필요한 런타임 의존성을 그 프로젝트 스킬 디렉터리로 동기화합니다. 기본적으로 새 프로젝트 범위 스킬 설치를 만들지는 않고, 사용자 범위 스킬 설치도 갱신하지 않습니다. 사용자 범위 스킬은 `install --scope user`로 명시적으로 갱신합니다.
|
|
37
|
+
`project-librarian update`는 선택된 표면에 이미 프로젝트 범위 Project Librarian 스킬 설치가 있으면 현재 실행 중인 패키지의 재사용 가능한 스킬 파일과 프로젝트 로컬 실행기에 필요한 런타임 의존성을 그 프로젝트 스킬 디렉터리로 동기화합니다. 기존 공유 `.agents/skills/project-librarian/` 설치는 별도로 동기화하며 Codex, Claude, Cursor, Gemini 설정 표면을 암묵적으로 추가하지 않습니다. 기본적으로 새 프로젝트 범위 스킬 설치를 만들지는 않고, 사용자 범위 스킬 설치도 갱신하지 않습니다. 사용자 범위 스킬은 `install --scope user`로 명시적으로 갱신합니다.
|
|
38
38
|
|
|
39
39
|
## 실행 경로
|
|
40
40
|
|
|
@@ -42,6 +42,7 @@ npx project-librarian@latest install --scope project --agents all
|
|
|
42
42
|
|
|
43
43
|
| 설치 위치 | 실행 경로 |
|
|
44
44
|
| --- | --- |
|
|
45
|
+
| 공유 프로젝트 범위 스킬 | `node .agents/skills/project-librarian/dist/init-project-wiki.js` |
|
|
45
46
|
| 프로젝트 범위 Codex 스킬 | `node .codex/skills/project-librarian/dist/init-project-wiki.js` |
|
|
46
47
|
| 프로젝트 범위 Claude 스킬 | `node .claude/skills/project-librarian/dist/init-project-wiki.js` |
|
|
47
48
|
| 프로젝트 범위 Cursor 스킬 | `node .cursor/skills/project-librarian/dist/init-project-wiki.js` |
|
package/docs/usage.md
CHANGED
|
@@ -32,7 +32,7 @@ npx project-librarian@latest install --scope project --agents all
|
|
|
32
32
|
|
|
33
33
|
The project setup/update runner also accepts `--agents`. Fresh setup defaults to all supported agent surfaces only when no project-scoped Project Librarian skill install is present. If the repository already has project-scoped skills such as `.codex/skills/project-librarian/` and `.claude/skills/project-librarian/`, the first setup uses that installed agent set by default. Existing non-migration updates preserve the agent surfaces already present in the repository, so a repo that has only Codex and Claude files will not gain Cursor or Gemini files on a plain update. Use `project-librarian update --agents cursor` or `project-librarian update --agents all` when you intentionally want to add newly supported surfaces; unlisted surfaces are not deleted.
|
|
34
34
|
|
|
35
|
-
`project-librarian update` also syncs any project-scoped Project Librarian skill installs that already exist for the selected surfaces from the currently running package, including the runtime dependencies needed by the project-local runner. This means `npx project-librarian@latest update` can refresh the repository's managed setup, hooks, wiki meta files, and existing project-scoped skill copies without migration. It does not create new project-scoped skill installs by default and does not update user-scoped skill installs; use `install --scope user` for that.
|
|
35
|
+
`project-librarian update` also syncs any project-scoped Project Librarian skill installs that already exist for the selected surfaces from the currently running package, including the runtime dependencies needed by the project-local runner. An existing shared `.agents/skills/project-librarian/` install is synchronized independently and does not imply Codex, Claude, Cursor, or Gemini setup surfaces. This means `npx project-librarian@latest update` can refresh the repository's managed setup, hooks, wiki meta files, and existing project-scoped skill copies without migration. It does not create new project-scoped skill installs by default and does not update user-scoped skill installs; use `install --scope user` for that.
|
|
36
36
|
|
|
37
37
|
## Runner Paths
|
|
38
38
|
|
|
@@ -40,6 +40,7 @@ These paths are mainly for agents and automation. After installation, agents sho
|
|
|
40
40
|
|
|
41
41
|
| Installation | Runner |
|
|
42
42
|
| --- | --- |
|
|
43
|
+
| Shared project-scoped skill | `node .agents/skills/project-librarian/dist/init-project-wiki.js` |
|
|
43
44
|
| Project-scoped Codex skill | `node .codex/skills/project-librarian/dist/init-project-wiki.js` |
|
|
44
45
|
| Project-scoped Claude skill | `node .claude/skills/project-librarian/dist/init-project-wiki.js` |
|
|
45
46
|
| Project-scoped Cursor skill | `node .cursor/skills/project-librarian/dist/init-project-wiki.js` |
|