@inkeep/open-knowledge 0.9.0-beta.31 → 0.9.0-beta.33

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.
Files changed (51) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +20 -22
  3. package/dist/cli.mjs +36 -36
  4. package/dist/constants-CbvHeCMM.mjs +2 -0
  5. package/dist/{dist-CA-yDHEq.mjs → dist-DnMeF_Yx.mjs} +23 -21
  6. package/dist/{dist-C4I-b8-m.mjs → dist-qvP8X1Cn.mjs} +1 -1
  7. package/dist/{gh-detect-BZ1nPNKy.mjs → gh-detect-DjaWa-fV.mjs} +2 -2
  8. package/dist/index.mjs +1 -1
  9. package/dist/{init-Dt8uSjge.mjs → init-B9QZkZWz.mjs} +6 -6
  10. package/dist/init-CokDu2De.mjs +1 -0
  11. package/dist/loader-BmBXaL6j.mjs +1 -0
  12. package/dist/loader-Q9XLUMGN.mjs +4 -0
  13. package/dist/{preview-Ddp3FH-6.mjs → preview-CMR5yKXH.mjs} +2 -2
  14. package/dist/preview-DFKhDNPF.mjs +1 -0
  15. package/dist/public/assets/{ActivityModeContent-DjLptssw.js → ActivityModeContent-CpmvH1z9.js} +1 -1
  16. package/dist/public/assets/DocumentContext-Kqlx8YjN.js +61 -0
  17. package/dist/public/assets/{GraphPanel-D2ZWMZHw.js → GraphPanel-yD7w8P9H.js} +3 -3
  18. package/dist/public/assets/SettingsDialogBody-BuGhPBlG.js +7 -0
  19. package/dist/public/assets/{SourceEditor-ztotrWnx.js → SourceEditor-BKjAFaVa.js} +1 -1
  20. package/dist/public/assets/config-validation-events-CweQkDns.js +12 -0
  21. package/dist/public/assets/index-BV-BpS9G.js +1917 -0
  22. package/dist/public/assets/index-DzNA_erm.css +1 -0
  23. package/dist/public/assets/prop-types-Bi80b84t.js +500 -0
  24. package/dist/public/assets/{target-navigation-intent-DZxquxsX.js → target-navigation-intent-JrEW3Jod.js} +1 -1
  25. package/dist/public/assets/{typing-burst-detector-DWPni1ys.js → typing-burst-detector-CIMc3LFE.js} +1 -1
  26. package/dist/public/index.html +7 -7
  27. package/dist/{repair-launch-json-CpHkwEQe.mjs → repair-launch-json-BMyYnRp2.mjs} +2 -2
  28. package/dist/{repair-mcp-configs-DTo4wxei.mjs → repair-mcp-configs-CoO4C1K5.mjs} +2 -2
  29. package/dist/repair-skills-BVyYoufY.mjs +1 -0
  30. package/dist/{repair-skills-dYAzCUrj.mjs → repair-skills-BXs2xVWf.mjs} +2 -2
  31. package/dist/{server-lock-BpjJj3OD-D8yiVjLU.mjs → server-lock-BpjJj3OD-BpdqozwH.mjs} +92 -92
  32. package/dist/server-lock-CyhBidkz-IWbRJ4RD.mjs +1 -0
  33. package/dist/{src-DQzHDEzB.mjs → src-DGiW_9Ll.mjs} +2 -2
  34. package/dist/start-BOC1TWY0.mjs +1 -0
  35. package/dist/{start-k1rm0C8J.mjs → start-BOSVZEJO.mjs} +2 -2
  36. package/dist/{write-project-skill-CD2-O-zT.mjs → write-project-skill-DHCorqwq.mjs} +2 -2
  37. package/package.json +1 -1
  38. package/dist/constants-mptAAyp9.mjs +0 -2
  39. package/dist/init-6FMYGQaY.mjs +0 -1
  40. package/dist/loader-ClwCZw8O.mjs +0 -1
  41. package/dist/loader-DWCsV2Sz.mjs +0 -4
  42. package/dist/preview-C59RI9mp.mjs +0 -1
  43. package/dist/public/assets/DocumentContext-BzUdezp1.js +0 -61
  44. package/dist/public/assets/SettingsDialogBody-Y7msJVE9.js +0 -7
  45. package/dist/public/assets/config-validation-events-lBcb_6bi.js +0 -12
  46. package/dist/public/assets/index-BzVbhruC.js +0 -1917
  47. package/dist/public/assets/index-BzZsJje8.css +0 -1
  48. package/dist/public/assets/prop-types-DhUmqQsM.js +0 -500
  49. package/dist/repair-skills-DthZy9gs.mjs +0 -1
  50. package/dist/server-lock-CyhBidkz-K4Rq177O.mjs +0 -1
  51. package/dist/start-DntS9VW0.mjs +0 -1
@@ -3,7 +3,7 @@ name: open-knowledge-discovery
3
3
  description: "Read when the user asks what Open Knowledge is, wants to install it on a repository, wants to share an Open Knowledge project with collaborators, or asks how `ok init` / `ok install-skill` / OK Desktop set up a project. Do NOT load to perform Open Knowledge reads/writes — the runtime guidance for editing markdown inside an initialized OK project ships as a separate project-local skill at `.claude/skills/open-knowledge/` whenever `ok init` runs. If the user appears to be editing markdown inside a `.ok/` project and this is the only OK skill loaded, advise them to re-run `ok init` to install the project-local skill."
4
4
  compatibility: "Any agent host — no MCP server required. Pure discovery + install guidance."
5
5
  metadata:
6
- version: "0.9.0-beta.31"
6
+ version: "0.9.0-beta.33"
7
7
  author: "Inkeep"
8
8
  repository: "https://github.com/inkeep/open-knowledge"
9
9
  ---
@@ -3,7 +3,7 @@ name: open-knowledge
3
3
  description: "MUST invoke before reading or editing any `.md` / `.mdx` file, and before any `mcp__open-knowledge__*` tool call (`exec`, `search`, `write_document`, `edit_document`, and the rest). This skill is installed into the repository by `ok init`, so its presence alone means this is an Open Knowledge project — its runtime contract governs every markdown file here, with no need to probe for a `.ok/` directory. Authoritative agent-runtime contract; supersedes the overlapping MCP server `instructions` echo."
4
4
  compatibility: "Claude Code, Claude Desktop, Claude Cowork, Claude.ai web. Requires Open Knowledge MCP server + code execution."
5
5
  metadata:
6
- version: "0.9.0-beta.31"
6
+ version: "0.9.0-beta.33"
7
7
  author: "Inkeep"
8
8
  repository: "https://github.com/inkeep/open-knowledge"
9
9
  ---
@@ -29,7 +29,7 @@ Everything below is depth. Read on demand.
29
29
  The full MCP surface, grouped by risk-level. Every tool's `kind` / `action` set is single-risk-level (never a read and a write behind one discriminator).
30
30
 
31
31
  - **Reads** — `exec` (primary; shell-style `cat`/`ls`/`grep`/`find` with frontmatter + backlink + history enrichment), `search` (ranked, BM25 + recency), `get_history` (versions for a doc), `links` (`kind: 'backlinks'|'forward'|'dead'|'orphans'|'hubs'|'suggest'`), `get_config` (resolved config), `get_components` (canonical component JSX schemas), `get_authoring_palette` (markdown-native authoring forms + themed `html preview` embed starters + theme tokens), `get_preview_url` (browser-reachable preview URL on demand), `share_link` (GitHub-substrate share URL for a doc; read-only against `.git/`, no commits/pushes — returns a clear error when the project has no GitHub remote, since agents do not publish projects).
32
- - **Writes** — `write_document` (new or full-replace; supports `template:` instantiation), `edit_document` (body-only find/replace), `edit_frontmatter` (1-2 keys via RFC 7396 JSON Merge Patch — preferred), `delete_document`, `rename` (probes file vs folder; rewrites referrers), `version` (`action: 'save'|'rollback'`), `folder_config` (`action: 'set-rule'|'write-template'|'delete-template'|'declare-field'|'remove-field'`). `declare-field` declares a named field of a given type on every doc in a folder without supplying a value each doc fills in its own; `remove-field` deletes the declaration.
32
+ - **Writes** — `write_document` (new or full-replace; supports `template:` instantiation), `edit_document` (body-only find/replace), `edit_frontmatter` (1-2 keys via RFC 7396 JSON Merge Patch — preferred), `delete_document`, `rename` (probes file vs folder; rewrites referrers), `version` (`action: 'save'|'rollback'`), `folder_config` (`action: 'set-rule'|'write-template'|'delete-template'`). `set-rule` writes a folder's own frontmatter (open-shape, like a doc's); `write-template`/`delete-template` manage the folder's templates (what new docs start with).
33
33
  - **GitHub-sync conflicts** — `list_conflicts` (enumerate), `get_conflict_content` (base/ours/theirs stages + lifecycle), `resolve_conflict` (write a chosen resolution + commit; destructive). Mutating writes against a doc in conflict return RFC 9457 `urn:ok:error:doc-in-conflict` (409); `exec("cat …")` returns `lifecycle: {status, reason} | null` so you can detect the state proactively. See *Conflict-aware writes*.
34
34
  - **Workflow** — `ingest`, `research`, `consolidate`, `discover` (return procedural guides, not data).
35
35
 
@@ -56,7 +56,7 @@ Why: native tools skip frontmatter, backlinks, shadow-repo activity, and project
56
56
  ## Reads — examples
57
57
 
58
58
  - Read a file: `exec("cat <path>.md")` — contents + full rich enrichment.
59
- - List a directory: `exec("ls -A <dir>")` — per-child frontmatter, recursive markdown counts, most-recently-updated doc per subdir, folder-level `frontmatter_defaults` + `templates_available`. Prefer `-A` over plain `ls` to surface dot-prefixed entries (`.ok/`, `.okignore`) without the noisy `.`/`..` rows that `-a` adds.
59
+ - List a directory: `exec("ls -A <dir>")` — per-child frontmatter, recursive markdown counts, most-recently-updated doc per subdir, the folder's own `title`/`description`/`tags` + `templates_available`. Prefer `-A` over plain `ls` to surface dot-prefixed entries (`.ok/`, `.okignore`) without the noisy `.`/`..` rows that `-a` adds.
60
60
  - Literal search: `exec("grep -rn <term> <dir> | head -5")` — matches + enrichment on matched files.
61
61
  - Ranked search: `search({ query })` — cmd-K parity (title boost + body BM25 + recency); use when picking the best doc, not when listing every occurrence.
62
62
 
@@ -238,32 +238,31 @@ tags: [relevant, tags]
238
238
  ---
239
239
  ```
240
240
 
241
- Folder defaults live in opt-in nested `<folder>/.ok/frontmatter.yml` (values that cascade down to every doc); schema declarations live in `<folder>/.ok/schema.yml` (named fields without values every doc in the folder gets the slot, each doc fills in its own value); templates live in `<folder>/.ok/templates/`. **Most folders have NO `.ok/`** — sparse, lazy-create, auto-clean. A folder gets one only when it declares defaults, declares fields, or carries templates.
241
+ Two folder mechanisms, both opt-in and nested: **folder frontmatter** in `<folder>/.ok/frontmatter.yml` (the folder's own properties open-shape like a doc's, with `title` / `description` / `tags` as conventional keys the UI surfaces; describes the folder, self-only, does NOT flow into child docs) and **templates** in `<folder>/.ok/templates/` (the single mechanism for what new docs in a folder start with). **Most folders have NO `.ok/`** — sparse, lazy-create, auto-clean. A folder gets one only when it carries its own frontmatter or a template.
242
242
 
243
243
  ```
244
244
  content-root/
245
245
  ├── .ok/ ← project root .ok/ (config.yml, cache)
246
246
  ├── meetings/
247
247
  │ ├── .ok/
248
- │ │ ├── frontmatter.yml ← folder defaults
249
- │ │ ├── schema.yml ← field declarations (each doc fills in its own value)
248
+ │ │ ├── frontmatter.yml ← this folder's own title/description/tags
250
249
  │ │ └── templates/
251
- │ │ └── prep-notes.md
250
+ │ │ └── prep-notes.md ← what new meeting docs start with
252
251
  │ └── 2026-05-01.md
253
- └── research/ ← no .ok/ — inherits root cascade
252
+ └── research/ ← no .ok/
254
253
  └── auth-providers.md
255
254
  ```
256
255
 
257
- **Cascade merge:** scalars (`title`, `description`) replace last-wins root leaf; arrays (`tags`) union-and-dedup; file frontmatter wins per-scalar over folder defaults, tags union with the cascade.
256
+ A doc's frontmatter is exactly its own on-disk YAML folder frontmatter never overlays values onto it. Give new docs starting properties with a template, not with folder frontmatter.
258
257
 
259
258
  ### Read the folder before writing (MUST)
260
259
 
261
- Before creating or editing docs in a folder, **always** call `exec("ls -A <folder>")` once. The response carries `frontmatter_defaults` (the merged cascade) + `templates_available` (the template menu for `write_document({ template })`). Skipping this is how agents land docs that violate folder discipline.
260
+ Before creating or editing docs in a folder, **always** call `exec("ls -A <folder>")` once. The response carries the folder's own `title`/`description`/`tags` + `templates_available` (the template menu for `write_document({ template })`). Skipping this is how agents land docs that violate folder discipline.
262
261
 
263
262
  Pre-write checklist:
264
263
 
265
- 0. **First-contact check.** If `frontmatter_defaults` AND `templates_available` are empty AND `exec("ls -A")` shows substantial content elsewhere, the project hasn't been onboarded — STOP and invoke `discover` (Workflow tools below). Skip on subsequent writes once confirmed.
266
- 1. **Read `frontmatter_defaults`**don't redeclare keys the cascade already provides; let inheritance carry them.
264
+ 0. **First-contact check.** If the folder has no frontmatter of its own AND `templates_available` is empty AND `exec("ls -A")` shows substantial content elsewhere, the project hasn't been onboarded — STOP and invoke `discover` (Workflow tools below). Skip on subsequent writes once confirmed.
265
+ 1. **Read the folder's description** its `title`/`description`/`tags` tell you what the folder is for. (These describe the folder; they are NOT defaults the doc inherits.)
267
266
  2. **Read `templates_available`** — each entry has `name`, `title`, `description`, `scope` (`local` / `inherited`). If one matches, **prefer it** over free-form markdown (it's the folder's contract — templates carry frontmatter + body structure hand-authored docs routinely miss).
268
267
  3. **Read recent siblings** — new docs should match the shape of existing ones (filename, frontmatter, body structure).
269
268
  4. **Confirm content scope** — `content.dir` (`.ok/config.yml`) defines the root. `.gitignore` / `.okignore` (nested at any depth) define exclusions.
@@ -285,23 +284,22 @@ Templates make folder structure durable. Create them proactively:
285
284
 
286
285
  Note new templates in chat ("saved as a template at `meetings/.ok/templates/prep-notes.md` for next time") so the user sees the discipline grew.
287
286
 
288
- ### When to declare folder defaults (MUST when a pattern emerges)
287
+ ### When recurring per-doc properties emerge (MUST when a pattern emerges)
289
288
 
290
- If you're writing the same frontmatter (tags, title prefix) on multiple siblings, call `folder_config({ action: "set-rule" })` once and let the cascade do it. Pair with a template when the body skeleton also repeats.
289
+ If you're writing the same frontmatter (tags, status, a title prefix) on multiple siblings, bake those starting values into a **template** (`folder_config({ action: "write-template" })`) that's the single mechanism for new-doc starting properties. Folder frontmatter does not cascade values into docs.
291
290
 
292
- ### Editing folder defaults
291
+ ### Editing a folder's own description
293
292
 
294
293
  ```ts
295
294
  folder_config({
296
295
  action: "set-rule",
297
296
  rules: [
298
- { match: "meetings/**", frontmatter: { title: "Meetings", tags: ["meeting"] } },
299
- { match: "meetings/prep-notes/**", frontmatter: { tags: ["meeting", "prep"] } },
297
+ { match: "meetings/**", frontmatter: { title: "Meetings", description: "Meeting notes", tags: ["meeting"] } },
300
298
  ],
301
299
  })
302
300
  ```
303
301
 
304
- Each `match` resolves to a SINGLE target folder. Multi-folder globs (`specs/*/evidence/**`) are rejected with `MULTI_FOLDER_GLOB` — split per folder. Remove a rule by passing empty `frontmatter: {}` — file deletes and `.ok/` auto-cleans if no other tenant remains.
302
+ `frontmatter` is open-shape — any key about the folder itself, exactly like a doc's frontmatter (`title` / `description` / `tags` are conventional keys the UI surfaces). It's self-only: it describes the folder and does NOT flow into child docs — put per-doc starting values in a template instead. Each `match` resolves to a SINGLE target folder. Multi-folder globs (`specs/*/evidence/**`) are rejected with `MULTI_FOLDER_GLOB` — split per folder. Remove a rule by passing empty `frontmatter: {}` — file deletes and `.ok/` auto-cleans if no other tenant remains.
305
303
 
306
304
  ### Creating templates
307
305
 
@@ -404,11 +402,11 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
404
402
  | Finish a turn that changed KB content | move on without checking for a log | check for a `log.md` and follow its contract per Log discipline |
405
403
  | Add an image | empty alt `![](./x.png)` or generic alt `![image](./x)` | meaningful alt + source caption below |
406
404
  | Catalog folder contents | create `INDEX.md` hub file | `folder_config({ action: "set-rule", rules: [...] })` writes `<folder>/.ok/frontmatter.yml` |
407
- | Write a doc in an unfamiliar folder | go straight to `write_document` with hand-authored markdown | `exec("ls -A <folder>")` first — read `frontmatter_defaults` + `templates_available` before writing |
405
+ | Write a doc in an unfamiliar folder | go straight to `write_document` with hand-authored markdown | `exec("ls -A <folder>")` first — read the folder description + `templates_available` before writing |
408
406
  | Land in an existing repo without orienting | go straight to `write_document` when no folder frontmatter / templates exist | invoke `discover` once for the project — extracts conventions from siblings, sets folder frontmatter + templates, activates the link graph |
409
407
  | Author a doc when a matching template exists | `write_document({ markdown: "..." })` from scratch | `write_document({ template, position: "replace" })` — templates carry the folder's frontmatter + body discipline |
410
408
  | Change a doc's title / tags | `edit_document` to swap the YAML (rejected — HTTP 400 frontmatter-intersect) | `edit_frontmatter({ docName, patch })` for 1-2 keys; `write_document({ position: "replace", markdown })` for full rewrites |
411
- | Repeat the same frontmatter on sibling docs | hand-set identical `tags` / `title` prefix on every new file | `folder_config({ action: "set-rule" })` once — the cascade carries it to every child |
409
+ | Repeat the same frontmatter on sibling docs | hand-set identical `tags` / `title` prefix on every new file | `folder_config({ action: "write-template" })` once — new docs start from the template |
412
410
  | Re-derive the same body skeleton repeatedly | copy-paste the structure from a sibling each time | `folder_config({ action: "write-template" })` once, then pick from `templates_available` thereafter |
413
411
  | Scaffold a new folder for a doc category | set folder rule for frontmatter and stop there | pair `folder_config({ action: "set-rule" })` with `folder_config({ action: "write-template" })` in the same turn |
414
412
  | Delete a markdown doc | `Bash: rm` / `unlink` / native deletion on in-scope `.md` | `delete_document` — `version({ action: "save" })` first if rollback may be needed |
@@ -445,8 +443,8 @@ If `write_document` or `edit_document` returns a "Hocuspocus server is not runni
445
443
 
446
444
  ## Scope recap
447
445
 
448
- Open Knowledge looks for documents under the resolved `content.dir` (discoverable at runtime via `get_config({ path: ['content', 'dir'] })`). `.gitignore` and `.okignore` (at the project root and at any folder depth) define exclusions. Folder defaults + templates live in nested `<folder>/.ok/frontmatter.yml` + `<folder>/.ok/templates/` files — NOT in `.ok/config.yml`.
446
+ Open Knowledge looks for documents under the resolved `content.dir` (discoverable at runtime via `get_config({ path: ['content', 'dir'] })`). `.gitignore` and `.okignore` (at the project root and at any folder depth) define exclusions. A folder's own metadata + templates live in nested `<folder>/.ok/frontmatter.yml` + `<folder>/.ok/templates/` — NOT in `.ok/config.yml`.
449
447
 
450
448
  Default mental model (no jargon): **every `.md` and `.mdx` under `content.dir`** not excluded by `.gitignore` or `.okignore` is an Open Knowledge document — including under `specs/`, `reports/`, `docs/`, etc. Read `.okignore` (and any nested `.okignore` files) once per turn to know what's excluded.
451
449
 
452
- **First session in this project?** If `frontmatter_defaults` and `templates_available` are empty for substantial folders, the project hasn't been onboarded yet — invoke `discover` (Workflow tools table) before writing. Once onboarded, the cascade carries the discipline.
450
+ **First session in this project?** If substantial folders have no frontmatter of their own and no `templates_available`, the project isn't onboarded — invoke `discover` (Workflow tools table) before writing.