skillwiki 0.10.78 → 0.10.79

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/cli.js CHANGED
@@ -1456,13 +1456,13 @@ function mergeLogConflictStages(input) {
1456
1456
  const out = [];
1457
1457
  const deduped = [];
1458
1458
  const push = (entry) => {
1459
- const marker2 = publishId(entry);
1460
- if (marker2) {
1461
- if (seenMarkers.has(marker2)) {
1462
- deduped.push(marker2);
1459
+ const marker = publishId(entry);
1460
+ if (marker) {
1461
+ if (seenMarkers.has(marker)) {
1462
+ deduped.push(marker);
1463
1463
  return;
1464
1464
  }
1465
- seenMarkers.add(marker2);
1465
+ seenMarkers.add(marker);
1466
1466
  } else if (seenExact.has(entry)) {
1467
1467
  return;
1468
1468
  } else {
@@ -1768,10 +1768,27 @@ import { join as join10 } from "path";
1768
1768
  function day(event) {
1769
1769
  return event.occurred_at.slice(0, 10);
1770
1770
  }
1771
- function marker(event) {
1771
+ function renderLogEventMarker(event) {
1772
1772
  return `<!-- skillwiki-log-event:${event.operation_id} -->`;
1773
1773
  }
1774
- function bodyFor(event) {
1774
+ function verbatimField(event) {
1775
+ if (event.kind === "legacy-log-entry" && typeof event.metadata.legacy_markdown === "string") {
1776
+ return event.metadata.legacy_markdown;
1777
+ }
1778
+ if (event.kind === "log-append" && typeof event.metadata.appended_markdown === "string") {
1779
+ return event.metadata.appended_markdown;
1780
+ }
1781
+ return void 0;
1782
+ }
1783
+ function verbatimMarkdown(raw, event) {
1784
+ const text = raw.trimEnd();
1785
+ const mark = renderLogEventMarker(event);
1786
+ return text.includes(mark) ? text : `${text}
1787
+ ${mark}`;
1788
+ }
1789
+ function renderLogEventBody(event) {
1790
+ const raw = verbatimField(event);
1791
+ if (raw !== void 0) return verbatimMarkdown(raw, event);
1775
1792
  if (event.kind === "page-publish" || event.kind === "project-page-publish") {
1776
1793
  const tax = Array.isArray(event.metadata.taxonomy_added) ? event.metadata.taxonomy_added : [];
1777
1794
  const project = typeof event.metadata.project === "string" ? event.metadata.project : void 0;
@@ -1782,12 +1799,6 @@ function bodyFor(event) {
1782
1799
  event.note ? `- Note: ${event.note}` : ""
1783
1800
  ].filter(Boolean).join("\n");
1784
1801
  }
1785
- if (event.kind === "legacy-log-entry" && typeof event.metadata.legacy_markdown === "string") {
1786
- const legacy = event.metadata.legacy_markdown.trimEnd();
1787
- if (legacy.includes(marker(event))) return legacy;
1788
- return `${legacy}
1789
- ${marker(event)}`;
1790
- }
1791
1802
  if (event.kind === "session-brief" || event.kind === "archive" || event.kind === "remove" || event.kind === "log-entry") {
1792
1803
  return [
1793
1804
  `- Target: ${event.target}`,
@@ -1817,12 +1828,18 @@ function renderLogProjection(events) {
1817
1828
  ""
1818
1829
  ];
1819
1830
  for (const event of ordered) {
1820
- if (event.kind === "legacy-log-entry" && typeof event.metadata.legacy_markdown === "string") {
1821
- const block = bodyFor(event);
1831
+ if (verbatimField(event) !== void 0) {
1832
+ const block = renderLogEventBody(event);
1822
1833
  lines.push(block.endsWith("\n") ? block.trimEnd() : block, "");
1823
1834
  continue;
1824
1835
  }
1825
- lines.push(`## [${day(event)}] ${event.kind} | ${event.target}`, "", bodyFor(event), marker(event), "");
1836
+ lines.push(
1837
+ `## [${day(event)}] ${event.kind} | ${event.target}`,
1838
+ "",
1839
+ renderLogEventBody(event),
1840
+ renderLogEventMarker(event),
1841
+ ""
1842
+ );
1826
1843
  }
1827
1844
  return `${lines.join("\n").replace(/\n+$/, "")}
1828
1845
  `;
@@ -6292,8 +6309,8 @@ async function runPipelinePreview(strategy, prepared, vault) {
6292
6309
  let logAppended;
6293
6310
  try {
6294
6311
  const logText = await readFile13(logPath, "utf8");
6295
- const marker2 = strategy.publisherKind === "page" ? `<!-- skillwiki-page-publish:${prepared.operationId} -->` : `<!-- skillwiki-project-page-publish:${prepared.operationId} -->`;
6296
- logAppended = !logText.includes(marker2);
6312
+ const marker = strategy.publisherKind === "page" ? `<!-- skillwiki-page-publish:${prepared.operationId} -->` : `<!-- skillwiki-project-page-publish:${prepared.operationId} -->`;
6313
+ logAppended = !logText.includes(marker);
6297
6314
  } catch (error) {
6298
6315
  const result = err("FILE_NOT_FOUND", { path: logPath, ...strategy.publisherKind === "page" ? { message: String(error) } : {} });
6299
6316
  return { exitCode: ExitCode.FILE_NOT_FOUND, result };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.78",
3
+ "version": "0.10.79",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.78",
3
+ "version": "0.10.79",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by the deterministic `skillwiki` CLI.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.78",
3
+ "version": "0.10.79",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 21 prompt-only skills backed by the deterministic skillwiki CLI.",
5
5
  "author": {
6
6
  "name": "karlorz",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.10.78",
3
+ "version": "0.10.79",
4
4
  "description": "Project-aware Karpathy-style knowledge base: 21 prompt-only skills (wiki-*, proj-*, using-skillwiki, skillwiki-mcp) backed by HTTP MCP wiki_capture.",
5
5
  "author": {
6
6
  "name": "karlorz"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.10.78",
3
+ "version": "0.10.79",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",
@@ -33,7 +33,7 @@ Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (a
33
33
  On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
34
34
 
35
35
  1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
36
- 2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content`. Do not rewrite log history.
36
+ 2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content` (optional `operation_id` is 64 hex). Success returns a receipt (`operation_id`, `event_path`, hashes, `s3_verified`). Verify the exact block via `wiki_read_page(event_path)`. Do not require reading `log.md`. If `log.md` is over 256 KiB, full `wiki_read_page("log.md")` returns `PAGE_TOO_LARGE`; use `tail_bytes` only to browse the newest end.
37
37
  3. **Feature-detect work-item and page-publish tools**:
38
38
  - When the server advertises `wiki_workitem_write`: use it to create, mutate, or close work items under `projects/<slug>/work/**` or update `projects/<slug>/knowledge.md`, and to save Layer-3 workspace markdown: `projects/<slug>/README.md`, `projects/<slug>/architecture/**/*.md`, `projects/<slug>/requirements/**/*.md`, `projects/<slug>/compound/**/*.md`. Pass `path`, `content`, and `base_sha256` of existing bytes (from `wiki_read_page` or local mirror). On `FILE_CHANGED`, re-read and retry once. Deployed servers that predate the workspace-family allowlist deny those paths — treat that `PATH_DENIED` as "server predates this release"; STOP, do not fall back.
39
39
  - When the server advertises `wiki_page_publish`: use it to publish typed Layer-2 pages (`entities/`, `concepts/`, `comparisons/`, `queries/`, `meta/`) using the same CAS protocol.
@@ -192,7 +192,7 @@ If the vault has `.WIKI_GIT_FROZEN`:
192
192
  | `wiki-remove` | Remove maintained pages; exact raw disposal uses the separate attended `sources dispose` flow |
193
193
  | `wiki-reingest` | Detect drift in raw sources (sha256 comparison) and re-ingest updated content |
194
194
  | `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes (captures via wiki_capture on leaf hosts; local raw/transcripts/ only on authoring hosts) |
195
- | `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts |
195
+ | `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts. `wiki_log_append` returns a receipt; verify via `wiki_read_page(event_path)`. Use `wiki_read_page` `tail_bytes` to browse oversized `log.md`. |
196
196
  | `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) into vault pages |
197
197
  | `proj-init` | Bootstrap a project workspace (README, requirements, architecture) |
198
198
  | `proj-work` | Open or run a work item under a project's work/ directory |
@@ -80,7 +80,7 @@ Mutating tools (wiki_workitem_write, wiki_page_publish) enforce CAS concurrency
80
80
 
81
81
  ### Capture Kinds
82
82
  Ad-hoc records via wiki_capture require kind in: task | idea | bug | note.
83
- Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries.
83
+ Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries. Success returns a receipt; verify via wiki_read_page(event_path). Do not require reading log.md. wiki_read_page accepts optional tail_bytes for browsing oversized pages.
84
84
 
85
85
  ### Sensitive Content
86
86
  Never send credentials, API keys, auth tokens, passwords, or PII. Redact sensitive values using [REDACTED:<kind>] (e.g. [REDACTED:token]) before writing.
@@ -33,7 +33,7 @@ Remotes still on a pre-HTTP-MCP plugin or CLI must upgrade the plugin channel (a
33
33
  On leaf hosts, wiki captures go through MCP. Do **not** write `raw/transcripts/` or `log.md` as local files.
34
34
 
35
35
  1. Call MCP `wiki_capture` with `kind` (`task` | `idea` | `bug` | `note`), `project`, `title`, and `content`. Optional `agent_note`.
36
- 2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content`. Do not rewrite log history.
36
+ 2. Call MCP `wiki_log_append` when a structural `log.md` line is needed. Pass append-only `content` (optional `operation_id` is 64 hex). Success returns a receipt (`operation_id`, `event_path`, hashes, `s3_verified`). Verify the exact block via `wiki_read_page(event_path)`. Do not require reading `log.md`. If `log.md` is over 256 KiB, full `wiki_read_page("log.md")` returns `PAGE_TOO_LARGE`; use `tail_bytes` only to browse the newest end.
37
37
  3. **Feature-detect work-item and page-publish tools**:
38
38
  - When the server advertises `wiki_workitem_write`: use it to create, mutate, or close work items under `projects/<slug>/work/**` or update `projects/<slug>/knowledge.md`, and to save Layer-3 workspace markdown: `projects/<slug>/README.md`, `projects/<slug>/architecture/**/*.md`, `projects/<slug>/requirements/**/*.md`, `projects/<slug>/compound/**/*.md`. Pass `path`, `content`, and `base_sha256` of existing bytes (from `wiki_read_page` or local mirror). On `FILE_CHANGED`, re-read and retry once. Deployed servers that predate the workspace-family allowlist deny those paths — treat that `PATH_DENIED` as "server predates this release"; STOP, do not fall back.
39
39
  - When the server advertises `wiki_page_publish`: use it to publish typed Layer-2 pages (`entities/`, `concepts/`, `comparisons/`, `queries/`, `meta/`) using the same CAS protocol.
@@ -192,7 +192,7 @@ If the vault has `.WIKI_GIT_FROZEN`:
192
192
  | `wiki-remove` | Remove maintained pages; exact raw disposal uses the separate attended `sources dispose` flow |
193
193
  | `wiki-reingest` | Detect drift in raw sources (sha256 comparison) and re-ingest updated content |
194
194
  | `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes (captures via wiki_capture on leaf hosts; local raw/transcripts/ only on authoring hosts) |
195
- | `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts |
195
+ | `skillwiki-mcp` | HTTP MCP captures (`wiki_capture` / `wiki_log_append`); never local raw/transcripts on leaf hosts. `wiki_log_append` returns a receipt; verify via `wiki_read_page(event_path)`. Use `wiki_read_page` `tail_bytes` to browse oversized `log.md`. |
196
196
  | `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) into vault pages |
197
197
  | `proj-init` | Bootstrap a project workspace (README, requirements, architecture) |
198
198
  | `proj-work` | Open or run a work item under a project's work/ directory |
@@ -80,7 +80,7 @@ Mutating tools (wiki_workitem_write, wiki_page_publish) enforce CAS concurrency
80
80
 
81
81
  ### Capture Kinds
82
82
  Ad-hoc records via wiki_capture require kind in: task | idea | bug | note.
83
- Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries.
83
+ Captures append remotely to raw/transcripts/ and never overwrite existing files. Use wiki_log_append for append-only log entries. Success returns a receipt; verify via wiki_read_page(event_path). Do not require reading log.md. wiki_read_page accepts optional tail_bytes for browsing oversized pages.
84
84
 
85
85
  ### Sensitive Content
86
86
  Never send credentials, API keys, auth tokens, passwords, or PII. Redact sensitive values using [REDACTED:<kind>] (e.g. [REDACTED:token]) before writing.