opencode-swarm 7.135.1 → 7.135.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-feedback/SKILL.md +24 -21
- package/.opencode/skills/swarm-pr-review/SKILL.md +55 -42
- package/dist/agents/explorer.d.ts +1 -1
- package/dist/background/candidate-contract.d.ts +113 -0
- package/dist/background/candidate-parser.d.ts +8 -29
- package/dist/background/pr-review-trigger-contract.d.ts +197 -0
- package/dist/background/workspace-snapshot.d.ts +26 -0
- package/dist/cli/{config-doctor-6398t3a6.js → config-doctor-pj3yvxdb.js} +2 -2
- package/dist/cli/{core-9876t6cs.js → core-4va9z2ng.js} +2 -2
- package/dist/cli/{curation-policy-f7qz4tez.js → curation-policy-b2caf3v3.js} +5 -5
- package/dist/cli/{curator-drift-9q6f85bm.js → curator-drift-2ta83hss.js} +2 -2
- package/dist/cli/{curator-llm-factory-wr3zmy2c.js → curator-llm-factory-9983528d.js} +26 -26
- package/dist/cli/{curator-fjhyezyx.js → curator-r1s2mwf2.js} +26 -26
- package/dist/cli/{dispatch-gxbeb2ps.js → dispatch-wtk6dxky.js} +2 -2
- package/dist/cli/{evidence-summary-service-0cczdmjv.js → evidence-summary-service-feby8ny0.js} +5 -5
- package/dist/cli/{explorer-jp0nen03.js → explorer-15gqzxh8.js} +1 -1
- package/dist/cli/{gate-evidence-8zrwdj69.js → gate-evidence-84b03mb4.js} +3 -3
- package/dist/cli/guardrail-explain-pwxvg5n0.js +57 -0
- package/dist/cli/{guardrail-log-bd45kw0x.js → guardrail-log-yzpz8b7t.js} +4 -4
- package/dist/cli/{hive-promoter-f2yh22m1.js → hive-promoter-586dhndj.js} +26 -26
- package/dist/cli/{index-j89zmcpx.js → index-02cqjna3.js} +6 -6
- package/dist/cli/{index-jtshf1pd.js → index-2pxk6qg4.js} +1 -1
- package/dist/cli/{index-aky90eqz.js → index-340chr1e.js} +1612 -166
- package/dist/cli/{index-xhpmagdm.js → index-3m7kpnqf.js} +2 -2
- package/dist/cli/{index-z085b4ka.js → index-3xbx305x.js} +1 -1
- package/dist/cli/{index-b4z7s917.js → index-73dfyfhq.js} +1 -1
- package/dist/cli/{index-ens0gt38.js → index-7pnvf04s.js} +8 -8
- package/dist/cli/{index-g1drmgxe.js → index-8gw8p7yh.js} +3 -3
- package/dist/cli/{index-jxchddjk.js → index-9c3gf2wd.js} +1 -1
- package/dist/cli/{index-bjrkg4tc.js → index-b0eva00y.js} +2 -2
- package/dist/cli/{index-2ghkk9ve.js → index-bfd4xfpp.js} +3 -3
- package/dist/cli/{index-4pdrmemy.js → index-bs4m85v1.js} +2 -2
- package/dist/cli/{index-5wx8wdxg.js → index-ckdva4rs.js} +5 -5
- package/dist/cli/{index-w80r3axq.js → index-cwdy5vw9.js} +28 -28
- package/dist/cli/{index-fwkqq9mq.js → index-d5psymdk.js} +4 -4
- package/dist/cli/{index-vxv732ex.js → index-dg1njnms.js} +7 -4
- package/dist/cli/{index-yhba8swx.js → index-dzyjb33e.js} +1 -1
- package/dist/cli/{index-xg9repnx.js → index-ey29aap6.js} +1 -1
- package/dist/cli/{index-wdkkf3xg.js → index-g3meqrsg.js} +2 -2
- package/dist/cli/{index-7an2qn0s.js → index-hdy2nd5h.js} +4 -4
- package/dist/cli/{index-nbnqf4fj.js → index-hvrrq3f3.js} +1 -1
- package/dist/cli/{index-dzaarxhg.js → index-j0kte6gd.js} +1 -1
- package/dist/cli/{index-5vp9gka3.js → index-j92ser8n.js} +1 -1
- package/dist/cli/{index-2nqsr1dx.js → index-jgkjxpdh.js} +4 -4
- package/dist/cli/{index-13xxjfhn.js → index-m0ynxkaa.js} +3 -3
- package/dist/cli/{index-247b1c1m.js → index-qqkw794p.js} +3 -3
- package/dist/cli/{index-b7p0mp2q.js → index-ryqnn3nv.js} +1 -1
- package/dist/cli/{index-fpkb3mw1.js → index-vg3yx648.js} +1 -1
- package/dist/cli/{index-qe3v54nb.js → index-y111zefa.js} +64 -23
- package/dist/cli/{index-3nasn371.js → index-y6a7gjtj.js} +126 -42
- package/dist/cli/index.js +26 -26
- package/dist/cli/{knowledge-escalator-4tp3yy7e.js → knowledge-escalator-w7by1m8m.js} +6 -6
- package/dist/cli/{knowledge-events-7854gb3p.js → knowledge-events-n8xxsay3.js} +4 -4
- package/dist/cli/{knowledge-link-etrfntkd.js → knowledge-link-mm1w967j.js} +3 -3
- package/dist/cli/{knowledge-store-cxnr6v01.js → knowledge-store-xzmvfnx3.js} +4 -4
- package/dist/cli/{knowledge-validator-3n5t55qy.js → knowledge-validator-5q1amsq6.js} +7 -7
- package/dist/cli/{pending-delegations-4z3tkkct.js → pending-delegations-mt5gs1bt.js} +3 -3
- package/dist/cli/{pr-subscriptions-29j794kd.js → pr-subscriptions-v5xd3j6d.js} +3 -3
- package/dist/cli/{scan-cursor-0cexjh3b.js → scan-cursor-1q1zmt4b.js} +5 -5
- package/dist/cli/{schema-rs5a7ywx.js → schema-8mtsfspm.js} +1 -1
- package/dist/cli/{scope-persistence-1vsnkmm4.js → scope-persistence-h2fpgxww.js} +2 -2
- package/dist/cli/{skill-generator-n0h9n0zd.js → skill-generator-54xbjgak.js} +8 -8
- package/dist/cli/{workspace-snapshot-9h5za0s6.js → workspace-snapshot-jmyamqnv.js} +6 -1
- package/dist/cli/{worktree-collision-ownership-dtwr0xj4.js → worktree-collision-ownership-15hymf1y.js} +5 -5
- package/dist/commands/registry.d.ts +1 -1
- package/dist/hooks/pr-workflow-gate.d.ts +30 -4
- package/dist/hooks/repo-graph-builder.d.ts +18 -0
- package/dist/index.js +394 -390
- package/dist/tools/convene-council.d.ts +3 -3
- package/dist/tools/dispatch-lanes.d.ts +65 -7
- package/dist/tools/repo-graph/builder.d.ts +20 -2
- package/dist/tools/repo-graph/incremental.d.ts +18 -1
- package/dist/tools/repo-graph/ontology.d.ts +8 -0
- package/dist/tools/repo-graph/types.d.ts +62 -1
- package/dist/tools/repo-graph.d.ts +1 -1
- package/dist/tools/submit-phase-council-verdicts.d.ts +3 -3
- package/dist/tools/write-final-council-evidence.d.ts +3 -3
- package/dist/tools/write-pr-review-trigger-eval.d.ts +34 -63
- package/package.json +1 -1
- package/dist/cli/guardrail-explain-g1s89b3e.js +0 -57
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as fsp from 'node:fs/promises';
|
|
2
|
+
import { type PrReviewInlineTriggerRow } from '../background/pr-review-trigger-contract.js';
|
|
2
3
|
import { resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync } from '../background/workspace-snapshot.js';
|
|
3
4
|
import { type PrWorkflowGitState } from '../git/pr-workflow-state.js';
|
|
4
5
|
export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
|
|
5
|
-
export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS:
|
|
6
|
+
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")[];
|
|
6
7
|
export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
|
|
7
8
|
export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
|
|
8
9
|
export interface PrWorkflowCheckoutRecoveryRecord {
|
|
@@ -194,6 +195,8 @@ export interface PrWorkflowGateState {
|
|
|
194
195
|
prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
|
|
195
196
|
/** @deprecated Compatibility projection of the most recent base dispatch. */
|
|
196
197
|
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
198
|
+
/** Canonical ordered semantic ledger frozen by the first micro dispatch. */
|
|
199
|
+
prReviewTriggerLedger?: PrReviewInlineTriggerRow[];
|
|
197
200
|
prReviewTriggerEvalPath?: string;
|
|
198
201
|
prReviewValidationBatches?: PrReviewValidationBatchRecord[];
|
|
199
202
|
prReviewArtifactRunId?: string;
|
|
@@ -284,7 +287,7 @@ export declare function bindPrReviewBase(directory: string, sessionID: string, o
|
|
|
284
287
|
* exact remediation command so callers can self-diagnose instead of
|
|
285
288
|
* cascading into fictional root causes.
|
|
286
289
|
*/
|
|
287
|
-
export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string): Promise<string>;
|
|
290
|
+
export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string, mode?: PrWorkflowMode): Promise<string>;
|
|
288
291
|
/** Prove that every PR-review lane reads the immutable checked-out PR tree. */
|
|
289
292
|
export declare function assertPrReviewCleanCheckout(directory: string, mode?: PrWorkflowMode): Promise<void>;
|
|
290
293
|
export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
|
|
@@ -335,6 +338,8 @@ export declare function assertPrFeedbackGatePhaseSettled(directory: string, sess
|
|
|
335
338
|
/** Require every ordered feedback gate on one unchanged revision. */
|
|
336
339
|
export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
|
|
337
340
|
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
341
|
+
/** Freeze one exact inline trigger ledger across every micro dispatch. */
|
|
342
|
+
export declare function bindPrReviewTriggerLedger(directory: string, sessionID: string, input: unknown): Promise<PrWorkflowGateState>;
|
|
338
343
|
export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[]): Promise<PrWorkflowGateState>;
|
|
339
344
|
/**
|
|
340
345
|
* Artifact records are a projection of lane receipts, never a caller-controlled
|
|
@@ -365,14 +370,23 @@ export declare function completePrWorkflow(directory: string, sessionID: string,
|
|
|
365
370
|
export declare const _test_exports: {
|
|
366
371
|
workflowGateStateRelativePath: typeof workflowGateStateRelativePath;
|
|
367
372
|
workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
|
|
373
|
+
workflowCheckoutMutationLockRelativePath: typeof workflowCheckoutMutationLockRelativePath;
|
|
374
|
+
withPrWorkflowCheckoutMutationLock: typeof withPrWorkflowCheckoutMutationLock;
|
|
368
375
|
resetTrackedStateCache: () => void;
|
|
369
376
|
beforeTerminalClear: (() => Promise<void>) | undefined;
|
|
370
377
|
beforePrFeedbackTransitionLock: (() => Promise<void>) | undefined;
|
|
378
|
+
beforePrFeedbackTrackingSwitch: (() => Promise<void>) | undefined;
|
|
379
|
+
afterPrFeedbackTrackingSwitch: (() => Promise<void>) | undefined;
|
|
380
|
+
beforePrFeedbackTrackingPersist: (() => Promise<void>) | undefined;
|
|
371
381
|
beforeBoundedSwarmFileOpen: (() => Promise<void>) | undefined;
|
|
372
382
|
beforeSessionStateLockWrite: (() => Promise<void>) | undefined;
|
|
383
|
+
beforeCheckoutLockWrite: (() => Promise<void>) | undefined;
|
|
373
384
|
beforeSafeDirectoryCreate: ((parentPath: string, nextPath: string) => Promise<void>) | undefined;
|
|
374
385
|
beforeAtomicTempWrite: (() => Promise<void>) | undefined;
|
|
375
386
|
beforeAtomicRename: (() => Promise<void>) | undefined;
|
|
387
|
+
openCheckoutLock: typeof openCheckoutLockFile;
|
|
388
|
+
removeCheckoutLock: typeof removeCheckoutLockFile;
|
|
389
|
+
checkoutMutationActionTimeoutMs: number;
|
|
376
390
|
resolveCurrentGitHead: typeof resolveCurrentGitHead;
|
|
377
391
|
resolveCurrentGitHeadAsync: typeof resolveCurrentGitHeadAsync;
|
|
378
392
|
resolveCurrentUpstreamPushTarget: typeof resolveCurrentUpstreamPushTarget;
|
|
@@ -407,12 +421,24 @@ export declare function normalizePrWorkflowShellCommand(command: string): {
|
|
|
407
421
|
strippedCdPrefix: boolean;
|
|
408
422
|
};
|
|
409
423
|
declare function isSafeStandaloneGitCommit(command: string): boolean;
|
|
410
|
-
/** Require at least one
|
|
411
|
-
export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string): boolean;
|
|
424
|
+
/** Require at least one semantically valid discovery row or CLEAN attestation. */
|
|
425
|
+
export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string, ownedWorkflowLanes?: readonly string[]): boolean;
|
|
412
426
|
declare function parseCriticVerdict(text: string, itemId: string, reviewerSeverity?: string): {
|
|
413
427
|
status: string;
|
|
414
428
|
severity: string;
|
|
415
429
|
} | null;
|
|
430
|
+
declare function workflowCheckoutMutationLockRelativePath(): string;
|
|
431
|
+
declare function openCheckoutLockFile(lockPath: string): Promise<fsp.FileHandle>;
|
|
432
|
+
declare function removeCheckoutLockFile(lockPath: string): Promise<void>;
|
|
433
|
+
/** A bounded checkout-mutation refusal that never permits unsafe late overlap. */
|
|
434
|
+
export declare class PrWorkflowCheckoutMutationTimeoutError extends Error {
|
|
435
|
+
readonly phase: 'queue' | 'action';
|
|
436
|
+
readonly code: "PR_WORKFLOW_CHECKOUT_MUTATION_TIMEOUT";
|
|
437
|
+
readonly retryable: false;
|
|
438
|
+
constructor(phase: 'queue' | 'action');
|
|
439
|
+
}
|
|
440
|
+
/** Serialize project-wide checkout mutations before any session state lock. */
|
|
441
|
+
export declare function withPrWorkflowCheckoutMutationLock<T>(directory: string, action: () => Promise<T>): Promise<T>;
|
|
416
442
|
declare function isProcessAlive(pid: number): boolean;
|
|
417
443
|
declare function workflowGateStateLockRelativePath(sessionID: string): string;
|
|
418
444
|
declare function workflowGateStateRelativePath(sessionID: string): string;
|
|
@@ -44,6 +44,24 @@ export interface RepoGraphDeps {
|
|
|
44
44
|
}) => Promise<RepoGraph>;
|
|
45
45
|
safeRealpathSync?: typeof safeRealpathSync;
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Rebase a realpath'd file onto the lexical workspace root so the incremental
|
|
49
|
+
* update keys the same node the walk produced (issue #1985, defect A5). Exported
|
|
50
|
+
* for direct unit testing of the symlink-root rebase logic.
|
|
51
|
+
*
|
|
52
|
+
* The walk keys nodes lexically relative to `workspaceRoot` (realpath is used
|
|
53
|
+
* only as a cycle-break key). When the workspace root itself is a symlink
|
|
54
|
+
* (`workspaceRoot` → `realWorkspace`), a realpath'd file (`realFilePath`) lives
|
|
55
|
+
* under `realWorkspace` and would key a DIFFERENT node than the lexical path the
|
|
56
|
+
* walker would have produced — causing a duplicate node.
|
|
57
|
+
*
|
|
58
|
+
* If `realFilePath` is under `realWorkspace`, rebase its workspace-relative tail
|
|
59
|
+
* onto the lexical `workspaceRoot` (reconstructing the lexical absolute path the
|
|
60
|
+
* walker used). Otherwise (case-insensitive aliasing without a symlinked root,
|
|
61
|
+
* or an unexpected layout) return `realFilePath` so the case-folding benefit of
|
|
62
|
+
* the realpath is preserved.
|
|
63
|
+
*/
|
|
64
|
+
export declare function rebaseOntoWorkspace(realFilePath: string, realWorkspace: string, workspaceRoot: string): string;
|
|
47
65
|
export declare function createRepoGraphBuilderHook(workspaceRoot: string, deps?: Partial<RepoGraphDeps>, options?: {
|
|
48
66
|
excludeDirs?: readonly string[];
|
|
49
67
|
}): RepoGraphBuilderHook;
|