@chllming/wave-orchestration 0.6.2 → 0.7.0
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/CHANGELOG.md +64 -1
- package/README.md +44 -8
- package/docs/agents/wave-orchestrator-role.md +50 -0
- package/docs/agents/wave-planner-role.md +39 -0
- package/docs/context7/bundles.json +9 -0
- package/docs/context7/planner-agent/README.md +25 -0
- package/docs/context7/planner-agent/manifest.json +83 -0
- package/docs/context7/planner-agent/papers/cooperbench-why-coding-agents-cannot-be-your-teammates-yet.md +3283 -0
- package/docs/context7/planner-agent/papers/dova-deliberation-first-multi-agent-orchestration-for-autonomous-research-automation.md +1699 -0
- package/docs/context7/planner-agent/papers/dpbench-large-language-models-struggle-with-simultaneous-coordination.md +2251 -0
- package/docs/context7/planner-agent/papers/incremental-planning-to-control-a-blackboard-based-problem-solver.md +1729 -0
- package/docs/context7/planner-agent/papers/silo-bench-a-scalable-environment-for-evaluating-distributed-coordination-in-multi-agent-llm-systems.md +3747 -0
- package/docs/context7/planner-agent/papers/todoevolve-learning-to-architect-agent-planning-systems.md +1675 -0
- package/docs/context7/planner-agent/papers/verified-multi-agent-orchestration-a-plan-execute-verify-replan-framework-for-complex-query-resolution.md +1173 -0
- package/docs/context7/planner-agent/papers/why-do-multi-agent-llm-systems-fail.md +5211 -0
- package/docs/context7/planner-agent/topics/planning-and-orchestration.md +24 -0
- package/docs/evals/README.md +96 -1
- package/docs/evals/arm-templates/README.md +13 -0
- package/docs/evals/arm-templates/full-wave.json +15 -0
- package/docs/evals/arm-templates/single-agent.json +15 -0
- package/docs/evals/benchmark-catalog.json +7 -0
- package/docs/evals/cases/README.md +47 -0
- package/docs/evals/cases/wave-blackboard-inbox-targeting.json +73 -0
- package/docs/evals/cases/wave-contradiction-conflict.json +104 -0
- package/docs/evals/cases/wave-expert-routing-preservation.json +69 -0
- package/docs/evals/cases/wave-hidden-profile-private-evidence.json +81 -0
- package/docs/evals/cases/wave-premature-closure-guard.json +71 -0
- package/docs/evals/cases/wave-silo-cross-agent-state.json +77 -0
- package/docs/evals/cases/wave-simultaneous-lockstep.json +92 -0
- package/docs/evals/cooperbench/real-world-mitigation.md +341 -0
- package/docs/evals/external-benchmarks.json +85 -0
- package/docs/evals/external-command-config.sample.json +9 -0
- package/docs/evals/external-command-config.swe-bench-pro.json +8 -0
- package/docs/evals/pilots/README.md +47 -0
- package/docs/evals/pilots/swe-bench-pro-public-full-wave-review-10.json +64 -0
- package/docs/evals/pilots/swe-bench-pro-public-pilot.json +111 -0
- package/docs/evals/wave-benchmark-program.md +302 -0
- package/docs/guides/planner.md +48 -11
- package/docs/plans/context7-wave-orchestrator.md +20 -0
- package/docs/plans/current-state.md +9 -1
- package/docs/plans/examples/wave-benchmark-improvement.md +108 -0
- package/docs/plans/examples/wave-example-live-proof.md +1 -1
- package/docs/plans/examples/wave-example-rollout-fidelity.md +340 -0
- package/docs/plans/wave-orchestrator.md +73 -11
- package/docs/plans/waves/reviews/wave-1-benchmark-operator.md +118 -0
- package/docs/reference/coordination-and-closure.md +436 -0
- package/docs/reference/live-proof-waves.md +25 -3
- package/docs/reference/npmjs-trusted-publishing.md +3 -3
- package/docs/reference/proof-metrics.md +90 -0
- package/docs/reference/runtime-config/README.md +61 -0
- package/docs/reference/sample-waves.md +29 -18
- package/docs/reference/wave-control.md +164 -0
- package/docs/reference/wave-planning-lessons.md +131 -0
- package/package.json +5 -4
- package/releases/manifest.json +33 -0
- package/scripts/research/agent-context-archive.mjs +18 -0
- package/scripts/research/manifests/agent-context-expanded-2026-03-22.mjs +17 -0
- package/scripts/research/sync-planner-context7-bundle.mjs +133 -0
- package/scripts/wave-autonomous.mjs +2 -4
- package/scripts/wave-orchestrator/adhoc.mjs +32 -11
- package/scripts/wave-orchestrator/artifact-schemas.mjs +232 -0
- package/scripts/wave-orchestrator/autonomous.mjs +27 -6
- package/scripts/wave-orchestrator/benchmark-cases.mjs +374 -0
- package/scripts/wave-orchestrator/benchmark-external.mjs +1384 -0
- package/scripts/wave-orchestrator/benchmark.mjs +972 -0
- package/scripts/wave-orchestrator/clarification-triage.mjs +78 -12
- package/scripts/wave-orchestrator/config.mjs +175 -0
- package/scripts/wave-orchestrator/control-cli.mjs +1123 -0
- package/scripts/wave-orchestrator/control-plane.mjs +697 -0
- package/scripts/wave-orchestrator/coord-cli.mjs +360 -2
- package/scripts/wave-orchestrator/coordination-store.mjs +211 -9
- package/scripts/wave-orchestrator/coordination.mjs +84 -0
- package/scripts/wave-orchestrator/dashboard-renderer.mjs +38 -3
- package/scripts/wave-orchestrator/dashboard-state.mjs +22 -0
- package/scripts/wave-orchestrator/evals.mjs +23 -0
- package/scripts/wave-orchestrator/executors.mjs +3 -2
- package/scripts/wave-orchestrator/feedback.mjs +55 -0
- package/scripts/wave-orchestrator/install.mjs +253 -26
- package/scripts/wave-orchestrator/launcher-closure.mjs +4 -1
- package/scripts/wave-orchestrator/launcher-runtime.mjs +24 -21
- package/scripts/wave-orchestrator/launcher.mjs +800 -35
- package/scripts/wave-orchestrator/package-update-notice.mjs +230 -0
- package/scripts/wave-orchestrator/package-version.mjs +32 -0
- package/scripts/wave-orchestrator/planner-context.mjs +75 -0
- package/scripts/wave-orchestrator/planner.mjs +2270 -136
- package/scripts/wave-orchestrator/proof-cli.mjs +195 -0
- package/scripts/wave-orchestrator/proof-registry.mjs +317 -0
- package/scripts/wave-orchestrator/replay.mjs +10 -4
- package/scripts/wave-orchestrator/retry-cli.mjs +184 -0
- package/scripts/wave-orchestrator/retry-control.mjs +225 -0
- package/scripts/wave-orchestrator/shared.mjs +26 -0
- package/scripts/wave-orchestrator/swe-bench-pro-task.mjs +1004 -0
- package/scripts/wave-orchestrator/traces.mjs +157 -2
- package/scripts/wave-orchestrator/wave-control-client.mjs +532 -0
- package/scripts/wave-orchestrator/wave-control-schema.mjs +309 -0
- package/scripts/wave-orchestrator/wave-files.mjs +17 -5
- package/scripts/wave.mjs +39 -2
- package/skills/repo-coding-rules/SKILL.md +1 -0
- package/skills/role-cont-eval/SKILL.md +1 -0
- package/skills/role-cont-qa/SKILL.md +13 -6
- package/skills/role-deploy/SKILL.md +1 -0
- package/skills/role-documentation/SKILL.md +4 -0
- package/skills/role-implementation/SKILL.md +4 -0
- package/skills/role-infra/SKILL.md +2 -1
- package/skills/role-integration/SKILL.md +15 -8
- package/skills/role-planner/SKILL.md +39 -0
- package/skills/role-planner/skill.json +21 -0
- package/skills/role-research/SKILL.md +1 -0
- package/skills/role-security/SKILL.md +2 -2
- package/skills/runtime-claude/SKILL.md +2 -1
- package/skills/runtime-codex/SKILL.md +1 -0
- package/skills/runtime-local/SKILL.md +2 -0
- package/skills/runtime-opencode/SKILL.md +1 -0
- package/skills/wave-core/SKILL.md +25 -6
- package/skills/wave-core/references/marker-syntax.md +16 -8
- package/wave.config.json +45 -0
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { buildAgentExecutionSummary, validateImplementationSummary } from "./agent-state.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
buildCoordinationResponseMetrics,
|
|
6
|
+
openClarificationLinkedRequests,
|
|
7
|
+
readCoordinationLog,
|
|
8
|
+
serializeCoordinationState,
|
|
9
|
+
} from "./coordination-store.mjs";
|
|
10
|
+
import { readControlPlaneEvents } from "./control-plane.mjs";
|
|
5
11
|
import {
|
|
6
12
|
isContEvalReportOnlyAgent,
|
|
7
13
|
isSecurityReviewAgent,
|
|
@@ -18,6 +24,10 @@ import {
|
|
|
18
24
|
writeTextAtomic,
|
|
19
25
|
} from "./shared.mjs";
|
|
20
26
|
import { summarizeResolvedSkills } from "./skills.mjs";
|
|
27
|
+
import {
|
|
28
|
+
buildWaveControlArtifactFromPath,
|
|
29
|
+
safeQueueWaveControlEvent,
|
|
30
|
+
} from "./wave-control-client.mjs";
|
|
21
31
|
|
|
22
32
|
export const TRACE_VERSION = 2;
|
|
23
33
|
const LEGACY_TRACE_VERSION = 1;
|
|
@@ -287,6 +297,7 @@ function computeAckAndBlockerTimings(coordinationRecords) {
|
|
|
287
297
|
const resolvedStatuses = new Set(["resolved", "closed", "superseded", "cancelled"]);
|
|
288
298
|
const ackDurations = [];
|
|
289
299
|
const blockerDurations = [];
|
|
300
|
+
const resolutionDurations = [];
|
|
290
301
|
for (const history of grouped.values()) {
|
|
291
302
|
const first = history[0];
|
|
292
303
|
const startMs = Date.parse(first.createdAt || first.updatedAt || "");
|
|
@@ -300,6 +311,13 @@ function computeAckAndBlockerTimings(coordinationRecords) {
|
|
|
300
311
|
ackDurations.push(ackMs - startMs);
|
|
301
312
|
}
|
|
302
313
|
}
|
|
314
|
+
if (["request", "clarification-request", "human-feedback", "human-escalation"].includes(first.kind)) {
|
|
315
|
+
const resolved = history.find((record) => resolvedStatuses.has(record.status));
|
|
316
|
+
const resolvedMs = Date.parse(resolved?.updatedAt || "");
|
|
317
|
+
if (Number.isFinite(resolvedMs) && resolvedMs >= startMs) {
|
|
318
|
+
resolutionDurations.push(resolvedMs - startMs);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
303
321
|
if (first.kind === "blocker") {
|
|
304
322
|
const resolved = history.find((record) => resolvedStatuses.has(record.status));
|
|
305
323
|
const resolvedMs = Date.parse(resolved?.updatedAt || "");
|
|
@@ -310,10 +328,39 @@ function computeAckAndBlockerTimings(coordinationRecords) {
|
|
|
310
328
|
}
|
|
311
329
|
return {
|
|
312
330
|
meanTimeToFirstAckMs: averageOrNull(ackDurations),
|
|
331
|
+
meanTimeToResolutionMs: averageOrNull(resolutionDurations),
|
|
313
332
|
meanTimeToBlockerResolutionMs: averageOrNull(blockerDurations),
|
|
314
333
|
};
|
|
315
334
|
}
|
|
316
335
|
|
|
336
|
+
function latestRecordTimestampMs(record) {
|
|
337
|
+
const updatedAtMs = Date.parse(record?.updatedAt || "");
|
|
338
|
+
if (Number.isFinite(updatedAtMs)) {
|
|
339
|
+
return updatedAtMs;
|
|
340
|
+
}
|
|
341
|
+
const createdAtMs = Date.parse(record?.createdAt || "");
|
|
342
|
+
return Number.isFinite(createdAtMs) ? createdAtMs : null;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function resolveCoordinationSnapshotNowMs(coordinationRecords, coordinationState) {
|
|
346
|
+
const records = Array.isArray(coordinationRecords) && coordinationRecords.length > 0
|
|
347
|
+
? coordinationRecords
|
|
348
|
+
: Array.isArray(coordinationState?.records) && coordinationState.records.length > 0
|
|
349
|
+
? coordinationState.records
|
|
350
|
+
: Array.isArray(coordinationState?.latestRecords)
|
|
351
|
+
? coordinationState.latestRecords
|
|
352
|
+
: [];
|
|
353
|
+
let latestMs = null;
|
|
354
|
+
for (const record of records) {
|
|
355
|
+
const recordMs = latestRecordTimestampMs(record);
|
|
356
|
+
if (!Number.isFinite(recordMs)) {
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
latestMs = latestMs === null ? recordMs : Math.max(latestMs, recordMs);
|
|
360
|
+
}
|
|
361
|
+
return latestMs;
|
|
362
|
+
}
|
|
363
|
+
|
|
317
364
|
function computeAssignmentAndDependencyTimings(coordinationRecords, dependencySnapshot = null) {
|
|
318
365
|
const grouped = groupCoordinationHistory(coordinationRecords);
|
|
319
366
|
const requestStartById = new Map();
|
|
@@ -455,6 +502,15 @@ export function buildQualityMetrics({
|
|
|
455
502
|
coordinationRecords,
|
|
456
503
|
dependencySnapshot,
|
|
457
504
|
);
|
|
505
|
+
const coordinationSnapshotNowMs = resolveCoordinationSnapshotNowMs(
|
|
506
|
+
coordinationRecords,
|
|
507
|
+
coordinationState,
|
|
508
|
+
);
|
|
509
|
+
const responseMetrics = buildCoordinationResponseMetrics(coordinationState, {
|
|
510
|
+
...(Number.isFinite(coordinationSnapshotNowMs)
|
|
511
|
+
? { nowMs: coordinationSnapshotNowMs }
|
|
512
|
+
: {}),
|
|
513
|
+
});
|
|
458
514
|
const documentationItems = Array.isArray(docsQueue?.items) ? docsQueue.items : [];
|
|
459
515
|
const unresolvedClarificationCount = (coordinationState?.clarifications || []).filter((record) =>
|
|
460
516
|
["open", "acknowledged", "in_progress"].includes(record.status),
|
|
@@ -494,7 +550,13 @@ export function buildQualityMetrics({
|
|
|
494
550
|
meanTimeToCapabilityAssignmentMs: assignmentTimings.meanTimeToCapabilityAssignmentMs,
|
|
495
551
|
meanTimeToDependencyResolutionMs: assignmentTimings.meanTimeToDependencyResolutionMs,
|
|
496
552
|
helperTaskAssignmentCount: (capabilityAssignments || []).filter((assignment) => assignment.assignedAgentId).length,
|
|
553
|
+
oldestOpenCoordinationAgeMs: responseMetrics.oldestOpenCoordinationAgeMs,
|
|
554
|
+
oldestUnackedRequestAgeMs: responseMetrics.oldestUnackedRequestAgeMs,
|
|
555
|
+
overdueAckCount: responseMetrics.overdueAckCount,
|
|
556
|
+
overdueClarificationCount: responseMetrics.overdueClarificationCount,
|
|
557
|
+
openHumanEscalationCount: responseMetrics.openHumanEscalationCount,
|
|
497
558
|
meanTimeToFirstAckMs: timings.meanTimeToFirstAckMs,
|
|
559
|
+
meanTimeToResolutionMs: timings.meanTimeToResolutionMs,
|
|
498
560
|
meanTimeToBlockerResolutionMs: timings.meanTimeToBlockerResolutionMs,
|
|
499
561
|
contQaReversal: contQaReversalFromHistory(effectiveHistory, gateSnapshot),
|
|
500
562
|
finalRecommendation: integrationSummary?.recommendation || "unknown",
|
|
@@ -722,6 +784,8 @@ export function writeTraceBundle({
|
|
|
722
784
|
securitySummary = null,
|
|
723
785
|
integrationSummary,
|
|
724
786
|
integrationMarkdownPath,
|
|
787
|
+
proofRegistryPath = null,
|
|
788
|
+
controlPlanePath = null,
|
|
725
789
|
clarificationTriage,
|
|
726
790
|
agentRuns,
|
|
727
791
|
quality,
|
|
@@ -793,6 +857,18 @@ export function writeTraceBundle({
|
|
|
793
857
|
path.join(dir, "integration.md"),
|
|
794
858
|
false,
|
|
795
859
|
);
|
|
860
|
+
const proofRegistryArtifact = copyArtifactDescriptor(
|
|
861
|
+
dir,
|
|
862
|
+
proofRegistryPath,
|
|
863
|
+
path.join(dir, "proof-registry.json"),
|
|
864
|
+
false,
|
|
865
|
+
);
|
|
866
|
+
const controlPlaneArtifact = copyArtifactDescriptor(
|
|
867
|
+
dir,
|
|
868
|
+
controlPlanePath,
|
|
869
|
+
path.join(dir, "control-plane.raw.jsonl"),
|
|
870
|
+
false,
|
|
871
|
+
);
|
|
796
872
|
const qualityArtifact = writeArtifactDescriptor(
|
|
797
873
|
dir,
|
|
798
874
|
path.join(dir, "quality.json"),
|
|
@@ -933,6 +1009,8 @@ export function writeTraceBundle({
|
|
|
933
1009
|
security: securityArtifact,
|
|
934
1010
|
integration: integrationArtifact,
|
|
935
1011
|
integrationMarkdown: integrationMarkdownArtifact,
|
|
1012
|
+
proofRegistry: proofRegistryArtifact,
|
|
1013
|
+
controlPlane: controlPlaneArtifact,
|
|
936
1014
|
componentMatrix: componentMatrixArtifact,
|
|
937
1015
|
componentMatrixMarkdown: componentMatrixMarkdownArtifact,
|
|
938
1016
|
outcome: outcomeArtifact,
|
|
@@ -952,7 +1030,82 @@ export function writeTraceBundle({
|
|
|
952
1030
|
present: true,
|
|
953
1031
|
sha256: null,
|
|
954
1032
|
};
|
|
955
|
-
|
|
1033
|
+
const runMetadataPath = path.join(dir, "run-metadata.json");
|
|
1034
|
+
writeJsonAtomic(runMetadataPath, metadata);
|
|
1035
|
+
if (lanePaths?.waveControl?.captureTraceBundles !== false) {
|
|
1036
|
+
safeQueueWaveControlEvent(lanePaths, {
|
|
1037
|
+
category: "trace",
|
|
1038
|
+
entityType: "artifact",
|
|
1039
|
+
entityId: `wave-${wave.wave}-attempt-${attempt}-trace-bundle`,
|
|
1040
|
+
action: "bundle-written",
|
|
1041
|
+
source: "launcher",
|
|
1042
|
+
actor: "launcher",
|
|
1043
|
+
recordedAt: metadata.capturedAt,
|
|
1044
|
+
identity: {
|
|
1045
|
+
lane: lanePaths?.lane || null,
|
|
1046
|
+
wave: wave.wave,
|
|
1047
|
+
attempt,
|
|
1048
|
+
runKind: lanePaths?.runKind || "roadmap",
|
|
1049
|
+
runId: lanePaths?.runId || null,
|
|
1050
|
+
},
|
|
1051
|
+
tags: ["trace", "attempt-bundle"],
|
|
1052
|
+
data: {
|
|
1053
|
+
traceDir: relativePathOrNull(dir, REPO_ROOT),
|
|
1054
|
+
finalRecommendation: quality?.finalRecommendation || null,
|
|
1055
|
+
gate: normalizedGateSnapshot?.overall?.gate || null,
|
|
1056
|
+
},
|
|
1057
|
+
artifacts: [
|
|
1058
|
+
{
|
|
1059
|
+
...buildWaveControlArtifactFromPath(runMetadataPath, {
|
|
1060
|
+
kind: "trace-run-metadata",
|
|
1061
|
+
required: true,
|
|
1062
|
+
uploadPolicy: "selected",
|
|
1063
|
+
}),
|
|
1064
|
+
sourcePath: runMetadataPath,
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
...buildWaveControlArtifactFromPath(path.join(dir, "quality.json"), {
|
|
1068
|
+
kind: "trace-quality",
|
|
1069
|
+
required: true,
|
|
1070
|
+
uploadPolicy: "selected",
|
|
1071
|
+
}),
|
|
1072
|
+
sourcePath: path.join(dir, "quality.json"),
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
...buildWaveControlArtifactFromPath(path.join(dir, "outcome.json"), {
|
|
1076
|
+
kind: "trace-outcome",
|
|
1077
|
+
required: true,
|
|
1078
|
+
uploadPolicy: "selected",
|
|
1079
|
+
}),
|
|
1080
|
+
sourcePath: path.join(dir, "outcome.json"),
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
...buildWaveControlArtifactFromPath(path.join(dir, "integration.json"), {
|
|
1084
|
+
kind: "integration-summary",
|
|
1085
|
+
required: true,
|
|
1086
|
+
uploadPolicy: "selected",
|
|
1087
|
+
}),
|
|
1088
|
+
sourcePath: path.join(dir, "integration.json"),
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
...buildWaveControlArtifactFromPath(path.join(dir, "proof-registry.json"), {
|
|
1092
|
+
kind: "proof-registry",
|
|
1093
|
+
required: false,
|
|
1094
|
+
uploadPolicy: "selected",
|
|
1095
|
+
}),
|
|
1096
|
+
sourcePath: path.join(dir, "proof-registry.json"),
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
...buildWaveControlArtifactFromPath(path.join(dir, "control-plane.raw.jsonl"), {
|
|
1100
|
+
kind: "control-plane-log",
|
|
1101
|
+
required: false,
|
|
1102
|
+
uploadPolicy: "metadata-only",
|
|
1103
|
+
}),
|
|
1104
|
+
sourcePath: path.join(dir, "control-plane.raw.jsonl"),
|
|
1105
|
+
},
|
|
1106
|
+
],
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
956
1109
|
return dir;
|
|
957
1110
|
}
|
|
958
1111
|
|
|
@@ -967,12 +1120,14 @@ export function loadTraceBundle(dir) {
|
|
|
967
1120
|
manifest,
|
|
968
1121
|
coordinationState,
|
|
969
1122
|
coordinationRecords,
|
|
1123
|
+
controlPlaneEvents: readControlPlaneEvents(path.join(dir, "control-plane.raw.jsonl")),
|
|
970
1124
|
ledger: readJsonOrNull(path.join(dir, "ledger.json")),
|
|
971
1125
|
docsQueue: readJsonOrNull(path.join(dir, "docs-queue.json")),
|
|
972
1126
|
capabilityAssignments: readJsonOrNull(path.join(dir, "capability-assignments.json")),
|
|
973
1127
|
dependencySnapshot: readJsonOrNull(path.join(dir, "dependency-snapshot.json")),
|
|
974
1128
|
securitySummary: readJsonOrNull(path.join(dir, "security.json")),
|
|
975
1129
|
integrationSummary: readJsonOrNull(path.join(dir, "integration.json")),
|
|
1130
|
+
proofRegistry: readJsonOrNull(path.join(dir, "proof-registry.json")),
|
|
976
1131
|
quality: readJsonOrNull(path.join(dir, "quality.json")),
|
|
977
1132
|
storedOutcome: readJsonOrNull(path.join(dir, "outcome.json")),
|
|
978
1133
|
structuredSignals: readJsonOrNull(path.join(dir, "structured-signals.json")),
|