
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
@livewiki/core
Advanced tools
/**
export readme). ZERO LLM: every sentence in the output block wrapped in README_START/README_END
markers plus a one-line provenance comment.
markers; outside bytes preserved exactly.
Idempotent (unchanged wiki ⇒ no diff).
allowReadme: true (rule #1), mirroringallowPointer exception. Writing additionallyyes (rule-#2-style opt-in); without it the export${README_START}\n\n${inner.trim()}\n\n${README_END};
}
/* The full file content for the create case (provenance comment + block). /
function fullFileContent(inner) {
return ("\n" +
canonicalBlock(inner) +
"\n");
}
/* Opt-in instructions for the refusal path (rule #6). /
function refusalMessage() {
return [
"README.md exists without a livewiki marker block; a human-authored README is never overwritten (rule #6).",
"To opt in, insert these two lines where the generated section should go, then re-run:",
${README_START},
${README_END},
"Alternatively, remove or rename README.md and re-run to create a fully generated file.",
].join("\n");
}
/*generated is the block BODY## <heading> match, up to the next heading. /
function sectionLines(lines, headingRe) {
const start = lines.findIndex((line) => headingRe.test(line.trim()));
if (start < 0)
return null;
const out = [];
for (let i = start + 1; i < lines.length; i++) {
if (/^#{1,6}\s/.test(lines[i].trim()))
break;
out.push(lines[i]);
}
return out;
}
/**(...)*), bold labels## What this repository is opening when the## What you'll find in this wiki digest bullets of the quickstart —### [t](x) flows, - [t](x) topics). /
function extractHubLinks(hubBody, hubDir) {
const links = [];
const entryRe = /^(?:###|-)\s+[([^]]+)](([^)]+))\s$/;
for (const line of hubBody.split("\n")) {
const match = entryRe.exec(line.trim());
if (!match)
continue;
links.push({ title: match[1], link: livewiki/${hubDir}/${match[2]} });
}
return links;
}
/** Deterministic no-purpose fallback, mirroring navigation's synthesis. /
function synthesizePurposeFromDigests(digests) {
const usable = digests.filter((d) => d.responsibility !== null).slice(0, 3);
if (usable.length === 0)
return null;
const items = usable.map((d) => ${d.title} (${d.responsibility}));
const joined = items.length === 1
? items[0]
: items.length === 2
? ${items[0]} and ${items[1]}
: ${items.slice(0, -1).join(", ")}, and ${items[items.length - 1]};
return This repository is organized around ${joined}.;
}
async function readWikiPage(repoRoot, relPath) {
try {
return await safeIo.readText(repoRoot, relPath);
}
catch {
return null;
}
}
/*livewiki init (and livewiki init --batch) first to generate the wiki.");
}
const quickstartBody = stripFrontmatter(quickstart);
const config = await loadConfig(absRoot).catch(() => ({}));
const language = config.language ?? "en";
if (!language.toLowerCase().startsWith("en")) {
notes.push(wiki language is "${language}"; section headings are kept in English +
"(prose is preserved from the wiki in its own language)");
}
const repoName = nodePath.basename(absRoot);
const digests = extractDigests(quickstartBody);
// Item 23: the stage-5c understanding synthesis (when present) is the
// purpose paragraph; the README is one evidence input, never the
// authority. The fallback chain is unchanged.
const understanding = await loadUnderstandingSynthesis(absRoot);
const purpose = understanding?.purpose ??
extractPurpose(quickstartBody) ??
synthesizePurposeFromDigests(digests) ??
This is the \${repoName}` repository.; const flowsHub = await readWikiPage(absRoot, "livewiki/flows/index.md"); const topicsHub = await readWikiPage(absRoot, "livewiki/topics/index.md"); const flows = flowsHub === null ? [] : extractHubLinks(stripFrontmatter(flowsHub), "flows"); const topics = topicsHub === null ? [] : extractHubLinks(stripFrontmatter(topicsHub), "topics"); const lines = [ # ${repoName}, "", purpose, "", "## Documentation", "", "This repository is documented by a livewiki wiki — start at the [quickstart](livewiki/quickstart.md).", "", ]; if (digests.length > 0) { lines.push("## What you'll find in the wiki", ""); for (const digest of digests) { const link = livewiki/${digest.link}; lines.push(digest.responsibility !== null ? - ${digest.title} — ${digest.responsibility} :- ${digest.title}); } lines.push(""); } if (flows.length > 0) { lines.push("## How it works", ""); for (const flow of flows) lines.push(- ${flow.title}); lines.push(""); } if (topics.length > 0) { lines.push("## Concept topics", ""); for (const topic of topics) lines.push(- ${topic.title}`);
lines.push("");
}
return { content: lines.join("\n").trimEnd(), notes };
}
/*allowReadme: true).yes: true.
*/
export async function exportReadme(repoRoot, opts = {}) {
const absRoot = nodePath.resolve(repoRoot);
const dryRun = opts.yes !== true;
const { content, notes } = await buildReadme(absRoot);
const ioOpts = { allowReadme: true };
let existing = null;
if (await safeIo.exists(absRoot, README_REL_PATH, ioOpts)) {
existing = await safeIo.readText(absRoot, README_REL_PATH, ioOpts);
}
const applied = applyReadme(existing, content);
const path = nodePath.join(absRoot, README_REL_PATH);
if ("refusal" in applied) {
return {
ok: false,
action: "refused",
dryRun,
path,
bytesChanged: 0,
refusal: applied.refusal,
notes,
};
}
if (dryRun) {
const preview = applied.action === "unchanged"
? undefined
: applied.content.split("\n").slice(0, PREVIEW_LINES);
return {
ok: true,
action: applied.action,
dryRun: true,
path,
bytesChanged: 0,
notes,
...(preview !== undefined ? { preview } : {}),
};
}
if (applied.action === "unchanged") {
return { ok: true, action: "unchanged", dryRun: false, path, bytesChanged: 0, notes };
}
await safeIo.writeText(absRoot, README_REL_PATH, applied.content, ioOpts);
return {
ok: true,
action: applied.action,
dryRun: false,
path,
bytesChanged: applied.content.length - (existing?.length ?? 0),
notes,
};
}
//# sourceMappingURL=readme-export.js.mapFAQs
Deterministic structural index and batch documentation engine for livewiki.
The npm package @livewiki/core receives a total of 37 weekly downloads. As such, @livewiki/core popularity was classified as not popular.
We found that @livewiki/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.