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.
- package/dist/bin/api-server.cjs +393 -29
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +588 -11
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +3 -2
- package/dist/bin/mcp-stdio-server.js.map +1 -1
- package/dist/{chunk-XZ2GPRCM.js → chunk-3K5GT6VG.js} +326 -12
- package/dist/chunk-3K5GT6VG.js.map +1 -0
- package/dist/{chunk-SIPXEFTR.js → chunk-APJO2XV5.js} +6 -6
- package/dist/chunk-APJO2XV5.js.map +1 -0
- package/dist/{chunk-VQV7MB2S.js → chunk-BL7BBSYF.js} +2 -2
- package/dist/chunk-F2BXETDX.js +7 -0
- package/dist/chunk-F2BXETDX.js.map +1 -0
- package/dist/{server-TGORO4AJ.js → server-WHM446IZ.js} +70 -18
- package/dist/server-WHM446IZ.js.map +1 -0
- package/dist/{site-extract-repository-6X2C7RLF.js → site-extract-repository-U476J44K.js} +3 -3
- package/dist/{worker-WCSKUAOT.js → worker-KJZ3ZN2N.js} +2 -2
- package/package.json +2 -2
- package/dist/chunk-OL65BO4S.js +0 -7
- package/dist/chunk-OL65BO4S.js.map +0 -1
- package/dist/chunk-SIPXEFTR.js.map +0 -1
- package/dist/chunk-XZ2GPRCM.js.map +0 -1
- package/dist/server-TGORO4AJ.js.map +0 -1
- /package/dist/{chunk-VQV7MB2S.js.map → chunk-BL7BBSYF.js.map} +0 -0
- /package/dist/{site-extract-repository-6X2C7RLF.js.map → site-extract-repository-U476J44K.js.map} +0 -0
- /package/dist/{worker-WCSKUAOT.js.map → worker-KJZ3ZN2N.js.map} +0 -0
|
@@ -483,7 +483,7 @@ render();
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
// src/version.ts
|
|
486
|
-
var PACKAGE_VERSION = "0.
|
|
486
|
+
var PACKAGE_VERSION = "0.6.0";
|
|
487
487
|
|
|
488
488
|
// src/mcp/browser-agent-tool-schemas.ts
|
|
489
489
|
var import_zod = require("zod");
|
|
@@ -2676,6 +2676,272 @@ function summaryEnvelope(executiveSummary, offloaded) {
|
|
|
2676
2676
|
].join("\n");
|
|
2677
2677
|
}
|
|
2678
2678
|
|
|
2679
|
+
// src/api/rates.ts
|
|
2680
|
+
var MC_COSTS = {
|
|
2681
|
+
serp: 100,
|
|
2682
|
+
paa: 200,
|
|
2683
|
+
paa_base: 1e3,
|
|
2684
|
+
page_scrape: 100,
|
|
2685
|
+
url_map: 500,
|
|
2686
|
+
yt_channel: 200,
|
|
2687
|
+
yt_transcription: 200,
|
|
2688
|
+
fb_ad: 200,
|
|
2689
|
+
maps_search: 500,
|
|
2690
|
+
maps_place: 6e3,
|
|
2691
|
+
maps_review: 100,
|
|
2692
|
+
fb_search: 600,
|
|
2693
|
+
fb_transcribe: 33300,
|
|
2694
|
+
google_ads_search: 600,
|
|
2695
|
+
google_ads_intel: 200,
|
|
2696
|
+
google_ads_transcribe: 33300,
|
|
2697
|
+
instagram_profile: 400,
|
|
2698
|
+
instagram_media: 400,
|
|
2699
|
+
instagram_transcribe: 33300,
|
|
2700
|
+
browser_minute: 12e3,
|
|
2701
|
+
reddit_thread: 3e3,
|
|
2702
|
+
reddit_comment: 200,
|
|
2703
|
+
video_analysis: 666700,
|
|
2704
|
+
trustpilot_reviews: 500,
|
|
2705
|
+
trustpilot_review: 100,
|
|
2706
|
+
g2_reviews: 500,
|
|
2707
|
+
g2_review: 200,
|
|
2708
|
+
diff_page: 100
|
|
2709
|
+
};
|
|
2710
|
+
var MC_PER_BROWSER_MS = MC_COSTS.browser_minute / 6e4;
|
|
2711
|
+
var MC_PER_CREDIT = 100;
|
|
2712
|
+
var CREDIT_COST_CATALOG = [
|
|
2713
|
+
{
|
|
2714
|
+
key: "serp",
|
|
2715
|
+
label: "SERP search",
|
|
2716
|
+
aliases: ["search_serp", "serp", "google search", "organic results"],
|
|
2717
|
+
credits: mcToCredits(MC_COSTS.serp),
|
|
2718
|
+
unit: "per search",
|
|
2719
|
+
notes: "Returns AI Overview, PAA snippet, videos, forums, and local pack."
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
key: "paa",
|
|
2723
|
+
label: "PAA harvest",
|
|
2724
|
+
aliases: ["harvest_paa", "paa", "people also ask", "questions"],
|
|
2725
|
+
credits: mcToCredits(MC_COSTS.paa),
|
|
2726
|
+
unit: `per question (+${mcToCredits(MC_COSTS.paa_base)} credit base)`,
|
|
2727
|
+
notes: `Full SERP feature extraction. Billed ${mcToCredits(MC_COSTS.paa_base)} credit base + ${mcToCredits(MC_COSTS.paa)} per question actually returned (unused estimate refunded).`
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
key: "page_scrape",
|
|
2731
|
+
label: "Page crawl / extract",
|
|
2732
|
+
aliases: ["extract_url", "extract_site", "page scrape", "url scrape", "single page", "site crawl"],
|
|
2733
|
+
credits: mcToCredits(MC_COSTS.page_scrape),
|
|
2734
|
+
unit: "per page",
|
|
2735
|
+
notes: "Applies to both single-URL extraction and per-page site crawls."
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
key: "url_map",
|
|
2739
|
+
label: "Site URL mapping",
|
|
2740
|
+
aliases: ["map_site_urls", "url map", "site map", "crawl urls"],
|
|
2741
|
+
credits: mcToCredits(MC_COSTS.url_map),
|
|
2742
|
+
unit: "per mapping operation",
|
|
2743
|
+
notes: "Flat rate for the full /map-urls call regardless of URL count discovered."
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
key: "yt_channel",
|
|
2747
|
+
label: "YouTube search / channel harvest",
|
|
2748
|
+
aliases: ["youtube_harvest", "youtube search", "youtube channel", "yt_channel"],
|
|
2749
|
+
credits: mcToCredits(MC_COSTS.yt_channel),
|
|
2750
|
+
unit: "per call"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
key: "yt_transcription",
|
|
2754
|
+
label: "YouTube transcription",
|
|
2755
|
+
aliases: ["youtube_transcribe", "youtube transcript", "transcription", "yt_transcription"],
|
|
2756
|
+
credits: mcToCredits(MC_COSTS.yt_transcription),
|
|
2757
|
+
unit: "per minute",
|
|
2758
|
+
notes: "A 5-minute hold is taken, then reconciled to actual video duration."
|
|
2759
|
+
},
|
|
2760
|
+
{
|
|
2761
|
+
key: "fb_ad",
|
|
2762
|
+
label: "Facebook search / ad lookup",
|
|
2763
|
+
aliases: ["facebook_page_intel", "facebook_ad_search", "facebook_ad", "facebook ads", "fb ads"],
|
|
2764
|
+
credits: mcToCredits(MC_COSTS.fb_ad),
|
|
2765
|
+
unit: "per call"
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
key: "maps_search",
|
|
2769
|
+
label: "Maps business search",
|
|
2770
|
+
aliases: ["maps_search", "google maps search", "gmb search", "gbp search", "business profiles"],
|
|
2771
|
+
credits: mcToCredits(MC_COSTS.maps_search),
|
|
2772
|
+
unit: "per search",
|
|
2773
|
+
notes: "Returns up to 50 Google Maps business/profile candidates. Use maps_place_intel to hydrate selected businesses."
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
key: "maps_place",
|
|
2777
|
+
label: "Maps business lookup",
|
|
2778
|
+
aliases: ["maps_place_intel", "google maps", "maps place", "place intel"],
|
|
2779
|
+
credits: mcToCredits(MC_COSTS.maps_place),
|
|
2780
|
+
unit: "per business",
|
|
2781
|
+
notes: "Base lookup. Reviews billed separately per card at maps_review rate."
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
key: "maps_review",
|
|
2785
|
+
label: "Maps review",
|
|
2786
|
+
aliases: ["maps_reviews", "google reviews", "review cards", "reviews"],
|
|
2787
|
+
credits: mcToCredits(MC_COSTS.maps_review),
|
|
2788
|
+
unit: "per review card",
|
|
2789
|
+
notes: "Charged after extraction when includeReviews is true."
|
|
2790
|
+
},
|
|
2791
|
+
{
|
|
2792
|
+
key: "fb_search",
|
|
2793
|
+
label: "Facebook ad library search",
|
|
2794
|
+
aliases: ["facebook_search", "fb_search", "fb ad search"],
|
|
2795
|
+
credits: mcToCredits(MC_COSTS.fb_search),
|
|
2796
|
+
unit: "per search",
|
|
2797
|
+
notes: "Browser automation to search Facebook Ads Library by keyword."
|
|
2798
|
+
},
|
|
2799
|
+
{
|
|
2800
|
+
key: "google_ads_search",
|
|
2801
|
+
label: "Google Ads Transparency search",
|
|
2802
|
+
aliases: ["google_ads_search", "google ads search", "ads transparency search"],
|
|
2803
|
+
credits: mcToCredits(MC_COSTS.google_ads_search),
|
|
2804
|
+
unit: "per search",
|
|
2805
|
+
notes: "Browser automation to find advertisers in Google Ads Transparency Center by domain or name."
|
|
2806
|
+
},
|
|
2807
|
+
{
|
|
2808
|
+
key: "google_ads_intel",
|
|
2809
|
+
label: "Google Ads Transparency advertiser intel",
|
|
2810
|
+
aliases: ["google_ads_page_intel", "google ads intel", "ads transparency intel"],
|
|
2811
|
+
credits: mcToCredits(MC_COSTS.google_ads_intel),
|
|
2812
|
+
unit: "per call",
|
|
2813
|
+
notes: "Lists and hydrates an advertiser's creatives with image URLs and video references."
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
key: "google_ads_transcribe",
|
|
2817
|
+
label: "Google ad video transcription",
|
|
2818
|
+
aliases: ["google_ads_transcribe", "google ad transcript"],
|
|
2819
|
+
credits: mcToCredits(MC_COSTS.google_ads_transcribe),
|
|
2820
|
+
unit: "per minute (typical)",
|
|
2821
|
+
notes: "A hold is taken, then reconciled to the real transcription cost for the actual audio duration."
|
|
2822
|
+
},
|
|
2823
|
+
{
|
|
2824
|
+
key: "fb_transcribe",
|
|
2825
|
+
label: "Facebook video / ad transcription",
|
|
2826
|
+
aliases: ["facebook_transcribe", "facebook_video_transcribe", "fb_transcribe", "fb ad transcript"],
|
|
2827
|
+
credits: mcToCredits(MC_COSTS.fb_transcribe),
|
|
2828
|
+
unit: "per minute (typical)",
|
|
2829
|
+
notes: "A hold is taken, then reconciled to the real transcription cost for the actual audio duration."
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
key: "instagram_profile",
|
|
2833
|
+
label: "Instagram profile content discovery",
|
|
2834
|
+
aliases: ["instagram_profile_content", "instagram profile", "instagram content list", "ig profile"],
|
|
2835
|
+
credits: mcToCredits(MC_COSTS.instagram_profile),
|
|
2836
|
+
unit: "per profile scan",
|
|
2837
|
+
notes: "Browser extraction of public Instagram profile grid links. Complete history may require a logged-in profile."
|
|
2838
|
+
},
|
|
2839
|
+
{
|
|
2840
|
+
key: "instagram_media",
|
|
2841
|
+
label: "Instagram media download",
|
|
2842
|
+
aliases: ["instagram_media_download", "instagram reel download", "instagram post download", "ig media"],
|
|
2843
|
+
credits: mcToCredits(MC_COSTS.instagram_media),
|
|
2844
|
+
unit: "per post or reel",
|
|
2845
|
+
notes: "Extracts post text, image URLs, and reel audio/video tracks, with local downloads when the server can write files."
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
key: "instagram_transcribe",
|
|
2849
|
+
label: "Instagram media transcription",
|
|
2850
|
+
aliases: ["instagram transcript", "instagram reel transcript", "ig transcribe"],
|
|
2851
|
+
credits: mcToCredits(MC_COSTS.instagram_transcribe),
|
|
2852
|
+
unit: "per minute (typical)",
|
|
2853
|
+
notes: "Whisper transcription of selected Instagram audio/video media via fal.ai. A hold is taken, then reconciled to the real transcription cost for the actual audio duration."
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
key: "browser_minute",
|
|
2857
|
+
label: "Interactive browser session",
|
|
2858
|
+
aliases: ["browser_open", "browser agent", "browser_agent", "live browser", "browse", "browser control", "interactive browser"],
|
|
2859
|
+
credits: mcToCredits(MC_COSTS.browser_minute),
|
|
2860
|
+
unit: "per minute of use",
|
|
2861
|
+
notes: "Metered per minute of use for the whole time the browser session is open. Close the session to stop the meter; abandoned sessions are auto-closed after a short idle window."
|
|
2862
|
+
},
|
|
2863
|
+
{
|
|
2864
|
+
key: "reddit_thread",
|
|
2865
|
+
label: "Reddit thread base lookup",
|
|
2866
|
+
aliases: ["reddit", "reddit_thread", "reddit comments", "subreddit", "reddit post"],
|
|
2867
|
+
credits: mcToCredits(MC_COSTS.reddit_thread),
|
|
2868
|
+
unit: "per thread",
|
|
2869
|
+
notes: "Base lookup for the post itself. Comments billed separately per comment at reddit_comment rate. Refunded if the thread cannot be retrieved."
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
key: "reddit_comment",
|
|
2873
|
+
label: "Reddit comment",
|
|
2874
|
+
aliases: ["reddit_comment", "reddit comments"],
|
|
2875
|
+
credits: mcToCredits(MC_COSTS.reddit_comment),
|
|
2876
|
+
unit: "per comment",
|
|
2877
|
+
notes: "Charged per comment actually extracted, billed down automatically if the balance runs out mid-thread."
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
key: "video_analysis",
|
|
2881
|
+
label: "Video breakdown (frame-by-frame + transcript)",
|
|
2882
|
+
aliases: ["video_frame_analysis", "video breakdown", "video analysis", "analyze video"],
|
|
2883
|
+
credits: mcToCredits(MC_COSTS.video_analysis),
|
|
2884
|
+
unit: "per 120 frames (max 480)",
|
|
2885
|
+
notes: "Full multi-lens video breakdown: samples frames across a video (up to 30 minutes), analyzes each with vision AI, transcribes the audio, then produces summary, pacing/energy, words-per-minute, topic outline, key points, hook analysis, visual style, and a how-to-replicate recipe with a quality-control pass. $1 per 120 frames requested (max 480 = $4); billed down automatically if the video cannot use the requested frames, and refunded fully if the run fails."
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
key: "trustpilot_reviews",
|
|
2889
|
+
label: "Trustpilot review harvest",
|
|
2890
|
+
aliases: ["trustpilot_reviews", "trustpilot", "trustpilot reviews"],
|
|
2891
|
+
credits: mcToCredits(MC_COSTS.trustpilot_reviews),
|
|
2892
|
+
unit: "per call",
|
|
2893
|
+
notes: "Base lookup. Reviews billed separately per card at trustpilot_review rate. Refunded if no reviews are found."
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
key: "trustpilot_review",
|
|
2897
|
+
label: "Trustpilot review card",
|
|
2898
|
+
aliases: ["trustpilot_review", "trustpilot card"],
|
|
2899
|
+
credits: mcToCredits(MC_COSTS.trustpilot_review),
|
|
2900
|
+
unit: "per review card",
|
|
2901
|
+
notes: "Charged per review actually extracted, billed down automatically if the balance runs out mid-page."
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
key: "g2_reviews",
|
|
2905
|
+
label: "G2 review harvest",
|
|
2906
|
+
aliases: ["g2_reviews", "g2", "g2 reviews"],
|
|
2907
|
+
credits: mcToCredits(MC_COSTS.g2_reviews),
|
|
2908
|
+
unit: "per call",
|
|
2909
|
+
notes: "Base lookup. Reviews billed separately per card at g2_review rate. Refunded if no reviews are found."
|
|
2910
|
+
},
|
|
2911
|
+
{
|
|
2912
|
+
key: "g2_review",
|
|
2913
|
+
label: "G2 review card",
|
|
2914
|
+
aliases: ["g2_review", "g2 card"],
|
|
2915
|
+
credits: mcToCredits(MC_COSTS.g2_review),
|
|
2916
|
+
unit: "per review card",
|
|
2917
|
+
notes: "Charged per review actually extracted (each card carries up to 3 Q&A sections), billed down automatically if the balance runs out mid-page."
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
key: "diff_page",
|
|
2921
|
+
label: "Page change check",
|
|
2922
|
+
aliases: ["diff_page", "page diff", "change detection"],
|
|
2923
|
+
credits: mcToCredits(MC_COSTS.diff_page),
|
|
2924
|
+
unit: "per check",
|
|
2925
|
+
notes: "Same cost as a single page extract \u2014 one scrape is performed per check, then compared against your last stored snapshot for that URL."
|
|
2926
|
+
}
|
|
2927
|
+
];
|
|
2928
|
+
var SUBSCRIPTION_TIERS = {
|
|
2929
|
+
"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" },
|
|
2930
|
+
"price_1TrgihS8aAcsk3TG5cglrq4D": { tier: "growth", label: "Growth", price_id: "price_1TrgihS8aAcsk3TG5cglrq4D", monthly_usd: 40, credits_mc: 26666700, concurrency: 10, intro_coupon: null },
|
|
2931
|
+
"price_1TrgihS8aAcsk3TG4HnG4gbY": { tier: "scale", label: "Scale", price_id: "price_1TrgihS8aAcsk3TG4HnG4gbY", monthly_usd: 100, credits_mc: 8e7, concurrency: 20, intro_coupon: null }
|
|
2932
|
+
};
|
|
2933
|
+
var SUBSCRIPTION_TIER_BY_KEY = Object.fromEntries(
|
|
2934
|
+
Object.values(SUBSCRIPTION_TIERS).map((t) => [t.tier, t])
|
|
2935
|
+
);
|
|
2936
|
+
function mcToCredits(mc) {
|
|
2937
|
+
return mc / MC_PER_CREDIT;
|
|
2938
|
+
}
|
|
2939
|
+
var MEMORY_FREE_QUOTA_BYTES = 1e7 * 1;
|
|
2940
|
+
var MEMORY_MARGIN_MULTIPLE = 3;
|
|
2941
|
+
var MEMORY_PRO_COST_BUDGET_USD = 19 / MEMORY_MARGIN_MULTIPLE;
|
|
2942
|
+
var MEDIA_TRANSCRIBE_HOLD_MC = MC_COSTS.fb_transcribe * 3;
|
|
2943
|
+
var MC_PER_USD = SUBSCRIPTION_TIERS["price_1TmiHRS8aAcsk3TGwmSNfNIa"].credits_mc / SUBSCRIPTION_TIERS["price_1TmiHRS8aAcsk3TGwmSNfNIa"].monthly_usd;
|
|
2944
|
+
|
|
2679
2945
|
// src/mcp/mcp-response-formatter.ts
|
|
2680
2946
|
var INLINE_BUDGET_BYTES = Number(process.env.MCP_SCRAPER_INLINE_BUDGET ?? 5e4);
|
|
2681
2947
|
var STRUCTURED_ARRAY_CAP = 25;
|
|
@@ -4147,7 +4413,7 @@ function formatCreditsInfo(raw, input) {
|
|
|
4147
4413
|
return `| ${c.label} | ${c.credits} | ${c.unit}${notes} |`;
|
|
4148
4414
|
}).join("\n");
|
|
4149
4415
|
const ledgerRows = ledger.map((row) => {
|
|
4150
|
-
const credits = row.amount_mc /
|
|
4416
|
+
const credits = row.amount_mc / MC_PER_CREDIT;
|
|
4151
4417
|
return `| ${row.created_at} | ${row.operation} | ${credits} | ${row.description ?? ""} |`;
|
|
4152
4418
|
}).join("\n");
|
|
4153
4419
|
const matchedSection = matched ? `
|
|
@@ -4197,7 +4463,7 @@ ${ledgerRows}` : ""
|
|
|
4197
4463
|
ledger: ledger.map((row) => ({
|
|
4198
4464
|
createdAt: String(row.created_at ?? ""),
|
|
4199
4465
|
operation: String(row.operation ?? ""),
|
|
4200
|
-
credits: row.amount_mc /
|
|
4466
|
+
credits: row.amount_mc / MC_PER_CREDIT,
|
|
4201
4467
|
description: row.description ?? null
|
|
4202
4468
|
})),
|
|
4203
4469
|
concurrency: concurrencyRaw && upgradeRaw ? {
|
|
@@ -5078,7 +5344,7 @@ Multi-step orchestrations \u2014 prefer these over hand-chaining primitives when
|
|
|
5078
5344
|
read it back for full detail rather than expecting the whole payload inline.
|
|
5079
5345
|
|
|
5080
5346
|
## Memory
|
|
5081
|
-
mcp-scraper also exposes
|
|
5347
|
+
mcp-scraper also exposes persistent per-user memory tools (notes, facts, vaults,
|
|
5082
5348
|
scheduled actions, tables, channels) backed by memory.mcpscraper.dev. Every account starts with 13
|
|
5083
5349
|
vaults \u2014 call **list-vaults** to see what exists before creating anything new. Pick the vault whose job
|
|
5084
5350
|
matches the content: **Ideas** (unvalidated concepts), **Knowledge** (distilled lessons/how-tos),
|
|
@@ -5088,11 +5354,45 @@ matches the content: **Ideas** (unvalidated concepts), **Knowledge** (distilled
|
|
|
5088
5354
|
**Improvement Log** (receipts of changes made and whether they worked), **Experiments** (hypothesis +
|
|
5089
5355
|
measured result), **Sprint** (current cycle's scope), **Inspiration** (other people's work worth
|
|
5090
5356
|
studying).
|
|
5091
|
-
|
|
5092
|
-
|
|
5357
|
+
For a normal new narrative note, call **prepare-memory-write** first. It queries the live vault contract,
|
|
5358
|
+
tag vocabulary, and natural neighbor vaults, and returns interlink candidates that must be read before
|
|
5359
|
+
acceptance. Compose every returned template section, then call **memory-capture**, which validates the
|
|
5360
|
+
note, registers canonical tags, writes it, and verifies readback. Reserve low-level **memory-put** for
|
|
5361
|
+
deliberate edits and migrations. Use
|
|
5093
5362
|
**table-create**/**table-insert-rows**/**table-query** instead when the caller wants row-shaped data
|
|
5094
5363
|
they'll filter/sort by exact value. **memory-search** is meaning-based over full content (embeds, slower);
|
|
5095
5364
|
**memory-list** filters one vault by kind/tags (fast, exact).
|
|
5365
|
+
|
|
5366
|
+
Treat every memory create or update as a graph operation. **prepare-memory-write** supplies the initial
|
|
5367
|
+
shortlist; use **memory-search** when it is weak or the topic is broad, and **memory-get** to read the best
|
|
5368
|
+
candidates in full. Add only links supported by the notes: same-
|
|
5369
|
+
vault targets go in props.related and natural [[path]] body links; cross-vault targets go in
|
|
5370
|
+
props.related_vault_notes as Vault Name::relative/path.md. Prefer existing People/Projects/system
|
|
5371
|
+
hubs and fewer strong links. Do not trust a background linker to repair a weak write.
|
|
5372
|
+
|
|
5373
|
+
Use the target vault's template, not generic prose. Always set summary, specific reusable tags,
|
|
5374
|
+
source_type, source_ref, related, related_vault_notes, embed, embed_priority, and a valid
|
|
5375
|
+
status; include vault-specific props when relevant. Body patterns: Knowledge = Thesis / Explanation /
|
|
5376
|
+
Examples / Implications; Library = Source Identity / Preserved Material / Extraction Notes; People =
|
|
5377
|
+
Identity / Relationship / Known Context / Interaction History / Open Loops; Projects = Purpose / Current
|
|
5378
|
+
State / Architecture / Open Work / Decisions; Issues = Observation / Impact / Confirmation / Evidence /
|
|
5379
|
+
Resolution; Improvement Log = Improvement / Issue Link / Change Made / Verification / Result. Keep Tasks,
|
|
5380
|
+
Calendar, Communications, Ideas, Inspiration, Experiments, and Sprint aligned to their named purpose.
|
|
5381
|
+
Tags are live vocabulary, not improvised labels: **list-memory-tags** shows what exists and
|
|
5382
|
+
**resolve-memory-tags** returns reuse/create/omit. A new tag is justified only when the concept is central,
|
|
5383
|
+
reusable, and has no exact, alias, or near-equivalent. Use **memory-backlinks**,
|
|
5384
|
+
**memory-graph-universe**, and **memory-graph-path** to trace the linked universe across vaults.
|
|
5385
|
+
|
|
5386
|
+
Scrape deposits are raw evidence and therefore go to **Library** through **library-ingest**, with the full
|
|
5387
|
+
Library template and source metadata. If the source contains durable applicable guidance, create a separate
|
|
5388
|
+
Knowledge companion through prepare-memory-write + memory-capture and link it to the Library source with
|
|
5389
|
+
derived_from; do not replace the raw source with the guide.
|
|
5390
|
+
|
|
5391
|
+
For an update, call **memory-get** first and pass its revision as baseRevision. Preserve the existing
|
|
5392
|
+
title, source, capture time, content context, and props unless the request deliberately changes them.
|
|
5393
|
+
If a legacy backend does not return props, do not overwrite an existing linked note through that surface;
|
|
5394
|
+
report that link preservation cannot be proved. After the write, read it back and search a distinctive
|
|
5395
|
+
phrase to verify persistence and indexing.
|
|
5096
5396
|
`.trim();
|
|
5097
5397
|
}
|
|
5098
5398
|
var SERVER_INSTRUCTIONS = serverInstructions(true);
|
|
@@ -7391,6 +7691,52 @@ var UnlinkShareSchema = {
|
|
|
7391
7691
|
openWorldHint: false
|
|
7392
7692
|
}
|
|
7393
7693
|
};
|
|
7694
|
+
var memoryCaptureTool_notePropsSchema = import_zod4.z.object({
|
|
7695
|
+
status: import_zod4.z.string().describe("Status enum value from the target vault contract."),
|
|
7696
|
+
summary: import_zod4.z.string().describe("Short retrieval-ready description."),
|
|
7697
|
+
tags: import_zod4.z.array(import_zod4.z.string()).describe("AI-generated keyword tags, not vault names."),
|
|
7698
|
+
pinned: import_zod4.z.boolean().describe("Recall boost for important notes."),
|
|
7699
|
+
source_type: import_zod4.z.string().describe("Attribution kind: user, person, url, file, channel, thread, or note."),
|
|
7700
|
+
source_ref: import_zod4.z.string().describe("Attribution reference (URL, path, channel, thread, or source note)."),
|
|
7701
|
+
related: import_zod4.z.array(import_zod4.z.string()).describe("Same-vault links (wiki [[ ]] targets)."),
|
|
7702
|
+
related_vault_notes: import_zod4.z.array(import_zod4.z.string()).describe('Cross-vault references in "Vault Name::relative/path.md" form.'),
|
|
7703
|
+
embed: import_zod4.z.boolean().describe("Whether Smart RAG should index the note."),
|
|
7704
|
+
embed_priority: import_zod4.z.enum(["low", "normal", "high"]).describe("Embedding priority."),
|
|
7705
|
+
embedding_summary: import_zod4.z.string().describe("Optional retrieval-specific summary."),
|
|
7706
|
+
type: import_zod4.z.string().describe("Note type from the target vault contract (also used to route the note)."),
|
|
7707
|
+
domain: import_zod4.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
|
|
7708
|
+
folder: import_zod4.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
|
|
7709
|
+
parentMessageId: import_zod4.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
|
|
7710
|
+
}).partial().passthrough();
|
|
7711
|
+
var MemoryCaptureSchema = {
|
|
7712
|
+
id: "memory-capture",
|
|
7713
|
+
upstreamName: "memoryCaptureTool",
|
|
7714
|
+
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.",
|
|
7715
|
+
input: {
|
|
7716
|
+
vault: import_zod4.z.string(),
|
|
7717
|
+
folder: import_zod4.z.string().optional(),
|
|
7718
|
+
path: import_zod4.z.string().min(1),
|
|
7719
|
+
title: import_zod4.z.string().min(1),
|
|
7720
|
+
content: import_zod4.z.string().min(1),
|
|
7721
|
+
props: memoryCaptureTool_notePropsSchema,
|
|
7722
|
+
baseRevision: import_zod4.z.number().optional(),
|
|
7723
|
+
tagDecisions: import_zod4.z.array(import_zod4.z.object({ tag: import_zod4.z.string().min(1), central: import_zod4.z.boolean(), reusable: import_zod4.z.boolean(), description: import_zod4.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.")
|
|
7724
|
+
},
|
|
7725
|
+
output: {
|
|
7726
|
+
ok: import_zod4.z.boolean(),
|
|
7727
|
+
valid: import_zod4.z.boolean().optional(),
|
|
7728
|
+
errors: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
7729
|
+
warnings: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
7730
|
+
tagResolutions: import_zod4.z.array(import_zod4.z.object({ candidate: import_zod4.z.string(), action: import_zod4.z.enum(["reuse", "create", "omit"]), tag: import_zod4.z.string().optional(), reason: import_zod4.z.string() })).optional(),
|
|
7731
|
+
note: import_zod4.z.object({ path: import_zod4.z.string(), title: import_zod4.z.string(), updatedAt: import_zod4.z.string(), revision: import_zod4.z.number() }).optional(),
|
|
7732
|
+
indexed: import_zod4.z.number().optional(),
|
|
7733
|
+
verified: import_zod4.z.object({ contentBytes: import_zod4.z.number(), propsPersisted: import_zod4.z.boolean(), revision: import_zod4.z.number() }).optional(),
|
|
7734
|
+
conflict: import_zod4.z.boolean().optional(),
|
|
7735
|
+
code: import_zod4.z.string().optional(),
|
|
7736
|
+
error: import_zod4.z.string().optional()
|
|
7737
|
+
},
|
|
7738
|
+
annotations: { title: "Capture Governed Memory", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
|
|
7739
|
+
};
|
|
7394
7740
|
var MemoryQuestionsSchema = {
|
|
7395
7741
|
id: "memory-questions",
|
|
7396
7742
|
upstreamName: "memoryQuestionsTool",
|
|
@@ -7420,6 +7766,67 @@ var MemoryQuestionsSchema = {
|
|
|
7420
7766
|
openWorldHint: true
|
|
7421
7767
|
}
|
|
7422
7768
|
};
|
|
7769
|
+
var PrepareMemoryWriteSchema = {
|
|
7770
|
+
id: "prepare-memory-write",
|
|
7771
|
+
upstreamName: "prepareMemoryWriteTool",
|
|
7772
|
+
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.",
|
|
7773
|
+
input: {
|
|
7774
|
+
title: import_zod4.z.string().min(1),
|
|
7775
|
+
content: import_zod4.z.string().min(1),
|
|
7776
|
+
source: import_zod4.z.string().optional(),
|
|
7777
|
+
type: import_zod4.z.string().optional(),
|
|
7778
|
+
vault: import_zod4.z.string().optional(),
|
|
7779
|
+
tagCandidates: import_zod4.z.array(import_zod4.z.object({ tag: import_zod4.z.string().min(1), central: import_zod4.z.boolean().optional(), reusable: import_zod4.z.boolean().optional(), description: import_zod4.z.string().optional() })).max(20).optional(),
|
|
7780
|
+
maxLinks: import_zod4.z.number().int().min(1).max(20).optional()
|
|
7781
|
+
},
|
|
7782
|
+
output: {
|
|
7783
|
+
ok: import_zod4.z.boolean(),
|
|
7784
|
+
route: import_zod4.z.record(import_zod4.z.unknown()).optional(),
|
|
7785
|
+
contract: import_zod4.z.record(import_zod4.z.unknown()).optional(),
|
|
7786
|
+
tagResolutions: import_zod4.z.array(import_zod4.z.record(import_zod4.z.unknown())).optional(),
|
|
7787
|
+
linkOpportunities: import_zod4.z.array(import_zod4.z.record(import_zod4.z.unknown())).optional(),
|
|
7788
|
+
instructions: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
7789
|
+
error: import_zod4.z.string().optional()
|
|
7790
|
+
},
|
|
7791
|
+
annotations: { title: "Prepare Memory Write", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
7792
|
+
};
|
|
7793
|
+
var validateMemoryWriteTool_notePropsSchema = import_zod4.z.object({
|
|
7794
|
+
status: import_zod4.z.string().describe("Status enum value from the target vault contract."),
|
|
7795
|
+
summary: import_zod4.z.string().describe("Short retrieval-ready description."),
|
|
7796
|
+
tags: import_zod4.z.array(import_zod4.z.string()).describe("AI-generated keyword tags, not vault names."),
|
|
7797
|
+
pinned: import_zod4.z.boolean().describe("Recall boost for important notes."),
|
|
7798
|
+
source_type: import_zod4.z.string().describe("Attribution kind: user, person, url, file, channel, thread, or note."),
|
|
7799
|
+
source_ref: import_zod4.z.string().describe("Attribution reference (URL, path, channel, thread, or source note)."),
|
|
7800
|
+
related: import_zod4.z.array(import_zod4.z.string()).describe("Same-vault links (wiki [[ ]] targets)."),
|
|
7801
|
+
related_vault_notes: import_zod4.z.array(import_zod4.z.string()).describe('Cross-vault references in "Vault Name::relative/path.md" form.'),
|
|
7802
|
+
embed: import_zod4.z.boolean().describe("Whether Smart RAG should index the note."),
|
|
7803
|
+
embed_priority: import_zod4.z.enum(["low", "normal", "high"]).describe("Embedding priority."),
|
|
7804
|
+
embedding_summary: import_zod4.z.string().describe("Optional retrieval-specific summary."),
|
|
7805
|
+
type: import_zod4.z.string().describe("Note type from the target vault contract (also used to route the note)."),
|
|
7806
|
+
domain: import_zod4.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
|
|
7807
|
+
folder: import_zod4.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
|
|
7808
|
+
parentMessageId: import_zod4.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
|
|
7809
|
+
}).partial().passthrough();
|
|
7810
|
+
var ValidateMemoryWriteSchema = {
|
|
7811
|
+
id: "validate-memory-write",
|
|
7812
|
+
upstreamName: "validateMemoryWriteTool",
|
|
7813
|
+
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.",
|
|
7814
|
+
input: {
|
|
7815
|
+
vault: import_zod4.z.string(),
|
|
7816
|
+
title: import_zod4.z.string(),
|
|
7817
|
+
content: import_zod4.z.string(),
|
|
7818
|
+
props: validateMemoryWriteTool_notePropsSchema
|
|
7819
|
+
},
|
|
7820
|
+
output: {
|
|
7821
|
+
ok: import_zod4.z.boolean(),
|
|
7822
|
+
valid: import_zod4.z.boolean().optional(),
|
|
7823
|
+
errors: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
7824
|
+
warnings: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
7825
|
+
normalizedTags: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
7826
|
+
error: import_zod4.z.string().optional()
|
|
7827
|
+
},
|
|
7828
|
+
annotations: { title: "Validate Memory Write", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
7829
|
+
};
|
|
7423
7830
|
var CreateChannelSchema = {
|
|
7424
7831
|
id: "create-channel",
|
|
7425
7832
|
upstreamName: "createChannelTool",
|
|
@@ -7760,18 +8167,78 @@ var RecordFactSchema = {
|
|
|
7760
8167
|
openWorldHint: false
|
|
7761
8168
|
}
|
|
7762
8169
|
};
|
|
8170
|
+
var NoteBacklinksSchema = {
|
|
8171
|
+
id: "memory-backlinks",
|
|
8172
|
+
upstreamName: "noteBacklinksTool",
|
|
8173
|
+
description: "Return every resolved incoming link to a note across all accessible vaults, including typed metadata links and Obsidian wiki links.",
|
|
8174
|
+
input: {
|
|
8175
|
+
note: import_zod4.z.string().min(1),
|
|
8176
|
+
vault: import_zod4.z.string().optional()
|
|
8177
|
+
},
|
|
8178
|
+
output: {
|
|
8179
|
+
ok: import_zod4.z.boolean(),
|
|
8180
|
+
nodes: import_zod4.z.array(import_zod4.z.object({ id: import_zod4.z.string(), vault: import_zod4.z.string(), path: import_zod4.z.string(), title: import_zod4.z.string(), resolved: import_zod4.z.boolean() })).optional(),
|
|
8181
|
+
edges: import_zod4.z.array(import_zod4.z.object({ source: import_zod4.z.string(), target: import_zod4.z.string(), type: import_zod4.z.string(), evidence: import_zod4.z.string(), sourceField: import_zod4.z.string(), resolved: import_zod4.z.boolean() })).optional(),
|
|
8182
|
+
error: import_zod4.z.string().optional()
|
|
8183
|
+
},
|
|
8184
|
+
annotations: { title: "Memory Backlinks", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
8185
|
+
};
|
|
8186
|
+
var GraphPathSchema = {
|
|
8187
|
+
id: "memory-graph-path",
|
|
8188
|
+
upstreamName: "graphPathTool",
|
|
8189
|
+
description: "Find the shortest navigable connection between two memory notes across vault boundaries. Returns an empty graph when no path exists within maxDepth.",
|
|
8190
|
+
input: {
|
|
8191
|
+
from: import_zod4.z.string().min(1),
|
|
8192
|
+
to: import_zod4.z.string().min(1),
|
|
8193
|
+
fromVault: import_zod4.z.string().optional(),
|
|
8194
|
+
toVault: import_zod4.z.string().optional(),
|
|
8195
|
+
maxDepth: import_zod4.z.number().int().min(1).max(12).optional()
|
|
8196
|
+
},
|
|
8197
|
+
output: {
|
|
8198
|
+
ok: import_zod4.z.boolean(),
|
|
8199
|
+
nodes: import_zod4.z.array(import_zod4.z.object({ id: import_zod4.z.string(), vault: import_zod4.z.string(), path: import_zod4.z.string(), title: import_zod4.z.string(), resolved: import_zod4.z.boolean() })).optional(),
|
|
8200
|
+
edges: import_zod4.z.array(import_zod4.z.object({ source: import_zod4.z.string(), target: import_zod4.z.string(), type: import_zod4.z.string(), evidence: import_zod4.z.string(), sourceField: import_zod4.z.string(), resolved: import_zod4.z.boolean() })).optional(),
|
|
8201
|
+
error: import_zod4.z.string().optional()
|
|
8202
|
+
},
|
|
8203
|
+
annotations: { title: "Memory Graph Path", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
8204
|
+
};
|
|
8205
|
+
var GraphUniverseSchema = {
|
|
8206
|
+
id: "memory-graph-universe",
|
|
8207
|
+
upstreamName: "graphUniverseTool",
|
|
8208
|
+
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.",
|
|
8209
|
+
input: {
|
|
8210
|
+
note: import_zod4.z.string().min(1),
|
|
8211
|
+
vault: import_zod4.z.string().optional(),
|
|
8212
|
+
depth: import_zod4.z.number().int().min(0).max(6).optional(),
|
|
8213
|
+
maxNodes: import_zod4.z.number().int().min(1).max(500).optional()
|
|
8214
|
+
},
|
|
8215
|
+
output: {
|
|
8216
|
+
ok: import_zod4.z.boolean(),
|
|
8217
|
+
root: import_zod4.z.string().optional(),
|
|
8218
|
+
depth: import_zod4.z.number().optional(),
|
|
8219
|
+
truncated: import_zod4.z.boolean().optional(),
|
|
8220
|
+
nodes: import_zod4.z.array(import_zod4.z.object({ id: import_zod4.z.string(), vault: import_zod4.z.string(), path: import_zod4.z.string(), title: import_zod4.z.string(), resolved: import_zod4.z.boolean() })).optional(),
|
|
8221
|
+
edges: import_zod4.z.array(import_zod4.z.object({ source: import_zod4.z.string(), target: import_zod4.z.string(), type: import_zod4.z.string(), evidence: import_zod4.z.string(), sourceField: import_zod4.z.string(), resolved: import_zod4.z.boolean() })).optional(),
|
|
8222
|
+
error: import_zod4.z.string().optional()
|
|
8223
|
+
},
|
|
8224
|
+
annotations: { title: "Memory Graph Universe", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
8225
|
+
};
|
|
7763
8226
|
var LibraryIngestSchema = {
|
|
7764
8227
|
id: "library-ingest",
|
|
7765
8228
|
upstreamName: "libraryIngestTool",
|
|
7766
8229
|
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.",
|
|
7767
8230
|
input: {
|
|
7768
8231
|
vault: import_zod4.z.string().optional().describe(
|
|
7769
|
-
|
|
8232
|
+
"Vault to deposit into. Optional and normally omitted: raw scrapes always default to Library. Override only for a deliberate nonstandard migration."
|
|
7770
8233
|
),
|
|
7771
8234
|
title: import_zod4.z.string().min(1).describe("Short human-readable title for the item; used to build the stored path. Must be non-empty."),
|
|
7772
8235
|
content: import_zod4.z.string().min(1).describe("The full captured text (scrape/transcript/output) to store and index. Must be non-empty."),
|
|
7773
8236
|
source: import_zod4.z.string().min(1).describe("Provenance of the content, e.g. a URL or tool name. Must be non-empty."),
|
|
7774
8237
|
capturedAt: import_zod4.z.string().optional().describe("ISO-8601 capture timestamp. Optional; defaults to now. Also seeds the deterministic storage path."),
|
|
8238
|
+
summary: import_zod4.z.string().optional().describe("Retrieval-ready source summary. Optional; a provenance summary is generated when omitted."),
|
|
8239
|
+
tags: import_zod4.z.array(import_zod4.z.string()).max(8).optional().describe("Reviewed canonical tags. Existing tags should be resolved first; when omitted, deterministic source/topic tags are generated."),
|
|
8240
|
+
related: import_zod4.z.array(import_zod4.z.string()).optional().describe("Reviewed same-vault Library note paths."),
|
|
8241
|
+
relatedVaultNotes: import_zod4.z.array(import_zod4.z.string()).optional().describe("Reviewed cross-vault references in Vault::path.md form."),
|
|
7775
8242
|
localVaultPath: import_zod4.z.string().optional().describe("Filesystem root to also mirror the item to. Optional; falls back to MEMORY_LOCAL_VAULT_ROOT env when set.")
|
|
7776
8243
|
},
|
|
7777
8244
|
output: {
|
|
@@ -7781,6 +8248,7 @@ var LibraryIngestSchema = {
|
|
|
7781
8248
|
path: import_zod4.z.string().optional().describe("Vault-relative path the item was stored at (under library/...)."),
|
|
7782
8249
|
indexed: import_zod4.z.number().optional().describe("Number of search chunks indexed (0 if embedding failed but the note still saved)."),
|
|
7783
8250
|
dualWritten: import_zod4.z.boolean().optional().describe("True if the item was also mirrored to the local filesystem vault."),
|
|
8251
|
+
nextStep: import_zod4.z.string().optional().describe("Recommended extraction action after the raw Library source is safe."),
|
|
7784
8252
|
code: import_zod4.z.string().optional().describe("Machine-readable denial code when ok is false: quota_exceeded or free_cost_cap."),
|
|
7785
8253
|
error: import_zod4.z.string().optional().describe("Human-readable failure reason when ok is false.")
|
|
7786
8254
|
},
|
|
@@ -7858,10 +8326,27 @@ var ExportSchema = {
|
|
|
7858
8326
|
openWorldHint: false
|
|
7859
8327
|
}
|
|
7860
8328
|
};
|
|
8329
|
+
var getTool_notePropsSchema = import_zod4.z.object({
|
|
8330
|
+
status: import_zod4.z.string().describe("Status enum value from the target vault contract."),
|
|
8331
|
+
summary: import_zod4.z.string().describe("Short retrieval-ready description."),
|
|
8332
|
+
tags: import_zod4.z.array(import_zod4.z.string()).describe("AI-generated keyword tags, not vault names."),
|
|
8333
|
+
pinned: import_zod4.z.boolean().describe("Recall boost for important notes."),
|
|
8334
|
+
source_type: import_zod4.z.string().describe("Attribution kind: user, person, url, file, channel, thread, or note."),
|
|
8335
|
+
source_ref: import_zod4.z.string().describe("Attribution reference (URL, path, channel, thread, or source note)."),
|
|
8336
|
+
related: import_zod4.z.array(import_zod4.z.string()).describe("Same-vault links (wiki [[ ]] targets)."),
|
|
8337
|
+
related_vault_notes: import_zod4.z.array(import_zod4.z.string()).describe('Cross-vault references in "Vault Name::relative/path.md" form.'),
|
|
8338
|
+
embed: import_zod4.z.boolean().describe("Whether Smart RAG should index the note."),
|
|
8339
|
+
embed_priority: import_zod4.z.enum(["low", "normal", "high"]).describe("Embedding priority."),
|
|
8340
|
+
embedding_summary: import_zod4.z.string().describe("Optional retrieval-specific summary."),
|
|
8341
|
+
type: import_zod4.z.string().describe("Note type from the target vault contract (also used to route the note)."),
|
|
8342
|
+
domain: import_zod4.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
|
|
8343
|
+
folder: import_zod4.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
|
|
8344
|
+
parentMessageId: import_zod4.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
|
|
8345
|
+
}).partial().passthrough();
|
|
7861
8346
|
var GetSchema = {
|
|
7862
8347
|
id: "memory-get",
|
|
7863
8348
|
upstreamName: "getTool",
|
|
7864
|
-
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.",
|
|
8349
|
+
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.",
|
|
7865
8350
|
input: {
|
|
7866
8351
|
vault: import_zod4.z.string().optional().describe(
|
|
7867
8352
|
"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."
|
|
@@ -7881,6 +8366,7 @@ var GetSchema = {
|
|
|
7881
8366
|
capturedAt: import_zod4.z.string().describe("ISO-8601 timestamp of when the note was first captured."),
|
|
7882
8367
|
revision: import_zod4.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."),
|
|
7883
8368
|
updatedBy: import_zod4.z.string().nullable().describe("Identity that made the last write, if known."),
|
|
8369
|
+
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."),
|
|
7884
8370
|
sharedBy: import_zod4.z.string().optional().describe("Present only when read via shareId: the identity who owns and shared this note."),
|
|
7885
8371
|
othersEditing: import_zod4.z.array(import_zod4.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.")
|
|
7886
8372
|
}).optional().describe("The full note. Present when ok is true."),
|
|
@@ -7928,7 +8414,7 @@ var ListSchema = {
|
|
|
7928
8414
|
openWorldHint: false
|
|
7929
8415
|
}
|
|
7930
8416
|
};
|
|
7931
|
-
var
|
|
8417
|
+
var putTool_notePropsSchema = import_zod4.z.object({
|
|
7932
8418
|
status: import_zod4.z.string().describe("Status enum value from the target vault contract."),
|
|
7933
8419
|
summary: import_zod4.z.string().describe("Short retrieval-ready description."),
|
|
7934
8420
|
tags: import_zod4.z.array(import_zod4.z.string()).describe("AI-generated keyword tags, not vault names."),
|
|
@@ -7944,7 +8430,7 @@ var notePropsSchema = import_zod4.z.object({
|
|
|
7944
8430
|
domain: import_zod4.z.string().describe("Domain folder for Library/Knowledge (AI, SEO, Copywriting & Ads, Business, Spirituality)."),
|
|
7945
8431
|
folder: import_zod4.z.string().describe("Explicit sub-folder within the vault; overrides routing-derived folder."),
|
|
7946
8432
|
parentMessageId: import_zod4.z.string().describe("Channel messages only: the path of the top-level message this is a reply to. Absent on top-level messages.")
|
|
7947
|
-
}).partial();
|
|
8433
|
+
}).partial().passthrough();
|
|
7948
8434
|
var PutSchema = {
|
|
7949
8435
|
id: "memory-put",
|
|
7950
8436
|
upstreamName: "putTool",
|
|
@@ -7957,7 +8443,7 @@ var PutSchema = {
|
|
|
7957
8443
|
shareId: import_zod4.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."),
|
|
7958
8444
|
title: import_zod4.z.string().optional().describe("Optional human-readable title; defaults are derived from the path when omitted."),
|
|
7959
8445
|
content: import_zod4.z.string().min(1).describe("The full note body to store and index for semantic search. Must be non-empty."),
|
|
7960
|
-
props:
|
|
8446
|
+
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."),
|
|
7961
8447
|
baseRevision: import_zod4.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).")
|
|
7962
8448
|
},
|
|
7963
8449
|
output: {
|
|
@@ -8571,6 +9057,51 @@ var QueryTableSchema = {
|
|
|
8571
9057
|
openWorldHint: false
|
|
8572
9058
|
}
|
|
8573
9059
|
};
|
|
9060
|
+
var ListTagsSchema = {
|
|
9061
|
+
id: "list-memory-tags",
|
|
9062
|
+
upstreamName: "listTagsTool",
|
|
9063
|
+
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.",
|
|
9064
|
+
input: {
|
|
9065
|
+
includeDeprecated: import_zod4.z.boolean().optional()
|
|
9066
|
+
},
|
|
9067
|
+
output: {
|
|
9068
|
+
ok: import_zod4.z.boolean(),
|
|
9069
|
+
tags: import_zod4.z.array(import_zod4.z.object({ tag: import_zod4.z.string(), description: import_zod4.z.string().nullable(), aliases: import_zod4.z.array(import_zod4.z.string()), status: import_zod4.z.enum(["active", "deprecated"]), usageCount: import_zod4.z.number(), vaultUsage: import_zod4.z.record(import_zod4.z.number()) })).optional(),
|
|
9070
|
+
error: import_zod4.z.string().optional()
|
|
9071
|
+
},
|
|
9072
|
+
annotations: { title: "List Memory Tags", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
9073
|
+
};
|
|
9074
|
+
var ResolveTagsSchema = {
|
|
9075
|
+
id: "resolve-memory-tags",
|
|
9076
|
+
upstreamName: "resolveTagsTool",
|
|
9077
|
+
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.",
|
|
9078
|
+
input: {
|
|
9079
|
+
candidates: import_zod4.z.array(import_zod4.z.object({ tag: import_zod4.z.string().min(1), central: import_zod4.z.boolean().optional(), reusable: import_zod4.z.boolean().optional(), description: import_zod4.z.string().optional() })).min(1).max(20)
|
|
9080
|
+
},
|
|
9081
|
+
output: {
|
|
9082
|
+
ok: import_zod4.z.boolean(),
|
|
9083
|
+
resolutions: import_zod4.z.array(import_zod4.z.object({ candidate: import_zod4.z.string(), normalized: import_zod4.z.string(), action: import_zod4.z.enum(["reuse", "create", "omit"]), tag: import_zod4.z.string().optional(), matchedBy: import_zod4.z.enum(["exact", "alias", "near"]).optional(), score: import_zod4.z.number().optional(), reason: import_zod4.z.string() })).optional(),
|
|
9084
|
+
error: import_zod4.z.string().optional()
|
|
9085
|
+
},
|
|
9086
|
+
annotations: { title: "Resolve Memory Tags", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
9087
|
+
};
|
|
9088
|
+
var UpsertTagSchema = {
|
|
9089
|
+
id: "upsert-memory-tag",
|
|
9090
|
+
upstreamName: "upsertTagTool",
|
|
9091
|
+
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.",
|
|
9092
|
+
input: {
|
|
9093
|
+
tag: import_zod4.z.string().min(1),
|
|
9094
|
+
description: import_zod4.z.string().optional(),
|
|
9095
|
+
aliases: import_zod4.z.array(import_zod4.z.string()).optional(),
|
|
9096
|
+
status: import_zod4.z.enum(["active", "deprecated"]).optional()
|
|
9097
|
+
},
|
|
9098
|
+
output: {
|
|
9099
|
+
ok: import_zod4.z.boolean(),
|
|
9100
|
+
tag: import_zod4.z.object({ tag: import_zod4.z.string(), description: import_zod4.z.string().nullable(), aliases: import_zod4.z.array(import_zod4.z.string()), status: import_zod4.z.enum(["active", "deprecated"]) }).optional(),
|
|
9101
|
+
error: import_zod4.z.string().optional()
|
|
9102
|
+
},
|
|
9103
|
+
annotations: { title: "Upsert Memory Tag", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
9104
|
+
};
|
|
8574
9105
|
var AddVaultSchema = {
|
|
8575
9106
|
id: "add-vault",
|
|
8576
9107
|
upstreamName: "addVaultTool",
|
|
@@ -8638,6 +9169,21 @@ var DeleteVaultSchema = {
|
|
|
8638
9169
|
openWorldHint: false
|
|
8639
9170
|
}
|
|
8640
9171
|
};
|
|
9172
|
+
var GetVaultContractSchema = {
|
|
9173
|
+
id: "get-vault-contract",
|
|
9174
|
+
upstreamName: "getVaultContractTool",
|
|
9175
|
+
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.",
|
|
9176
|
+
input: {
|
|
9177
|
+
vault: import_zod4.z.string().describe("One governed vault: Ideas, Inspiration, Knowledge, Library, People, Communications, Calendar, Tasks, Projects, Issues, Improvement Log, Experiments, or Sprint.")
|
|
9178
|
+
},
|
|
9179
|
+
output: {
|
|
9180
|
+
ok: import_zod4.z.boolean(),
|
|
9181
|
+
vault: import_zod4.z.string().optional(),
|
|
9182
|
+
contract: import_zod4.z.record(import_zod4.z.unknown()).optional(),
|
|
9183
|
+
error: import_zod4.z.string().optional()
|
|
9184
|
+
},
|
|
9185
|
+
annotations: { title: "Get Vault Contract", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
9186
|
+
};
|
|
8641
9187
|
var ListSharedWithMeSchema = {
|
|
8642
9188
|
id: "list-shared-with-me",
|
|
8643
9189
|
upstreamName: "listSharedWithMeTool",
|
|
@@ -8722,6 +9268,26 @@ var ProvisionDefaultsSchema = {
|
|
|
8722
9268
|
openWorldHint: false
|
|
8723
9269
|
}
|
|
8724
9270
|
};
|
|
9271
|
+
var RouteMemorySchema = {
|
|
9272
|
+
id: "route-memory",
|
|
9273
|
+
upstreamName: "routeMemoryTool",
|
|
9274
|
+
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.",
|
|
9275
|
+
input: {
|
|
9276
|
+
title: import_zod4.z.string().min(1),
|
|
9277
|
+
content: import_zod4.z.string().min(1),
|
|
9278
|
+
type: import_zod4.z.string().optional(),
|
|
9279
|
+
source: import_zod4.z.string().optional()
|
|
9280
|
+
},
|
|
9281
|
+
output: {
|
|
9282
|
+
ok: import_zod4.z.boolean(),
|
|
9283
|
+
vault: import_zod4.z.string().optional(),
|
|
9284
|
+
folder: import_zod4.z.string().optional(),
|
|
9285
|
+
reason: import_zod4.z.string().optional(),
|
|
9286
|
+
contract: import_zod4.z.record(import_zod4.z.unknown()).optional(),
|
|
9287
|
+
error: import_zod4.z.string().optional()
|
|
9288
|
+
},
|
|
9289
|
+
annotations: { title: "Route Memory", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
9290
|
+
};
|
|
8725
9291
|
var VideoAnalyzeStartSchema = {
|
|
8726
9292
|
id: "video-analyze-start",
|
|
8727
9293
|
upstreamName: "videoAnalyzeStartTool",
|
|
@@ -8844,7 +9410,10 @@ var MEMORY_TOOL_SCHEMAS = [
|
|
|
8844
9410
|
SwapVaultSchema,
|
|
8845
9411
|
SwitchAccountSchema,
|
|
8846
9412
|
UnlinkShareSchema,
|
|
9413
|
+
MemoryCaptureSchema,
|
|
8847
9414
|
MemoryQuestionsSchema,
|
|
9415
|
+
PrepareMemoryWriteSchema,
|
|
9416
|
+
ValidateMemoryWriteSchema,
|
|
8848
9417
|
CreateChannelSchema,
|
|
8849
9418
|
GetMessageNoteSchema,
|
|
8850
9419
|
ListChannelMembersSchema,
|
|
@@ -8857,6 +9426,9 @@ var MEMORY_TOOL_SCHEMAS = [
|
|
|
8857
9426
|
ReplyMessageSchema,
|
|
8858
9427
|
FactHistorySchema,
|
|
8859
9428
|
RecordFactSchema,
|
|
9429
|
+
NoteBacklinksSchema,
|
|
9430
|
+
GraphPathSchema,
|
|
9431
|
+
GraphUniverseSchema,
|
|
8860
9432
|
LibraryIngestSchema,
|
|
8861
9433
|
DeleteNoteSchema,
|
|
8862
9434
|
ExportSchema,
|
|
@@ -8886,12 +9458,17 @@ var MEMORY_TOOL_SCHEMAS = [
|
|
|
8886
9458
|
InsertTableRowsSchema,
|
|
8887
9459
|
ListTablesSchema,
|
|
8888
9460
|
QueryTableSchema,
|
|
9461
|
+
ListTagsSchema,
|
|
9462
|
+
ResolveTagsSchema,
|
|
9463
|
+
UpsertTagSchema,
|
|
8889
9464
|
AddVaultSchema,
|
|
8890
9465
|
CreateSecureVaultSchema,
|
|
8891
9466
|
DeleteVaultSchema,
|
|
9467
|
+
GetVaultContractSchema,
|
|
8892
9468
|
ListSharedWithMeSchema,
|
|
8893
9469
|
ListVaultsSchema,
|
|
8894
9470
|
ProvisionDefaultsSchema,
|
|
9471
|
+
RouteMemorySchema,
|
|
8895
9472
|
VideoAnalyzeStartSchema,
|
|
8896
9473
|
VideoAnalyzeStatusSchema,
|
|
8897
9474
|
CreateWebhookSchema,
|