opencode-swarm 7.127.0 → 7.128.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.
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +2 -2
- package/.opencode/skills/swarm-pr-review/SKILL.md +3 -2
- package/dist/cli/{curator-llm-factory-xmwgrfr0.js → curator-llm-factory-rz4cbq28.js} +1 -1
- package/dist/cli/{curator-x0sqv6ye.js → curator-x5dzf1p7.js} +1 -1
- package/dist/cli/{guardrail-explain-g3tgjv9a.js → guardrail-explain-fwvxteqe.js} +2 -2
- package/dist/cli/{hive-promoter-d11sk30x.js → hive-promoter-z8gc80zq.js} +1 -1
- package/dist/cli/{index-hjkczwqm.js → index-nmedh7bw.js} +2 -2
- package/dist/cli/{index-fcsnw12w.js → index-npycj2tr.js} +9 -9
- package/dist/cli/{index-xq0etzbh.js → index-rczj39pc.js} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/hooks/auto-review.d.ts +9 -1
- package/dist/hooks/pr-workflow-response-gate.d.ts +7 -5
- package/dist/index.js +18 -16
- package/dist/turbo/lean/integration.d.ts +2 -1
- package/dist/utils/inline-fallback-advancer.d.ts +75 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ModelOverride } from '../../utils/model-dispatch-fallback';
|
|
1
2
|
import { type LaneEvidence, listLaneEvidence, readPhaseEvidence, type ValidationArtifact } from './evidence';
|
|
2
3
|
/**
|
|
3
4
|
* Configuration options for phase critic dispatch.
|
|
@@ -113,7 +114,7 @@ export declare const _internals: {
|
|
|
113
114
|
compileCriticPackage: typeof compileCriticPackage;
|
|
114
115
|
parseCriticVerdict: typeof parseCriticVerdict;
|
|
115
116
|
writeCriticEvidence: typeof writeCriticEvidence;
|
|
116
|
-
dispatchCriticAgent: (directory: string, pkg: CriticPackage, agentName: string, timeoutMs: number, parentSessionId?: string) => Promise<string>;
|
|
117
|
+
dispatchCriticAgent: (directory: string, pkg: CriticPackage, agentName: string, timeoutMs: number, parentSessionId?: string, model?: ModelOverride) => Promise<string>;
|
|
117
118
|
resolveDefaultCriticAgent: typeof resolveDefaultCriticAgent;
|
|
118
119
|
readReviewerEvidence: typeof readReviewerEvidence;
|
|
119
120
|
listLaneEvidence: typeof listLaneEvidence;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issue #1905: shared "inline fallback advancer" for bespoke dispatch loops that
|
|
3
|
+
* cannot use {@link dispatchWithModelFallback} because their retry semantics
|
|
4
|
+
* differ (e.g. retry-on-permanent, per-attempt session lifecycle, consecutive-
|
|
5
|
+
* failure counters).
|
|
6
|
+
*
|
|
7
|
+
* Before this helper, the advance block (resolve next → advance index → parse
|
|
8
|
+
* → skip-on-malformed → tag quota/transient reason → notify) was inlined in
|
|
9
|
+
* `src/full-auto/oversight.ts:543–579`. Issue #1905 adds a second copy at
|
|
10
|
+
* `src/hooks/full-auto-intercept.ts` (`dispatchCriticAndWriteEvent`). Extracting
|
|
11
|
+
* the block prevents the two copies from drifting — a future fix to the
|
|
12
|
+
* increment-before-parse ordering or the malformed-skip semantics applies to both.
|
|
13
|
+
*
|
|
14
|
+
* The helper is PURE: it resolves, parses, and classifies, then returns the
|
|
15
|
+
* result + invokes an `onAdopt` side-effect callback. It does NOT touch caller
|
|
16
|
+
* state (the loop's `modelOverride` / `modelUsedLabel` / `modelFallbackIndex`
|
|
17
|
+
* stay in the caller).
|
|
18
|
+
*/
|
|
19
|
+
import { type ModelOverride } from './model-dispatch-fallback';
|
|
20
|
+
export interface AdvanceInlineFallbackOptions {
|
|
21
|
+
/**
|
|
22
|
+
* Resolve the 1-based fallback model as a `provider/model` string, or null
|
|
23
|
+
* when the fallback chain is exhausted. Typically wraps
|
|
24
|
+
* `resolveFallbackModel(baseRole, index, getSwarmAgents(swarmId))`.
|
|
25
|
+
*/
|
|
26
|
+
resolveFallback: (fallbackIndex: number) => string | null;
|
|
27
|
+
/** Current fallback index (0 = primary / registered model). */
|
|
28
|
+
index: number;
|
|
29
|
+
/** The error from the just-failed attempt — used to tag the reason. */
|
|
30
|
+
lastError: unknown;
|
|
31
|
+
/**
|
|
32
|
+
* Notified when a fallback model is cleanly adopted (for advisory logging
|
|
33
|
+
* and telemetry). NOT called when the chain is exhausted or the entry is
|
|
34
|
+
* malformed. The adopted override is returned in the result's `adopted`
|
|
35
|
+
* field — callers read it there, not from this callback, so the info
|
|
36
|
+
* payload intentionally omits the parsed `ModelOverride` (it would be
|
|
37
|
+
* redundant with `result.adopted.override`).
|
|
38
|
+
*/
|
|
39
|
+
onAdopt: (info: {
|
|
40
|
+
toModel: string;
|
|
41
|
+
fallbackIndex: number;
|
|
42
|
+
reason: 'quota' | 'transient_model_error';
|
|
43
|
+
}) => void;
|
|
44
|
+
}
|
|
45
|
+
export interface AdvanceInlineFallbackResult {
|
|
46
|
+
/** The new fallback index (always >= the input `index`). */
|
|
47
|
+
nextIndex: number;
|
|
48
|
+
/**
|
|
49
|
+
* The adopted fallback's raw string + parsed override, or `null` when no
|
|
50
|
+
* new model was adopted (chain exhausted OR malformed entry skipped).
|
|
51
|
+
*
|
|
52
|
+
* When `null`, the caller must NOT change its current `modelOverride` — the
|
|
53
|
+
* next retry continues on the same model. The index may still have advanced
|
|
54
|
+
* (malformed-entry skip case) so the entry is not re-resolved.
|
|
55
|
+
*/
|
|
56
|
+
adopted: {
|
|
57
|
+
modelString: string;
|
|
58
|
+
override: ModelOverride;
|
|
59
|
+
} | null;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Advance the inline fallback chain by one step. Encapsulates the
|
|
63
|
+
* increment-before-parse + malformed-skip + reason-tagging logic shared by
|
|
64
|
+
* the bespoke dispatch loops in `oversight.ts` and `full-auto-intercept.ts`.
|
|
65
|
+
*
|
|
66
|
+
* Behavior:
|
|
67
|
+
* - Chain exhausted (`resolveFallback(index + 1)` returns null):
|
|
68
|
+
* `{ nextIndex: index, adopted: null }` — keep retrying the current model.
|
|
69
|
+
* - Malformed entry (`parseModelString` throws or returns undefined):
|
|
70
|
+
* `{ nextIndex: index + 1, adopted: null }` — index advances (so the entry
|
|
71
|
+
* is not re-resolved next retry) but the override is NOT changed.
|
|
72
|
+
* - Clean entry: `{ nextIndex: index + 1, adopted: { modelString, override } }`
|
|
73
|
+
* — `onAdopt` is called with the quota/transient reason for side effects.
|
|
74
|
+
*/
|
|
75
|
+
export declare function advanceInlineFallback(opts: AdvanceInlineFallbackOptions): AdvanceInlineFallbackResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.128.0",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|