@zosmaai/pi-llm-wiki 0.11.6 → 0.11.7

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.de.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.es.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.fr.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.hi.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.ja.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.ko.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.pt.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.ru.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
package/README.zh.md CHANGED
@@ -9,6 +9,7 @@
9
9
  [![npm downloads](https://img.shields.io/npm/dm/@zosmaai/pi-llm-wiki)](https://www.npmjs.com/package/@zosmaai/pi-llm-wiki)
10
10
  [![Coverage](https://img.shields.io/badge/coverage-85.09%25-brightgreen.svg)](https://codecov.io/gh/zosmaai/pi-llm-wiki)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-online-blue.svg)](https://zosmaai.github.io/pi-llm-wiki/)
12
13
  [![CodeQL](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml/badge.svg)](https://github.com/zosmaai/pi-llm-wiki/actions/workflows/codeql.yml)
13
14
  [![GitHub Repo Stars](https://img.shields.io/github/stars/zosmaai/pi-llm-wiki?style=social)](https://github.com/zosmaai/pi-llm-wiki/stargazers)
14
15
 
@@ -112,6 +112,18 @@ function readNamespacedConfig(path) {
112
112
  if (typeof wl === "string" && WIKILINK_VALIDATION_MODES.includes(wl)) {
113
113
  out.wikilinkValidation = wl;
114
114
  }
115
+ const ct = section.customTypes;
116
+ if (ct && typeof ct === "object" && !Array.isArray(ct)) {
117
+ const entries = Object.entries(ct);
118
+ const valid = {};
119
+ for (const [k, v] of entries) {
120
+ if (typeof k === "string" && typeof v === "string" && k && v) {
121
+ valid[k] = v;
122
+ }
123
+ }
124
+ if (Object.keys(valid).length)
125
+ out.customTypes = valid;
126
+ }
115
127
  return out;
116
128
  }
117
129
  catch {
@@ -282,6 +294,7 @@ const KNOWN_KEYS = [
282
294
  "synthesisLanguage",
283
295
  "synthesisMaxTokens",
284
296
  "wikilinkValidation",
297
+ "customTypes",
285
298
  ];
286
299
  export function loadTaskConfigSources(cwd) {
287
300
  const globalResult = {};
@@ -422,7 +422,7 @@ export function registerWikiEnsurePage(pi, runtime) {
422
422
  ],
423
423
  parameters: Type.Object({
424
424
  type: Type.String({
425
- description: "Page type: entity | concept | synthesis | analysis | requirement | skill | case",
425
+ description: "Page type: entity | concept | synthesis | analysis | requirement | skill | case (built-in) or any user-defined type from llm-wiki.customTypes config",
426
426
  }),
427
427
  title: Type.String({ description: "Page title" }),
428
428
  content: Type.Optional(Type.String({ description: "Optional initial content (otherwise uses template)" })),
@@ -442,9 +442,8 @@ export function registerWikiEnsurePage(pi, runtime) {
442
442
  isError: true,
443
443
  };
444
444
  }
445
- const type = params.type;
446
- const slug = slugify(params.title);
447
- const folderMap = {
445
+ const config = loadTaskConfig(ctx.cwd);
446
+ const builtInFolderMap = {
448
447
  entity: "entities",
449
448
  concept: "concepts",
450
449
  synthesis: "syntheses",
@@ -453,6 +452,9 @@ export function registerWikiEnsurePage(pi, runtime) {
453
452
  skill: "skills",
454
453
  case: "cases",
455
454
  };
455
+ const folderMap = { ...builtInFolderMap, ...config.customTypes };
456
+ const type = params.type;
457
+ const slug = slugify(params.title);
456
458
  const folder = folderMap[type] || "concepts";
457
459
  const pagePath = join(paths.wiki, folder, `${slug}.md`);
458
460
  if (existsSync(pagePath)) {
@@ -159,6 +159,16 @@ export interface TaskConfig {
159
159
  * Default "warn". See `resolveWikilinkValidation`.
160
160
  */
161
161
  wikilinkValidation?: WikilinkValidationMode;
162
+
163
+ /**
164
+ * User-defined page types for wiki_ensure_page (issue #169). Merges with
165
+ * the 7 built-in types (entity, concept, synthesis, analysis, requirement,
166
+ * skill, case). Each key is the type name; each value is the folder name
167
+ * inside wiki/. Example: { "decision": "decisions", "metric": "metrics" }
168
+ * → wiki_ensure_page(type="decision") creates wiki/decisions/<slug>.md.
169
+ * Custom types use a generic page template (no per-type templates).
170
+ */
171
+ customTypes?: Record<string, string>;
162
172
  }
163
173
 
164
174
  export const TASK_DEFAULTS: TaskConfig = {};
@@ -286,6 +296,18 @@ function readNamespacedConfig(path: string): Partial<TaskConfig> {
286
296
  out.wikilinkValidation = wl as WikilinkValidationMode;
287
297
  }
288
298
 
299
+ const ct = section.customTypes;
300
+ if (ct && typeof ct === "object" && !Array.isArray(ct)) {
301
+ const entries = Object.entries(ct as Record<string, unknown>);
302
+ const valid: Record<string, string> = {};
303
+ for (const [k, v] of entries) {
304
+ if (typeof k === "string" && typeof v === "string" && k && v) {
305
+ valid[k] = v;
306
+ }
307
+ }
308
+ if (Object.keys(valid).length) out.customTypes = valid;
309
+ }
310
+
289
311
  return out;
290
312
  } catch {
291
313
  return {};
@@ -474,6 +496,7 @@ const KNOWN_KEYS = [
474
496
  "synthesisLanguage",
475
497
  "synthesisMaxTokens",
476
498
  "wikilinkValidation",
499
+ "customTypes",
477
500
  ] as const;
478
501
 
479
502
  export function loadTaskConfigSources(
@@ -519,7 +519,7 @@ export function registerWikiEnsurePage(pi: ExtensionAPI, runtime?: Runtime): voi
519
519
  parameters: Type.Object({
520
520
  type: Type.String({
521
521
  description:
522
- "Page type: entity | concept | synthesis | analysis | requirement | skill | case",
522
+ "Page type: entity | concept | synthesis | analysis | requirement | skill | case (built-in) or any user-defined type from llm-wiki.customTypes config",
523
523
  }),
524
524
  title: Type.String({ description: "Page title" }),
525
525
  content: Type.Optional(
@@ -542,17 +542,8 @@ export function registerWikiEnsurePage(pi: ExtensionAPI, runtime?: Runtime): voi
542
542
  };
543
543
  }
544
544
 
545
- const type = params.type as
546
- | "entity"
547
- | "concept"
548
- | "synthesis"
549
- | "analysis"
550
- | "requirement"
551
- | "skill"
552
- | "case";
553
- const slug = slugify(params.title);
554
-
555
- const folderMap: Record<string, string> = {
545
+ const config = loadTaskConfig(ctx.cwd);
546
+ const builtInFolderMap: Record<string, string> = {
556
547
  entity: "entities",
557
548
  concept: "concepts",
558
549
  synthesis: "syntheses",
@@ -561,6 +552,9 @@ export function registerWikiEnsurePage(pi: ExtensionAPI, runtime?: Runtime): voi
561
552
  skill: "skills",
562
553
  case: "cases",
563
554
  };
555
+ const folderMap = { ...builtInFolderMap, ...config.customTypes };
556
+ const type = params.type as string;
557
+ const slug = slugify(params.title);
564
558
  const folder = folderMap[type] || "concepts";
565
559
  const pagePath = join(paths.wiki, folder, `${slug}.md`);
566
560
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zosmaai/pi-llm-wiki",
3
- "version": "0.11.6",
3
+ "version": "0.11.7",
4
4
  "description": "Self-maintaining LLM Wiki for Pi — Karpathy-pattern knowledge base with immutable source capture, automated ingestion, search, linting, and Obsidian-compatible vault. auto-updating personal & company wiki.",
5
5
  "keywords": [
6
6
  "pi",
@@ -91,6 +91,7 @@
91
91
  "zod": "^4.0"
92
92
  },
93
93
  "devDependencies": {
94
+ "@astrojs/starlight": "^0.41.10",
94
95
  "@biomejs/biome": "^1.9.4",
95
96
  "@mariozechner/pi-agent-core": "^0.70.2",
96
97
  "@mariozechner/pi-ai": "^0.70.2",
@@ -99,6 +100,7 @@
99
100
  "@types/mdast": "^4.0.4",
100
101
  "@types/node": "^22",
101
102
  "@vitest/coverage-v8": "^3.2.4",
103
+ "astro": "^7.2.9",
102
104
  "typescript": "^5.7.0",
103
105
  "vitest": "^3.0.0"
104
106
  },
@@ -110,10 +112,13 @@
110
112
  "build:mcp": "node scripts/build-mcp.js",
111
113
  "typecheck": "tsc --noEmit",
112
114
  "lint": "biome check .",
113
- "lint:fix": "biome check --apply .",
115
+ "lint:fix": "biome check --write .",
114
116
  "release:patch": "node scripts/release.js patch",
115
117
  "release:minor": "node scripts/release.js minor",
116
118
  "release:major": "node scripts/release.js major",
117
- "release:push": "git push origin main --tags"
119
+ "release:push": "git push origin main --tags",
120
+ "docs:sync": "node scripts/sync-docs.js",
121
+ "docs:dev": "astro dev",
122
+ "docs:build": "node scripts/sync-docs.js && astro build"
118
123
  }
119
124
  }