@productbrain/mcp 0.0.1-beta.38 → 0.0.1-beta.39
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/{chunk-7LEGOXN4.js → chunk-7VJP2IMS.js} +4 -4
- package/dist/{chunk-7LEGOXN4.js.map → chunk-7VJP2IMS.js.map} +1 -1
- package/dist/{chunk-FPFNMME7.js → chunk-XCKGFYDP.js} +16 -23
- package/dist/chunk-XCKGFYDP.js.map +1 -0
- package/dist/http.js +2 -2
- package/dist/index.js +35 -30
- package/dist/index.js.map +1 -1
- package/dist/{smart-capture-OLIFSERN.js → smart-capture-E53YEHHO.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-FPFNMME7.js.map +0 -1
- /package/dist/{smart-capture-OLIFSERN.js.map → smart-capture-E53YEHHO.js.map} +0 -0
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
startAgentSession,
|
|
26
26
|
trackWriteTool,
|
|
27
27
|
translateStaleToolNames
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7VJP2IMS.js";
|
|
29
29
|
import {
|
|
30
30
|
trackQualityCheck,
|
|
31
31
|
trackQualityVerdict
|
|
@@ -166,7 +166,7 @@ ${formatted}` }]
|
|
|
166
166
|
},
|
|
167
167
|
async ({ entryId }) => {
|
|
168
168
|
requireWriteAccess();
|
|
169
|
-
const { runContradictionCheck } = await import("./smart-capture-
|
|
169
|
+
const { runContradictionCheck } = await import("./smart-capture-E53YEHHO.js");
|
|
170
170
|
const entry = await mcpQuery("chain.getEntry", { entryId });
|
|
171
171
|
if (!entry) {
|
|
172
172
|
return {
|
|
@@ -3118,17 +3118,11 @@ function scoreElements(ctx) {
|
|
|
3118
3118
|
} else {
|
|
3119
3119
|
missing.push("Identify solution elements \u2014 breadboard-level pieces, each independently describable.");
|
|
3120
3120
|
}
|
|
3121
|
-
if (text.length > 20) {
|
|
3122
|
-
const hasNoImpl = !/\b(implement|code|function|class|import|export|module)\b/i.test(text) || /breadboard|concept|capability|value/i.test(text);
|
|
3123
|
-
if (hasNoImpl) {
|
|
3124
|
-
satisfied.push("Abstraction level appropriate");
|
|
3125
|
-
score += 2;
|
|
3126
|
-
} else {
|
|
3127
|
-
missing.push("Elements should be at breadboard level \u2014 capabilities, not implementation details.");
|
|
3128
|
-
}
|
|
3129
|
-
}
|
|
3130
3121
|
const totalElements = Math.max(ctx.elementCount, textDescribed);
|
|
3131
|
-
if (totalElements >=
|
|
3122
|
+
if (totalElements >= 3) {
|
|
3123
|
+
satisfied.push("Multiple independently describable pieces");
|
|
3124
|
+
score += 3;
|
|
3125
|
+
} else if (totalElements >= 2) {
|
|
3132
3126
|
satisfied.push("Multiple independently describable pieces");
|
|
3133
3127
|
score += 2;
|
|
3134
3128
|
}
|
|
@@ -3226,9 +3220,8 @@ function scoreBoundaries(ctx) {
|
|
|
3226
3220
|
const missing = [];
|
|
3227
3221
|
const satisfied = [];
|
|
3228
3222
|
let score = 0;
|
|
3229
|
-
const
|
|
3230
|
-
const
|
|
3231
|
-
const totalNoGos = Math.max(ctx.noGoCount, noGoSignals, wontStatements);
|
|
3223
|
+
const textNoGos = Math.max(countMatches(text, NOGO_SIGNALS), (text.match(/\bwon'?t\b|\bwill not\b/gi) ?? []).length);
|
|
3224
|
+
const totalNoGos = Math.min(ctx.noGoCount + textNoGos, 10);
|
|
3232
3225
|
if (totalNoGos >= 3) {
|
|
3233
3226
|
satisfied.push(`${totalNoGos} explicit no-gos declared`);
|
|
3234
3227
|
score += 5;
|
|
@@ -3308,8 +3301,8 @@ function suggestCaptures(ctx, activeDimension) {
|
|
|
3308
3301
|
if (text.length < 30) return suggestions;
|
|
3309
3302
|
if (activeDimension === "problem_clarity" || activeDimension === "appetite") {
|
|
3310
3303
|
if (countMatches(text, WORKAROUND_SIGNALS) > 0 && ctx.riskCount === 0) {
|
|
3311
|
-
const match = text.match(/(?:workaround|currently|today|right now)[^.]
|
|
3312
|
-
if (match) {
|
|
3304
|
+
const match = text.match(/(?:workaround|currently|today|right now)[^.]{0,120}\./i);
|
|
3305
|
+
if (match && isBalanced(match[0])) {
|
|
3313
3306
|
suggestions.push({
|
|
3314
3307
|
type: "tension",
|
|
3315
3308
|
name: extractPhrase(match[0], 60),
|
|
@@ -3322,7 +3315,7 @@ function suggestCaptures(ctx, activeDimension) {
|
|
|
3322
3315
|
if (activeDimension === "elements") {
|
|
3323
3316
|
if (ctx.elementCount === 0 && /(?:service|component|module|layer|store|engine|kernel)/i.test(text)) {
|
|
3324
3317
|
const match = text.match(/(?:a |the )?(\w[\w\s]{2,30}(?:service|component|module|layer|store|engine|kernel))/i);
|
|
3325
|
-
if (match) {
|
|
3318
|
+
if (match && isBalanced(match[1])) {
|
|
3326
3319
|
suggestions.push({
|
|
3327
3320
|
type: "element",
|
|
3328
3321
|
name: capitalize(match[1].trim()),
|
|
@@ -3334,8 +3327,8 @@ function suggestCaptures(ctx, activeDimension) {
|
|
|
3334
3327
|
}
|
|
3335
3328
|
if (activeDimension === "risks") {
|
|
3336
3329
|
if (ctx.riskCount === 0 && countMatches(text, RISK_SIGNALS) >= 2) {
|
|
3337
|
-
const match = text.match(/(?:risk|rabbit hole|unknown|might|could fail)[^.]
|
|
3338
|
-
if (match) {
|
|
3330
|
+
const match = text.match(/(?:risk|rabbit hole|unknown|might|could fail)[^.]{0,120}\./i);
|
|
3331
|
+
if (match && isBalanced(match[0])) {
|
|
3339
3332
|
suggestions.push({
|
|
3340
3333
|
type: "risk",
|
|
3341
3334
|
name: extractPhrase(match[0], 60),
|
|
@@ -3346,8 +3339,8 @@ function suggestCaptures(ctx, activeDimension) {
|
|
|
3346
3339
|
}
|
|
3347
3340
|
}
|
|
3348
3341
|
if (/(?:we(?:'ll| will) (?:use|go with|pick|choose)|decided to|decision:|instead of)/i.test(text)) {
|
|
3349
|
-
const match = text.match(/(?:we(?:'ll| will) (?:use|go with|pick|choose)|decided to|decision:)[^.]
|
|
3350
|
-
if (match) {
|
|
3342
|
+
const match = text.match(/(?:we(?:'ll| will) (?:use|go with|pick|choose)|decided to|decision:)[^.]{0,120}\./i);
|
|
3343
|
+
if (match && isBalanced(match[0])) {
|
|
3351
3344
|
suggestions.push({
|
|
3352
3345
|
type: "decision",
|
|
3353
3346
|
name: extractPhrase(match[0], 60),
|
|
@@ -9063,4 +9056,4 @@ export {
|
|
|
9063
9056
|
SERVER_VERSION,
|
|
9064
9057
|
createProductBrainServer
|
|
9065
9058
|
};
|
|
9066
|
-
//# sourceMappingURL=chunk-
|
|
9059
|
+
//# sourceMappingURL=chunk-XCKGFYDP.js.map
|