@notus-os/mcp 0.1.11 → 0.1.13
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/notusos-mcp.js +66 -5
- package/package.json +1 -1
package/dist/bin/notusos-mcp.js
CHANGED
|
@@ -39217,10 +39217,14 @@ __export(analytics_deep_exports, {
|
|
|
39217
39217
|
get_icp_post_engagement: () => get_icp_post_engagement,
|
|
39218
39218
|
get_linkedin_analytics: () => get_linkedin_analytics,
|
|
39219
39219
|
get_mip_history: () => get_mip_history,
|
|
39220
|
+
list_gojiberry_campaigns: () => list_gojiberry_campaigns,
|
|
39220
39221
|
reset_mip: () => reset_mip,
|
|
39221
|
-
run_mip_analysis: () => run_mip_analysis
|
|
39222
|
+
run_mip_analysis: () => run_mip_analysis,
|
|
39223
|
+
set_gojiberry_campaign: () => set_gojiberry_campaign,
|
|
39224
|
+
sync_icp_contacts: () => sync_icp_contacts,
|
|
39225
|
+
sync_icp_contacts_all: () => sync_icp_contacts_all
|
|
39222
39226
|
});
|
|
39223
|
-
var getAnalyticsDeepDiveSchema, get_analytics_deep_dive, getLinkedinAnalyticsSchema, get_linkedin_analytics, getMipHistorySchema, get_mip_history, runMipAnalysisSchema, run_mip_analysis, resetMipSchema, reset_mip, getIcpContactsSchema, get_icp_contacts, getIcpPostSchema, get_icp_post_engagement;
|
|
39227
|
+
var getAnalyticsDeepDiveSchema, get_analytics_deep_dive, getLinkedinAnalyticsSchema, get_linkedin_analytics, getMipHistorySchema, get_mip_history, runMipAnalysisSchema, run_mip_analysis, resetMipSchema, reset_mip, getIcpContactsSchema, get_icp_contacts, syncIcpContactsSchema, sync_icp_contacts, syncIcpContactsAllSchema, sync_icp_contacts_all, listGojiberryCampaignsSchema, list_gojiberry_campaigns, setGojiberryCampaignSchema, set_gojiberry_campaign, getIcpPostSchema, get_icp_post_engagement;
|
|
39224
39228
|
var init_analytics_deep = __esm({
|
|
39225
39229
|
"src/tools/analytics-deep.ts"() {
|
|
39226
39230
|
"use strict";
|
|
@@ -39336,7 +39340,7 @@ var init_analytics_deep = __esm({
|
|
|
39336
39340
|
});
|
|
39337
39341
|
get_icp_contacts = {
|
|
39338
39342
|
name: "get_icp_contacts",
|
|
39339
|
-
description: "Goji-berry ICP contacts for a client (people engaging with their content by intent type). Filter by date range, intent, search, paginated.",
|
|
39343
|
+
description: "Goji-berry ICP contacts for a client (people engaging with their content by intent type). Filter by date range, intent, search, paginated. Response includes a `health` block: { profile_found, gojiberry_agent_id_set, gojiberry_api_key_set, rows_in_table_total, latest_week_start, status }. Status values: 'ok' (data returned), 'no_data_in_window' (table has rows but none in this date range \u2014 widen `days` or remove filter), 'never_synced' (config set but cron/backfill never wrote \u2014 call `sync_icp_contacts`), 'partial_config' / 'no_config' (profile is missing agent_id and/or api_key \u2014 onboarding gap, sync will fail).",
|
|
39340
39344
|
inputSchema: getIcpContactsSchema,
|
|
39341
39345
|
handler: async (args, ctx) => {
|
|
39342
39346
|
const { clientUserId, clientOrganizationId, appMode, ...q } = args;
|
|
@@ -39346,6 +39350,59 @@ var init_analytics_deep = __esm({
|
|
|
39346
39350
|
});
|
|
39347
39351
|
}
|
|
39348
39352
|
};
|
|
39353
|
+
syncIcpContactsSchema = external_exports.object({
|
|
39354
|
+
...clientTarget
|
|
39355
|
+
});
|
|
39356
|
+
sync_icp_contacts = {
|
|
39357
|
+
name: "sync_icp_contacts",
|
|
39358
|
+
description: "Trigger a 26-week backfill of Goji-berry ICP contacts for a single client. Writes new rows into the gojiberry_icp_contacts table. Returns { weeksProcessed, weeksFailed, totalContacts, firstError, postUrnsMatched }. Use when `get_icp_contacts` health.status is 'never_synced' or after fixing a profile's gojiberry_api_key. Fails fast (400) if agent_id or api_key missing on the profile, or 500 if every week's API call fails (firstError holds the cause).",
|
|
39359
|
+
inputSchema: syncIcpContactsSchema,
|
|
39360
|
+
handler: async (args, ctx) => {
|
|
39361
|
+
const { clientUserId, clientOrganizationId, appMode } = args;
|
|
39362
|
+
return ctx.api.post("/api/analytics/gojiberry-backfill", {
|
|
39363
|
+
clientContext: toClientContext({ clientUserId, clientOrganizationId, appMode })
|
|
39364
|
+
});
|
|
39365
|
+
}
|
|
39366
|
+
};
|
|
39367
|
+
syncIcpContactsAllSchema = external_exports.object({});
|
|
39368
|
+
sync_icp_contacts_all = {
|
|
39369
|
+
name: "sync_icp_contacts_all",
|
|
39370
|
+
description: "ADMIN-ONLY. Run the 26-week backfill for EVERY profile that has both gojiberry_agent_id and gojiberry_api_key set. Long-running (minutes). Returns { profilesConfigured, profilesProcessed, totalContacts, durationMs, results: [{ profileId, profileName, totalContacts, weeksFailed, firstError, ... }] }. Use after a Gojiberry outage or to seed history org-wide. Caller must NOT be impersonating; non-admin requests get 403.",
|
|
39371
|
+
inputSchema: syncIcpContactsAllSchema,
|
|
39372
|
+
handler: async (_args, ctx) => {
|
|
39373
|
+
return ctx.api.post("/api/analytics/gojiberry-backfill-all", {});
|
|
39374
|
+
}
|
|
39375
|
+
};
|
|
39376
|
+
listGojiberryCampaignsSchema = external_exports.object({
|
|
39377
|
+
...clientTarget
|
|
39378
|
+
});
|
|
39379
|
+
list_gojiberry_campaigns = {
|
|
39380
|
+
name: "list_gojiberry_campaigns",
|
|
39381
|
+
description: "List the Goji-berry campaigns (\"lists\") available for a client's API key. Returns { lists: [{ id, name, contactCount, createdAt }], selectedListId, apiKeySet, error? }. Use this before `set_gojiberry_campaign` to discover the listId. If `apiKeySet` is false, the profile has no Gojiberry API key \u2014 fix that in /settings/slack first; this tool can't.",
|
|
39382
|
+
inputSchema: listGojiberryCampaignsSchema,
|
|
39383
|
+
handler: async (args, ctx) => {
|
|
39384
|
+
const { clientUserId, clientOrganizationId, appMode } = args;
|
|
39385
|
+
return ctx.api.get("/api/analytics/gojiberry-lists", {
|
|
39386
|
+
clientContext: toClientContext({ clientUserId, clientOrganizationId, appMode })
|
|
39387
|
+
});
|
|
39388
|
+
}
|
|
39389
|
+
};
|
|
39390
|
+
setGojiberryCampaignSchema = external_exports.object({
|
|
39391
|
+
...clientTarget,
|
|
39392
|
+
campaignId: external_exports.string().min(1)
|
|
39393
|
+
});
|
|
39394
|
+
set_gojiberry_campaign = {
|
|
39395
|
+
name: "set_gojiberry_campaign",
|
|
39396
|
+
description: "Set the active Goji-berry campaign (listId) for a client by writing to profiles.gojiberry_agent_id. Pair with `list_gojiberry_campaigns` to look up the right id. After setting, call `sync_icp_contacts` to backfill that campaign's history into the gojiberry_icp_contacts table.",
|
|
39397
|
+
inputSchema: setGojiberryCampaignSchema,
|
|
39398
|
+
handler: async (args, ctx) => {
|
|
39399
|
+
const { clientUserId, clientOrganizationId, appMode, campaignId } = args;
|
|
39400
|
+
return ctx.api.patch("/api/analytics/client-settings", {
|
|
39401
|
+
body: { settings: { gojiberry_agent_id: campaignId } },
|
|
39402
|
+
clientContext: toClientContext({ clientUserId, clientOrganizationId, appMode })
|
|
39403
|
+
});
|
|
39404
|
+
}
|
|
39405
|
+
};
|
|
39349
39406
|
getIcpPostSchema = external_exports.object({
|
|
39350
39407
|
...clientTarget,
|
|
39351
39408
|
postUrn: external_exports.string(),
|
|
@@ -39370,6 +39427,10 @@ var init_analytics_deep = __esm({
|
|
|
39370
39427
|
run_mip_analysis,
|
|
39371
39428
|
reset_mip,
|
|
39372
39429
|
get_icp_contacts,
|
|
39430
|
+
sync_icp_contacts,
|
|
39431
|
+
sync_icp_contacts_all,
|
|
39432
|
+
list_gojiberry_campaigns,
|
|
39433
|
+
set_gojiberry_campaign,
|
|
39373
39434
|
get_icp_post_engagement
|
|
39374
39435
|
);
|
|
39375
39436
|
}
|
|
@@ -40125,7 +40186,7 @@ var init_server3 = __esm({
|
|
|
40125
40186
|
init_tools();
|
|
40126
40187
|
init_logger();
|
|
40127
40188
|
SERVER_NAME = "notusos-mcp";
|
|
40128
|
-
SERVER_VERSION = true ? "0.1.
|
|
40189
|
+
SERVER_VERSION = true ? "0.1.13" : "dev";
|
|
40129
40190
|
}
|
|
40130
40191
|
});
|
|
40131
40192
|
|
|
@@ -40146,7 +40207,7 @@ function loadConfig(env = process.env) {
|
|
|
40146
40207
|
// bin/notusos-mcp.ts
|
|
40147
40208
|
init_token_store();
|
|
40148
40209
|
init_logger();
|
|
40149
|
-
var MCP_VERSION = true ? "0.1.
|
|
40210
|
+
var MCP_VERSION = true ? "0.1.13" : "dev";
|
|
40150
40211
|
async function main() {
|
|
40151
40212
|
const [, , sub] = process.argv;
|
|
40152
40213
|
const config2 = loadConfig();
|