@pellux/goodvibes-sdk 0.33.17 → 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.
- package/dist/contracts/artifacts/operator-contract.json +1 -1
- package/dist/events/workflows.d.ts +1 -1
- package/dist/events/workflows.d.ts.map +1 -1
- package/dist/platform/agents/completion-report.d.ts +3 -3
- package/dist/platform/agents/completion-report.d.ts.map +1 -1
- package/dist/platform/agents/completion-report.js +59 -11
- package/dist/platform/agents/index.d.ts +1 -0
- package/dist/platform/agents/index.d.ts.map +1 -1
- package/dist/platform/agents/index.js +1 -0
- package/dist/platform/agents/wrfc-controller.d.ts +14 -6
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +316 -100
- package/dist/platform/agents/wrfc-external-adapter.d.ts +45 -0
- package/dist/platform/agents/wrfc-external-adapter.d.ts.map +1 -0
- package/dist/platform/agents/wrfc-external-adapter.js +18 -0
- package/dist/platform/agents/wrfc-prompt-addenda.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-prompt-addenda.js +27 -0
- package/dist/platform/agents/wrfc-reporting.d.ts +7 -3
- package/dist/platform/agents/wrfc-reporting.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-reporting.js +38 -14
- package/dist/platform/agents/wrfc-types.d.ts +35 -5
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-workmap.d.ts +7 -1
- package/dist/platform/agents/wrfc-workmap.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.js +6 -2
- package/dist/platform/tools/agent/manager.d.ts +3 -0
- package/dist/platform/tools/agent/manager.d.ts.map +1 -1
- package/dist/platform/tools/agent/manager.js +43 -6
- package/dist/platform/tools/agent/schema.d.ts +2 -0
- package/dist/platform/tools/agent/schema.d.ts.map +1 -1
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { WrfcState } from './wrfc-types.js';
|
|
2
|
+
export type WrfcExternalWorkStatus = 'queued' | 'running' | 'blocked' | 'completed' | 'failed' | 'cancelled';
|
|
3
|
+
export interface WrfcExternalWorkRequest {
|
|
4
|
+
task: string;
|
|
5
|
+
wrfcId?: string | undefined;
|
|
6
|
+
chainState?: WrfcState | undefined;
|
|
7
|
+
metadata?: Record<string, unknown> | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface WrfcExternalWorkHandle {
|
|
10
|
+
externalTaskId: string;
|
|
11
|
+
status: WrfcExternalWorkStatus;
|
|
12
|
+
metadata?: Record<string, unknown> | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface WrfcExternalWorkSnapshot extends WrfcExternalWorkHandle {
|
|
15
|
+
progress?: string | undefined;
|
|
16
|
+
updatedAt?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface WrfcExternalWorkResult {
|
|
19
|
+
externalTaskId: string;
|
|
20
|
+
status: Extract<WrfcExternalWorkStatus, 'completed' | 'failed' | 'cancelled'>;
|
|
21
|
+
summary: string;
|
|
22
|
+
output?: string | undefined;
|
|
23
|
+
metadata?: Record<string, unknown> | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Translation seam for limited surfaces and partner apps that cannot or should
|
|
27
|
+
* not embed the native WRFC controller. TUI remains the first-class SDK-native
|
|
28
|
+
* WRFC implementation; this adapter shape is for companion surfaces that need
|
|
29
|
+
* to dispatch, poll, cancel, and normalize externally-owned work.
|
|
30
|
+
*/
|
|
31
|
+
export interface WrfcExternalWorkAdapter {
|
|
32
|
+
dispatch(request: WrfcExternalWorkRequest): Promise<WrfcExternalWorkHandle>;
|
|
33
|
+
status(externalTaskId: string): Promise<WrfcExternalWorkSnapshot>;
|
|
34
|
+
cancel(externalTaskId: string, reason?: string | undefined): Promise<void>;
|
|
35
|
+
result(externalTaskId: string): Promise<WrfcExternalWorkResult>;
|
|
36
|
+
}
|
|
37
|
+
export declare class WrfcExternalWorkBridge {
|
|
38
|
+
private readonly adapter;
|
|
39
|
+
constructor(adapter: WrfcExternalWorkAdapter);
|
|
40
|
+
dispatch(request: WrfcExternalWorkRequest): Promise<WrfcExternalWorkHandle>;
|
|
41
|
+
status(externalTaskId: string): Promise<WrfcExternalWorkSnapshot>;
|
|
42
|
+
cancel(externalTaskId: string, reason?: string | undefined): Promise<void>;
|
|
43
|
+
result(externalTaskId: string): Promise<WrfcExternalWorkResult>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=wrfc-external-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrfc-external-adapter.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-external-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE7G,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAChD;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,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= adapter;
|
|
5
|
+
}
|
|
6
|
+
dispatch(request) {
|
|
7
|
+
return this.adapter.dispatch(request);
|
|
8
|
+
}
|
|
9
|
+
status(externalTaskId) {
|
|
10
|
+
return this.adapter.status(externalTaskId);
|
|
11
|
+
}
|
|
12
|
+
cancel(externalTaskId, reason) {
|
|
13
|
+
return this.adapter.cancel(externalTaskId, reason);
|
|
14
|
+
}
|
|
15
|
+
result(externalTaskId) {
|
|
16
|
+
return this.adapter.result(externalTaskId);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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,
|
|
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"}
|
|
@@ -35,6 +35,15 @@ A **non-build or unconstrained prompt** looks like: a question, a conversational
|
|
|
35
35
|
**Hard cap: at most ~16 constraints.** If you find more, you are over-enumerating — consolidate. Real user prompts almost never produce more than 5-10.
|
|
36
36
|
|
|
37
37
|
These constraints become your self-declared acceptance criteria. The reviewer will verify each one independently. If you cannot satisfy a constraint, record it under \`issues[]\` with an explanation — do not omit it.`;
|
|
38
|
+
_engineerAddendumCache += `
|
|
39
|
+
|
|
40
|
+
## WRFC self-check before final report
|
|
41
|
+
|
|
42
|
+
Before writing your final EngineerReport, do a targeted self-check against the original task prompt:
|
|
43
|
+
- Confirm the complete result addresses the ask, not only the last code region you touched.
|
|
44
|
+
- Spot-check changed files and any directly related behavior you may have affected.
|
|
45
|
+
- Record meaningful remaining misses in \`issues[]\` and uncertainty in \`uncertainties[]\`; do not hide known gaps.
|
|
46
|
+
- Keep this concise. The review phase will still perform the full independent review.`;
|
|
38
47
|
return _engineerAddendumCache;
|
|
39
48
|
}
|
|
40
49
|
let _reviewerAddendumCache = null;
|
|
@@ -58,6 +67,24 @@ The engineer's \`EngineerReport.constraints\` is the authoritative list of user-
|
|
|
58
67
|
2. Cite concrete evidence — a file and line, a diff observation, or a test behavior. "Looks fine" is not evidence.
|
|
59
68
|
3. Emit a \`constraintFindings[]\` entry referencing \`constraintId\`.
|
|
60
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
|
+
|
|
61
88
|
**Severity rules for unsatisfied constraints**:
|
|
62
89
|
- A violated hard limit (size, perf target, explicitly forbidden API) → **critical**.
|
|
63
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):
|
|
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, report:
|
|
9
|
-
export declare function buildFixTask(chainId: string, review: ReviewerReport, threshold: number, fixAttempts: number, constraints?: Constraint[], constraintFindings?: ConstraintFinding[]): string;
|
|
11
|
+
export declare function buildReviewTask(chainId: string, originalTask: string, report: ReviewableCompletionReport, threshold: number, constraints?: Constraint[]): string;
|
|
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":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAkB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG9H,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"wrfc-reporting.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-reporting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAkB,cAAc,EAAE,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R"}
|
|
@@ -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: [],
|
|
@@ -98,22 +100,30 @@ export function parseReviewerCompletionReport(chainId, rawOutput, threshold) {
|
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
102
|
const CONSTRAINTS_TASK_LIMIT = 20;
|
|
101
|
-
export function buildReviewTask(chainId, report, threshold, constraints = []) {
|
|
103
|
+
export function buildReviewTask(chainId, originalTask, report, threshold, constraints = []) {
|
|
102
104
|
const lines = buildReviewBrief(report);
|
|
103
105
|
const base = [
|
|
104
106
|
`WRFC Review Request`,
|
|
105
107
|
`Chain ID: ${chainId}`,
|
|
106
108
|
``,
|
|
109
|
+
`Original WRFC ask (authoritative full review scope):`,
|
|
110
|
+
originalTask,
|
|
111
|
+
``,
|
|
107
112
|
`Engineer report digest:`,
|
|
108
113
|
...lines,
|
|
109
114
|
``,
|
|
115
|
+
`Engineer reviewable output (authoritative for non-file deliverables and no-write tasks):`,
|
|
116
|
+
formatReviewableOutput(report),
|
|
117
|
+
``,
|
|
110
118
|
`Instructions:`,
|
|
111
|
-
`1.
|
|
112
|
-
`2.
|
|
113
|
-
`3.
|
|
114
|
-
`4.
|
|
115
|
-
`5.
|
|
116
|
-
`6.
|
|
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.`,
|
|
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.`,
|
|
117
127
|
``,
|
|
118
128
|
`The ReviewerReport must include:`,
|
|
119
129
|
`- version: 1`,
|
|
@@ -122,6 +132,7 @@ export function buildReviewTask(chainId, report, threshold, constraints = []) {
|
|
|
122
132
|
`- passed: <boolean>`,
|
|
123
133
|
`- dimensions: array of { name, score, maxScore, issues[] }`,
|
|
124
134
|
`- issues: array of { severity, description, file?, line?, pointValue }`,
|
|
135
|
+
`- constraintFindings: array of exactly { constraintId: string, satisfied: boolean, evidence: string, severity?: "critical" | "major" | "minor" }`,
|
|
125
136
|
];
|
|
126
137
|
if (constraints.length === 0) {
|
|
127
138
|
return base.join('\n');
|
|
@@ -147,6 +158,14 @@ function truncateReviewText(text, max = REVIEW_BRIEF_TEXT_LIMIT) {
|
|
|
147
158
|
return normalized;
|
|
148
159
|
return `${normalized.slice(0, max - 3)}...`;
|
|
149
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
|
+
}
|
|
150
169
|
function formatInlineList(items, limit) {
|
|
151
170
|
if (items.length === 0)
|
|
152
171
|
return 'none';
|
|
@@ -216,7 +235,7 @@ function buildReviewBrief(report) {
|
|
|
216
235
|
appendListSection(lines, 'Uncertainties', engineer.uncertainties, 4);
|
|
217
236
|
return lines;
|
|
218
237
|
}
|
|
219
|
-
export function buildFixTask(chainId, review, threshold, fixAttempts, constraints = [], constraintFindings = []) {
|
|
238
|
+
export function buildFixTask(chainId, originalTask, review, threshold, fixAttempts, constraints = [], constraintFindings = []) {
|
|
220
239
|
const issueList = review.issues
|
|
221
240
|
.map((issue) => {
|
|
222
241
|
const location = issue.file ? ` (${issue.file}${issue.line ? `:${issue.line}` : ''})` : '';
|
|
@@ -227,6 +246,9 @@ export function buildFixTask(chainId, review, threshold, fixAttempts, constraint
|
|
|
227
246
|
`WRFC Fix Request`,
|
|
228
247
|
`Chain ID: ${chainId}`,
|
|
229
248
|
``,
|
|
249
|
+
`Original WRFC ask (authoritative scope for every fix loop):`,
|
|
250
|
+
originalTask,
|
|
251
|
+
``,
|
|
230
252
|
`Review score: ${review.score}/10 (threshold: ${threshold}/10)`,
|
|
231
253
|
`Fix attempt: ${fixAttempts}`,
|
|
232
254
|
``,
|
|
@@ -237,9 +259,11 @@ export function buildFixTask(chainId, review, threshold, fixAttempts, constraint
|
|
|
237
259
|
``,
|
|
238
260
|
`Instructions:`,
|
|
239
261
|
`1. Address ALL issues listed above, prioritizing critical and major items.`,
|
|
240
|
-
`2.
|
|
241
|
-
`3.
|
|
242
|
-
`4.
|
|
262
|
+
`2. Keep the original WRFC ask in scope. Do not limit the fix to only the files/functions named by the latest review if the original ask requires broader correction.`,
|
|
263
|
+
`3. Fix each issue completely — partial fixes will reduce your score.`,
|
|
264
|
+
`4. Re-run Gather, Plan, Apply explicitly before writing your final answer.`,
|
|
265
|
+
`5. Before finalizing, spot-check your complete result against the original ask and record any remaining misses under issues[] or uncertainties[].`,
|
|
266
|
+
`6. Return a structured EngineerReport JSON block including gatheredContext, plannedActions, and appliedChanges in your final response.`,
|
|
243
267
|
].join('\n');
|
|
244
268
|
if (constraints.length === 0) {
|
|
245
269
|
return base;
|
|
@@ -296,9 +320,9 @@ export function buildGateFailureTask(chainId, task, failedGates, constraints = [
|
|
|
296
320
|
constraintLines.push(`(+${overflow} more)`);
|
|
297
321
|
}
|
|
298
322
|
const constraintSection = [
|
|
299
|
-
`##
|
|
323
|
+
`## Constraints to preserve`,
|
|
300
324
|
``,
|
|
301
|
-
`These constraints
|
|
325
|
+
`These constraints remain binding while fixing gate failures. Return the same ids and text in your EngineerReport constraints[] with source "prompt". Do not add, rename, or drop constraints while repairing gates.`,
|
|
302
326
|
``,
|
|
303
327
|
...constraintLines,
|
|
304
328
|
].join('\n');
|
|
@@ -7,11 +7,42 @@ export interface QueuedChain {
|
|
|
7
7
|
}
|
|
8
8
|
/** WRFC chain lifecycle states. */
|
|
9
9
|
export type WrfcState = 'pending' | 'engineering' | 'reviewing' | 'fixing' | 'awaiting_gates' | 'gating' | 'passed' | 'failed' | 'committing';
|
|
10
|
+
/** Agent role within a WRFC chain. The owner is the durable chain orchestrator. */
|
|
11
|
+
export type WrfcAgentRole = 'owner' | 'engineer' | 'reviewer' | 'fixer' | 'verifier';
|
|
12
|
+
export type WrfcOwnerDecisionAction = 'chain_created' | 'spawn_engineer' | 'spawn_reviewer' | 'spawn_fixer' | 'spawn_gate_fixer' | 'review_passed' | 'review_failed' | 'gate_passed' | 'gate_failed' | 'chain_passed' | 'chain_failed' | 'chain_cancelled' | 'resume_skipped' | 'resume_started';
|
|
13
|
+
export interface WrfcOwnerDecision {
|
|
14
|
+
id: string;
|
|
15
|
+
ts: string;
|
|
16
|
+
action: WrfcOwnerDecisionAction;
|
|
17
|
+
state: WrfcState;
|
|
18
|
+
reason: string;
|
|
19
|
+
agentId?: string | undefined;
|
|
20
|
+
role?: Exclude<WrfcAgentRole, 'owner'> | undefined;
|
|
21
|
+
model?: string | undefined;
|
|
22
|
+
provider?: string | undefined;
|
|
23
|
+
reasoningEffort?: AgentRecord['reasoningEffort'] | undefined;
|
|
24
|
+
reviewScore?: number | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface WrfcChildRouteSelection {
|
|
27
|
+
model?: string | undefined;
|
|
28
|
+
provider?: string | undefined;
|
|
29
|
+
fallbackModels?: string[] | undefined;
|
|
30
|
+
routing?: AgentRecord['routing'] | undefined;
|
|
31
|
+
reasoningEffort?: AgentRecord['reasoningEffort'] | undefined;
|
|
32
|
+
reason?: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
export type WrfcChildRouteSelector = (context: {
|
|
35
|
+
readonly chain: WrfcChain;
|
|
36
|
+
readonly role: Exclude<WrfcAgentRole, 'owner' | 'verifier'>;
|
|
37
|
+
readonly task: string;
|
|
38
|
+
readonly ownerAgent: AgentRecord | null;
|
|
39
|
+
}) => WrfcChildRouteSelection | null | undefined;
|
|
10
40
|
/** A single WRFC chain instance. */
|
|
11
41
|
export interface WrfcChain {
|
|
12
42
|
id: string;
|
|
13
43
|
state: WrfcState;
|
|
14
44
|
task: string;
|
|
45
|
+
ownerAgentId: string;
|
|
15
46
|
currentNodeId?: string | undefined;
|
|
16
47
|
engineerAgentId?: string | undefined;
|
|
17
48
|
reviewerAgentId?: string | undefined;
|
|
@@ -25,21 +56,20 @@ export interface WrfcChain {
|
|
|
25
56
|
gateResults?: QualityGateResult[] | undefined;
|
|
26
57
|
createdAt: number;
|
|
27
58
|
completedAt?: number | undefined;
|
|
28
|
-
parentChainId?: string | undefined;
|
|
29
59
|
/** Whether quality gates passed. Only meaningful when state is 'passed'. */
|
|
30
60
|
gatesPassed?: boolean | undefined;
|
|
31
|
-
/** Fingerprint of gate failures: used for same-error detection across chained chains. */
|
|
32
|
-
gateFailureFingerprint?: string | undefined;
|
|
33
|
-
/** How many gate-failure retry cycles deep this chain is. 0 = original chain. */
|
|
34
|
-
gateRetryDepth: number;
|
|
35
61
|
/** Review scores history — used to detect regression (2 consecutive below initial). */
|
|
36
62
|
reviewScores: number[];
|
|
63
|
+
/** Durable audit of owner orchestration choices. */
|
|
64
|
+
ownerDecisions: WrfcOwnerDecision[];
|
|
37
65
|
error?: string | undefined;
|
|
38
66
|
/** Buffered agent completion — set when agent finishes while chain is still queued/pending. */
|
|
39
67
|
bufferedCompletion?: {
|
|
40
68
|
agentId: string;
|
|
41
69
|
fullOutput?: string | undefined;
|
|
42
70
|
} | undefined;
|
|
71
|
+
/** True once the durable owner agent terminal event has been emitted. */
|
|
72
|
+
ownerTerminalEmitted: boolean;
|
|
43
73
|
/** Constraints propagated for this chain. Initialized to [] on construction. */
|
|
44
74
|
constraints: Constraint[];
|
|
45
75
|
/** True once constraints have been captured and WORKFLOW_CONSTRAINTS_ENUMERATED has been emitted. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrfc-types.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qCAAqC;AACrC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;A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c,EAAE,iBAAiB,EAAE,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,+FAA+F;IAC/F,kBAAkB,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;IACtF,yEAAyE;IACzE,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gFAAgF;IAChF,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,qGAAqG;IACrG,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,UAAU,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CACpF;AAED,+BAA+B;AAC/B,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wCAAwC;AACxC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export interface WorkmapEntry {
|
|
2
2
|
ts: string;
|
|
3
3
|
wrfcId: string;
|
|
4
|
-
event: 'engineer_complete' | 'review_complete' | 'fix_started' | 'gate_result' | 'chain_passed' | 'chain_failed';
|
|
4
|
+
event: 'engineer_complete' | 'review_complete' | 'fix_started' | 'gate_result' | 'chain_passed' | 'chain_failed' | 'owner_decision';
|
|
5
5
|
agentId?: string | undefined;
|
|
6
|
+
role?: string | undefined;
|
|
6
7
|
task?: string;
|
|
7
8
|
score?: number;
|
|
8
9
|
passed?: boolean;
|
|
@@ -15,6 +16,11 @@ export interface WorkmapEntry {
|
|
|
15
16
|
gateOutput?: string;
|
|
16
17
|
attempt?: number;
|
|
17
18
|
reason?: string;
|
|
19
|
+
action?: string;
|
|
20
|
+
state?: string;
|
|
21
|
+
model?: string | undefined;
|
|
22
|
+
provider?: string | undefined;
|
|
23
|
+
reasoningEffort?: string | undefined;
|
|
18
24
|
}
|
|
19
25
|
export declare class WrfcWorkmap {
|
|
20
26
|
private filePath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrfc-workmap.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-workmap.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"wrfc-workmap.d.ts","sourceRoot":"","sources":["../../../src/platform/agents/wrfc-workmap.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,gBAAgB,CAAC;IACpI,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IAC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GAAG,SAAS,CAAC;IACrE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;CAC3C,GAAG,IAAI,CAkkBP"}
|
|
@@ -11,9 +11,13 @@ export { AGENT_TEMPLATES, AgentManager } from './manager.js';
|
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
function summarizeWrfcEvent(event) {
|
|
13
13
|
return {
|
|
14
|
-
type: event.type,
|
|
15
|
-
timestamp: event.timestamp,
|
|
14
|
+
type: event.event ?? event.type,
|
|
15
|
+
timestamp: event.ts ?? event.timestamp,
|
|
16
16
|
status: event.status,
|
|
17
|
+
action: event.action,
|
|
18
|
+
reason: event.reason,
|
|
19
|
+
agentId: event.agentId,
|
|
20
|
+
role: event.role,
|
|
17
21
|
score: event.score,
|
|
18
22
|
gate: event.gate,
|
|
19
23
|
issueCount: Array.isArray(event.issues) ? event.issues.length : undefined,
|
|
@@ -5,6 +5,7 @@ import type { ConfigManager } from '../../config/manager.js';
|
|
|
5
5
|
import type { RuntimeEventBus } from '../../runtime/events/index.js';
|
|
6
6
|
import type { ExecutionIntent } from '../../runtime/execution-intents.js';
|
|
7
7
|
import type { AgentInput } from './schema.js';
|
|
8
|
+
import type { WrfcAgentRole } from '../../agents/wrfc-types.js';
|
|
8
9
|
export type AgentExecutor = {
|
|
9
10
|
runAgent(record: AgentRecord): Promise<void>;
|
|
10
11
|
};
|
|
@@ -50,6 +51,8 @@ export interface AgentRecord {
|
|
|
50
51
|
fullOutput?: string | undefined;
|
|
51
52
|
streamingContent?: string | undefined;
|
|
52
53
|
wrfcId?: string | undefined;
|
|
54
|
+
wrfcRole?: WrfcAgentRole | undefined;
|
|
55
|
+
wrfcRouteReason?: string | undefined;
|
|
53
56
|
dangerously_disable_wrfc?: boolean | undefined;
|
|
54
57
|
cohort?: string | undefined;
|
|
55
58
|
orchestrationGraphId?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/platform/tools/agent/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/platform/tools/agent/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAcrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,SAAS,CAAC;IAC9E,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,SAAS,CAAC;IACzE,QAAQ,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EA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AI,IAAI;IAKb,WAAW,IAAI,WAAW,EAAE;IAU5B,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI;IAOzC,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI;IAIjD,iBAAiB,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,GAAG,IAAI,GAAG,IAAI;CAGpF"}
|
|
@@ -2,7 +2,7 @@ import { ArchetypeLoader } from '../../agents/archetypes.js';
|
|
|
2
2
|
import { AgentOrchestrator } from '../../agents/orchestrator.js';
|
|
3
3
|
import { AgentMessageBus } from '../../agents/message-bus.js';
|
|
4
4
|
import { WrfcController } from '../../agents/wrfc-controller.js';
|
|
5
|
-
import { emitAgentSpawning, emitOrchestrationGraphCreated, emitOrchestrationNodeAdded, emitOrchestrationNodeCancelled, emitOrchestrationRecursionGuardTriggered, emitOrchestrationNodeStarted, } from '../../runtime/emitters/index.js';
|
|
5
|
+
import { emitAgentCancelled, emitAgentProgress, emitAgentRunning, emitAgentSpawning, emitOrchestrationGraphCreated, emitOrchestrationNodeAdded, emitOrchestrationNodeCancelled, emitOrchestrationRecursionGuardTriggered, emitOrchestrationNodeStarted, } from '../../runtime/emitters/index.js';
|
|
6
6
|
import { evaluateOrchestrationSpawn } from '../../runtime/orchestration/spawn-policy.js';
|
|
7
7
|
import { logger } from '../../utils/logger.js';
|
|
8
8
|
import { summarizeError } from '../../utils/error-display.js';
|
|
@@ -113,13 +113,18 @@ export class AgentManager {
|
|
|
113
113
|
if (input.parentAgentId && !parentRecord) {
|
|
114
114
|
throw new Error(`Unknown parent agent: '${input.parentAgentId}'`);
|
|
115
115
|
}
|
|
116
|
+
if (parentRecord?.wrfcId && parentRecord.wrfcRole !== 'owner') {
|
|
117
|
+
throw new Error('WRFC phase agents cannot spawn nested child agents; spawn work through the WRFC owner.');
|
|
118
|
+
}
|
|
116
119
|
const orchestrationDepth = parentRecord ? parentRecord.orchestrationDepth + 1 : 0;
|
|
117
120
|
const activeAgents = this.list().filter((agent) => agent.status === 'pending' || agent.status === 'running').length;
|
|
121
|
+
const isWrfcOwnerChild = Boolean(parentRecord?.wrfcRole === 'owner' && input.dangerously_disable_wrfc);
|
|
118
122
|
const spawnDecision = evaluateOrchestrationSpawn({
|
|
119
123
|
configManager: this.configManager,
|
|
120
|
-
mode: input.parentAgentId ? 'recursive-child' : 'manual-batch',
|
|
124
|
+
mode: input.parentAgentId && !isWrfcOwnerChild ? 'recursive-child' : 'manual-batch',
|
|
121
125
|
activeAgents,
|
|
122
126
|
requestedDepth: orchestrationDepth,
|
|
127
|
+
...(isWrfcOwnerChild ? { overrides: { recursionEnabled: true, maxDepth: 1 } } : {}),
|
|
123
128
|
});
|
|
124
129
|
if (!spawnDecision.allowed) {
|
|
125
130
|
if (this.runtimeBus && (input.orchestrationGraphId ?? parentRecord?.orchestrationGraphId)) {
|
|
@@ -163,6 +168,11 @@ export class AgentManager {
|
|
|
163
168
|
throw new Error('Agent fail routing cannot include fallback models; use ordered-fallbacks to enable model failover.');
|
|
164
169
|
}
|
|
165
170
|
const id = `agent-${crypto.randomUUID().slice(0, 8)}`;
|
|
171
|
+
const orchestrationGraphId = input.orchestrationGraphId
|
|
172
|
+
?? parentRecord?.orchestrationGraphId
|
|
173
|
+
?? (input.cohort ? `cohort:${input.cohort}` : undefined);
|
|
174
|
+
const orchestrationNodeId = orchestrationGraphId ? (input.orchestrationNodeId ?? id) : undefined;
|
|
175
|
+
const parentNodeId = input.parentNodeId ?? parentRecord?.orchestrationNodeId;
|
|
166
176
|
const record = {
|
|
167
177
|
id,
|
|
168
178
|
task,
|
|
@@ -184,6 +194,7 @@ export class AgentManager {
|
|
|
184
194
|
executionProtocol,
|
|
185
195
|
reviewMode,
|
|
186
196
|
communicationLane,
|
|
197
|
+
systemPromptAddendum: input.systemPromptAddendum,
|
|
187
198
|
status: 'pending',
|
|
188
199
|
startedAt: Date.now(),
|
|
189
200
|
toolCallCount: 0,
|
|
@@ -198,12 +209,12 @@ export class AgentManager {
|
|
|
198
209
|
},
|
|
199
210
|
dangerously_disable_wrfc: input.dangerously_disable_wrfc,
|
|
200
211
|
cohort: input.cohort,
|
|
201
|
-
...(
|
|
202
|
-
orchestrationGraphId
|
|
203
|
-
orchestrationNodeId
|
|
212
|
+
...(orchestrationGraphId ? {
|
|
213
|
+
orchestrationGraphId,
|
|
214
|
+
orchestrationNodeId,
|
|
204
215
|
} : {}),
|
|
205
216
|
...(input.parentAgentId ? { parentAgentId: input.parentAgentId } : {}),
|
|
206
|
-
...(
|
|
217
|
+
...(parentNodeId ? { parentNodeId } : {}),
|
|
207
218
|
...(toolResolution.capabilityCeilingTools ? { capabilityCeilingTools: toolResolution.capabilityCeilingTools } : {}),
|
|
208
219
|
...(input.successCriteria ? { successCriteria: [...input.successCriteria] } : {}),
|
|
209
220
|
...(input.requiredEvidence ? { requiredEvidence: [...input.requiredEvidence] } : {}),
|
|
@@ -290,6 +301,21 @@ export class AgentManager {
|
|
|
290
301
|
if (!input.dangerously_disable_wrfc) {
|
|
291
302
|
try {
|
|
292
303
|
this.wrfcController?.createChain(record);
|
|
304
|
+
if (record.wrfcRole === 'owner') {
|
|
305
|
+
record.status = 'running';
|
|
306
|
+
record.progress = 'WRFC owner supervising child agents';
|
|
307
|
+
if (this.runtimeBus) {
|
|
308
|
+
const ctx = {
|
|
309
|
+
sessionId: 'agent-manager',
|
|
310
|
+
traceId: `agent-manager:${id}:wrfc-owner`,
|
|
311
|
+
source: 'agent-manager',
|
|
312
|
+
agentId: id,
|
|
313
|
+
};
|
|
314
|
+
emitAgentRunning(this.runtimeBus, ctx, { agentId: id });
|
|
315
|
+
emitAgentProgress(this.runtimeBus, ctx, { agentId: id, progress: record.progress });
|
|
316
|
+
}
|
|
317
|
+
return record;
|
|
318
|
+
}
|
|
293
319
|
}
|
|
294
320
|
catch (error) {
|
|
295
321
|
logger.error('Failed to create WRFC chain', { agentId: id, error: summarizeError(error) });
|
|
@@ -321,6 +347,17 @@ export class AgentManager {
|
|
|
321
347
|
if (record.status === 'pending' || record.status === 'running') {
|
|
322
348
|
record.status = 'cancelled';
|
|
323
349
|
record.completedAt = Date.now();
|
|
350
|
+
if (this.runtimeBus) {
|
|
351
|
+
emitAgentCancelled(this.runtimeBus, {
|
|
352
|
+
sessionId: 'agent-manager',
|
|
353
|
+
traceId: `agent-manager:${record.id}:cancel`,
|
|
354
|
+
source: 'agent-manager',
|
|
355
|
+
agentId: record.id,
|
|
356
|
+
}, {
|
|
357
|
+
agentId: record.id,
|
|
358
|
+
reason: 'operator cancellation',
|
|
359
|
+
});
|
|
360
|
+
}
|
|
324
361
|
if (this.runtimeBus && record.orchestrationGraphId && record.orchestrationNodeId) {
|
|
325
362
|
emitOrchestrationNodeCancelled(this.runtimeBus, {
|
|
326
363
|
sessionId: 'agent-manager',
|
|
@@ -24,6 +24,8 @@ export interface AgentInput {
|
|
|
24
24
|
tools?: string[] | undefined;
|
|
25
25
|
restrictTools?: boolean | undefined;
|
|
26
26
|
context?: string | undefined;
|
|
27
|
+
/** Internal prompt addendum used by WRFC phase agents. */
|
|
28
|
+
systemPromptAddendum?: string | undefined;
|
|
27
29
|
successCriteria?: string[] | undefined;
|
|
28
30
|
requiredEvidence?: string[] | undefined;
|
|
29
31
|
writeScope?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/platform/tools/agent/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,cA2O/B,CAAC;AAEF,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;IAC7E,qBAAqB,CAAC,EAAE,m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C;QAClC,iBAAiB,CAAC,EAAE,QAAQ,GAAG,mBAAmB,GAAG,SAAS,CAAC;QAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QACzC,iBAAiB,CAAC,EAAE,aAAa,GAAG,qBAAqB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;QAC5F,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACnC,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACzC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAClC,wBAAwB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;KAChD,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;IAElE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;IAExH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B"}
|
package/dist/platform/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
let version = '0.33.
|
|
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;
|