fix(sl): agentska oprema → agentska vprega, re-enable /sl/ routes

- agent-harness.md: "oprema" → "vprega" (harness, as in ox harness)
  Title: "Agentska vprega: zot + Colibri"
  Content: "Privzeta vprega OOTB je zot"
- index.md: updated table description
- sl/[...slug].astro + sl/index.astro: new dynamic routes for SL wiki pages
- Deployed: 68 pages live (23 EN + 23 SL + 2 indexes)
This commit is contained in:
Sam & Claude 2026-06-26 12:30:48 +02:00
parent 9ca7ac68c2
commit c8bda023ac
4 changed files with 108 additions and 22 deletions

View file

@ -0,0 +1,91 @@
---
import fs from "node:fs";
import path from "node:path";
export function getStaticPaths() {
const WIKI_DIR = path.resolve("src/content/sl");
if (!fs.existsSync(WIKI_DIR)) return [];
const EXCLUDE = [".git", "index.md"];
function walk(dir, prefix = "") {
const entries = fs.readdirSync(dir, { withFileTypes: true });
const slugs = [];
for (const e of entries) {
if (e.name.startsWith(".") || EXCLUDE.includes(e.name)) continue;
const full = path.join(dir, e.name);
if (e.isDirectory()) {
slugs.push(...walk(full, prefix ? `${prefix}/${e.name}` : e.name));
} else if (e.name.endsWith(".md")) {
const rel = prefix ? `${prefix}/${e.name}` : e.name;
slugs.push({ params: { slug: rel.replace(/\.md$/, "") } });
}
}
return slugs;
}
return walk(WIKI_DIR);
}
const { slug } = Astro.params;
const WIKI_DIR = path.resolve("src/content/sl");
const filePath = path.join(WIKI_DIR, `${slug}.md`);
if (!fs.existsSync(filePath)) {
return new Response("Not found", { status: 404 });
}
const raw = fs.readFileSync(filePath, "utf-8");
let content = raw;
let frontmatter = {};
if (raw.startsWith("---")) {
const end = raw.indexOf("---", 3);
if (end !== -1) {
for (const line of raw.slice(3, end).split("\n")) {
const m = line.match(/^(\w+):\s*(.+)$/);
if (m) frontmatter[m[1]] = m[2].replace(/^["']|["']$/g, "");
}
content = raw.slice(end + 3).trim();
}
}
const title = (frontmatter.title || slug).replace(/^["']|["']$/g, "");
content = content.replace(/\]\(\.\/([^)]+)\.md\)/g, "](/sl/$1/)")
.replace(/\]\(\.\.\/([^)]+)\.md\)/g, "](/sl/$1/)")
.replace(/```(\w*)\n([\s\S]*?)```/g, (_, lang, code) =>
`<pre><code${lang ? ` class="language-${lang}"` : ""}>${code.trim()}</code></pre>`)
.replace(/`([^`]+)`/g, "<code>$1</code>")
.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>")
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>')
.replace(/^### (.+)$/gm, "<h3>$1</h3>")
.replace(/^## (.+)$/gm, "<h2>$1</h2>")
.replace(/^# (.+)$/gm, "<h1>$1</h1>")
.replace(/^- (.+)$/gm, "<li>$1</li>")
.replace(/((?:<li>.*<\/li>\n?)+)/g, "<ul>$1</ul>");
const lines = content.split("\n");
content = lines.map(l => l.startsWith("<") || l === "" ? l : `<p>${l}</p>`).join("\n");
---
<!DOCTYPE html>
<html lang="sl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title} — Colibri Wiki</title>
<style>
:root { --bg: #fff; --fg: #1a1a1a; --link: #0366d6; --muted: #666; --border: #e0e0e0; }
@media (prefers-color-scheme: dark) { :root { --bg: #1a1a1a; --fg: #e6e6e6; --link: #58a6ff; --muted: #999; --border: #333; } }
body { max-width: 720px; margin: 2rem auto; padding: 0 1rem; font: 16px/1.6 system-ui; background: var(--bg); color: var(--fg); }
nav { margin-bottom: 1.5rem; } nav a { color: var(--muted); font-size: .9rem; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.4rem; margin-top: 2rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
h3 { font-size: 1.1rem; margin-top: 1.5rem; } a { color: var(--link); }
pre { background: var(--border); padding: .8rem 1rem; border-radius: 4px; overflow-x: auto; font-size: .9rem; }
code { font-size: .9em; background: var(--border); padding: .1em .3em; border-radius: 3px; } pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { border: 1px solid var(--border); padding: .4rem .6rem; text-align: left; font-size: .9rem; } th { background: var(--border); }
</style>
</head>
<body>
<nav><a href="/sl/">← slovenski kazalec</a> | <a href="/">english</a></nav>
<article>
<h1>{title}</h1>
<Fragment set:html={content} />
</article>
</body>
</html>

View file

@ -2,10 +2,14 @@
import fs from "node:fs";
import path from "node:path";
const WIKI_DIR = path.resolve("../../../docs/wiki");
const WIKI_DIR = path.resolve("src/content/sl");
if (!fs.existsSync(WIKI_DIR)) {
// SL content not staged — return empty page
}
const EXCLUDE = [".git", "index.md"];
function walkMarkdown(dir, prefix = "") {
if (!fs.existsSync(dir)) return [];
const entries = fs.readdirSync(dir, { withFileTypes: true });
const files = [];
for (const e of entries) {
@ -17,10 +21,8 @@ function walkMarkdown(dir, prefix = "") {
const rel = prefix ? `${prefix}/${e.name}` : e.name;
const slug = rel.replace(/\.md$/, "");
const raw = fs.readFileSync(full, "utf-8");
const title = raw.match(/^#\s+(.+)$/m)?.[1] || slug;
if (rel.startsWith("sl/")) {
files.push({ slug: slug.replace(/^sl\//, ""), title, file: rel });
}
const title = raw.match(/^title:\s*"?(.+)"?$/m)?.[1] || raw.match(/^#\s+(.+)$/m)?.[1] || slug;
files.push({ slug, title: title.replace(/^["']|["']$/g, "") });
}
}
return files.sort((a, b) => a.title.localeCompare(b.title));
@ -33,28 +35,21 @@ const pages = walkMarkdown(WIKI_DIR);
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Colibri Wiki</title>
<title>Colibri Wiki — slovenščina</title>
<style>
:root { --bg: #fff; --fg: #1a1a1a; --link: #0366d6; --muted: #666; }
@media (prefers-color-scheme: dark) { :root { --bg: #1a1a1a; --fg: #e6e6e6; --link: #58a6ff; --muted: #999; } }
body { max-width: 720px; margin: 2rem auto; padding: 0 1rem; font: 16px/1.6 system-ui; background: var(--bg); color: var(--fg); }
h1 { margin-bottom: .25rem; }
p.lede { color: var(--muted); margin-bottom: .5rem; }
ul { list-style: none; padding: 0; }
li { margin: .35rem 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.lang-bar { margin-bottom: 1rem; }
.lang-bar a { font-weight: 600; }
h1 { margin-bottom: .25rem; } p.lede { color: var(--muted); margin-bottom: .5rem; }
ul { list-style: none; padding: 0; } li { margin: .35rem 0; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
.lang-bar { margin-bottom: 1rem; } .lang-bar a { font-weight: 600; }
</style>
</head>
<body>
<h1>Colibri Wiki</h1>
<p class="lede">
Strani z odločitvami — <em>zakaj</em> je arhitektura takšna, kot je.
<a href="https://github.com/karpathy/llm-wiki">Vzorec LLM Wiki</a>.
</p>
<p class="lang-bar"><a href="/">← English</a></p>
<p class="lede">Strani z odločitvami — <em>zakaj</em> za arhitekturo.</p>
<p class="lang-bar"><a href="/">English →</a></p>
<ul>
{pages.map((p) => (
<li><a href={`/sl/${p.slug}/`}>{p.title}</a></li>

View file

@ -1,5 +1,5 @@
---
title: "Agentska oprema: zot + Colibri"
title: "Agentska vprega: zot + Colibri"
description: "Dve binarni datoteki, ne ena — zot (agent, Go) in Colibri (krmilna ravnina, Rust)."
---
@ -51,7 +51,7 @@ Kje živi:
- pogodba argv samodejnega zagona: `crates/colibri-daemon/src/socket.rs`
(testi enot `default_agent_args` — zot→rpc, pi→--mode json)
Privzeta oprema OOTB je **zot**; pi ostaja podprta rezerva
Privzeta vprega OOTB je **zot**; pi ostaja podprta rezerva
(`COLIBRI_AUTOSPAWN_BINARY=pi`).
## Glej tudi

View file

@ -51,7 +51,7 @@ clippy.
| Stran | Kaj pokriva |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [agent-harness](./agent-harness.md) | Razcep zot (agent) + Colibri (krmilna ravnina); samodejni zagon + gonilnik RPC |
| [agent-harness](./agent-harness.md) | Razcep zot (agent) + Colibri (krmilna ravnina); vprega, samodejni zagon + gonilnik RPC |
| [agent-events-reference](./agent-events-reference.md) | Referenca dogodkov zot po opremi, preslikave Glasspane in preverjena polja prepisa |
| [cost-model](./cost-model.md) | Bajtno stabilne predpone, merjenje zadetkov predpomnilnika, samodejno stopnjevanje, stiskanje T14 |
| [glasspane](./glasspane.md) | Avtomat stanj agenta, pretakanje JSONL, taksonomija AgentRuntime, API posnetkov |