opencode-swarm 7.144.1 → 7.144.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/dist/agents/architect.d.ts +1 -0
- package/dist/agents/coder.d.ts +1 -0
- package/dist/agents/critic.d.ts +1 -0
- package/dist/agents/explorer.d.ts +1 -0
- package/dist/agents/reviewer.d.ts +1 -0
- package/dist/cli/{ast-diff-ypptrcan.js → ast-diff-wbjcazfx.js} +5 -3
- package/dist/cli/{config-doctor-5hj26phk.js → config-doctor-7dfvxwjb.js} +3 -3
- package/dist/cli/{core-aqtegsag.js → core-dwmwdc4y.js} +2 -2
- package/dist/cli/{curator-llm-factory-1rg62kzr.js → curator-llm-factory-rrs1q4hg.js} +20 -20
- package/dist/cli/{curator-vcrcht4h.js → curator-w213v33y.js} +20 -20
- package/dist/cli/{evidence-summary-service-fsh6jfhm.js → evidence-summary-service-t7n2h1he.js} +7 -7
- package/dist/cli/{explorer-18353rhn.js → explorer-zvk5kbcb.js} +3 -1
- package/dist/cli/{gate-evidence-9w2eehnj.js → gate-evidence-xvxn603y.js} +3 -3
- package/dist/cli/{guardrail-explain-6mxn4bj8.js → guardrail-explain-v1mwsnkq.js} +21 -21
- package/dist/cli/{guardrail-log-81c5b018.js → guardrail-log-dn03dpz2.js} +4 -4
- package/dist/cli/{hive-promoter-rxkykddk.js → hive-promoter-asjtj7ga.js} +20 -20
- package/dist/cli/{index-8gs34d2q.js → index-333kvewd.js} +4 -4
- package/dist/cli/{index-xmzmeknp.js → index-70ha9e09.js} +2 -1
- package/dist/cli/{index-dq26vbfp.js → index-7ca3a6gj.js} +3 -3
- package/dist/cli/{index-5n69863d.js → index-7ryh498h.js} +1 -173
- package/dist/cli/{index-g0vr2a4m.js → index-av0f6mm0.js} +5 -5
- package/dist/cli/{index-c3zag2cw.js → index-ckrasab9.js} +4 -4
- package/dist/cli/{index-sqp6349j.js → index-d55crzd4.js} +1 -1
- package/dist/cli/index-ddpkwdcb.js +176 -0
- package/dist/cli/{index-8jrn4rwp.js → index-dg2w0wr4.js} +3 -3
- package/dist/cli/{index-2ht8c7ew.js → index-dhh2j2nd.js} +2 -7
- package/dist/cli/{index-bgdr1ww3.js → index-g1c5fgaw.js} +1 -1
- package/dist/cli/{index-j2eb0x44.js → index-g2ajae1z.js} +2 -2
- package/dist/cli/{index-j3byg0a9.js → index-h3z64mhz.js} +6 -2
- package/dist/cli/{index-4s5htbgq.js → index-hqvt3mhk.js} +1 -1
- package/dist/cli/{index-mz1zwz96.js → index-jb4tchvy.js} +2 -2
- package/dist/cli/{index-n11zkp9g.js → index-jsfghpy2.js} +2 -2
- package/dist/cli/{index-2pmaxbvj.js → index-m6wv2qdr.js} +1 -1
- package/dist/cli/{index-315tnsve.js → index-ne8cfgw5.js} +1 -1
- package/dist/cli/{index-e9w1tfmm.js → index-nretd4qn.js} +6659 -1725
- package/dist/cli/{index-rr2fjfsd.js → index-p3tnmkvc.js} +3 -3
- package/dist/cli/{index-1faydhv8.js → index-qpt8ahph.js} +196 -93
- package/dist/cli/{index-hc25qawy.js → index-tg9fn2dy.js} +22 -22
- package/dist/cli/{index-jqsfsqbx.js → index-whezv7vc.js} +4 -0
- package/dist/cli/{index-4905hd2m.js → index-wx8zdh4a.js} +6 -1
- package/dist/cli/{index-rdb3nr6d.js → index-y95nwsge.js} +1 -1
- package/dist/cli/{index-f79hf8dr.js → index-zr370283.js} +3 -3
- package/dist/cli/index.js +22 -36
- package/dist/cli/{knowledge-escalator-hg4jzbrx.js → knowledge-escalator-cg19dhe5.js} +7 -7
- package/dist/cli/{knowledge-events-wgy7gbct.js → knowledge-events-yzvysaqd.js} +5 -5
- package/dist/cli/{knowledge-store-nd0f0e86.js → knowledge-store-6f77xpmm.js} +1 -1
- package/dist/cli/{knowledge-validator-0ar015bf.js → knowledge-validator-4b28zdxa.js} +2 -2
- package/dist/cli/{runtime-te94z1zb.js → runtime-x10qb3z1.js} +3 -2
- package/dist/cli/{scan-cursor-pqp3bsqv.js → scan-cursor-nqbb1xt6.js} +2 -2
- package/dist/cli/{schema-4ew49zrv.js → schema-jj2pb6zp.js} +2 -2
- package/dist/cli/{scope-persistence-geth2hb1.js → scope-persistence-63nasq0z.js} +5 -5
- package/dist/cli/{skill-generator-8azm6p2y.js → skill-generator-nsymtdqm.js} +8 -8
- package/dist/cli/tree-sitter-431q1bka.js +26 -0
- package/dist/cli/{worktree-isolation-cqxgdk2p.js → worktree-isolation-g54kxw6x.js} +20 -20
- package/dist/config/constants.d.ts +1 -1
- package/dist/config/schema.d.ts +8 -0
- package/dist/hooks/review-receipt-scope.d.ts +42 -15
- package/dist/hooks/reviewer-scope-file-fingerprint.d.ts +58 -6
- package/dist/hooks/reviewer-scope-lifecycle.d.ts +9 -1
- package/dist/hooks/reviewer-scope-mergeback.d.ts +23 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +564 -522
- package/dist/memory/config.d.ts +6 -0
- package/dist/memory/consolidation.d.ts +2 -0
- package/dist/memory/gateway.d.ts +12 -1
- package/dist/memory/index.d.ts +6 -4
- package/dist/memory/jsonl-migration.d.ts +28 -3
- package/dist/memory/local-jsonl-provider.d.ts +16 -1
- package/dist/memory/maintenance.d.ts +5 -0
- package/dist/memory/memory-family-migration.d.ts +12 -0
- package/dist/memory/outcome-events.d.ts +24 -0
- package/dist/memory/provider.d.ts +7 -1
- package/dist/memory/reflection-injection.d.ts +1 -0
- package/dist/memory/reflection-service.d.ts +68 -0
- package/dist/memory/reflection.d.ts +41 -0
- package/dist/memory/schema.d.ts +13 -1
- package/dist/memory/sqlite-provider.d.ts +18 -1
- package/dist/memory/types.d.ts +19 -1
- package/dist/state.d.ts +107 -2
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/swarm-memory-outcome.d.ts +11 -0
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
import * as fs from 'node:fs';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Exact reviewer-scope capture (v2, issue #2100).
|
|
4
|
+
*
|
|
5
|
+
* Every regular file is fingerprinted over its COMPLETE bytes with one fixed
|
|
6
|
+
* chunk buffer — there is no per-file or aggregate byte cap. File identity is
|
|
7
|
+
* never denied by size: resource pressure surfaces as the typed retryable
|
|
8
|
+
* `capture_deadline` (or a per-file race code), and only a successful capture
|
|
9
|
+
* can ever produce a digest. A partial, sampled, or capped digest cannot be
|
|
10
|
+
* represented by this module by construction.
|
|
11
|
+
*/
|
|
12
|
+
export type ReviewerScopeCaptureFailureCode = 'invalid_request' | 'outside_workspace' | 'symlink_or_reparse' | 'non_regular' | 'unreadable' | 'workspace_mismatch' | 'file_changed_during_capture' | 'capture_deadline';
|
|
13
|
+
/** `binding_mismatch` and invalid generation identity are lifecycle-level typed errors (reviewer-scope-lifecycle), not per-file capture codes. */
|
|
14
|
+
export declare const RETRYABLE_CAPTURE_FAILURE_CODES: ReadonlySet<ReviewerScopeCaptureFailureCode>;
|
|
15
|
+
export type ReviewerScopeCaptureResult = {
|
|
16
|
+
kind: 'captured_file';
|
|
17
|
+
file: string;
|
|
18
|
+
size: number;
|
|
19
|
+
hash: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'captured_deleted';
|
|
22
|
+
file: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'capture_failed';
|
|
25
|
+
file: string;
|
|
26
|
+
code: ReviewerScopeCaptureFailureCode;
|
|
27
|
+
retryable: boolean;
|
|
28
|
+
detail?: string;
|
|
29
|
+
};
|
|
30
|
+
/** Stored success record persisted on generations and ownership tombstones. */
|
|
4
31
|
export type ReviewerScopeFileFingerprint = {
|
|
5
32
|
file: string;
|
|
6
33
|
kind: 'file';
|
|
@@ -10,12 +37,37 @@ export type ReviewerScopeFileFingerprint = {
|
|
|
10
37
|
file: string;
|
|
11
38
|
kind: 'deleted';
|
|
12
39
|
};
|
|
40
|
+
/** Fixed streaming chunk — the only buffer a capture ever allocates. */
|
|
41
|
+
export declare const REVIEWER_SCOPE_CAPTURE_CHUNK_BYTES = 262144;
|
|
42
|
+
/** Bounded attempts for typed retryable capture failures at every call site. */
|
|
43
|
+
export declare const REVIEWER_SCOPE_CAPTURE_ATTEMPTS = 3;
|
|
44
|
+
/** Total deadline (ms) for one capture batch (guardrails batch, freshness check, manifest build). */
|
|
45
|
+
export declare const REVIEWER_SCOPE_CAPTURE_BATCH_DEADLINE_MS = 10000;
|
|
13
46
|
export declare const _internals: {
|
|
14
|
-
|
|
47
|
+
open: typeof fs.openSync;
|
|
48
|
+
fstat: (fd: number, options: {
|
|
49
|
+
bigint: true;
|
|
50
|
+
}) => fs.BigIntStats;
|
|
51
|
+
read: typeof fs.readSync;
|
|
52
|
+
close: typeof fs.closeSync;
|
|
53
|
+
lstat: typeof fs.lstatSync;
|
|
54
|
+
stat: (path: fs.PathLike, options: {
|
|
55
|
+
bigint: true;
|
|
56
|
+
}) => fs.BigIntStats;
|
|
57
|
+
realpathSync: typeof fs.realpathSync;
|
|
58
|
+
now: () => number;
|
|
15
59
|
};
|
|
16
60
|
/**
|
|
17
|
-
* Capture the exact
|
|
18
|
-
*
|
|
61
|
+
* Capture the exact current file state with a complete, bounded-memory SHA-256.
|
|
62
|
+
*
|
|
63
|
+
* Failure surfaces are typed: traversal/root escape, symlinks/reparse points,
|
|
64
|
+
* non-regular files, and unreadable targets fail closed as non-retryable codes;
|
|
65
|
+
* open/stat races and capture deadlines are retryable. Deletions under a
|
|
66
|
+
* contained (possibly removed) directory are `captured_deleted`.
|
|
19
67
|
*/
|
|
20
|
-
export declare function captureReviewerScopeFileFingerprint(directory: string, file: string,
|
|
68
|
+
export declare function captureReviewerScopeFileFingerprint(directory: string, file: string, options?: {
|
|
69
|
+
deadlineAt?: number;
|
|
70
|
+
}): ReviewerScopeCaptureResult;
|
|
71
|
+
/** Convert a successful capture into the stored fingerprint record shape. */
|
|
72
|
+
export declare function reviewerScopeCaptureToFingerprint(result: ReviewerScopeCaptureResult): ReviewerScopeFileFingerprint | null;
|
|
21
73
|
export declare function reviewerScopeFileFingerprintsEqual(left: ReviewerScopeFileFingerprint, right: ReviewerScopeFileFingerprint): boolean;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import * as child_process from 'node:child_process';
|
|
2
|
+
export type ReviewerScopeLifecycleTransition = 'coder_started' | 'coder_ready' | 'coder_no_change' | 'reviewer_claimed';
|
|
3
|
+
/** Test-only dependency-injection seam for the no-change status probe. */
|
|
4
|
+
export declare const _internals: {
|
|
5
|
+
spawn: typeof child_process.spawn;
|
|
6
|
+
backoffMs?: number;
|
|
7
|
+
/** Test-only deadline override for the bounded retry loop (ms). */
|
|
8
|
+
retryDeadlineMs?: number;
|
|
9
|
+
};
|
|
2
10
|
/** Run only after the complete blocking before-chain approved this Task call. */
|
|
3
11
|
export declare function beginApprovedReviewerScopeLifecycle(input: {
|
|
4
12
|
directory: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merge-back verification for lane-captured reviewer generations (issue #2100
|
|
3
|
+
* contract D).
|
|
4
|
+
*
|
|
5
|
+
* A lane generation is only reviewable from the primary checkout after every
|
|
6
|
+
* manifest file (including deletions) matches the lane manifest in the primary
|
|
7
|
+
* root. Verification re-captures each file from the PRIMARY directory with the
|
|
8
|
+
* shared exact-byte capture and compares against the generation's stored
|
|
9
|
+
* fingerprints. A conflict, deferred merge, or changed byte produces a typed
|
|
10
|
+
* retained state (`mergeback_mismatch`) — never a generic reviewer-stale
|
|
11
|
+
* relabel and never a discard.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Best-effort synchronous verification. Never throws: an unexpected error is
|
|
15
|
+
* recorded as a typed mismatch so the generation stays actionable.
|
|
16
|
+
*/
|
|
17
|
+
export declare function verifyReviewerScopeGenerationMergeBack(input: {
|
|
18
|
+
parentSessionID: string;
|
|
19
|
+
taskId: string;
|
|
20
|
+
coderCallID: string;
|
|
21
|
+
primaryDirectory: string;
|
|
22
|
+
now?: number;
|
|
23
|
+
}): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Plugin } from '@opencode-ai/plugin';
|
|
|
2
2
|
import { loadPluginConfigWithMetaAsync } from './config';
|
|
3
3
|
import { resolveAutoReviewConfig } from './config/schema';
|
|
4
4
|
import { createRepoGraphBuilderHook } from './hooks';
|
|
5
|
+
import type { MemoryConfig as RuntimeMemoryConfig } from './memory/config.js';
|
|
5
6
|
import { loadSnapshot } from './session/snapshot-reader.js';
|
|
6
7
|
import { ensureSwarmGitExcluded } from './utils/gitignore-warning';
|
|
7
8
|
/**
|
|
@@ -24,6 +25,7 @@ type PostResolutionTask = () => void | Promise<void>;
|
|
|
24
25
|
* expensive filesystem work while `server()` remains unresolved (issue #704).
|
|
25
26
|
*/
|
|
26
27
|
declare function schedulePostResolutionTasks(tasks: readonly PostResolutionTask[]): void;
|
|
28
|
+
type RegenerateMemoryReflectionForInit = (directory: string, config: Partial<RuntimeMemoryConfig>) => Promise<unknown>;
|
|
27
29
|
export declare function overrideIndexInternalsForTest(overrides: {
|
|
28
30
|
createRepoGraphBuilderHook?: typeof createRepoGraphBuilderHook;
|
|
29
31
|
schedulePostResolutionTasks?: typeof schedulePostResolutionTasks;
|
|
@@ -31,6 +33,7 @@ export declare function overrideIndexInternalsForTest(overrides: {
|
|
|
31
33
|
loadSnapshot?: typeof loadSnapshot;
|
|
32
34
|
ensureSwarmGitExcluded?: typeof ensureSwarmGitExcluded;
|
|
33
35
|
resolveAutoReviewConfig?: typeof resolveAutoReviewConfig;
|
|
36
|
+
regenerateMemoryReflection?: RegenerateMemoryReflectionForInit;
|
|
34
37
|
}): () => void;
|
|
35
38
|
export declare function schedulePostResolutionTasksForTest(tasks: readonly PostResolutionTask[]): void;
|
|
36
39
|
/**
|