@bitcobblers/wod-wiki-engine 0.63.2274 → 0.63.2276

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.d.cts CHANGED
@@ -511,10 +511,10 @@ declare const wodNoteListTool: AgentToolSpec<z.ZodObject<{
511
511
  all: "all";
512
512
  }>>;
513
513
  includeSeed: z.ZodOptional<z.ZodBoolean>;
514
+ includeCatalog: z.ZodOptional<z.ZodBoolean>;
514
515
  orphanedOnly: z.ZodOptional<z.ZodBoolean>;
515
516
  limit: z.ZodOptional<z.ZodNumber>;
516
517
  }, z.core.$strict>, {
517
- totalCount: number;
518
518
  notes: {
519
519
  id: string;
520
520
  title: string;
@@ -527,6 +527,8 @@ declare const wodNoteListTool: AgentToolSpec<z.ZodObject<{
527
527
  wodBlockCount: number;
528
528
  url: string;
529
529
  }[];
530
+ excludedCatalogCount?: number | undefined;
531
+ totalCount: number;
530
532
  }>;
531
533
  declare const wodNoteGetTool: AgentToolSpec<z.ZodObject<{
532
534
  noteId: z.ZodString;
package/dist/agent.d.ts CHANGED
@@ -511,10 +511,10 @@ declare const wodNoteListTool: AgentToolSpec<z.ZodObject<{
511
511
  all: "all";
512
512
  }>>;
513
513
  includeSeed: z.ZodOptional<z.ZodBoolean>;
514
+ includeCatalog: z.ZodOptional<z.ZodBoolean>;
514
515
  orphanedOnly: z.ZodOptional<z.ZodBoolean>;
515
516
  limit: z.ZodOptional<z.ZodNumber>;
516
517
  }, z.core.$strict>, {
517
- totalCount: number;
518
518
  notes: {
519
519
  id: string;
520
520
  title: string;
@@ -527,6 +527,8 @@ declare const wodNoteListTool: AgentToolSpec<z.ZodObject<{
527
527
  wodBlockCount: number;
528
528
  url: string;
529
529
  }[];
530
+ excludedCatalogCount?: number | undefined;
531
+ totalCount: number;
530
532
  }>;
531
533
  declare const wodNoteGetTool: AgentToolSpec<z.ZodObject<{
532
534
  noteId: z.ZodString;
package/dist/agent.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { buildQueryServiceStoresFromStorage, extractNoteIdentity, extractTypedTags, noteHasRecordedSessionsInTx, snapshotNoteRevisionIfHasSessionsInTx, makeNotebookLinkId, resolveScopedPropertyCatalog, effortToMarkdown, equipmentToMarkdown, saveScopedPropertyOverride, listFeedSubscriptionsHeadless, seedMetaKey, subscribeFeedSourceHeadless, unsubscribeFeedSourceHeadless, deleteFeedSourceHeadless, checkUnpublishedFeedChanges, MemoryFeedTree, publishFeedFromStorage, ingestPortableFilesIntoStorage, exportPortableFilesFromStorage, getJournalDayOverlay, readFrontmatterMeta, createUserNotebookLanding, setNotebookPublic, promoteNoteToNotebooks, removeNoteFromNotebook, deleteUserNotebook, getNoteNotebooks, resolveUpstreamProvenance, getNotePublicationSummary, listScheduleItemsForNote, listNoteRevisions, composeNoteMarkdown, buildNoteProvenance, listScheduleItemsByDateRange, scheduleNoteOnDate, batchScheduleNotes, updateScheduleItem, removeScheduleItem, buildStatementTree, prepareJournalSessionRun, localCivilDateKey, setSessionPublic, attributeSession } from './chunk-HMNLKGSG.mjs';
1
+ import { buildQueryServiceStoresFromStorage, extractNoteIdentity, extractTypedTags, noteHasRecordedSessionsInTx, snapshotNoteRevisionIfHasSessionsInTx, makeNotebookLinkId, resolveScopedPropertyCatalog, effortToMarkdown, equipmentToMarkdown, saveScopedPropertyOverride, listFeedSubscriptionsHeadless, seedMetaKey, subscribeFeedSourceHeadless, unsubscribeFeedSourceHeadless, deleteFeedSourceHeadless, checkUnpublishedFeedChanges, MemoryFeedTree, publishFeedFromStorage, ingestPortableFilesIntoStorage, exportPortableFilesFromStorage, getJournalDayOverlay, readFrontmatterMeta, createUserNotebookLanding, setNotebookPublic, promoteNoteToNotebooks, removeNoteFromNotebook, deleteUserNotebook, getNoteNotebooks, resolveUpstreamProvenance, getNotePublicationSummary, listScheduleItemsForNote, listNoteRevisions, composeNoteMarkdown, buildNoteProvenance, listScheduleItemsByDateRange, scheduleNoteOnDate, batchScheduleNotes, updateScheduleItem, removeScheduleItem, buildStatementTree, prepareJournalSessionRun, localCivilDateKey, setSessionPublic, attributeSession } from './chunk-J3G7VFT6.mjs';
2
2
  import { BUILTIN_NOTEBOOKS, parseDocumentSections, KNOWN_SECTION_WIDGETS, isNoteEditable, reconcileNoteBlocks, validateNoteBlocks, toNotebookId, blockContentId, MetricType, orderPlacements, countNotesByNotebook, isSystemReadOnlyNotebook, isNotebookLanding, notebookSlugFromId, isNonPublishableNotebook } from '@bitcobblers/wod-wiki-core';
3
3
  import { bundledEfforts, createReferenceIndex, parseScript, extractStatementRefs, createParser, findUnresolvedChoices, createMockClock, RuntimeStack, EventBus, frozenNow, ScriptRuntime, createCompiler, createAnalyticsEngineForBlock, StartSessionAction, NextEvent, toStoredOutputStatement } from '@bitcobblers/wod-wiki-lang';
4
4
  import { rowsEqual, userDeletedSeedKey } from '@bitcobblers/wod-wiki-storage';
5
- import { QueryService, notebookOriginOfItem, notebookOfItem, notebooksOfItem, toEventRows, toSummaryEventRows, parseQuery, isPipelineQuery, isFindQuery, isAggregateQuery, WQL_ROLLUP_PERIODS, WQL_AGGREGATORS, WQL_FIND_TARGETS, wqlGroupingDimensions, wqlFilterKeys, normalizeWql, WQL_COMPARISON_OPS, CONTENT_GROUPING_DIMENSIONS, WQL_VIRTUAL_DIMS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES } from '@bitcobblers/wod-wiki-wql';
5
+ import { QueryService, notebookOriginOfItem, notebookOfItem, notebooksOfItem, isEntityCatalogNote, toEventRows, toSummaryEventRows, parseQuery, isPipelineQuery, isFindQuery, isAggregateQuery, WQL_ROLLUP_PERIODS, WQL_AGGREGATORS, WQL_FIND_TARGETS, wqlGroupingDimensions, wqlFilterKeys, normalizeWql, WQL_COMPARISON_OPS, CONTENT_GROUPING_DIMENSIONS, WQL_VIRTUAL_DIMS, WQL_TAG_KEYS, WQL_TYPED_TAG_KEYS, WQL_METRIC_AGGREGATES, WQL_METRIC_FAMILIES } from '@bitcobblers/wod-wiki-wql';
6
6
  import { z } from 'zod';
7
7
 
8
8
  // src/agent/types.ts
@@ -1242,12 +1242,13 @@ var wodNotebookListTool = defineAgentTool({
1242
1242
  const icon = typeof fm["icon"] === "string" ? fm["icon"].replace(/^"|"$/g, "") : "\u{1F4D3}";
1243
1243
  const isFeed = n.feedOrigin === "feed" || n.seedOrigin === "seed";
1244
1244
  const existing = byId.get(n.id);
1245
+ const isBuiltinDefault = existing?.origin === "default";
1245
1246
  byId.set(n.id, {
1246
1247
  notebookId: n.id,
1247
1248
  slug,
1248
- name: n.title || existing?.name || slug,
1249
+ name: isBuiltinDefault ? existing.name : n.title || existing?.name || slug,
1249
1250
  description: description || existing?.description || "",
1250
- icon: icon || existing?.icon || "\u{1F4D3}",
1251
+ icon: (icon !== "\u{1F4D3}" ? icon : existing?.icon) || icon,
1251
1252
  origin: existing?.origin ?? (isFeed ? "feed" : "user"),
1252
1253
  writable: !isSystemReadOnlyNotebook(n.id) && !isFeed,
1253
1254
  public: n.public === true,
@@ -1450,6 +1451,7 @@ var noteListInputSchema = z.strictObject({
1450
1451
  tag: z.string().optional().describe("Filter to Notes carrying this tag label."),
1451
1452
  origin: z.enum(["all", "user", "feed", "seed"]).optional().describe('Filter by Note origin ("user", "feed", "seed", or "all"; defaults to "all").'),
1452
1453
  includeSeed: z.boolean().optional().describe("Include read-only Seed/Feed notes (default true; pass false for user-authored notes only)."),
1454
+ includeCatalog: z.boolean().optional().describe("Include built-in entity catalog records (efforts, equipment, guides, dashboards). Defaults to false to match :note{}."),
1453
1455
  orphanedOnly: z.boolean().optional().describe("When true, return only user Notes not belonging to any Notebook (equivalent to `:note{!notebook:*}`)."),
1454
1456
  limit: z.number().int().min(1).max(200).optional().describe("Max notes to return (default 50).")
1455
1457
  });
@@ -1471,6 +1473,7 @@ var wodNoteListTool = defineAgentTool({
1471
1473
  async execute(args, ctx) {
1472
1474
  const targetNb = args.notebookId ? toNotebookId(args.notebookId) : void 0;
1473
1475
  const includeSeed = args.includeSeed ?? true;
1476
+ const includeCatalog = args.includeCatalog === true || Boolean(targetNb);
1474
1477
  const origin = args.origin ?? "all";
1475
1478
  const orphanedOnly = args.orphanedOnly === true;
1476
1479
  const searchLower = args.search?.trim().toLowerCase();
@@ -1502,8 +1505,13 @@ var wodNoteListTool = defineAgentTool({
1502
1505
  return { allNotes: notes, linkedNoteIdsForNb: linkedIds, noteIdsWithLinks: withLinks };
1503
1506
  }
1504
1507
  );
1508
+ let excludedCatalogCount = 0;
1505
1509
  const filtered = allNotes.filter((n) => {
1506
1510
  if (isLandingNote(n)) return false;
1511
+ if (!includeCatalog && isEntityCatalogNote(n)) {
1512
+ excludedCatalogCount += 1;
1513
+ return false;
1514
+ }
1507
1515
  const isSeedOrFeed = n.seedOrigin === "seed" || n.feedOrigin === "feed";
1508
1516
  if (origin === "user" && isSeedOrFeed) return false;
1509
1517
  if (origin === "feed" && n.feedOrigin !== "feed") return false;
@@ -1528,6 +1536,7 @@ var wodNoteListTool = defineAgentTool({
1528
1536
  }).sort((a, b) => (b.date ?? b.createdAt) - (a.date ?? a.createdAt));
1529
1537
  return {
1530
1538
  totalCount: filtered.length,
1539
+ ...excludedCatalogCount > 0 ? { excludedCatalogCount } : {},
1531
1540
  notes: filtered.slice(0, limit).map((n) => {
1532
1541
  const nbOrigin = notebookOriginOfItem(n);
1533
1542
  const resolvedNb = notebookOfItem(n);