@nooticr/mcp 1.26.21 → 1.26.22
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/README.md +4 -0
- package/dist/shared/connections.js +8 -0
- package/dist/shared/jobs.js +52 -5
- package/dist/shared/loading-plans.js +365 -0
- package/dist/shared/output-schemas.js +13 -0
- package/dist/shared/own-account.js +2 -0
- package/dist/shared/spend.js +12 -0
- package/dist/shared/tools-def.js +12 -12
- package/dist/shared/tools.js +34 -4
- package/dist/shared/ui-template.js +1126 -79
- package/package.json +1 -1
package/dist/shared/tools.js
CHANGED
|
@@ -20,10 +20,11 @@ import { registerJobTools } from "./jobs.js";
|
|
|
20
20
|
import { registerBrandWatch } from "./brand-watch.js";
|
|
21
21
|
import { registerOwnAccountTools } from "./own-account.js";
|
|
22
22
|
import { registerConnectionTools } from "./connections.js";
|
|
23
|
+
import { loadingPlansJson } from "./loading-plans.js";
|
|
23
24
|
import { registerHandoff } from "./handoff.js";
|
|
24
25
|
import { registerCollabTools } from "./collab.js";
|
|
25
26
|
/** Current MCP server version — bumped on every deploy for traceability. */
|
|
26
|
-
export const MCP_SERVER_VERSION = "1.26.
|
|
27
|
+
export const MCP_SERVER_VERSION = "1.26.22";
|
|
27
28
|
/** MCP Apps extension identifier */
|
|
28
29
|
const UI_EXTENSION = "io.modelcontextprotocol/ui";
|
|
29
30
|
/** MIME type for MCP Apps HTML resources */
|
|
@@ -58,8 +59,28 @@ function uiResource(tool) {
|
|
|
58
59
|
* "Interactive View" and a generic placeholder while Claude, whose URL carries
|
|
59
60
|
* the URI, named the tool. The server is the one party that always knows.
|
|
60
61
|
*/
|
|
62
|
+
/**
|
|
63
|
+
* The view, with the two things it cannot work out for itself baked in.
|
|
64
|
+
*
|
|
65
|
+
* The tool name, because a host that serves this HTML from its own URL leaves
|
|
66
|
+
* no ui:// path to read one out of. And the loading plans, because the view is
|
|
67
|
+
* a static string with no imports and the alternative — a price list copied by
|
|
68
|
+
* hand — was wrong about six tools within a day of being written.
|
|
69
|
+
*/
|
|
70
|
+
const LOADING_PLANS_JSON = loadingPlansJson();
|
|
71
|
+
/**
|
|
72
|
+
* The view as a host actually receives it, for tests and tooling.
|
|
73
|
+
*
|
|
74
|
+
* The raw NOOTICR_UI_TEMPLATE still carries its `__NOOTICR_PLANS__`
|
|
75
|
+
* placeholder, so a browser test that renders it directly gets a view with no
|
|
76
|
+
* prices and no ledger — passing while the real thing is broken. Anything
|
|
77
|
+
* that renders the template outside the server should come through here.
|
|
78
|
+
*/
|
|
79
|
+
export function uiTemplateFor(tool = "") {
|
|
80
|
+
return templateFor(tool);
|
|
81
|
+
}
|
|
61
82
|
function templateFor(tool) {
|
|
62
|
-
return NOOTICR_UI_TEMPLATE.replace("__NOOTICR_TOOL__", tool);
|
|
83
|
+
return NOOTICR_UI_TEMPLATE.replace("__NOOTICR_TOOL__", tool).replace('"__NOOTICR_PLANS__"', LOADING_PLANS_JSON);
|
|
63
84
|
}
|
|
64
85
|
/**
|
|
65
86
|
* The skybridge half of a resource read.
|
|
@@ -504,8 +525,8 @@ export function createMcpServer(rawMakeClient, opts) {
|
|
|
504
525
|
// The playbook text and a finished analysis are exactly the kind of prose
|
|
505
526
|
// get_content_plan already proved the generic fallback (a formatted JSON
|
|
506
527
|
// block) is an acceptable view for — see scripts/host-contract.py for why
|
|
507
|
-
//
|
|
508
|
-
//
|
|
528
|
+
// analyze_product, whose immediate reply is a bare job-start ack, does not
|
|
529
|
+
// get one while the status tool that polls it does.
|
|
509
530
|
"get_brand_playbook",
|
|
510
531
|
"analyze_product_status",
|
|
511
532
|
"review_post",
|
|
@@ -518,6 +539,15 @@ export function createMcpServer(rawMakeClient, opts) {
|
|
|
518
539
|
// shortlist through the creator gallery.
|
|
519
540
|
"prepare_handoff",
|
|
520
541
|
"show_collab_shortlist",
|
|
542
|
+
// The two product writes draw the row they made and what it can reach next
|
|
543
|
+
// — and, for a patch, which fields actually moved, which is the one thing
|
|
544
|
+
// the reply says that prose reliably loses.
|
|
545
|
+
"create_product",
|
|
546
|
+
"update_product",
|
|
547
|
+
// The connection pair (connections.ts). Registered view-less at first; the
|
|
548
|
+
// grant each connection carries is a table, which is what a view is for.
|
|
549
|
+
"list_social_connections",
|
|
550
|
+
"connect_social_account",
|
|
521
551
|
];
|
|
522
552
|
// Human-readable resource name per tool (used in resources/list + tools/list).
|
|
523
553
|
function resourceName(tool) {
|