opencode-swarm 7.125.1 → 7.125.3

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 (48) hide show
  1. package/dist/cli/{config-doctor-g3m2q646.js → config-doctor-rm1m07gz.js} +2 -2
  2. package/dist/cli/{core-d38hc85b.js → core-v1kp7anb.js} +2 -2
  3. package/dist/cli/{curation-policy-vgbx8530.js → curation-policy-7pgdjt5w.js} +2 -2
  4. package/dist/cli/{curator-xk4g1nx2.js → curator-arwm18td.js} +16 -16
  5. package/dist/cli/{curator-drift-h9a2sjvf.js → curator-drift-24bdacdc.js} +2 -2
  6. package/dist/cli/{curator-llm-factory-7pvqy94w.js → curator-llm-factory-yq5vf298.js} +16 -16
  7. package/dist/cli/{evidence-summary-service-v4h2w487.js → evidence-summary-service-thx1c3me.js} +3 -3
  8. package/dist/cli/{guardrail-explain-wfk16bpr.js → guardrail-explain-mscq3veq.js} +17 -17
  9. package/dist/cli/{guardrail-log-5zz9xx6z.js → guardrail-log-6a2zxvtx.js} +3 -3
  10. package/dist/cli/{hive-promoter-njwc5rt0.js → hive-promoter-q79naynh.js} +16 -16
  11. package/dist/cli/{index-tn3shyqj.js → index-01n43w2p.js} +4 -4
  12. package/dist/cli/{index-8yvqkbw7.js → index-414r47r7.js} +6 -4
  13. package/dist/cli/{index-mwdcvh0e.js → index-45mvd5q7.js} +4 -4
  14. package/dist/cli/index-4rhhvd1a.js +62 -0
  15. package/dist/cli/{index-txragda9.js → index-4ycq2mrp.js} +1 -1
  16. package/dist/cli/{index-cz6fv84h.js → index-7p6jkkat.js} +18 -18
  17. package/dist/cli/{index-kws8zn6y.js → index-8tjbq2ej.js} +1 -1
  18. package/dist/cli/{index-s9mj4rb9.js → index-9ss2m4rs.js} +1 -1
  19. package/dist/cli/{index-3k8pg467.js → index-ambnwnmt.js} +15 -6
  20. package/dist/cli/{index-rpg8qqjs.js → index-emzes7sj.js} +3 -3
  21. package/dist/cli/{index-83rwq7pb.js → index-fm4zfxnr.js} +1 -1
  22. package/dist/cli/{index-v2rdhwx8.js → index-g4ef4v3m.js} +1 -1
  23. package/dist/cli/{index-fs02c7tz.js → index-kk1scggc.js} +1 -1
  24. package/dist/cli/{index-dsf1yv4s.js → index-m5e00g9s.js} +47 -43
  25. package/dist/cli/{index-z4sc6yxc.js → index-pk099nqv.js} +87 -6
  26. package/dist/cli/{index-kvrk3h8p.js → index-rp5msv7n.js} +1 -1
  27. package/dist/cli/{index-ghteqdy1.js → index-sa3dgpmc.js} +2 -2
  28. package/dist/cli/{index-93cq8t5b.js → index-vdfewvn5.js} +5 -5
  29. package/dist/cli/{index-mhhmecsw.js → index-x8entmky.js} +2 -2
  30. package/dist/cli/{index-pbjenws7.js → index-xezv6tdw.js} +1 -1
  31. package/dist/cli/index.js +16 -16
  32. package/dist/cli/{knowledge-escalator-jtyykzqc.js → knowledge-escalator-gr8qd7kz.js} +3 -3
  33. package/dist/cli/{knowledge-events-qhr97sy9.js → knowledge-events-q83g3f8z.js} +1 -1
  34. package/dist/cli/{knowledge-store-332x3pjv.js → knowledge-store-qq3w5yt8.js} +1 -1
  35. package/dist/cli/{knowledge-validator-3t8tgzsz.js → knowledge-validator-7jhq8yam.js} +4 -4
  36. package/dist/cli/{scan-cursor-q21c9k9q.js → scan-cursor-fa5sy36q.js} +2 -2
  37. package/dist/cli/{schema-y2d7j2jk.js → schema-bw68my66.js} +3 -1
  38. package/dist/cli/{skill-generator-3gkxx98d.js → skill-generator-ffc1agyw.js} +6 -6
  39. package/dist/config/loader.d.ts +14 -0
  40. package/dist/config/schema.d.ts +10 -0
  41. package/dist/hooks/knowledge-application-gate.d.ts +8 -2
  42. package/dist/hooks/knowledge-application.d.ts +2 -0
  43. package/dist/index.js +10 -10
  44. package/dist/services/config-doctor.d.ts +14 -2
  45. package/dist/services/warning-buffer.d.ts +24 -5
  46. package/dist/state.d.ts +33 -2
  47. package/package.json +1 -1
  48. package/dist/cli/index-gacm5s2n.js +0 -34
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-mwdcvh0e.js";
9
+ } from "./index-45mvd5q7.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-83rwq7pb.js";
15
+ } from "./index-fm4zfxnr.js";
16
16
  import {
17
17
  init_knowledge_types,
18
18
  isActiveStatus
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
190
190
  alreadyInactive: true
191
191
  };
192
192
  }
193
- const { quarantineEntry } = await import("./knowledge-validator-3t8tgzsz.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-7jhq8yam.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-y2d7j2jk.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-rpg8qqjs.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-bw68my66.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-emzes7sj.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-dsf1yv4s.js";
15
+ } from "./index-m5e00g9s.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-pbjenws7.js";
22
+ } from "./index-xezv6tdw.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -3,7 +3,7 @@ import {
3
3
  init_constants,
4
4
  init_schema,
5
5
  stripKnownSwarmPrefix
6
- } from "./index-8yvqkbw7.js";
6
+ } from "./index-414r47r7.js";
7
7
  import {
8
8
  init_logger,
9
9
  warn
package/dist/cli/index.js CHANGED
@@ -7,42 +7,42 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-dsf1yv4s.js";
11
- import"./index-pbjenws7.js";
12
- import"./index-z4sc6yxc.js";
13
- import"./index-fs02c7tz.js";
10
+ } from "./index-m5e00g9s.js";
11
+ import"./index-xezv6tdw.js";
12
+ import"./index-pk099nqv.js";
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-tn3shyqj.js";
18
- import"./index-93cq8t5b.js";
19
- import"./index-kws8zn6y.js";
17
+ import"./index-01n43w2p.js";
18
+ import"./index-vdfewvn5.js";
19
+ import"./index-8tjbq2ej.js";
20
20
  import"./index-vxv732ex.js";
21
21
  import"./index-c8s9a3zh.js";
22
- import"./index-s9mj4rb9.js";
22
+ import"./index-9ss2m4rs.js";
23
23
  import"./index-23zsx7dm.js";
24
- import"./index-ghteqdy1.js";
25
- import"./index-kvrk3h8p.js";
24
+ import"./index-sa3dgpmc.js";
25
+ import"./index-rp5msv7n.js";
26
26
  import"./index-rtry5xyf.js";
27
- import"./index-mwdcvh0e.js";
28
- import"./index-83rwq7pb.js";
27
+ import"./index-45mvd5q7.js";
28
+ import"./index-fm4zfxnr.js";
29
29
  import"./index-ae75rja9.js";
30
30
  import"./index-q27bajqb.js";
31
- import"./index-3k8pg467.js";
31
+ import"./index-ambnwnmt.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-8yvqkbw7.js";
37
+ } from "./index-414r47r7.js";
38
38
  import"./index-bk5tah7q.js";
39
39
  import"./index-8fwhhayc.js";
40
40
  import"./index-q1exe2b3.js";
41
41
  import"./index-gnvg72y1.js";
42
42
  import"./index-2tn5h2zp.js";
43
43
  import"./index-1kz6da87.js";
44
- import"./index-v2rdhwx8.js";
45
- import"./index-gacm5s2n.js";
44
+ import"./index-g4ef4v3m.js";
45
+ import"./index-4rhhvd1a.js";
46
46
  import"./index-0cz1ws47.js";
47
47
  import"./index-2445sx3d.js";
48
48
  import"./index-z6xqpmqg.js";
@@ -8,9 +8,9 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-93cq8t5b.js";
12
- import"./index-mwdcvh0e.js";
13
- import"./index-83rwq7pb.js";
11
+ } from "./index-vdfewvn5.js";
12
+ import"./index-45mvd5q7.js";
13
+ import"./index-fm4zfxnr.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-83rwq7pb.js";
29
+ } from "./index-fm4zfxnr.js";
30
30
  import"./index-ae75rja9.js";
31
31
  import"./index-q27bajqb.js";
32
32
  import"./index-zgwm4ryv.js";
@@ -40,7 +40,7 @@ import {
40
40
  transactKnowledge,
41
41
  transactKnowledgeWithCas,
42
42
  wordBigrams
43
- } from "./index-mwdcvh0e.js";
43
+ } from "./index-45mvd5q7.js";
44
44
  import {
45
45
  resolveHiveDataDir
46
46
  } from "./index-ae75rja9.js";
@@ -23,11 +23,11 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-ghteqdy1.js";
27
- import"./index-kvrk3h8p.js";
26
+ } from "./index-sa3dgpmc.js";
27
+ import"./index-rp5msv7n.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-mwdcvh0e.js";
30
- import"./index-83rwq7pb.js";
29
+ import"./index-45mvd5q7.js";
30
+ import"./index-fm4zfxnr.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-kws8zn6y.js";
8
- import"./index-mwdcvh0e.js";
7
+ } from "./index-8tjbq2ej.js";
8
+ import"./index-45mvd5q7.js";
9
9
  import"./index-ae75rja9.js";
10
10
  import"./index-q27bajqb.js";
11
11
  import"./index-bk5tah7q.js";
@@ -34,6 +34,7 @@ import {
34
34
  ExternalSkillCandidateSchema,
35
35
  ExternalSkillCandidateSourceTypeSchema,
36
36
  ExternalSkillsConfigSchema,
37
+ FALLBACK_MODELS_MAX,
37
38
  GATE_CONFIG_KNOWN_SECTION_KEYS,
38
39
  GateConfigSchema,
39
40
  GateFeatureSchema,
@@ -88,7 +89,7 @@ import {
88
89
  resolveGeneratedAgentRole,
89
90
  resolveGuardrailsConfig,
90
91
  stripKnownSwarmPrefix
91
- } from "./index-8yvqkbw7.js";
92
+ } from "./index-414r47r7.js";
92
93
  import"./index-bk5tah7q.js";
93
94
  import"./index-zjygnfay.js";
94
95
  import"./index-bpmtbmy9.js";
@@ -149,6 +150,7 @@ export {
149
150
  GateFeatureSchema,
150
151
  GateConfigSchema,
151
152
  GATE_CONFIG_KNOWN_SECTION_KEYS,
153
+ FALLBACK_MODELS_MAX,
152
154
  ExternalSkillsConfigSchema,
153
155
  ExternalSkillCandidateSourceTypeSchema,
154
156
  ExternalSkillCandidateSchema,
@@ -33,16 +33,16 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-tn3shyqj.js";
37
- import"./index-ghteqdy1.js";
38
- import"./index-kvrk3h8p.js";
36
+ } from "./index-01n43w2p.js";
37
+ import"./index-sa3dgpmc.js";
38
+ import"./index-rp5msv7n.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-mwdcvh0e.js";
41
- import"./index-83rwq7pb.js";
40
+ import"./index-45mvd5q7.js";
41
+ import"./index-fm4zfxnr.js";
42
42
  import"./index-ae75rja9.js";
43
43
  import"./index-q27bajqb.js";
44
44
  import"./index-bk5tah7q.js";
45
- import"./index-gacm5s2n.js";
45
+ import"./index-4rhhvd1a.js";
46
46
  import"./index-zgwm4ryv.js";
47
47
  import"./index-7mkpsw6g.js";
48
48
  import"./index-fsrp8wp3.js";
@@ -1,6 +1,20 @@
1
+ import type { z } from 'zod';
1
2
  import { type PluginConfig } from './schema';
2
3
  export declare const MAX_CONFIG_FILE_BYTES = 102400;
3
4
  export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
5
+ /**
6
+ * Flatten a ZodError into a compact, single-line, human-readable summary that
7
+ * names each failing config path and why it failed, e.g.
8
+ * "agents.architect.fallback_models: Too big: expected array to have <=3 items"
9
+ *
10
+ * Surfaced to operators via `advisoryWarn` → `/swarm diagnose` so a config
11
+ * validation failure tells the user exactly what to fix, instead of the bare
12
+ * `"... validation failed:"` line they used to see (issue #1886). Replaces
13
+ * `error.format()` (a nested object that `advisoryWarn` dropped from the
14
+ * operator-visible buffer). It emits issue paths and messages only — never a
15
+ * raw dump of the user's config values.
16
+ */
17
+ export declare function formatZodIssues(error: z.ZodError): string;
4
18
  export declare function loadPluginConfig(directory: string): PluginConfig;
5
19
  /**
6
20
  * Internal variant of loadPluginConfig that also returns loader metadata.
@@ -83,6 +83,12 @@ export declare const AgentThinkingConfigSchema: z.ZodObject<{
83
83
  budget_tokens: z.ZodOptional<z.ZodNumber>;
84
84
  }, z.core.$strip>;
85
85
  export type AgentThinkingConfig = z.infer<typeof AgentThinkingConfigSchema>;
86
+ /**
87
+ * Maximum number of `fallback_models` an agent override may declare. Shared so
88
+ * the config doctor's opt-in trim (src/services/config-doctor.ts) can never
89
+ * drift from the schema constraint enforced here (issue #1886 follow-up).
90
+ */
91
+ export declare const FALLBACK_MODELS_MAX = 3;
86
92
  export declare const AgentOverrideConfigSchema: z.ZodObject<{
87
93
  model: z.ZodOptional<z.ZodString>;
88
94
  variant: z.ZodOptional<z.ZodString>;
@@ -825,6 +831,8 @@ export declare const KnowledgeApplicationConfigSchema: z.ZodObject<{
825
831
  critical_requires_ack: z.ZodDefault<z.ZodBoolean>;
826
832
  require_skill_refs: z.ZodDefault<z.ZodBoolean>;
827
833
  high_risk_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
834
+ max_gate_denials: z.ZodDefault<z.ZodNumber>;
835
+ gate_staleness_ms: z.ZodDefault<z.ZodNumber>;
828
836
  }, z.core.$strip>;
829
837
  export type KnowledgeApplicationConfig = z.infer<typeof KnowledgeApplicationConfigSchema>;
830
838
  export declare const SkillPropagationConfigSchema: z.ZodObject<{
@@ -2130,6 +2138,8 @@ export declare const PluginConfigSchema: z.ZodObject<{
2130
2138
  critical_requires_ack: z.ZodDefault<z.ZodBoolean>;
2131
2139
  require_skill_refs: z.ZodDefault<z.ZodBoolean>;
2132
2140
  high_risk_tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
2141
+ max_gate_denials: z.ZodDefault<z.ZodNumber>;
2142
+ gate_staleness_ms: z.ZodDefault<z.ZodNumber>;
2133
2143
  }, z.core.$strip>>;
2134
2144
  skillPropagation: z.ZodOptional<z.ZodObject<{
2135
2145
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -15,8 +15,14 @@
15
15
  * assemble the set of critical directives that have been shown but
16
16
  * not acknowledged. In `mode: 'enforce'` it THROWS to block the
17
17
  * action (per the FAIL-CLOSED contract — `output.error` is NOT a
18
- * write API at toolBefore time). In `mode: 'warn'` it appends to
19
- * `events.jsonl` and lets the action proceed.
18
+ * write API at toolBefore time) UNLESS one of two bounded escape
19
+ * hatches has fired first (a per-directive denial-count limit, or a
20
+ * staleness TTL since the directive was shown; see
21
+ * `incrementGateDenialCount`/`buildGateDenialDirectiveKey` in
22
+ * `../state.js`), in which case the pending directives are
23
+ * auto-acknowledged and an audit event is durably written before the
24
+ * action is allowed to proceed. In `mode: 'warn'` it appends to
25
+ * `events.jsonl` and always lets the action proceed.
20
26
  *
21
27
  * Tools considered high-risk:
22
28
  * - save_plan
@@ -68,6 +68,8 @@ export interface KnowledgeApplicationConfig {
68
68
  critical_requires_ack: boolean;
69
69
  require_skill_refs: boolean;
70
70
  high_risk_tools?: string[];
71
+ max_gate_denials?: number;
72
+ gate_staleness_ms?: number;
71
73
  }
72
74
  export declare const DEFAULT_KNOWLEDGE_APPLICATION_CONFIG: KnowledgeApplicationConfig;
73
75
  export interface GateResult {