opencode-swarm 7.137.0 → 7.137.2
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/.opencode/skills/swarm-pr-review/SKILL.md +35 -3
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +7 -3
- package/dist/background/candidate-contract.d.ts +14 -0
- package/dist/cli/{config-doctor-vyx82nx2.js → config-doctor-xrbzq4r0.js} +2 -2
- package/dist/cli/{curation-policy-8tvs4pa0.js → curation-policy-xyradeax.js} +2 -2
- package/dist/cli/{curator-43xqs75k.js → curator-h1ea9skz.js} +13 -13
- package/dist/cli/{curator-llm-factory-8nywfdsh.js → curator-llm-factory-rk7pccwc.js} +13 -13
- package/dist/cli/{guardrail-explain-8kkqz8tx.js → guardrail-explain-sq1kcah3.js} +14 -14
- package/dist/cli/{guardrail-log-e2v9qw71.js → guardrail-log-7anp1z1n.js} +3 -3
- package/dist/cli/{hive-promoter-jt9ky0hn.js → hive-promoter-qsymj94z.js} +13 -13
- package/dist/cli/{index-d00q9kpq.js → index-02jqxmh8.js} +5 -5
- package/dist/cli/{index-pcwjz5de.js → index-1da1tvtn.js} +1 -1
- package/dist/cli/{index-72wzb81c.js → index-4t39wzzg.js} +1 -1
- package/dist/cli/{index-aze9n64z.js → index-5k0csd2m.js} +2 -2
- package/dist/cli/{index-fgkhpdc6.js → index-9casmxdt.js} +4 -4
- package/dist/cli/{index-j6ewv2pe.js → index-aygnzd04.js} +1 -1
- package/dist/cli/{index-k3mezk96.js → index-b2s3t517.js} +4 -2
- package/dist/cli/{index-92v63zzr.js → index-d735dzm7.js} +617 -192
- package/dist/cli/{index-y25nsyaq.js → index-gey6qegb.js} +1 -1
- package/dist/cli/{index-p124rnwb.js → index-jdqayy7h.js} +2 -2
- package/dist/cli/{index-wg98bsxz.js → index-kakb2jm0.js} +1 -1
- package/dist/cli/{index-j2ghsdzz.js → index-p0kez6cn.js} +15 -15
- package/dist/cli/{index-f24r6yqk.js → index-pwx989sa.js} +3 -3
- package/dist/cli/{index-91kk2e9j.js → index-rfrkt29c.js} +1 -1
- package/dist/cli/{index-mg26zd8x.js → index-s9at02fn.js} +1 -1
- package/dist/cli/{index-mwdzkr6k.js → index-vyh2prxv.js} +1 -1
- package/dist/cli/{index-d0nhz96c.js → index-ysh3a2nb.js} +2 -2
- package/dist/cli/index.js +13 -13
- package/dist/cli/{knowledge-escalator-9k0kbx6b.js → knowledge-escalator-e9zk371p.js} +3 -3
- package/dist/cli/{knowledge-events-8nz3sa2d.js → knowledge-events-dnyc1k78.js} +1 -1
- package/dist/cli/{knowledge-store-esghe3f9.js → knowledge-store-x4vqyhbz.js} +1 -1
- package/dist/cli/{knowledge-validator-bjxag1jp.js → knowledge-validator-72jdx5ze.js} +4 -4
- package/dist/cli/{runner-d820ws7y.js → runner-9rqc8y3m.js} +1 -1
- package/dist/cli/{scan-cursor-t212v00f.js → scan-cursor-z4xpes5f.js} +2 -2
- package/dist/cli/{schema-11gyrec3.js → schema-2dkw18zz.js} +1 -1
- package/dist/cli/{skill-generator-a07hpmw6.js → skill-generator-0q1jk6xd.js} +5 -5
- package/dist/council/council-evidence-writer.d.ts +2 -1
- package/dist/council/council-round-state.d.ts +110 -0
- package/dist/council/types.d.ts +0 -2
- package/dist/evaluation/index.d.ts +1 -0
- package/dist/evaluation/model-dispatcher.d.ts +19 -1
- package/dist/evaluation/pr-review-recovery.d.ts +41 -0
- package/dist/evaluation/public-api.d.ts +2 -0
- package/dist/evaluation/runner.d.ts +9 -0
- package/dist/hooks/pr-workflow-gate.d.ts +69 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +187 -183
- package/dist/tools/convene-council.d.ts +2 -17
- package/dist/tools/dispatch-lanes.d.ts +1 -0
- package/dist/tools/submit-phase-council-verdicts.d.ts +0 -1
- package/dist/tools/write-final-council-evidence.d.ts +4 -18
- package/evaluation-fixtures/pr-review-recovery/baseline/SKILL.md +1823 -0
- package/evaluation-fixtures/pr-review-recovery/baseline-manifest.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/environment/score-recovery.cjs +135 -0
- package/evaluation-fixtures/pr-review-recovery/instruction.md +40 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/blind-full-wave-retry/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/contradictory/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/copied-contract/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/critical-without-harm/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/invented-harm/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/malformed/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/missing-reproduction/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/parser-only/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/passing/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/premature-systemic-claim/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/profile-b-fallback/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/underclaimed-harm/model-output.json +1 -0
- package/evaluation-fixtures/pr-review-recovery/scorer-fixtures/unsupported-severity/model-output.json +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as fsp from 'node:fs/promises';
|
|
2
|
+
import { type LaneOutputArtifact } from '../background/lane-output-store.js';
|
|
3
|
+
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, findByBatchId } from '../background/pending-delegations.js';
|
|
2
4
|
import { type PrReviewInlineTriggerRow } from '../background/pr-review-trigger-contract.js';
|
|
3
5
|
import { type RevisionDigestResult, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailed, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync } from '../background/workspace-snapshot.js';
|
|
4
6
|
import { type PrWorkflowGitState } from '../git/pr-workflow-state.js';
|
|
@@ -6,6 +8,33 @@ export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architectur
|
|
|
6
8
|
export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: ("auth-identity-secrets" | "untrusted-input-boundaries" | "subprocess-platform" | "concurrency-state" | "dependencies-build-release" | "api-schema-migrations" | "test-infrastructure" | "ui-accessibility-i18n" | "privacy-observability" | "generated-provenance" | "unclassified-risk")[];
|
|
7
9
|
export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
|
|
8
10
|
export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
|
|
11
|
+
export type PrReviewLaneValidationPredicate = 'batch.validated_at' | 'batch.expected_lane_unique' | 'record.missing' | 'record.duplicate_lane' | 'record.subagent_session_id' | 'record.duplicate_subagent_session_id' | 'record.forbidden_subagent_session_id' | 'record.created_at' | 'record.workflow_lane' | 'record.owned_workflow_lanes' | 'record.mode' | 'record.pr_head_sha' | 'record.git_head' | 'record.status' | 'result.output_degraded' | 'result.transcript_incomplete' | 'result.truncated' | 'result.chars' | 'result.digest' | 'result.output_ref' | 'artifact.readable' | 'artifact.ref' | 'artifact.batch_id' | 'artifact.lane_id' | 'artifact.mode' | 'artifact.session_id' | 'artifact.parent_session_id' | 'artifact.agent' | 'artifact.role' | 'artifact.source' | 'artifact.workflow_lane_record' | 'artifact.workflow_lane_expected' | 'artifact.pr_head_sha' | 'artifact.git_head' | 'artifact.revision_digest' | 'record.scope' | 'artifact.scope' | 'artifact.digest' | 'artifact.chars' | 'discovery.header' | 'discovery.row' | 'discovery.coverage' | 'discovery.duplicate_evidence';
|
|
12
|
+
export interface PrReviewLaneValidationFailure {
|
|
13
|
+
predicate: PrReviewLaneValidationPredicate;
|
|
14
|
+
expected: string;
|
|
15
|
+
actual: string;
|
|
16
|
+
}
|
|
17
|
+
export type PrReviewLaneValidationResult = {
|
|
18
|
+
ok: true;
|
|
19
|
+
} | {
|
|
20
|
+
ok: false;
|
|
21
|
+
failure: PrReviewLaneValidationFailure;
|
|
22
|
+
};
|
|
23
|
+
export interface PrReviewDiscoveryLaneValidationInput {
|
|
24
|
+
record: BackgroundDelegationRecord;
|
|
25
|
+
result: BackgroundDelegationResult;
|
|
26
|
+
artifact: LaneOutputArtifact | null;
|
|
27
|
+
expected: {
|
|
28
|
+
mode: 'swarm-pr-review:base' | 'swarm-pr-review:micro';
|
|
29
|
+
workflowLane: string;
|
|
30
|
+
ownedWorkflowLanes?: readonly string[];
|
|
31
|
+
prHeadSha: string;
|
|
32
|
+
gitHead: string;
|
|
33
|
+
revisionDigest: string;
|
|
34
|
+
reviewScope?: string;
|
|
35
|
+
checkWorkflowLane?: boolean;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
9
38
|
export interface PrWorkflowCheckoutRecoveryRecord {
|
|
10
39
|
code: 'UNMERGED_INDEX' | 'GIT_OPERATION_IN_PROGRESS' | 'DIRTY_SUBMODULE' | 'SWARM_STATE_TRACKING_ERROR' | 'GIT_STATE_INDETERMINATE';
|
|
11
40
|
retryable: false;
|
|
@@ -460,6 +489,7 @@ export declare function enforcePrWorkflowToolBefore(directory: string, sessionID
|
|
|
460
489
|
export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
|
|
461
490
|
export declare const _test_exports: {
|
|
462
491
|
minimumConsolidatedLaneCover: typeof minimumConsolidatedLaneCover;
|
|
492
|
+
analyzePrReviewBatchRecordIntegrity: typeof analyzePrReviewBatchRecordIntegrity;
|
|
463
493
|
MAX_COVER_UNIVERSE_BITS: number;
|
|
464
494
|
workflowGateStateRelativePath: typeof workflowGateStateRelativePath;
|
|
465
495
|
workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
|
|
@@ -678,6 +708,45 @@ interface PrReviewPhaseComposition {
|
|
|
678
708
|
* already computed: no digest resolution, no artifact reads, no subprocess work.
|
|
679
709
|
*/
|
|
680
710
|
declare function assertSettledPhaseHasAuthoritativeVerdicts(phase: PrReviewComposablePhase, composed: Pick<PrReviewPhaseComposition, 'requiredInventory' | 'unclaimed'>, authoritative: ReadonlyMap<string, unknown>, origin: string): void;
|
|
711
|
+
interface ExpectedWorkflowLane {
|
|
712
|
+
laneId: string;
|
|
713
|
+
workflowLane: string;
|
|
714
|
+
reviewItemIds?: string[];
|
|
715
|
+
ownedWorkflowLanes?: string[];
|
|
716
|
+
}
|
|
717
|
+
interface QualifiedBatchRecord {
|
|
718
|
+
record: ReturnType<typeof findByBatchId>[number];
|
|
719
|
+
expectedLane: ExpectedWorkflowLane;
|
|
720
|
+
expectedWorkflowLane: string;
|
|
721
|
+
expectedOwnedLanes: string[];
|
|
722
|
+
}
|
|
723
|
+
type BatchRecordIntegrityAnalysis = ({
|
|
724
|
+
ok: true;
|
|
725
|
+
} & QualifiedBatchRecord) | {
|
|
726
|
+
ok: false;
|
|
727
|
+
expectedLane: ExpectedWorkflowLane;
|
|
728
|
+
expectedWorkflowLane: string;
|
|
729
|
+
expectedOwnedLanes: string[];
|
|
730
|
+
failure: PrReviewLaneValidationFailure;
|
|
731
|
+
};
|
|
732
|
+
export declare function formatPrReviewLaneValidationFailure(failure: PrReviewLaneValidationFailure): string;
|
|
733
|
+
declare function analyzePrReviewBatchRecordIntegrity(args: {
|
|
734
|
+
batchId: string;
|
|
735
|
+
expectedLanes: ReadonlyArray<ExpectedWorkflowLane>;
|
|
736
|
+
expectedMode: string;
|
|
737
|
+
validatedAt: string;
|
|
738
|
+
checkWorkflowLane: boolean;
|
|
739
|
+
forbiddenSubagentSessionIds: ReadonlySet<string>;
|
|
740
|
+
records: readonly BackgroundDelegationRecord[];
|
|
741
|
+
expectedPrHeadSha?: string;
|
|
742
|
+
}): BatchRecordIntegrityAnalysis[];
|
|
743
|
+
/**
|
|
744
|
+
* Validate a just-collected base/micro discovery result before the delegation
|
|
745
|
+
* ledger publishes it as completed. The caller supplies the prospective result
|
|
746
|
+
* and the exact stored artifact, so this pure validator cannot accidentally
|
|
747
|
+
* accept stale terminal state or a different output reference.
|
|
748
|
+
*/
|
|
749
|
+
export declare function validatePrReviewDiscoveryLaneCompletion(input: PrReviewDiscoveryLaneValidationInput): PrReviewLaneValidationResult;
|
|
681
750
|
/** Require at least one semantically valid discovery row or CLEAN attestation. */
|
|
682
751
|
export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string, ownedWorkflowLanes?: readonly string[]): boolean;
|
|
683
752
|
declare function parseCriticVerdict(text: string, itemId: string, reviewerSeverity?: string): {
|
package/dist/index.d.ts
CHANGED
|
@@ -50,5 +50,7 @@ export type { AgentDefinition } from './agents';
|
|
|
50
50
|
export type { AgentName, AutomationCapabilities, AutomationConfig, AutomationMode, PipelineAgentName, PluginConfig, QAAgentName, } from './config';
|
|
51
51
|
export { loadTier1EvaluationTasks } from './evaluation/fixtures.js';
|
|
52
52
|
export { recordTestImpactGateGroundTruth } from './evaluation/gate-ground-truth.js';
|
|
53
|
+
export type { EvaluatePrReviewRecoveryV1Options } from './evaluation/pr-review-recovery.js';
|
|
54
|
+
export { evaluatePrReviewRecoveryV1 } from './evaluation/pr-review-recovery.js';
|
|
53
55
|
export type { EvaluateCandidateV1Options, EvaluateCandidateV1Result, } from './evaluation/public-api.js';
|
|
54
56
|
export { evaluateCandidateV1, evaluationV1, } from './evaluation/public-api.js';
|