@inkeep/open-knowledge 0.9.0-beta.32 → 0.9.0-beta.34
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/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +22 -22
- package/dist/cli.mjs +36 -36
- package/dist/constants-CVf7CAf-.mjs +2 -0
- package/dist/{dist-C4I-b8-m.mjs → dist-BNqM3Q9P.mjs} +1 -1
- package/dist/{dist-CA-yDHEq.mjs → dist-DeQtb-TH.mjs} +26 -24
- package/dist/{gh-detect-BZ1nPNKy.mjs → gh-detect-D3EaYkiE.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-DuBKfMQ4.mjs → init-Bo84hmNW.mjs} +6 -6
- package/dist/init-DCc-vLg8.mjs +1 -0
- package/dist/loader-DcRPCz_p.mjs +4 -0
- package/dist/loader-DfepLqZv.mjs +1 -0
- package/dist/preview-Cwq0RyYG.mjs +1 -0
- package/dist/{preview-L-FLBOl0.mjs → preview-DIgwrffB.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-DjLptssw.js → ActivityModeContent-BGnNOoN_.js} +1 -1
- package/dist/public/assets/DocumentContext-BSv1OatI.js +61 -0
- package/dist/public/assets/{GraphPanel-D2ZWMZHw.js → GraphPanel-BfhS6QMn.js} +3 -3
- package/dist/public/assets/SettingsDialogBody-BviDVGKy.js +7 -0
- package/dist/public/assets/{SourceEditor-ztotrWnx.js → SourceEditor-2q3FCJqZ.js} +1 -1
- package/dist/public/assets/config-validation-events-zeI4vX-S.js +12 -0
- package/dist/public/assets/index-DHnO3NcZ.js +1917 -0
- package/dist/public/assets/prop-types-54PkbD7b.js +500 -0
- package/dist/public/assets/{target-navigation-intent-DZxquxsX.js → target-navigation-intent-YeYpKBFl.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DWPni1ys.js → typing-burst-detector-821VNlg2.js} +1 -1
- package/dist/public/index.html +6 -6
- package/dist/{repair-launch-json-BMH0nO-j.mjs → repair-launch-json-C2gaD3gB.mjs} +2 -2
- package/dist/{repair-mcp-configs-CmDjPZJr.mjs → repair-mcp-configs-BiXTTTVp.mjs} +2 -2
- package/dist/repair-skills-BEvrRG9M.mjs +1 -0
- package/dist/{repair-skills-dYAzCUrj.mjs → repair-skills-BGPqLLPt.mjs} +2 -2
- package/dist/{server-lock-BpjJj3OD-D8yiVjLU.mjs → server-lock-BpjJj3OD-D9FMFKPA.mjs} +92 -92
- package/dist/server-lock-CyhBidkz-CxEJuFC3.mjs +1 -0
- package/dist/{src-BxZB2YKX.mjs → src-ClkLa20g.mjs} +2 -2
- package/dist/{start-Bthdke1e.mjs → start-CPcnpWPQ.mjs} +2 -2
- package/dist/start-zgOTUt2r.mjs +1 -0
- package/dist/{write-project-skill-CD2-O-zT.mjs → write-project-skill-ZPEnzf-i.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-D2jvzIdq.mjs +0 -2
- package/dist/init-C6EKZ3Yl.mjs +0 -1
- package/dist/loader-DL_UseCh.mjs +0 -4
- package/dist/loader-DqyUOZN6.mjs +0 -1
- package/dist/preview-CaAp3PiC.mjs +0 -1
- package/dist/public/assets/DocumentContext-BzUdezp1.js +0 -61
- package/dist/public/assets/SettingsDialogBody-Y7msJVE9.js +0 -7
- package/dist/public/assets/config-validation-events-lBcb_6bi.js +0 -12
- package/dist/public/assets/index-pXJcX1wG.js +0 -1917
- package/dist/public/assets/prop-types-DhUmqQsM.js +0 -500
- package/dist/repair-skills-DthZy9gs.mjs +0 -1
- package/dist/server-lock-CyhBidkz-K4Rq177O.mjs +0 -1
- package/dist/start-Dkni8BZJ.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.
|
|
6
|
+
version: "0.9.0-beta.34"
|
|
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.
|
|
6
|
+
version: "0.9.0-beta.34"
|
|
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'
|
|
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
|
|
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
|
|
|
@@ -100,6 +100,8 @@ OK Electron and `ok ui` share `ui.lock`; when a second UI binds a different port
|
|
|
100
100
|
|
|
101
101
|
Call `write_document` / `edit_document` as soon as you have content. Native `Edit` / `sed` / direct `Write` on in-scope markdown is forbidden — it bypasses the CRDT and loses agent attribution in the shadow repo.
|
|
102
102
|
|
|
103
|
+
To author an MDX doc (the KB renders MDX/JSX components), pass a `.mdx` `docName` on the create: `write_document({ docName: "guides/widget.mdx", markdown, position: "replace" })` lands `guides/widget.mdx`. A `.md` or extension-less `docName` lands `.md`. An existing doc keeps its on-disk extension regardless of the suffix you pass — changing it in place isn't available via the MCP today.
|
|
104
|
+
|
|
103
105
|
To delete a doc, call `delete_document` — never `rm` / `unlink` / native `Bash` removal on in-scope markdown. The MCP path closes open agent sessions and unloads the doc from Hocuspocus before unlinking; native `rm` desynchronizes those. Deletion is irreversible — call `version({ action: "save" })` first if you may need to roll back (restore via `version({ action: "rollback" })`; list snapshots via `get_history`), and `links({ kind: "backlinks", docName })` first if you want to fix referrers that will become redlinks. To move or rename a doc instead of delete + rewrite, use `rename({ from, to })` — it auto-detects file vs folder and rewrites incoming references atomically.
|
|
104
106
|
|
|
105
107
|
**If `edit_document` returns "Text not found" on text you can verify exists on disk** (via `exec("cat …")`), the MCP session is likely stale (e.g., after a folder rename or server restart). Treat this as the escape-hatch trigger from the STOP block: prefix your next user-visible sentence with `Open Knowledge MCP unavailable:` and report the inconsistency. Don't loop on retries — the symptom is structural, not transient.
|
|
@@ -238,32 +240,31 @@ tags: [relevant, tags]
|
|
|
238
240
|
---
|
|
239
241
|
```
|
|
240
242
|
|
|
241
|
-
|
|
243
|
+
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
244
|
|
|
243
245
|
```
|
|
244
246
|
content-root/
|
|
245
247
|
├── .ok/ ← project root .ok/ (config.yml, cache)
|
|
246
248
|
├── meetings/
|
|
247
249
|
│ ├── .ok/
|
|
248
|
-
│ │ ├── frontmatter.yml ← folder
|
|
249
|
-
│ │ ├── schema.yml ← field declarations (each doc fills in its own value)
|
|
250
|
+
│ │ ├── frontmatter.yml ← this folder's own title/description/tags
|
|
250
251
|
│ │ └── templates/
|
|
251
|
-
│ │ └── prep-notes.md
|
|
252
|
+
│ │ └── prep-notes.md ← what new meeting docs start with
|
|
252
253
|
│ └── 2026-05-01.md
|
|
253
|
-
└── research/ ← no .ok/
|
|
254
|
+
└── research/ ← no .ok/
|
|
254
255
|
└── auth-providers.md
|
|
255
256
|
```
|
|
256
257
|
|
|
257
|
-
|
|
258
|
+
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
259
|
|
|
259
260
|
### Read the folder before writing (MUST)
|
|
260
261
|
|
|
261
|
-
Before creating or editing docs in a folder, **always** call `exec("ls -A <folder>")` once. The response carries
|
|
262
|
+
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
263
|
|
|
263
264
|
Pre-write checklist:
|
|
264
265
|
|
|
265
|
-
0. **First-contact check.** If
|
|
266
|
-
1. **Read
|
|
266
|
+
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.
|
|
267
|
+
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
268
|
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
269
|
3. **Read recent siblings** — new docs should match the shape of existing ones (filename, frontmatter, body structure).
|
|
269
270
|
4. **Confirm content scope** — `content.dir` (`.ok/config.yml`) defines the root. `.gitignore` / `.okignore` (nested at any depth) define exclusions.
|
|
@@ -285,23 +286,22 @@ Templates make folder structure durable. Create them proactively:
|
|
|
285
286
|
|
|
286
287
|
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
288
|
|
|
288
|
-
### When
|
|
289
|
+
### When recurring per-doc properties emerge (MUST when a pattern emerges)
|
|
289
290
|
|
|
290
|
-
If you're writing the same frontmatter (tags, title prefix) on multiple siblings,
|
|
291
|
+
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
292
|
|
|
292
|
-
### Editing folder
|
|
293
|
+
### Editing a folder's own description
|
|
293
294
|
|
|
294
295
|
```ts
|
|
295
296
|
folder_config({
|
|
296
297
|
action: "set-rule",
|
|
297
298
|
rules: [
|
|
298
|
-
{ match: "meetings/**", frontmatter: { title: "Meetings", tags: ["meeting"] } },
|
|
299
|
-
{ match: "meetings/prep-notes/**", frontmatter: { tags: ["meeting", "prep"] } },
|
|
299
|
+
{ match: "meetings/**", frontmatter: { title: "Meetings", description: "Meeting notes", tags: ["meeting"] } },
|
|
300
300
|
],
|
|
301
301
|
})
|
|
302
302
|
```
|
|
303
303
|
|
|
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.
|
|
304
|
+
`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
305
|
|
|
306
306
|
### Creating templates
|
|
307
307
|
|
|
@@ -404,11 +404,11 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
|
|
|
404
404
|
| 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
405
|
| Add an image | empty alt `` or generic alt `` | meaningful alt + source caption below |
|
|
406
406
|
| 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
|
|
407
|
+
| 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
408
|
| 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
409
|
| 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
410
|
| 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: "
|
|
411
|
+
| 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
412
|
| 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
413
|
| 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
414
|
| 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 +445,8 @@ If `write_document` or `edit_document` returns a "Hocuspocus server is not runni
|
|
|
445
445
|
|
|
446
446
|
## Scope recap
|
|
447
447
|
|
|
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.
|
|
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. A folder's own metadata + templates live in nested `<folder>/.ok/frontmatter.yml` + `<folder>/.ok/templates/` — NOT in `.ok/config.yml`.
|
|
449
449
|
|
|
450
450
|
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
451
|
|
|
452
|
-
**First session in this project?** If
|
|
452
|
+
**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.
|