@bitcobblers/wod-wiki-engine 0.63.2274 → 0.63.2275
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/agent.cjs +12 -2
- package/dist/agent.cjs.map +1 -1
- package/dist/agent.d.cts +3 -1
- package/dist/agent.d.ts +3 -1
- package/dist/agent.mjs +10 -2
- package/dist/agent.mjs.map +1 -1
- package/dist/{chunk-HMNLKGSG.mjs → chunk-4TWTS5TS.mjs} +11 -9
- package/dist/chunk-4TWTS5TS.mjs.map +1 -0
- package/dist/index.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
- package/dist/chunk-HMNLKGSG.mjs.map +0 -1
package/dist/agent.cjs
CHANGED
|
@@ -853,7 +853,9 @@ async function ensureUserNotebookLanding(tx, notebookId, now) {
|
|
|
853
853
|
async function createUserNotebookLanding(storage, rawName) {
|
|
854
854
|
const trimmed = rawName.trim();
|
|
855
855
|
let slug = trimmed.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "notebook";
|
|
856
|
-
if (wodWikiCore.isNonPublishableNotebook(slug)
|
|
856
|
+
if (wodWikiCore.isNonPublishableNotebook(slug) || slug === "journal" || slug === "playground" || slug === "custom") {
|
|
857
|
+
slug = `${slug}-user`;
|
|
858
|
+
}
|
|
857
859
|
const nbId = wodWikiCore.toNotebookId(slug);
|
|
858
860
|
await storage.transaction(["notes"], "readwrite", async (tx) => {
|
|
859
861
|
const existing = await tx.readonly("notes").get(nbId);
|
|
@@ -4421,7 +4423,7 @@ async function ingestPortableFilesIntoStorage(storage, files, options = {}) {
|
|
|
4421
4423
|
}
|
|
4422
4424
|
|
|
4423
4425
|
// src/version.ts
|
|
4424
|
-
var VERSION = "0.63.
|
|
4426
|
+
var VERSION = "0.63.2275";
|
|
4425
4427
|
|
|
4426
4428
|
// src/feed/qr.ts
|
|
4427
4429
|
var APP_ORIGIN = "https://wod.wiki";
|
|
@@ -6581,6 +6583,7 @@ var noteListInputSchema = zod.z.strictObject({
|
|
|
6581
6583
|
tag: zod.z.string().optional().describe("Filter to Notes carrying this tag label."),
|
|
6582
6584
|
origin: zod.z.enum(["all", "user", "feed", "seed"]).optional().describe('Filter by Note origin ("user", "feed", "seed", or "all"; defaults to "all").'),
|
|
6583
6585
|
includeSeed: zod.z.boolean().optional().describe("Include read-only Seed/Feed notes (default true; pass false for user-authored notes only)."),
|
|
6586
|
+
includeCatalog: zod.z.boolean().optional().describe("Include built-in entity catalog records (efforts, equipment, guides, dashboards). Defaults to false to match :note{}."),
|
|
6584
6587
|
orphanedOnly: zod.z.boolean().optional().describe("When true, return only user Notes not belonging to any Notebook (equivalent to `:note{!notebook:*}`)."),
|
|
6585
6588
|
limit: zod.z.number().int().min(1).max(200).optional().describe("Max notes to return (default 50).")
|
|
6586
6589
|
});
|
|
@@ -6602,6 +6605,7 @@ var wodNoteListTool = defineAgentTool({
|
|
|
6602
6605
|
async execute(args, ctx) {
|
|
6603
6606
|
const targetNb = args.notebookId ? wodWikiCore.toNotebookId(args.notebookId) : void 0;
|
|
6604
6607
|
const includeSeed = args.includeSeed ?? true;
|
|
6608
|
+
const includeCatalog = args.includeCatalog === true || Boolean(targetNb);
|
|
6605
6609
|
const origin = args.origin ?? "all";
|
|
6606
6610
|
const orphanedOnly = args.orphanedOnly === true;
|
|
6607
6611
|
const searchLower = args.search?.trim().toLowerCase();
|
|
@@ -6633,8 +6637,13 @@ var wodNoteListTool = defineAgentTool({
|
|
|
6633
6637
|
return { allNotes: notes, linkedNoteIdsForNb: linkedIds, noteIdsWithLinks: withLinks };
|
|
6634
6638
|
}
|
|
6635
6639
|
);
|
|
6640
|
+
let excludedCatalogCount = 0;
|
|
6636
6641
|
const filtered = allNotes.filter((n) => {
|
|
6637
6642
|
if (isLandingNote(n)) return false;
|
|
6643
|
+
if (!includeCatalog && wodWikiWql.isEntityCatalogNote(n)) {
|
|
6644
|
+
excludedCatalogCount += 1;
|
|
6645
|
+
return false;
|
|
6646
|
+
}
|
|
6638
6647
|
const isSeedOrFeed = n.seedOrigin === "seed" || n.feedOrigin === "feed";
|
|
6639
6648
|
if (origin === "user" && isSeedOrFeed) return false;
|
|
6640
6649
|
if (origin === "feed" && n.feedOrigin !== "feed") return false;
|
|
@@ -6659,6 +6668,7 @@ var wodNoteListTool = defineAgentTool({
|
|
|
6659
6668
|
}).sort((a, b) => (b.date ?? b.createdAt) - (a.date ?? a.createdAt));
|
|
6660
6669
|
return {
|
|
6661
6670
|
totalCount: filtered.length,
|
|
6671
|
+
...excludedCatalogCount > 0 ? { excludedCatalogCount } : {},
|
|
6662
6672
|
notes: filtered.slice(0, limit).map((n) => {
|
|
6663
6673
|
const nbOrigin = wodWikiWql.notebookOriginOfItem(n);
|
|
6664
6674
|
const resolvedNb = wodWikiWql.notebookOfItem(n);
|