@justestif/pk 0.1.8 → 0.1.9
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 +67 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17709,6 +17709,48 @@ var {
|
|
|
17709
17709
|
Option,
|
|
17710
17710
|
Help
|
|
17711
17711
|
} = import__.default;
|
|
17712
|
+
// package.json
|
|
17713
|
+
var package_default = {
|
|
17714
|
+
name: "@justestif/pk",
|
|
17715
|
+
type: "module",
|
|
17716
|
+
version: "0.1.9",
|
|
17717
|
+
description: "Project knowledge \u2014 structured intake, search, and recall",
|
|
17718
|
+
bin: {
|
|
17719
|
+
pk: "dist/index.js"
|
|
17720
|
+
},
|
|
17721
|
+
files: [
|
|
17722
|
+
"dist/",
|
|
17723
|
+
"skill/",
|
|
17724
|
+
"README.md"
|
|
17725
|
+
],
|
|
17726
|
+
scripts: {
|
|
17727
|
+
build: `bun build src/index.ts --outfile dist/index.js --target bun && printf '#!/usr/bin/env bun
|
|
17728
|
+
' | cat - dist/index.js > dist/tmp.js && mv dist/tmp.js dist/index.js && chmod +x dist/index.js`,
|
|
17729
|
+
check: "bun run typecheck && bun run lint && bun test",
|
|
17730
|
+
typecheck: "bunx tsc --noEmit",
|
|
17731
|
+
lint: "xo",
|
|
17732
|
+
test: "bun test",
|
|
17733
|
+
prepublishOnly: "bun run build"
|
|
17734
|
+
},
|
|
17735
|
+
dependencies: {
|
|
17736
|
+
"@clack/prompts": "^1.3.0",
|
|
17737
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
17738
|
+
commander: "^14.0.0",
|
|
17739
|
+
"gray-matter": "^4.0.3",
|
|
17740
|
+
markdownlint: "^0.40.0",
|
|
17741
|
+
zod: "^4"
|
|
17742
|
+
},
|
|
17743
|
+
repository: {
|
|
17744
|
+
type: "git",
|
|
17745
|
+
url: "git+https://github.com/justEstif/pk.git"
|
|
17746
|
+
},
|
|
17747
|
+
devDependencies: {
|
|
17748
|
+
"@types/bun": "latest",
|
|
17749
|
+
ajv: "6",
|
|
17750
|
+
typescript: "latest",
|
|
17751
|
+
xo: "^2.0.2"
|
|
17752
|
+
}
|
|
17753
|
+
};
|
|
17712
17754
|
|
|
17713
17755
|
// src/lib/notes.ts
|
|
17714
17756
|
var import_gray_matter = __toESM(require_gray_matter(), 1);
|
|
@@ -34091,6 +34133,27 @@ var HARNESSES = [
|
|
|
34091
34133
|
{ hint: ".codex/config.toml in project root", label: "Codex CLI", value: "codex" }
|
|
34092
34134
|
];
|
|
34093
34135
|
var HARNESS_VALUES = new Set(HARNESSES.map((h2) => h2.value));
|
|
34136
|
+
var HARNESS_ACTIVATION = {
|
|
34137
|
+
claude: "start a new Claude Code session in this project",
|
|
34138
|
+
"claude-desktop": "quit and restart Claude Desktop",
|
|
34139
|
+
codex: "restart the Codex CLI",
|
|
34140
|
+
cursor: "reload the Cursor window (Cmd+Shift+P \u2192 Reload Window)",
|
|
34141
|
+
omp: "restart your Oh My Pi session",
|
|
34142
|
+
opencode: "restart opencode"
|
|
34143
|
+
};
|
|
34144
|
+
function buildOutro(created, knowledgeDir, harnesses, skillPaths) {
|
|
34145
|
+
const lines = [
|
|
34146
|
+
created ? `Created project: ${knowledgeDir}` : `Connected to existing project: ${knowledgeDir}`
|
|
34147
|
+
];
|
|
34148
|
+
for (const h2 of harnesses) {
|
|
34149
|
+
lines.push(` ${h2}: MCP config written \u2192 ${HARNESS_ACTIVATION[h2]}`);
|
|
34150
|
+
}
|
|
34151
|
+
for (const sp of skillPaths) {
|
|
34152
|
+
lines.push(` skill installed to ${sp}`);
|
|
34153
|
+
}
|
|
34154
|
+
lines.push("", "MCP is ready \u2014 no env export needed.", "To verify: ask your agent to list its tools \u2014 pk_search should appear.", "", "For CLI commands (pk search, pk new, pk lint, \u2026):", ` export PK_KNOWLEDGE_DIR="${knowledgeDir}"`);
|
|
34155
|
+
return lines;
|
|
34156
|
+
}
|
|
34094
34157
|
function parseHarnesses(raw) {
|
|
34095
34158
|
const parts = raw.split(",").map((s) => s.trim()).filter(Boolean);
|
|
34096
34159
|
const invalid = parts.filter((s) => !HARNESS_VALUES.has(s));
|
|
@@ -34303,15 +34366,8 @@ function registerInit(program2) {
|
|
|
34303
34366
|
projectRoot
|
|
34304
34367
|
};
|
|
34305
34368
|
const skillPaths2 = applyHarnesses(flagHarnesses, ctx2);
|
|
34306
|
-
console.log(created2
|
|
34307
|
-
|
|
34308
|
-
console.log(` ${h2}: MCP config written`);
|
|
34309
|
-
}
|
|
34310
|
-
for (const sp of skillPaths2) {
|
|
34311
|
-
console.log(` skill installed to ${sp}`);
|
|
34312
|
-
}
|
|
34313
|
-
console.log(`
|
|
34314
|
-
Done. Set: export PK_KNOWLEDGE_DIR="${knowledgeDir2}"`);
|
|
34369
|
+
console.log(buildOutro(created2, knowledgeDir2, flagHarnesses, skillPaths2).join(`
|
|
34370
|
+
`));
|
|
34315
34371
|
return;
|
|
34316
34372
|
}
|
|
34317
34373
|
ge("pk init");
|
|
@@ -34373,13 +34429,7 @@ Done. Set: export PK_KNOWLEDGE_DIR="${knowledgeDir2}"`);
|
|
|
34373
34429
|
projectRoot
|
|
34374
34430
|
};
|
|
34375
34431
|
const skillPaths = applyHarnesses(harnesses, ctx);
|
|
34376
|
-
ye(
|
|
34377
|
-
created ? `Created project: ${knowledgeDir}` : `Connected to existing project: ${knowledgeDir}`,
|
|
34378
|
-
...harnesses.map((h2) => ` ${h2}: MCP config written`),
|
|
34379
|
-
...skillPaths.map((sp) => ` skill installed to ${sp}`),
|
|
34380
|
-
"",
|
|
34381
|
-
`Next: export PK_KNOWLEDGE_DIR="${knowledgeDir}"`
|
|
34382
|
-
].join(`
|
|
34432
|
+
ye(buildOutro(created, knowledgeDir, harnesses, skillPaths).join(`
|
|
34383
34433
|
`));
|
|
34384
34434
|
});
|
|
34385
34435
|
}
|
|
@@ -42906,7 +42956,7 @@ function registerMcp(program2) {
|
|
|
42906
42956
|
}
|
|
42907
42957
|
|
|
42908
42958
|
// src/index.ts
|
|
42909
|
-
var program2 = new Command().name("pk").description("Project knowledge \u2014 structured intake, search, and recall").version(
|
|
42959
|
+
var program2 = new Command().name("pk").description("Project knowledge \u2014 structured intake, search, and recall").version(package_default.version);
|
|
42910
42960
|
registerNew(program2);
|
|
42911
42961
|
registerSearch(program2);
|
|
42912
42962
|
registerSynthesize(program2);
|