@pellux/goodvibes-sdk 0.33.24 → 0.33.26
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/agents.d.ts +3 -3
- package/dist/events/agents.d.ts.map +1 -1
- package/dist/events/orchestration.d.ts +1 -1
- package/dist/events/orchestration.d.ts.map +1 -1
- package/dist/events/workflows.d.ts +1 -1
- package/dist/events/workflows.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.d.ts.map +1 -1
- package/dist/platform/agents/archetypes.js +14 -0
- package/dist/platform/agents/communication-policy.d.ts.map +1 -1
- package/dist/platform/agents/communication-policy.js +4 -0
- package/dist/platform/agents/orchestrator-prompts.d.ts.map +1 -1
- package/dist/platform/agents/orchestrator-prompts.js +2 -0
- package/dist/platform/agents/worktree.d.ts +3 -0
- package/dist/platform/agents/worktree.d.ts.map +1 -1
- package/dist/platform/agents/worktree.js +64 -2
- package/dist/platform/agents/wrfc-controller.d.ts +16 -1
- package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-controller.js +484 -16
- package/dist/platform/agents/wrfc-runtime-events.d.ts +1 -1
- package/dist/platform/agents/wrfc-runtime-events.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-types.d.ts +29 -4
- package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
- package/dist/platform/agents/wrfc-workmap.d.ts +2 -1
- package/dist/platform/agents/wrfc-workmap.d.ts.map +1 -1
- package/dist/platform/git/service.d.ts +4 -0
- package/dist/platform/git/service.d.ts.map +1 -1
- package/dist/platform/git/service.js +33 -0
- package/dist/platform/runtime/emitters/agents.d.ts +3 -3
- package/dist/platform/runtime/emitters/agents.d.ts.map +1 -1
- package/dist/platform/runtime/emitters/orchestration.d.ts +1 -1
- package/dist/platform/runtime/emitters/orchestration.d.ts.map +1 -1
- package/dist/platform/runtime/store/domains/agents.d.ts +2 -2
- package/dist/platform/runtime/store/domains/agents.d.ts.map +1 -1
- package/dist/platform/runtime/store/domains/orchestration.d.ts +1 -1
- package/dist/platform/runtime/store/domains/orchestration.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.js +2 -0
- package/dist/platform/tools/agent/manager.d.ts +2 -0
- package/dist/platform/tools/agent/manager.d.ts.map +1 -1
- package/dist/platform/tools/agent/manager.js +22 -3
- package/dist/platform/tools/agent/schema.d.ts +2 -0
- package/dist/platform/tools/agent/schema.d.ts.map +1 -1
- package/dist/platform/tools/agent/schema.js +4 -4
- package/dist/platform/tools/agent/wrfc-batch-policy.d.ts +1 -0
- package/dist/platform/tools/agent/wrfc-batch-policy.d.ts.map +1 -1
- package/dist/platform/tools/agent/wrfc-batch-policy.js +95 -1
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -184,6 +184,34 @@ function buildCollapsedContext(input, tasks, roleTaskIndexes, authoritativeTask,
|
|
|
184
184
|
...tasks.map(formatTask),
|
|
185
185
|
].filter((line) => Boolean(line)).join('\n');
|
|
186
186
|
}
|
|
187
|
+
function buildCompoundContext(input, tasks, authoritativeTask) {
|
|
188
|
+
const existing = input.context?.trim();
|
|
189
|
+
return [
|
|
190
|
+
existing ? `Caller context:\n${existing}` : null,
|
|
191
|
+
'SDK compound WRFC topology enforcement collapsed this batch into one durable owner chain because multiple implementation deliverables share one higher-level reviewed outcome.',
|
|
192
|
+
`Authoritative original ask for this WRFC chain:\n${authoritativeTask}`,
|
|
193
|
+
'The WRFC owner must track every sub-deliverable. Engineer children may run concurrently. Reviewer/fixer phases must run only after the corresponding engineer has output. The integrator phase runs only after all sub-deliverables pass.',
|
|
194
|
+
'Compound deliverables:',
|
|
195
|
+
...tasks.map(formatTask),
|
|
196
|
+
].filter((line) => Boolean(line)).join('\n');
|
|
197
|
+
}
|
|
198
|
+
function normalizeCompoundSubtask(task, authoritativeTask) {
|
|
199
|
+
const normalizedTask = looksLikeScopeNarrowing(task.task, authoritativeTask)
|
|
200
|
+
? normalizeNarrowedTask(task.task)
|
|
201
|
+
: task.task;
|
|
202
|
+
const toolContract = resolveImplementationToolContract({
|
|
203
|
+
tools: task.tools,
|
|
204
|
+
restrictTools: task.restrictTools,
|
|
205
|
+
authoritativeTask,
|
|
206
|
+
proposedTask: task.task,
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
...task,
|
|
210
|
+
task: normalizedTask,
|
|
211
|
+
tools: toolContract.tools,
|
|
212
|
+
restrictTools: toolContract.restrictTools,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
187
215
|
export function evaluateWrfcBatchPolicy(input) {
|
|
188
216
|
const tasks = input.tasks ?? [];
|
|
189
217
|
if (input.mode !== 'batch-spawn' || tasks.length <= 1) {
|
|
@@ -193,7 +221,73 @@ export function evaluateWrfcBatchPolicy(input) {
|
|
|
193
221
|
.map((task, index) => isRootReviewRoleTask(task) ? index : -1)
|
|
194
222
|
.filter((index) => index >= 0);
|
|
195
223
|
if (roleTaskIndexes.length === 0) {
|
|
196
|
-
|
|
224
|
+
const implementationTaskIndexes = tasks
|
|
225
|
+
.map((task, index) => isImplementationLikeTask(task) ? index : -1)
|
|
226
|
+
.filter((index) => index >= 0);
|
|
227
|
+
const implementationTasksDisableWrfc = implementationTaskIndexes.length > 0
|
|
228
|
+
&& implementationTaskIndexes.every((index) => {
|
|
229
|
+
const task = tasks[index];
|
|
230
|
+
return task.dangerously_disable_wrfc === true || task.reviewMode === 'none';
|
|
231
|
+
});
|
|
232
|
+
const wantsWrfc = input.reviewMode === 'wrfc'
|
|
233
|
+
|| tasks.some((task) => task.reviewMode === 'wrfc')
|
|
234
|
+
|| (!implementationTasksDisableWrfc
|
|
235
|
+
&& input.dangerously_disable_wrfc !== true
|
|
236
|
+
&& input.reviewMode !== 'none'
|
|
237
|
+
&& implementationTaskIndexes.length > 0);
|
|
238
|
+
if (!wantsWrfc || implementationTaskIndexes.length <= 1) {
|
|
239
|
+
return { kind: 'independent' };
|
|
240
|
+
}
|
|
241
|
+
const authoritativeTask = normalizeTaskText(input.authoritativeTask)
|
|
242
|
+
?? normalizeTaskText(input.task)
|
|
243
|
+
?? `Complete and integrate ${implementationTaskIndexes.length} reviewed deliverables.`;
|
|
244
|
+
const ownerInput = {
|
|
245
|
+
mode: 'spawn',
|
|
246
|
+
task: authoritativeTask,
|
|
247
|
+
authoritativeTask,
|
|
248
|
+
template: input.template ?? 'orchestrator',
|
|
249
|
+
model: input.model,
|
|
250
|
+
provider: input.provider,
|
|
251
|
+
fallbackModels: input.fallbackModels,
|
|
252
|
+
routing: input.routing,
|
|
253
|
+
executionIntent: input.executionIntent,
|
|
254
|
+
reasoningEffort: input.reasoningEffort,
|
|
255
|
+
tools: input.tools,
|
|
256
|
+
restrictTools: input.restrictTools,
|
|
257
|
+
context: buildCompoundContext(input, tasks, authoritativeTask),
|
|
258
|
+
successCriteria: uniqueStrings([
|
|
259
|
+
input.successCriteria,
|
|
260
|
+
...tasks.map((task) => task.successCriteria),
|
|
261
|
+
[`Satisfy the authoritative compound WRFC ask exactly: ${authoritativeTask}`],
|
|
262
|
+
['Keep every implementation deliverable under one owner chain; do not create sibling reviewer/tester/fixer roots.'],
|
|
263
|
+
['Run reviewer/fixer loops only after each corresponding engineer child has output, then integrate the passed deliverables before final full-scope review.'],
|
|
264
|
+
]),
|
|
265
|
+
requiredEvidence: uniqueStrings([
|
|
266
|
+
input.requiredEvidence,
|
|
267
|
+
...tasks.map((task) => task.requiredEvidence),
|
|
268
|
+
]),
|
|
269
|
+
writeScope: uniqueStrings([
|
|
270
|
+
input.writeScope,
|
|
271
|
+
...tasks.map((task) => task.writeScope),
|
|
272
|
+
]),
|
|
273
|
+
executionProtocol: input.executionProtocol,
|
|
274
|
+
reviewMode: 'wrfc',
|
|
275
|
+
communicationLane: input.communicationLane,
|
|
276
|
+
parentAgentId: input.parentAgentId,
|
|
277
|
+
orchestrationGraphId: input.orchestrationGraphId,
|
|
278
|
+
orchestrationNodeId: input.orchestrationNodeId,
|
|
279
|
+
parentNodeId: input.parentNodeId,
|
|
280
|
+
dangerously_disable_wrfc: false,
|
|
281
|
+
cohort: input.cohort,
|
|
282
|
+
wrfcSubtasks: implementationTaskIndexes.map((index) => normalizeCompoundSubtask(tasks[index], authoritativeTask)),
|
|
283
|
+
};
|
|
284
|
+
return {
|
|
285
|
+
kind: 'collapse-to-wrfc',
|
|
286
|
+
reason: 'batch-spawn contained multiple implementation deliverables that require one compound WRFC owner chain',
|
|
287
|
+
ownerInput,
|
|
288
|
+
roleTaskIndexes: [],
|
|
289
|
+
compoundTaskIndexes: implementationTaskIndexes,
|
|
290
|
+
};
|
|
197
291
|
}
|
|
198
292
|
const primaryIndex = tasks.findIndex((task, index) => !roleTaskIndexes.includes(index) && isImplementationLikeTask(task));
|
|
199
293
|
const ownerTask = tasks[primaryIndex >= 0 ? primaryIndex : 0];
|
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.26';
|
|
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.
|
|
3
|
+
"version": "0.33.26",
|
|
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.
|
|
453
|
-
"@pellux/goodvibes-daemon-sdk": "0.33.
|
|
454
|
-
"@pellux/goodvibes-errors": "0.33.
|
|
455
|
-
"@pellux/goodvibes-operator-sdk": "0.33.
|
|
456
|
-
"@pellux/goodvibes-peer-sdk": "0.33.
|
|
457
|
-
"@pellux/goodvibes-transport-core": "0.33.
|
|
458
|
-
"@pellux/goodvibes-transport-http": "0.33.
|
|
459
|
-
"@pellux/goodvibes-transport-realtime": "0.33.
|
|
452
|
+
"@pellux/goodvibes-contracts": "0.33.26",
|
|
453
|
+
"@pellux/goodvibes-daemon-sdk": "0.33.26",
|
|
454
|
+
"@pellux/goodvibes-errors": "0.33.26",
|
|
455
|
+
"@pellux/goodvibes-operator-sdk": "0.33.26",
|
|
456
|
+
"@pellux/goodvibes-peer-sdk": "0.33.26",
|
|
457
|
+
"@pellux/goodvibes-transport-core": "0.33.26",
|
|
458
|
+
"@pellux/goodvibes-transport-http": "0.33.26",
|
|
459
|
+
"@pellux/goodvibes-transport-realtime": "0.33.26"
|
|
460
460
|
},
|
|
461
461
|
"optionalDependencies": {
|
|
462
462
|
"@agentclientprotocol/sdk": "^0.21.0",
|