@opennous/mcp 0.44.1 → 0.44.2
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/package.json +1 -1
- package/src/client.js +2 -2
- package/src/index.js +4 -4
- package/src/server.js +14 -2
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -71,8 +71,8 @@ function currentApiUrl() {
|
|
|
71
71
|
export function validateConfig() {
|
|
72
72
|
if (!resolvedEnv("NOUS_API_KEY") && !fileApiKey()) {
|
|
73
73
|
throw new Error(
|
|
74
|
-
"No Nous API key found. Run
|
|
75
|
-
"or set NOUS_API_KEY."
|
|
74
|
+
"No Nous API key found. Run `npx @opennous/cli login` to sign in (or `npx @opennous/cli init` " +
|
|
75
|
+
"to set up from scratch), or set NOUS_API_KEY."
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
}
|
package/src/index.js
CHANGED
|
@@ -17,10 +17,10 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
17
17
|
import { validateConfig } from "./client.js";
|
|
18
18
|
import { createServer } from "./server.js";
|
|
19
19
|
|
|
20
|
-
// Advisory only — don't hard-exit if there's no key yet. The user may
|
|
21
|
-
// the
|
|
22
|
-
// key (resolved per-call from env or ~/.nous/config.json)
|
|
23
|
-
// restart.
|
|
20
|
+
// Advisory only — don't hard-exit if there's no key yet. The user may register
|
|
21
|
+
// the MCP first and sign in after (`npx @opennous/cli login`); the server must
|
|
22
|
+
// already be running so the key (resolved per-call from env or ~/.nous/config.json)
|
|
23
|
+
// is picked up without a restart.
|
|
24
24
|
try {
|
|
25
25
|
validateConfig();
|
|
26
26
|
} catch (err) {
|
package/src/server.js
CHANGED
|
@@ -1156,6 +1156,12 @@ export function createServer() {
|
|
|
1156
1156
|
...imp.map((s) => ` • ${s.section}${s.source_path ? ` ← ${s.source_path}` : ""}`),
|
|
1157
1157
|
];
|
|
1158
1158
|
if (r.skipped?.length) lines.push("", `Skipped (unknown/empty): ${r.skipped.join(", ")}`);
|
|
1159
|
+
// Section-check nudges from the server — the ICP file synced but is missing
|
|
1160
|
+
// canonical sections (buyer, fit, triggers, …). Surface them so the agent
|
|
1161
|
+
// rounds the file out and re-syncs, instead of the gaps passing silently.
|
|
1162
|
+
for (const w of (r.warnings ?? [])) {
|
|
1163
|
+
lines.push("", `⚠ ${w.message}`);
|
|
1164
|
+
}
|
|
1159
1165
|
const sig = r.signals ?? [];
|
|
1160
1166
|
if (r.model_status === "created" && sig.length) {
|
|
1161
1167
|
lines.push("", `Built the ICP scoring model — ${sig.length} signal${sig.length === 1 ? "" : "s"}.`);
|
|
@@ -1205,9 +1211,15 @@ export function createServer() {
|
|
|
1205
1211
|
"No ICP scoring model yet. Sync the user's ICP file with sync_icp first (or build one with " +
|
|
1206
1212
|
"build_icp_model / train_icp_model), then call this to write it back." }] };
|
|
1207
1213
|
}
|
|
1208
|
-
|
|
1214
|
+
// Lift can only be learned from WINS, so a win-less cohort (losses only) is
|
|
1215
|
+
// still seed estimates — don't claim it's "trained on real closed deals".
|
|
1216
|
+
const wonCount = r.calibration?.won ?? 0;
|
|
1217
|
+
const lostCount = r.calibration?.lost ?? 0;
|
|
1218
|
+
const note = wonCount > 0
|
|
1209
1219
|
? "This model is trained on real closed deals (lift + calibration shown)."
|
|
1210
|
-
:
|
|
1220
|
+
: lostCount > 0
|
|
1221
|
+
? `Still seed estimates — ${lostCount} closed-lost recorded but no closed-won yet to learn lift from. Add closed-won with train_icp_model to sharpen it.`
|
|
1222
|
+
: "This model is seeded from the ICP only — add closed deals with train_icp_model to sharpen it.";
|
|
1211
1223
|
return { content: [{ type: "text", text:
|
|
1212
1224
|
`Write the block below into ${r.target_path} with your file editor — replace any existing block ` +
|
|
1213
1225
|
`between the nous:icp markers, or append it if there's none (create the file/section if absent). ` +
|