@pellux/goodvibes-sdk 0.33.18 → 0.33.19

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.
@@ -3,7 +3,7 @@
3
3
  "product": {
4
4
  "id": "goodvibes",
5
5
  "surface": "operator",
6
- "version": "0.33.18"
6
+ "version": "0.33.19"
7
7
  },
8
8
  "auth": {
9
9
  "modes": [
@@ -1 +1 @@
1
- {"version":3,"file":"completion-report.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/completion-report.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAKrF;;;GAGG;AAEH,oDAAoD;AACpD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;CAC3C;AAED,wCAAwC;AACxC,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,SAAS,EAAE,UAAU,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC;QAAE,I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E,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED,sDAAsD;AACtD,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,cAAc,GAAG,YAAY,GAAG,aAAa,CAAC;AAqE9F,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CA6ChF"}
1
+ {"version":3,"file":"completion-report.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/completion-report.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAKrF;;;GAGG;AAEH,oDAAoD;AACpD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;CAC3C;AAED,wCAAwC;AACxC,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,SAAS,EAAE,UAAU,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAA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AC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAClE,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED,sDAAsD;AACtD,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,cAAc,GAAG,YAAY,GAAG,aAAa,CAAC;AAqH9F,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CA6ChF"}
@@ -10,16 +10,46 @@ function isWellFormedConstraint(c) {
10
10
  typeof obj['text'] === 'string' && obj['text'].length > 0 &&
11
11
  obj['source'] === 'prompt');
12
12
  }
13
- /** Returns true if a ConstraintFinding entry is well-formed. */
14
- function isWellFormedConstraintFinding(f) {
13
+ function evidenceToString(evidence) {
14
+ if (typeof evidence === 'string') {
15
+ const trimmed = evidence.trim();
16
+ return trimmed.length > 0 ? trimmed : null;
17
+ }
18
+ if (typeof evidence === 'number' || typeof evidence === 'boolean') {
19
+ return String(evidence);
20
+ }
21
+ if (Array.isArray(evidence) || (typeof evidence === 'object' && evidence !== null)) {
22
+ try {
23
+ const serialized = JSON.stringify(evidence);
24
+ return serialized.length > 0 && serialized !== 'null' ? serialized : null;
25
+ }
26
+ catch {
27
+ return null;
28
+ }
29
+ }
30
+ return null;
31
+ }
32
+ /** Normalizes a ConstraintFinding entry, tolerating common model evidence shapes. */
33
+ function normalizeConstraintFinding(f) {
15
34
  if (typeof f !== 'object' || f === null)
16
- return false;
35
+ return null;
17
36
  const obj = f;
18
37
  const severity = obj['severity'];
19
- return (typeof obj['constraintId'] === 'string' && obj['constraintId'].length > 0 &&
20
- typeof obj['satisfied'] === 'boolean' &&
21
- typeof obj['evidence'] === 'string' && obj['evidence'].length > 0 &&
22
- (severity === undefined || severity === 'critical' || severity === 'major' || severity === 'minor'));
38
+ const evidence = evidenceToString(obj['evidence']);
39
+ if (typeof obj['constraintId'] !== 'string' || obj['constraintId'].length === 0 ||
40
+ typeof obj['satisfied'] !== 'boolean' ||
41
+ evidence === null) {
42
+ return null;
43
+ }
44
+ const finding = {
45
+ constraintId: obj['constraintId'],
46
+ satisfied: obj['satisfied'],
47
+ evidence,
48
+ };
49
+ if (severity === 'critical' || severity === 'major' || severity === 'minor') {
50
+ finding.severity = severity;
51
+ }
52
+ return finding;
23
53
  }
24
54
  function filterWellFormed(raw, guard) {
25
55
  if (raw === undefined)
@@ -38,6 +68,24 @@ function filterWellFormed(raw, guard) {
38
68
  }
39
69
  return { items, dropped, malformedContainer: false };
40
70
  }
71
+ function normalizeConstraintFindingList(raw) {
72
+ if (raw === undefined)
73
+ return { items: [], dropped: 0, malformedContainer: false };
74
+ if (!Array.isArray(raw))
75
+ return { items: [], dropped: 0, malformedContainer: true };
76
+ const items = [];
77
+ let dropped = 0;
78
+ for (const item of raw) {
79
+ const normalized = normalizeConstraintFinding(item);
80
+ if (normalized) {
81
+ items.push(normalized);
82
+ }
83
+ else {
84
+ dropped += 1;
85
+ }
86
+ }
87
+ return { items, dropped, malformedContainer: false };
88
+ }
41
89
  function appendEngineerIssue(report, issue) {
42
90
  const existing = Array.isArray(report['issues'])
43
91
  ? report['issues'].filter((item) => typeof item === 'string')
@@ -136,13 +184,13 @@ function applyConstraintDefaults(parsed) {
136
184
  }
137
185
  }
138
186
  if (next['archetype'] === 'reviewer') {
139
- const normalized = filterWellFormed(next['constraintFindings'], isWellFormedConstraintFinding);
187
+ const normalized = normalizeConstraintFindingList(next['constraintFindings']);
140
188
  next['constraintFindings'] = normalized.items;
141
189
  if (normalized.malformedContainer) {
142
- appendReviewerIssue(next, 'Malformed constraintFindings field ignored: expected an array.');
190
+ appendReviewerIssue(next, 'Malformed constraintFindings field ignored: expected an array of {constraintId:string,satisfied:boolean,evidence:string,severity?:critical|major|minor}.');
143
191
  }
144
192
  else if (normalized.dropped > 0) {
145
- appendReviewerIssue(next, `Malformed constraintFindings ignored: ${normalized.dropped} entr${normalized.dropped === 1 ? 'y' : 'ies'}.`);
193
+ appendReviewerIssue(next, `Malformed constraintFindings ignored: ${normalized.dropped} entr${normalized.dropped === 1 ? 'y' : 'ies'}; expected {constraintId:string,satisfied:boolean,evidence:string,severity?:critical|major|minor}.`);
146
194
  }
147
195
  }
148
196
  return next;
@@ -1 +1 @@
1
- {"version":3,"file":"wrfc-prompt-addenda.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-prompt-addenda.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAerF,wBAAgB,+BAA+B,IAAI,MAAM,CAiCxD;AAGD;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAqBxD;AAGD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAgBrD"}
1
+ {"version":3,"file":"wrfc-prompt-addenda.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-prompt-addenda.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAerF,wBAAgB,+BAA+B,IAAI,MAAM,CAiCxD;AAGD;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAuCxD;AAGD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAgBrD"}
@@ -67,6 +67,24 @@ The engineer's \`EngineerReport.constraints\` is the authoritative list of user-
67
67
  2. Cite concrete evidence — a file and line, a diff observation, or a test behavior. "Looks fine" is not evidence.
68
68
  3. Emit a \`constraintFindings[]\` entry referencing \`constraintId\`.
69
69
 
70
+ **Exact JSON shape required:**
71
+ \`\`\`json
72
+ {
73
+ "constraintFindings": [
74
+ {
75
+ "constraintId": "c1",
76
+ "satisfied": true,
77
+ "evidence": "Concrete proof as a single string.",
78
+ "severity": "major"
79
+ }
80
+ ]
81
+ }
82
+ \`\`\`
83
+
84
+ - \`constraintId\`, \`satisfied\`, and \`evidence\` are required.
85
+ - \`evidence\` must be a non-empty string, not an object or array.
86
+ - \`severity\` is optional and only valid as \`"critical"\`, \`"major"\`, or \`"minor"\`.
87
+
70
88
  **Severity rules for unsatisfied constraints**:
71
89
  - A violated hard limit (size, perf target, explicitly forbidden API) → **critical**.
72
90
  - A violated explicit user rule (style rules, naming conventions, required features) → **major**.
@@ -1,11 +1,15 @@
1
1
  import type { CompletionReport, Constraint, ConstraintFinding, ReviewerReport } from './completion-report.js';
2
2
  import type { QualityGateResult } from './wrfc-types.js';
3
+ type ReviewableCompletionReport = CompletionReport & {
4
+ reviewableOutput?: string | undefined;
5
+ };
3
6
  export declare function extractScoreFromText(text: string): number | null;
4
7
  export declare function extractPassedFromText(text: string, score: number, threshold: number): boolean;
5
8
  export declare function extractIssuesFromText(text: string): ReviewerReport['issues'];
6
- export declare function parseEngineerCompletionReport(rawOutput: string, _template?: string): CompletionReport;
9
+ export declare function parseEngineerCompletionReport(rawOutput: string, _template?: string): ReviewableCompletionReport;
7
10
  export declare function parseReviewerCompletionReport(chainId: string, rawOutput: string, threshold: number): ReviewerReport;
8
- export declare function buildReviewTask(chainId: string, originalTask: string, report: CompletionReport, threshold: number, constraints?: Constraint[]): string;
11
+ export declare function buildReviewTask(chainId: string, originalTask: string, report: ReviewableCompletionReport, threshold: number, constraints?: Constraint[]): string;
9
12
  export declare function buildFixTask(chainId: string, originalTask: string, review: ReviewerReport, threshold: number, fixAttempts: number, constraints?: Constraint[], constraintFindings?: ConstraintFinding[]): string;
10
13
  export declare function buildGateFailureTask(chainId: string, task: string, failedGates: readonly QualityGateResult[], constraints?: readonly Constraint[]): string;
14
+ export {};
11
15
  //# sourceMappingURL=wrfc-reporting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wrfc-reporting.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-reporting.ts"],"names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AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,SAAS,iBAAiB,EAAE,EACzC,WAAW,GAAE,SAAS,UAAU,EAAO,GACtC,MAAM,CAuCR"}
@@ -4,6 +4,7 @@ import { logger } from '../utils/logger.js';
4
4
  const REVIEW_BRIEF_ITEM_LIMIT = 6;
5
5
  const REVIEW_BRIEF_FILE_LIMIT = 8;
6
6
  const REVIEW_BRIEF_TEXT_LIMIT = 220;
7
+ const REVIEWABLE_OUTPUT_LIMIT = 16_000;
7
8
  export function extractScoreFromText(text) {
8
9
  const scorePattern = /\*{0,2}(?:overall\s+)?score\s*:?\s*\*{0,2}\s*(\d+(?:\.\d+)?)\s*\/\s*10/i;
9
10
  const matchScore = text.match(scorePattern);
@@ -54,11 +55,12 @@ export function extractIssuesFromText(text) {
54
55
  export function parseEngineerCompletionReport(rawOutput, _template) {
55
56
  const report = parseCompletionReport(rawOutput);
56
57
  if (report)
57
- return report;
58
+ return { ...report, reviewableOutput: rawOutput };
58
59
  return {
59
60
  version: 1,
60
61
  archetype: 'engineer',
61
62
  summary: rawOutput.slice(0, 500) || '(no output)',
63
+ reviewableOutput: rawOutput,
62
64
  gatheredContext: [],
63
65
  plannedActions: [],
64
66
  appliedChanges: [],
@@ -110,14 +112,18 @@ export function buildReviewTask(chainId, originalTask, report, threshold, constr
110
112
  `Engineer report digest:`,
111
113
  ...lines,
112
114
  ``,
115
+ `Engineer reviewable output (authoritative for non-file deliverables and no-write tasks):`,
116
+ formatReviewableOutput(report),
117
+ ``,
113
118
  `Instructions:`,
114
119
  `1. Review the complete current result against the original WRFC ask above. Do not narrow the review to the latest fix, files touched in the last child turn, or functions mentioned in the digest.`,
115
- `2. Read the referenced files directly before scoring. Do not rely on this digest alone.`,
116
- `3. Inspect the engineer's gatheredContext, plannedActions, appliedChanges, and decisions for discipline and coherence.`,
117
- `4. Verify the implementation meets all stated requirements and that prior passing behavior was not regressed by later fix loops.`,
118
- `5. Score the implementation using the 10-dimension review rubric.`,
119
- `6. The passing score threshold is ${threshold}/10.`,
120
- `7. Return a structured ReviewerReport JSON block in your final response.`,
120
+ `2. If the original ask requested a non-file deliverable or explicitly said not to write files, review the Engineer reviewable output as the deliverable. Do not fail only because no files exist.`,
121
+ `3. Read referenced files directly when files were created or modified. Do not rely on the digest alone for file-backed work.`,
122
+ `4. Inspect the engineer's gatheredContext, plannedActions, appliedChanges, decisions, and reviewable output for discipline and coherence.`,
123
+ `5. Verify the implementation meets all stated requirements and that prior passing behavior was not regressed by later fix loops.`,
124
+ `6. Score the implementation using the 10-dimension review rubric.`,
125
+ `7. The passing score threshold is ${threshold}/10.`,
126
+ `8. Return a structured ReviewerReport JSON block in your final response.`,
121
127
  ``,
122
128
  `The ReviewerReport must include:`,
123
129
  `- version: 1`,
@@ -126,6 +132,7 @@ export function buildReviewTask(chainId, originalTask, report, threshold, constr
126
132
  `- passed: <boolean>`,
127
133
  `- dimensions: array of { name, score, maxScore, issues[] }`,
128
134
  `- issues: array of { severity, description, file?, line?, pointValue }`,
135
+ `- constraintFindings: array of exactly { constraintId: string, satisfied: boolean, evidence: string, severity?: "critical" | "major" | "minor" }`,
129
136
  ];
130
137
  if (constraints.length === 0) {
131
138
  return base.join('\n');
@@ -151,6 +158,14 @@ function truncateReviewText(text, max = REVIEW_BRIEF_TEXT_LIMIT) {
151
158
  return normalized;
152
159
  return `${normalized.slice(0, max - 3)}...`;
153
160
  }
161
+ function formatReviewableOutput(report) {
162
+ const output = typeof report.reviewableOutput === 'string' ? report.reviewableOutput.trim() : '';
163
+ if (output.length === 0)
164
+ return '(no reviewable output recorded)';
165
+ if (output.length <= REVIEWABLE_OUTPUT_LIMIT)
166
+ return output;
167
+ return `${output.slice(0, REVIEWABLE_OUTPUT_LIMIT)}\n\n[truncated from ${output.length} characters; inspect agent fullOutput directly if more detail is required]`;
168
+ }
154
169
  function formatInlineList(items, limit) {
155
170
  if (items.length === 0)
156
171
  return 'none';
@@ -1,6 +1,6 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- let version = '0.33.18';
3
+ let version = '0.33.19';
4
4
  try {
5
5
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', '..', 'package.json'), 'utf-8'));
6
6
  version = pkg.version ?? version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pellux/goodvibes-sdk",
3
- "version": "0.33.18",
3
+ "version": "0.33.19",
4
4
  "description": "TypeScript SDK for building GoodVibes operator, peer, web, mobile, and daemon-connected apps with typed contracts, auth, realtime events, and transport layers.",
5
5
  "keywords": [
6
6
  "goodvibes",
@@ -449,14 +449,14 @@
449
449
  "sideEffects": false,
450
450
  "type": "module",
451
451
  "dependencies": {
452
- "@pellux/goodvibes-contracts": "0.33.18",
453
- "@pellux/goodvibes-daemon-sdk": "0.33.18",
454
- "@pellux/goodvibes-errors": "0.33.18",
455
- "@pellux/goodvibes-operator-sdk": "0.33.18",
456
- "@pellux/goodvibes-peer-sdk": "0.33.18",
457
- "@pellux/goodvibes-transport-core": "0.33.18",
458
- "@pellux/goodvibes-transport-http": "0.33.18",
459
- "@pellux/goodvibes-transport-realtime": "0.33.18"
452
+ "@pellux/goodvibes-contracts": "0.33.19",
453
+ "@pellux/goodvibes-daemon-sdk": "0.33.19",
454
+ "@pellux/goodvibes-errors": "0.33.19",
455
+ "@pellux/goodvibes-operator-sdk": "0.33.19",
456
+ "@pellux/goodvibes-peer-sdk": "0.33.19",
457
+ "@pellux/goodvibes-transport-core": "0.33.19",
458
+ "@pellux/goodvibes-transport-http": "0.33.19",
459
+ "@pellux/goodvibes-transport-realtime": "0.33.19"
460
460
  },
461
461
  "optionalDependencies": {
462
462
  "@agentclientprotocol/sdk": "^0.21.0",