@notus-os/mcp 0.1.18 → 0.1.20
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 +3 -0
- package/dist/bin/notusos-mcp.js +125 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,9 @@ Claude Code and remote MCP clients as an interface to notusOS. Published to npm;
|
|
|
5
5
|
Admins get the full tool surface. Non-admin notusOS team members get read-only tools for their assigned clients; write workflows stay in notusOS.
|
|
6
6
|
|
|
7
7
|
Full documentation lives at [www.notusos.com/documentation](https://www.notusos.com/documentation).
|
|
8
|
+
For the private Luca Wetzel workflow that creates scheduled Content Engine posts
|
|
9
|
+
from structured call-breakdown packages, see
|
|
10
|
+
[create_content_engine_post_package](https://www.notusos.com/documentation/create-content-engine-post-package).
|
|
8
11
|
|
|
9
12
|
## Quick start
|
|
10
13
|
|
package/dist/bin/notusos-mcp.js
CHANGED
|
@@ -18807,7 +18807,7 @@ async function safeErrorMessage(res) {
|
|
|
18807
18807
|
return "";
|
|
18808
18808
|
}
|
|
18809
18809
|
}
|
|
18810
|
-
var import_undici, MAX_RETRIES, RETRY_BASE_MS, AGENT_OPTIONS, ApiClient;
|
|
18810
|
+
var import_undici, MAX_RETRIES, RETRY_BASE_MS, READ_ONLY_MUTATION_PATHS, AGENT_OPTIONS, ApiClient;
|
|
18811
18811
|
var init_api_client = __esm({
|
|
18812
18812
|
"src/api-client/index.ts"() {
|
|
18813
18813
|
"use strict";
|
|
@@ -18816,6 +18816,9 @@ var init_api_client = __esm({
|
|
|
18816
18816
|
init_errors();
|
|
18817
18817
|
MAX_RETRIES = 2;
|
|
18818
18818
|
RETRY_BASE_MS = 400;
|
|
18819
|
+
READ_ONLY_MUTATION_PATHS = /* @__PURE__ */ new Set([
|
|
18820
|
+
"/api/mcp/content-engine-post-packages"
|
|
18821
|
+
]);
|
|
18819
18822
|
AGENT_OPTIONS = {
|
|
18820
18823
|
keepAliveTimeout: 1e3,
|
|
18821
18824
|
keepAliveMaxTimeout: 5e3
|
|
@@ -18856,7 +18859,7 @@ var init_api_client = __esm({
|
|
|
18856
18859
|
return this.request("GET", path, opts);
|
|
18857
18860
|
}
|
|
18858
18861
|
post(path, opts = {}) {
|
|
18859
|
-
this.assertCanMutate();
|
|
18862
|
+
this.assertCanMutate(path);
|
|
18860
18863
|
return this.request("POST", path, { ...opts, mutation: opts.mutation ?? true });
|
|
18861
18864
|
}
|
|
18862
18865
|
patch(path, opts = {}) {
|
|
@@ -18871,8 +18874,8 @@ var init_api_client = __esm({
|
|
|
18871
18874
|
this.assertCanMutate();
|
|
18872
18875
|
return this.request("DELETE", path, { ...opts, mutation: opts.mutation ?? true });
|
|
18873
18876
|
}
|
|
18874
|
-
assertCanMutate() {
|
|
18875
|
-
if (this.accessMode === "read_only") {
|
|
18877
|
+
assertCanMutate(path) {
|
|
18878
|
+
if (this.accessMode === "read_only" && !READ_ONLY_MUTATION_PATHS.has(path ?? "")) {
|
|
18876
18879
|
throw new ApiError(
|
|
18877
18880
|
"FORBIDDEN",
|
|
18878
18881
|
403,
|
|
@@ -40146,9 +40149,10 @@ var init_comments = __esm({
|
|
|
40146
40149
|
// src/tools/content-engine.ts
|
|
40147
40150
|
var content_engine_exports = {};
|
|
40148
40151
|
__export(content_engine_exports, {
|
|
40152
|
+
create_content_engine_post_package: () => create_content_engine_post_package,
|
|
40149
40153
|
get_content_engine: () => get_content_engine
|
|
40150
40154
|
});
|
|
40151
|
-
var getContentEngineSchema, get_content_engine;
|
|
40155
|
+
var getContentEngineSchema, pillarSchema, visualStatusSchema, ideaMediaSchema, createContentEnginePostPackageSchema, get_content_engine, create_content_engine_post_package;
|
|
40152
40156
|
var init_content_engine = __esm({
|
|
40153
40157
|
"src/tools/content-engine.ts"() {
|
|
40154
40158
|
"use strict";
|
|
@@ -40156,6 +40160,93 @@ var init_content_engine = __esm({
|
|
|
40156
40160
|
init_tools();
|
|
40157
40161
|
init_shared();
|
|
40158
40162
|
getContentEngineSchema = external_exports.object({ ...clientTarget });
|
|
40163
|
+
pillarSchema = external_exports.enum(["aspirational", "insightful", "personal", "tactical"]);
|
|
40164
|
+
visualStatusSchema = external_exports.enum([
|
|
40165
|
+
"needs_visual",
|
|
40166
|
+
"visual_in_progress",
|
|
40167
|
+
"visual_review",
|
|
40168
|
+
"visual_revision",
|
|
40169
|
+
"visual_approved"
|
|
40170
|
+
]);
|
|
40171
|
+
ideaMediaSchema = external_exports.object({
|
|
40172
|
+
type: external_exports.enum(["image", "video"]),
|
|
40173
|
+
url: external_exports.string().url(),
|
|
40174
|
+
path: external_exports.string().min(1),
|
|
40175
|
+
fileName: external_exports.string().min(1),
|
|
40176
|
+
fileSize: external_exports.number().nonnegative(),
|
|
40177
|
+
mimeType: external_exports.string().min(1),
|
|
40178
|
+
uploadedAt: external_exports.string().optional()
|
|
40179
|
+
}).strict();
|
|
40180
|
+
createContentEnginePostPackageSchema = external_exports.object({
|
|
40181
|
+
...clientTarget,
|
|
40182
|
+
contentPiece: external_exports.object({
|
|
40183
|
+
title: external_exports.string().min(1).max(200),
|
|
40184
|
+
ideaText: external_exports.string().min(1).max(2e4),
|
|
40185
|
+
ideaExcerpt: external_exports.string().min(1).max(2e3),
|
|
40186
|
+
pillar: pillarSchema,
|
|
40187
|
+
status: external_exports.literal("scheduled"),
|
|
40188
|
+
visualStatus: visualStatusSchema,
|
|
40189
|
+
source: external_exports.object({
|
|
40190
|
+
contentSourceId: external_exports.string().uuid().nullable(),
|
|
40191
|
+
ideaIndex: external_exports.number().int().min(0).nullable(),
|
|
40192
|
+
origin: external_exports.literal("mcp_call_breakdown")
|
|
40193
|
+
}).strict()
|
|
40194
|
+
}).strict(),
|
|
40195
|
+
post: external_exports.object({
|
|
40196
|
+
body: external_exports.string().min(1).max(2e4),
|
|
40197
|
+
sourceType: external_exports.literal("manual"),
|
|
40198
|
+
format: external_exports.enum(["text", "image", "video"]),
|
|
40199
|
+
media: external_exports.object({
|
|
40200
|
+
imageUrls: external_exports.array(external_exports.string().url()).max(20),
|
|
40201
|
+
videoUrl: external_exports.string().url().nullable(),
|
|
40202
|
+
ideaMedia: external_exports.array(ideaMediaSchema).max(20)
|
|
40203
|
+
}).strict(),
|
|
40204
|
+
qualityMetadata: external_exports.object({
|
|
40205
|
+
hook: external_exports.string().min(1).max(1e3),
|
|
40206
|
+
angle: external_exports.string().min(1).max(1e3),
|
|
40207
|
+
targetAudience: external_exports.string().min(1).max(1e3),
|
|
40208
|
+
cta: external_exports.string().max(1e3).nullable(),
|
|
40209
|
+
notes: external_exports.string().max(2e3).nullable()
|
|
40210
|
+
}).strict()
|
|
40211
|
+
}).strict(),
|
|
40212
|
+
schedule: external_exports.object({
|
|
40213
|
+
publishDate: external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
40214
|
+
calendarStatus: external_exports.literal("scheduled"),
|
|
40215
|
+
publishToLinkedIn: external_exports.literal(false)
|
|
40216
|
+
}).strict(),
|
|
40217
|
+
dryRun: external_exports.boolean().optional()
|
|
40218
|
+
}).strict().superRefine((value, ctx) => {
|
|
40219
|
+
if (value.post.format === "text") {
|
|
40220
|
+
if (value.post.media.imageUrls.length > 0 || value.post.media.videoUrl || value.post.media.ideaMedia.length > 0) {
|
|
40221
|
+
ctx.addIssue({
|
|
40222
|
+
code: external_exports.ZodIssueCode.custom,
|
|
40223
|
+
path: ["post", "media"],
|
|
40224
|
+
message: "Text posts must not include media."
|
|
40225
|
+
});
|
|
40226
|
+
}
|
|
40227
|
+
}
|
|
40228
|
+
if (value.post.format === "image" && value.post.media.videoUrl) {
|
|
40229
|
+
ctx.addIssue({
|
|
40230
|
+
code: external_exports.ZodIssueCode.custom,
|
|
40231
|
+
path: ["post", "media", "videoUrl"],
|
|
40232
|
+
message: "Image posts cannot include videoUrl."
|
|
40233
|
+
});
|
|
40234
|
+
}
|
|
40235
|
+
if (value.post.format === "video" && value.post.media.imageUrls.length > 0) {
|
|
40236
|
+
ctx.addIssue({
|
|
40237
|
+
code: external_exports.ZodIssueCode.custom,
|
|
40238
|
+
path: ["post", "media", "imageUrls"],
|
|
40239
|
+
message: "Video posts cannot include imageUrls."
|
|
40240
|
+
});
|
|
40241
|
+
}
|
|
40242
|
+
if (value.contentPiece.source.contentSourceId === null && value.contentPiece.source.ideaIndex !== null) {
|
|
40243
|
+
ctx.addIssue({
|
|
40244
|
+
code: external_exports.ZodIssueCode.custom,
|
|
40245
|
+
path: ["contentPiece", "source", "ideaIndex"],
|
|
40246
|
+
message: "ideaIndex requires contentSourceId."
|
|
40247
|
+
});
|
|
40248
|
+
}
|
|
40249
|
+
});
|
|
40159
40250
|
get_content_engine = {
|
|
40160
40251
|
name: "get_content_engine",
|
|
40161
40252
|
description: "DFY content-engine view for a client: sources \u2192 extracted ideas \u2192 content pieces \u2192 drafts \u2192 published. Matches the /content-engine page.",
|
|
@@ -40166,7 +40257,19 @@ var init_content_engine = __esm({
|
|
|
40166
40257
|
});
|
|
40167
40258
|
}
|
|
40168
40259
|
};
|
|
40169
|
-
|
|
40260
|
+
create_content_engine_post_package = {
|
|
40261
|
+
name: "create_content_engine_post_package",
|
|
40262
|
+
description: `Luca Wetzel-only workflow: create a scheduled Content Engine post package from a call breakdown. Requires a strict nested JSON package and writes server-derived content_pieces, conversations, posts, calendar, and post-workspace state. Use dryRun=true first to inspect derived internal rows. Required shape: { clientUserId, clientOrganizationId, appMode?, contentPiece: { title, ideaText, ideaExcerpt, pillar: aspirational|insightful|personal|tactical, status: "scheduled", visualStatus, source: { contentSourceId, ideaIndex, origin: "mcp_call_breakdown" } }, post: { body, sourceType: "manual", format: text|image|video, media: { imageUrls, videoUrl, ideaMedia }, qualityMetadata: { hook, angle, targetAudience, cta, notes } }, schedule: { publishDate: "YYYY-MM-DD", calendarStatus: "scheduled", publishToLinkedIn: false }, dryRun? }. Do not provide source_metadata, image_suggestion, suggestion_segments, deleted_at, timestamps, LinkedIn publish internals, or workspace IDs; the server derives them.`,
|
|
40263
|
+
inputSchema: createContentEnginePostPackageSchema,
|
|
40264
|
+
handler: async (args, ctx) => {
|
|
40265
|
+
const { clientUserId, clientOrganizationId, appMode, ...body } = args;
|
|
40266
|
+
return ctx.api.post("/api/mcp/content-engine-post-packages", {
|
|
40267
|
+
body,
|
|
40268
|
+
clientContext: toClientContext({ clientUserId, clientOrganizationId, appMode })
|
|
40269
|
+
});
|
|
40270
|
+
}
|
|
40271
|
+
};
|
|
40272
|
+
registerTools(get_content_engine, create_content_engine_post_package);
|
|
40170
40273
|
}
|
|
40171
40274
|
});
|
|
40172
40275
|
|
|
@@ -40938,16 +41041,18 @@ var init_analytics_deep = __esm({
|
|
|
40938
41041
|
getIcpPostSchema = external_exports.object({
|
|
40939
41042
|
...clientTarget,
|
|
40940
41043
|
postUrn: external_exports.string(),
|
|
40941
|
-
forceRefresh: external_exports.boolean().optional()
|
|
41044
|
+
forceRefresh: external_exports.boolean().optional(),
|
|
41045
|
+
page: external_exports.number().int().min(1).optional(),
|
|
41046
|
+
limit: external_exports.number().int().min(1).max(100).optional()
|
|
40942
41047
|
});
|
|
40943
41048
|
get_icp_post_engagement = {
|
|
40944
41049
|
name: "get_icp_post_engagement",
|
|
40945
|
-
description: "ICP engagement breakdown for a single LinkedIn post URN.
|
|
41050
|
+
description: "Paginated ICP engagement breakdown for a single LinkedIn post URN. Returns up to 100 engagers per page with total, count, has_more, and next_page. Use page/limit to walk giant posts such as Nespresso, Saks, Nike, or Apple until has_more is false.",
|
|
40946
41051
|
inputSchema: getIcpPostSchema,
|
|
40947
41052
|
handler: async (args, ctx) => {
|
|
40948
|
-
const { clientUserId, clientOrganizationId, appMode, postUrn, forceRefresh } = args;
|
|
41053
|
+
const { clientUserId, clientOrganizationId, appMode, postUrn, forceRefresh, page = 1, limit = 100 } = args;
|
|
40949
41054
|
return ctx.api.get("/api/analytics/icp", {
|
|
40950
|
-
query: compact({ postUrn, forceRefresh }),
|
|
41055
|
+
query: compact({ postUrn, forceRefresh, page, limit }),
|
|
40951
41056
|
clientContext: toClientContext({ clientUserId, clientOrganizationId, appMode })
|
|
40952
41057
|
});
|
|
40953
41058
|
}
|
|
@@ -41642,8 +41747,8 @@ var DEFAULT_MAX_TOOL_RESULT_CHARS, ARRAY_PREVIEW_ITEMS, MAX_STRING_CHARS, MAX_OB
|
|
|
41642
41747
|
var init_tool_result = __esm({
|
|
41643
41748
|
"src/tool-result.ts"() {
|
|
41644
41749
|
"use strict";
|
|
41645
|
-
DEFAULT_MAX_TOOL_RESULT_CHARS =
|
|
41646
|
-
ARRAY_PREVIEW_ITEMS =
|
|
41750
|
+
DEFAULT_MAX_TOOL_RESULT_CHARS = 2e5;
|
|
41751
|
+
ARRAY_PREVIEW_ITEMS = 100;
|
|
41647
41752
|
MAX_STRING_CHARS = 8e3;
|
|
41648
41753
|
MAX_OBJECT_KEYS = 80;
|
|
41649
41754
|
}
|
|
@@ -41657,6 +41762,7 @@ function getToolAccess(name) {
|
|
|
41657
41762
|
}
|
|
41658
41763
|
function isToolAllowed(name, accessMode) {
|
|
41659
41764
|
if (accessMode === "full") return true;
|
|
41765
|
+
if (READ_ONLY_ALLOWED_WRITE_TOOL_NAMES.has(name)) return true;
|
|
41660
41766
|
return getToolAccess(name) === "read";
|
|
41661
41767
|
}
|
|
41662
41768
|
function isToolReadOnly(name) {
|
|
@@ -41665,7 +41771,7 @@ function isToolReadOnly(name) {
|
|
|
41665
41771
|
function isToolDestructive(name) {
|
|
41666
41772
|
return DESTRUCTIVE_TOOL_NAMES.has(name);
|
|
41667
41773
|
}
|
|
41668
|
-
var WRITE_TOOL_NAMES, ADMIN_TOOL_NAMES, DESTRUCTIVE_TOOL_NAMES;
|
|
41774
|
+
var WRITE_TOOL_NAMES, READ_ONLY_ALLOWED_WRITE_TOOL_NAMES, ADMIN_TOOL_NAMES, DESTRUCTIVE_TOOL_NAMES;
|
|
41669
41775
|
var init_permissions = __esm({
|
|
41670
41776
|
"src/tools/permissions.ts"() {
|
|
41671
41777
|
"use strict";
|
|
@@ -41674,6 +41780,7 @@ var init_permissions = __esm({
|
|
|
41674
41780
|
"chat_with_ai",
|
|
41675
41781
|
"create_client_resource",
|
|
41676
41782
|
"create_content_piece",
|
|
41783
|
+
"create_content_engine_post_package",
|
|
41677
41784
|
"create_content_source",
|
|
41678
41785
|
"create_image_folder",
|
|
41679
41786
|
"create_post",
|
|
@@ -41719,6 +41826,9 @@ var init_permissions = __esm({
|
|
|
41719
41826
|
"update_resource_status",
|
|
41720
41827
|
"update_setup_checkpoint"
|
|
41721
41828
|
]);
|
|
41829
|
+
READ_ONLY_ALLOWED_WRITE_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
41830
|
+
"create_content_engine_post_package"
|
|
41831
|
+
]);
|
|
41722
41832
|
ADMIN_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
41723
41833
|
"list_excluded_clients",
|
|
41724
41834
|
"manage_exclusions",
|
|
@@ -41926,7 +42036,7 @@ var init_server3 = __esm({
|
|
|
41926
42036
|
init_permissions();
|
|
41927
42037
|
init_logger();
|
|
41928
42038
|
SERVER_NAME = "notusos-mcp";
|
|
41929
|
-
SERVER_VERSION = true ? "0.1.
|
|
42039
|
+
SERVER_VERSION = true ? "0.1.20" : "dev";
|
|
41930
42040
|
}
|
|
41931
42041
|
});
|
|
41932
42042
|
|
|
@@ -42228,7 +42338,7 @@ function loadConfig(env = process.env) {
|
|
|
42228
42338
|
// bin/notusos-mcp.ts
|
|
42229
42339
|
init_token_store();
|
|
42230
42340
|
init_logger();
|
|
42231
|
-
var MCP_VERSION = true ? "0.1.
|
|
42341
|
+
var MCP_VERSION = true ? "0.1.20" : "dev";
|
|
42232
42342
|
async function main() {
|
|
42233
42343
|
const [, , sub] = process.argv;
|
|
42234
42344
|
const config2 = loadConfig();
|