@sweny-ai/core 0.1.177 → 0.1.179

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/schema.d.ts CHANGED
@@ -61,30 +61,30 @@ export declare const mcpServerConfigZ: z.ZodEffects<z.ZodObject<{
61
61
  }, "strict", z.ZodTypeAny, {
62
62
  url?: string | undefined;
63
63
  type?: "stdio" | "http" | undefined;
64
+ headers?: Record<string, string> | undefined;
64
65
  args?: string[] | undefined;
65
66
  command?: string | undefined;
66
- headers?: Record<string, string> | undefined;
67
67
  env?: Record<string, string> | undefined;
68
68
  }, {
69
69
  url?: string | undefined;
70
70
  type?: "stdio" | "http" | undefined;
71
+ headers?: Record<string, string> | undefined;
71
72
  args?: string[] | undefined;
72
73
  command?: string | undefined;
73
- headers?: Record<string, string> | undefined;
74
74
  env?: Record<string, string> | undefined;
75
75
  }>, {
76
76
  url?: string | undefined;
77
77
  type?: "stdio" | "http" | undefined;
78
+ headers?: Record<string, string> | undefined;
78
79
  args?: string[] | undefined;
79
80
  command?: string | undefined;
80
- headers?: Record<string, string> | undefined;
81
81
  env?: Record<string, string> | undefined;
82
82
  }, {
83
83
  url?: string | undefined;
84
84
  type?: "stdio" | "http" | undefined;
85
+ headers?: Record<string, string> | undefined;
85
86
  args?: string[] | undefined;
86
87
  command?: string | undefined;
87
- headers?: Record<string, string> | undefined;
88
88
  env?: Record<string, string> | undefined;
89
89
  }>;
90
90
  export declare const skillDefinitionZ: z.ZodEffects<z.ZodObject<{
@@ -101,30 +101,30 @@ export declare const skillDefinitionZ: z.ZodEffects<z.ZodObject<{
101
101
  }, "strict", z.ZodTypeAny, {
102
102
  url?: string | undefined;
103
103
  type?: "stdio" | "http" | undefined;
104
+ headers?: Record<string, string> | undefined;
104
105
  args?: string[] | undefined;
105
106
  command?: string | undefined;
106
- headers?: Record<string, string> | undefined;
107
107
  env?: Record<string, string> | undefined;
108
108
  }, {
109
109
  url?: string | undefined;
110
110
  type?: "stdio" | "http" | undefined;
111
+ headers?: Record<string, string> | undefined;
111
112
  args?: string[] | undefined;
112
113
  command?: string | undefined;
113
- headers?: Record<string, string> | undefined;
114
114
  env?: Record<string, string> | undefined;
115
115
  }>, {
116
116
  url?: string | undefined;
117
117
  type?: "stdio" | "http" | undefined;
118
+ headers?: Record<string, string> | undefined;
118
119
  args?: string[] | undefined;
119
120
  command?: string | undefined;
120
- headers?: Record<string, string> | undefined;
121
121
  env?: Record<string, string> | undefined;
122
122
  }, {
123
123
  url?: string | undefined;
124
124
  type?: "stdio" | "http" | undefined;
125
+ headers?: Record<string, string> | undefined;
125
126
  args?: string[] | undefined;
126
127
  command?: string | undefined;
127
- headers?: Record<string, string> | undefined;
128
128
  env?: Record<string, string> | undefined;
129
129
  }>>;
130
130
  }, "strict", z.ZodTypeAny, {
@@ -134,9 +134,9 @@ export declare const skillDefinitionZ: z.ZodEffects<z.ZodObject<{
134
134
  mcp?: {
135
135
  url?: string | undefined;
136
136
  type?: "stdio" | "http" | undefined;
137
+ headers?: Record<string, string> | undefined;
137
138
  args?: string[] | undefined;
138
139
  command?: string | undefined;
139
- headers?: Record<string, string> | undefined;
140
140
  env?: Record<string, string> | undefined;
141
141
  } | undefined;
142
142
  }, {
@@ -146,9 +146,9 @@ export declare const skillDefinitionZ: z.ZodEffects<z.ZodObject<{
146
146
  mcp?: {
147
147
  url?: string | undefined;
148
148
  type?: "stdio" | "http" | undefined;
149
+ headers?: Record<string, string> | undefined;
149
150
  args?: string[] | undefined;
150
151
  command?: string | undefined;
151
- headers?: Record<string, string> | undefined;
152
152
  env?: Record<string, string> | undefined;
153
153
  } | undefined;
154
154
  }>, {
@@ -158,9 +158,9 @@ export declare const skillDefinitionZ: z.ZodEffects<z.ZodObject<{
158
158
  mcp?: {
159
159
  url?: string | undefined;
160
160
  type?: "stdio" | "http" | undefined;
161
+ headers?: Record<string, string> | undefined;
161
162
  args?: string[] | undefined;
162
163
  command?: string | undefined;
163
- headers?: Record<string, string> | undefined;
164
164
  env?: Record<string, string> | undefined;
165
165
  } | undefined;
166
166
  }, {
@@ -170,9 +170,9 @@ export declare const skillDefinitionZ: z.ZodEffects<z.ZodObject<{
170
170
  mcp?: {
171
171
  url?: string | undefined;
172
172
  type?: "stdio" | "http" | undefined;
173
+ headers?: Record<string, string> | undefined;
173
174
  args?: string[] | undefined;
174
175
  command?: string | undefined;
175
- headers?: Record<string, string> | undefined;
176
176
  env?: Record<string, string> | undefined;
177
177
  } | undefined;
178
178
  }>;
@@ -221,36 +221,41 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
221
221
  }, "strict", z.ZodTypeAny, {
222
222
  url?: string | undefined;
223
223
  type?: "stdio" | "http" | undefined;
224
+ headers?: Record<string, string> | undefined;
224
225
  args?: string[] | undefined;
225
226
  command?: string | undefined;
226
- headers?: Record<string, string> | undefined;
227
227
  env?: Record<string, string> | undefined;
228
228
  }, {
229
229
  url?: string | undefined;
230
230
  type?: "stdio" | "http" | undefined;
231
+ headers?: Record<string, string> | undefined;
231
232
  args?: string[] | undefined;
232
233
  command?: string | undefined;
233
- headers?: Record<string, string> | undefined;
234
234
  env?: Record<string, string> | undefined;
235
235
  }>, {
236
236
  url?: string | undefined;
237
237
  type?: "stdio" | "http" | undefined;
238
+ headers?: Record<string, string> | undefined;
238
239
  args?: string[] | undefined;
239
240
  command?: string | undefined;
240
- headers?: Record<string, string> | undefined;
241
241
  env?: Record<string, string> | undefined;
242
242
  }, {
243
243
  url?: string | undefined;
244
244
  type?: "stdio" | "http" | undefined;
245
+ headers?: Record<string, string> | undefined;
245
246
  args?: string[] | undefined;
246
247
  command?: string | undefined;
247
- headers?: Record<string, string> | undefined;
248
248
  env?: Record<string, string> | undefined;
249
249
  }>>;
250
250
  mcpAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
251
251
  }, "strict", z.ZodTypeAny, {
252
252
  description: string;
253
253
  name: string;
254
+ config: Record<string, {
255
+ description: string;
256
+ required?: boolean | undefined;
257
+ env?: string | undefined;
258
+ }>;
254
259
  id: string;
255
260
  tools: {
256
261
  description: string;
@@ -258,19 +263,14 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
258
263
  input_schema: Record<string, unknown>;
259
264
  access?: "write" | "read" | undefined;
260
265
  }[];
261
- config: Record<string, {
262
- description: string;
263
- required?: boolean | undefined;
264
- env?: string | undefined;
265
- }>;
266
- category: "general" | "git" | "tasks" | "notification" | "observability" | "data";
266
+ category: "data" | "general" | "git" | "tasks" | "notification" | "observability";
267
267
  instruction?: string | undefined;
268
268
  mcp?: {
269
269
  url?: string | undefined;
270
270
  type?: "stdio" | "http" | undefined;
271
+ headers?: Record<string, string> | undefined;
271
272
  args?: string[] | undefined;
272
273
  command?: string | undefined;
273
- headers?: Record<string, string> | undefined;
274
274
  env?: Record<string, string> | undefined;
275
275
  } | undefined;
276
276
  mcpAliases?: Record<string, string[]> | undefined;
@@ -278,7 +278,12 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
278
278
  description: string;
279
279
  name: string;
280
280
  id: string;
281
- category: "general" | "git" | "tasks" | "notification" | "observability" | "data";
281
+ category: "data" | "general" | "git" | "tasks" | "notification" | "observability";
282
+ config?: Record<string, {
283
+ description: string;
284
+ required?: boolean | undefined;
285
+ env?: string | undefined;
286
+ }> | undefined;
282
287
  instruction?: string | undefined;
283
288
  tools?: {
284
289
  description: string;
@@ -286,23 +291,23 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
286
291
  input_schema: Record<string, unknown>;
287
292
  access?: "write" | "read" | undefined;
288
293
  }[] | undefined;
289
- config?: Record<string, {
290
- description: string;
291
- required?: boolean | undefined;
292
- env?: string | undefined;
293
- }> | undefined;
294
294
  mcp?: {
295
295
  url?: string | undefined;
296
296
  type?: "stdio" | "http" | undefined;
297
+ headers?: Record<string, string> | undefined;
297
298
  args?: string[] | undefined;
298
299
  command?: string | undefined;
299
- headers?: Record<string, string> | undefined;
300
300
  env?: Record<string, string> | undefined;
301
301
  } | undefined;
302
302
  mcpAliases?: Record<string, string[]> | undefined;
303
303
  }>, {
304
304
  description: string;
305
305
  name: string;
306
+ config: Record<string, {
307
+ description: string;
308
+ required?: boolean | undefined;
309
+ env?: string | undefined;
310
+ }>;
306
311
  id: string;
307
312
  tools: {
308
313
  description: string;
@@ -310,19 +315,14 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
310
315
  input_schema: Record<string, unknown>;
311
316
  access?: "write" | "read" | undefined;
312
317
  }[];
313
- config: Record<string, {
314
- description: string;
315
- required?: boolean | undefined;
316
- env?: string | undefined;
317
- }>;
318
- category: "general" | "git" | "tasks" | "notification" | "observability" | "data";
318
+ category: "data" | "general" | "git" | "tasks" | "notification" | "observability";
319
319
  instruction?: string | undefined;
320
320
  mcp?: {
321
321
  url?: string | undefined;
322
322
  type?: "stdio" | "http" | undefined;
323
+ headers?: Record<string, string> | undefined;
323
324
  args?: string[] | undefined;
324
325
  command?: string | undefined;
325
- headers?: Record<string, string> | undefined;
326
326
  env?: Record<string, string> | undefined;
327
327
  } | undefined;
328
328
  mcpAliases?: Record<string, string[]> | undefined;
@@ -330,7 +330,12 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
330
330
  description: string;
331
331
  name: string;
332
332
  id: string;
333
- category: "general" | "git" | "tasks" | "notification" | "observability" | "data";
333
+ category: "data" | "general" | "git" | "tasks" | "notification" | "observability";
334
+ config?: Record<string, {
335
+ description: string;
336
+ required?: boolean | undefined;
337
+ env?: string | undefined;
338
+ }> | undefined;
334
339
  instruction?: string | undefined;
335
340
  tools?: {
336
341
  description: string;
@@ -338,17 +343,12 @@ export declare const skillZ: z.ZodEffects<z.ZodObject<{
338
343
  input_schema: Record<string, unknown>;
339
344
  access?: "write" | "read" | undefined;
340
345
  }[] | undefined;
341
- config?: Record<string, {
342
- description: string;
343
- required?: boolean | undefined;
344
- env?: string | undefined;
345
- }> | undefined;
346
346
  mcp?: {
347
347
  url?: string | undefined;
348
348
  type?: "stdio" | "http" | undefined;
349
+ headers?: Record<string, string> | undefined;
349
350
  args?: string[] | undefined;
350
351
  command?: string | undefined;
351
- headers?: Record<string, string> | undefined;
352
352
  env?: Record<string, string> | undefined;
353
353
  } | undefined;
354
354
  mcpAliases?: Record<string, string[]> | undefined;
@@ -870,53 +870,29 @@ export declare const budgetZ: z.ZodEffects<z.ZodObject<{
870
870
  cost_usd?: number | undefined;
871
871
  }>;
872
872
  /**
873
- * Decision model for route choices (#357). `shadow` needs a provider; the
874
- * state only ever goes to that `base_url`, there is no fallback. The key is
875
- * named by env var, never inlined.
873
+ * Decision model thresholds (#357) for the nodes that set `route_by:
874
+ * decider`. Thresholds may be raised, and lowered no further than the floors.
875
+ * The provider (endpoint, model, key) comes only from operator config.
876
+ *
877
+ * Shapes from the shadow-mode release fail with an explanation instead of
878
+ * silently changing routing: `mode` ({@link DECIDER_MODE_REMOVED}) and
879
+ * `provider` ({@link DECIDER_PROVIDER_MOVED}).
876
880
  */
877
- export declare const deciderZ: z.ZodEffects<z.ZodObject<{
878
- mode: z.ZodEnum<["off", "shadow"]>;
879
- provider: z.ZodOptional<z.ZodObject<{
880
- base_url: z.ZodString;
881
- model: z.ZodString;
882
- api_key_env: z.ZodOptional<z.ZodString>;
883
- }, "strict", z.ZodTypeAny, {
884
- model: string;
885
- base_url: string;
886
- api_key_env?: string | undefined;
887
- }, {
888
- model: string;
889
- base_url: string;
890
- api_key_env?: string | undefined;
891
- }>>;
881
+ export declare const deciderZ: z.ZodObject<{
882
+ mode: z.ZodOptional<z.ZodType<never, z.ZodTypeDef, never>>;
883
+ provider: z.ZodOptional<z.ZodType<never, z.ZodTypeDef, never>>;
884
+ min_confidence: z.ZodOptional<z.ZodNumber>;
885
+ min_margin: z.ZodOptional<z.ZodNumber>;
892
886
  }, "strict", z.ZodTypeAny, {
893
- mode: "off" | "shadow";
894
- provider?: {
895
- model: string;
896
- base_url: string;
897
- api_key_env?: string | undefined;
898
- } | undefined;
887
+ min_confidence?: number | undefined;
888
+ mode?: undefined;
889
+ provider?: undefined;
890
+ min_margin?: number | undefined;
899
891
  }, {
900
- mode: "off" | "shadow";
901
- provider?: {
902
- model: string;
903
- base_url: string;
904
- api_key_env?: string | undefined;
905
- } | undefined;
906
- }>, {
907
- mode: "off" | "shadow";
908
- provider?: {
909
- model: string;
910
- base_url: string;
911
- api_key_env?: string | undefined;
912
- } | undefined;
913
- }, {
914
- mode: "off" | "shadow";
915
- provider?: {
916
- model: string;
917
- base_url: string;
918
- api_key_env?: string | undefined;
919
- } | undefined;
892
+ min_confidence?: number | undefined;
893
+ mode?: undefined;
894
+ provider?: undefined;
895
+ min_margin?: number | undefined;
920
896
  }>;
921
897
  /** One typed write intent a node may emit (#365). */
922
898
  export declare const safeOutputDeclarationZ: z.ZodObject<{
@@ -936,24 +912,24 @@ export declare const safeOutputDeclarationZ: z.ZodObject<{
936
912
  }>]>>;
937
913
  state: z.ZodOptional<z.ZodEnum<["reopen", "close"]>>;
938
914
  }, "strict", z.ZodTypeAny, {
939
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
915
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
940
916
  number?: string | number | {
941
917
  input: string;
942
918
  } | undefined;
943
919
  labels?: string[] | undefined;
944
- state?: "reopen" | "close" | undefined;
920
+ state?: "close" | "reopen" | undefined;
945
921
  via?: string | undefined;
946
922
  target?: string | undefined;
947
923
  title_prefix?: string | undefined;
948
924
  max?: number | undefined;
949
925
  expires?: string | undefined;
950
926
  }, {
951
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
927
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
952
928
  number?: string | number | {
953
929
  input: string;
954
930
  } | undefined;
955
931
  labels?: string[] | undefined;
956
- state?: "reopen" | "close" | undefined;
932
+ state?: "close" | "reopen" | undefined;
957
933
  via?: string | undefined;
958
934
  target?: string | undefined;
959
935
  title_prefix?: string | undefined;
@@ -970,14 +946,14 @@ export declare const safeOutputsPolicyZ: z.ZodObject<{
970
946
  screen: z.ZodOptional<z.ZodBoolean>;
971
947
  }, "strict", z.ZodTypeAny, {
972
948
  staged?: boolean | undefined;
973
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
949
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
974
950
  max?: number | undefined;
975
951
  trusted_actors?: string[] | undefined;
976
952
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
977
953
  screen?: boolean | undefined;
978
954
  }, {
979
955
  staged?: boolean | undefined;
980
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
956
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
981
957
  max?: number | undefined;
982
958
  trusted_actors?: string[] | undefined;
983
959
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
@@ -1048,6 +1024,7 @@ export declare const nodeZ: z.ZodObject<{
1048
1024
  }>>;
1049
1025
  fail_soft: z.ZodOptional<z.ZodBoolean>;
1050
1026
  on_fail: z.ZodOptional<z.ZodEnum<["halt", "continue"]>>;
1027
+ route_by: z.ZodOptional<z.ZodEnum<["agent", "decider"]>>;
1051
1028
  permissions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["read", "write"]>, z.ZodEffects<z.ZodObject<{
1052
1029
  access: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
1053
1030
  deny: z.ZodOptional<z.ZodArray<z.ZodEnum<["shell", "write", "edit", "net", "subagent"]>, "many">>;
@@ -1086,24 +1063,24 @@ export declare const nodeZ: z.ZodObject<{
1086
1063
  }>]>>;
1087
1064
  state: z.ZodOptional<z.ZodEnum<["reopen", "close"]>>;
1088
1065
  }, "strict", z.ZodTypeAny, {
1089
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
1066
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
1090
1067
  number?: string | number | {
1091
1068
  input: string;
1092
1069
  } | undefined;
1093
1070
  labels?: string[] | undefined;
1094
- state?: "reopen" | "close" | undefined;
1071
+ state?: "close" | "reopen" | undefined;
1095
1072
  via?: string | undefined;
1096
1073
  target?: string | undefined;
1097
1074
  title_prefix?: string | undefined;
1098
1075
  max?: number | undefined;
1099
1076
  expires?: string | undefined;
1100
1077
  }, {
1101
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
1078
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
1102
1079
  number?: string | number | {
1103
1080
  input: string;
1104
1081
  } | undefined;
1105
1082
  labels?: string[] | undefined;
1106
- state?: "reopen" | "close" | undefined;
1083
+ state?: "close" | "reopen" | undefined;
1107
1084
  via?: string | undefined;
1108
1085
  target?: string | undefined;
1109
1086
  title_prefix?: string | undefined;
@@ -1514,12 +1491,12 @@ export declare const nodeZ: z.ZodObject<{
1514
1491
  access?: "write" | "read" | undefined;
1515
1492
  } | undefined;
1516
1493
  outputs?: {
1517
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
1494
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
1518
1495
  number?: string | number | {
1519
1496
  input: string;
1520
1497
  } | undefined;
1521
1498
  labels?: string[] | undefined;
1522
- state?: "reopen" | "close" | undefined;
1499
+ state?: "close" | "reopen" | undefined;
1523
1500
  via?: string | undefined;
1524
1501
  target?: string | undefined;
1525
1502
  title_prefix?: string | undefined;
@@ -1614,7 +1591,8 @@ export declare const nodeZ: z.ZodObject<{
1614
1591
  deny?: string[] | undefined;
1615
1592
  } | undefined;
1616
1593
  fail_soft?: boolean | undefined;
1617
- on_fail?: "halt" | "continue" | undefined;
1594
+ on_fail?: "continue" | "halt" | undefined;
1595
+ route_by?: "decider" | "agent" | undefined;
1618
1596
  }, {
1619
1597
  name: string;
1620
1598
  instruction: string | {
@@ -1632,12 +1610,12 @@ export declare const nodeZ: z.ZodObject<{
1632
1610
  access?: "write" | "read" | undefined;
1633
1611
  } | undefined;
1634
1612
  outputs?: {
1635
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
1613
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
1636
1614
  number?: string | number | {
1637
1615
  input: string;
1638
1616
  } | undefined;
1639
1617
  labels?: string[] | undefined;
1640
- state?: "reopen" | "close" | undefined;
1618
+ state?: "close" | "reopen" | undefined;
1641
1619
  via?: string | undefined;
1642
1620
  target?: string | undefined;
1643
1621
  title_prefix?: string | undefined;
@@ -1733,7 +1711,8 @@ export declare const nodeZ: z.ZodObject<{
1733
1711
  deny?: string[] | undefined;
1734
1712
  } | undefined;
1735
1713
  fail_soft?: boolean | undefined;
1736
- on_fail?: "halt" | "continue" | undefined;
1714
+ on_fail?: "continue" | "halt" | undefined;
1715
+ route_by?: "decider" | "agent" | undefined;
1737
1716
  }>;
1738
1717
  export declare const edgeZ: z.ZodObject<{
1739
1718
  from: z.ZodString;
@@ -1745,10 +1724,12 @@ export declare const edgeZ: z.ZodObject<{
1745
1724
  }, {
1746
1725
  expr: string;
1747
1726
  }>]>>;
1727
+ description: z.ZodOptional<z.ZodString>;
1748
1728
  max_iterations: z.ZodOptional<z.ZodNumber>;
1749
1729
  }, "strict", z.ZodTypeAny, {
1750
1730
  from: string;
1751
1731
  to: string;
1732
+ description?: string | undefined;
1752
1733
  max_iterations?: number | undefined;
1753
1734
  when?: string | {
1754
1735
  expr: string;
@@ -1756,6 +1737,7 @@ export declare const edgeZ: z.ZodObject<{
1756
1737
  }, {
1757
1738
  from: string;
1758
1739
  to: string;
1740
+ description?: string | undefined;
1759
1741
  max_iterations?: number | undefined;
1760
1742
  when?: string | {
1761
1743
  expr: string;
@@ -1844,6 +1826,7 @@ export declare const workflowZ: z.ZodObject<{
1844
1826
  }>>;
1845
1827
  fail_soft: z.ZodOptional<z.ZodBoolean>;
1846
1828
  on_fail: z.ZodOptional<z.ZodEnum<["halt", "continue"]>>;
1829
+ route_by: z.ZodOptional<z.ZodEnum<["agent", "decider"]>>;
1847
1830
  permissions: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["read", "write"]>, z.ZodEffects<z.ZodObject<{
1848
1831
  access: z.ZodOptional<z.ZodEnum<["read", "write"]>>;
1849
1832
  deny: z.ZodOptional<z.ZodArray<z.ZodEnum<["shell", "write", "edit", "net", "subagent"]>, "many">>;
@@ -1882,24 +1865,24 @@ export declare const workflowZ: z.ZodObject<{
1882
1865
  }>]>>;
1883
1866
  state: z.ZodOptional<z.ZodEnum<["reopen", "close"]>>;
1884
1867
  }, "strict", z.ZodTypeAny, {
1885
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
1868
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
1886
1869
  number?: string | number | {
1887
1870
  input: string;
1888
1871
  } | undefined;
1889
1872
  labels?: string[] | undefined;
1890
- state?: "reopen" | "close" | undefined;
1873
+ state?: "close" | "reopen" | undefined;
1891
1874
  via?: string | undefined;
1892
1875
  target?: string | undefined;
1893
1876
  title_prefix?: string | undefined;
1894
1877
  max?: number | undefined;
1895
1878
  expires?: string | undefined;
1896
1879
  }, {
1897
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
1880
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
1898
1881
  number?: string | number | {
1899
1882
  input: string;
1900
1883
  } | undefined;
1901
1884
  labels?: string[] | undefined;
1902
- state?: "reopen" | "close" | undefined;
1885
+ state?: "close" | "reopen" | undefined;
1903
1886
  via?: string | undefined;
1904
1887
  target?: string | undefined;
1905
1888
  title_prefix?: string | undefined;
@@ -2310,12 +2293,12 @@ export declare const workflowZ: z.ZodObject<{
2310
2293
  access?: "write" | "read" | undefined;
2311
2294
  } | undefined;
2312
2295
  outputs?: {
2313
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
2296
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
2314
2297
  number?: string | number | {
2315
2298
  input: string;
2316
2299
  } | undefined;
2317
2300
  labels?: string[] | undefined;
2318
- state?: "reopen" | "close" | undefined;
2301
+ state?: "close" | "reopen" | undefined;
2319
2302
  via?: string | undefined;
2320
2303
  target?: string | undefined;
2321
2304
  title_prefix?: string | undefined;
@@ -2410,7 +2393,8 @@ export declare const workflowZ: z.ZodObject<{
2410
2393
  deny?: string[] | undefined;
2411
2394
  } | undefined;
2412
2395
  fail_soft?: boolean | undefined;
2413
- on_fail?: "halt" | "continue" | undefined;
2396
+ on_fail?: "continue" | "halt" | undefined;
2397
+ route_by?: "decider" | "agent" | undefined;
2414
2398
  }, {
2415
2399
  name: string;
2416
2400
  instruction: string | {
@@ -2428,12 +2412,12 @@ export declare const workflowZ: z.ZodObject<{
2428
2412
  access?: "write" | "read" | undefined;
2429
2413
  } | undefined;
2430
2414
  outputs?: {
2431
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
2415
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
2432
2416
  number?: string | number | {
2433
2417
  input: string;
2434
2418
  } | undefined;
2435
2419
  labels?: string[] | undefined;
2436
- state?: "reopen" | "close" | undefined;
2420
+ state?: "close" | "reopen" | undefined;
2437
2421
  via?: string | undefined;
2438
2422
  target?: string | undefined;
2439
2423
  title_prefix?: string | undefined;
@@ -2529,7 +2513,8 @@ export declare const workflowZ: z.ZodObject<{
2529
2513
  deny?: string[] | undefined;
2530
2514
  } | undefined;
2531
2515
  fail_soft?: boolean | undefined;
2532
- on_fail?: "halt" | "continue" | undefined;
2516
+ on_fail?: "continue" | "halt" | undefined;
2517
+ route_by?: "decider" | "agent" | undefined;
2533
2518
  }>>;
2534
2519
  edges: z.ZodArray<z.ZodObject<{
2535
2520
  from: z.ZodString;
@@ -2541,10 +2526,12 @@ export declare const workflowZ: z.ZodObject<{
2541
2526
  }, {
2542
2527
  expr: string;
2543
2528
  }>]>>;
2529
+ description: z.ZodOptional<z.ZodString>;
2544
2530
  max_iterations: z.ZodOptional<z.ZodNumber>;
2545
2531
  }, "strict", z.ZodTypeAny, {
2546
2532
  from: string;
2547
2533
  to: string;
2534
+ description?: string | undefined;
2548
2535
  max_iterations?: number | undefined;
2549
2536
  when?: string | {
2550
2537
  expr: string;
@@ -2552,6 +2539,7 @@ export declare const workflowZ: z.ZodObject<{
2552
2539
  }, {
2553
2540
  from: string;
2554
2541
  to: string;
2542
+ description?: string | undefined;
2555
2543
  max_iterations?: number | undefined;
2556
2544
  when?: string | {
2557
2545
  expr: string;
@@ -2572,30 +2560,30 @@ export declare const workflowZ: z.ZodObject<{
2572
2560
  }, "strict", z.ZodTypeAny, {
2573
2561
  url?: string | undefined;
2574
2562
  type?: "stdio" | "http" | undefined;
2563
+ headers?: Record<string, string> | undefined;
2575
2564
  args?: string[] | undefined;
2576
2565
  command?: string | undefined;
2577
- headers?: Record<string, string> | undefined;
2578
2566
  env?: Record<string, string> | undefined;
2579
2567
  }, {
2580
2568
  url?: string | undefined;
2581
2569
  type?: "stdio" | "http" | undefined;
2570
+ headers?: Record<string, string> | undefined;
2582
2571
  args?: string[] | undefined;
2583
2572
  command?: string | undefined;
2584
- headers?: Record<string, string> | undefined;
2585
2573
  env?: Record<string, string> | undefined;
2586
2574
  }>, {
2587
2575
  url?: string | undefined;
2588
2576
  type?: "stdio" | "http" | undefined;
2577
+ headers?: Record<string, string> | undefined;
2589
2578
  args?: string[] | undefined;
2590
2579
  command?: string | undefined;
2591
- headers?: Record<string, string> | undefined;
2592
2580
  env?: Record<string, string> | undefined;
2593
2581
  }, {
2594
2582
  url?: string | undefined;
2595
2583
  type?: "stdio" | "http" | undefined;
2584
+ headers?: Record<string, string> | undefined;
2596
2585
  args?: string[] | undefined;
2597
2586
  command?: string | undefined;
2598
- headers?: Record<string, string> | undefined;
2599
2587
  env?: Record<string, string> | undefined;
2600
2588
  }>>;
2601
2589
  }, "strict", z.ZodTypeAny, {
@@ -2605,9 +2593,9 @@ export declare const workflowZ: z.ZodObject<{
2605
2593
  mcp?: {
2606
2594
  url?: string | undefined;
2607
2595
  type?: "stdio" | "http" | undefined;
2596
+ headers?: Record<string, string> | undefined;
2608
2597
  args?: string[] | undefined;
2609
2598
  command?: string | undefined;
2610
- headers?: Record<string, string> | undefined;
2611
2599
  env?: Record<string, string> | undefined;
2612
2600
  } | undefined;
2613
2601
  }, {
@@ -2617,9 +2605,9 @@ export declare const workflowZ: z.ZodObject<{
2617
2605
  mcp?: {
2618
2606
  url?: string | undefined;
2619
2607
  type?: "stdio" | "http" | undefined;
2608
+ headers?: Record<string, string> | undefined;
2620
2609
  args?: string[] | undefined;
2621
2610
  command?: string | undefined;
2622
- headers?: Record<string, string> | undefined;
2623
2611
  env?: Record<string, string> | undefined;
2624
2612
  } | undefined;
2625
2613
  }>, {
@@ -2629,9 +2617,9 @@ export declare const workflowZ: z.ZodObject<{
2629
2617
  mcp?: {
2630
2618
  url?: string | undefined;
2631
2619
  type?: "stdio" | "http" | undefined;
2620
+ headers?: Record<string, string> | undefined;
2632
2621
  args?: string[] | undefined;
2633
2622
  command?: string | undefined;
2634
- headers?: Record<string, string> | undefined;
2635
2623
  env?: Record<string, string> | undefined;
2636
2624
  } | undefined;
2637
2625
  }, {
@@ -2641,9 +2629,9 @@ export declare const workflowZ: z.ZodObject<{
2641
2629
  mcp?: {
2642
2630
  url?: string | undefined;
2643
2631
  type?: "stdio" | "http" | undefined;
2632
+ headers?: Record<string, string> | undefined;
2644
2633
  args?: string[] | undefined;
2645
2634
  command?: string | undefined;
2646
- headers?: Record<string, string> | undefined;
2647
2635
  env?: Record<string, string> | undefined;
2648
2636
  } | undefined;
2649
2637
  }>>>;
@@ -2710,49 +2698,21 @@ export declare const workflowZ: z.ZodObject<{
2710
2698
  tokens?: number | undefined;
2711
2699
  cost_usd?: number | undefined;
2712
2700
  }>>;
2713
- decider: z.ZodOptional<z.ZodEffects<z.ZodObject<{
2714
- mode: z.ZodEnum<["off", "shadow"]>;
2715
- provider: z.ZodOptional<z.ZodObject<{
2716
- base_url: z.ZodString;
2717
- model: z.ZodString;
2718
- api_key_env: z.ZodOptional<z.ZodString>;
2719
- }, "strict", z.ZodTypeAny, {
2720
- model: string;
2721
- base_url: string;
2722
- api_key_env?: string | undefined;
2723
- }, {
2724
- model: string;
2725
- base_url: string;
2726
- api_key_env?: string | undefined;
2727
- }>>;
2701
+ decider: z.ZodOptional<z.ZodObject<{
2702
+ mode: z.ZodOptional<z.ZodType<never, z.ZodTypeDef, never>>;
2703
+ provider: z.ZodOptional<z.ZodType<never, z.ZodTypeDef, never>>;
2704
+ min_confidence: z.ZodOptional<z.ZodNumber>;
2705
+ min_margin: z.ZodOptional<z.ZodNumber>;
2728
2706
  }, "strict", z.ZodTypeAny, {
2729
- mode: "off" | "shadow";
2730
- provider?: {
2731
- model: string;
2732
- base_url: string;
2733
- api_key_env?: string | undefined;
2734
- } | undefined;
2707
+ min_confidence?: number | undefined;
2708
+ mode?: undefined;
2709
+ provider?: undefined;
2710
+ min_margin?: number | undefined;
2735
2711
  }, {
2736
- mode: "off" | "shadow";
2737
- provider?: {
2738
- model: string;
2739
- base_url: string;
2740
- api_key_env?: string | undefined;
2741
- } | undefined;
2742
- }>, {
2743
- mode: "off" | "shadow";
2744
- provider?: {
2745
- model: string;
2746
- base_url: string;
2747
- api_key_env?: string | undefined;
2748
- } | undefined;
2749
- }, {
2750
- mode: "off" | "shadow";
2751
- provider?: {
2752
- model: string;
2753
- base_url: string;
2754
- api_key_env?: string | undefined;
2755
- } | undefined;
2712
+ min_confidence?: number | undefined;
2713
+ mode?: undefined;
2714
+ provider?: undefined;
2715
+ min_margin?: number | undefined;
2756
2716
  }>>;
2757
2717
  context_mode: z.ZodOptional<z.ZodEnum<["bounded", "full"]>>;
2758
2718
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodObject<{
@@ -2816,14 +2776,14 @@ export declare const workflowZ: z.ZodObject<{
2816
2776
  screen: z.ZodOptional<z.ZodBoolean>;
2817
2777
  }, "strict", z.ZodTypeAny, {
2818
2778
  staged?: boolean | undefined;
2819
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
2779
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
2820
2780
  max?: number | undefined;
2821
2781
  trusted_actors?: string[] | undefined;
2822
2782
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
2823
2783
  screen?: boolean | undefined;
2824
2784
  }, {
2825
2785
  staged?: boolean | undefined;
2826
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
2786
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
2827
2787
  max?: number | undefined;
2828
2788
  trusted_actors?: string[] | undefined;
2829
2789
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
@@ -2840,9 +2800,9 @@ export declare const workflowZ: z.ZodObject<{
2840
2800
  mcp?: {
2841
2801
  url?: string | undefined;
2842
2802
  type?: "stdio" | "http" | undefined;
2803
+ headers?: Record<string, string> | undefined;
2843
2804
  args?: string[] | undefined;
2844
2805
  command?: string | undefined;
2845
- headers?: Record<string, string> | undefined;
2846
2806
  env?: Record<string, string> | undefined;
2847
2807
  } | undefined;
2848
2808
  }>;
@@ -2864,12 +2824,12 @@ export declare const workflowZ: z.ZodObject<{
2864
2824
  access?: "write" | "read" | undefined;
2865
2825
  } | undefined;
2866
2826
  outputs?: {
2867
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
2827
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
2868
2828
  number?: string | number | {
2869
2829
  input: string;
2870
2830
  } | undefined;
2871
2831
  labels?: string[] | undefined;
2872
- state?: "reopen" | "close" | undefined;
2832
+ state?: "close" | "reopen" | undefined;
2873
2833
  via?: string | undefined;
2874
2834
  target?: string | undefined;
2875
2835
  title_prefix?: string | undefined;
@@ -2964,11 +2924,13 @@ export declare const workflowZ: z.ZodObject<{
2964
2924
  deny?: string[] | undefined;
2965
2925
  } | undefined;
2966
2926
  fail_soft?: boolean | undefined;
2967
- on_fail?: "halt" | "continue" | undefined;
2927
+ on_fail?: "continue" | "halt" | undefined;
2928
+ route_by?: "decider" | "agent" | undefined;
2968
2929
  }>;
2969
2930
  edges: {
2970
2931
  from: string;
2971
2932
  to: string;
2933
+ description?: string | undefined;
2972
2934
  max_iterations?: number | undefined;
2973
2935
  when?: string | {
2974
2936
  expr: string;
@@ -2976,6 +2938,12 @@ export declare const workflowZ: z.ZodObject<{
2976
2938
  }[];
2977
2939
  entry: string;
2978
2940
  model?: string | undefined;
2941
+ decider?: {
2942
+ min_confidence?: number | undefined;
2943
+ mode?: undefined;
2944
+ provider?: undefined;
2945
+ min_margin?: number | undefined;
2946
+ } | undefined;
2979
2947
  permissions?: "write" | "read" | {
2980
2948
  strict?: boolean | undefined;
2981
2949
  deny?: ("shell" | "write" | "edit" | "net" | "subagent")[] | undefined;
@@ -3005,14 +2973,6 @@ export declare const workflowZ: z.ZodObject<{
3005
2973
  spec_version?: string | undefined;
3006
2974
  workflow_type?: "pr_review" | "e2e_test" | "content_generation" | "monitor" | "data_sync" | "generic" | undefined;
3007
2975
  judge_budget?: number | undefined;
3008
- decider?: {
3009
- mode: "off" | "shadow";
3010
- provider?: {
3011
- model: string;
3012
- base_url: string;
3013
- api_key_env?: string | undefined;
3014
- } | undefined;
3015
- } | undefined;
3016
2976
  context_mode?: "full" | "bounded" | undefined;
3017
2977
  inputs?: Record<string, {
3018
2978
  type: "string" | "number" | "boolean" | "string[]";
@@ -3023,7 +2983,7 @@ export declare const workflowZ: z.ZodObject<{
3023
2983
  }> | undefined;
3024
2984
  safe_outputs?: {
3025
2985
  staged?: boolean | undefined;
3026
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
2986
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
3027
2987
  max?: number | undefined;
3028
2988
  trusted_actors?: string[] | undefined;
3029
2989
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
@@ -3049,12 +3009,12 @@ export declare const workflowZ: z.ZodObject<{
3049
3009
  access?: "write" | "read" | undefined;
3050
3010
  } | undefined;
3051
3011
  outputs?: {
3052
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
3012
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
3053
3013
  number?: string | number | {
3054
3014
  input: string;
3055
3015
  } | undefined;
3056
3016
  labels?: string[] | undefined;
3057
- state?: "reopen" | "close" | undefined;
3017
+ state?: "close" | "reopen" | undefined;
3058
3018
  via?: string | undefined;
3059
3019
  target?: string | undefined;
3060
3020
  title_prefix?: string | undefined;
@@ -3150,11 +3110,13 @@ export declare const workflowZ: z.ZodObject<{
3150
3110
  deny?: string[] | undefined;
3151
3111
  } | undefined;
3152
3112
  fail_soft?: boolean | undefined;
3153
- on_fail?: "halt" | "continue" | undefined;
3113
+ on_fail?: "continue" | "halt" | undefined;
3114
+ route_by?: "decider" | "agent" | undefined;
3154
3115
  }>;
3155
3116
  edges: {
3156
3117
  from: string;
3157
3118
  to: string;
3119
+ description?: string | undefined;
3158
3120
  max_iterations?: number | undefined;
3159
3121
  when?: string | {
3160
3122
  expr: string;
@@ -3163,6 +3125,12 @@ export declare const workflowZ: z.ZodObject<{
3163
3125
  entry: string;
3164
3126
  description?: string | undefined;
3165
3127
  model?: string | undefined;
3128
+ decider?: {
3129
+ min_confidence?: number | undefined;
3130
+ mode?: undefined;
3131
+ provider?: undefined;
3132
+ min_margin?: number | undefined;
3133
+ } | undefined;
3166
3134
  permissions?: "write" | "read" | {
3167
3135
  strict?: boolean | undefined;
3168
3136
  deny?: ("shell" | "write" | "edit" | "net" | "subagent")[] | undefined;
@@ -3175,9 +3143,9 @@ export declare const workflowZ: z.ZodObject<{
3175
3143
  mcp?: {
3176
3144
  url?: string | undefined;
3177
3145
  type?: "stdio" | "http" | undefined;
3146
+ headers?: Record<string, string> | undefined;
3178
3147
  args?: string[] | undefined;
3179
3148
  command?: string | undefined;
3180
- headers?: Record<string, string> | undefined;
3181
3149
  env?: Record<string, string> | undefined;
3182
3150
  } | undefined;
3183
3151
  }> | undefined;
@@ -3205,14 +3173,6 @@ export declare const workflowZ: z.ZodObject<{
3205
3173
  spec_version?: string | undefined;
3206
3174
  workflow_type?: "pr_review" | "e2e_test" | "content_generation" | "monitor" | "data_sync" | "generic" | undefined;
3207
3175
  judge_budget?: number | undefined;
3208
- decider?: {
3209
- mode: "off" | "shadow";
3210
- provider?: {
3211
- model: string;
3212
- base_url: string;
3213
- api_key_env?: string | undefined;
3214
- } | undefined;
3215
- } | undefined;
3216
3176
  context_mode?: "full" | "bounded" | undefined;
3217
3177
  inputs?: Record<string, {
3218
3178
  type: "string" | "number" | "boolean" | "string[]";
@@ -3223,7 +3183,7 @@ export declare const workflowZ: z.ZodObject<{
3223
3183
  }> | undefined;
3224
3184
  safe_outputs?: {
3225
3185
  staged?: boolean | undefined;
3226
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
3186
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
3227
3187
  max?: number | undefined;
3228
3188
  trusted_actors?: string[] | undefined;
3229
3189
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
@@ -3254,9 +3214,9 @@ export declare function parseWorkflow(raw: unknown): {
3254
3214
  mcp?: {
3255
3215
  url?: string | undefined;
3256
3216
  type?: "stdio" | "http" | undefined;
3217
+ headers?: Record<string, string> | undefined;
3257
3218
  args?: string[] | undefined;
3258
3219
  command?: string | undefined;
3259
- headers?: Record<string, string> | undefined;
3260
3220
  env?: Record<string, string> | undefined;
3261
3221
  } | undefined;
3262
3222
  }>;
@@ -3278,12 +3238,12 @@ export declare function parseWorkflow(raw: unknown): {
3278
3238
  access?: "write" | "read" | undefined;
3279
3239
  } | undefined;
3280
3240
  outputs?: {
3281
- type: "comment" | "issue" | "pr" | "label" | "issue_state";
3241
+ type: "label" | "comment" | "issue" | "pr" | "issue_state";
3282
3242
  number?: string | number | {
3283
3243
  input: string;
3284
3244
  } | undefined;
3285
3245
  labels?: string[] | undefined;
3286
- state?: "reopen" | "close" | undefined;
3246
+ state?: "close" | "reopen" | undefined;
3287
3247
  via?: string | undefined;
3288
3248
  target?: string | undefined;
3289
3249
  title_prefix?: string | undefined;
@@ -3378,11 +3338,13 @@ export declare function parseWorkflow(raw: unknown): {
3378
3338
  deny?: string[] | undefined;
3379
3339
  } | undefined;
3380
3340
  fail_soft?: boolean | undefined;
3381
- on_fail?: "halt" | "continue" | undefined;
3341
+ on_fail?: "continue" | "halt" | undefined;
3342
+ route_by?: "decider" | "agent" | undefined;
3382
3343
  }>;
3383
3344
  edges: {
3384
3345
  from: string;
3385
3346
  to: string;
3347
+ description?: string | undefined;
3386
3348
  max_iterations?: number | undefined;
3387
3349
  when?: string | {
3388
3350
  expr: string;
@@ -3390,6 +3352,12 @@ export declare function parseWorkflow(raw: unknown): {
3390
3352
  }[];
3391
3353
  entry: string;
3392
3354
  model?: string | undefined;
3355
+ decider?: {
3356
+ min_confidence?: number | undefined;
3357
+ mode?: undefined;
3358
+ provider?: undefined;
3359
+ min_margin?: number | undefined;
3360
+ } | undefined;
3393
3361
  permissions?: "write" | "read" | {
3394
3362
  strict?: boolean | undefined;
3395
3363
  deny?: ("shell" | "write" | "edit" | "net" | "subagent")[] | undefined;
@@ -3419,14 +3387,6 @@ export declare function parseWorkflow(raw: unknown): {
3419
3387
  spec_version?: string | undefined;
3420
3388
  workflow_type?: "pr_review" | "e2e_test" | "content_generation" | "monitor" | "data_sync" | "generic" | undefined;
3421
3389
  judge_budget?: number | undefined;
3422
- decider?: {
3423
- mode: "off" | "shadow";
3424
- provider?: {
3425
- model: string;
3426
- base_url: string;
3427
- api_key_env?: string | undefined;
3428
- } | undefined;
3429
- } | undefined;
3430
3390
  context_mode?: "full" | "bounded" | undefined;
3431
3391
  inputs?: Record<string, {
3432
3392
  type: "string" | "number" | "boolean" | "string[]";
@@ -3437,7 +3397,7 @@ export declare function parseWorkflow(raw: unknown): {
3437
3397
  }> | undefined;
3438
3398
  safe_outputs?: {
3439
3399
  staged?: boolean | undefined;
3440
- allow?: ("comment" | "issue" | "pr" | "label" | "issue_state")[] | undefined;
3400
+ allow?: ("label" | "comment" | "issue" | "pr" | "issue_state")[] | undefined;
3441
3401
  max?: number | undefined;
3442
3402
  trusted_actors?: string[] | undefined;
3443
3403
  trusted_associations?: ("OWNER" | "MEMBER" | "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIME_CONTRIBUTOR" | "FIRST_TIMER" | "NONE")[] | undefined;
@@ -3445,7 +3405,7 @@ export declare function parseWorkflow(raw: unknown): {
3445
3405
  } | undefined;
3446
3406
  };
3447
3407
  export interface WorkflowError {
3448
- code: "MISSING_ENTRY" | "UNKNOWN_EDGE_SOURCE" | "UNKNOWN_EDGE_TARGET" | "UNREACHABLE_NODE" | "UNKNOWN_SKILL" | "SELF_LOOP" | "UNBOUNDED_CYCLE" | "AMBIGUOUS_EDGES" | "UNSUPPORTED_EVAL_POLICY" | "INVALID_INLINE_SKILL" | "EDGE_ITERATIONS_EXCEEDED" | "RETRY_MAX_EXCEEDED" | "PERMISSION_CEILING" | "AGENT_ENV_READ_ONLY" | "BUDGET_CEILING" | "OUTPUT_NOT_ALLOWED" | "DUPLICATE_OUTPUT" | "UNSUPPORTED_OUTPUT" | "INVALID_WHEN_EXPRESSION" | "MIXED_EDGE_CONDITIONS";
3408
+ code: "MISSING_ENTRY" | "UNKNOWN_EDGE_SOURCE" | "UNKNOWN_EDGE_TARGET" | "UNREACHABLE_NODE" | "UNKNOWN_SKILL" | "SELF_LOOP" | "UNBOUNDED_CYCLE" | "AMBIGUOUS_EDGES" | "UNSUPPORTED_EVAL_POLICY" | "INVALID_INLINE_SKILL" | "EDGE_ITERATIONS_EXCEEDED" | "RETRY_MAX_EXCEEDED" | "PERMISSION_CEILING" | "AGENT_ENV_READ_ONLY" | "BUDGET_CEILING" | "OUTPUT_NOT_ALLOWED" | "DUPLICATE_OUTPUT" | "UNSUPPORTED_OUTPUT" | "INVALID_WHEN_EXPRESSION" | "MIXED_EDGE_CONDITIONS" | "DUPLICATE_EDGE";
3449
3409
  message: string;
3450
3410
  nodeId?: string;
3451
3411
  }
@@ -3725,46 +3685,24 @@ export declare const workflowJsonSchema: {
3725
3685
  };
3726
3686
  readonly Decider: {
3727
3687
  readonly type: "object";
3728
- readonly required: readonly ["mode"];
3729
3688
  readonly additionalProperties: false;
3730
- readonly description: "Decision model for route choices. 'shadow' asks it alongside the agent and logs whether they agree; the route is always the agent's. The workflow state goes only to provider.base_url, with no fallback.";
3689
+ readonly description: "Decision model thresholds for the nodes that set route_by: decider. The provider (URL, model, key) comes only from operator config (.sweny.yml or SWENY_DECIDER_* env), never from the workflow; 'provider' and the removed 'mode' key are rejected.";
3731
3690
  readonly properties: {
3732
- readonly mode: {
3733
- readonly type: "string";
3734
- readonly enum: readonly ["off", "shadow"];
3735
- };
3736
- readonly provider: {
3737
- readonly type: "object";
3738
- readonly required: readonly ["base_url", "model"];
3739
- readonly additionalProperties: false;
3740
- readonly properties: {
3741
- readonly base_url: {
3742
- readonly type: "string";
3743
- readonly format: "uri";
3744
- readonly description: "Server root serving POST /v1/systemone (Ollama or TypeSafe Jev).";
3745
- };
3746
- readonly model: {
3747
- readonly type: "string";
3748
- readonly minLength: 1;
3749
- };
3750
- readonly api_key_env: {
3751
- readonly type: "string";
3752
- readonly minLength: 1;
3753
- readonly description: "Env var holding the bearer key.";
3754
- };
3755
- };
3691
+ readonly min_confidence: {
3692
+ readonly type: "number";
3693
+ readonly minimum: 0.7;
3694
+ readonly maximum: 1;
3695
+ readonly default: 0.85;
3696
+ readonly description: "Accept the decider's answer only at or above this confidence.";
3756
3697
  };
3757
- };
3758
- readonly if: {
3759
- readonly properties: {
3760
- readonly mode: {
3761
- readonly const: "shadow";
3762
- };
3698
+ readonly min_margin: {
3699
+ readonly type: "number";
3700
+ readonly minimum: 0.1;
3701
+ readonly maximum: 1;
3702
+ readonly default: 0.2;
3703
+ readonly description: "Accept it only when the top label leads the runner-up by at least this much.";
3763
3704
  };
3764
3705
  };
3765
- readonly then: {
3766
- readonly required: readonly ["provider"];
3767
- };
3768
3706
  };
3769
3707
  readonly SafeOutput: {
3770
3708
  readonly type: "object";
@@ -3953,7 +3891,7 @@ export declare const workflowJsonSchema: {
3953
3891
  };
3954
3892
  readonly decider: {
3955
3893
  readonly $ref: "#/$defs/Decider";
3956
- readonly description: "Decision model for route choices (shadow mode only). Default: off.";
3894
+ readonly description: "Thresholds for the decision model that decides the routes of route_by: decider nodes when confident. Default: 0.85 confidence, 0.2 margin.";
3957
3895
  };
3958
3896
  readonly context_mode: {
3959
3897
  readonly type: "string";
@@ -4179,6 +4117,11 @@ export declare const workflowJsonSchema: {
4179
4117
  readonly enum: readonly ["halt", "continue"];
4180
4118
  readonly description: "What to do when this node finishes 'failed' (agent-level failure, or an eval failure that exhausted retries and was not softened by fail_soft). 'halt' (default) stops the workflow with the failure surfaced so a broken node never advances down a conditional edge; 'continue' preserves the legacy fall-through where routing proceeds from the failed node. Distinct from requires.on_fail (the pre-condition gate).";
4181
4119
  };
4120
+ readonly route_by: {
4121
+ readonly type: "string";
4122
+ readonly enum: readonly ["agent", "decider"];
4123
+ readonly description: "Who picks this node's natural-language route. 'agent' (default): the agent's route evaluation. 'decider': the operator's decision model first, the agent when it is not confident. Expressions always win over both; put safety conditions in expressions.";
4124
+ };
4182
4125
  readonly permissions: {
4183
4126
  readonly $ref: "#/$defs/Permissions";
4184
4127
  readonly description: "What this node's agent may do. Absent: read when the node declares outputs, else the workflow's permissions, else write.";
@@ -4327,6 +4270,11 @@ export declare const workflowJsonSchema: {
4327
4270
  };
4328
4271
  }];
4329
4272
  };
4273
+ readonly description: {
4274
+ readonly type: "string";
4275
+ readonly minLength: 1;
4276
+ readonly description: "The condition in natural language. For an { expr } edge, what the next rung reads when the expression cannot be evaluated because a field it needs is missing or invalid.";
4277
+ };
4330
4278
  readonly max_iterations: {
4331
4279
  readonly type: "integer";
4332
4280
  readonly minimum: 1;