opencode-swarm 7.127.1 → 7.129.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 (32) hide show
  1. package/dist/cli/{curation-policy-82czah39.js → curation-policy-qwj9yxvp.js} +2 -2
  2. package/dist/cli/{curator-llm-factory-4t2h2p60.js → curator-llm-factory-j35jd864.js} +9 -9
  3. package/dist/cli/{curator-qqd1fvvg.js → curator-wywrxn1j.js} +9 -9
  4. package/dist/cli/{guardrail-explain-4yg67c3t.js → guardrail-explain-850vrn06.js} +10 -10
  5. package/dist/cli/{hive-promoter-14jh86kj.js → hive-promoter-w2hf8w69.js} +9 -9
  6. package/dist/cli/{index-pbw1ncre.js → index-3a0dthh5.js} +10 -10
  7. package/dist/cli/{index-edv27z4p.js → index-4gsqjp9p.js} +1 -1
  8. package/dist/cli/{index-c4mcheyz.js → index-9s0ztmmz.js} +3 -3
  9. package/dist/cli/{index-ns62nv6t.js → index-b2m6mtde.js} +2 -2
  10. package/dist/cli/{index-1mwdhq2p.js → index-d4zjjtqs.js} +1 -1
  11. package/dist/cli/{index-hv2p03f3.js → index-dbn9d4kj.js} +237 -4
  12. package/dist/cli/{index-bn3w6ym4.js → index-e3xtpsmf.js} +26 -26
  13. package/dist/cli/{index-72envp1b.js → index-gy9h08cg.js} +3 -3
  14. package/dist/cli/{index-ff3j65em.js → index-her5rv14.js} +4 -4
  15. package/dist/cli/{index-3ntrn97w.js → index-jmsnbct2.js} +1 -1
  16. package/dist/cli/{index-8cnpsbk5.js → index-rmyxgxpj.js} +1 -1
  17. package/dist/cli/{index-gn62e04k.js → index-zty6p8ps.js} +1 -1
  18. package/dist/cli/index.js +9 -9
  19. package/dist/cli/{knowledge-escalator-b3k4b8pk.js → knowledge-escalator-h6jhw20r.js} +3 -3
  20. package/dist/cli/{knowledge-events-4z5rkefv.js → knowledge-events-wtyjkcg0.js} +1 -1
  21. package/dist/cli/{knowledge-store-c0t16yr4.js → knowledge-store-a1xr70yg.js} +1 -1
  22. package/dist/cli/{knowledge-validator-cs33ws57.js → knowledge-validator-afpv79e3.js} +4 -4
  23. package/dist/cli/{scan-cursor-rgnarf67.js → scan-cursor-hh6gdzrg.js} +2 -2
  24. package/dist/cli/{skill-generator-e8c2r816.js → skill-generator-dmshq3p6.js} +5 -5
  25. package/dist/config/loader-recovery.d.ts +95 -0
  26. package/dist/config/loader.d.ts +5 -1
  27. package/dist/config/sanitize-malformed-values.d.ts +53 -0
  28. package/dist/hooks/auto-review.d.ts +9 -1
  29. package/dist/index.js +19 -19
  30. package/dist/turbo/lean/integration.d.ts +2 -1
  31. package/dist/utils/inline-fallback-advancer.d.ts +75 -0
  32. 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.127.1",
3
+ "version": "7.129.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",