mcp-scraper 0.4.14 → 0.6.0

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.
Files changed (33) hide show
  1. package/dist/bin/api-server.cjs +393 -29
  2. package/dist/bin/api-server.cjs.map +1 -1
  3. package/dist/bin/api-server.js +2 -2
  4. package/dist/bin/mcp-scraper-cli.cjs +1 -1
  5. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  6. package/dist/bin/mcp-scraper-cli.js +1 -1
  7. package/dist/bin/mcp-scraper-install.cjs +1 -1
  8. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  9. package/dist/bin/mcp-scraper-install.js +1 -1
  10. package/dist/bin/mcp-stdio-server.cjs +588 -11
  11. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  12. package/dist/bin/mcp-stdio-server.js +3 -2
  13. package/dist/bin/mcp-stdio-server.js.map +1 -1
  14. package/dist/{chunk-XZ2GPRCM.js → chunk-3K5GT6VG.js} +326 -12
  15. package/dist/chunk-3K5GT6VG.js.map +1 -0
  16. package/dist/{chunk-SIPXEFTR.js → chunk-APJO2XV5.js} +6 -6
  17. package/dist/chunk-APJO2XV5.js.map +1 -0
  18. package/dist/{chunk-VQV7MB2S.js → chunk-BL7BBSYF.js} +2 -2
  19. package/dist/chunk-F2BXETDX.js +7 -0
  20. package/dist/chunk-F2BXETDX.js.map +1 -0
  21. package/dist/{server-TGORO4AJ.js → server-WHM446IZ.js} +70 -18
  22. package/dist/server-WHM446IZ.js.map +1 -0
  23. package/dist/{site-extract-repository-6X2C7RLF.js → site-extract-repository-U476J44K.js} +3 -3
  24. package/dist/{worker-WCSKUAOT.js → worker-KJZ3ZN2N.js} +2 -2
  25. package/package.json +2 -2
  26. package/dist/chunk-OL65BO4S.js +0 -7
  27. package/dist/chunk-OL65BO4S.js.map +0 -1
  28. package/dist/chunk-SIPXEFTR.js.map +0 -1
  29. package/dist/chunk-XZ2GPRCM.js.map +0 -1
  30. package/dist/server-TGORO4AJ.js.map +0 -1
  31. /package/dist/{chunk-VQV7MB2S.js.map → chunk-BL7BBSYF.js.map} +0 -0
  32. /package/dist/{site-extract-repository-6X2C7RLF.js.map → site-extract-repository-U476J44K.js.map} +0 -0
  33. /package/dist/{worker-WCSKUAOT.js.map → worker-KJZ3ZN2N.js.map} +0 -0
@@ -8013,16 +8013,16 @@ var init_rates = __esm({
8013
8013
  browser_minute: 12e3,
8014
8014
  reddit_thread: 3e3,
8015
8015
  reddit_comment: 200,
8016
- video_analysis: 666667,
8016
+ video_analysis: 666700,
8017
8017
  trustpilot_reviews: 500,
8018
8018
  trustpilot_review: 100,
8019
8019
  g2_reviews: 500,
8020
- g2_review: 150,
8020
+ g2_review: 200,
8021
8021
  diff_page: 100
8022
8022
  };
8023
8023
  MC_PER_BROWSER_MS = MC_COSTS.browser_minute / 6e4;
8024
8024
  BROWSER_OPEN_MIN_BALANCE_MC = 1e3;
8025
- MC_PER_CREDIT = 1e3;
8025
+ MC_PER_CREDIT = 100;
8026
8026
  CREDIT_COST_CATALOG = [
8027
8027
  {
8028
8028
  key: "serp",
@@ -8242,8 +8242,8 @@ var init_rates = __esm({
8242
8242
  CONCURRENCY_PRICE_ID = "price_1Ta1NRS8aAcsk3TGwsRnYbix";
8243
8243
  SUBSCRIPTION_TIERS = {
8244
8244
  "price_1TmiHRS8aAcsk3TGwmSNfNIa": { tier: "starter", label: "Starter", price_id: "price_1TmiHRS8aAcsk3TGwmSNfNIa", monthly_usd: 12, credits_mc: 8e6, concurrency: 3, intro_coupon: "mcp-starter-1dollar-intro-12" },
8245
- "price_1Tmg1nS8aAcsk3TGe8zcnGTM": { tier: "growth", label: "Growth", price_id: "price_1Tmg1nS8aAcsk3TGe8zcnGTM", monthly_usd: 100, credits_mc: 8e7, concurrency: 10, intro_coupon: null },
8246
- "price_1Tmg1nS8aAcsk3TGsZw34iXS": { tier: "scale", label: "Scale", price_id: "price_1Tmg1nS8aAcsk3TGsZw34iXS", monthly_usd: 250, credits_mc: 24e7, concurrency: 20, intro_coupon: null }
8245
+ "price_1TrgihS8aAcsk3TG5cglrq4D": { tier: "growth", label: "Growth", price_id: "price_1TrgihS8aAcsk3TG5cglrq4D", monthly_usd: 40, credits_mc: 26666700, concurrency: 10, intro_coupon: null },
8246
+ "price_1TrgihS8aAcsk3TG4HnG4gbY": { tier: "scale", label: "Scale", price_id: "price_1TrgihS8aAcsk3TG4HnG4gbY", monthly_usd: 100, credits_mc: 8e7, concurrency: 20, intro_coupon: null }
8247
8247
  };
8248
8248
  SUBSCRIPTION_TIER_BY_KEY = Object.fromEntries(
8249
8249
  Object.values(SUBSCRIPTION_TIERS).map((t) => [t.tier, t])
@@ -17147,9 +17147,6 @@ async function memoryCall(toolName, args, userMemoryKey) {
17147
17147
  return { ok: false, error: err?.message ?? "memory call failed" };
17148
17148
  }
17149
17149
  }
17150
- function personalVault(user) {
17151
- return `mcp-${user.id}`;
17152
- }
17153
17150
  function memoryIdentity(user) {
17154
17151
  return user.email;
17155
17152
  }
@@ -20519,7 +20516,7 @@ function formatCreditsInfo(raw, input) {
20519
20516
  return `| ${c.label} | ${c.credits} | ${c.unit}${notes} |`;
20520
20517
  }).join("\n");
20521
20518
  const ledgerRows = ledger.map((row) => {
20522
- const credits = row.amount_mc / 1e3;
20519
+ const credits = row.amount_mc / MC_PER_CREDIT;
20523
20520
  return `| ${row.created_at} | ${row.operation} | ${credits} | ${row.description ?? ""} |`;
20524
20521
  }).join("\n");
20525
20522
  const matchedSection = matched ? `
@@ -20569,7 +20566,7 @@ ${ledgerRows}` : ""
20569
20566
  ledger: ledger.map((row) => ({
20570
20567
  createdAt: String(row.created_at ?? ""),
20571
20568
  operation: String(row.operation ?? ""),
20572
- credits: row.amount_mc / 1e3,
20569
+ credits: row.amount_mc / MC_PER_CREDIT,
20573
20570
  description: row.description ?? null
20574
20571
  })),
20575
20572
  concurrency: concurrencyRaw && upgradeRaw ? {
@@ -21368,6 +21365,7 @@ var init_mcp_response_formatter = __esm({
21368
21365
  init_seo_issues();
21369
21366
  init_image_audit();
21370
21367
  init_report_artifact_offload();
21368
+ init_rates();
21371
21369
  INLINE_BUDGET_BYTES = Number(process.env.MCP_SCRAPER_INLINE_BUDGET ?? 5e4);
21372
21370
  STRUCTURED_ARRAY_CAP = 25;
21373
21371
  reportSavingEnabled = true;
@@ -27202,7 +27200,7 @@ var init_serp_intelligence_routes = __esm({
27202
27200
  kernelApiKey: browserServiceApiKey(),
27203
27201
  kernelProxyId: browserServiceProxyId(),
27204
27202
  signal: c.req.raw.signal,
27205
- billing: { creditsUsed: cost / 1e3 }
27203
+ billing: { creditsUsed: cost / MC_PER_CREDIT }
27206
27204
  });
27207
27205
  await logRequestEvent({
27208
27206
  userId: user.id,
@@ -27304,7 +27302,7 @@ var PACKAGE_VERSION;
27304
27302
  var init_version = __esm({
27305
27303
  "src/version.ts"() {
27306
27304
  "use strict";
27307
- PACKAGE_VERSION = "0.4.14";
27305
+ PACKAGE_VERSION = "0.6.0";
27308
27306
  }
27309
27307
  });
27310
27308
 
@@ -27403,7 +27401,7 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
27403
27401
  read it back for full detail rather than expecting the whole payload inline.
27404
27402
 
27405
27403
  ## Memory
27406
- mcp-scraper also exposes 74 persistent per-user memory tools (notes, facts, vaults,
27404
+ mcp-scraper also exposes persistent per-user memory tools (notes, facts, vaults,
27407
27405
  scheduled actions, tables, channels) backed by memory.mcpscraper.dev. Every account starts with 13
27408
27406
  vaults \u2014 call **list-vaults** to see what exists before creating anything new. Pick the vault whose job
27409
27407
  matches the content: **Ideas** (unvalidated concepts), **Knowledge** (distilled lessons/how-tos),
@@ -27413,11 +27411,45 @@ matches the content: **Ideas** (unvalidated concepts), **Knowledge** (distilled
27413
27411
  **Improvement Log** (receipts of changes made and whether they worked), **Experiments** (hypothesis +
27414
27412
  measured result), **Sprint** (current cycle's scope), **Inspiration** (other people's work worth
27415
27413
  studying).
27416
- Before writing, call **memory-suggest** to check whether something's already captured and to find the
27417
- right vault's hub note to link. Use **memory-put** for narrative notes (prose, a title, a body); use
27414
+ For a normal new narrative note, call **prepare-memory-write** first. It queries the live vault contract,
27415
+ tag vocabulary, and natural neighbor vaults, and returns interlink candidates that must be read before
27416
+ acceptance. Compose every returned template section, then call **memory-capture**, which validates the
27417
+ note, registers canonical tags, writes it, and verifies readback. Reserve low-level **memory-put** for
27418
+ deliberate edits and migrations. Use
27418
27419
  **table-create**/**table-insert-rows**/**table-query** instead when the caller wants row-shaped data
27419
27420
  they'll filter/sort by exact value. **memory-search** is meaning-based over full content (embeds, slower);
27420
27421
  **memory-list** filters one vault by kind/tags (fast, exact).
27422
+
27423
+ Treat every memory create or update as a graph operation. **prepare-memory-write** supplies the initial
27424
+ shortlist; use **memory-search** when it is weak or the topic is broad, and **memory-get** to read the best
27425
+ candidates in full. Add only links supported by the notes: same-
27426
+ vault targets go in props.related and natural [[path]] body links; cross-vault targets go in
27427
+ props.related_vault_notes as Vault Name::relative/path.md. Prefer existing People/Projects/system
27428
+ hubs and fewer strong links. Do not trust a background linker to repair a weak write.
27429
+
27430
+ Use the target vault's template, not generic prose. Always set summary, specific reusable tags,
27431
+ source_type, source_ref, related, related_vault_notes, embed, embed_priority, and a valid
27432
+ status; include vault-specific props when relevant. Body patterns: Knowledge = Thesis / Explanation /
27433
+ Examples / Implications; Library = Source Identity / Preserved Material / Extraction Notes; People =
27434
+ Identity / Relationship / Known Context / Interaction History / Open Loops; Projects = Purpose / Current
27435
+ State / Architecture / Open Work / Decisions; Issues = Observation / Impact / Confirmation / Evidence /
27436
+ Resolution; Improvement Log = Improvement / Issue Link / Change Made / Verification / Result. Keep Tasks,
27437
+ Calendar, Communications, Ideas, Inspiration, Experiments, and Sprint aligned to their named purpose.
27438
+ Tags are live vocabulary, not improvised labels: **list-memory-tags** shows what exists and
27439
+ **resolve-memory-tags** returns reuse/create/omit. A new tag is justified only when the concept is central,
27440
+ reusable, and has no exact, alias, or near-equivalent. Use **memory-backlinks**,
27441
+ **memory-graph-universe**, and **memory-graph-path** to trace the linked universe across vaults.
27442
+
27443
+ Scrape deposits are raw evidence and therefore go to **Library** through **library-ingest**, with the full
27444
+ Library template and source metadata. If the source contains durable applicable guidance, create a separate
27445
+ Knowledge companion through prepare-memory-write + memory-capture and link it to the Library source with
27446
+ derived_from; do not replace the raw source with the guide.
27447
+
27448
+ For an update, call **memory-get** first and pass its revision as baseRevision. Preserve the existing
27449
+ title, source, capture time, content context, and props unless the request deliberately changes them.
27450
+ If a legacy backend does not return props, do not overwrite an existing linked note through that surface;
27451
+ report that link preservation cannot be proved. After the write, read it back and search a distinctive
27452
+ phrase to verify persistence and indexing.
27421
27453
  `.trim();
27422
27454
  }
27423
27455
  var SERVER_INSTRUCTIONS;
@@ -31077,7 +31109,7 @@ var init_browser_agent_mcp_server = __esm({
31077
31109
  });
31078
31110
 
31079
31111
  // src/mcp/memory-tool-schemas.ts
31080
- var import_zod35, AcceptShareSchema, ApproveSenderSchema, DeclineShareSchema, GetChatLinkSchema, InboxSettingsSchema, InviteAccountSchema, issueKeyTool_scopeShape, IssueKeySchema, ListApprovedSendersSchema, ListKeysSchema, NoteInboxSchema, RemoveApprovedSenderSchema, RevokeChatLinkSchema, RevokeKeySchema, RevokeShareSchema, SetAgentIdentitySchema, SetScopeSchema, ShareNoteSchema, ShareVaultSchema, SwapVaultSchema, SwitchAccountSchema, UnlinkShareSchema, MemoryQuestionsSchema, CreateChannelSchema, GetMessageNoteSchema, ListChannelMembersSchema, ListChannelMessagesSchema, MyMentionsSchema, PollChannelSchema, PostMessageSchema, ReactMessageSchema, RemoveChannelMemberSchema, ReplyMessageSchema, factHistoryTool_entryShape, FactHistorySchema, recordFactTool_factShape, RecordFactSchema, LibraryIngestSchema, DeleteNoteSchema, ExportSchema, GetSchema, ListSchema, notePropsSchema, PutSchema, SearchSchema, SuggestSchema, UploadSchema, TemporalRecallSchema, CreateScheduledActionSchema, DeleteScheduledActionSchema, GetScheduleLinkSchema, GetScheduleStatusSchema, ListScheduledActionsSchema, PauseScheduledActionSchema, ProposeScheduledActionSchema, ResumeScheduledActionSchema, RevokeScheduleLinkSchema, SetScheduleEntitlementSchema, CostUsageSchema, StorageUsageSchema, CreateTableSchema, deleteTableRowsTool_FilterSchema, DeleteTableRowsSchema, DescribeTableSchema, DropTableSchema, InsertTableRowsSchema, ListTablesSchema, queryTableTool_FilterSchema, QueryTableSchema, AddVaultSchema, CreateSecureVaultSchema, DeleteVaultSchema, ListSharedWithMeSchema, ListVaultsSchema, ProvisionDefaultsSchema, VideoAnalyzeStartSchema, VideoAnalyzeStatusSchema, CreateWebhookSchema, ListWebhooksSchema, RevokeWebhookSchema, MEMORY_TOOL_SCHEMAS;
31112
+ var import_zod35, AcceptShareSchema, ApproveSenderSchema, DeclineShareSchema, GetChatLinkSchema, InboxSettingsSchema, InviteAccountSchema, issueKeyTool_scopeShape, IssueKeySchema, ListApprovedSendersSchema, ListKeysSchema, NoteInboxSchema, RemoveApprovedSenderSchema, RevokeChatLinkSchema, RevokeKeySchema, RevokeShareSchema, SetAgentIdentitySchema, SetScopeSchema, ShareNoteSchema, ShareVaultSchema, SwapVaultSchema, SwitchAccountSchema, UnlinkShareSchema, memoryCaptureTool_notePropsSchema, MemoryCaptureSchema, MemoryQuestionsSchema, PrepareMemoryWriteSchema, validateMemoryWriteTool_notePropsSchema, ValidateMemoryWriteSchema, CreateChannelSchema, GetMessageNoteSchema, ListChannelMembersSchema, ListChannelMessagesSchema, MyMentionsSchema, PollChannelSchema, PostMessageSchema, ReactMessageSchema, RemoveChannelMemberSchema, ReplyMessageSchema, factHistoryTool_entryShape, FactHistorySchema, recordFactTool_factShape, RecordFactSchema, NoteBacklinksSchema, GraphPathSchema, GraphUniverseSchema, LibraryIngestSchema, DeleteNoteSchema, ExportSchema, getTool_notePropsSchema, GetSchema, ListSchema, putTool_notePropsSchema, PutSchema, SearchSchema, SuggestSchema, UploadSchema, TemporalRecallSchema, CreateScheduledActionSchema, DeleteScheduledActionSchema, GetScheduleLinkSchema, GetScheduleStatusSchema, ListScheduledActionsSchema, PauseScheduledActionSchema, ProposeScheduledActionSchema, ResumeScheduledActionSchema, RevokeScheduleLinkSchema, SetScheduleEntitlementSchema, CostUsageSchema, StorageUsageSchema, CreateTableSchema, deleteTableRowsTool_FilterSchema, DeleteTableRowsSchema, DescribeTableSchema, DropTableSchema, InsertTableRowsSchema, ListTablesSchema, queryTableTool_FilterSchema, QueryTableSchema, ListTagsSchema, ResolveTagsSchema, UpsertTagSchema, AddVaultSchema, CreateSecureVaultSchema, DeleteVaultSchema, GetVaultContractSchema, ListSharedWithMeSchema, ListVaultsSchema, ProvisionDefaultsSchema, RouteMemorySchema, VideoAnalyzeStartSchema, VideoAnalyzeStatusSchema, CreateWebhookSchema, ListWebhooksSchema, RevokeWebhookSchema, MEMORY_TOOL_SCHEMAS;
31081
31113
  var init_memory_tool_schemas = __esm({
31082
31114
  "src/mcp/memory-tool-schemas.ts"() {
31083
31115
  "use strict";
@@ -31586,6 +31618,52 @@ var init_memory_tool_schemas = __esm({
31586
31618
  openWorldHint: false
31587
31619
  }
31588
31620
  };
31621
+ memoryCaptureTool_notePropsSchema = import_zod35.z.object({
31622
+ status: import_zod35.z.string().describe("Status enum value from the target vault contract."),
31623
+ summary: import_zod35.z.string().describe("Short retrieval-ready description."),
31624
+ tags: import_zod35.z.array(import_zod35.z.string()).describe("AI-generated keyword tags, not vault names."),
31625
+ pinned: import_zod35.z.boolean().describe("Recall boost for important notes."),
31626
+ source_type: import_zod35.z.string().describe("Attribution kind: user, person, url, file, channel, thread, or note."),
31627
+ source_ref: import_zod35.z.string().describe("Attribution reference (URL, path, channel, thread, or source note)."),
31628
+ related: import_zod35.z.array(import_zod35.z.string()).describe("Same-vault links (wiki [[ ]] targets)."),
31629
+ related_vault_notes: import_zod35.z.array(import_zod35.z.string()).describe('Cross-vault references in "Vault Name::relative/path.md" form.'),
31630
+ embed: import_zod35.z.boolean().describe("Whether Smart RAG should index the note."),
31631
+ embed_priority: import_zod35.z.enum(["low", "normal", "high"]).describe("Embedding priority."),
31632
+ embedding_summary: import_zod35.z.string().describe("Optional retrieval-specific summary."),
31633
+ type: import_zod35.z.string().describe("Note type from the target vault contract (also used to route the note)."),
31634
+ domain: import_zod35.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
31635
+ folder: import_zod35.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
31636
+ parentMessageId: import_zod35.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
31637
+ }).partial().passthrough();
31638
+ MemoryCaptureSchema = {
31639
+ id: "memory-capture",
31640
+ upstreamName: "memoryCaptureTool",
31641
+ description: "Strict normal-create path for durable memory. Refuses incomplete notes, writes through memory-put, registers canonical tags, and reads the note back to verify persisted content and props. Call prepare-memory-write first. Reserve memory-put for low-level migrations or deliberate edits.",
31642
+ input: {
31643
+ vault: import_zod35.z.string(),
31644
+ folder: import_zod35.z.string().optional(),
31645
+ path: import_zod35.z.string().min(1),
31646
+ title: import_zod35.z.string().min(1),
31647
+ content: import_zod35.z.string().min(1),
31648
+ props: memoryCaptureTool_notePropsSchema,
31649
+ baseRevision: import_zod35.z.number().optional(),
31650
+ tagDecisions: import_zod35.z.array(import_zod35.z.object({ tag: import_zod35.z.string().min(1), central: import_zod35.z.boolean(), reusable: import_zod35.z.boolean(), description: import_zod35.z.string().optional() })).max(8).optional().describe("Required justification for any tag that does not already exist. Existing exact/alias/near tags are canonicalized automatically; a new tag is accepted only when its matching decision has central=true and reusable=true.")
31651
+ },
31652
+ output: {
31653
+ ok: import_zod35.z.boolean(),
31654
+ valid: import_zod35.z.boolean().optional(),
31655
+ errors: import_zod35.z.array(import_zod35.z.string()).optional(),
31656
+ warnings: import_zod35.z.array(import_zod35.z.string()).optional(),
31657
+ tagResolutions: import_zod35.z.array(import_zod35.z.object({ candidate: import_zod35.z.string(), action: import_zod35.z.enum(["reuse", "create", "omit"]), tag: import_zod35.z.string().optional(), reason: import_zod35.z.string() })).optional(),
31658
+ note: import_zod35.z.object({ path: import_zod35.z.string(), title: import_zod35.z.string(), updatedAt: import_zod35.z.string(), revision: import_zod35.z.number() }).optional(),
31659
+ indexed: import_zod35.z.number().optional(),
31660
+ verified: import_zod35.z.object({ contentBytes: import_zod35.z.number(), propsPersisted: import_zod35.z.boolean(), revision: import_zod35.z.number() }).optional(),
31661
+ conflict: import_zod35.z.boolean().optional(),
31662
+ code: import_zod35.z.string().optional(),
31663
+ error: import_zod35.z.string().optional()
31664
+ },
31665
+ annotations: { title: "Capture Governed Memory", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
31666
+ };
31589
31667
  MemoryQuestionsSchema = {
31590
31668
  id: "memory-questions",
31591
31669
  upstreamName: "memoryQuestionsTool",
@@ -31615,6 +31693,67 @@ var init_memory_tool_schemas = __esm({
31615
31693
  openWorldHint: true
31616
31694
  }
31617
31695
  };
31696
+ PrepareMemoryWriteSchema = {
31697
+ id: "prepare-memory-write",
31698
+ upstreamName: "prepareMemoryWriteTool",
31699
+ description: "Mandatory planning pass for a normal new memory. Routes the note, returns the live template and natural vault relationships, resolves proposed tags against the registry, and shortlists interlink opportunities that must be read/reviewed before capture.",
31700
+ input: {
31701
+ title: import_zod35.z.string().min(1),
31702
+ content: import_zod35.z.string().min(1),
31703
+ source: import_zod35.z.string().optional(),
31704
+ type: import_zod35.z.string().optional(),
31705
+ vault: import_zod35.z.string().optional(),
31706
+ tagCandidates: import_zod35.z.array(import_zod35.z.object({ tag: import_zod35.z.string().min(1), central: import_zod35.z.boolean().optional(), reusable: import_zod35.z.boolean().optional(), description: import_zod35.z.string().optional() })).max(20).optional(),
31707
+ maxLinks: import_zod35.z.number().int().min(1).max(20).optional()
31708
+ },
31709
+ output: {
31710
+ ok: import_zod35.z.boolean(),
31711
+ route: import_zod35.z.record(import_zod35.z.unknown()).optional(),
31712
+ contract: import_zod35.z.record(import_zod35.z.unknown()).optional(),
31713
+ tagResolutions: import_zod35.z.array(import_zod35.z.record(import_zod35.z.unknown())).optional(),
31714
+ linkOpportunities: import_zod35.z.array(import_zod35.z.record(import_zod35.z.unknown())).optional(),
31715
+ instructions: import_zod35.z.array(import_zod35.z.string()).optional(),
31716
+ error: import_zod35.z.string().optional()
31717
+ },
31718
+ annotations: { title: "Prepare Memory Write", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
31719
+ };
31720
+ validateMemoryWriteTool_notePropsSchema = import_zod35.z.object({
31721
+ status: import_zod35.z.string().describe("Status enum value from the target vault contract."),
31722
+ summary: import_zod35.z.string().describe("Short retrieval-ready description."),
31723
+ tags: import_zod35.z.array(import_zod35.z.string()).describe("AI-generated keyword tags, not vault names."),
31724
+ pinned: import_zod35.z.boolean().describe("Recall boost for important notes."),
31725
+ source_type: import_zod35.z.string().describe("Attribution kind: user, person, url, file, channel, thread, or note."),
31726
+ source_ref: import_zod35.z.string().describe("Attribution reference (URL, path, channel, thread, or source note)."),
31727
+ related: import_zod35.z.array(import_zod35.z.string()).describe("Same-vault links (wiki [[ ]] targets)."),
31728
+ related_vault_notes: import_zod35.z.array(import_zod35.z.string()).describe('Cross-vault references in "Vault Name::relative/path.md" form.'),
31729
+ embed: import_zod35.z.boolean().describe("Whether Smart RAG should index the note."),
31730
+ embed_priority: import_zod35.z.enum(["low", "normal", "high"]).describe("Embedding priority."),
31731
+ embedding_summary: import_zod35.z.string().describe("Optional retrieval-specific summary."),
31732
+ type: import_zod35.z.string().describe("Note type from the target vault contract (also used to route the note)."),
31733
+ domain: import_zod35.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
31734
+ folder: import_zod35.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
31735
+ parentMessageId: import_zod35.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
31736
+ }).partial().passthrough();
31737
+ ValidateMemoryWriteSchema = {
31738
+ id: "validate-memory-write",
31739
+ upstreamName: "validateMemoryWriteTool",
31740
+ description: "Validate a proposed governed note without writing it. Checks template completeness, vault status/type, canonical tag count, attribution, Obsidian link primitives, and retrieval metadata.",
31741
+ input: {
31742
+ vault: import_zod35.z.string(),
31743
+ title: import_zod35.z.string(),
31744
+ content: import_zod35.z.string(),
31745
+ props: validateMemoryWriteTool_notePropsSchema
31746
+ },
31747
+ output: {
31748
+ ok: import_zod35.z.boolean(),
31749
+ valid: import_zod35.z.boolean().optional(),
31750
+ errors: import_zod35.z.array(import_zod35.z.string()).optional(),
31751
+ warnings: import_zod35.z.array(import_zod35.z.string()).optional(),
31752
+ normalizedTags: import_zod35.z.array(import_zod35.z.string()).optional(),
31753
+ error: import_zod35.z.string().optional()
31754
+ },
31755
+ annotations: { title: "Validate Memory Write", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
31756
+ };
31618
31757
  CreateChannelSchema = {
31619
31758
  id: "create-channel",
31620
31759
  upstreamName: "createChannelTool",
@@ -31955,18 +32094,78 @@ var init_memory_tool_schemas = __esm({
31955
32094
  openWorldHint: false
31956
32095
  }
31957
32096
  };
32097
+ NoteBacklinksSchema = {
32098
+ id: "memory-backlinks",
32099
+ upstreamName: "noteBacklinksTool",
32100
+ description: "Return every resolved incoming link to a note across all accessible vaults, including typed metadata links and Obsidian wiki links.",
32101
+ input: {
32102
+ note: import_zod35.z.string().min(1),
32103
+ vault: import_zod35.z.string().optional()
32104
+ },
32105
+ output: {
32106
+ ok: import_zod35.z.boolean(),
32107
+ nodes: import_zod35.z.array(import_zod35.z.object({ id: import_zod35.z.string(), vault: import_zod35.z.string(), path: import_zod35.z.string(), title: import_zod35.z.string(), resolved: import_zod35.z.boolean() })).optional(),
32108
+ edges: import_zod35.z.array(import_zod35.z.object({ source: import_zod35.z.string(), target: import_zod35.z.string(), type: import_zod35.z.string(), evidence: import_zod35.z.string(), sourceField: import_zod35.z.string(), resolved: import_zod35.z.boolean() })).optional(),
32109
+ error: import_zod35.z.string().optional()
32110
+ },
32111
+ annotations: { title: "Memory Backlinks", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
32112
+ };
32113
+ GraphPathSchema = {
32114
+ id: "memory-graph-path",
32115
+ upstreamName: "graphPathTool",
32116
+ description: "Find the shortest navigable connection between two memory notes across vault boundaries. Returns an empty graph when no path exists within maxDepth.",
32117
+ input: {
32118
+ from: import_zod35.z.string().min(1),
32119
+ to: import_zod35.z.string().min(1),
32120
+ fromVault: import_zod35.z.string().optional(),
32121
+ toVault: import_zod35.z.string().optional(),
32122
+ maxDepth: import_zod35.z.number().int().min(1).max(12).optional()
32123
+ },
32124
+ output: {
32125
+ ok: import_zod35.z.boolean(),
32126
+ nodes: import_zod35.z.array(import_zod35.z.object({ id: import_zod35.z.string(), vault: import_zod35.z.string(), path: import_zod35.z.string(), title: import_zod35.z.string(), resolved: import_zod35.z.boolean() })).optional(),
32127
+ edges: import_zod35.z.array(import_zod35.z.object({ source: import_zod35.z.string(), target: import_zod35.z.string(), type: import_zod35.z.string(), evidence: import_zod35.z.string(), sourceField: import_zod35.z.string(), resolved: import_zod35.z.boolean() })).optional(),
32128
+ error: import_zod35.z.string().optional()
32129
+ },
32130
+ annotations: { title: "Memory Graph Path", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
32131
+ };
32132
+ GraphUniverseSchema = {
32133
+ id: "memory-graph-universe",
32134
+ upstreamName: "graphUniverseTool",
32135
+ description: "Traverse the interlinked memory universe around one note in every direction, like an Obsidian local graph. Returns nodes and typed edges to a bounded depth.",
32136
+ input: {
32137
+ note: import_zod35.z.string().min(1),
32138
+ vault: import_zod35.z.string().optional(),
32139
+ depth: import_zod35.z.number().int().min(0).max(6).optional(),
32140
+ maxNodes: import_zod35.z.number().int().min(1).max(500).optional()
32141
+ },
32142
+ output: {
32143
+ ok: import_zod35.z.boolean(),
32144
+ root: import_zod35.z.string().optional(),
32145
+ depth: import_zod35.z.number().optional(),
32146
+ truncated: import_zod35.z.boolean().optional(),
32147
+ nodes: import_zod35.z.array(import_zod35.z.object({ id: import_zod35.z.string(), vault: import_zod35.z.string(), path: import_zod35.z.string(), title: import_zod35.z.string(), resolved: import_zod35.z.boolean() })).optional(),
32148
+ edges: import_zod35.z.array(import_zod35.z.object({ source: import_zod35.z.string(), target: import_zod35.z.string(), type: import_zod35.z.string(), evidence: import_zod35.z.string(), sourceField: import_zod35.z.string(), resolved: import_zod35.z.boolean() })).optional(),
32149
+ error: import_zod35.z.string().optional()
32150
+ },
32151
+ annotations: { title: "Memory Graph Universe", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
32152
+ };
31958
32153
  LibraryIngestSchema = {
31959
32154
  id: "library-ingest",
31960
32155
  upstreamName: "libraryIngestTool",
31961
32156
  description: "Deposit a scrape, transcript, or generated output into the tenant Library vault for later semantic recall. Content is embedded for per-tenant search and best-effort mirrored to a local vault when configured. Requires write scope on the target vault.",
31962
32157
  input: {
31963
32158
  vault: import_zod35.z.string().optional().describe(
31964
- 'Vault to deposit into. Optional; defaults to the session active vault, then the first entitled vault, then "Library".'
32159
+ "Vault to deposit into. Optional and normally omitted: raw scrapes always default to Library. Override only for a deliberate nonstandard migration."
31965
32160
  ),
31966
32161
  title: import_zod35.z.string().min(1).describe("Short human-readable title for the item; used to build the stored path. Must be non-empty."),
31967
32162
  content: import_zod35.z.string().min(1).describe("The full captured text (scrape/transcript/output) to store and index. Must be non-empty."),
31968
32163
  source: import_zod35.z.string().min(1).describe("Provenance of the content, e.g. a URL or tool name. Must be non-empty."),
31969
32164
  capturedAt: import_zod35.z.string().optional().describe("ISO-8601 capture timestamp. Optional; defaults to now. Also seeds the deterministic storage path."),
32165
+ summary: import_zod35.z.string().optional().describe("Retrieval-ready source summary. Optional; a provenance summary is generated when omitted."),
32166
+ tags: import_zod35.z.array(import_zod35.z.string()).max(8).optional().describe("Reviewed canonical tags. Existing tags should be resolved first; when omitted, deterministic source/topic tags are generated."),
32167
+ related: import_zod35.z.array(import_zod35.z.string()).optional().describe("Reviewed same-vault Library note paths."),
32168
+ relatedVaultNotes: import_zod35.z.array(import_zod35.z.string()).optional().describe("Reviewed cross-vault references in Vault::path.md form."),
31970
32169
  localVaultPath: import_zod35.z.string().optional().describe("Filesystem root to also mirror the item to. Optional; falls back to MEMORY_LOCAL_VAULT_ROOT env when set.")
31971
32170
  },
31972
32171
  output: {
@@ -31976,6 +32175,7 @@ var init_memory_tool_schemas = __esm({
31976
32175
  path: import_zod35.z.string().optional().describe("Vault-relative path the item was stored at (under library/...)."),
31977
32176
  indexed: import_zod35.z.number().optional().describe("Number of search chunks indexed (0 if embedding failed but the note still saved)."),
31978
32177
  dualWritten: import_zod35.z.boolean().optional().describe("True if the item was also mirrored to the local filesystem vault."),
32178
+ nextStep: import_zod35.z.string().optional().describe("Recommended extraction action after the raw Library source is safe."),
31979
32179
  code: import_zod35.z.string().optional().describe("Machine-readable denial code when ok is false: quota_exceeded or free_cost_cap."),
31980
32180
  error: import_zod35.z.string().optional().describe("Human-readable failure reason when ok is false.")
31981
32181
  },
@@ -32053,10 +32253,27 @@ var init_memory_tool_schemas = __esm({
32053
32253
  openWorldHint: false
32054
32254
  }
32055
32255
  };
32256
+ getTool_notePropsSchema = import_zod35.z.object({
32257
+ status: import_zod35.z.string().describe("Status enum value from the target vault contract."),
32258
+ summary: import_zod35.z.string().describe("Short retrieval-ready description."),
32259
+ tags: import_zod35.z.array(import_zod35.z.string()).describe("AI-generated keyword tags, not vault names."),
32260
+ pinned: import_zod35.z.boolean().describe("Recall boost for important notes."),
32261
+ source_type: import_zod35.z.string().describe("Attribution kind: user, person, url, file, channel, thread, or note."),
32262
+ source_ref: import_zod35.z.string().describe("Attribution reference (URL, path, channel, thread, or source note)."),
32263
+ related: import_zod35.z.array(import_zod35.z.string()).describe("Same-vault links (wiki [[ ]] targets)."),
32264
+ related_vault_notes: import_zod35.z.array(import_zod35.z.string()).describe('Cross-vault references in "Vault Name::relative/path.md" form.'),
32265
+ embed: import_zod35.z.boolean().describe("Whether Smart RAG should index the note."),
32266
+ embed_priority: import_zod35.z.enum(["low", "normal", "high"]).describe("Embedding priority."),
32267
+ embedding_summary: import_zod35.z.string().describe("Optional retrieval-specific summary."),
32268
+ type: import_zod35.z.string().describe("Note type from the target vault contract (also used to route the note)."),
32269
+ domain: import_zod35.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
32270
+ folder: import_zod35.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
32271
+ parentMessageId: import_zod35.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
32272
+ }).partial().passthrough();
32056
32273
  GetSchema = {
32057
32274
  id: "memory-get",
32058
32275
  upstreamName: "getTool",
32059
- description: "Read a single note from a vault by its exact path, or by shareId for a note shared with you and accepted. Returns a revision number \u2014 pass it as baseRevision on a later memory-put/delete-note to detect a concurrent edit instead of silently overwriting it. Requires read scope.",
32276
+ description: "Read a single note from a vault by its exact path, or by shareId for a note shared with you and accepted. Owned notes include their stored Obsidian props so edits can preserve links and template metadata. Returns a revision number \u2014 pass it as baseRevision on a later memory-put/delete-note to detect a concurrent edit instead of silently overwriting it. Requires read scope.",
32060
32277
  input: {
32061
32278
  vault: import_zod35.z.string().optional().describe(
32062
32279
  "Vault to read from. Optional; defaults to the session active vault, then the first vault the caller is entitled to. Ignored when shareId is given."
@@ -32076,6 +32293,7 @@ var init_memory_tool_schemas = __esm({
32076
32293
  capturedAt: import_zod35.z.string().describe("ISO-8601 timestamp of when the note was first captured."),
32077
32294
  revision: import_zod35.z.number().describe("Current revision number. Pass this as baseRevision when editing, so a concurrent edit by someone else is detected instead of silently overwritten."),
32078
32295
  updatedBy: import_zod35.z.string().nullable().describe("Identity that made the last write, if known."),
32296
+ props: getTool_notePropsSchema.optional().describe("Stored Obsidian metadata for an owned note, including links and vault-specific template fields. Omitted for secure or individually shared notes."),
32079
32297
  sharedBy: import_zod35.z.string().optional().describe("Present only when read via shareId: the identity who owns and shared this note."),
32080
32298
  othersEditing: import_zod35.z.array(import_zod35.z.string()).optional().describe("Advisory only, not a lock: identities who read this same note within the last ~2 minutes and may be about to edit it. Worth a heads-up to the human before you write; the real safety net is still baseRevision on the write itself.")
32081
32299
  }).optional().describe("The full note. Present when ok is true."),
@@ -32123,7 +32341,7 @@ var init_memory_tool_schemas = __esm({
32123
32341
  openWorldHint: false
32124
32342
  }
32125
32343
  };
32126
- notePropsSchema = import_zod35.z.object({
32344
+ putTool_notePropsSchema = import_zod35.z.object({
32127
32345
  status: import_zod35.z.string().describe("Status enum value from the target vault contract."),
32128
32346
  summary: import_zod35.z.string().describe("Short retrieval-ready description."),
32129
32347
  tags: import_zod35.z.array(import_zod35.z.string()).describe("AI-generated keyword tags, not vault names."),
@@ -32139,7 +32357,7 @@ var init_memory_tool_schemas = __esm({
32139
32357
  domain: import_zod35.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
32140
32358
  folder: import_zod35.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
32141
32359
  parentMessageId: import_zod35.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
32142
- }).partial();
32360
+ }).partial().passthrough();
32143
32361
  PutSchema = {
32144
32362
  id: "memory-put",
32145
32363
  upstreamName: "putTool",
@@ -32152,7 +32370,7 @@ var init_memory_tool_schemas = __esm({
32152
32370
  shareId: import_zod35.z.string().optional().describe("Edit a note someone individually shared with you and you accepted (accept-share), by its shareId, instead of vault+path. Requires the share to grant edit permission, and baseRevision is mandatory (get the current revision first) since you are editing alongside the owner and possibly others."),
32153
32371
  title: import_zod35.z.string().optional().describe("Optional human-readable title; defaults are derived from the path when omitted."),
32154
32372
  content: import_zod35.z.string().min(1).describe("The full note body to store and index for semantic search. Must be non-empty."),
32155
- props: notePropsSchema.optional().describe("Obsidian note primitives (status, summary, tags, pinned, source_type, source_ref, related, related_vault_notes, embed, embed_priority, type, domain, folder). Stored on the note so it round-trips the vault shape; type/domain/folder also steer routing when no vault is given."),
32373
+ props: putTool_notePropsSchema.optional().describe("Obsidian note primitives plus vault-specific template fields. On edits, supplied fields patch the stored props instead of replacing the whole object; pass an empty array to deliberately clear a link list. Type/domain/folder also steer routing when no vault is given."),
32156
32374
  baseRevision: import_zod35.z.number().optional().describe("Revision the edit is based on (from a prior get/put). When provided, the write only applies if the note is still at this revision; otherwise it is rejected as a conflict instead of silently overwriting a concurrent edit. Omit for last-write-wins (fine for solo notes).")
32157
32375
  },
32158
32376
  output: {
@@ -32766,6 +32984,51 @@ var init_memory_tool_schemas = __esm({
32766
32984
  openWorldHint: false
32767
32985
  }
32768
32986
  };
32987
+ ListTagsSchema = {
32988
+ id: "list-memory-tags",
32989
+ upstreamName: "listTagsTool",
32990
+ description: "List the live canonical tag vocabulary, aliases, usage counts, and per-vault distribution. Use this before choosing tags so existing concepts are reused instead of fragmented.",
32991
+ input: {
32992
+ includeDeprecated: import_zod35.z.boolean().optional()
32993
+ },
32994
+ output: {
32995
+ ok: import_zod35.z.boolean(),
32996
+ tags: import_zod35.z.array(import_zod35.z.object({ tag: import_zod35.z.string(), description: import_zod35.z.string().nullable(), aliases: import_zod35.z.array(import_zod35.z.string()), status: import_zod35.z.enum(["active", "deprecated"]), usageCount: import_zod35.z.number(), vaultUsage: import_zod35.z.record(import_zod35.z.number()) })).optional(),
32997
+ error: import_zod35.z.string().optional()
32998
+ },
32999
+ annotations: { title: "List Memory Tags", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
33000
+ };
33001
+ ResolveTagsSchema = {
33002
+ id: "resolve-memory-tags",
33003
+ upstreamName: "resolveTagsTool",
33004
+ description: "Resolve proposed concepts against the live tag vocabulary. Returns reuse, create, or omit. A new tag is allowed only when no equivalent exists and the caller marks the concept central and reusable.",
33005
+ input: {
33006
+ candidates: import_zod35.z.array(import_zod35.z.object({ tag: import_zod35.z.string().min(1), central: import_zod35.z.boolean().optional(), reusable: import_zod35.z.boolean().optional(), description: import_zod35.z.string().optional() })).min(1).max(20)
33007
+ },
33008
+ output: {
33009
+ ok: import_zod35.z.boolean(),
33010
+ resolutions: import_zod35.z.array(import_zod35.z.object({ candidate: import_zod35.z.string(), normalized: import_zod35.z.string(), action: import_zod35.z.enum(["reuse", "create", "omit"]), tag: import_zod35.z.string().optional(), matchedBy: import_zod35.z.enum(["exact", "alias", "near"]).optional(), score: import_zod35.z.number().optional(), reason: import_zod35.z.string() })).optional(),
33011
+ error: import_zod35.z.string().optional()
33012
+ },
33013
+ annotations: { title: "Resolve Memory Tags", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
33014
+ };
33015
+ UpsertTagSchema = {
33016
+ id: "upsert-memory-tag",
33017
+ upstreamName: "upsertTagTool",
33018
+ description: "Define or curate one canonical tag, its meaning, aliases, and lifecycle. Use only after resolve-memory-tags returns create, or to merge/deprecate vocabulary intentionally. Requires write scope.",
33019
+ input: {
33020
+ tag: import_zod35.z.string().min(1),
33021
+ description: import_zod35.z.string().optional(),
33022
+ aliases: import_zod35.z.array(import_zod35.z.string()).optional(),
33023
+ status: import_zod35.z.enum(["active", "deprecated"]).optional()
33024
+ },
33025
+ output: {
33026
+ ok: import_zod35.z.boolean(),
33027
+ tag: import_zod35.z.object({ tag: import_zod35.z.string(), description: import_zod35.z.string().nullable(), aliases: import_zod35.z.array(import_zod35.z.string()), status: import_zod35.z.enum(["active", "deprecated"]) }).optional(),
33028
+ error: import_zod35.z.string().optional()
33029
+ },
33030
+ annotations: { title: "Upsert Memory Tag", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }
33031
+ };
32769
33032
  AddVaultSchema = {
32770
33033
  id: "add-vault",
32771
33034
  upstreamName: "addVaultTool",
@@ -32833,6 +33096,21 @@ var init_memory_tool_schemas = __esm({
32833
33096
  openWorldHint: false
32834
33097
  }
32835
33098
  };
33099
+ GetVaultContractSchema = {
33100
+ id: "get-vault-contract",
33101
+ upstreamName: "getVaultContractTool",
33102
+ description: "Read the machine-enforced purpose, template, statuses, types, natural neighbor vaults, and typed relationship guidance for one of the 13 governed Obsidian-style vaults. Call before composing a note when the correct shape is uncertain.",
33103
+ input: {
33104
+ vault: import_zod35.z.string().describe("One governed vault: Ideas, Inspiration, Knowledge, Library, People, Communications, Calendar, Tasks, Projects, Issues, Improvement Log, Experiments, or Sprint.")
33105
+ },
33106
+ output: {
33107
+ ok: import_zod35.z.boolean(),
33108
+ vault: import_zod35.z.string().optional(),
33109
+ contract: import_zod35.z.record(import_zod35.z.unknown()).optional(),
33110
+ error: import_zod35.z.string().optional()
33111
+ },
33112
+ annotations: { title: "Get Vault Contract", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
33113
+ };
32836
33114
  ListSharedWithMeSchema = {
32837
33115
  id: "list-shared-with-me",
32838
33116
  upstreamName: "listSharedWithMeTool",
@@ -32917,6 +33195,26 @@ var init_memory_tool_schemas = __esm({
32917
33195
  openWorldHint: false
32918
33196
  }
32919
33197
  };
33198
+ RouteMemorySchema = {
33199
+ id: "route-memory",
33200
+ upstreamName: "routeMemoryTool",
33201
+ description: "Choose the correct governed vault and folder from content intent. Raw scraped/source material routes to Library; distilled applicable guidance routes to Knowledge. Returns the live vault contract so the result does not depend on prompt memory.",
33202
+ input: {
33203
+ title: import_zod35.z.string().min(1),
33204
+ content: import_zod35.z.string().min(1),
33205
+ type: import_zod35.z.string().optional(),
33206
+ source: import_zod35.z.string().optional()
33207
+ },
33208
+ output: {
33209
+ ok: import_zod35.z.boolean(),
33210
+ vault: import_zod35.z.string().optional(),
33211
+ folder: import_zod35.z.string().optional(),
33212
+ reason: import_zod35.z.string().optional(),
33213
+ contract: import_zod35.z.record(import_zod35.z.unknown()).optional(),
33214
+ error: import_zod35.z.string().optional()
33215
+ },
33216
+ annotations: { title: "Route Memory", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
33217
+ };
32920
33218
  VideoAnalyzeStartSchema = {
32921
33219
  id: "video-analyze-start",
32922
33220
  upstreamName: "videoAnalyzeStartTool",
@@ -33039,7 +33337,10 @@ var init_memory_tool_schemas = __esm({
33039
33337
  SwapVaultSchema,
33040
33338
  SwitchAccountSchema,
33041
33339
  UnlinkShareSchema,
33340
+ MemoryCaptureSchema,
33042
33341
  MemoryQuestionsSchema,
33342
+ PrepareMemoryWriteSchema,
33343
+ ValidateMemoryWriteSchema,
33043
33344
  CreateChannelSchema,
33044
33345
  GetMessageNoteSchema,
33045
33346
  ListChannelMembersSchema,
@@ -33052,6 +33353,9 @@ var init_memory_tool_schemas = __esm({
33052
33353
  ReplyMessageSchema,
33053
33354
  FactHistorySchema,
33054
33355
  RecordFactSchema,
33356
+ NoteBacklinksSchema,
33357
+ GraphPathSchema,
33358
+ GraphUniverseSchema,
33055
33359
  LibraryIngestSchema,
33056
33360
  DeleteNoteSchema,
33057
33361
  ExportSchema,
@@ -33081,12 +33385,17 @@ var init_memory_tool_schemas = __esm({
33081
33385
  InsertTableRowsSchema,
33082
33386
  ListTablesSchema,
33083
33387
  QueryTableSchema,
33388
+ ListTagsSchema,
33389
+ ResolveTagsSchema,
33390
+ UpsertTagSchema,
33084
33391
  AddVaultSchema,
33085
33392
  CreateSecureVaultSchema,
33086
33393
  DeleteVaultSchema,
33394
+ GetVaultContractSchema,
33087
33395
  ListSharedWithMeSchema,
33088
33396
  ListVaultsSchema,
33089
33397
  ProvisionDefaultsSchema,
33398
+ RouteMemorySchema,
33090
33399
  VideoAnalyzeStartSchema,
33091
33400
  VideoAnalyzeStatusSchema,
33092
33401
  CreateWebhookSchema,
@@ -33294,8 +33603,44 @@ function registerReadCutovers() {
33294
33603
  const result = await import_list_webhooks.listWebhooksTool.execute({ ...input, apiKey }, {});
33295
33604
  return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33296
33605
  });
33606
+ registerCutover("getVaultContractTool", async (input, apiKey) => {
33607
+ const result = await import_get_vault_contract.getVaultContractTool.execute({ ...input, apiKey }, {});
33608
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33609
+ });
33610
+ registerCutover("routeMemoryTool", async (input, apiKey) => {
33611
+ const result = await import_route_memory.routeMemoryTool.execute({ ...input, apiKey }, {});
33612
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33613
+ });
33614
+ registerCutover("listTagsTool", async (input, apiKey) => {
33615
+ const result = await import_list_tags.listTagsTool.execute({ ...input, apiKey }, {});
33616
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33617
+ });
33618
+ registerCutover("resolveTagsTool", async (input, apiKey) => {
33619
+ const result = await import_resolve_tags.resolveTagsTool.execute({ ...input, apiKey }, {});
33620
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33621
+ });
33622
+ registerCutover("noteBacklinksTool", async (input, apiKey) => {
33623
+ const result = await import_memory_backlinks.noteBacklinksTool.execute({ ...input, apiKey }, {});
33624
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33625
+ });
33626
+ registerCutover("graphUniverseTool", async (input, apiKey) => {
33627
+ const result = await import_memory_graph_universe.graphUniverseTool.execute({ ...input, apiKey }, {});
33628
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33629
+ });
33630
+ registerCutover("graphPathTool", async (input, apiKey) => {
33631
+ const result = await import_memory_graph_path.graphPathTool.execute({ ...input, apiKey }, {});
33632
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33633
+ });
33634
+ registerCutover("prepareMemoryWriteTool", async (input, apiKey) => {
33635
+ const result = await import_prepare_memory_write.prepareMemoryWriteTool.execute({ ...input, apiKey }, {});
33636
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33637
+ });
33638
+ registerCutover("validateMemoryWriteTool", async (input, apiKey) => {
33639
+ const result = await import_validate_memory_write.validateMemoryWriteTool.execute({ ...input, apiKey }, {});
33640
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33641
+ });
33297
33642
  }
33298
- var import_list_approved_senders, import_note_inbox, import_get_message_note, import_list_channel_members, import_my_mentions, import_fact_history, import_export2, import_get, import_list, import_search, import_suggest, import_temporal_recall, import_list_scheduled_actions, import_cost_usage, import_storage_usage, import_table_describe, import_table_list, import_table_query, import_list_shared_with_me, import_list_vaults, import_status, import_list_webhooks, registered;
33643
+ var import_list_approved_senders, import_note_inbox, import_get_message_note, import_list_channel_members, import_my_mentions, import_fact_history, import_export2, import_get, import_list, import_search, import_suggest, import_temporal_recall, import_list_scheduled_actions, import_cost_usage, import_storage_usage, import_table_describe, import_table_list, import_table_query, import_list_shared_with_me, import_list_vaults, import_status, import_list_webhooks, import_get_vault_contract, import_route_memory, import_list_tags, import_resolve_tags, import_memory_backlinks, import_memory_graph_universe, import_memory_graph_path, import_prepare_memory_write, import_validate_memory_write, registered;
33299
33644
  var init_reads = __esm({
33300
33645
  "src/mcp/memory-cutover/reads.ts"() {
33301
33646
  "use strict";
@@ -33322,6 +33667,15 @@ var init_reads = __esm({
33322
33667
  import_list_vaults = require("mcpscraper-memory-tools/tools/vaults/list-vaults");
33323
33668
  import_status = require("mcpscraper-memory-tools/tools/video/status");
33324
33669
  import_list_webhooks = require("mcpscraper-memory-tools/tools/webhooks/list-webhooks");
33670
+ import_get_vault_contract = require("mcpscraper-memory-tools/tools/vaults/get-vault-contract");
33671
+ import_route_memory = require("mcpscraper-memory-tools/tools/vaults/route-memory");
33672
+ import_list_tags = require("mcpscraper-memory-tools/tools/tags/list-tags");
33673
+ import_resolve_tags = require("mcpscraper-memory-tools/tools/tags/resolve-tags");
33674
+ import_memory_backlinks = require("mcpscraper-memory-tools/tools/graph/memory-backlinks");
33675
+ import_memory_graph_universe = require("mcpscraper-memory-tools/tools/graph/memory-graph-universe");
33676
+ import_memory_graph_path = require("mcpscraper-memory-tools/tools/graph/memory-graph-path");
33677
+ import_prepare_memory_write = require("mcpscraper-memory-tools/tools/capture/prepare-memory-write");
33678
+ import_validate_memory_write = require("mcpscraper-memory-tools/tools/capture/validate-memory-write");
33325
33679
  registered = false;
33326
33680
  }
33327
33681
  });
@@ -33466,8 +33820,16 @@ function registerWriteCutovers() {
33466
33820
  const result = await import_delete_vault.deleteVaultTool.execute({ ...input, apiKey }, {});
33467
33821
  return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33468
33822
  });
33823
+ registerCutover("memoryCaptureTool", async (input, apiKey) => {
33824
+ const result = await import_memory_capture.memoryCaptureTool.execute({ ...input, apiKey }, {});
33825
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33826
+ });
33827
+ registerCutover("upsertTagTool", async (input, apiKey) => {
33828
+ const result = await import_upsert_tag.upsertTagTool.execute({ ...input, apiKey }, {});
33829
+ return { content: [{ type: "text", text: JSON.stringify(result ?? {}) }], structuredContent: result ?? {}, isError: false };
33830
+ });
33469
33831
  }
33470
- var import_accept_share, import_approve_sender, import_decline_share, import_inbox_settings, import_remove_approved_sender, import_revoke_share, import_set_agent_identity, import_share_note, import_share_vault, import_swap_vault, import_switch_account, import_unlink_share, import_memory_questions, import_create_channel, import_list_channel_messages, import_poll_channel, import_post_message, import_react_message, import_remove_channel_member, import_reply_message, import_record_fact, import_library_ingest, import_delete_note, import_put, import_upload, import_delete_scheduled_action, import_pause_scheduled_action, import_resume_scheduled_action, import_table_create, import_table_delete_rows, import_table_drop, import_table_insert_rows, import_add_vault, import_delete_vault, registered2;
33832
+ var import_accept_share, import_approve_sender, import_decline_share, import_inbox_settings, import_remove_approved_sender, import_revoke_share, import_set_agent_identity, import_share_note, import_share_vault, import_swap_vault, import_switch_account, import_unlink_share, import_memory_questions, import_create_channel, import_list_channel_messages, import_poll_channel, import_post_message, import_react_message, import_remove_channel_member, import_reply_message, import_record_fact, import_library_ingest, import_delete_note, import_put, import_upload, import_delete_scheduled_action, import_pause_scheduled_action, import_resume_scheduled_action, import_table_create, import_table_delete_rows, import_table_drop, import_table_insert_rows, import_add_vault, import_delete_vault, import_memory_capture, import_upsert_tag, registered2;
33471
33833
  var init_writes = __esm({
33472
33834
  "src/mcp/memory-cutover/writes.ts"() {
33473
33835
  "use strict";
@@ -33506,6 +33868,8 @@ var init_writes = __esm({
33506
33868
  import_table_insert_rows = require("mcpscraper-memory-tools/tools/tables/table-insert-rows");
33507
33869
  import_add_vault = require("mcpscraper-memory-tools/tools/vaults/add-vault");
33508
33870
  import_delete_vault = require("mcpscraper-memory-tools/tools/vaults/delete-vault");
33871
+ import_memory_capture = require("mcpscraper-memory-tools/tools/capture/memory-capture");
33872
+ import_upsert_tag = require("mcpscraper-memory-tools/tools/tags/upsert-tag");
33509
33873
  registered2 = false;
33510
33874
  }
33511
33875
  });
@@ -37810,7 +38174,7 @@ async function depositScrapeToVault(user, opts) {
37810
38174
  const clipped = content.length > MAX_DEPOSIT_CHARS ? content.slice(0, MAX_DEPOSIT_CHARS) : content;
37811
38175
  const { key, error } = await getOrCreateUserMemoryKey(user);
37812
38176
  if (!key) return { deposited: false, error: error ?? "memory unavailable" };
37813
- const vault = opts.vault?.trim() || personalVault(user);
38177
+ const vault = opts.vault?.trim() || "Library";
37814
38178
  const title = (opts.title?.trim() || opts.source).slice(0, 200);
37815
38179
  const res = await memoryCall(
37816
38180
  "libraryIngestTool",
@@ -37818,7 +38182,7 @@ async function depositScrapeToVault(user, opts) {
37818
38182
  key
37819
38183
  );
37820
38184
  if (!res.ok) return { deposited: false, vault, error: res.error ?? "ingest failed" };
37821
- return { deposited: true, vault, noteId: res.noteId, path: res.path, chunks: res.chunks };
38185
+ return { deposited: true, vault, noteId: res.noteId, path: res.path, chunks: res.indexed };
37822
38186
  } catch (err) {
37823
38187
  return { deposited: false, error: err?.message ?? "deposit failed" };
37824
38188
  }
@@ -38744,7 +39108,7 @@ var init_server = __esm({
38744
39108
  api_key: user.key_active ? user.api_key : null,
38745
39109
  created_at: user.created_at,
38746
39110
  balance_mc: user.balance_mc,
38747
- balance_credits: user.balance_mc / 1e3,
39111
+ balance_credits: user.balance_mc / MC_PER_CREDIT,
38748
39112
  extra_concurrency_slots: user.extra_concurrency_slots,
38749
39113
  concurrency_limit: concurrencyLimitForUser(user),
38750
39114
  has_concurrency_sub: !!user.concurrency_stripe_sub_id,
@@ -39856,7 +40220,7 @@ var init_server = __esm({
39856
40220
  tier: tier.tier,
39857
40221
  label: tier.label,
39858
40222
  monthly_usd: tier.monthly_usd,
39859
- credits_per_month: tier.credits_mc / 1e3,
40223
+ credits_per_month: tier.credits_mc / MC_PER_CREDIT,
39860
40224
  concurrency: tier.concurrency,
39861
40225
  intro: tier.intro_coupon ? "$1 first month" : null,
39862
40226
  next_step: "Open checkout_url in a browser to complete payment."
@@ -39886,7 +40250,7 @@ var init_server = __esm({
39886
40250
  const freeCredits = await getFreeCreditBreakdown(user.id);
39887
40251
  return c.json({
39888
40252
  balance_mc: balanceMc,
39889
- balance_credits: balanceMc / 1e3,
40253
+ balance_credits: balanceMc / MC_PER_CREDIT,
39890
40254
  free_credits: freeCredits,
39891
40255
  ledger
39892
40256
  });
@@ -39908,7 +40272,7 @@ var init_server = __esm({
39908
40272
  })) : void 0;
39909
40273
  return c.json({
39910
40274
  balance_mc: balanceMc,
39911
- balance_credits: balanceMc / 1e3,
40275
+ balance_credits: balanceMc / MC_PER_CREDIT,
39912
40276
  item: body.item ?? null,
39913
40277
  matched_cost: matchedCost ? (({ aliases, ...cost }) => cost)(matchedCost) : null,
39914
40278
  costs,