opencode-swarm 7.123.0 → 7.125.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.
Files changed (111) hide show
  1. package/.opencode/skills/critic-gate/SKILL.md +8 -0
  2. package/.opencode/skills/swarm/SKILL.md +12 -8
  3. package/.opencode/skills/swarm-pr-feedback/SKILL.md +252 -62
  4. package/.opencode/skills/swarm-pr-review/SKILL.md +242 -76
  5. package/README.md +6 -1
  6. package/dist/background/lane-output-store.d.ts +10 -0
  7. package/dist/background/pending-delegations.d.ts +3 -0
  8. package/dist/background/workspace-snapshot.d.ts +59 -0
  9. package/dist/cli/{config-doctor-3ksh1534.js → config-doctor-be9sxqx8.js} +6 -6
  10. package/dist/cli/{core-cwgb7ev8.js → core-d38hc85b.js} +4 -4
  11. package/dist/cli/{curation-policy-4j4qce5a.js → curation-policy-52kt6d7t.js} +2 -2
  12. package/dist/cli/{curator-drift-6b2fjsgr.js → curator-drift-h9a2sjvf.js} +7 -7
  13. package/dist/cli/{curator-tkyn9bzz.js → curator-hbst8nbc.js} +32 -30
  14. package/dist/cli/curator-llm-factory-frde1955.js +54 -0
  15. package/dist/cli/{dispatch-07jgc3hn.js → dispatch-f4hj1cj7.js} +3 -3
  16. package/dist/cli/{evidence-summary-service-96ndczbk.js → evidence-summary-service-9hq7n9k9.js} +12 -12
  17. package/dist/cli/{gate-evidence-xqks3kk2.js → gate-evidence-cy2te3x8.js} +2 -2
  18. package/dist/cli/guardrail-explain-112kqmbc.js +55 -0
  19. package/dist/cli/guardrail-log-c8zcab91.js +16 -0
  20. package/dist/cli/hive-promoter-448xs2tp.js +69 -0
  21. package/dist/cli/{index-hns7xjm7.js → index-09vd53pz.js} +4 -2
  22. package/dist/cli/{pending-delegations-68cbaqv2.js → index-0cz1ws47.js} +9 -21
  23. package/dist/cli/{index-det5jwfk.js → index-0y6tmm9v.js} +5 -1
  24. package/dist/cli/index-134d35c1.js +116 -0
  25. package/dist/cli/{index-m1abzg93.js → index-1kz6da87.js} +4 -2
  26. package/dist/cli/{index-22e127jw.js → index-23zsx7dm.js} +5 -3
  27. package/dist/cli/{index-kzj3fp7c.js → index-2445sx3d.js} +1 -1
  28. package/dist/cli/{index-ctpgsj84.js → index-2tn5h2zp.js} +1 -1
  29. package/dist/cli/{index-6xnxz6z0.js → index-3x761jqv.js} +4 -2
  30. package/dist/cli/{index-7cspygmb.js → index-4rzzzjtg.js} +11 -8
  31. package/dist/cli/{index-cqsak7bf.js → index-67hqr2zv.js} +1 -1
  32. package/dist/cli/{index-nprawcc0.js → index-6n2jpz7x.js} +1 -1
  33. package/dist/cli/{index-19zn67q6.js → index-6vfvc36k.js} +5 -1
  34. package/dist/cli/{index-6sgqnvpw.js → index-7j3sm7h8.js} +2 -2
  35. package/dist/cli/{index-2j25br0p.js → index-958hf0yr.js} +9 -9
  36. package/dist/cli/{index-j9kxwshw.js → index-99ed0h32.js} +8 -6
  37. package/dist/cli/{index-7g91saha.js → index-9hbwa5x1.js} +40 -32
  38. package/dist/cli/{index-jyrhy4ww.js → index-amspa811.js} +3179 -1557
  39. package/dist/cli/index-bk5tah7q.js +19 -0
  40. package/dist/cli/{index-293f68mj.js → index-bpmtbmy9.js} +4680 -4342
  41. package/dist/cli/{index-m0bmh3w0.js → index-dx2c2wjt.js} +2 -2
  42. package/dist/cli/{index-ye3fndsw.js → index-gacm5s2n.js} +9 -5
  43. package/dist/cli/{index-d6h5hq91.js → index-gnvg72y1.js} +2 -2
  44. package/dist/cli/{index-17eybc3z.js → index-jh6s75f6.js} +1 -1
  45. package/dist/cli/{index-vcgfqd8f.js → index-k5jrywpr.js} +4 -2
  46. package/dist/cli/{index-3rr0ese8.js → index-kt0awv1n.js} +41 -9
  47. package/dist/cli/index-mg54y5gc.js +564 -0
  48. package/dist/cli/{index-dywekeen.js → index-n6chz2g8.js} +1 -1
  49. package/dist/cli/{index-gnp9x6se.js → index-n832052r.js} +4 -2
  50. package/dist/cli/{index-816rkp4y.js → index-s9mj4rb9.js} +5 -3
  51. package/dist/cli/{index-gw3m5fw0.js → index-v2rdhwx8.js} +5 -3
  52. package/dist/cli/{index-q00e4s1s.js → index-vtwqjr4z.js} +11 -7
  53. package/dist/cli/index-xattnmyb.js +2502 -0
  54. package/dist/cli/{index-n2712byd.js → index-yt1v62pv.js} +8 -5
  55. package/dist/cli/{index-5e4e2hvv.js → index-z6xqpmqg.js} +4 -0
  56. package/dist/cli/{index-p0arc26j.js → index-zjygnfay.js} +7 -2
  57. package/dist/cli/index.js +35 -31
  58. package/dist/cli/{knowledge-escalator-dyxsm78k.js → knowledge-escalator-htafbhxg.js} +4 -4
  59. package/dist/cli/{knowledge-events-36q6nvae.js → knowledge-events-havw8c4t.js} +1 -1
  60. package/dist/cli/{knowledge-store-e07b4s54.js → knowledge-store-hqngpt2v.js} +2 -2
  61. package/dist/cli/{knowledge-validator-sfyf7wn2.js → knowledge-validator-g7mpnazh.js} +5 -5
  62. package/dist/cli/pending-delegations-7j8xqg5f.js +34 -0
  63. package/dist/cli/{pr-subscriptions-x653151h.js → pr-subscriptions-bxpqde8w.js} +5 -5
  64. package/dist/cli/{scan-cursor-hm0aqqae.js → scan-cursor-sx7cvh8v.js} +3 -3
  65. package/dist/cli/{schema-13bnng2n.js → schema-2418eqy3.js} +7 -4
  66. package/dist/cli/{scope-persistence-d9erwnvb.js → scope-persistence-habn4q8a.js} +4 -4
  67. package/dist/cli/{skill-generator-63r20a9k.js → skill-generator-zggy797r.js} +7 -7
  68. package/dist/cli/sqlite-loader-r1kgt2pq.js +12 -0
  69. package/dist/cli/workspace-snapshot-c9pxxt9a.js +48 -0
  70. package/dist/commands/memory-link.d.ts +28 -0
  71. package/dist/commands/registry.d.ts +26 -1
  72. package/dist/config/schema.d.ts +6 -0
  73. package/dist/hooks/pr-workflow-gate.d.ts +211 -0
  74. package/dist/hooks/pr-workflow-response-gate.d.ts +23 -0
  75. package/dist/hooks/pr-workflow-session-resolver.d.ts +14 -0
  76. package/dist/index.js +496 -451
  77. package/dist/knowledge/family-migration-shared.d.ts +24 -0
  78. package/dist/knowledge/family-migration.d.ts +5 -0
  79. package/dist/memory/config.d.ts +11 -0
  80. package/dist/memory/consolidation-log.d.ts +8 -2
  81. package/dist/memory/finalize-reward-sweep.d.ts +2 -1
  82. package/dist/memory/gateway.d.ts +13 -0
  83. package/dist/memory/index.d.ts +4 -2
  84. package/dist/memory/local-jsonl-provider.d.ts +25 -1
  85. package/dist/memory/memory-family-manifest.d.ts +52 -0
  86. package/dist/memory/memory-family-migration.d.ts +94 -0
  87. package/dist/memory/memory-link.d.ts +103 -0
  88. package/dist/memory/provider-pool.d.ts +35 -0
  89. package/dist/memory/redaction.d.ts +31 -0
  90. package/dist/memory/schema.d.ts +21 -0
  91. package/dist/memory/sqlite-provider.d.ts +58 -1
  92. package/dist/memory/storage-root.d.ts +93 -0
  93. package/dist/memory/types.d.ts +20 -1
  94. package/dist/services/knowledge-diagnostics.d.ts +25 -0
  95. package/dist/services/status-service.d.ts +16 -0
  96. package/dist/tools/complete-pr-workflow.d.ts +5 -0
  97. package/dist/tools/dispatch-lanes.d.ts +44 -0
  98. package/dist/tools/index.d.ts +2 -0
  99. package/dist/tools/manifest.d.ts +2 -0
  100. package/dist/tools/run-pr-feedback-stage-a.d.ts +69 -0
  101. package/dist/tools/tool-metadata.d.ts +8 -0
  102. package/dist/tools/write-pr-review-trigger-eval.d.ts +56 -46
  103. package/package.json +1 -1
  104. package/dist/cli/curator-llm-factory-mfvd4sqx.js +0 -52
  105. package/dist/cli/guardrail-explain-4vytbchb.js +0 -53
  106. package/dist/cli/guardrail-log-z291m4gw.js +0 -16
  107. package/dist/cli/hive-promoter-y5wsztkc.js +0 -67
  108. package/dist/cli/index-4rhcth7a.js +0 -14
  109. package/dist/cli/index-dqh3zhhc.js +0 -133
  110. package/dist/cli/index-wr8qgpz5.js +0 -2463
  111. package/dist/cli/workspace-snapshot-eyf6gd0d.js +0 -22
@@ -0,0 +1,211 @@
1
+ import { resolveCommitCountSince, resolveCurrentGitHead, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveIsExactSingleChildCommit, resolveIsWorkingTreeClean, resolvePrWorkflowRevisionDigest, resolveRemoteRefsContainingHead } from '../background/workspace-snapshot.js';
2
+ export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
3
+ export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: readonly ["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"];
4
+ export type PrReviewBaseDimensionId = (typeof PR_REVIEW_BASE_DIMENSION_IDS)[number];
5
+ export type PrWorkflowMode = 'PR_REVIEW' | 'PR_FEEDBACK';
6
+ export interface PrWorkflowLaneSpec {
7
+ laneId?: string;
8
+ workflowLane?: string;
9
+ reviewItemIds?: string[];
10
+ }
11
+ export interface PrFeedbackLaneOwnership {
12
+ laneId: string;
13
+ ownedItemIds: string[];
14
+ }
15
+ interface PrReviewBaseDispatchRecord {
16
+ batchId: string;
17
+ lanes: Array<{
18
+ laneId: string;
19
+ workflowLane: PrReviewBaseDimensionId;
20
+ }>;
21
+ validatedAt: string;
22
+ }
23
+ interface PrFeedbackVerificationRecord {
24
+ batchId: string;
25
+ ownership: PrFeedbackLaneOwnership[];
26
+ validatedAt: string;
27
+ }
28
+ export type PrFeedbackGatePhase = 'stage-b-reviewer' | 'stage-b-test' | 'closeout-reviewer' | 'closeout-critic';
29
+ export type PrFeedbackStageACategory = 'build' | 'typecheck' | 'lint' | 'diff-check' | 'reproduction';
30
+ export interface PrFeedbackStageACheckReceipt {
31
+ category: PrFeedbackStageACategory;
32
+ workingDirectory?: string;
33
+ obligationId?: string;
34
+ validatorContract?: {
35
+ path: string;
36
+ id: string;
37
+ };
38
+ command: string[];
39
+ targets?: string[];
40
+ feedbackTargets?: Array<{
41
+ feedbackItemId: string;
42
+ target: string;
43
+ expectedBehavior: string;
44
+ }>;
45
+ durationMs: number;
46
+ }
47
+ interface PrFeedbackStageARecord {
48
+ revisionDigest: string;
49
+ checks: PrFeedbackStageACheckReceipt[];
50
+ feedbackItemIds?: string[];
51
+ applicableCategories?: Array<'build' | 'typecheck' | 'lint'>;
52
+ applicableObligations?: Array<{
53
+ id: string;
54
+ category: 'build' | 'typecheck' | 'lint';
55
+ workingDirectory: string;
56
+ source: string;
57
+ validatorContract?: {
58
+ path: string;
59
+ id: string;
60
+ };
61
+ }>;
62
+ validatedAt: string;
63
+ }
64
+ interface PrFeedbackGateBatchRecord {
65
+ batchId: string;
66
+ phase: PrFeedbackGatePhase;
67
+ laneId: string;
68
+ itemIds: string[];
69
+ revisionDigest: string;
70
+ validatedAt: string;
71
+ }
72
+ interface PrFeedbackReadyToPublishRecord {
73
+ revisionDigest: string;
74
+ localHead: string;
75
+ remoteName: string;
76
+ remoteBranchRef: string;
77
+ remoteRef: string;
78
+ validatedAt: string;
79
+ }
80
+ export type PrWorkflowCompletionStatus = 'completed' | 'ready-to-publish';
81
+ export type PrReviewValidationPhase = 'council' | 'reviewer' | 'critic';
82
+ interface PrReviewValidationBatchRecord {
83
+ batchId: string;
84
+ phase: PrReviewValidationPhase;
85
+ lanes: Array<{
86
+ laneId: string;
87
+ workflowLane: string;
88
+ reviewItemIds?: string[];
89
+ }>;
90
+ validatedAt: string;
91
+ }
92
+ export interface PrWorkflowGateState {
93
+ schemaVersion: 1;
94
+ /** Monotonic durable revision used to reject stale same-session transitions. */
95
+ revision: number;
96
+ sessionID: string;
97
+ mode: PrWorkflowMode;
98
+ activatedAt: string;
99
+ updatedAt: string;
100
+ prHeadSha?: string;
101
+ prReviewBaseRef?: string;
102
+ prReviewBaseSha?: string;
103
+ prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
104
+ /** @deprecated Compatibility projection of the most recent base dispatch. */
105
+ prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
106
+ prReviewTriggerEvalPath?: string;
107
+ prReviewValidationBatches?: PrReviewValidationBatchRecord[];
108
+ prFeedbackInventory?: string[];
109
+ prFeedbackVerifications?: PrFeedbackVerificationRecord[];
110
+ /** @deprecated Compatibility projection of the most recent verification dispatch. */
111
+ prFeedbackVerification?: PrFeedbackVerificationRecord;
112
+ prFeedbackStageA?: PrFeedbackStageARecord;
113
+ prFeedbackGateBatches?: PrFeedbackGateBatchRecord[];
114
+ prFeedbackReadyToPublish?: PrFeedbackReadyToPublishRecord;
115
+ }
116
+ export declare function activatePrWorkflow(directory: string, sessionID: string, mode: PrWorkflowMode, options?: {
117
+ prHeadSha?: string;
118
+ }): Promise<PrWorkflowGateState>;
119
+ export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
120
+ export declare function clearPrWorkflowGateState(directory: string, sessionID: string, expectedRevision?: number): Promise<void>;
121
+ /** Bind an active PR workflow to one immutable PR head. */
122
+ export declare function bindPrWorkflowHead(directory: string, sessionID: string, prHeadSha: string): Promise<PrWorkflowGateState>;
123
+ /** Bind an active PR_REVIEW workflow to one immutable merge-base scope. */
124
+ export declare function bindPrReviewBase(directory: string, sessionID: string, options: {
125
+ prHeadSha: string;
126
+ baseRef: string;
127
+ baseSha: string;
128
+ }): Promise<PrWorkflowGateState>;
129
+ /** Prove that caller-provided PR identity equals the actual checked-out commit. */
130
+ export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string): string;
131
+ /** Prove that every PR-review lane reads the immutable checked-out PR tree. */
132
+ export declare function assertPrReviewCleanCheckout(directory: string): void;
133
+ export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
134
+ export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: {
135
+ batchId: string;
136
+ prHeadSha: string;
137
+ }): Promise<PrWorkflowGateState>;
138
+ /** Validate durable exact-six PR review evidence across all base and retry batches. */
139
+ export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
140
+ /** Persist a council/reviewer/critic validation batch before launch. */
141
+ export declare function recordPrReviewValidationBatch(directory: string, sessionID: string, phase: PrReviewValidationPhase, lanes: readonly PrWorkflowLaneSpec[], options: {
142
+ batchId: string;
143
+ prHeadSha: string;
144
+ }): Promise<PrWorkflowGateState>;
145
+ /** Validate that every declared council/reviewer/critic obligation has a successful retry. */
146
+ export declare function assertPrReviewValidationSettled(directory: string, sessionID: string, phase?: PrReviewValidationPhase): Promise<PrWorkflowGateState>;
147
+ export declare function declarePrFeedbackInventory(directory: string, sessionID: string, inventoryIds: readonly string[], options: {
148
+ prHeadSha: string;
149
+ }): Promise<PrWorkflowGateState>;
150
+ export declare function enforcePrFeedbackVerificationOwnership(directory: string, sessionID: string, ownership: readonly PrFeedbackLaneOwnership[], options: {
151
+ batchId: string;
152
+ prHeadSha: string;
153
+ }): Promise<PrWorkflowGateState>;
154
+ /** Validate cumulative exact inventory ownership and settled verification artifacts. */
155
+ export declare function assertPrFeedbackVerificationSettled(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
156
+ /** Persist an actually executed Stage A receipt and invalidate later approvals. */
157
+ export declare function recordPrFeedbackStageA(directory: string, sessionID: string, revisionDigest: string, checks: readonly PrFeedbackStageACheckReceipt[], options?: {
158
+ applicableCategories?: ReadonlyArray<'build' | 'typecheck' | 'lint'>;
159
+ applicableObligations?: ReadonlyArray<{
160
+ id: string;
161
+ category: 'build' | 'typecheck' | 'lint';
162
+ workingDirectory: string;
163
+ source: string;
164
+ validatorContract?: {
165
+ path: string;
166
+ id: string;
167
+ };
168
+ }>;
169
+ }): Promise<PrWorkflowGateState>;
170
+ /** Record one ordered, single-lane feedback validation phase before launch. */
171
+ export declare function recordPrFeedbackGateBatch(directory: string, sessionID: string, phase: PrFeedbackGatePhase, lane: PrFeedbackLaneOwnership, options: {
172
+ batchId: string;
173
+ prHeadSha: string;
174
+ revisionDigest: string;
175
+ }): Promise<PrWorkflowGateState>;
176
+ /** Require the latest receipt for a feedback gate phase to be positive and fresh. */
177
+ export declare function assertPrFeedbackGatePhaseSettled(directory: string, sessionID: string, phase: PrFeedbackGatePhase): Promise<PrWorkflowGateState>;
178
+ /** Require every ordered feedback gate on one unchanged revision. */
179
+ export declare function assertPrFeedbackReadyToPublish(directory: string, sessionID: string): Promise<PrWorkflowGateState>;
180
+ export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, artifactPath: string): Promise<PrWorkflowGateState>;
181
+ export declare function enforcePrWorkflowToolBefore(directory: string, sessionID: string, toolName: string, args: Record<string, unknown> | undefined, generatedAgentNames?: readonly string[]): Promise<void>;
182
+ /** Validate the terminal PR workflow contract before removing its durable gate. */
183
+ export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
184
+ export declare const _test_exports: {
185
+ workflowGateStateRelativePath: typeof workflowGateStateRelativePath;
186
+ workflowGateStateLockRelativePath: typeof workflowGateStateLockRelativePath;
187
+ resetTrackedStateCache: () => void;
188
+ beforeTerminalClear: (() => Promise<void>) | undefined;
189
+ resolveCurrentGitHead: typeof resolveCurrentGitHead;
190
+ resolveCurrentUpstreamPushTarget: typeof resolveCurrentUpstreamPushTarget;
191
+ resolveCurrentUpstreamRemoteRef: typeof resolveCurrentUpstreamRemoteRef;
192
+ resolveExactRemoteBranchHead: typeof resolveExactRemoteBranchHead;
193
+ resolveCommitCountSince: typeof resolveCommitCountSince;
194
+ resolveIsWorkingTreeClean: typeof resolveIsWorkingTreeClean;
195
+ resolveIsExactSingleChildCommit: typeof resolveIsExactSingleChildCommit;
196
+ resolvePrWorkflowRevisionDigest: typeof resolvePrWorkflowRevisionDigest;
197
+ resolveRemoteRefsContainingHead: typeof resolveRemoteRefsContainingHead;
198
+ parseCriticVerdict: typeof parseCriticVerdict;
199
+ isProcessAlive: typeof isProcessAlive;
200
+ nowMs: () => number;
201
+ };
202
+ /** Require at least one real discovery row or a lane-bound CLEAN attestation. */
203
+ export declare function prReviewDiscoveryArtifactCoversLane(text: string, expectedWorkflowLane: string): boolean;
204
+ declare function parseCriticVerdict(text: string, itemId: string, reviewerSeverity?: string): {
205
+ status: string;
206
+ severity: string;
207
+ } | null;
208
+ declare function isProcessAlive(pid: number): boolean;
209
+ declare function workflowGateStateLockRelativePath(sessionID: string): string;
210
+ declare function workflowGateStateRelativePath(sessionID: string): string;
211
+ export {};
@@ -0,0 +1,23 @@
1
+ interface PrWorkflowResponseGateClient {
2
+ session?: unknown;
3
+ }
4
+ /**
5
+ * Prevent an architect from bypassing PR obligations by simply emitting text.
6
+ * The text-complete hook replaces every architect-session text part while the
7
+ * durable gate exists; session.idle then mechanically resumes that session.
8
+ */
9
+ export declare function createPrWorkflowResponseGate(options: {
10
+ directory: string;
11
+ client?: PrWorkflowResponseGateClient;
12
+ wakeTimeoutMs?: number;
13
+ }): {
14
+ event: (input: {
15
+ event: unknown;
16
+ }) => Promise<void>;
17
+ textComplete: (input: {
18
+ sessionID?: string;
19
+ }, output: {
20
+ text: string;
21
+ }) => Promise<void>;
22
+ };
23
+ export {};
@@ -0,0 +1,14 @@
1
+ interface ResolverClient {
2
+ session?: unknown;
3
+ }
4
+ /** Resolve a child tool call back to the nearest ancestor owning a durable PR gate. */
5
+ export declare function createPrWorkflowSessionResolver(options: {
6
+ directory: string;
7
+ client?: ResolverClient;
8
+ }): {
9
+ observeEvent: (input: {
10
+ event: unknown;
11
+ }) => void;
12
+ resolve: (sessionID: string) => Promise<string>;
13
+ };
14
+ export {};