skillwiki 0.2.1-beta.4 → 0.2.1-beta.5
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 +36 -0
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2582,6 +2582,37 @@ async function runUpdate(input) {
|
|
|
2582
2582
|
};
|
|
2583
2583
|
}
|
|
2584
2584
|
|
|
2585
|
+
// src/commands/transcripts.ts
|
|
2586
|
+
import { readdir as readdir4, stat as stat6, readFile as readFile14 } from "fs/promises";
|
|
2587
|
+
import { join as join19 } from "path";
|
|
2588
|
+
async function runTranscripts(input) {
|
|
2589
|
+
const dir = join19(input.vault, "raw", "transcripts");
|
|
2590
|
+
let entries;
|
|
2591
|
+
try {
|
|
2592
|
+
entries = await readdir4(dir, { withFileTypes: true });
|
|
2593
|
+
} catch {
|
|
2594
|
+
return { exitCode: ExitCode.VAULT_PATH_INVALID, result: { ok: false, error: "VAULT_PATH_INVALID", detail: `raw/transcripts/ not found: ${dir}` } };
|
|
2595
|
+
}
|
|
2596
|
+
const transcripts = [];
|
|
2597
|
+
for (const entry of entries) {
|
|
2598
|
+
if (!entry.isFile() || !entry.name.endsWith(".md")) continue;
|
|
2599
|
+
const filePath = join19(dir, entry.name);
|
|
2600
|
+
const content = await readFile14(filePath, "utf8");
|
|
2601
|
+
const fm = extractFrontmatter(content);
|
|
2602
|
+
if (!fm.ok) continue;
|
|
2603
|
+
const ingested = typeof fm.data.ingested === "string" ? fm.data.ingested : "";
|
|
2604
|
+
if (input.since && ingested && ingested < input.since) continue;
|
|
2605
|
+
const s = await stat6(filePath);
|
|
2606
|
+
transcripts.push({
|
|
2607
|
+
file: `raw/transcripts/${entry.name}`,
|
|
2608
|
+
ingested,
|
|
2609
|
+
size: s.size
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
const hint = transcripts.length > 0 ? transcripts.map((t) => `${t.file} (ingested: ${t.ingested || "unknown"}, ${t.size}B)`).join("\n") : "no transcript files found";
|
|
2613
|
+
return { exitCode: ExitCode.OK, result: ok({ transcripts, humanHint: hint }) };
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2585
2616
|
// src/cli.ts
|
|
2586
2617
|
var pkg = JSON.parse(readFileSync5(new URL("../package.json", import.meta.url), "utf8"));
|
|
2587
2618
|
var program = new Command();
|
|
@@ -2741,6 +2772,11 @@ program.command("update").description("update skillwiki CLI to the latest versio
|
|
|
2741
2772
|
home: process.env.HOME ?? "",
|
|
2742
2773
|
distTag: opts.tag
|
|
2743
2774
|
})));
|
|
2775
|
+
program.command("transcripts [vault]").description("list transcript files in raw/transcripts/").option("--since <date>", "only files ingested on or after this date (YYYY-MM-DD)").option("--wiki <name>", "wiki profile name").action(async (vault, opts) => {
|
|
2776
|
+
const v = await resolveVaultArg(vault, opts.wiki);
|
|
2777
|
+
if (!v.ok) emit({ exitCode: v.exitCode, result: v.payload });
|
|
2778
|
+
else emit(await runTranscripts({ vault: v.vault, since: opts.since }));
|
|
2779
|
+
});
|
|
2744
2780
|
triggerAutoUpdate(process.env.HOME ?? "", pkg.version);
|
|
2745
2781
|
program.parseAsync(process.argv).catch((e) => {
|
|
2746
2782
|
process.stdout.write(JSON.stringify({ ok: false, error: "INTERNAL", detail: { message: String(e) } }) + "\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.5",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 15 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|