Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

<img src="assets/logo.svg" width="96" height="96" alt="Knowledge Compiler Animated 3D Knowledge Crystal Logo" />
<img src="assets/logo.svg" width="72" height="72" alt="Knowledge Compiler Animated 3D Knowledge Crystal Logo" />

<h1>Knowledge Compiler</h1>

Expand All @@ -10,22 +10,21 @@
</p>

<p>
<a href="https://googlecloudplatform.github.io/knowledge-compiler/"><img src="https://img.shields.io/badge/live_demo-3D_WebGL_Starter_Vault-1A73E8?style=flat-square" alt="Live 3D WebGL Demo" /></a>
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/releases"><img src="https://img.shields.io/badge/version-1.3.0-0F766E?style=flat-square" alt="Version 1.3.0" /></a>
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/actions/workflows/ci.yml"><img src="https://github.com/GoogleCloudPlatform/knowledge-compiler/actions/workflows/ci.yml/badge.svg" alt="CI Status" /></a>
<a href="https://github.com/open-knowledge-format/open-knowledge-format"><img src="https://img.shields.io/badge/OKF_v0.3-0_Errors_Strict-34A853?style=flat-square" alt="OKF v0.3 Conformant" /></a>
<a href="pyproject.toml"><img src="https://img.shields.io/badge/python-%3E%3D3.10-3776AB?style=flat-square" alt="Python 3.10+" /></a>
<a href="https://okf.md/tools/#knowledge-compiler"><img src="https://img.shields.io/badge/ecosystem-okf.md-8430CE?style=flat-square" alt="Listed on okf.md" /></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache_2.0-FBBC04?style=flat-square" alt="Apache 2.0 License" /></a>
<a href="https://googlecloudplatform.github.io/knowledge-compiler/"><strong>Live 3D Demo &#8599;</strong></a> &middot;
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/releases"><strong>v1.3.1</strong></a> &middot;
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/actions/workflows/ci.yml"><strong>CI</strong></a> &middot;
<a href="https://github.com/open-knowledge-format/open-knowledge-format"><strong>OKF v0.3 Strict</strong></a> &middot;
<a href="https://okf.md/tools/#knowledge-compiler"><strong>okf.md</strong></a> &middot;
<a href="pyproject.toml"><strong>Python 3.10+</strong></a> &middot;
<a href="LICENSE"><strong>Apache-2.0</strong></a>
</p>

<p>
<a href="https://googlecloudplatform.github.io/knowledge-compiler/"><strong>Live 3D Demo &#8599;</strong></a> &middot;
<a href="#quick-start-60-second-walkthrough"><strong>60-Second Demo</strong></a> &middot;
<a href="#compile-once-consume-anywhere"><strong>OKF v0.3 Interoperability</strong></a> &middot;
<a href="#interactive-60-fps-webgl-workbench"><strong>WebGL Workbench</strong></a> &middot;
<a href="#10-portable-agent-skills-and-cli"><strong>Skills &amp; CLI</strong></a> &middot;
<a href="#local-first-privacy-and-offline-proof"><strong>Offline Proof</strong></a>
<a href="#quick-start-60-second-walkthrough">60-Second Demo</a> &middot;
<a href="#compile-once-consume-anywhere">OKF v0.3 Interoperability</a> &middot;
<a href="#interactive-60-fps-webgl-workbench">WebGL Workbench</a> &middot;
<a href="#10-portable-agent-skills-and-cli">Skills &amp; CLI</a> &middot;
<a href="#local-first-privacy-and-offline-proof">Offline Proof</a>
</p>

</div>
Expand All @@ -50,7 +49,7 @@ Most coding-agent knowledge setups fail in one of three ways: stuffing 100-page

## Quick Start (60-Second Walkthrough)

**Prerequisites**: Python `>= 3.10` (`>= 3.11` recommended) and Git. Zero cloud accounts or API keys required.
**Prerequisites**: Python `>= 3.10` (`>= 3.11` recommended) and Git on Windows, macOS, or Linux. Zero cloud accounts or API keys required.

```bash
git clone https://github.com/GoogleCloudPlatform/knowledge-compiler.git
Expand Down Expand Up @@ -206,7 +205,7 @@ Use **Knowledge Compiler** through slash commands inside your AI coding agent or

## Release History

### **v1.3.0** (`Latest`)
### **v1.3.1** (`Latest`)
- **Full OKF v0.3 Interoperability (`vault-lint`, `vault-graph`, `vault-init`, `examples/starter-vault/`)**:
- **Portable Standard Relative Markdown Links (`--portable-links`)**: First-class validation, orphan/index tracking, BM25 excerpt unwrapping, and clickable WebGL Reader navigation for standard RFC 3986 `%20`-encoded relative Markdown links (`[Label](../dir/Note%20Name.md)`) alongside full backward compatibility for Obsidian `[[wikilinks]]`. Adds deterministic `vault-lint --fix --portable-links` conversion and upgrades `examples/starter-vault/` (434 inter-note Markdown links, 0 prose wikilinks) so generic OKF consumers (`okf-consume`, `viz.html`, GitHub, and Obsidian) all see the complete graph.
- **Unambiguous OKF v0.3 Bundle Root (`.`) & Subdirectory Indexes (§8)**: Reports `"bundle_root": "."` and `"concepts_dir": "wiki"` in `vault-lint`, scaffolds frontmatter-free `wiki/index.md` on `vault-init`, and generates frontmatter-free `wiki/index.md` + `wiki/<subdir>/index.md` progressive-disclosure indexes in `examples/starter-vault/` and `--fix --migrate-v03`.
Expand Down
4 changes: 2 additions & 2 deletions STABILITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Knowledge Compiler `1.x` Stability & Compatibility Policy (`v1.3.0`)
# Knowledge Compiler `1.x` Stability & Compatibility Policy (`v1.3.1`)

This document defines the Semantic Versioning (`SemVer 2.0.0`) and backward-compatibility guarantees for **Knowledge Compiler** across the `1.x` release series, starting with `v1.0.0` (updated for `v1.3.0` with full `OKF v0.3` interoperability: portable relative Markdown links, unambiguous `.` bundle root + `wiki/**/index.md` progressive disclosure, and `x-kc-*` namespaced epistemic extensions, while keeping full `OKF v0.2` backward compatibility).
This document defines the Semantic Versioning (`SemVer 2.0.0`) and backward-compatibility guarantees for **Knowledge Compiler** across the `1.x` release series, starting with `v1.0.0` (updated for `v1.3.1` with full `OKF v0.3` interoperability: portable relative Markdown links, unambiguous `.` bundle root + `wiki/**/index.md` progressive disclosure, and `x-kc-*` namespaced epistemic extensions, while keeping full `OKF v0.2` backward compatibility).

Throughout `1.x`, patch releases (`1.0.z`) contain only bug fixes and security hardening, and minor releases (`1.y.0`) introduce backward-compatible features without breaking the frozen contracts documented below.

Expand Down
2 changes: 1 addition & 1 deletion docs/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@
<button id="btn-onboard-sample" class="onboard-primary-btn" type="button" style="display:none;">
✨ Explore 21-Note Sample Vault
</button>
<button id="btn-onboard-ace" class="onboard-secondary-btn" type="button" style="display:none;">
<button id="btn-onboard-ace" class="onboard-secondary-btn" type="button" style="display:none !important;">
☁️ Browse Remote Tier (42+ Shared Patterns)
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@
<a class="brand" href="#top">
<img src="assets/logo.svg" alt="Knowledge Compiler logo" />
<span>Knowledge Compiler</span>
<span class="version-tag">v1.3.0</span>
<span class="version-tag">v1.3.1</span>
</a>
<nav class="nav-links" aria-label="Primary">
<a href="#live-demo">Live Demo</a>
Expand Down Expand Up @@ -904,7 +904,7 @@ <h2>4-Layer Vault Architecture &amp; Verifiable Offline Proof</h2>
<div class="footer-inner">
<div class="footer-links">
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler" target="_blank" rel="noopener">GitHub Repository</a>
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/releases" target="_blank" rel="noopener">Releases (v1.3.0)</a>
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/releases" target="_blank" rel="noopener">Releases (v1.3.1)</a>
<a href="https://github.com/open-knowledge-format/open-knowledge-format" target="_blank" rel="noopener">OKF v0.3 Spec</a>
<a href="https://okf.md/tools/#knowledge-compiler" target="_blank" rel="noopener">okf.md Listing</a>
<a href="https://github.com/GoogleCloudPlatform/knowledge-compiler/blob/main/STABILITY.md" target="_blank" rel="noopener">Stability</a>
Expand Down
8 changes: 4 additions & 4 deletions hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"SessionStart": [
{
"type": "command",
"command": "python3 -B scripts/hooks/session_sync.py || exit 0",
"command": "python3 -X utf8 -B scripts/hooks/session_sync.py || py -3 -X utf8 -B scripts/hooks/session_sync.py || python -X utf8 -B scripts/hooks/session_sync.py || exit 0",
"timeout": 15
}
],
"PreInvocation": [
{
"type": "command",
"command": "python3 -B scripts/hooks/session_sync.py || exit 0",
"command": "python3 -X utf8 -B scripts/hooks/session_sync.py || py -3 -X utf8 -B scripts/hooks/session_sync.py || python -X utf8 -B scripts/hooks/session_sync.py || exit 0",
"timeout": 15
}
]
Expand All @@ -21,7 +21,7 @@
"Stop": [
{
"type": "command",
"command": "python3 -B scripts/hooks/auto_sync_vault.py || exit 0",
"command": "python3 -X utf8 -B scripts/hooks/auto_sync_vault.py || py -3 -X utf8 -B scripts/hooks/auto_sync_vault.py || python -X utf8 -B scripts/hooks/auto_sync_vault.py || exit 0",
"timeout": 15
}
]
Expand All @@ -34,7 +34,7 @@
"hooks": [
{
"type": "command",
"command": "python3 -B scripts/hooks/log_tool_failure.py || exit 0",
"command": "python3 -X utf8 -B scripts/hooks/log_tool_failure.py || py -3 -X utf8 -B scripts/hooks/log_tool_failure.py || python -X utf8 -B scripts/hooks/log_tool_failure.py || exit 0",
"timeout": 10
}
]
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "knowledge-compiler",
"displayName": "Knowledge Compiler",
"version": "1.3.0",
"version": "1.3.1",
"description": "Compile PDFs, slides, docs, and agent sessions into a local Open Knowledge Format (OKF v0.3) Markdown wiki with a 2D/3D WebGL graph and linter.",
"logo": "assets/logo.svg",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "knowledge-compiler"
version = "1.3.0"
version = "1.3.1"
description = "Compile PDFs, slides, docs, and agent sessions into a local Open Knowledge Format (OKF v0.3) Markdown wiki with a 2D/3D WebGL graph and linter."
readme = "README.md"
license = {text = "Apache-2.0"}
Expand Down
2 changes: 1 addition & 1 deletion scripts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@

from __future__ import annotations

__version__ = "1.3.0"
__version__ = "1.3.1"
12 changes: 6 additions & 6 deletions scripts/extract_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,12 @@ def record_cache_entry(
"""Records or updates a cache entry."""
cache = load_cache(vault_root)
rel_source = (
str(file_path.relative_to(vault_root))
file_path.relative_to(vault_root).as_posix()
if file_path.is_relative_to(vault_root)
else file_path.name
)
rel_output = (
str(output_md.relative_to(vault_root))
output_md.relative_to(vault_root).as_posix()
if output_md.is_relative_to(vault_root)
else output_md.name
)
Expand Down Expand Up @@ -677,7 +677,7 @@ def is_source_cached(

cache = load_cache(vault_root)
rel_source = (
str(file_path.relative_to(vault_root))
file_path.relative_to(vault_root).as_posix()
if file_path.is_relative_to(vault_root)
else file_path.name
)
Expand Down Expand Up @@ -1413,9 +1413,9 @@ def rebuild_cache(vault_root: Path):
item.stem.replace("Copy of ", "").replace("Copy of", "").strip()
)
target_md = raw_dir / f"{stem}.md"
rel_source = str(item.relative_to(vault_root))
rel_source = item.relative_to(vault_root).as_posix()
rel_output = (
str(target_md.relative_to(vault_root)) if target_md.exists() else ""
target_md.relative_to(vault_root).as_posix() if target_md.exists() else ""
)

cache[rel_source] = {
Expand All @@ -1432,7 +1432,7 @@ def rebuild_cache(vault_root: Path):
elif suffix == ".md":
# Standalone raw markdown source
sha = compute_sha256(item)
rel_source = str(item.relative_to(vault_root))
rel_source = item.relative_to(vault_root).as_posix()
cache[rel_source] = {
"sha256": sha,
"mtime": item.stat().st_mtime,
Expand Down
5 changes: 4 additions & 1 deletion scripts/hooks/auto_sync_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ def acquire_vault_lock(vault_path: Path) -> Iterator[bool]:

resolved = vault_path.expanduser().resolve()
sha16 = hashlib.sha256(str(resolved).encode("utf-8")).hexdigest()[:16]
uid_part = str(os.getuid()) if hasattr(os, "getuid") else "user"
lock_dirs = [
get_plugin_data_dir() / "locks",
Path(tempfile.gettempdir()) / f"kc-locks-{os.getuid()}",
Path(tempfile.gettempdir()) / f"kc-locks-{uid_part}",
]

fd: int | None = None
Expand Down Expand Up @@ -216,6 +217,8 @@ def run_cmd(
cwd=str(cwd),
capture_output=True,
text=True,
encoding="utf-8",
errors="replace",
timeout=timeout,
check=False,
env=env,
Expand Down
4 changes: 2 additions & 2 deletions scripts/init_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def init_vault(
for d in directories:
if not d.exists():
d.mkdir(parents=True, exist_ok=True)
results["directories_created"].append(str(d.relative_to(target_path)))
results["directories_created"].append(d.relative_to(target_path).as_posix())

today_str = datetime.date.today().isoformat()

Expand Down Expand Up @@ -568,7 +568,7 @@ def init_vault(
for file_path, content in file_templates:
if not file_path.exists() or force:
file_path.write_text(content, encoding="utf-8")
results["files_created"].append(str(file_path.relative_to(target_path)))
results["files_created"].append(file_path.relative_to(target_path).as_posix())

if init_git and not (target_path / ".git").exists():
import subprocess
Expand Down
Loading
Loading