@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.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-4TWTS5TS.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
@@ -1450,6 +1450,7 @@ var noteListInputSchema = z.strictObject({
1450
1450
  tag: z.string().optional().describe("Filter to Notes carrying this tag label."),
1451
1451
  origin: z.enum(["all", "user", "feed", "seed"]).optional().describe('Filter by Note origin ("user", "feed", "seed", or "all"; defaults to "all").'),
1452
1452
  includeSeed: z.boolean().optional().describe("Include read-only Seed/Feed notes (default true; pass false for user-authored notes only)."),
1453
+ includeCatalog: z.boolean().optional().describe("Include built-in entity catalog records (efforts, equipment, guides, dashboards). Defaults to false to match :note{}."),
1453
1454
  orphanedOnly: z.boolean().optional().describe("When true, return only user Notes not belonging to any Notebook (equivalent to `:note{!notebook:*}`)."),
1454
1455
  limit: z.number().int().min(1).max(200).optional().describe("Max notes to return (default 50).")
1455
1456
  });
@@ -1471,6 +1472,7 @@ var wodNoteListTool = defineAgentTool({
1471
1472
  async execute(args, ctx) {
1472
1473
  const targetNb = args.notebookId ? toNotebookId(args.notebookId) : void 0;
1473
1474
  const includeSeed = args.includeSeed ?? true;
1475
+ const includeCatalog = args.includeCatalog === true || Boolean(targetNb);
1474
1476
  const origin = args.origin ?? "all";
1475
1477
  const orphanedOnly = args.orphanedOnly === true;
1476
1478
  const searchLower = args.search?.trim().toLowerCase();
@@ -1502,8 +1504,13 @@ var wodNoteListTool = defineAgentTool({
1502
1504
  return { allNotes: notes, linkedNoteIdsForNb: linkedIds, noteIdsWithLinks: withLinks };
1503
1505
  }
1504
1506
  );
1507
+ let excludedCatalogCount = 0;
1505
1508
  const filtered = allNotes.filter((n) => {
1506
1509
  if (isLandingNote(n)) return false;
1510
+ if (!includeCatalog && isEntityCatalogNote(n)) {
1511
+ excludedCatalogCount += 1;
1512
+ return false;
1513
+ }
1507
1514
  const isSeedOrFeed = n.seedOrigin === "seed" || n.feedOrigin === "feed";
1508
1515
  if (origin === "user" && isSeedOrFeed) return false;
1509
1516
  if (origin === "feed" && n.feedOrigin !== "feed") return false;
@@ -1528,6 +1535,7 @@ var wodNoteListTool = defineAgentTool({
1528
1535
  }).sort((a, b) => (b.date ?? b.createdAt) - (a.date ?? a.createdAt));
1529
1536
  return {
1530
1537
  totalCount: filtered.length,
1538
+ ...excludedCatalogCount > 0 ? { excludedCatalogCount } : {},
1531
1539
  notes: filtered.slice(0, limit).map((n) => {
1532
1540
  const nbOrigin = notebookOriginOfItem(n);
1533
1541
  const resolvedNb = notebookOfItem(n);