opencode-swarm 7.148.5 → 7.149.1
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/background/candidate-contract.d.ts +1 -1
- package/dist/background/pending-delegations.d.ts +6 -0
- package/dist/background/pr-review-contract.d.ts +20 -0
- package/dist/cli/{config-doctor-6z7x0jnz.js → config-doctor-d3nsq1nz.js} +3 -3
- package/dist/cli/{core-0ph6pb2y.js → core-y9d858n6.js} +3 -3
- package/dist/cli/{curation-policy-fbvctttr.js → curation-policy-nck9g765.js} +6 -6
- package/dist/cli/{curator-pffqw3br.js → curator-f5m0hh2p.js} +32 -31
- package/dist/cli/{curator-llm-factory-mbsn281q.js → curator-llm-factory-mzh9ns5s.js} +32 -31
- package/dist/cli/{evidence-summary-service-9ajw5tpc.js → evidence-summary-service-601x7ne7.js} +15 -14
- package/dist/cli/{gate-evidence-wc8wzwaw.js → gate-evidence-kjs9vsx9.js} +9 -9
- package/dist/cli/{guardrail-explain-a8706sq1.js → guardrail-explain-j291sss5.js} +33 -32
- package/dist/cli/{guardrail-log-wx43bj32.js → guardrail-log-1jykfrqc.js} +6 -4
- package/dist/cli/{guardrail-reset-sy0vztrd.js → guardrail-reset-tr07m077.js} +32 -31
- package/dist/cli/{hive-promoter-jvyzykgx.js → hive-promoter-162ws6xp.js} +32 -31
- package/dist/cli/{index-x3d9asnz.js → index-1aztaa2s.js} +3 -3
- package/dist/cli/{index-c6jqkx9d.js → index-38ema5k2.js} +2 -2
- package/dist/cli/{index-nq4tkfpc.js → index-4sdhbxgq.js} +1 -1
- package/dist/cli/{index-vyg5b8ee.js → index-5gntxwxt.js} +5 -5
- package/dist/cli/{index-0yzt06r5.js → index-64d17yd0.js} +2 -2
- package/dist/cli/{index-3aev3a0c.js → index-7m8rk72d.js} +491 -369
- package/dist/cli/{index-vhefvcta.js → index-apwcvfjt.js} +2 -2
- package/dist/cli/{index-arjq717j.js → index-cna8m7my.js} +1 -1
- package/dist/cli/{index-59wqcatm.js → index-cqhf7fkw.js} +1 -1
- package/dist/cli/{index-jzz52as5.js → index-dkrz1vv5.js} +4 -4
- package/dist/cli/{index-kg4knw6r.js → index-dtmgt2xn.js} +11 -10
- package/dist/cli/{index-579qg534.js → index-eaq9b0qm.js} +1 -1
- package/dist/cli/{index-zhn0q7nf.js → index-ekvs3ade.js} +18 -17
- package/dist/cli/index-exn0ztsv.js +881 -0
- package/dist/cli/{index-ag9bv589.js → index-f53yyerg.js} +34 -33
- package/dist/cli/{index-q7ke7kwd.js → index-fc4x86sy.js} +9 -12
- package/dist/cli/{index-zf2vwa7y.js → index-hxbrsb40.js} +2 -2
- package/dist/cli/{index-k1s8gxjh.js → index-jb9tb1sd.js} +1 -1
- package/dist/cli/{index-haf092ak.js → index-jg2gwzvq.js} +11 -11
- package/dist/cli/{index-qwmrt51t.js → index-k2sm9677.js} +1 -1
- package/dist/cli/{index-5r2mcgpa.js → index-kgk65rde.js} +1 -1
- package/dist/cli/{index-vrp2zva8.js → index-m8dn0qnm.js} +1 -1
- package/dist/cli/{index-1w5nnyew.js → index-mdwtj4xm.js} +6 -6
- package/dist/cli/{index-j382eh60.js → index-n99s022c.js} +1 -1
- package/dist/cli/{index-yezd5ks6.js → index-pf22x0dr.js} +3 -1
- package/dist/cli/{index-8djgxw2w.js → index-prxrmc3b.js} +2 -2
- package/dist/cli/{index-kj6m9ry3.js → index-srwp8fs7.js} +4 -4
- package/dist/cli/{index-5zq3892p.js → index-t994f8fp.js} +4 -4
- package/dist/cli/{index-t25evmna.js → index-vy6q9d8j.js} +3 -2
- package/dist/cli/{index-ne45ew6z.js → index-xe83cwvn.js} +10 -10
- package/dist/cli/{index-ghbkknjz.js → index-xggpmtfx.js} +73 -42
- package/dist/cli/{index-qbsc2btq.js → index-yjj3s8af.js} +3 -3
- package/dist/cli/index.js +32 -31
- package/dist/cli/{knowledge-escalator-bvrtfdyb.js → knowledge-escalator-whkxxgxj.js} +14 -14
- package/dist/cli/{knowledge-events-rpvkevbm.js → knowledge-events-rnqzt87h.js} +12 -12
- package/dist/cli/{knowledge-link-spw879rs.js → knowledge-link-mzn8x0qd.js} +5 -5
- package/dist/cli/{knowledge-store-wjy2kshh.js → knowledge-store-7de59rnz.js} +6 -6
- package/dist/cli/{knowledge-validator-cq2cgfcx.js → knowledge-validator-bpk17jf4.js} +8 -8
- package/dist/cli/{pending-delegations-f4wvyzbf.js → pending-delegations-qzy6rnvw.js} +3 -3
- package/dist/cli/{pr-subscriptions-f4xw1rxy.js → pr-subscriptions-q862pvz1.js} +3 -3
- package/dist/cli/{runner-rk26nk58.js → runner-1aygs98c.js} +6 -6
- package/dist/cli/{scan-cursor-7n0zs72g.js → scan-cursor-0p51fh61.js} +7 -7
- package/dist/cli/{schema-e59spg93.js → schema-8g2nxhjf.js} +1 -1
- package/dist/cli/{scope-persistence-d75p900m.js → scope-persistence-hhkr0c46.js} +8 -10
- package/dist/cli/{skill-generator-c65y1h6a.js → skill-generator-pk9gcz7r.js} +16 -16
- package/dist/cli/{telemetry-1pnsftp0.js → telemetry-5deacb7w.js} +1 -1
- package/dist/cli/{workspace-snapshot-nq25j94x.js → workspace-snapshot-8269e1p9.js} +2 -2
- package/dist/cli/{worktree-collision-ownership-wqy7mgb3.js → worktree-collision-ownership-9v8e0dz7.js} +8 -8
- package/dist/cli/{worktree-isolation-ay9d58w4.js → worktree-isolation-1hwwfbdw.js} +32 -31
- package/dist/commands/close.d.ts +1 -0
- package/dist/events/core-events.d.ts +250 -0
- package/dist/failures/invocation-failure.d.ts +7 -0
- package/dist/full-auto/oversight.d.ts +5 -3
- package/dist/hooks/full-auto-delegation.d.ts +24 -0
- package/dist/hooks/full-auto-input-probe.d.ts +11 -0
- package/dist/hooks/pr-workflow-gate.d.ts +37 -6
- package/dist/hooks/steering-consumed.d.ts +12 -4
- package/dist/index.js +598 -613
- package/dist/observability/catalog.d.ts +9 -7
- package/dist/services/session-reflection.d.ts +7 -0
- package/dist/services/spec-drift-recovery.d.ts +9 -2
- package/dist/state.d.ts +10 -0
- package/dist/telemetry.d.ts +24 -1
- package/dist/tools/dispatch-lanes.d.ts +50 -1
- package/dist/tools/write-pr-review-artifact.d.ts +2 -0
- package/package.json +3 -1
- package/dist/cli/{curator-drift-fv4rttf4.js → curator-drift-2h1d2fnq.js} +1 -1
- package/dist/cli/{index-g8wwj0sz.js → index-vnn7qq8c.js} +3 -3
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-Auto v2 subagent outbound and return checks.
|
|
3
|
+
*
|
|
4
|
+
* Composable hook that fires alongside the existing delegation-gate hooks.
|
|
5
|
+
* It does not replace delegation-gate; it adds Full-Auto-specific verification
|
|
6
|
+
* for outbound Task delegations and post-return safety review.
|
|
7
|
+
*
|
|
8
|
+
* Outbound (tool.execute.before, only for Task tool):
|
|
9
|
+
* - Require valid `subagent_type` matching a registered swarm role.
|
|
10
|
+
* - For coder delegation, require declared scope (warning if missing).
|
|
11
|
+
* - Reject delegation that targets a clearly invalid agent or that requests
|
|
12
|
+
* a write to a protected path inside the prompt body.
|
|
13
|
+
* - Out-of-policy outbound delegations escalate to the critic via the
|
|
14
|
+
* permission hook's escalate_critic path; this hook itself records
|
|
15
|
+
* advisories and structured denials for the most clear-cut cases.
|
|
16
|
+
*
|
|
17
|
+
* Return (tool.execute.after, only for Task tool):
|
|
18
|
+
* - Inspect subagent result text for skipped tests, tool timeouts, scope
|
|
19
|
+
* changes, "instructions from external content", missing evidence,
|
|
20
|
+
* and out-of-scope file generation.
|
|
21
|
+
* - On detected return warnings, write a `full_auto_subagent_warning`
|
|
22
|
+
* event and increment a per-session counter so the cadence/escalation
|
|
23
|
+
* layer can react.
|
|
24
|
+
*/
|
|
1
25
|
import type { PluginConfig } from '../config';
|
|
2
26
|
export interface FullAutoDelegationHookOptions {
|
|
3
27
|
config: PluginConfig;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-Auto v2 input-probe hook (tool.execute.after).
|
|
3
|
+
*
|
|
4
|
+
* Inspects tool output for prompt-injection / credential-request /
|
|
5
|
+
* exfiltration / guardrail-disable shapes and stores a warning on the
|
|
6
|
+
* durable Full-Auto run state. The warning is consulted by the permission
|
|
7
|
+
* hook on the next risky action — when both fire, the action escalates to
|
|
8
|
+
* the critic instead of using the deterministic policy.
|
|
9
|
+
*
|
|
10
|
+
* The probe never blocks tool execution by itself.
|
|
11
|
+
*/
|
|
1
12
|
import type { PluginConfig } from '../config';
|
|
2
13
|
export interface FullAutoInputProbeHookOptions {
|
|
3
14
|
config: PluginConfig;
|
|
@@ -2,7 +2,7 @@ import * as fsp from 'node:fs/promises';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type CandidateSeverity, type FindingsSeverity, type RowFormatFamily } from '../background/candidate-contract.js';
|
|
4
4
|
import { type LaneOutputArtifact } from '../background/lane-output-store.js';
|
|
5
|
-
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneRecovery, findByBatchId, sweepStaleDelegations } from '../background/pending-delegations.js';
|
|
5
|
+
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneFailureClass, type BackgroundDelegationWorkflowLaneRecovery, findByBatchId, sweepStaleDelegations } from '../background/pending-delegations.js';
|
|
6
6
|
import { type PrReviewInlineTriggerRow } from '../background/pr-review-trigger-contract.js';
|
|
7
7
|
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';
|
|
8
8
|
import { type PrReviewResilienceConfig } from '../config/schema.js';
|
|
@@ -349,6 +349,8 @@ export interface PrWorkflowGateState {
|
|
|
349
349
|
/** @deprecated Compatibility projection of the most recent base dispatch. */
|
|
350
350
|
prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
|
|
351
351
|
prReviewResilience?: PrReviewResilienceStateRecord;
|
|
352
|
+
/** Dimensions that consumed their one contract-only retry; top-level for rollback readability. */
|
|
353
|
+
prReviewContractRetryDimensions?: PrReviewBaseDimensionId[];
|
|
352
354
|
/** Canonical ordered semantic ledger frozen by the first micro dispatch. */
|
|
353
355
|
prReviewTriggerLedger?: PrReviewInlineTriggerRow[];
|
|
354
356
|
prReviewTriggerEvalPath?: string;
|
|
@@ -393,6 +395,9 @@ export interface PrWorkflowGateState {
|
|
|
393
395
|
prReviewArtifactRunId?: string;
|
|
394
396
|
prReviewFindingsPath?: string;
|
|
395
397
|
prReviewArtifactBoundaries?: PrReviewArtifactBoundary[];
|
|
398
|
+
prReviewPartialBaseCoverage?: PrReviewPartialBaseCoverageRecord;
|
|
399
|
+
prReviewCoverageDisclosurePath?: string;
|
|
400
|
+
prReviewCoverageDisclosureDigest?: string;
|
|
396
401
|
prReviewHandoffPath?: string;
|
|
397
402
|
prReviewHandoffRequired?: boolean;
|
|
398
403
|
checkoutRecovery?: PrWorkflowCheckoutRecoveryRecord;
|
|
@@ -432,6 +437,15 @@ export interface PrWorkflowGateState {
|
|
|
432
437
|
prFeedbackRebindCount?: number;
|
|
433
438
|
prFeedbackScopes?: PrFeedbackScopeDeclarationRecord[];
|
|
434
439
|
}
|
|
440
|
+
export interface PrReviewPartialBaseCoverageRecord {
|
|
441
|
+
runId: string;
|
|
442
|
+
prHeadSha: string;
|
|
443
|
+
revisionDigest: string;
|
|
444
|
+
missingDimension: PrReviewBaseDimensionId;
|
|
445
|
+
failureClass: BackgroundDelegationWorkflowLaneFailureClass;
|
|
446
|
+
terminalEventId: string;
|
|
447
|
+
admittedAt: string;
|
|
448
|
+
}
|
|
435
449
|
/**
|
|
436
450
|
* Bound on the PR_FEEDBACK inventory-amendment audit ledger (issue #2242 R3).
|
|
437
451
|
*
|
|
@@ -536,7 +550,7 @@ declare function probeAlivePrWorkflowLaneSessions(directory: string, records: Ba
|
|
|
536
550
|
alive: Set<string>;
|
|
537
551
|
degradedReason?: PrWorkflowLaneProbeDegradedReason;
|
|
538
552
|
}>;
|
|
539
|
-
/** One still-pending
|
|
553
|
+
/** One still-pending lane's host liveness reading (issue #2280 Part B). */
|
|
540
554
|
export interface PrWorkflowPendingLaneLiveness {
|
|
541
555
|
laneId: string;
|
|
542
556
|
/**
|
|
@@ -568,7 +582,7 @@ export interface PrWorkflowPendingLaneLiveness {
|
|
|
568
582
|
degradedReason?: PrWorkflowLaneProbeDegradedReason | 'advisory-unavailable';
|
|
569
583
|
}
|
|
570
584
|
/**
|
|
571
|
-
* Bounded, fail-open liveness advisory for still-pending
|
|
585
|
+
* Bounded, fail-open liveness advisory for still-pending async lanes
|
|
572
586
|
* (issue #2280 Part B).
|
|
573
587
|
*
|
|
574
588
|
* ALERT-ONLY, by design: this reads host session status and reports it; it
|
|
@@ -770,18 +784,32 @@ export declare class PrReviewResilienceRetryExhaustedError extends Error {
|
|
|
770
784
|
readonly code: "PR_REVIEW_RESILIENCE_RETRY_EXHAUSTED";
|
|
771
785
|
constructor(message: string);
|
|
772
786
|
}
|
|
787
|
+
declare function classifyTerminalFailureSignature(record: BackgroundDelegationRecord): string | null;
|
|
773
788
|
interface EnforcePrReviewBaseDimensionsOptions {
|
|
774
789
|
batchId: string;
|
|
775
790
|
prHeadSha: string;
|
|
776
791
|
revisionDigest?: string;
|
|
792
|
+
prReviewContractRetry?: boolean;
|
|
777
793
|
prReviewWaveStage?: 'canary' | 'fanout';
|
|
778
794
|
prReviewWaveAttempt?: 0 | 1 | 2;
|
|
779
795
|
prReviewResiliencePolicy?: PrReviewResilienceConfig;
|
|
780
796
|
}
|
|
781
797
|
export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: EnforcePrReviewBaseDimensionsOptions): Promise<PrWorkflowGateState>;
|
|
782
|
-
export declare function rollbackPrReviewBaseAdmissionIfUnlaunched(directory: string, sessionID: string, batchId: string): Promise<boolean>;
|
|
798
|
+
export declare function rollbackPrReviewBaseAdmissionIfUnlaunched(directory: string, sessionID: string, batchId: string, contractRetry?: boolean): Promise<boolean>;
|
|
783
799
|
declare function minimumConsolidatedLaneCover(sets: ReadonlyArray<readonly string[]>): number;
|
|
784
|
-
|
|
800
|
+
export declare function admitPrReviewPartialBaseCoverage(directory: string, sessionID: string, runId: string, missingDimension: PrReviewBaseDimensionId): Promise<PrWorkflowGateState>;
|
|
801
|
+
/**
|
|
802
|
+
* Undo a newly admitted partial-base disclosure when the findings checkpoint
|
|
803
|
+
* cannot be completed. The compare-and-clear checks keep a stale writer from
|
|
804
|
+
* deleting a disclosure that another writer has already committed.
|
|
805
|
+
*/
|
|
806
|
+
export declare function rollbackPrReviewPartialBaseCoverageAdmission(directory: string, sessionID: string, options: {
|
|
807
|
+
runId: string;
|
|
808
|
+
boundary: 'post_explorer' | 'post_reviewer' | 'post_critic';
|
|
809
|
+
relativePath: string;
|
|
810
|
+
digest: string;
|
|
811
|
+
}): Promise<boolean>;
|
|
812
|
+
/** Validate durable exact-six or explicitly admitted N-1 PR review evidence. */
|
|
785
813
|
export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string, gateContext?: PrReviewGateContext): Promise<PrWorkflowGateState>;
|
|
786
814
|
/** Persist a council/reviewer/critic validation batch before launch. */
|
|
787
815
|
export declare function recordPrReviewValidationBatch(directory: string, sessionID: string, phase: PrReviewValidationPhase, lanes: readonly PrWorkflowLaneSpec[], options: {
|
|
@@ -835,7 +863,9 @@ export declare function resolvePrReviewWriterRunId(directory: string, sessionID:
|
|
|
835
863
|
export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
|
|
836
864
|
/** Freeze one exact inline trigger ledger across every micro dispatch. */
|
|
837
865
|
export declare function bindPrReviewTriggerLedger(directory: string, sessionID: string, input: unknown): Promise<PrWorkflowGateState>;
|
|
838
|
-
export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[]
|
|
866
|
+
export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[], options?: {
|
|
867
|
+
skipBaseCoverage?: boolean;
|
|
868
|
+
}): Promise<PrWorkflowGateState>;
|
|
839
869
|
/**
|
|
840
870
|
* Artifact records are a projection of lane receipts, never a caller-controlled
|
|
841
871
|
* replacement for them. Keep their workflow status/action aligned with the
|
|
@@ -871,6 +901,7 @@ export declare function enforcePrWorkflowToolBefore(directory: string, sessionID
|
|
|
871
901
|
/** Validate the terminal PR workflow contract before removing its durable gate. */
|
|
872
902
|
export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
|
|
873
903
|
export declare const _test_exports: {
|
|
904
|
+
classifyTerminalFailureSignature: typeof classifyTerminalFailureSignature;
|
|
874
905
|
minimumConsolidatedLaneCover: typeof minimumConsolidatedLaneCover;
|
|
875
906
|
analyzePrReviewBatchRecordIntegrity: typeof analyzePrReviewBatchRecordIntegrity;
|
|
876
907
|
MAX_COVER_UNIVERSE_BITS: number;
|
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
* Steering consumed hook for OpenCode Swarm
|
|
3
3
|
*
|
|
4
4
|
* Provides mechanisms for recording and tracking steering directive consumption.
|
|
5
|
-
* Writes steering-consumed events to
|
|
5
|
+
* Writes steering-consumed events to the core event store for health check
|
|
6
|
+
* verification.
|
|
7
|
+
*
|
|
8
|
+
* ISSUE #2039: the reconciliation read is now the bounded core event window
|
|
9
|
+
* (manifest-stripped, hard read bound) instead of the whole file. Directives
|
|
10
|
+
* issued before the retained window cannot be reconciled by design; the
|
|
11
|
+
* window's coverage is observable via the core event store (diagnose Check E
|
|
12
|
+
* discloses it).
|
|
6
13
|
*/
|
|
7
14
|
/**
|
|
8
|
-
* Event written
|
|
15
|
+
* Event written when a steering directive is consumed
|
|
9
16
|
*/
|
|
10
17
|
export interface SteeringConsumedEvent {
|
|
11
18
|
type: 'steering-consumed';
|
|
@@ -13,7 +20,7 @@ export interface SteeringConsumedEvent {
|
|
|
13
20
|
timestamp: string;
|
|
14
21
|
}
|
|
15
22
|
/**
|
|
16
|
-
* Records a steering-consumed event to the
|
|
23
|
+
* Records a steering-consumed event to the core event store.
|
|
17
24
|
* Synchronous function that appends a single JSON line.
|
|
18
25
|
*
|
|
19
26
|
* @param directory - The project directory containing the .swarm folder
|
|
@@ -22,7 +29,8 @@ export interface SteeringConsumedEvent {
|
|
|
22
29
|
export declare function recordSteeringConsumed(directory: string, directiveId: string): void;
|
|
23
30
|
/**
|
|
24
31
|
* Creates a hook that records steering-consumed events for any unconsumed directives.
|
|
25
|
-
* Reads
|
|
32
|
+
* Reads the bounded core event window to find steering-directive events without
|
|
33
|
+
* matching consumed events (issue #2039).
|
|
26
34
|
*
|
|
27
35
|
* @param directory - The project directory containing the .swarm folder
|
|
28
36
|
* @returns A fire-and-forget hook function
|