skillwiki 0.9.33 → 0.9.34
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.
|
@@ -152,6 +152,26 @@ var CompoundSchema = z.object({
|
|
|
152
152
|
promoted_to: wikilink.optional(),
|
|
153
153
|
cssclasses: z.array(z.string()).optional()
|
|
154
154
|
});
|
|
155
|
+
var sessionPinPath = z.string().regex(
|
|
156
|
+
/^(entities|concepts|comparisons|queries|meta)\/.+\.md$/,
|
|
157
|
+
"must reference a typed-knowledge markdown page"
|
|
158
|
+
);
|
|
159
|
+
var SessionPinSchema = z.object({
|
|
160
|
+
title: z.string().min(1),
|
|
161
|
+
path: sessionPinPath,
|
|
162
|
+
scope: z.enum(["global", "project"]),
|
|
163
|
+
project: wikilink.optional(),
|
|
164
|
+
summary: z.string().min(1).optional(),
|
|
165
|
+
updated: isoDate.optional()
|
|
166
|
+
}).superRefine((v, ctx) => {
|
|
167
|
+
if (v.scope === "project" && v.project === void 0) {
|
|
168
|
+
ctx.addIssue({
|
|
169
|
+
code: z.ZodIssueCode.custom,
|
|
170
|
+
path: ["project"],
|
|
171
|
+
message: "project is required when scope is project"
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
});
|
|
155
175
|
var MetaSchema = z.object({
|
|
156
176
|
title: z.string().min(1),
|
|
157
177
|
aliases: z.array(z.string()).optional(),
|
|
@@ -164,9 +184,17 @@ var MetaSchema = z.object({
|
|
|
164
184
|
provenance_projects: z.array(wikilink).optional(),
|
|
165
185
|
generated_by: z.string().min(1).optional(),
|
|
166
186
|
generated_at: z.string().datetime().optional(),
|
|
167
|
-
generated_kind: z.enum(["session-brief"]).optional()
|
|
187
|
+
generated_kind: z.enum(["session-brief"]).optional(),
|
|
188
|
+
meta_kind: z.enum(["session-pins"]).optional(),
|
|
189
|
+
stale_ttl: z.number().int().positive().optional(),
|
|
190
|
+
pins: z.array(SessionPinSchema).optional()
|
|
168
191
|
}).superRefine((v, ctx) => {
|
|
169
|
-
|
|
192
|
+
const isGeneratedSessionBrief = v.generated_kind === "session-brief";
|
|
193
|
+
const isSessionPins = v.meta_kind === "session-pins";
|
|
194
|
+
if (isSessionPins && (!v.pins || v.pins.length === 0)) {
|
|
195
|
+
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["pins"], message: "required when meta_kind is session-pins" });
|
|
196
|
+
}
|
|
197
|
+
if (!isGeneratedSessionBrief && !isSessionPins && (!v.provenance_projects || v.provenance_projects.length < 2)) {
|
|
170
198
|
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["provenance_projects"], message: "meta pages must reference \u22652 projects" });
|
|
171
199
|
}
|
|
172
200
|
if (v.provenance && v.provenance !== "research" && (!v.provenance_projects || v.provenance_projects.length === 0)) {
|
|
@@ -8848,6 +8876,7 @@ export {
|
|
|
8848
8876
|
ok,
|
|
8849
8877
|
err,
|
|
8850
8878
|
TypedKnowledgeSchema,
|
|
8879
|
+
MetaSchema,
|
|
8851
8880
|
detectSchema,
|
|
8852
8881
|
isBlockedHost,
|
|
8853
8882
|
splitFrontmatter,
|
package/dist/cli.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ExitCode,
|
|
4
4
|
FLEET_REL_PATH,
|
|
5
|
+
MetaSchema,
|
|
5
6
|
SATELLITE_STALE_MS,
|
|
6
7
|
TypedKnowledgeSchema,
|
|
7
8
|
appendLastOp,
|
|
@@ -73,7 +74,7 @@ import {
|
|
|
73
74
|
triggerAutoUpdate,
|
|
74
75
|
writeCache,
|
|
75
76
|
writeDotenv
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-KUDZOG52.js";
|
|
77
78
|
import {
|
|
78
79
|
normalizeDistTag
|
|
79
80
|
} from "./chunk-E6UWZ3S3.js";
|
|
@@ -2386,14 +2387,27 @@ async function runSessionBrief(input) {
|
|
|
2386
2387
|
const today = generatedAt.slice(0, 10);
|
|
2387
2388
|
const project = await resolveProject(input);
|
|
2388
2389
|
try {
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2391
|
-
|
|
2390
|
+
const [
|
|
2391
|
+
transcripts,
|
|
2392
|
+
workItems,
|
|
2393
|
+
digests,
|
|
2394
|
+
baseHealthWarnings,
|
|
2395
|
+
satelliteHealth,
|
|
2396
|
+
sessionPins,
|
|
2397
|
+
memoryTopics
|
|
2398
|
+
] = await Promise.all([
|
|
2399
|
+
loadTranscriptInfo(scan.data.raw),
|
|
2400
|
+
loadWorkItems(scan.data.workItems),
|
|
2401
|
+
loadTrendDigests(scan.data.typedKnowledge),
|
|
2402
|
+
loadHealthWarnings(input.vault),
|
|
2403
|
+
loadSatelliteHealth(input.vault),
|
|
2404
|
+
loadSessionPins(input.vault, project),
|
|
2405
|
+
project ? loadMemoryTopics(input.vault, project) : Promise.resolve([])
|
|
2406
|
+
]);
|
|
2392
2407
|
const healthWarnings = [
|
|
2393
|
-
...
|
|
2394
|
-
...satelliteHealthWarnings(
|
|
2408
|
+
...baseHealthWarnings,
|
|
2409
|
+
...satelliteHealthWarnings(satelliteHealth)
|
|
2395
2410
|
];
|
|
2396
|
-
const memoryTopics = project ? await loadMemoryTopics(input.vault, project) : [];
|
|
2397
2411
|
const latestLogs = newest(transcripts.filter((t) => t.kind === "session-log"), 3);
|
|
2398
2412
|
const unclaimedCaptures = newest(transcripts.filter((t) => {
|
|
2399
2413
|
if (t.kind !== "task" && t.kind !== "bug") return false;
|
|
@@ -2408,6 +2422,7 @@ async function runSessionBrief(input) {
|
|
|
2408
2422
|
const brief = capWords(renderBrief({
|
|
2409
2423
|
project,
|
|
2410
2424
|
generatedAt,
|
|
2425
|
+
sessionPins,
|
|
2411
2426
|
latestLogs,
|
|
2412
2427
|
unclaimedCaptures,
|
|
2413
2428
|
activeWork,
|
|
@@ -2443,6 +2458,7 @@ async function runSessionBrief(input) {
|
|
|
2443
2458
|
index_updated: indexUpdated,
|
|
2444
2459
|
log_updated: logUpdated,
|
|
2445
2460
|
generated_at: generatedAt,
|
|
2461
|
+
session_pins: sessionPins,
|
|
2446
2462
|
memory_topics: memoryTopics,
|
|
2447
2463
|
humanHint
|
|
2448
2464
|
})
|
|
@@ -2544,6 +2560,29 @@ async function loadTrendDigests(typedPages) {
|
|
|
2544
2560
|
}
|
|
2545
2561
|
return out;
|
|
2546
2562
|
}
|
|
2563
|
+
async function loadSessionPins(vault, project) {
|
|
2564
|
+
const text = await readIfExists(join15(vault, "meta", "session-pins.md"));
|
|
2565
|
+
if (!text) return [];
|
|
2566
|
+
const fm = extractFrontmatter(text);
|
|
2567
|
+
if (!fm.ok) return [];
|
|
2568
|
+
const parsed = MetaSchema.safeParse(fm.data);
|
|
2569
|
+
if (!parsed.success || parsed.data.meta_kind !== "session-pins") return [];
|
|
2570
|
+
const registryUpdated = parsed.data.updated;
|
|
2571
|
+
const out = [];
|
|
2572
|
+
for (const pin of parsed.data.pins ?? []) {
|
|
2573
|
+
const pinProject = wikilinkSlug(pin.project);
|
|
2574
|
+
if (pin.scope === "project" && (!project || pinProject !== project)) continue;
|
|
2575
|
+
out.push({
|
|
2576
|
+
path: pin.path,
|
|
2577
|
+
title: pin.title,
|
|
2578
|
+
summary: pin.summary ?? "",
|
|
2579
|
+
date: pin.updated ?? registryUpdated,
|
|
2580
|
+
project: pinProject,
|
|
2581
|
+
kind: "session-pin"
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
return newest(out, 5);
|
|
2585
|
+
}
|
|
2547
2586
|
function renderBrief(input) {
|
|
2548
2587
|
const lines = [
|
|
2549
2588
|
"# Session Brief",
|
|
@@ -2552,6 +2591,7 @@ function renderBrief(input) {
|
|
|
2552
2591
|
`Scope: ${input.project ? `[[${input.project}]] plus global context` : "global context"}`,
|
|
2553
2592
|
""
|
|
2554
2593
|
];
|
|
2594
|
+
appendPinnedContextSection(lines, input.sessionPins);
|
|
2555
2595
|
appendSection(lines, "Active Work", input.activeWork, "No active project work found.");
|
|
2556
2596
|
appendSection(lines, "Unclaimed Captures", input.unclaimedCaptures, "No unclaimed task or bug captures found.");
|
|
2557
2597
|
appendSection(lines, "Recent Session Logs", input.project ? input.projectLogs : input.latestLogs, "No recent session logs found.");
|
|
@@ -2577,6 +2617,16 @@ function appendMemoryTopicsSection(lines, project, topics) {
|
|
|
2577
2617
|
}
|
|
2578
2618
|
lines.push("");
|
|
2579
2619
|
}
|
|
2620
|
+
function appendPinnedContextSection(lines, pins) {
|
|
2621
|
+
if (pins.length === 0) return;
|
|
2622
|
+
lines.push("## Pinned Context", "");
|
|
2623
|
+
for (const pin of pins) {
|
|
2624
|
+
const date = pin.date ? `${pin.date} ` : "";
|
|
2625
|
+
const summary = pin.summary ? ` \u2014 ${pin.summary}` : "";
|
|
2626
|
+
lines.push(`- ${date}${pin.title} (${pin.path})${summary}`);
|
|
2627
|
+
}
|
|
2628
|
+
lines.push("");
|
|
2629
|
+
}
|
|
2580
2630
|
function appendSection(lines, title, items, empty) {
|
|
2581
2631
|
lines.push(`## ${title}`, "");
|
|
2582
2632
|
if (items.length === 0) {
|
package/dist/skillwiki-mcp.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.34",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 18 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|