opencode-swarm 7.126.2 → 7.126.4
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/engineering-conventions/SKILL.md +1 -1
- package/.opencode/skills/issue-tracer/scripts/trace-init.sh +20 -0
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +14 -3
- package/.opencode/skills/swarm-pr-review/SKILL.md +28 -7
- package/dist/background/pr-event-delivery.d.ts +1 -1
- package/dist/cli/{config-doctor-mfx27331.js → config-doctor-2admdwc2.js} +2 -2
- package/dist/cli/{curation-policy-n944aq62.js → curation-policy-s2wydhda.js} +2 -2
- package/dist/cli/{curator-qfh9xty4.js → curator-4tp297kp.js} +12 -12
- package/dist/cli/{curator-llm-factory-0rf29gfq.js → curator-llm-factory-caf8jqyb.js} +12 -12
- package/dist/cli/{guardrail-explain-jsrjqps1.js → guardrail-explain-yjzbs0fq.js} +13 -13
- package/dist/cli/{guardrail-log-61gya05m.js → guardrail-log-7cychbgs.js} +3 -3
- package/dist/cli/{hive-promoter-ktt17fyf.js → hive-promoter-er83aqka.js} +12 -12
- package/dist/cli/{index-nqp13m5a.js → index-360anpk0.js} +1 -1
- package/dist/cli/{index-5nq8dp63.js → index-46xgqgd5.js} +14 -14
- package/dist/cli/{index-gwss5btk.js → index-4scxzpbz.js} +1 -1
- package/dist/cli/{index-c48dvb6j.js → index-6mfcg9ws.js} +2 -2
- package/dist/cli/{index-vcqwhe9d.js → index-7ttstfv6.js} +25 -3
- package/dist/cli/{index-bf76q8q7.js → index-8etcyr9r.js} +1 -1
- package/dist/cli/{index-3xd9a2g7.js → index-cpssctv1.js} +1 -1
- package/dist/cli/{index-z8ftpav0.js → index-cxtnbjwn.js} +2 -2
- package/dist/cli/{index-pb8ag9vg.js → index-mgdcrhkg.js} +4 -4
- package/dist/cli/{index-pf3xae4s.js → index-r3f1z043.js} +1 -1
- package/dist/cli/{index-88dt7c9z.js → index-swgsq1ds.js} +2 -2
- package/dist/cli/{index-gf9cxvp0.js → index-v3gw3sc5.js} +1 -1
- package/dist/cli/{index-gxw20m1d.js → index-v4n224r1.js} +1 -1
- package/dist/cli/{index-f97dm6tz.js → index-vbk29hmf.js} +5 -5
- package/dist/cli/{index-7bxw3v5w.js → index-ypy3dhbg.js} +3 -3
- package/dist/cli/{index-d88y17ht.js → index-yvgmsepb.js} +155 -130
- package/dist/cli/index.js +12 -12
- package/dist/cli/{knowledge-escalator-nna0zec3.js → knowledge-escalator-9sd533p6.js} +3 -3
- package/dist/cli/{knowledge-events-7k82xk36.js → knowledge-events-v0cp1a8d.js} +1 -1
- package/dist/cli/{knowledge-store-efvtng9t.js → knowledge-store-mv7qjf4s.js} +1 -1
- package/dist/cli/{knowledge-validator-jh93eagj.js → knowledge-validator-g05g6qrt.js} +4 -4
- package/dist/cli/{scan-cursor-cydz8d9q.js → scan-cursor-jp2zz6y1.js} +2 -2
- package/dist/cli/{schema-fa033pqw.js → schema-2x7wsb0n.js} +1 -1
- package/dist/cli/{skill-generator-8v463kj7.js → skill-generator-497vvped.js} +5 -5
- package/dist/config/bundled-skills.d.ts +3 -2
- package/dist/config/schema.d.ts +4 -4
- package/dist/hooks/init-orphan-recovery.d.ts +1 -1
- package/dist/hooks/pr-workflow-auto-wake.d.ts +31 -0
- package/dist/hooks/pr-workflow-gate.d.ts +1 -1
- package/dist/hooks/pr-workflow-response-gate.d.ts +4 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +289 -289
- package/dist/tools/repo-graph/builder.d.ts +5 -4
- package/dist/tools/test-runner.d.ts +12 -2
- package/dist/utils/path-security.d.ts +2 -0
- package/dist/utils/timeout.d.ts +8 -4
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -7,34 +7,34 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-yvgmsepb.js";
|
|
11
|
+
import"./index-v4n224r1.js";
|
|
12
|
+
import"./index-cpssctv1.js";
|
|
13
13
|
import"./index-kk1scggc.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-6n2jpz7x.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-ypy3dhbg.js";
|
|
18
|
+
import"./index-vbk29hmf.js";
|
|
19
|
+
import"./index-r3f1z043.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-swgsq1ds.js";
|
|
25
|
+
import"./index-4scxzpbz.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-mgdcrhkg.js";
|
|
28
|
+
import"./index-360anpk0.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-v3gw3sc5.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_AGENT_CONFIGS,
|
|
36
36
|
init_constants
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-7ttstfv6.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-vbk29hmf.js";
|
|
12
|
+
import"./index-mgdcrhkg.js";
|
|
13
|
+
import"./index-360anpk0.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-360anpk0.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-swgsq1ds.js";
|
|
27
|
+
import"./index-4scxzpbz.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-mgdcrhkg.js";
|
|
30
|
+
import"./index-360anpk0.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-r3f1z043.js";
|
|
8
|
+
import"./index-mgdcrhkg.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-ypy3dhbg.js";
|
|
37
|
+
import"./index-swgsq1ds.js";
|
|
38
|
+
import"./index-4scxzpbz.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-mgdcrhkg.js";
|
|
41
|
+
import"./index-360anpk0.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
|
@@ -21,8 +21,9 @@ declare function copyBundledDirectoryBoundedAsync(sourceDir: string, destDir: st
|
|
|
21
21
|
* tree so architect MODE dispatch never collides with repository-owned skills
|
|
22
22
|
* that happen to use the same slug.
|
|
23
23
|
*
|
|
24
|
-
* Async, bounded, and fail-open:
|
|
25
|
-
*
|
|
24
|
+
* Async, bounded, and fail-open: register `withTimeout(...)` in the
|
|
25
|
+
* wrapper-owned post-resolution task queue on the plugin-init path
|
|
26
|
+
* (AGENTS.md Invariant 1). Runs at plugin init so the
|
|
26
27
|
* architect's very first auto-entered mode (e.g. SPECIFY on a fresh project) can
|
|
27
28
|
* load its SKILL.md without a manual `/swarm` command or session restart; the
|
|
28
29
|
* command path calls it again as a backstop for pre-existing projects.
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -550,11 +550,11 @@ export declare const RepoGraphConfigSchema: z.ZodObject<{
|
|
|
550
550
|
exclude_dirs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
551
551
|
}, z.core.$strip>;
|
|
552
552
|
export type RepoGraphConfig = z.infer<typeof RepoGraphConfigSchema>;
|
|
553
|
-
export declare const CheckpointConfigSchema: z.ZodObject<{
|
|
553
|
+
export declare const CheckpointConfigSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
554
554
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
555
555
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
556
556
|
allow_empty_commits: z.ZodDefault<z.ZodBoolean>;
|
|
557
|
-
}, z.core.$strict
|
|
557
|
+
}, z.core.$strict>>;
|
|
558
558
|
export type CheckpointConfig = z.infer<typeof CheckpointConfigSchema>;
|
|
559
559
|
export declare const ApplyPatchConfigSchema: z.ZodObject<{
|
|
560
560
|
fuzzy_match: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1882,11 +1882,11 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1882
1882
|
exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1883
1883
|
extensions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1884
1884
|
}, z.core.$strip>>;
|
|
1885
|
-
checkpoint: z.ZodOptional<z.ZodObject<{
|
|
1885
|
+
checkpoint: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
|
|
1886
1886
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1887
1887
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
1888
1888
|
allow_empty_commits: z.ZodDefault<z.ZodBoolean>;
|
|
1889
|
-
}, z.core.$strict
|
|
1889
|
+
}, z.core.$strict>>>;
|
|
1890
1890
|
apply_patch: z.ZodOptional<z.ZodObject<{
|
|
1891
1891
|
fuzzy_match: z.ZodDefault<z.ZodBoolean>;
|
|
1892
1892
|
fuzzy_match_context_aware: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Calls cleanupOrphanedBranches(ctx.directory, []) at plugin init (no sessions active → all swarm-lane branches are orphans)
|
|
7
7
|
* - Writes results to `<directory>/.swarm/advisories/init-orphan-recovery.json`
|
|
8
8
|
* - Is wrapped in `withTimeout` so it never blocks plugin init
|
|
9
|
-
* - Runs
|
|
9
|
+
* - Runs from the wrapper-owned post-resolution queue after `server()` can settle (precedent: repoGraphHook.init)
|
|
10
10
|
*
|
|
11
11
|
* This module intentionally lives in `src/hooks/` so that `src/index.ts` can import
|
|
12
12
|
* it without matching the forbidden `worktree/` or `merge-back/` patterns.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { readPrWorkflowGateState } from './pr-workflow-gate.js';
|
|
2
|
+
export declare const _internals: {
|
|
3
|
+
readPrWorkflowGateState: typeof readPrWorkflowGateState;
|
|
4
|
+
};
|
|
5
|
+
/** Bound module state: every entry is keyed by project plus parent session. */
|
|
6
|
+
export declare const MAX_TRACKED_PR_WORKFLOW_WAKE_STATES = 200;
|
|
7
|
+
export declare const PLUGIN_WAKE_MARKER_TTL_MS = 60000;
|
|
8
|
+
type PausePhase = 'awaiting-idle' | 'paused' | 'resuming';
|
|
9
|
+
export interface PrWorkflowAutoWakeDecision {
|
|
10
|
+
sessionID?: string;
|
|
11
|
+
suppressWake: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Mark a plugin-authored prompt until its synthetic user event is observed. */
|
|
14
|
+
export declare function markPrWorkflowPluginWake(directory: string, sessionID: string): string;
|
|
15
|
+
/** Remove a marker only when the host definitively rejected the prompt. */
|
|
16
|
+
export declare function cancelPrWorkflowPluginWake(directory: string, sessionID: string, messageID: string): void;
|
|
17
|
+
export declare function isPrWorkflowAutoWakeSuppressed(directory: string, sessionID: string): boolean;
|
|
18
|
+
export declare function clearPrWorkflowAutoWakeState(directory: string, sessionID: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Observe host events that distinguish a user interruption from an ordinary
|
|
21
|
+
* idle boundary. The durable workflow gate remains intact; only automatic
|
|
22
|
+
* prompts pause. A later real user turn re-enables wakes after that turn's
|
|
23
|
+
* idle boundary.
|
|
24
|
+
*/
|
|
25
|
+
export declare function observePrWorkflowAutoWakeEvent(directory: string, rawEvent: unknown): Promise<PrWorkflowAutoWakeDecision>;
|
|
26
|
+
export declare const _test_exports: {
|
|
27
|
+
reset(): void;
|
|
28
|
+
getPausePhase(directory: string, sessionID: string): PausePhase | undefined;
|
|
29
|
+
getPluginWakeMarkerCount(directory: string, sessionID: string, now?: number): number;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -191,7 +191,7 @@ export declare function bindPrReviewBase(directory: string, sessionID: string, o
|
|
|
191
191
|
/** Prove that caller-provided PR identity equals the actual checked-out commit. */
|
|
192
192
|
export declare function assertCurrentCheckoutHead(directory: string, expectedHead: string): string;
|
|
193
193
|
/** Prove that every PR-review lane reads the immutable checked-out PR tree. */
|
|
194
|
-
export declare function assertPrReviewCleanCheckout(directory: string): void;
|
|
194
|
+
export declare function assertPrReviewCleanCheckout(directory: string, mode?: PrWorkflowMode): void;
|
|
195
195
|
export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
|
|
196
196
|
export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: {
|
|
197
197
|
batchId: string;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { readPrWorkflowGateState } from './pr-workflow-gate.js';
|
|
2
|
+
export declare const _internals: {
|
|
3
|
+
readPrWorkflowGateState: typeof readPrWorkflowGateState;
|
|
4
|
+
};
|
|
1
5
|
/**
|
|
2
6
|
* Maximum number of consecutive unproductive auto-resumes per gated session
|
|
3
7
|
* before the response gate suspends further wakes. "Unproductive" means the
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Plugin } from '@opencode-ai/plugin';
|
|
2
|
+
import { createRepoGraphBuilderHook } from './hooks';
|
|
2
3
|
/**
|
|
3
4
|
* FIFO-cap a session-keyed Map to at most `max` entries, evicting oldest first.
|
|
4
5
|
* Values tracked by these maps are plain data (timestamps/usage snapshots), never
|
|
@@ -6,6 +7,19 @@ import type { Plugin } from '@opencode-ai/plugin';
|
|
|
6
7
|
* unit testing of the cap invariant; used by the heartbeat throttle path below.
|
|
7
8
|
*/
|
|
8
9
|
export declare function capSessionMap<K, V>(map: Map<K, V>, max: number): void;
|
|
10
|
+
type PostResolutionTask = () => void | Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Start detached initialization work only after the plugin manifest promise can
|
|
13
|
+
* settle. A microtask queued from inside `initializeOpenCodeSwarm` is not truly
|
|
14
|
+
* deferred when that function still has later awaits: the microtask can start
|
|
15
|
+
* expensive filesystem work while `server()` remains unresolved (issue #704).
|
|
16
|
+
*/
|
|
17
|
+
declare function schedulePostResolutionTasks(tasks: readonly PostResolutionTask[]): void;
|
|
18
|
+
export declare function overrideIndexInternalsForTest(overrides: {
|
|
19
|
+
createRepoGraphBuilderHook?: typeof createRepoGraphBuilderHook;
|
|
20
|
+
schedulePostResolutionTasks?: typeof schedulePostResolutionTasks;
|
|
21
|
+
}): () => void;
|
|
22
|
+
export declare function schedulePostResolutionTasksForTest(tasks: readonly PostResolutionTask[]): void;
|
|
9
23
|
declare const _default: {
|
|
10
24
|
id: "opencode-swarm";
|
|
11
25
|
server: Plugin;
|