@makaio/framework 1.0.0-dev-1783940945655 → 1.0.0-dev-1783973359164

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 (120) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapter-subsystem/index.d.mts +10 -0
  3. package/dist/adapter-subsystem/index.mjs +1 -1
  4. package/dist/authority-state-bootstrap-CEuKScnL.mjs +1 -0
  5. package/dist/bus/index.d.mts +31 -31
  6. package/dist/bus/index.mjs +1 -1
  7. package/dist/{canonical-model-CVRCW9h7.mjs → canonical-model-C31NaBJs.mjs} +1 -1
  8. package/dist/clients/index.d.mts +5 -5
  9. package/dist/contracts/adapter/index.d.mts +2 -2
  10. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  11. package/dist/contracts/canonical-model/index.d.mts +1 -1
  12. package/dist/contracts/canonical-model/index.mjs +1 -1
  13. package/dist/contracts/client/index.d.mts +1 -1
  14. package/dist/contracts/extension/index.d.mts +2 -2
  15. package/dist/contracts/facet/index.d.mts +1 -1
  16. package/dist/contracts/index.d.mts +228 -160
  17. package/dist/contracts/index.mjs +1 -1
  18. package/dist/contracts/native-session-supervisor/index.d.mts +2 -2
  19. package/dist/contracts/session/index.d.mts +3 -3
  20. package/dist/contracts/shared/index.d.mts +1 -1
  21. package/dist/contracts/variant/index.d.mts +1 -1
  22. package/dist/contracts/workflow/index.d.mts +3 -3
  23. package/dist/contracts/workflow/index.mjs +1 -1
  24. package/dist/{detached-extension-handle-CTaQoolf.mjs → detached-extension-handle-vDK194QV.mjs} +1 -1
  25. package/dist/drizzle/0026_m_mrgvi7fq.sql +16 -0
  26. package/dist/drizzle/0027_m_mrgw0uzg.sql +1 -0
  27. package/dist/drizzle/0028_m_mrgx04i1.sql +1 -0
  28. package/dist/drizzle/0029_terminal-authority.sql +1 -0
  29. package/dist/drizzle/meta/_journal.json +28 -0
  30. package/dist/{index-Do7Wgio_2.d.mts → index-BDr2Ba122.d.mts} +1 -1
  31. package/dist/{index-p6dWV52m.d.mts → index-BKZAAWo2.d.mts} +330 -330
  32. package/dist/{index-CB2XTzvd.d.mts → index-Bbr5LEUc.d.mts} +1 -1
  33. package/dist/{index-5s_dN3cg2.d.mts → index-BmsPH78f2.d.mts} +33 -5
  34. package/dist/{index-BsEvzFey.d.mts → index-ButbwvVY.d.mts} +6 -6
  35. package/dist/{index-D5IEq4_E.d.mts → index-C2C1qH1Y.d.mts} +6 -4
  36. package/dist/{index-BtL7ONuM.d.mts → index-C6LZOiDv.d.mts} +149 -1
  37. package/dist/{index-DxatNFz7.d.mts → index-COC9jCdc.d.mts} +12 -12
  38. package/dist/{index-BcejR1Jc.d.mts → index-CtjLeK1F.d.mts} +1 -1
  39. package/dist/{index-Cw3cjGAT.d.mts → index-Cx8jGKOs.d.mts} +11 -11
  40. package/dist/{index-DNc1yLQs.d.mts → index-DHGW7dFf.d.mts} +8 -8
  41. package/dist/{index-DlUPWOh4.d.mts → index-DNkR5yTY.d.mts} +2876 -709
  42. package/dist/{index-iJP-l15K.d.mts → index-DXBiCH2y.d.mts} +27 -1
  43. package/dist/{index-CW6-0k3Z.d.mts → index-DlAfs3RD.d.mts} +105 -105
  44. package/dist/{index-sCOlgPyj.d.mts → index-DpZbaS7y.d.mts} +388 -388
  45. package/dist/{index-C9Q1E8Y-.d.mts → index-x2gFj3BK.d.mts} +38 -38
  46. package/dist/kernel/extension/index.d.mts +1 -1
  47. package/dist/kernel/index.d.mts +2 -2
  48. package/dist/kernel/observability/index.d.mts +1 -1
  49. package/dist/{load-extensions-BtUrq2_t.mjs → load-extensions-nqL5WAKj.mjs} +1 -1
  50. package/dist/mcp-http-server/index.d.mts +27 -90
  51. package/dist/mcp-http-server/index.mjs +1 -1
  52. package/dist/{namespace-CQBSXm1U.d.mts → namespace-B0uZIZYT.d.mts} +20 -20
  53. package/dist/{namespace-CfgtqUWS.d.mts → namespace-BoA6u44C.d.mts} +156 -156
  54. package/dist/{namespace-CpyL93kW.d.mts → namespace-CCZXyxSe.d.mts} +9 -9
  55. package/dist/{namespace-D3SQQgxa2.d.mts → namespace-CukqFYHf2.d.mts} +1 -1
  56. package/dist/{namespace-CGgOLxiW2.d.mts → namespace-rO-C2Dgu2.d.mts} +2 -2
  57. package/dist/package-BYpWkSuQ.mjs +1 -0
  58. package/dist/package-CsFFT9iR.mjs +7 -0
  59. package/dist/{package-CdBiknf3.d.mts → package-DG9GSY8M.d.mts} +52 -1
  60. package/dist/package.json +1 -1
  61. package/dist/rules/index.mjs +1 -1
  62. package/dist/runtime-node/extension-validation.mjs +1 -1
  63. package/dist/runtime-node/index.d.mts +4 -89
  64. package/dist/runtime-node/index.mjs +24 -24
  65. package/dist/runtime-node/makaio-config.mjs +1 -1
  66. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  67. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  68. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  69. package/dist/{schema-BnTOFCdU.d.mts → schema-aOwmHxaF.d.mts} +1 -1
  70. package/dist/{schemas--uwN5dfK2.d.mts → schemas-CoJCTFod2.d.mts} +19 -19
  71. package/dist/{schemas-C17AifUQ.d.mts → schemas-OaBqeEUT.d.mts} +156 -156
  72. package/dist/schemas-th_nuC5t.mjs +1 -0
  73. package/dist/service-base/index.d.mts +4 -3
  74. package/dist/service-base/index.mjs +1 -1
  75. package/dist/services/agent-runtime/index.d.mts +2 -2
  76. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  77. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  78. package/dist/services/context-rules/index.d.mts +3 -3
  79. package/dist/services/execution-target/index.d.mts +1 -1
  80. package/dist/services/filesystem/namespace.d.mts +6 -6
  81. package/dist/services/filesystem/schemas.d.mts +3 -3
  82. package/dist/services/index.d.mts +104 -104
  83. package/dist/services/index.mjs +1 -1
  84. package/dist/services/session/index.d.mts +5 -5
  85. package/dist/services/session/messages/namespace.d.mts +1 -1
  86. package/dist/services/session/session-events/namespace.d.mts +1 -1
  87. package/dist/services/session/storage/namespace.d.mts +1 -1
  88. package/dist/services/session/storage/schema.d.mts +1 -1
  89. package/dist/services/settings/namespace.d.mts +16 -16
  90. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  91. package/dist/services/subagent/index.d.mts +2 -2
  92. package/dist/services/subagent/index.mjs +1 -1
  93. package/dist/services/subagent-template/index.d.mts +2 -2
  94. package/dist/services/subagent-template/namespace.d.mts +1 -1
  95. package/dist/services/subagent-template/schemas.d.mts +1 -1
  96. package/dist/services/tools/index.mjs +1 -1
  97. package/dist/{session-lineage-BLw8iWAj.d.mts → session-lineage-YShrn77v.d.mts} +1 -1
  98. package/dist/storage/drizzle/index.d.mts +8 -1
  99. package/dist/storage/drizzle/index.mjs +1 -1
  100. package/dist/tools/index.d.mts +1 -1
  101. package/dist/{tools-C8vqn1KY.mjs → tools-PC_L6g2m.mjs} +1 -1
  102. package/dist/{transition-Bfe8VVc1.d.mts → transition-CwUIm1hJ.d.mts} +8 -0
  103. package/dist/{types-q95p55BF.d.mts → types-BaDYigzD.d.mts} +567 -256
  104. package/dist/workflow-DFJYGjq_.mjs +1 -0
  105. package/dist/workflow-engine/index.d.mts +690 -87
  106. package/dist/workflow-engine/index.mjs +1 -1
  107. package/dist/workflow-engine/package.d.mts +1 -1
  108. package/dist/workflow-engine/package.mjs +1 -1
  109. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  110. package/dist/workflow-worker-BEFjCccX.mjs +1 -0
  111. package/package.json +9 -8
  112. package/dist/loop-gate-handlers-0a3dIY8O.mjs +0 -1
  113. package/dist/package-0gVhAVkO.mjs +0 -7
  114. package/dist/package-BwvGaKwn.mjs +0 -1
  115. package/dist/schemas-D6lj9NMg.mjs +0 -1
  116. package/dist/workflow-CvVAZ89A.mjs +0 -1
  117. package/dist/workflow-worker-CudfEstp.mjs +0 -1
  118. /package/dist/{await-trigger-D623tvig.mjs → await-trigger-DP-fTQc4.mjs} +0 -0
  119. /package/dist/{descriptor-to-package-D5SWf6TL.mjs → descriptor-to-package-Rs-OjOQU.mjs} +0 -0
  120. /package/dist/{esm-oHhRYTEn.mjs → esm-C_WW4-pP.mjs} +0 -0
@@ -173,12 +173,12 @@ type WorkflowSourceLocation = z.infer<typeof WorkflowSourceLocationSchema>;
173
173
  * - `sequence` — ordered list of child nodes (the structural container)
174
174
  */
175
175
  declare const WorkflowNodeTypeSchema: z.ZodEnum<{
176
+ sequence: "sequence";
176
177
  station: "station";
177
178
  "delegate-agent": "delegate-agent";
178
179
  "delegate-role": "delegate-role";
179
- sequence: "sequence";
180
- gate: "gate";
181
180
  parallel: "parallel";
181
+ gate: "gate";
182
182
  iterate: "iterate";
183
183
  "iterate-chain": "iterate-chain";
184
184
  loop: "loop";
@@ -318,6 +318,12 @@ declare const WorkflowDelegateAgentNodeSchema: z.ZodObject<{
318
318
  agentId: z.ZodString;
319
319
  inputExpression: z.ZodOptional<z.ZodString>;
320
320
  outputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
321
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
322
+ completion: z.ZodOptional<z.ZodEnum<{
323
+ tool: "tool";
324
+ turn: "turn";
325
+ }>>;
326
+ resultFinalizerId: z.ZodOptional<z.ZodString>;
321
327
  }, z.core.$strip>;
322
328
  type WorkflowDelegateAgentNode = z.infer<typeof WorkflowDelegateAgentNodeSchema>;
323
329
  /**
@@ -344,6 +350,8 @@ declare const WorkflowDelegateRoleNodeSchema: z.ZodObject<{
344
350
  role: z.ZodString;
345
351
  prompt: z.ZodString;
346
352
  outputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
353
+ allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
354
+ resultFinalizerId: z.ZodOptional<z.ZodString>;
347
355
  timeoutMs: z.ZodOptional<z.ZodNumber>;
348
356
  completion: z.ZodOptional<z.ZodEnum<{
349
357
  tool: "tool";
@@ -812,6 +820,7 @@ declare const WorkflowDefinitionSchema$1: z.ZodObject<{
812
820
  syncedAt: z.ZodOptional<z.ZodString>;
813
821
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
814
822
  }, z.core.$strict>], "kind">>;
823
+ successFinalizerId: z.ZodOptional<z.ZodString>;
815
824
  executionHints: z.ZodOptional<z.ZodObject<{
816
825
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
817
826
  kind: z.ZodLiteral<"path">;
@@ -845,9 +854,10 @@ declare const ExecutionStatusSchema$1: z.ZodEnum<{
845
854
  pending: "pending";
846
855
  completed: "completed";
847
856
  cancelled: "cancelled";
848
- running: "running";
849
857
  failed: "failed";
858
+ running: "running";
850
859
  paused: "paused";
860
+ finalizing: "finalizing";
851
861
  }>;
852
862
  type ExecutionStatus = z.infer<typeof ExecutionStatusSchema$1>;
853
863
  /**
@@ -861,9 +871,10 @@ declare const WorkflowExecutionSchema$1: z.ZodObject<{
861
871
  pending: "pending";
862
872
  completed: "completed";
863
873
  cancelled: "cancelled";
864
- running: "running";
865
874
  failed: "failed";
875
+ running: "running";
866
876
  paused: "paused";
877
+ finalizing: "finalizing";
867
878
  }>;
868
879
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
869
880
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -890,7 +901,7 @@ declare const WorkflowExecutionSchema$1: z.ZodObject<{
890
901
  id: z.ZodString;
891
902
  }, z.core.$strip>>;
892
903
  }, z.core.$strip>;
893
- type WorkflowExecution = z.infer<typeof WorkflowExecutionSchema$1>;
904
+ type WorkflowExecution$1 = z.infer<typeof WorkflowExecutionSchema$1>;
894
905
  /**
895
906
  * Runtime state of a single execution frame.
896
907
  *
@@ -902,12 +913,12 @@ declare const WorkflowFrameStateSchema$1: z.ZodObject<{
902
913
  frameId: z.ZodString;
903
914
  nodeId: z.ZodString;
904
915
  nodeType: z.ZodEnum<{
916
+ sequence: "sequence";
905
917
  station: "station";
906
918
  "delegate-agent": "delegate-agent";
907
919
  "delegate-role": "delegate-role";
908
- sequence: "sequence";
909
- gate: "gate";
910
920
  parallel: "parallel";
921
+ gate: "gate";
911
922
  iterate: "iterate";
912
923
  "iterate-chain": "iterate-chain";
913
924
  loop: "loop";
@@ -918,10 +929,10 @@ declare const WorkflowFrameStateSchema$1: z.ZodObject<{
918
929
  pending: "pending";
919
930
  completed: "completed";
920
931
  cancelled: "cancelled";
921
- running: "running";
922
932
  failed: "failed";
923
- skipped: "skipped";
933
+ running: "running";
924
934
  waiting: "waiting";
935
+ skipped: "skipped";
925
936
  }>;
926
937
  attempt: z.ZodDefault<z.ZodNumber>;
927
938
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -936,8 +947,8 @@ type WorkflowFrameState$1 = z.infer<typeof WorkflowFrameStateSchema$1>;
936
947
  declare const WorkflowGateStatusSchema: z.ZodEnum<{
937
948
  cancelled: "cancelled";
938
949
  rejected: "rejected";
939
- resumed: "resumed";
940
950
  waiting: "waiting";
951
+ resumed: "resumed";
941
952
  "timed-out": "timed-out";
942
953
  }>;
943
954
  type WorkflowGateStatus = z.infer<typeof WorkflowGateStatusSchema>;
@@ -957,8 +968,8 @@ declare const WorkflowGateInstanceSchema$1: z.ZodObject<{
957
968
  status: z.ZodEnum<{
958
969
  cancelled: "cancelled";
959
970
  rejected: "rejected";
960
- resumed: "resumed";
961
971
  waiting: "waiting";
972
+ resumed: "resumed";
962
973
  "timed-out": "timed-out";
963
974
  }>;
964
975
  autoAction: z.ZodEnum<{
@@ -982,6 +993,7 @@ type WorkflowGateInstance = z.infer<typeof WorkflowGateInstanceSchema$1>;
982
993
  */
983
994
  declare const WorkflowResolvedRoleSchema: z.ZodObject<{
984
995
  adapterName: z.ZodString;
996
+ providerConfigId: z.ZodOptional<z.ZodString>;
985
997
  model: z.ZodOptional<z.ZodString>;
986
998
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
987
999
  none: "none";
@@ -993,8 +1005,8 @@ declare const WorkflowResolvedRoleSchema: z.ZodObject<{
993
1005
  harnessId: z.ZodOptional<z.ZodString>;
994
1006
  systemPrompt: z.ZodOptional<z.ZodString>;
995
1007
  contextMode: z.ZodOptional<z.ZodEnum<{
996
- fresh: "fresh";
997
1008
  fork: "fork";
1009
+ fresh: "fresh";
998
1010
  }>>;
999
1011
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1000
1012
  state: z.ZodLiteral<"resolved">;
@@ -1072,6 +1084,10 @@ declare const WorkflowResolvedRoleSchema: z.ZodObject<{
1072
1084
  }, z.core.$strict>, z.ZodObject<{
1073
1085
  state: z.ZodLiteral<"unresolved">;
1074
1086
  }, z.core.$strict>], "state">>;
1087
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
1088
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1089
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1090
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
1075
1091
  completion: z.ZodOptional<z.ZodEnum<{
1076
1092
  tool: "tool";
1077
1093
  turn: "turn";
@@ -1088,6 +1104,7 @@ type WorkflowResolvedRole = z.infer<typeof WorkflowResolvedRoleSchema>;
1088
1104
  */
1089
1105
  declare const WorkflowResolvedAgentSchema: z.ZodObject<{
1090
1106
  adapterName: z.ZodString;
1107
+ providerConfigId: z.ZodOptional<z.ZodString>;
1091
1108
  model: z.ZodOptional<z.ZodString>;
1092
1109
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
1093
1110
  none: "none";
@@ -1099,8 +1116,8 @@ declare const WorkflowResolvedAgentSchema: z.ZodObject<{
1099
1116
  harnessId: z.ZodOptional<z.ZodString>;
1100
1117
  systemPrompt: z.ZodOptional<z.ZodString>;
1101
1118
  contextMode: z.ZodOptional<z.ZodEnum<{
1102
- fresh: "fresh";
1103
1119
  fork: "fork";
1120
+ fresh: "fresh";
1104
1121
  }>>;
1105
1122
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1106
1123
  state: z.ZodLiteral<"resolved">;
@@ -1178,6 +1195,10 @@ declare const WorkflowResolvedAgentSchema: z.ZodObject<{
1178
1195
  }, z.core.$strict>, z.ZodObject<{
1179
1196
  state: z.ZodLiteral<"unresolved">;
1180
1197
  }, z.core.$strict>], "state">>;
1198
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
1199
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1200
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1201
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
1181
1202
  completion: z.ZodOptional<z.ZodEnum<{
1182
1203
  tool: "tool";
1183
1204
  turn: "turn";
@@ -1246,9 +1267,10 @@ declare const ExecutionListQuerySchema$1: z.ZodObject<{
1246
1267
  pending: "pending";
1247
1268
  completed: "completed";
1248
1269
  cancelled: "cancelled";
1249
- running: "running";
1250
1270
  failed: "failed";
1271
+ running: "running";
1251
1272
  paused: "paused";
1273
+ finalizing: "finalizing";
1252
1274
  }>>;
1253
1275
  artifactRef: z.ZodOptional<z.ZodObject<{
1254
1276
  kind: z.ZodString;
@@ -1297,14 +1319,353 @@ declare const GateInstanceListQuerySchema$1: z.ZodObject<{
1297
1319
  status: z.ZodOptional<z.ZodEnum<{
1298
1320
  cancelled: "cancelled";
1299
1321
  rejected: "rejected";
1300
- resumed: "resumed";
1301
1322
  waiting: "waiting";
1323
+ resumed: "resumed";
1302
1324
  "timed-out": "timed-out";
1303
1325
  }>>;
1304
1326
  limit: z.ZodDefault<z.ZodNumber>;
1305
1327
  }, z.core.$strip>;
1306
1328
  type GateInstanceListQuery = z.infer<typeof GateInstanceListQuerySchema$1>;
1307
1329
  //#endregion
1330
+ //#region core/contracts/src/workflow/finalization.d.ts
1331
+ /** Terminal execution states accepted by the finalization protocol. */
1332
+ declare const WorkflowTerminalStatusSchema: z.ZodEnum<{
1333
+ completed: "completed";
1334
+ cancelled: "cancelled";
1335
+ failed: "failed";
1336
+ }>;
1337
+ /** Durable terminal state selected before lifecycle finalizers run. */
1338
+ declare const WorkflowFinalizationIntentSchema: z.ZodObject<{
1339
+ status: z.ZodEnum<{
1340
+ completed: "completed";
1341
+ cancelled: "cancelled";
1342
+ failed: "failed";
1343
+ }>;
1344
+ completedAt: z.ZodNumber;
1345
+ error: z.ZodOptional<z.ZodString>;
1346
+ reason: z.ZodOptional<z.ZodString>;
1347
+ }, z.core.$strict>;
1348
+ /** Durable claim delivered to one registered workflow finalizer. */
1349
+ declare const WorkflowFinalizationClaimSchema$1: z.ZodObject<{
1350
+ executionId: z.ZodString;
1351
+ workflowId: z.ZodString;
1352
+ finalizerId: z.ZodString;
1353
+ transitionKey: z.ZodString;
1354
+ claimToken: z.ZodString;
1355
+ intent: z.ZodObject<{
1356
+ status: z.ZodEnum<{
1357
+ completed: "completed";
1358
+ cancelled: "cancelled";
1359
+ failed: "failed";
1360
+ }>;
1361
+ completedAt: z.ZodNumber;
1362
+ error: z.ZodOptional<z.ZodString>;
1363
+ reason: z.ZodOptional<z.ZodString>;
1364
+ }, z.core.$strict>;
1365
+ claimedAt: z.ZodNumber;
1366
+ }, z.core.$strict>;
1367
+ type WorkflowTerminalStatus = z.infer<typeof WorkflowTerminalStatusSchema>;
1368
+ type WorkflowFinalizationIntent = z.infer<typeof WorkflowFinalizationIntentSchema>;
1369
+ type WorkflowFinalizationClaim = z.infer<typeof WorkflowFinalizationClaimSchema$1>;
1370
+ /** Result returned after a finalizer durably accepts one transition for processing. */
1371
+ declare const WorkflowFinalizationDeliveryResultSchema: z.ZodObject<{
1372
+ accepted: z.ZodBoolean;
1373
+ }, z.core.$strict>;
1374
+ /** Stable identity for a workflow lifecycle finalizer. */
1375
+ declare const WorkflowFinalizerIdSchema$1: z.ZodString;
1376
+ /** Stable identity for a workflow lifecycle finalizer. */
1377
+ type WorkflowFinalizerId = z.infer<typeof WorkflowFinalizerIdSchema$1>;
1378
+ /** Stable identity for an authority-owned delegate result finalizer. */
1379
+ declare const WorkflowDelegateResultFinalizerIdSchema: z.ZodString;
1380
+ /**
1381
+ * Runtime evidence available to an authority-owned delegate result finalizer.
1382
+ *
1383
+ * The workflow runtime currently has no subagent-scoped successful tool-call
1384
+ * ledger. It therefore always sends an empty list until that evidence is
1385
+ * explicitly made available by the subagent contract.
1386
+ */
1387
+ declare const WorkflowDelegateToolObservationSchema: z.ZodObject<{
1388
+ toolName: z.ZodString;
1389
+ outcome: z.ZodOptional<z.ZodEnum<{
1390
+ success: "success";
1391
+ failure: "failure";
1392
+ }>>;
1393
+ artifact: z.ZodOptional<z.ZodObject<{
1394
+ kind: z.ZodString;
1395
+ id: z.ZodString;
1396
+ revision: z.ZodString;
1397
+ }, z.core.$strict>>;
1398
+ }, z.core.$strict>;
1399
+ type WorkflowDelegateToolObservation = z.infer<typeof WorkflowDelegateToolObservationSchema>;
1400
+ /** Non-secret runtime economics and binding evidence for one successful delegate. */
1401
+ declare const WorkflowDelegateEconomicsSchema: z.ZodObject<{
1402
+ durationMs: z.ZodNumber;
1403
+ inputTokens: z.ZodOptional<z.ZodNumber>;
1404
+ outputTokens: z.ZodOptional<z.ZodNumber>;
1405
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1406
+ toolCallCount: z.ZodOptional<z.ZodNumber>;
1407
+ binding: z.ZodObject<{
1408
+ adapterName: z.ZodString;
1409
+ providerConfigId: z.ZodOptional<z.ZodString>;
1410
+ providerDefinitionId: z.ZodOptional<z.ZodString>;
1411
+ model: z.ZodOptional<z.ZodString>;
1412
+ auth: z.ZodOptional<z.ZodObject<{
1413
+ mode: z.ZodEnum<{
1414
+ explicit: "explicit";
1415
+ inferred: "inferred";
1416
+ none: "none";
1417
+ }>;
1418
+ owner: z.ZodEnum<{
1419
+ provider: "provider";
1420
+ client: "client";
1421
+ }>;
1422
+ methodId: z.ZodString;
1423
+ }, z.core.$strict>>;
1424
+ }, z.core.$strict>;
1425
+ }, z.core.$strict>;
1426
+ /** Authority request that finalizes one successful delegate result before frame persistence. */
1427
+ declare const WorkflowDelegateResultFinalizationRequestSchema: z.ZodObject<{
1428
+ executionId: z.ZodString;
1429
+ workflowId: z.ZodString;
1430
+ frameId: z.ZodString;
1431
+ nodeId: z.ZodString;
1432
+ nodeType: z.ZodEnum<{
1433
+ "delegate-agent": "delegate-agent";
1434
+ "delegate-role": "delegate-role";
1435
+ }>;
1436
+ rawResult: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
1437
+ toolObservations: z.ZodArray<z.ZodObject<{
1438
+ toolName: z.ZodString;
1439
+ outcome: z.ZodOptional<z.ZodEnum<{
1440
+ success: "success";
1441
+ failure: "failure";
1442
+ }>>;
1443
+ artifact: z.ZodOptional<z.ZodObject<{
1444
+ kind: z.ZodString;
1445
+ id: z.ZodString;
1446
+ revision: z.ZodString;
1447
+ }, z.core.$strict>>;
1448
+ }, z.core.$strict>>;
1449
+ economics: z.ZodOptional<z.ZodObject<{
1450
+ durationMs: z.ZodNumber;
1451
+ inputTokens: z.ZodOptional<z.ZodNumber>;
1452
+ outputTokens: z.ZodOptional<z.ZodNumber>;
1453
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1454
+ toolCallCount: z.ZodOptional<z.ZodNumber>;
1455
+ binding: z.ZodObject<{
1456
+ adapterName: z.ZodString;
1457
+ providerConfigId: z.ZodOptional<z.ZodString>;
1458
+ providerDefinitionId: z.ZodOptional<z.ZodString>;
1459
+ model: z.ZodOptional<z.ZodString>;
1460
+ auth: z.ZodOptional<z.ZodObject<{
1461
+ mode: z.ZodEnum<{
1462
+ explicit: "explicit";
1463
+ inferred: "inferred";
1464
+ none: "none";
1465
+ }>;
1466
+ owner: z.ZodEnum<{
1467
+ provider: "provider";
1468
+ client: "client";
1469
+ }>;
1470
+ methodId: z.ZodString;
1471
+ }, z.core.$strict>>;
1472
+ }, z.core.$strict>;
1473
+ }, z.core.$strict>>;
1474
+ }, z.core.$strict>;
1475
+ /** Authority response containing the durable delegate frame output. */
1476
+ declare const WorkflowDelegateResultFinalizationResponseSchema: z.ZodObject<{
1477
+ output: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
1478
+ }, z.core.$strict>;
1479
+ type WorkflowDelegateResultFinalizationRequest = z.infer<typeof WorkflowDelegateResultFinalizationRequestSchema>;
1480
+ type WorkflowDelegateEconomics = z.infer<typeof WorkflowDelegateEconomicsSchema>;
1481
+ type WorkflowDelegateResultFinalizationResponse = z.infer<typeof WorkflowDelegateResultFinalizationResponseSchema>;
1482
+ /**
1483
+ * Create the bus namespace owned by a workflow lifecycle finalizer.
1484
+ *
1485
+ * The engine may replay `finalize` with the same transition key and claim token
1486
+ * until storage acknowledges it. `{ accepted: true }` only confirms durable
1487
+ * acceptance; implementations must call `acknowledgeFinalization` or
1488
+ * `failFinalization` to settle the terminal transition.
1489
+ * @param finalizerId - Stable finalizer identity used for durable recovery ownership.
1490
+ * @returns Dynamic namespace and typed subjects for the finalizer.
1491
+ */
1492
+ declare function createWorkflowFinalizerNamespace$1(finalizerId: string): {
1493
+ namespaceDomain: string;
1494
+ namespace: _$_makaio_core0.BusNamespaceDefinition<string, {
1495
+ finalize: {
1496
+ request: z.ZodObject<{
1497
+ executionId: z.ZodString;
1498
+ workflowId: z.ZodString;
1499
+ finalizerId: z.ZodString;
1500
+ transitionKey: z.ZodString;
1501
+ claimToken: z.ZodString;
1502
+ intent: z.ZodObject<{
1503
+ status: z.ZodEnum<{
1504
+ completed: "completed";
1505
+ cancelled: "cancelled";
1506
+ failed: "failed";
1507
+ }>;
1508
+ completedAt: z.ZodNumber;
1509
+ error: z.ZodOptional<z.ZodString>;
1510
+ reason: z.ZodOptional<z.ZodString>;
1511
+ }, z.core.$strict>;
1512
+ claimedAt: z.ZodNumber;
1513
+ }, z.core.$strict>;
1514
+ response: z.ZodObject<{
1515
+ accepted: z.ZodBoolean;
1516
+ }, z.core.$strict>;
1517
+ };
1518
+ }>;
1519
+ subjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<string, {
1520
+ finalize: {
1521
+ request: z.ZodObject<{
1522
+ executionId: z.ZodString;
1523
+ workflowId: z.ZodString;
1524
+ finalizerId: z.ZodString;
1525
+ transitionKey: z.ZodString;
1526
+ claimToken: z.ZodString;
1527
+ intent: z.ZodObject<{
1528
+ status: z.ZodEnum<{
1529
+ completed: "completed";
1530
+ cancelled: "cancelled";
1531
+ failed: "failed";
1532
+ }>;
1533
+ completedAt: z.ZodNumber;
1534
+ error: z.ZodOptional<z.ZodString>;
1535
+ reason: z.ZodOptional<z.ZodString>;
1536
+ }, z.core.$strict>;
1537
+ claimedAt: z.ZodNumber;
1538
+ }, z.core.$strict>;
1539
+ response: z.ZodObject<{
1540
+ accepted: z.ZodBoolean;
1541
+ }, z.core.$strict>;
1542
+ };
1543
+ }>, string>;
1544
+ };
1545
+ /**
1546
+ * Create the bus namespace owned by a delegate result finalizer.
1547
+ *
1548
+ * The worker calls this RPC only after a delegate completes successfully and
1549
+ * before its frame output is persisted or merged into downstream aggregation.
1550
+ * A rejection is a delegate failure; the runtime deliberately does not retry
1551
+ * the request because finalizers may have externally visible side effects.
1552
+ * @param finalizerId - Stable selector serialized on a delegate node.
1553
+ * @returns Dynamic namespace and typed finalization subject.
1554
+ */
1555
+ declare function createWorkflowDelegateResultFinalizerNamespace$1(finalizerId: string): {
1556
+ namespaceDomain: string;
1557
+ namespace: _$_makaio_core0.BusNamespaceDefinition<string, {
1558
+ finalize: {
1559
+ request: z.ZodObject<{
1560
+ executionId: z.ZodString;
1561
+ workflowId: z.ZodString;
1562
+ frameId: z.ZodString;
1563
+ nodeId: z.ZodString;
1564
+ nodeType: z.ZodEnum<{
1565
+ "delegate-agent": "delegate-agent";
1566
+ "delegate-role": "delegate-role";
1567
+ }>;
1568
+ rawResult: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
1569
+ toolObservations: z.ZodArray<z.ZodObject<{
1570
+ toolName: z.ZodString;
1571
+ outcome: z.ZodOptional<z.ZodEnum<{
1572
+ success: "success";
1573
+ failure: "failure";
1574
+ }>>;
1575
+ artifact: z.ZodOptional<z.ZodObject<{
1576
+ kind: z.ZodString;
1577
+ id: z.ZodString;
1578
+ revision: z.ZodString;
1579
+ }, z.core.$strict>>;
1580
+ }, z.core.$strict>>;
1581
+ economics: z.ZodOptional<z.ZodObject<{
1582
+ durationMs: z.ZodNumber;
1583
+ inputTokens: z.ZodOptional<z.ZodNumber>;
1584
+ outputTokens: z.ZodOptional<z.ZodNumber>;
1585
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1586
+ toolCallCount: z.ZodOptional<z.ZodNumber>;
1587
+ binding: z.ZodObject<{
1588
+ adapterName: z.ZodString;
1589
+ providerConfigId: z.ZodOptional<z.ZodString>;
1590
+ providerDefinitionId: z.ZodOptional<z.ZodString>;
1591
+ model: z.ZodOptional<z.ZodString>;
1592
+ auth: z.ZodOptional<z.ZodObject<{
1593
+ mode: z.ZodEnum<{
1594
+ explicit: "explicit";
1595
+ inferred: "inferred";
1596
+ none: "none";
1597
+ }>;
1598
+ owner: z.ZodEnum<{
1599
+ provider: "provider";
1600
+ client: "client";
1601
+ }>;
1602
+ methodId: z.ZodString;
1603
+ }, z.core.$strict>>;
1604
+ }, z.core.$strict>;
1605
+ }, z.core.$strict>>;
1606
+ }, z.core.$strict>;
1607
+ response: z.ZodObject<{
1608
+ output: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
1609
+ }, z.core.$strict>;
1610
+ };
1611
+ }>;
1612
+ subjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<string, {
1613
+ finalize: {
1614
+ request: z.ZodObject<{
1615
+ executionId: z.ZodString;
1616
+ workflowId: z.ZodString;
1617
+ frameId: z.ZodString;
1618
+ nodeId: z.ZodString;
1619
+ nodeType: z.ZodEnum<{
1620
+ "delegate-agent": "delegate-agent";
1621
+ "delegate-role": "delegate-role";
1622
+ }>;
1623
+ rawResult: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
1624
+ toolObservations: z.ZodArray<z.ZodObject<{
1625
+ toolName: z.ZodString;
1626
+ outcome: z.ZodOptional<z.ZodEnum<{
1627
+ success: "success";
1628
+ failure: "failure";
1629
+ }>>;
1630
+ artifact: z.ZodOptional<z.ZodObject<{
1631
+ kind: z.ZodString;
1632
+ id: z.ZodString;
1633
+ revision: z.ZodString;
1634
+ }, z.core.$strict>>;
1635
+ }, z.core.$strict>>;
1636
+ economics: z.ZodOptional<z.ZodObject<{
1637
+ durationMs: z.ZodNumber;
1638
+ inputTokens: z.ZodOptional<z.ZodNumber>;
1639
+ outputTokens: z.ZodOptional<z.ZodNumber>;
1640
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1641
+ toolCallCount: z.ZodOptional<z.ZodNumber>;
1642
+ binding: z.ZodObject<{
1643
+ adapterName: z.ZodString;
1644
+ providerConfigId: z.ZodOptional<z.ZodString>;
1645
+ providerDefinitionId: z.ZodOptional<z.ZodString>;
1646
+ model: z.ZodOptional<z.ZodString>;
1647
+ auth: z.ZodOptional<z.ZodObject<{
1648
+ mode: z.ZodEnum<{
1649
+ explicit: "explicit";
1650
+ inferred: "inferred";
1651
+ none: "none";
1652
+ }>;
1653
+ owner: z.ZodEnum<{
1654
+ provider: "provider";
1655
+ client: "client";
1656
+ }>;
1657
+ methodId: z.ZodString;
1658
+ }, z.core.$strict>>;
1659
+ }, z.core.$strict>;
1660
+ }, z.core.$strict>>;
1661
+ }, z.core.$strict>;
1662
+ response: z.ZodObject<{
1663
+ output: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
1664
+ }, z.core.$strict>;
1665
+ };
1666
+ }>, string>;
1667
+ };
1668
+ //#endregion
1308
1669
  //#region core/contracts/src/workflow/trigger-type-registry.d.ts
1309
1670
  interface WorkflowTriggerTypeRecord {
1310
1671
  /** Globally unique trigger type string. */
@@ -1600,8 +1961,8 @@ interface IStepRunner {
1600
1961
  */
1601
1962
  declare const SpanStatusSchema: z.ZodEnum<{
1602
1963
  completed: "completed";
1603
- running: "running";
1604
1964
  failed: "failed";
1965
+ running: "running";
1605
1966
  skipped: "skipped";
1606
1967
  }>;
1607
1968
  type SpanStatus = z.infer<typeof SpanStatusSchema>;
@@ -1625,8 +1986,8 @@ declare const SpanRecordSchema$1: z.ZodObject<{
1625
1986
  }>;
1626
1987
  status: z.ZodEnum<{
1627
1988
  completed: "completed";
1628
- running: "running";
1629
1989
  failed: "failed";
1990
+ running: "running";
1630
1991
  skipped: "skipped";
1631
1992
  }>;
1632
1993
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -2062,6 +2423,7 @@ declare const WorkflowSchemas: {
2062
2423
  syncedAt: z.ZodOptional<z.ZodString>;
2063
2424
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2064
2425
  }, z.core.$strict>], "kind">>;
2426
+ successFinalizerId: z.ZodOptional<z.ZodString>;
2065
2427
  executionHints: z.ZodOptional<z.ZodObject<{
2066
2428
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2067
2429
  kind: z.ZodLiteral<"path">;
@@ -2178,6 +2540,7 @@ declare const WorkflowSchemas: {
2178
2540
  syncedAt: z.ZodOptional<z.ZodString>;
2179
2541
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2180
2542
  }, z.core.$strict>], "kind">>;
2543
+ successFinalizerId: z.ZodOptional<z.ZodString>;
2181
2544
  executionHints: z.ZodOptional<z.ZodObject<{
2182
2545
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2183
2546
  kind: z.ZodLiteral<"path">;
@@ -2320,6 +2683,7 @@ declare const WorkflowSchemas: {
2320
2683
  syncedAt: z.ZodOptional<z.ZodString>;
2321
2684
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2322
2685
  }, z.core.$strict>], "kind">>;
2686
+ successFinalizerId: z.ZodOptional<z.ZodString>;
2323
2687
  executionHints: z.ZodOptional<z.ZodObject<{
2324
2688
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2325
2689
  kind: z.ZodLiteral<"path">;
@@ -2434,6 +2798,7 @@ declare const WorkflowSchemas: {
2434
2798
  syncedAt: z.ZodOptional<z.ZodString>;
2435
2799
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2436
2800
  }, z.core.$strict>], "kind">>;
2801
+ successFinalizerId: z.ZodOptional<z.ZodString>;
2437
2802
  executionHints: z.ZodOptional<z.ZodObject<{
2438
2803
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2439
2804
  kind: z.ZodLiteral<"path">;
@@ -2546,6 +2911,7 @@ declare const WorkflowSchemas: {
2546
2911
  syncedAt: z.ZodOptional<z.ZodString>;
2547
2912
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2548
2913
  }, z.core.$strict>], "kind">>;
2914
+ successFinalizerId: z.ZodOptional<z.ZodString>;
2549
2915
  executionHints: z.ZodOptional<z.ZodObject<{
2550
2916
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2551
2917
  kind: z.ZodLiteral<"path">;
@@ -2679,79 +3045,640 @@ declare const WorkflowSchemas: {
2679
3045
  cancelled: z.ZodBoolean;
2680
3046
  }, z.core.$strip>;
2681
3047
  };
2682
- getExecution: {
3048
+ bootstrapAuthorityState: {
2683
3049
  request: z.ZodObject<{
2684
3050
  executionId: z.ZodString;
2685
- }, z.core.$strip>;
2686
- response: z.ZodObject<{
2687
- execution: z.ZodNullable<z.ZodObject<{
3051
+ terminalAuthority: z.ZodLiteral<"authority">;
3052
+ definition: z.ZodObject<{
2688
3053
  id: z.ZodString;
2689
- workflowId: z.ZodString;
2690
- coordinatorSessionId: z.ZodOptional<z.ZodString>;
2691
- status: z.ZodEnum<{
2692
- pending: "pending";
2693
- completed: "completed";
2694
- cancelled: "cancelled";
2695
- running: "running";
2696
- failed: "failed";
2697
- paused: "paused";
2698
- }>;
2699
- inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
2700
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2701
- startedAt: z.ZodNumber;
2702
- completedAt: z.ZodOptional<z.ZodNumber>;
2703
- error: z.ZodOptional<z.ZodString>;
2704
- reason: z.ZodOptional<z.ZodString>;
2705
- triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
2706
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2707
- type: z.ZodLiteral<"global">;
2708
- }, z.core.$strict>, z.ZodObject<{
2709
- type: z.ZodLiteral<"workspace">;
2710
- id: z.ZodString;
2711
- }, z.core.$strict>, z.ZodObject<{
2712
- type: z.ZodLiteral<"session">;
2713
- id: z.ZodString;
2714
- }, z.core.$strict>, z.ZodObject<{
2715
- type: z.ZodLiteral<"external">;
2716
- kind: z.ZodString;
2717
- id: z.ZodString;
2718
- }, z.core.$strict>], "type">;
2719
- artifactRef: z.ZodOptional<z.ZodObject<{
3054
+ name: z.ZodOptional<z.ZodString>;
3055
+ description: z.ZodOptional<z.ZodString>;
3056
+ inputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
3057
+ configSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
3058
+ outputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
3059
+ state: z.ZodOptional<z.ZodObject<{
3060
+ schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
3061
+ initial: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
3062
+ }, z.core.$strip>>;
3063
+ artifact: z.ZodOptional<z.ZodObject<{
2720
3064
  kind: z.ZodString;
2721
- id: z.ZodString;
3065
+ schemaVersion: z.ZodString;
3066
+ scope: z.ZodObject<{
3067
+ level: z.ZodString;
3068
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3069
+ }, z.core.$strip>;
3070
+ resolve: z.ZodOptional<z.ZodString>;
3071
+ create: z.ZodOptional<z.ZodString>;
3072
+ statusPath: z.ZodOptional<z.ZodString>;
2722
3073
  }, z.core.$strip>>;
2723
- }, z.core.$strip>>;
2724
- }, z.core.$strip>;
2725
- };
2726
- /**
2727
- * List workflow executions by workflow ID or scope.
2728
- *
2729
- * At least one of `workflowId` or `scope` is required. `limit` is optional
2730
- * for callers and defaults to 50 during request parsing.
2731
- */
2732
- listExecutions: {
2733
- request: z.ZodObject<{
2734
- workflowId: z.ZodOptional<z.ZodString>;
2735
- scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2736
- type: z.ZodLiteral<"global">;
2737
- }, z.core.$strict>, z.ZodObject<{
2738
- type: z.ZodLiteral<"workspace">;
2739
- id: z.ZodString;
2740
- }, z.core.$strict>, z.ZodObject<{
2741
- type: z.ZodLiteral<"session">;
2742
- id: z.ZodString;
2743
- }, z.core.$strict>, z.ZodObject<{
2744
- type: z.ZodLiteral<"external">;
2745
- kind: z.ZodString;
2746
- id: z.ZodString;
2747
- }, z.core.$strict>], "type">>;
2748
- status: z.ZodOptional<z.ZodEnum<{
2749
- pending: "pending";
2750
- completed: "completed";
3074
+ root: z.ZodObject<{
3075
+ id: z.ZodString;
3076
+ when: z.ZodOptional<z.ZodString>;
3077
+ skip: z.ZodOptional<z.ZodString>;
3078
+ writes: z.ZodOptional<z.ZodArray<z.ZodObject<{
3079
+ kind: z.ZodString;
3080
+ schemaVersion: z.ZodString;
3081
+ scope: z.ZodObject<{
3082
+ level: z.ZodString;
3083
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3084
+ }, z.core.$strip>;
3085
+ dataExpression: z.ZodOptional<z.ZodString>;
3086
+ }, z.core.$strip>>>;
3087
+ type: z.ZodLiteral<"sequence">;
3088
+ nodes: z.ZodLazy<z.ZodType<_$_makaio_contracts0.WorkflowNode[], unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.WorkflowNode[], unknown>>>;
3089
+ }, z.core.$strip>;
3090
+ triggers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
3091
+ type: z.ZodLiteral<"manual">;
3092
+ }, z.core.$strip>, z.ZodObject<{
3093
+ type: z.ZodLiteral<"cron">;
3094
+ schedule: z.ZodString;
3095
+ timezone: z.ZodOptional<z.ZodString>;
3096
+ }, z.core.$strip>, z.ZodObject<{
3097
+ type: z.ZodLiteral<"webhook">;
3098
+ event: z.ZodString;
3099
+ branch: z.ZodOptional<z.ZodString>;
3100
+ repo: z.ZodOptional<z.ZodString>;
3101
+ }, z.core.$strip>, z.ZodObject<{
3102
+ type: z.ZodLiteral<"extension">;
3103
+ extensionType: z.ZodString;
3104
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
3105
+ }, z.core.$strip>, z.ZodObject<{
3106
+ type: z.ZodLiteral<"bus-event">;
3107
+ subject: z.ZodString;
3108
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodObject<{
3109
+ $in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
3110
+ }, z.core.$strict>, z.ZodObject<{
3111
+ $ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
3112
+ }, z.core.$strict>, z.ZodObject<{
3113
+ $exists: z.ZodBoolean;
3114
+ }, z.core.$strict>, z.ZodObject<{
3115
+ $startsWith: z.ZodString;
3116
+ }, z.core.$strict>, z.ZodObject<{
3117
+ $endsWith: z.ZodString;
3118
+ }, z.core.$strict>]>>>;
3119
+ filterExpression: z.ZodOptional<z.ZodString>;
3120
+ }, z.core.$strip>], "type">>>;
3121
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
3122
+ type: z.ZodLiteral<"global">;
3123
+ }, z.core.$strict>, z.ZodObject<{
3124
+ type: z.ZodLiteral<"workspace">;
3125
+ id: z.ZodString;
3126
+ }, z.core.$strict>, z.ZodObject<{
3127
+ type: z.ZodLiteral<"session">;
3128
+ id: z.ZodString;
3129
+ }, z.core.$strict>, z.ZodObject<{
3130
+ type: z.ZodLiteral<"external">;
3131
+ kind: z.ZodString;
3132
+ id: z.ZodString;
3133
+ }, z.core.$strict>], "type">>;
3134
+ canvasLayout: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
3135
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3136
+ kind: z.ZodLiteral<"editor">;
3137
+ }, z.core.$strict>, z.ZodObject<{
3138
+ kind: z.ZodLiteral<"extension">;
3139
+ extension: z.ZodString;
3140
+ externalId: z.ZodOptional<z.ZodString>;
3141
+ syncedAt: z.ZodOptional<z.ZodString>;
3142
+ metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
3143
+ }, z.core.$strict>], "kind">>;
3144
+ successFinalizerId: z.ZodOptional<z.ZodString>;
3145
+ executionHints: z.ZodOptional<z.ZodObject<{
3146
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3147
+ kind: z.ZodLiteral<"path">;
3148
+ path: z.ZodString;
3149
+ }, z.core.$strict>, z.ZodObject<{
3150
+ kind: z.ZodLiteral<"source">;
3151
+ filename: z.ZodString;
3152
+ source: z.ZodString;
3153
+ }, z.core.$strict>], "kind">>;
3154
+ requirements: z.ZodOptional<z.ZodObject<{
3155
+ isolation: z.ZodOptional<z.ZodEnum<{
3156
+ local: "local";
3157
+ remote: "remote";
3158
+ container: "container";
3159
+ }>>;
3160
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
3161
+ }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
3162
+ providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
3163
+ }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
3164
+ }, z.core.$strip>;
3165
+ }, z.core.$strict>;
3166
+ response: z.ZodObject<{
3167
+ persisted: z.ZodBoolean;
3168
+ }, z.core.$strip>;
3169
+ };
3170
+ acceptAuthorityRunnerResult: {
3171
+ request: z.ZodObject<{
3172
+ executionId: z.ZodString;
3173
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3174
+ executionId: z.ZodString;
3175
+ workflowId: z.ZodString;
3176
+ status: z.ZodLiteral<"completed">;
3177
+ artifact: z.ZodOptional<z.ZodObject<{
3178
+ kind: z.ZodString;
3179
+ id: z.ZodString;
3180
+ revision: z.ZodString;
3181
+ scope: z.ZodObject<{
3182
+ level: z.ZodString;
3183
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3184
+ }, z.core.$strip>;
3185
+ schemaVersion: z.ZodString;
3186
+ data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
3187
+ relations: z.ZodArray<z.ZodObject<{
3188
+ type: z.ZodString;
3189
+ target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
3190
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
3191
+ kind: z.ZodString;
3192
+ id: z.ZodString;
3193
+ revision: z.ZodString;
3194
+ }, z.core.$strip>, z.ZodObject<{
3195
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
3196
+ artifact: z.ZodObject<{
3197
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
3198
+ kind: z.ZodString;
3199
+ id: z.ZodString;
3200
+ revision: z.ZodString;
3201
+ }, z.core.$strip>;
3202
+ localId: z.ZodString;
3203
+ }, z.core.$strip>, z.ZodObject<{
3204
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
3205
+ kind: z.ZodString;
3206
+ id: z.ZodString;
3207
+ revision: z.ZodOptional<z.ZodString>;
3208
+ locator: z.ZodOptional<z.ZodString>;
3209
+ }, z.core.$strip>], "refClass">>;
3210
+ }, z.core.$strip>>;
3211
+ confidence: z.ZodOptional<z.ZodObject<{
3212
+ level: z.ZodEnum<{
3213
+ inferred: "inferred";
3214
+ assumed: "assumed";
3215
+ stated: "stated";
3216
+ confirmed: "confirmed";
3217
+ verified: "verified";
3218
+ }>;
3219
+ basis: z.ZodArray<z.ZodObject<{
3220
+ kind: z.ZodString;
3221
+ actor: z.ZodObject<{
3222
+ kind: z.ZodString;
3223
+ id: z.ZodString;
3224
+ displayName: z.ZodOptional<z.ZodString>;
3225
+ }, z.core.$strip>;
3226
+ timestamp: z.ZodNumber;
3227
+ detail: z.ZodOptional<z.ZodString>;
3228
+ evidenceRef: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
3229
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
3230
+ kind: z.ZodString;
3231
+ id: z.ZodString;
3232
+ revision: z.ZodString;
3233
+ }, z.core.$strip>, z.ZodObject<{
3234
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
3235
+ artifact: z.ZodObject<{
3236
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
3237
+ kind: z.ZodString;
3238
+ id: z.ZodString;
3239
+ revision: z.ZodString;
3240
+ }, z.core.$strip>;
3241
+ localId: z.ZodString;
3242
+ }, z.core.$strip>, z.ZodObject<{
3243
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
3244
+ kind: z.ZodString;
3245
+ id: z.ZodString;
3246
+ revision: z.ZodOptional<z.ZodString>;
3247
+ locator: z.ZodOptional<z.ZodString>;
3248
+ }, z.core.$strip>], "refClass">>>;
3249
+ }, z.core.$strip>>;
3250
+ }, z.core.$strip>>;
3251
+ representations: z.ZodOptional<z.ZodObject<{
3252
+ markdown: z.ZodOptional<z.ZodString>;
3253
+ summary: z.ZodOptional<z.ZodString>;
3254
+ plaintext: z.ZodOptional<z.ZodString>;
3255
+ }, z.core.$strip>>;
3256
+ actor: z.ZodObject<{
3257
+ kind: z.ZodString;
3258
+ id: z.ZodString;
3259
+ displayName: z.ZodOptional<z.ZodString>;
3260
+ }, z.core.$strip>;
3261
+ timestamp: z.ZodNumber;
3262
+ createdAt: z.ZodOptional<z.ZodNumber>;
3263
+ }, z.core.$strip>>;
3264
+ }, z.core.$strict>, z.ZodObject<{
3265
+ executionId: z.ZodString;
3266
+ workflowId: z.ZodString;
3267
+ status: z.ZodLiteral<"failed">;
3268
+ error: z.ZodString;
3269
+ }, z.core.$strict>, z.ZodObject<{
3270
+ executionId: z.ZodString;
3271
+ workflowId: z.ZodString;
3272
+ status: z.ZodLiteral<"cancelled">;
3273
+ reason: z.ZodOptional<z.ZodString>;
3274
+ }, z.core.$strict>, z.ZodObject<{
3275
+ executionId: z.ZodString;
3276
+ workflowId: z.ZodString;
3277
+ status: z.ZodLiteral<"paused">;
3278
+ pausedAtGateId: z.ZodString;
3279
+ pausedAtFrameId: z.ZodString;
3280
+ }, z.core.$strict>], "status"> & z.ZodType<{
3281
+ executionId: string;
3282
+ workflowId: string;
3283
+ status: "completed";
3284
+ artifact?: {
3285
+ kind: string;
3286
+ id: string;
3287
+ revision: string;
3288
+ scope: {
3289
+ level: string;
3290
+ ids?: Record<string, string> | undefined;
3291
+ };
3292
+ schemaVersion: string;
3293
+ data: Record<string, unknown>;
3294
+ relations: {
3295
+ type: string;
3296
+ target: {
3297
+ refClass: "artifact";
3298
+ kind: string;
3299
+ id: string;
3300
+ revision: string;
3301
+ } | {
3302
+ refClass: "local";
3303
+ artifact: {
3304
+ refClass: "artifact";
3305
+ kind: string;
3306
+ id: string;
3307
+ revision: string;
3308
+ };
3309
+ localId: string;
3310
+ } | {
3311
+ refClass: "evidence";
3312
+ kind: string;
3313
+ id: string;
3314
+ revision?: string | undefined;
3315
+ locator?: string | undefined;
3316
+ };
3317
+ }[];
3318
+ actor: {
3319
+ kind: string;
3320
+ id: string;
3321
+ displayName?: string | undefined;
3322
+ };
3323
+ timestamp: number;
3324
+ confidence?: {
3325
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
3326
+ basis: {
3327
+ kind: string;
3328
+ actor: {
3329
+ kind: string;
3330
+ id: string;
3331
+ displayName?: string | undefined;
3332
+ };
3333
+ timestamp: number;
3334
+ detail?: string | undefined;
3335
+ evidenceRef?: {
3336
+ refClass: "artifact";
3337
+ kind: string;
3338
+ id: string;
3339
+ revision: string;
3340
+ } | {
3341
+ refClass: "local";
3342
+ artifact: {
3343
+ refClass: "artifact";
3344
+ kind: string;
3345
+ id: string;
3346
+ revision: string;
3347
+ };
3348
+ localId: string;
3349
+ } | {
3350
+ refClass: "evidence";
3351
+ kind: string;
3352
+ id: string;
3353
+ revision?: string | undefined;
3354
+ locator?: string | undefined;
3355
+ } | undefined;
3356
+ }[];
3357
+ } | undefined;
3358
+ representations?: {
3359
+ markdown?: string | undefined;
3360
+ summary?: string | undefined;
3361
+ plaintext?: string | undefined;
3362
+ } | undefined;
3363
+ createdAt?: number | undefined;
3364
+ } | undefined;
3365
+ } | {
3366
+ executionId: string;
3367
+ workflowId: string;
3368
+ status: "failed";
3369
+ error: string;
3370
+ } | {
3371
+ executionId: string;
3372
+ workflowId: string;
3373
+ status: "cancelled";
3374
+ reason?: string | undefined;
3375
+ }, {
3376
+ executionId: string;
3377
+ workflowId: string;
3378
+ status: "completed";
3379
+ artifact?: {
3380
+ kind: string;
3381
+ id: string;
3382
+ revision: string;
3383
+ scope: {
3384
+ level: string;
3385
+ ids?: Record<string, string> | undefined;
3386
+ };
3387
+ schemaVersion: string;
3388
+ data: Record<string, unknown>;
3389
+ relations: {
3390
+ type: string;
3391
+ target: unknown;
3392
+ }[];
3393
+ actor: {
3394
+ kind: string;
3395
+ id: string;
3396
+ displayName?: string | undefined;
3397
+ };
3398
+ timestamp: number;
3399
+ confidence?: {
3400
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
3401
+ basis: {
3402
+ kind: string;
3403
+ actor: {
3404
+ kind: string;
3405
+ id: string;
3406
+ displayName?: string | undefined;
3407
+ };
3408
+ timestamp: number;
3409
+ detail?: string | undefined;
3410
+ evidenceRef?: unknown;
3411
+ }[];
3412
+ } | undefined;
3413
+ representations?: {
3414
+ markdown?: string | undefined;
3415
+ summary?: string | undefined;
3416
+ plaintext?: string | undefined;
3417
+ } | undefined;
3418
+ createdAt?: number | undefined;
3419
+ } | undefined;
3420
+ } | {
3421
+ executionId: string;
3422
+ workflowId: string;
3423
+ status: "failed";
3424
+ error: string;
3425
+ } | {
3426
+ executionId: string;
3427
+ workflowId: string;
3428
+ status: "cancelled";
3429
+ reason?: string | undefined;
3430
+ } | {
3431
+ executionId: string;
3432
+ workflowId: string;
3433
+ status: "paused";
3434
+ pausedAtGateId: string;
3435
+ pausedAtFrameId: string;
3436
+ }, z.core.$ZodTypeInternals<{
3437
+ executionId: string;
3438
+ workflowId: string;
3439
+ status: "completed";
3440
+ artifact?: {
3441
+ kind: string;
3442
+ id: string;
3443
+ revision: string;
3444
+ scope: {
3445
+ level: string;
3446
+ ids?: Record<string, string> | undefined;
3447
+ };
3448
+ schemaVersion: string;
3449
+ data: Record<string, unknown>;
3450
+ relations: {
3451
+ type: string;
3452
+ target: {
3453
+ refClass: "artifact";
3454
+ kind: string;
3455
+ id: string;
3456
+ revision: string;
3457
+ } | {
3458
+ refClass: "local";
3459
+ artifact: {
3460
+ refClass: "artifact";
3461
+ kind: string;
3462
+ id: string;
3463
+ revision: string;
3464
+ };
3465
+ localId: string;
3466
+ } | {
3467
+ refClass: "evidence";
3468
+ kind: string;
3469
+ id: string;
3470
+ revision?: string | undefined;
3471
+ locator?: string | undefined;
3472
+ };
3473
+ }[];
3474
+ actor: {
3475
+ kind: string;
3476
+ id: string;
3477
+ displayName?: string | undefined;
3478
+ };
3479
+ timestamp: number;
3480
+ confidence?: {
3481
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
3482
+ basis: {
3483
+ kind: string;
3484
+ actor: {
3485
+ kind: string;
3486
+ id: string;
3487
+ displayName?: string | undefined;
3488
+ };
3489
+ timestamp: number;
3490
+ detail?: string | undefined;
3491
+ evidenceRef?: {
3492
+ refClass: "artifact";
3493
+ kind: string;
3494
+ id: string;
3495
+ revision: string;
3496
+ } | {
3497
+ refClass: "local";
3498
+ artifact: {
3499
+ refClass: "artifact";
3500
+ kind: string;
3501
+ id: string;
3502
+ revision: string;
3503
+ };
3504
+ localId: string;
3505
+ } | {
3506
+ refClass: "evidence";
3507
+ kind: string;
3508
+ id: string;
3509
+ revision?: string | undefined;
3510
+ locator?: string | undefined;
3511
+ } | undefined;
3512
+ }[];
3513
+ } | undefined;
3514
+ representations?: {
3515
+ markdown?: string | undefined;
3516
+ summary?: string | undefined;
3517
+ plaintext?: string | undefined;
3518
+ } | undefined;
3519
+ createdAt?: number | undefined;
3520
+ } | undefined;
3521
+ } | {
3522
+ executionId: string;
3523
+ workflowId: string;
3524
+ status: "failed";
3525
+ error: string;
3526
+ } | {
3527
+ executionId: string;
3528
+ workflowId: string;
3529
+ status: "cancelled";
3530
+ reason?: string | undefined;
3531
+ }, {
3532
+ executionId: string;
3533
+ workflowId: string;
3534
+ status: "completed";
3535
+ artifact?: {
3536
+ kind: string;
3537
+ id: string;
3538
+ revision: string;
3539
+ scope: {
3540
+ level: string;
3541
+ ids?: Record<string, string> | undefined;
3542
+ };
3543
+ schemaVersion: string;
3544
+ data: Record<string, unknown>;
3545
+ relations: {
3546
+ type: string;
3547
+ target: unknown;
3548
+ }[];
3549
+ actor: {
3550
+ kind: string;
3551
+ id: string;
3552
+ displayName?: string | undefined;
3553
+ };
3554
+ timestamp: number;
3555
+ confidence?: {
3556
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
3557
+ basis: {
3558
+ kind: string;
3559
+ actor: {
3560
+ kind: string;
3561
+ id: string;
3562
+ displayName?: string | undefined;
3563
+ };
3564
+ timestamp: number;
3565
+ detail?: string | undefined;
3566
+ evidenceRef?: unknown;
3567
+ }[];
3568
+ } | undefined;
3569
+ representations?: {
3570
+ markdown?: string | undefined;
3571
+ summary?: string | undefined;
3572
+ plaintext?: string | undefined;
3573
+ } | undefined;
3574
+ createdAt?: number | undefined;
3575
+ } | undefined;
3576
+ } | {
3577
+ executionId: string;
3578
+ workflowId: string;
3579
+ status: "failed";
3580
+ error: string;
3581
+ } | {
3582
+ executionId: string;
3583
+ workflowId: string;
3584
+ status: "cancelled";
3585
+ reason?: string | undefined;
3586
+ } | {
3587
+ executionId: string;
3588
+ workflowId: string;
3589
+ status: "paused";
3590
+ pausedAtGateId: string;
3591
+ pausedAtFrameId: string;
3592
+ }>>;
3593
+ }, z.core.$strict>;
3594
+ response: z.ZodObject<{
3595
+ accepted: z.ZodBoolean;
3596
+ status: z.ZodEnum<{
3597
+ pending: "pending";
3598
+ completed: "completed";
2751
3599
  cancelled: "cancelled";
3600
+ failed: "failed";
2752
3601
  running: "running";
3602
+ paused: "paused";
3603
+ finalizing: "finalizing";
3604
+ }>;
3605
+ }, z.core.$strip>;
3606
+ };
3607
+ getExecution: {
3608
+ request: z.ZodObject<{
3609
+ executionId: z.ZodString;
3610
+ }, z.core.$strip>;
3611
+ response: z.ZodObject<{
3612
+ execution: z.ZodNullable<z.ZodObject<{
3613
+ id: z.ZodString;
3614
+ workflowId: z.ZodString;
3615
+ coordinatorSessionId: z.ZodOptional<z.ZodString>;
3616
+ status: z.ZodEnum<{
3617
+ pending: "pending";
3618
+ completed: "completed";
3619
+ cancelled: "cancelled";
3620
+ failed: "failed";
3621
+ running: "running";
3622
+ paused: "paused";
3623
+ finalizing: "finalizing";
3624
+ }>;
3625
+ inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
3626
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
3627
+ startedAt: z.ZodNumber;
3628
+ completedAt: z.ZodOptional<z.ZodNumber>;
3629
+ error: z.ZodOptional<z.ZodString>;
3630
+ reason: z.ZodOptional<z.ZodString>;
3631
+ triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
3632
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
3633
+ type: z.ZodLiteral<"global">;
3634
+ }, z.core.$strict>, z.ZodObject<{
3635
+ type: z.ZodLiteral<"workspace">;
3636
+ id: z.ZodString;
3637
+ }, z.core.$strict>, z.ZodObject<{
3638
+ type: z.ZodLiteral<"session">;
3639
+ id: z.ZodString;
3640
+ }, z.core.$strict>, z.ZodObject<{
3641
+ type: z.ZodLiteral<"external">;
3642
+ kind: z.ZodString;
3643
+ id: z.ZodString;
3644
+ }, z.core.$strict>], "type">;
3645
+ artifactRef: z.ZodOptional<z.ZodObject<{
3646
+ kind: z.ZodString;
3647
+ id: z.ZodString;
3648
+ }, z.core.$strip>>;
3649
+ }, z.core.$strip>>;
3650
+ }, z.core.$strip>;
3651
+ };
3652
+ /**
3653
+ * List workflow executions by workflow ID or scope.
3654
+ *
3655
+ * At least one of `workflowId` or `scope` is required. `limit` is optional
3656
+ * for callers and defaults to 50 during request parsing.
3657
+ */
3658
+ listExecutions: {
3659
+ request: z.ZodObject<{
3660
+ workflowId: z.ZodOptional<z.ZodString>;
3661
+ scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3662
+ type: z.ZodLiteral<"global">;
3663
+ }, z.core.$strict>, z.ZodObject<{
3664
+ type: z.ZodLiteral<"workspace">;
3665
+ id: z.ZodString;
3666
+ }, z.core.$strict>, z.ZodObject<{
3667
+ type: z.ZodLiteral<"session">;
3668
+ id: z.ZodString;
3669
+ }, z.core.$strict>, z.ZodObject<{
3670
+ type: z.ZodLiteral<"external">;
3671
+ kind: z.ZodString;
3672
+ id: z.ZodString;
3673
+ }, z.core.$strict>], "type">>;
3674
+ status: z.ZodOptional<z.ZodEnum<{
3675
+ pending: "pending";
3676
+ completed: "completed";
3677
+ cancelled: "cancelled";
2753
3678
  failed: "failed";
3679
+ running: "running";
2754
3680
  paused: "paused";
3681
+ finalizing: "finalizing";
2755
3682
  }>>;
2756
3683
  artifactRef: z.ZodOptional<z.ZodObject<{
2757
3684
  kind: z.ZodString;
@@ -2772,9 +3699,10 @@ declare const WorkflowSchemas: {
2772
3699
  pending: "pending";
2773
3700
  completed: "completed";
2774
3701
  cancelled: "cancelled";
2775
- running: "running";
2776
3702
  failed: "failed";
3703
+ running: "running";
2777
3704
  paused: "paused";
3705
+ finalizing: "finalizing";
2778
3706
  }>;
2779
3707
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
2780
3708
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -2828,9 +3756,10 @@ declare const WorkflowSchemas: {
2828
3756
  pending: "pending";
2829
3757
  completed: "completed";
2830
3758
  cancelled: "cancelled";
2831
- running: "running";
2832
3759
  failed: "failed";
3760
+ running: "running";
2833
3761
  paused: "paused";
3762
+ finalizing: "finalizing";
2834
3763
  }>;
2835
3764
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
2836
3765
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -2882,8 +3811,8 @@ declare const WorkflowSchemas: {
2882
3811
  }>;
2883
3812
  status: z.ZodEnum<{
2884
3813
  completed: "completed";
2885
- running: "running";
2886
3814
  failed: "failed";
3815
+ running: "running";
2887
3816
  skipped: "skipped";
2888
3817
  }>;
2889
3818
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -2913,8 +3842,8 @@ declare const WorkflowSchemas: {
2913
3842
  status: z.ZodOptional<z.ZodEnum<{
2914
3843
  cancelled: "cancelled";
2915
3844
  rejected: "rejected";
2916
- resumed: "resumed";
2917
3845
  waiting: "waiting";
3846
+ resumed: "resumed";
2918
3847
  "timed-out": "timed-out";
2919
3848
  }>>;
2920
3849
  limit: z.ZodDefault<z.ZodNumber>;
@@ -2929,8 +3858,8 @@ declare const WorkflowSchemas: {
2929
3858
  status: z.ZodEnum<{
2930
3859
  cancelled: "cancelled";
2931
3860
  rejected: "rejected";
2932
- resumed: "resumed";
2933
3861
  waiting: "waiting";
3862
+ resumed: "resumed";
2934
3863
  "timed-out": "timed-out";
2935
3864
  }>;
2936
3865
  autoAction: z.ZodEnum<{
@@ -3009,12 +3938,12 @@ declare const WorkflowSchemas: {
3009
3938
  frameId: z.ZodString;
3010
3939
  nodeId: z.ZodString;
3011
3940
  nodeType: z.ZodEnum<{
3941
+ sequence: "sequence";
3012
3942
  station: "station";
3013
3943
  "delegate-agent": "delegate-agent";
3014
3944
  "delegate-role": "delegate-role";
3015
- sequence: "sequence";
3016
- gate: "gate";
3017
3945
  parallel: "parallel";
3946
+ gate: "gate";
3018
3947
  iterate: "iterate";
3019
3948
  "iterate-chain": "iterate-chain";
3020
3949
  loop: "loop";
@@ -3025,10 +3954,10 @@ declare const WorkflowSchemas: {
3025
3954
  pending: "pending";
3026
3955
  completed: "completed";
3027
3956
  cancelled: "cancelled";
3028
- running: "running";
3029
3957
  failed: "failed";
3030
- skipped: "skipped";
3958
+ running: "running";
3031
3959
  waiting: "waiting";
3960
+ skipped: "skipped";
3032
3961
  }>;
3033
3962
  attempt: z.ZodDefault<z.ZodNumber>;
3034
3963
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -3202,6 +4131,7 @@ declare const WorkflowSchemas: {
3202
4131
  }, z.core.$strip>;
3203
4132
  response: z.ZodObject<{
3204
4133
  adapterName: z.ZodString;
4134
+ providerConfigId: z.ZodOptional<z.ZodString>;
3205
4135
  model: z.ZodOptional<z.ZodString>;
3206
4136
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
3207
4137
  none: "none";
@@ -3213,8 +4143,8 @@ declare const WorkflowSchemas: {
3213
4143
  harnessId: z.ZodOptional<z.ZodString>;
3214
4144
  systemPrompt: z.ZodOptional<z.ZodString>;
3215
4145
  contextMode: z.ZodOptional<z.ZodEnum<{
3216
- fresh: "fresh";
3217
4146
  fork: "fork";
4147
+ fresh: "fresh";
3218
4148
  }>>;
3219
4149
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3220
4150
  state: z.ZodLiteral<"resolved">;
@@ -3292,6 +4222,10 @@ declare const WorkflowSchemas: {
3292
4222
  }, z.core.$strict>, z.ZodObject<{
3293
4223
  state: z.ZodLiteral<"unresolved">;
3294
4224
  }, z.core.$strict>], "state">>;
4225
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4226
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
4227
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
4228
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
3295
4229
  completion: z.ZodOptional<z.ZodEnum<{
3296
4230
  tool: "tool";
3297
4231
  turn: "turn";
@@ -3308,6 +4242,7 @@ declare const WorkflowSchemas: {
3308
4242
  }, z.core.$strip>;
3309
4243
  response: z.ZodObject<{
3310
4244
  adapterName: z.ZodString;
4245
+ providerConfigId: z.ZodOptional<z.ZodString>;
3311
4246
  model: z.ZodOptional<z.ZodString>;
3312
4247
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
3313
4248
  none: "none";
@@ -3319,8 +4254,8 @@ declare const WorkflowSchemas: {
3319
4254
  harnessId: z.ZodOptional<z.ZodString>;
3320
4255
  systemPrompt: z.ZodOptional<z.ZodString>;
3321
4256
  contextMode: z.ZodOptional<z.ZodEnum<{
3322
- fresh: "fresh";
3323
4257
  fork: "fork";
4258
+ fresh: "fresh";
3324
4259
  }>>;
3325
4260
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3326
4261
  state: z.ZodLiteral<"resolved">;
@@ -3398,6 +4333,10 @@ declare const WorkflowSchemas: {
3398
4333
  }, z.core.$strict>, z.ZodObject<{
3399
4334
  state: z.ZodLiteral<"unresolved">;
3400
4335
  }, z.core.$strict>], "state">>;
4336
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4337
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
4338
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
4339
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
3401
4340
  completion: z.ZodOptional<z.ZodEnum<{
3402
4341
  tool: "tool";
3403
4342
  turn: "turn";
@@ -3526,6 +4465,7 @@ declare const WorkflowSchemas: {
3526
4465
  syncedAt: z.ZodOptional<z.ZodString>;
3527
4466
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
3528
4467
  }, z.core.$strict>], "kind">>;
4468
+ successFinalizerId: z.ZodOptional<z.ZodString>;
3529
4469
  executionHints: z.ZodOptional<z.ZodObject<{
3530
4470
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
3531
4471
  kind: z.ZodLiteral<"path">;
@@ -3612,6 +4552,10 @@ declare const WorkflowSchemas: {
3612
4552
  "exit-and-redispatch": "exit-and-redispatch";
3613
4553
  "exit-and-resume": "exit-and-resume";
3614
4554
  }>>;
4555
+ terminalAuthority: z.ZodOptional<z.ZodEnum<{
4556
+ authority: "authority";
4557
+ worker: "worker";
4558
+ }>>;
3615
4559
  }, z.core.$strip>;
3616
4560
  };
3617
4561
  'execution.started': z.ZodObject<{
@@ -3629,6 +4573,7 @@ declare const WorkflowSchemas: {
3629
4573
  workflowId: z.ZodString;
3630
4574
  totalDuration: z.ZodNumber;
3631
4575
  completedAt: z.ZodOptional<z.ZodNumber>;
4576
+ transitionKey: z.ZodOptional<z.ZodString>;
3632
4577
  }, z.core.$strip>;
3633
4578
  'execution.failed': z.ZodObject<{
3634
4579
  executionId: z.ZodString;
@@ -3636,12 +4581,14 @@ declare const WorkflowSchemas: {
3636
4581
  error: z.ZodString;
3637
4582
  failedStepId: z.ZodOptional<z.ZodString>;
3638
4583
  completedAt: z.ZodOptional<z.ZodNumber>;
4584
+ transitionKey: z.ZodOptional<z.ZodString>;
3639
4585
  }, z.core.$strip>;
3640
4586
  'execution.cancelled': z.ZodObject<{
3641
4587
  executionId: z.ZodString;
3642
4588
  workflowId: z.ZodString;
3643
4589
  reason: z.ZodOptional<z.ZodString>;
3644
4590
  completedAt: z.ZodOptional<z.ZodNumber>;
4591
+ transitionKey: z.ZodOptional<z.ZodString>;
3645
4592
  }, z.core.$strip>;
3646
4593
  /**
3647
4594
  * Ephemeral progress signal emitted by a station handler via `ctx.updateProgress()`.
@@ -3834,12 +4781,12 @@ declare const WorkflowSchemas: {
3834
4781
  frameId: z.ZodString;
3835
4782
  nodeId: z.ZodString;
3836
4783
  nodeType: z.ZodEnum<{
4784
+ sequence: "sequence";
3837
4785
  station: "station";
3838
4786
  "delegate-agent": "delegate-agent";
3839
4787
  "delegate-role": "delegate-role";
3840
- sequence: "sequence";
3841
- gate: "gate";
3842
4788
  parallel: "parallel";
4789
+ gate: "gate";
3843
4790
  iterate: "iterate";
3844
4791
  "iterate-chain": "iterate-chain";
3845
4792
  loop: "loop";
@@ -3963,9 +4910,10 @@ declare const WorkflowSchemas: {
3963
4910
  pending: "pending";
3964
4911
  completed: "completed";
3965
4912
  cancelled: "cancelled";
3966
- running: "running";
3967
4913
  failed: "failed";
4914
+ running: "running";
3968
4915
  paused: "paused";
4916
+ finalizing: "finalizing";
3969
4917
  }>;
3970
4918
  startedAt: z.ZodNumber;
3971
4919
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -3994,12 +4942,12 @@ declare const WorkflowSchemas: {
3994
4942
  frameId: z.ZodString;
3995
4943
  nodeId: z.ZodString;
3996
4944
  nodeType: z.ZodEnum<{
4945
+ sequence: "sequence";
3997
4946
  station: "station";
3998
4947
  "delegate-agent": "delegate-agent";
3999
4948
  "delegate-role": "delegate-role";
4000
- sequence: "sequence";
4001
- gate: "gate";
4002
4949
  parallel: "parallel";
4950
+ gate: "gate";
4003
4951
  iterate: "iterate";
4004
4952
  "iterate-chain": "iterate-chain";
4005
4953
  loop: "loop";
@@ -4009,10 +4957,10 @@ declare const WorkflowSchemas: {
4009
4957
  pending: "pending";
4010
4958
  completed: "completed";
4011
4959
  cancelled: "cancelled";
4012
- running: "running";
4013
4960
  failed: "failed";
4014
- skipped: "skipped";
4961
+ running: "running";
4015
4962
  waiting: "waiting";
4963
+ skipped: "skipped";
4016
4964
  }>;
4017
4965
  attempt: z.ZodNumber;
4018
4966
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -4040,9 +4988,10 @@ declare const WorkflowSchemas: {
4040
4988
  pending: "pending";
4041
4989
  completed: "completed";
4042
4990
  cancelled: "cancelled";
4043
- running: "running";
4044
4991
  failed: "failed";
4992
+ running: "running";
4045
4993
  paused: "paused";
4994
+ finalizing: "finalizing";
4046
4995
  }>>;
4047
4996
  limit: z.ZodOptional<z.ZodNumber>;
4048
4997
  offset: z.ZodOptional<z.ZodNumber>;
@@ -4056,9 +5005,10 @@ declare const WorkflowSchemas: {
4056
5005
  pending: "pending";
4057
5006
  completed: "completed";
4058
5007
  cancelled: "cancelled";
4059
- running: "running";
4060
5008
  failed: "failed";
5009
+ running: "running";
4061
5010
  paused: "paused";
5011
+ finalizing: "finalizing";
4062
5012
  }>;
4063
5013
  startedAt: z.ZodNumber;
4064
5014
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -4091,6 +5041,7 @@ declare const WorkflowSchemas: {
4091
5041
  pending: z.ZodNumber;
4092
5042
  running: z.ZodNumber;
4093
5043
  paused: z.ZodNumber;
5044
+ finalizing: z.ZodNumber;
4094
5045
  completed: z.ZodNumber;
4095
5046
  failed: z.ZodNumber;
4096
5047
  cancelled: z.ZodNumber;
@@ -4262,6 +5213,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4262
5213
  syncedAt: z.ZodOptional<z.ZodString>;
4263
5214
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4264
5215
  }, z.core.$strict>], "kind">>;
5216
+ successFinalizerId: z.ZodOptional<z.ZodString>;
4265
5217
  executionHints: z.ZodOptional<z.ZodObject<{
4266
5218
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4267
5219
  kind: z.ZodLiteral<"path">;
@@ -4378,6 +5330,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4378
5330
  syncedAt: z.ZodOptional<z.ZodString>;
4379
5331
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4380
5332
  }, z.core.$strict>], "kind">>;
5333
+ successFinalizerId: z.ZodOptional<z.ZodString>;
4381
5334
  executionHints: z.ZodOptional<z.ZodObject<{
4382
5335
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4383
5336
  kind: z.ZodLiteral<"path">;
@@ -4520,6 +5473,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4520
5473
  syncedAt: z.ZodOptional<z.ZodString>;
4521
5474
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4522
5475
  }, z.core.$strict>], "kind">>;
5476
+ successFinalizerId: z.ZodOptional<z.ZodString>;
4523
5477
  executionHints: z.ZodOptional<z.ZodObject<{
4524
5478
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4525
5479
  kind: z.ZodLiteral<"path">;
@@ -4634,6 +5588,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4634
5588
  syncedAt: z.ZodOptional<z.ZodString>;
4635
5589
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4636
5590
  }, z.core.$strict>], "kind">>;
5591
+ successFinalizerId: z.ZodOptional<z.ZodString>;
4637
5592
  executionHints: z.ZodOptional<z.ZodObject<{
4638
5593
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4639
5594
  kind: z.ZodLiteral<"path">;
@@ -4746,6 +5701,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4746
5701
  syncedAt: z.ZodOptional<z.ZodString>;
4747
5702
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
4748
5703
  }, z.core.$strict>], "kind">>;
5704
+ successFinalizerId: z.ZodOptional<z.ZodString>;
4749
5705
  executionHints: z.ZodOptional<z.ZodObject<{
4750
5706
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4751
5707
  kind: z.ZodLiteral<"path">;
@@ -4879,22 +5835,582 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4879
5835
  cancelled: z.ZodBoolean;
4880
5836
  }, z.core.$strip>;
4881
5837
  };
4882
- getExecution: {
5838
+ bootstrapAuthorityState: {
4883
5839
  request: z.ZodObject<{
4884
5840
  executionId: z.ZodString;
4885
- }, z.core.$strip>;
4886
- response: z.ZodObject<{
4887
- execution: z.ZodNullable<z.ZodObject<{
5841
+ terminalAuthority: z.ZodLiteral<"authority">;
5842
+ definition: z.ZodObject<{
4888
5843
  id: z.ZodString;
4889
- workflowId: z.ZodString;
4890
- coordinatorSessionId: z.ZodOptional<z.ZodString>;
4891
- status: z.ZodEnum<{
4892
- pending: "pending";
5844
+ name: z.ZodOptional<z.ZodString>;
5845
+ description: z.ZodOptional<z.ZodString>;
5846
+ inputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
5847
+ configSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
5848
+ outputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
5849
+ state: z.ZodOptional<z.ZodObject<{
5850
+ schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
5851
+ initial: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
5852
+ }, z.core.$strip>>;
5853
+ artifact: z.ZodOptional<z.ZodObject<{
5854
+ kind: z.ZodString;
5855
+ schemaVersion: z.ZodString;
5856
+ scope: z.ZodObject<{
5857
+ level: z.ZodString;
5858
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5859
+ }, z.core.$strip>;
5860
+ resolve: z.ZodOptional<z.ZodString>;
5861
+ create: z.ZodOptional<z.ZodString>;
5862
+ statusPath: z.ZodOptional<z.ZodString>;
5863
+ }, z.core.$strip>>;
5864
+ root: z.ZodObject<{
5865
+ id: z.ZodString;
5866
+ when: z.ZodOptional<z.ZodString>;
5867
+ skip: z.ZodOptional<z.ZodString>;
5868
+ writes: z.ZodOptional<z.ZodArray<z.ZodObject<{
5869
+ kind: z.ZodString;
5870
+ schemaVersion: z.ZodString;
5871
+ scope: z.ZodObject<{
5872
+ level: z.ZodString;
5873
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5874
+ }, z.core.$strip>;
5875
+ dataExpression: z.ZodOptional<z.ZodString>;
5876
+ }, z.core.$strip>>>;
5877
+ type: z.ZodLiteral<"sequence">;
5878
+ nodes: z.ZodLazy<z.ZodType<_$_makaio_contracts0.WorkflowNode[], unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.WorkflowNode[], unknown>>>;
5879
+ }, z.core.$strip>;
5880
+ triggers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
5881
+ type: z.ZodLiteral<"manual">;
5882
+ }, z.core.$strip>, z.ZodObject<{
5883
+ type: z.ZodLiteral<"cron">;
5884
+ schedule: z.ZodString;
5885
+ timezone: z.ZodOptional<z.ZodString>;
5886
+ }, z.core.$strip>, z.ZodObject<{
5887
+ type: z.ZodLiteral<"webhook">;
5888
+ event: z.ZodString;
5889
+ branch: z.ZodOptional<z.ZodString>;
5890
+ repo: z.ZodOptional<z.ZodString>;
5891
+ }, z.core.$strip>, z.ZodObject<{
5892
+ type: z.ZodLiteral<"extension">;
5893
+ extensionType: z.ZodString;
5894
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
5895
+ }, z.core.$strip>, z.ZodObject<{
5896
+ type: z.ZodLiteral<"bus-event">;
5897
+ subject: z.ZodString;
5898
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodObject<{
5899
+ $in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
5900
+ }, z.core.$strict>, z.ZodObject<{
5901
+ $ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
5902
+ }, z.core.$strict>, z.ZodObject<{
5903
+ $exists: z.ZodBoolean;
5904
+ }, z.core.$strict>, z.ZodObject<{
5905
+ $startsWith: z.ZodString;
5906
+ }, z.core.$strict>, z.ZodObject<{
5907
+ $endsWith: z.ZodString;
5908
+ }, z.core.$strict>]>>>;
5909
+ filterExpression: z.ZodOptional<z.ZodString>;
5910
+ }, z.core.$strip>], "type">>>;
5911
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
5912
+ type: z.ZodLiteral<"global">;
5913
+ }, z.core.$strict>, z.ZodObject<{
5914
+ type: z.ZodLiteral<"workspace">;
5915
+ id: z.ZodString;
5916
+ }, z.core.$strict>, z.ZodObject<{
5917
+ type: z.ZodLiteral<"session">;
5918
+ id: z.ZodString;
5919
+ }, z.core.$strict>, z.ZodObject<{
5920
+ type: z.ZodLiteral<"external">;
5921
+ kind: z.ZodString;
5922
+ id: z.ZodString;
5923
+ }, z.core.$strict>], "type">>;
5924
+ canvasLayout: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
5925
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5926
+ kind: z.ZodLiteral<"editor">;
5927
+ }, z.core.$strict>, z.ZodObject<{
5928
+ kind: z.ZodLiteral<"extension">;
5929
+ extension: z.ZodString;
5930
+ externalId: z.ZodOptional<z.ZodString>;
5931
+ syncedAt: z.ZodOptional<z.ZodString>;
5932
+ metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
5933
+ }, z.core.$strict>], "kind">>;
5934
+ successFinalizerId: z.ZodOptional<z.ZodString>;
5935
+ executionHints: z.ZodOptional<z.ZodObject<{
5936
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5937
+ kind: z.ZodLiteral<"path">;
5938
+ path: z.ZodString;
5939
+ }, z.core.$strict>, z.ZodObject<{
5940
+ kind: z.ZodLiteral<"source">;
5941
+ filename: z.ZodString;
5942
+ source: z.ZodString;
5943
+ }, z.core.$strict>], "kind">>;
5944
+ requirements: z.ZodOptional<z.ZodObject<{
5945
+ isolation: z.ZodOptional<z.ZodEnum<{
5946
+ local: "local";
5947
+ remote: "remote";
5948
+ container: "container";
5949
+ }>>;
5950
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
5951
+ }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
5952
+ providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
5953
+ }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
5954
+ }, z.core.$strip>;
5955
+ }, z.core.$strict>;
5956
+ response: z.ZodObject<{
5957
+ persisted: z.ZodBoolean;
5958
+ }, z.core.$strip>;
5959
+ };
5960
+ acceptAuthorityRunnerResult: {
5961
+ request: z.ZodObject<{
5962
+ executionId: z.ZodString;
5963
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
5964
+ executionId: z.ZodString;
5965
+ workflowId: z.ZodString;
5966
+ status: z.ZodLiteral<"completed">;
5967
+ artifact: z.ZodOptional<z.ZodObject<{
5968
+ kind: z.ZodString;
5969
+ id: z.ZodString;
5970
+ revision: z.ZodString;
5971
+ scope: z.ZodObject<{
5972
+ level: z.ZodString;
5973
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5974
+ }, z.core.$strip>;
5975
+ schemaVersion: z.ZodString;
5976
+ data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
5977
+ relations: z.ZodArray<z.ZodObject<{
5978
+ type: z.ZodString;
5979
+ target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
5980
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
5981
+ kind: z.ZodString;
5982
+ id: z.ZodString;
5983
+ revision: z.ZodString;
5984
+ }, z.core.$strip>, z.ZodObject<{
5985
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
5986
+ artifact: z.ZodObject<{
5987
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
5988
+ kind: z.ZodString;
5989
+ id: z.ZodString;
5990
+ revision: z.ZodString;
5991
+ }, z.core.$strip>;
5992
+ localId: z.ZodString;
5993
+ }, z.core.$strip>, z.ZodObject<{
5994
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
5995
+ kind: z.ZodString;
5996
+ id: z.ZodString;
5997
+ revision: z.ZodOptional<z.ZodString>;
5998
+ locator: z.ZodOptional<z.ZodString>;
5999
+ }, z.core.$strip>], "refClass">>;
6000
+ }, z.core.$strip>>;
6001
+ confidence: z.ZodOptional<z.ZodObject<{
6002
+ level: z.ZodEnum<{
6003
+ inferred: "inferred";
6004
+ assumed: "assumed";
6005
+ stated: "stated";
6006
+ confirmed: "confirmed";
6007
+ verified: "verified";
6008
+ }>;
6009
+ basis: z.ZodArray<z.ZodObject<{
6010
+ kind: z.ZodString;
6011
+ actor: z.ZodObject<{
6012
+ kind: z.ZodString;
6013
+ id: z.ZodString;
6014
+ displayName: z.ZodOptional<z.ZodString>;
6015
+ }, z.core.$strip>;
6016
+ timestamp: z.ZodNumber;
6017
+ detail: z.ZodOptional<z.ZodString>;
6018
+ evidenceRef: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
6019
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
6020
+ kind: z.ZodString;
6021
+ id: z.ZodString;
6022
+ revision: z.ZodString;
6023
+ }, z.core.$strip>, z.ZodObject<{
6024
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
6025
+ artifact: z.ZodObject<{
6026
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
6027
+ kind: z.ZodString;
6028
+ id: z.ZodString;
6029
+ revision: z.ZodString;
6030
+ }, z.core.$strip>;
6031
+ localId: z.ZodString;
6032
+ }, z.core.$strip>, z.ZodObject<{
6033
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
6034
+ kind: z.ZodString;
6035
+ id: z.ZodString;
6036
+ revision: z.ZodOptional<z.ZodString>;
6037
+ locator: z.ZodOptional<z.ZodString>;
6038
+ }, z.core.$strip>], "refClass">>>;
6039
+ }, z.core.$strip>>;
6040
+ }, z.core.$strip>>;
6041
+ representations: z.ZodOptional<z.ZodObject<{
6042
+ markdown: z.ZodOptional<z.ZodString>;
6043
+ summary: z.ZodOptional<z.ZodString>;
6044
+ plaintext: z.ZodOptional<z.ZodString>;
6045
+ }, z.core.$strip>>;
6046
+ actor: z.ZodObject<{
6047
+ kind: z.ZodString;
6048
+ id: z.ZodString;
6049
+ displayName: z.ZodOptional<z.ZodString>;
6050
+ }, z.core.$strip>;
6051
+ timestamp: z.ZodNumber;
6052
+ createdAt: z.ZodOptional<z.ZodNumber>;
6053
+ }, z.core.$strip>>;
6054
+ }, z.core.$strict>, z.ZodObject<{
6055
+ executionId: z.ZodString;
6056
+ workflowId: z.ZodString;
6057
+ status: z.ZodLiteral<"failed">;
6058
+ error: z.ZodString;
6059
+ }, z.core.$strict>, z.ZodObject<{
6060
+ executionId: z.ZodString;
6061
+ workflowId: z.ZodString;
6062
+ status: z.ZodLiteral<"cancelled">;
6063
+ reason: z.ZodOptional<z.ZodString>;
6064
+ }, z.core.$strict>, z.ZodObject<{
6065
+ executionId: z.ZodString;
6066
+ workflowId: z.ZodString;
6067
+ status: z.ZodLiteral<"paused">;
6068
+ pausedAtGateId: z.ZodString;
6069
+ pausedAtFrameId: z.ZodString;
6070
+ }, z.core.$strict>], "status"> & z.ZodType<{
6071
+ executionId: string;
6072
+ workflowId: string;
6073
+ status: "completed";
6074
+ artifact?: {
6075
+ kind: string;
6076
+ id: string;
6077
+ revision: string;
6078
+ scope: {
6079
+ level: string;
6080
+ ids?: Record<string, string> | undefined;
6081
+ };
6082
+ schemaVersion: string;
6083
+ data: Record<string, unknown>;
6084
+ relations: {
6085
+ type: string;
6086
+ target: {
6087
+ refClass: "artifact";
6088
+ kind: string;
6089
+ id: string;
6090
+ revision: string;
6091
+ } | {
6092
+ refClass: "local";
6093
+ artifact: {
6094
+ refClass: "artifact";
6095
+ kind: string;
6096
+ id: string;
6097
+ revision: string;
6098
+ };
6099
+ localId: string;
6100
+ } | {
6101
+ refClass: "evidence";
6102
+ kind: string;
6103
+ id: string;
6104
+ revision?: string | undefined;
6105
+ locator?: string | undefined;
6106
+ };
6107
+ }[];
6108
+ actor: {
6109
+ kind: string;
6110
+ id: string;
6111
+ displayName?: string | undefined;
6112
+ };
6113
+ timestamp: number;
6114
+ confidence?: {
6115
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
6116
+ basis: {
6117
+ kind: string;
6118
+ actor: {
6119
+ kind: string;
6120
+ id: string;
6121
+ displayName?: string | undefined;
6122
+ };
6123
+ timestamp: number;
6124
+ detail?: string | undefined;
6125
+ evidenceRef?: {
6126
+ refClass: "artifact";
6127
+ kind: string;
6128
+ id: string;
6129
+ revision: string;
6130
+ } | {
6131
+ refClass: "local";
6132
+ artifact: {
6133
+ refClass: "artifact";
6134
+ kind: string;
6135
+ id: string;
6136
+ revision: string;
6137
+ };
6138
+ localId: string;
6139
+ } | {
6140
+ refClass: "evidence";
6141
+ kind: string;
6142
+ id: string;
6143
+ revision?: string | undefined;
6144
+ locator?: string | undefined;
6145
+ } | undefined;
6146
+ }[];
6147
+ } | undefined;
6148
+ representations?: {
6149
+ markdown?: string | undefined;
6150
+ summary?: string | undefined;
6151
+ plaintext?: string | undefined;
6152
+ } | undefined;
6153
+ createdAt?: number | undefined;
6154
+ } | undefined;
6155
+ } | {
6156
+ executionId: string;
6157
+ workflowId: string;
6158
+ status: "failed";
6159
+ error: string;
6160
+ } | {
6161
+ executionId: string;
6162
+ workflowId: string;
6163
+ status: "cancelled";
6164
+ reason?: string | undefined;
6165
+ }, {
6166
+ executionId: string;
6167
+ workflowId: string;
6168
+ status: "completed";
6169
+ artifact?: {
6170
+ kind: string;
6171
+ id: string;
6172
+ revision: string;
6173
+ scope: {
6174
+ level: string;
6175
+ ids?: Record<string, string> | undefined;
6176
+ };
6177
+ schemaVersion: string;
6178
+ data: Record<string, unknown>;
6179
+ relations: {
6180
+ type: string;
6181
+ target: unknown;
6182
+ }[];
6183
+ actor: {
6184
+ kind: string;
6185
+ id: string;
6186
+ displayName?: string | undefined;
6187
+ };
6188
+ timestamp: number;
6189
+ confidence?: {
6190
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
6191
+ basis: {
6192
+ kind: string;
6193
+ actor: {
6194
+ kind: string;
6195
+ id: string;
6196
+ displayName?: string | undefined;
6197
+ };
6198
+ timestamp: number;
6199
+ detail?: string | undefined;
6200
+ evidenceRef?: unknown;
6201
+ }[];
6202
+ } | undefined;
6203
+ representations?: {
6204
+ markdown?: string | undefined;
6205
+ summary?: string | undefined;
6206
+ plaintext?: string | undefined;
6207
+ } | undefined;
6208
+ createdAt?: number | undefined;
6209
+ } | undefined;
6210
+ } | {
6211
+ executionId: string;
6212
+ workflowId: string;
6213
+ status: "failed";
6214
+ error: string;
6215
+ } | {
6216
+ executionId: string;
6217
+ workflowId: string;
6218
+ status: "cancelled";
6219
+ reason?: string | undefined;
6220
+ } | {
6221
+ executionId: string;
6222
+ workflowId: string;
6223
+ status: "paused";
6224
+ pausedAtGateId: string;
6225
+ pausedAtFrameId: string;
6226
+ }, z.core.$ZodTypeInternals<{
6227
+ executionId: string;
6228
+ workflowId: string;
6229
+ status: "completed";
6230
+ artifact?: {
6231
+ kind: string;
6232
+ id: string;
6233
+ revision: string;
6234
+ scope: {
6235
+ level: string;
6236
+ ids?: Record<string, string> | undefined;
6237
+ };
6238
+ schemaVersion: string;
6239
+ data: Record<string, unknown>;
6240
+ relations: {
6241
+ type: string;
6242
+ target: {
6243
+ refClass: "artifact";
6244
+ kind: string;
6245
+ id: string;
6246
+ revision: string;
6247
+ } | {
6248
+ refClass: "local";
6249
+ artifact: {
6250
+ refClass: "artifact";
6251
+ kind: string;
6252
+ id: string;
6253
+ revision: string;
6254
+ };
6255
+ localId: string;
6256
+ } | {
6257
+ refClass: "evidence";
6258
+ kind: string;
6259
+ id: string;
6260
+ revision?: string | undefined;
6261
+ locator?: string | undefined;
6262
+ };
6263
+ }[];
6264
+ actor: {
6265
+ kind: string;
6266
+ id: string;
6267
+ displayName?: string | undefined;
6268
+ };
6269
+ timestamp: number;
6270
+ confidence?: {
6271
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
6272
+ basis: {
6273
+ kind: string;
6274
+ actor: {
6275
+ kind: string;
6276
+ id: string;
6277
+ displayName?: string | undefined;
6278
+ };
6279
+ timestamp: number;
6280
+ detail?: string | undefined;
6281
+ evidenceRef?: {
6282
+ refClass: "artifact";
6283
+ kind: string;
6284
+ id: string;
6285
+ revision: string;
6286
+ } | {
6287
+ refClass: "local";
6288
+ artifact: {
6289
+ refClass: "artifact";
6290
+ kind: string;
6291
+ id: string;
6292
+ revision: string;
6293
+ };
6294
+ localId: string;
6295
+ } | {
6296
+ refClass: "evidence";
6297
+ kind: string;
6298
+ id: string;
6299
+ revision?: string | undefined;
6300
+ locator?: string | undefined;
6301
+ } | undefined;
6302
+ }[];
6303
+ } | undefined;
6304
+ representations?: {
6305
+ markdown?: string | undefined;
6306
+ summary?: string | undefined;
6307
+ plaintext?: string | undefined;
6308
+ } | undefined;
6309
+ createdAt?: number | undefined;
6310
+ } | undefined;
6311
+ } | {
6312
+ executionId: string;
6313
+ workflowId: string;
6314
+ status: "failed";
6315
+ error: string;
6316
+ } | {
6317
+ executionId: string;
6318
+ workflowId: string;
6319
+ status: "cancelled";
6320
+ reason?: string | undefined;
6321
+ }, {
6322
+ executionId: string;
6323
+ workflowId: string;
6324
+ status: "completed";
6325
+ artifact?: {
6326
+ kind: string;
6327
+ id: string;
6328
+ revision: string;
6329
+ scope: {
6330
+ level: string;
6331
+ ids?: Record<string, string> | undefined;
6332
+ };
6333
+ schemaVersion: string;
6334
+ data: Record<string, unknown>;
6335
+ relations: {
6336
+ type: string;
6337
+ target: unknown;
6338
+ }[];
6339
+ actor: {
6340
+ kind: string;
6341
+ id: string;
6342
+ displayName?: string | undefined;
6343
+ };
6344
+ timestamp: number;
6345
+ confidence?: {
6346
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
6347
+ basis: {
6348
+ kind: string;
6349
+ actor: {
6350
+ kind: string;
6351
+ id: string;
6352
+ displayName?: string | undefined;
6353
+ };
6354
+ timestamp: number;
6355
+ detail?: string | undefined;
6356
+ evidenceRef?: unknown;
6357
+ }[];
6358
+ } | undefined;
6359
+ representations?: {
6360
+ markdown?: string | undefined;
6361
+ summary?: string | undefined;
6362
+ plaintext?: string | undefined;
6363
+ } | undefined;
6364
+ createdAt?: number | undefined;
6365
+ } | undefined;
6366
+ } | {
6367
+ executionId: string;
6368
+ workflowId: string;
6369
+ status: "failed";
6370
+ error: string;
6371
+ } | {
6372
+ executionId: string;
6373
+ workflowId: string;
6374
+ status: "cancelled";
6375
+ reason?: string | undefined;
6376
+ } | {
6377
+ executionId: string;
6378
+ workflowId: string;
6379
+ status: "paused";
6380
+ pausedAtGateId: string;
6381
+ pausedAtFrameId: string;
6382
+ }>>;
6383
+ }, z.core.$strict>;
6384
+ response: z.ZodObject<{
6385
+ accepted: z.ZodBoolean;
6386
+ status: z.ZodEnum<{
6387
+ pending: "pending";
6388
+ completed: "completed";
6389
+ cancelled: "cancelled";
6390
+ failed: "failed";
6391
+ running: "running";
6392
+ paused: "paused";
6393
+ finalizing: "finalizing";
6394
+ }>;
6395
+ }, z.core.$strip>;
6396
+ };
6397
+ getExecution: {
6398
+ request: z.ZodObject<{
6399
+ executionId: z.ZodString;
6400
+ }, z.core.$strip>;
6401
+ response: z.ZodObject<{
6402
+ execution: z.ZodNullable<z.ZodObject<{
6403
+ id: z.ZodString;
6404
+ workflowId: z.ZodString;
6405
+ coordinatorSessionId: z.ZodOptional<z.ZodString>;
6406
+ status: z.ZodEnum<{
6407
+ pending: "pending";
4893
6408
  completed: "completed";
4894
6409
  cancelled: "cancelled";
4895
- running: "running";
4896
6410
  failed: "failed";
6411
+ running: "running";
4897
6412
  paused: "paused";
6413
+ finalizing: "finalizing";
4898
6414
  }>;
4899
6415
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
4900
6416
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -4949,9 +6465,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4949
6465
  pending: "pending";
4950
6466
  completed: "completed";
4951
6467
  cancelled: "cancelled";
4952
- running: "running";
4953
6468
  failed: "failed";
6469
+ running: "running";
4954
6470
  paused: "paused";
6471
+ finalizing: "finalizing";
4955
6472
  }>>;
4956
6473
  artifactRef: z.ZodOptional<z.ZodObject<{
4957
6474
  kind: z.ZodString;
@@ -4972,9 +6489,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4972
6489
  pending: "pending";
4973
6490
  completed: "completed";
4974
6491
  cancelled: "cancelled";
4975
- running: "running";
4976
6492
  failed: "failed";
6493
+ running: "running";
4977
6494
  paused: "paused";
6495
+ finalizing: "finalizing";
4978
6496
  }>;
4979
6497
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
4980
6498
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -5028,9 +6546,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5028
6546
  pending: "pending";
5029
6547
  completed: "completed";
5030
6548
  cancelled: "cancelled";
5031
- running: "running";
5032
6549
  failed: "failed";
6550
+ running: "running";
5033
6551
  paused: "paused";
6552
+ finalizing: "finalizing";
5034
6553
  }>;
5035
6554
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
5036
6555
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -5082,8 +6601,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5082
6601
  }>;
5083
6602
  status: z.ZodEnum<{
5084
6603
  completed: "completed";
5085
- running: "running";
5086
6604
  failed: "failed";
6605
+ running: "running";
5087
6606
  skipped: "skipped";
5088
6607
  }>;
5089
6608
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -5113,8 +6632,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5113
6632
  status: z.ZodOptional<z.ZodEnum<{
5114
6633
  cancelled: "cancelled";
5115
6634
  rejected: "rejected";
5116
- resumed: "resumed";
5117
6635
  waiting: "waiting";
6636
+ resumed: "resumed";
5118
6637
  "timed-out": "timed-out";
5119
6638
  }>>;
5120
6639
  limit: z.ZodDefault<z.ZodNumber>;
@@ -5129,8 +6648,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5129
6648
  status: z.ZodEnum<{
5130
6649
  cancelled: "cancelled";
5131
6650
  rejected: "rejected";
5132
- resumed: "resumed";
5133
6651
  waiting: "waiting";
6652
+ resumed: "resumed";
5134
6653
  "timed-out": "timed-out";
5135
6654
  }>;
5136
6655
  autoAction: z.ZodEnum<{
@@ -5209,12 +6728,12 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5209
6728
  frameId: z.ZodString;
5210
6729
  nodeId: z.ZodString;
5211
6730
  nodeType: z.ZodEnum<{
6731
+ sequence: "sequence";
5212
6732
  station: "station";
5213
6733
  "delegate-agent": "delegate-agent";
5214
6734
  "delegate-role": "delegate-role";
5215
- sequence: "sequence";
5216
- gate: "gate";
5217
6735
  parallel: "parallel";
6736
+ gate: "gate";
5218
6737
  iterate: "iterate";
5219
6738
  "iterate-chain": "iterate-chain";
5220
6739
  loop: "loop";
@@ -5225,10 +6744,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5225
6744
  pending: "pending";
5226
6745
  completed: "completed";
5227
6746
  cancelled: "cancelled";
5228
- running: "running";
5229
6747
  failed: "failed";
5230
- skipped: "skipped";
6748
+ running: "running";
5231
6749
  waiting: "waiting";
6750
+ skipped: "skipped";
5232
6751
  }>;
5233
6752
  attempt: z.ZodDefault<z.ZodNumber>;
5234
6753
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -5402,6 +6921,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5402
6921
  }, z.core.$strip>;
5403
6922
  response: z.ZodObject<{
5404
6923
  adapterName: z.ZodString;
6924
+ providerConfigId: z.ZodOptional<z.ZodString>;
5405
6925
  model: z.ZodOptional<z.ZodString>;
5406
6926
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
5407
6927
  none: "none";
@@ -5413,8 +6933,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5413
6933
  harnessId: z.ZodOptional<z.ZodString>;
5414
6934
  systemPrompt: z.ZodOptional<z.ZodString>;
5415
6935
  contextMode: z.ZodOptional<z.ZodEnum<{
5416
- fresh: "fresh";
5417
6936
  fork: "fork";
6937
+ fresh: "fresh";
5418
6938
  }>>;
5419
6939
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5420
6940
  state: z.ZodLiteral<"resolved">;
@@ -5492,6 +7012,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5492
7012
  }, z.core.$strict>, z.ZodObject<{
5493
7013
  state: z.ZodLiteral<"unresolved">;
5494
7014
  }, z.core.$strict>], "state">>;
7015
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
7016
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
7017
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
7018
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
5495
7019
  completion: z.ZodOptional<z.ZodEnum<{
5496
7020
  tool: "tool";
5497
7021
  turn: "turn";
@@ -5508,6 +7032,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5508
7032
  }, z.core.$strip>;
5509
7033
  response: z.ZodObject<{
5510
7034
  adapterName: z.ZodString;
7035
+ providerConfigId: z.ZodOptional<z.ZodString>;
5511
7036
  model: z.ZodOptional<z.ZodString>;
5512
7037
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
5513
7038
  none: "none";
@@ -5519,8 +7044,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5519
7044
  harnessId: z.ZodOptional<z.ZodString>;
5520
7045
  systemPrompt: z.ZodOptional<z.ZodString>;
5521
7046
  contextMode: z.ZodOptional<z.ZodEnum<{
5522
- fresh: "fresh";
5523
7047
  fork: "fork";
7048
+ fresh: "fresh";
5524
7049
  }>>;
5525
7050
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5526
7051
  state: z.ZodLiteral<"resolved">;
@@ -5598,6 +7123,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5598
7123
  }, z.core.$strict>, z.ZodObject<{
5599
7124
  state: z.ZodLiteral<"unresolved">;
5600
7125
  }, z.core.$strict>], "state">>;
7126
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
7127
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
7128
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
7129
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
5601
7130
  completion: z.ZodOptional<z.ZodEnum<{
5602
7131
  tool: "tool";
5603
7132
  turn: "turn";
@@ -5726,6 +7255,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5726
7255
  syncedAt: z.ZodOptional<z.ZodString>;
5727
7256
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
5728
7257
  }, z.core.$strict>], "kind">>;
7258
+ successFinalizerId: z.ZodOptional<z.ZodString>;
5729
7259
  executionHints: z.ZodOptional<z.ZodObject<{
5730
7260
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
5731
7261
  kind: z.ZodLiteral<"path">;
@@ -5812,6 +7342,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5812
7342
  "exit-and-redispatch": "exit-and-redispatch";
5813
7343
  "exit-and-resume": "exit-and-resume";
5814
7344
  }>>;
7345
+ terminalAuthority: z.ZodOptional<z.ZodEnum<{
7346
+ authority: "authority";
7347
+ worker: "worker";
7348
+ }>>;
5815
7349
  }, z.core.$strip>;
5816
7350
  };
5817
7351
  'execution.started': z.ZodObject<{
@@ -5829,6 +7363,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5829
7363
  workflowId: z.ZodString;
5830
7364
  totalDuration: z.ZodNumber;
5831
7365
  completedAt: z.ZodOptional<z.ZodNumber>;
7366
+ transitionKey: z.ZodOptional<z.ZodString>;
5832
7367
  }, z.core.$strip>;
5833
7368
  'execution.failed': z.ZodObject<{
5834
7369
  executionId: z.ZodString;
@@ -5836,12 +7371,14 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5836
7371
  error: z.ZodString;
5837
7372
  failedStepId: z.ZodOptional<z.ZodString>;
5838
7373
  completedAt: z.ZodOptional<z.ZodNumber>;
7374
+ transitionKey: z.ZodOptional<z.ZodString>;
5839
7375
  }, z.core.$strip>;
5840
7376
  'execution.cancelled': z.ZodObject<{
5841
7377
  executionId: z.ZodString;
5842
7378
  workflowId: z.ZodString;
5843
7379
  reason: z.ZodOptional<z.ZodString>;
5844
7380
  completedAt: z.ZodOptional<z.ZodNumber>;
7381
+ transitionKey: z.ZodOptional<z.ZodString>;
5845
7382
  }, z.core.$strip>;
5846
7383
  /**
5847
7384
  * Ephemeral progress signal emitted by a station handler via `ctx.updateProgress()`.
@@ -6034,12 +7571,12 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6034
7571
  frameId: z.ZodString;
6035
7572
  nodeId: z.ZodString;
6036
7573
  nodeType: z.ZodEnum<{
7574
+ sequence: "sequence";
6037
7575
  station: "station";
6038
7576
  "delegate-agent": "delegate-agent";
6039
7577
  "delegate-role": "delegate-role";
6040
- sequence: "sequence";
6041
- gate: "gate";
6042
7578
  parallel: "parallel";
7579
+ gate: "gate";
6043
7580
  iterate: "iterate";
6044
7581
  "iterate-chain": "iterate-chain";
6045
7582
  loop: "loop";
@@ -6163,9 +7700,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6163
7700
  pending: "pending";
6164
7701
  completed: "completed";
6165
7702
  cancelled: "cancelled";
6166
- running: "running";
6167
7703
  failed: "failed";
7704
+ running: "running";
6168
7705
  paused: "paused";
7706
+ finalizing: "finalizing";
6169
7707
  }>;
6170
7708
  startedAt: z.ZodNumber;
6171
7709
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -6194,12 +7732,12 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6194
7732
  frameId: z.ZodString;
6195
7733
  nodeId: z.ZodString;
6196
7734
  nodeType: z.ZodEnum<{
7735
+ sequence: "sequence";
6197
7736
  station: "station";
6198
7737
  "delegate-agent": "delegate-agent";
6199
7738
  "delegate-role": "delegate-role";
6200
- sequence: "sequence";
6201
- gate: "gate";
6202
7739
  parallel: "parallel";
7740
+ gate: "gate";
6203
7741
  iterate: "iterate";
6204
7742
  "iterate-chain": "iterate-chain";
6205
7743
  loop: "loop";
@@ -6209,10 +7747,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6209
7747
  pending: "pending";
6210
7748
  completed: "completed";
6211
7749
  cancelled: "cancelled";
6212
- running: "running";
6213
7750
  failed: "failed";
6214
- skipped: "skipped";
7751
+ running: "running";
6215
7752
  waiting: "waiting";
7753
+ skipped: "skipped";
6216
7754
  }>;
6217
7755
  attempt: z.ZodNumber;
6218
7756
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -6240,9 +7778,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6240
7778
  pending: "pending";
6241
7779
  completed: "completed";
6242
7780
  cancelled: "cancelled";
6243
- running: "running";
6244
7781
  failed: "failed";
7782
+ running: "running";
6245
7783
  paused: "paused";
7784
+ finalizing: "finalizing";
6246
7785
  }>>;
6247
7786
  limit: z.ZodOptional<z.ZodNumber>;
6248
7787
  offset: z.ZodOptional<z.ZodNumber>;
@@ -6256,9 +7795,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6256
7795
  pending: "pending";
6257
7796
  completed: "completed";
6258
7797
  cancelled: "cancelled";
6259
- running: "running";
6260
7798
  failed: "failed";
7799
+ running: "running";
6261
7800
  paused: "paused";
7801
+ finalizing: "finalizing";
6262
7802
  }>;
6263
7803
  startedAt: z.ZodNumber;
6264
7804
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -6291,6 +7831,7 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
6291
7831
  pending: z.ZodNumber;
6292
7832
  running: z.ZodNumber;
6293
7833
  paused: z.ZodNumber;
7834
+ finalizing: z.ZodNumber;
6294
7835
  completed: z.ZodNumber;
6295
7836
  failed: z.ZodNumber;
6296
7837
  cancelled: z.ZodNumber;
@@ -6462,6 +8003,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6462
8003
  syncedAt: z.ZodOptional<z.ZodString>;
6463
8004
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
6464
8005
  }, z.core.$strict>], "kind">>;
8006
+ successFinalizerId: z.ZodOptional<z.ZodString>;
6465
8007
  executionHints: z.ZodOptional<z.ZodObject<{
6466
8008
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6467
8009
  kind: z.ZodLiteral<"path">;
@@ -6578,6 +8120,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6578
8120
  syncedAt: z.ZodOptional<z.ZodString>;
6579
8121
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
6580
8122
  }, z.core.$strict>], "kind">>;
8123
+ successFinalizerId: z.ZodOptional<z.ZodString>;
6581
8124
  executionHints: z.ZodOptional<z.ZodObject<{
6582
8125
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6583
8126
  kind: z.ZodLiteral<"path">;
@@ -6720,6 +8263,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6720
8263
  syncedAt: z.ZodOptional<z.ZodString>;
6721
8264
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
6722
8265
  }, z.core.$strict>], "kind">>;
8266
+ successFinalizerId: z.ZodOptional<z.ZodString>;
6723
8267
  executionHints: z.ZodOptional<z.ZodObject<{
6724
8268
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6725
8269
  kind: z.ZodLiteral<"path">;
@@ -6834,6 +8378,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6834
8378
  syncedAt: z.ZodOptional<z.ZodString>;
6835
8379
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
6836
8380
  }, z.core.$strict>], "kind">>;
8381
+ successFinalizerId: z.ZodOptional<z.ZodString>;
6837
8382
  executionHints: z.ZodOptional<z.ZodObject<{
6838
8383
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6839
8384
  kind: z.ZodLiteral<"path">;
@@ -6946,6 +8491,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6946
8491
  syncedAt: z.ZodOptional<z.ZodString>;
6947
8492
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
6948
8493
  }, z.core.$strict>], "kind">>;
8494
+ successFinalizerId: z.ZodOptional<z.ZodString>;
6949
8495
  executionHints: z.ZodOptional<z.ZodObject<{
6950
8496
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6951
8497
  kind: z.ZodLiteral<"path">;
@@ -7079,42 +8625,602 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7079
8625
  cancelled: z.ZodBoolean;
7080
8626
  }, z.core.$strip>;
7081
8627
  };
7082
- getExecution: {
8628
+ bootstrapAuthorityState: {
7083
8629
  request: z.ZodObject<{
7084
8630
  executionId: z.ZodString;
7085
- }, z.core.$strip>;
7086
- response: z.ZodObject<{
7087
- execution: z.ZodNullable<z.ZodObject<{
8631
+ terminalAuthority: z.ZodLiteral<"authority">;
8632
+ definition: z.ZodObject<{
7088
8633
  id: z.ZodString;
7089
- workflowId: z.ZodString;
7090
- coordinatorSessionId: z.ZodOptional<z.ZodString>;
7091
- status: z.ZodEnum<{
7092
- pending: "pending";
7093
- completed: "completed";
7094
- cancelled: "cancelled";
7095
- running: "running";
7096
- failed: "failed";
7097
- paused: "paused";
7098
- }>;
7099
- inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
7100
- config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
7101
- startedAt: z.ZodNumber;
7102
- completedAt: z.ZodOptional<z.ZodNumber>;
7103
- error: z.ZodOptional<z.ZodString>;
7104
- reason: z.ZodOptional<z.ZodString>;
7105
- triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
7106
- scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
7107
- type: z.ZodLiteral<"global">;
7108
- }, z.core.$strict>, z.ZodObject<{
7109
- type: z.ZodLiteral<"workspace">;
7110
- id: z.ZodString;
7111
- }, z.core.$strict>, z.ZodObject<{
7112
- type: z.ZodLiteral<"session">;
7113
- id: z.ZodString;
7114
- }, z.core.$strict>, z.ZodObject<{
7115
- type: z.ZodLiteral<"external">;
8634
+ name: z.ZodOptional<z.ZodString>;
8635
+ description: z.ZodOptional<z.ZodString>;
8636
+ inputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
8637
+ configSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
8638
+ outputSchema: z.ZodOptional<z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>>;
8639
+ state: z.ZodOptional<z.ZodObject<{
8640
+ schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
8641
+ initial: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
8642
+ }, z.core.$strip>>;
8643
+ artifact: z.ZodOptional<z.ZodObject<{
7116
8644
  kind: z.ZodString;
7117
- id: z.ZodString;
8645
+ schemaVersion: z.ZodString;
8646
+ scope: z.ZodObject<{
8647
+ level: z.ZodString;
8648
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8649
+ }, z.core.$strip>;
8650
+ resolve: z.ZodOptional<z.ZodString>;
8651
+ create: z.ZodOptional<z.ZodString>;
8652
+ statusPath: z.ZodOptional<z.ZodString>;
8653
+ }, z.core.$strip>>;
8654
+ root: z.ZodObject<{
8655
+ id: z.ZodString;
8656
+ when: z.ZodOptional<z.ZodString>;
8657
+ skip: z.ZodOptional<z.ZodString>;
8658
+ writes: z.ZodOptional<z.ZodArray<z.ZodObject<{
8659
+ kind: z.ZodString;
8660
+ schemaVersion: z.ZodString;
8661
+ scope: z.ZodObject<{
8662
+ level: z.ZodString;
8663
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8664
+ }, z.core.$strip>;
8665
+ dataExpression: z.ZodOptional<z.ZodString>;
8666
+ }, z.core.$strip>>>;
8667
+ type: z.ZodLiteral<"sequence">;
8668
+ nodes: z.ZodLazy<z.ZodType<_$_makaio_contracts0.WorkflowNode[], unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.WorkflowNode[], unknown>>>;
8669
+ }, z.core.$strip>;
8670
+ triggers: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
8671
+ type: z.ZodLiteral<"manual">;
8672
+ }, z.core.$strip>, z.ZodObject<{
8673
+ type: z.ZodLiteral<"cron">;
8674
+ schedule: z.ZodString;
8675
+ timezone: z.ZodOptional<z.ZodString>;
8676
+ }, z.core.$strip>, z.ZodObject<{
8677
+ type: z.ZodLiteral<"webhook">;
8678
+ event: z.ZodString;
8679
+ branch: z.ZodOptional<z.ZodString>;
8680
+ repo: z.ZodOptional<z.ZodString>;
8681
+ }, z.core.$strip>, z.ZodObject<{
8682
+ type: z.ZodLiteral<"extension">;
8683
+ extensionType: z.ZodString;
8684
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
8685
+ }, z.core.$strip>, z.ZodObject<{
8686
+ type: z.ZodLiteral<"bus-event">;
8687
+ subject: z.ZodString;
8688
+ filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodObject<{
8689
+ $in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
8690
+ }, z.core.$strict>, z.ZodObject<{
8691
+ $ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
8692
+ }, z.core.$strict>, z.ZodObject<{
8693
+ $exists: z.ZodBoolean;
8694
+ }, z.core.$strict>, z.ZodObject<{
8695
+ $startsWith: z.ZodString;
8696
+ }, z.core.$strict>, z.ZodObject<{
8697
+ $endsWith: z.ZodString;
8698
+ }, z.core.$strict>]>>>;
8699
+ filterExpression: z.ZodOptional<z.ZodString>;
8700
+ }, z.core.$strip>], "type">>>;
8701
+ scope: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
8702
+ type: z.ZodLiteral<"global">;
8703
+ }, z.core.$strict>, z.ZodObject<{
8704
+ type: z.ZodLiteral<"workspace">;
8705
+ id: z.ZodString;
8706
+ }, z.core.$strict>, z.ZodObject<{
8707
+ type: z.ZodLiteral<"session">;
8708
+ id: z.ZodString;
8709
+ }, z.core.$strict>, z.ZodObject<{
8710
+ type: z.ZodLiteral<"external">;
8711
+ kind: z.ZodString;
8712
+ id: z.ZodString;
8713
+ }, z.core.$strict>], "type">>;
8714
+ canvasLayout: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
8715
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
8716
+ kind: z.ZodLiteral<"editor">;
8717
+ }, z.core.$strict>, z.ZodObject<{
8718
+ kind: z.ZodLiteral<"extension">;
8719
+ extension: z.ZodString;
8720
+ externalId: z.ZodOptional<z.ZodString>;
8721
+ syncedAt: z.ZodOptional<z.ZodString>;
8722
+ metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
8723
+ }, z.core.$strict>], "kind">>;
8724
+ successFinalizerId: z.ZodOptional<z.ZodString>;
8725
+ executionHints: z.ZodOptional<z.ZodObject<{
8726
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
8727
+ kind: z.ZodLiteral<"path">;
8728
+ path: z.ZodString;
8729
+ }, z.core.$strict>, z.ZodObject<{
8730
+ kind: z.ZodLiteral<"source">;
8731
+ filename: z.ZodString;
8732
+ source: z.ZodString;
8733
+ }, z.core.$strict>], "kind">>;
8734
+ requirements: z.ZodOptional<z.ZodObject<{
8735
+ isolation: z.ZodOptional<z.ZodEnum<{
8736
+ local: "local";
8737
+ remote: "remote";
8738
+ container: "container";
8739
+ }>>;
8740
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
8741
+ }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
8742
+ providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
8743
+ }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
8744
+ }, z.core.$strip>;
8745
+ }, z.core.$strict>;
8746
+ response: z.ZodObject<{
8747
+ persisted: z.ZodBoolean;
8748
+ }, z.core.$strip>;
8749
+ };
8750
+ acceptAuthorityRunnerResult: {
8751
+ request: z.ZodObject<{
8752
+ executionId: z.ZodString;
8753
+ result: z.ZodDiscriminatedUnion<[z.ZodObject<{
8754
+ executionId: z.ZodString;
8755
+ workflowId: z.ZodString;
8756
+ status: z.ZodLiteral<"completed">;
8757
+ artifact: z.ZodOptional<z.ZodObject<{
8758
+ kind: z.ZodString;
8759
+ id: z.ZodString;
8760
+ revision: z.ZodString;
8761
+ scope: z.ZodObject<{
8762
+ level: z.ZodString;
8763
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8764
+ }, z.core.$strip>;
8765
+ schemaVersion: z.ZodString;
8766
+ data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
8767
+ relations: z.ZodArray<z.ZodObject<{
8768
+ type: z.ZodString;
8769
+ target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
8770
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
8771
+ kind: z.ZodString;
8772
+ id: z.ZodString;
8773
+ revision: z.ZodString;
8774
+ }, z.core.$strip>, z.ZodObject<{
8775
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
8776
+ artifact: z.ZodObject<{
8777
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
8778
+ kind: z.ZodString;
8779
+ id: z.ZodString;
8780
+ revision: z.ZodString;
8781
+ }, z.core.$strip>;
8782
+ localId: z.ZodString;
8783
+ }, z.core.$strip>, z.ZodObject<{
8784
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
8785
+ kind: z.ZodString;
8786
+ id: z.ZodString;
8787
+ revision: z.ZodOptional<z.ZodString>;
8788
+ locator: z.ZodOptional<z.ZodString>;
8789
+ }, z.core.$strip>], "refClass">>;
8790
+ }, z.core.$strip>>;
8791
+ confidence: z.ZodOptional<z.ZodObject<{
8792
+ level: z.ZodEnum<{
8793
+ inferred: "inferred";
8794
+ assumed: "assumed";
8795
+ stated: "stated";
8796
+ confirmed: "confirmed";
8797
+ verified: "verified";
8798
+ }>;
8799
+ basis: z.ZodArray<z.ZodObject<{
8800
+ kind: z.ZodString;
8801
+ actor: z.ZodObject<{
8802
+ kind: z.ZodString;
8803
+ id: z.ZodString;
8804
+ displayName: z.ZodOptional<z.ZodString>;
8805
+ }, z.core.$strip>;
8806
+ timestamp: z.ZodNumber;
8807
+ detail: z.ZodOptional<z.ZodString>;
8808
+ evidenceRef: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
8809
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
8810
+ kind: z.ZodString;
8811
+ id: z.ZodString;
8812
+ revision: z.ZodString;
8813
+ }, z.core.$strip>, z.ZodObject<{
8814
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
8815
+ artifact: z.ZodObject<{
8816
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
8817
+ kind: z.ZodString;
8818
+ id: z.ZodString;
8819
+ revision: z.ZodString;
8820
+ }, z.core.$strip>;
8821
+ localId: z.ZodString;
8822
+ }, z.core.$strip>, z.ZodObject<{
8823
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
8824
+ kind: z.ZodString;
8825
+ id: z.ZodString;
8826
+ revision: z.ZodOptional<z.ZodString>;
8827
+ locator: z.ZodOptional<z.ZodString>;
8828
+ }, z.core.$strip>], "refClass">>>;
8829
+ }, z.core.$strip>>;
8830
+ }, z.core.$strip>>;
8831
+ representations: z.ZodOptional<z.ZodObject<{
8832
+ markdown: z.ZodOptional<z.ZodString>;
8833
+ summary: z.ZodOptional<z.ZodString>;
8834
+ plaintext: z.ZodOptional<z.ZodString>;
8835
+ }, z.core.$strip>>;
8836
+ actor: z.ZodObject<{
8837
+ kind: z.ZodString;
8838
+ id: z.ZodString;
8839
+ displayName: z.ZodOptional<z.ZodString>;
8840
+ }, z.core.$strip>;
8841
+ timestamp: z.ZodNumber;
8842
+ createdAt: z.ZodOptional<z.ZodNumber>;
8843
+ }, z.core.$strip>>;
8844
+ }, z.core.$strict>, z.ZodObject<{
8845
+ executionId: z.ZodString;
8846
+ workflowId: z.ZodString;
8847
+ status: z.ZodLiteral<"failed">;
8848
+ error: z.ZodString;
8849
+ }, z.core.$strict>, z.ZodObject<{
8850
+ executionId: z.ZodString;
8851
+ workflowId: z.ZodString;
8852
+ status: z.ZodLiteral<"cancelled">;
8853
+ reason: z.ZodOptional<z.ZodString>;
8854
+ }, z.core.$strict>, z.ZodObject<{
8855
+ executionId: z.ZodString;
8856
+ workflowId: z.ZodString;
8857
+ status: z.ZodLiteral<"paused">;
8858
+ pausedAtGateId: z.ZodString;
8859
+ pausedAtFrameId: z.ZodString;
8860
+ }, z.core.$strict>], "status"> & z.ZodType<{
8861
+ executionId: string;
8862
+ workflowId: string;
8863
+ status: "completed";
8864
+ artifact?: {
8865
+ kind: string;
8866
+ id: string;
8867
+ revision: string;
8868
+ scope: {
8869
+ level: string;
8870
+ ids?: Record<string, string> | undefined;
8871
+ };
8872
+ schemaVersion: string;
8873
+ data: Record<string, unknown>;
8874
+ relations: {
8875
+ type: string;
8876
+ target: {
8877
+ refClass: "artifact";
8878
+ kind: string;
8879
+ id: string;
8880
+ revision: string;
8881
+ } | {
8882
+ refClass: "local";
8883
+ artifact: {
8884
+ refClass: "artifact";
8885
+ kind: string;
8886
+ id: string;
8887
+ revision: string;
8888
+ };
8889
+ localId: string;
8890
+ } | {
8891
+ refClass: "evidence";
8892
+ kind: string;
8893
+ id: string;
8894
+ revision?: string | undefined;
8895
+ locator?: string | undefined;
8896
+ };
8897
+ }[];
8898
+ actor: {
8899
+ kind: string;
8900
+ id: string;
8901
+ displayName?: string | undefined;
8902
+ };
8903
+ timestamp: number;
8904
+ confidence?: {
8905
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
8906
+ basis: {
8907
+ kind: string;
8908
+ actor: {
8909
+ kind: string;
8910
+ id: string;
8911
+ displayName?: string | undefined;
8912
+ };
8913
+ timestamp: number;
8914
+ detail?: string | undefined;
8915
+ evidenceRef?: {
8916
+ refClass: "artifact";
8917
+ kind: string;
8918
+ id: string;
8919
+ revision: string;
8920
+ } | {
8921
+ refClass: "local";
8922
+ artifact: {
8923
+ refClass: "artifact";
8924
+ kind: string;
8925
+ id: string;
8926
+ revision: string;
8927
+ };
8928
+ localId: string;
8929
+ } | {
8930
+ refClass: "evidence";
8931
+ kind: string;
8932
+ id: string;
8933
+ revision?: string | undefined;
8934
+ locator?: string | undefined;
8935
+ } | undefined;
8936
+ }[];
8937
+ } | undefined;
8938
+ representations?: {
8939
+ markdown?: string | undefined;
8940
+ summary?: string | undefined;
8941
+ plaintext?: string | undefined;
8942
+ } | undefined;
8943
+ createdAt?: number | undefined;
8944
+ } | undefined;
8945
+ } | {
8946
+ executionId: string;
8947
+ workflowId: string;
8948
+ status: "failed";
8949
+ error: string;
8950
+ } | {
8951
+ executionId: string;
8952
+ workflowId: string;
8953
+ status: "cancelled";
8954
+ reason?: string | undefined;
8955
+ }, {
8956
+ executionId: string;
8957
+ workflowId: string;
8958
+ status: "completed";
8959
+ artifact?: {
8960
+ kind: string;
8961
+ id: string;
8962
+ revision: string;
8963
+ scope: {
8964
+ level: string;
8965
+ ids?: Record<string, string> | undefined;
8966
+ };
8967
+ schemaVersion: string;
8968
+ data: Record<string, unknown>;
8969
+ relations: {
8970
+ type: string;
8971
+ target: unknown;
8972
+ }[];
8973
+ actor: {
8974
+ kind: string;
8975
+ id: string;
8976
+ displayName?: string | undefined;
8977
+ };
8978
+ timestamp: number;
8979
+ confidence?: {
8980
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
8981
+ basis: {
8982
+ kind: string;
8983
+ actor: {
8984
+ kind: string;
8985
+ id: string;
8986
+ displayName?: string | undefined;
8987
+ };
8988
+ timestamp: number;
8989
+ detail?: string | undefined;
8990
+ evidenceRef?: unknown;
8991
+ }[];
8992
+ } | undefined;
8993
+ representations?: {
8994
+ markdown?: string | undefined;
8995
+ summary?: string | undefined;
8996
+ plaintext?: string | undefined;
8997
+ } | undefined;
8998
+ createdAt?: number | undefined;
8999
+ } | undefined;
9000
+ } | {
9001
+ executionId: string;
9002
+ workflowId: string;
9003
+ status: "failed";
9004
+ error: string;
9005
+ } | {
9006
+ executionId: string;
9007
+ workflowId: string;
9008
+ status: "cancelled";
9009
+ reason?: string | undefined;
9010
+ } | {
9011
+ executionId: string;
9012
+ workflowId: string;
9013
+ status: "paused";
9014
+ pausedAtGateId: string;
9015
+ pausedAtFrameId: string;
9016
+ }, z.core.$ZodTypeInternals<{
9017
+ executionId: string;
9018
+ workflowId: string;
9019
+ status: "completed";
9020
+ artifact?: {
9021
+ kind: string;
9022
+ id: string;
9023
+ revision: string;
9024
+ scope: {
9025
+ level: string;
9026
+ ids?: Record<string, string> | undefined;
9027
+ };
9028
+ schemaVersion: string;
9029
+ data: Record<string, unknown>;
9030
+ relations: {
9031
+ type: string;
9032
+ target: {
9033
+ refClass: "artifact";
9034
+ kind: string;
9035
+ id: string;
9036
+ revision: string;
9037
+ } | {
9038
+ refClass: "local";
9039
+ artifact: {
9040
+ refClass: "artifact";
9041
+ kind: string;
9042
+ id: string;
9043
+ revision: string;
9044
+ };
9045
+ localId: string;
9046
+ } | {
9047
+ refClass: "evidence";
9048
+ kind: string;
9049
+ id: string;
9050
+ revision?: string | undefined;
9051
+ locator?: string | undefined;
9052
+ };
9053
+ }[];
9054
+ actor: {
9055
+ kind: string;
9056
+ id: string;
9057
+ displayName?: string | undefined;
9058
+ };
9059
+ timestamp: number;
9060
+ confidence?: {
9061
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
9062
+ basis: {
9063
+ kind: string;
9064
+ actor: {
9065
+ kind: string;
9066
+ id: string;
9067
+ displayName?: string | undefined;
9068
+ };
9069
+ timestamp: number;
9070
+ detail?: string | undefined;
9071
+ evidenceRef?: {
9072
+ refClass: "artifact";
9073
+ kind: string;
9074
+ id: string;
9075
+ revision: string;
9076
+ } | {
9077
+ refClass: "local";
9078
+ artifact: {
9079
+ refClass: "artifact";
9080
+ kind: string;
9081
+ id: string;
9082
+ revision: string;
9083
+ };
9084
+ localId: string;
9085
+ } | {
9086
+ refClass: "evidence";
9087
+ kind: string;
9088
+ id: string;
9089
+ revision?: string | undefined;
9090
+ locator?: string | undefined;
9091
+ } | undefined;
9092
+ }[];
9093
+ } | undefined;
9094
+ representations?: {
9095
+ markdown?: string | undefined;
9096
+ summary?: string | undefined;
9097
+ plaintext?: string | undefined;
9098
+ } | undefined;
9099
+ createdAt?: number | undefined;
9100
+ } | undefined;
9101
+ } | {
9102
+ executionId: string;
9103
+ workflowId: string;
9104
+ status: "failed";
9105
+ error: string;
9106
+ } | {
9107
+ executionId: string;
9108
+ workflowId: string;
9109
+ status: "cancelled";
9110
+ reason?: string | undefined;
9111
+ }, {
9112
+ executionId: string;
9113
+ workflowId: string;
9114
+ status: "completed";
9115
+ artifact?: {
9116
+ kind: string;
9117
+ id: string;
9118
+ revision: string;
9119
+ scope: {
9120
+ level: string;
9121
+ ids?: Record<string, string> | undefined;
9122
+ };
9123
+ schemaVersion: string;
9124
+ data: Record<string, unknown>;
9125
+ relations: {
9126
+ type: string;
9127
+ target: unknown;
9128
+ }[];
9129
+ actor: {
9130
+ kind: string;
9131
+ id: string;
9132
+ displayName?: string | undefined;
9133
+ };
9134
+ timestamp: number;
9135
+ confidence?: {
9136
+ level: "inferred" | "assumed" | "stated" | "confirmed" | "verified";
9137
+ basis: {
9138
+ kind: string;
9139
+ actor: {
9140
+ kind: string;
9141
+ id: string;
9142
+ displayName?: string | undefined;
9143
+ };
9144
+ timestamp: number;
9145
+ detail?: string | undefined;
9146
+ evidenceRef?: unknown;
9147
+ }[];
9148
+ } | undefined;
9149
+ representations?: {
9150
+ markdown?: string | undefined;
9151
+ summary?: string | undefined;
9152
+ plaintext?: string | undefined;
9153
+ } | undefined;
9154
+ createdAt?: number | undefined;
9155
+ } | undefined;
9156
+ } | {
9157
+ executionId: string;
9158
+ workflowId: string;
9159
+ status: "failed";
9160
+ error: string;
9161
+ } | {
9162
+ executionId: string;
9163
+ workflowId: string;
9164
+ status: "cancelled";
9165
+ reason?: string | undefined;
9166
+ } | {
9167
+ executionId: string;
9168
+ workflowId: string;
9169
+ status: "paused";
9170
+ pausedAtGateId: string;
9171
+ pausedAtFrameId: string;
9172
+ }>>;
9173
+ }, z.core.$strict>;
9174
+ response: z.ZodObject<{
9175
+ accepted: z.ZodBoolean;
9176
+ status: z.ZodEnum<{
9177
+ pending: "pending";
9178
+ completed: "completed";
9179
+ cancelled: "cancelled";
9180
+ failed: "failed";
9181
+ running: "running";
9182
+ paused: "paused";
9183
+ finalizing: "finalizing";
9184
+ }>;
9185
+ }, z.core.$strip>;
9186
+ };
9187
+ getExecution: {
9188
+ request: z.ZodObject<{
9189
+ executionId: z.ZodString;
9190
+ }, z.core.$strip>;
9191
+ response: z.ZodObject<{
9192
+ execution: z.ZodNullable<z.ZodObject<{
9193
+ id: z.ZodString;
9194
+ workflowId: z.ZodString;
9195
+ coordinatorSessionId: z.ZodOptional<z.ZodString>;
9196
+ status: z.ZodEnum<{
9197
+ pending: "pending";
9198
+ completed: "completed";
9199
+ cancelled: "cancelled";
9200
+ failed: "failed";
9201
+ running: "running";
9202
+ paused: "paused";
9203
+ finalizing: "finalizing";
9204
+ }>;
9205
+ inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
9206
+ config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9207
+ startedAt: z.ZodNumber;
9208
+ completedAt: z.ZodOptional<z.ZodNumber>;
9209
+ error: z.ZodOptional<z.ZodString>;
9210
+ reason: z.ZodOptional<z.ZodString>;
9211
+ triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9212
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
9213
+ type: z.ZodLiteral<"global">;
9214
+ }, z.core.$strict>, z.ZodObject<{
9215
+ type: z.ZodLiteral<"workspace">;
9216
+ id: z.ZodString;
9217
+ }, z.core.$strict>, z.ZodObject<{
9218
+ type: z.ZodLiteral<"session">;
9219
+ id: z.ZodString;
9220
+ }, z.core.$strict>, z.ZodObject<{
9221
+ type: z.ZodLiteral<"external">;
9222
+ kind: z.ZodString;
9223
+ id: z.ZodString;
7118
9224
  }, z.core.$strict>], "type">;
7119
9225
  artifactRef: z.ZodOptional<z.ZodObject<{
7120
9226
  kind: z.ZodString;
@@ -7149,9 +9255,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7149
9255
  pending: "pending";
7150
9256
  completed: "completed";
7151
9257
  cancelled: "cancelled";
7152
- running: "running";
7153
9258
  failed: "failed";
9259
+ running: "running";
7154
9260
  paused: "paused";
9261
+ finalizing: "finalizing";
7155
9262
  }>>;
7156
9263
  artifactRef: z.ZodOptional<z.ZodObject<{
7157
9264
  kind: z.ZodString;
@@ -7172,9 +9279,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7172
9279
  pending: "pending";
7173
9280
  completed: "completed";
7174
9281
  cancelled: "cancelled";
7175
- running: "running";
7176
9282
  failed: "failed";
9283
+ running: "running";
7177
9284
  paused: "paused";
9285
+ finalizing: "finalizing";
7178
9286
  }>;
7179
9287
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
7180
9288
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -7228,9 +9336,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7228
9336
  pending: "pending";
7229
9337
  completed: "completed";
7230
9338
  cancelled: "cancelled";
7231
- running: "running";
7232
9339
  failed: "failed";
9340
+ running: "running";
7233
9341
  paused: "paused";
9342
+ finalizing: "finalizing";
7234
9343
  }>;
7235
9344
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
7236
9345
  config: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
@@ -7282,8 +9391,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7282
9391
  }>;
7283
9392
  status: z.ZodEnum<{
7284
9393
  completed: "completed";
7285
- running: "running";
7286
9394
  failed: "failed";
9395
+ running: "running";
7287
9396
  skipped: "skipped";
7288
9397
  }>;
7289
9398
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -7313,8 +9422,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7313
9422
  status: z.ZodOptional<z.ZodEnum<{
7314
9423
  cancelled: "cancelled";
7315
9424
  rejected: "rejected";
7316
- resumed: "resumed";
7317
9425
  waiting: "waiting";
9426
+ resumed: "resumed";
7318
9427
  "timed-out": "timed-out";
7319
9428
  }>>;
7320
9429
  limit: z.ZodDefault<z.ZodNumber>;
@@ -7329,8 +9438,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7329
9438
  status: z.ZodEnum<{
7330
9439
  cancelled: "cancelled";
7331
9440
  rejected: "rejected";
7332
- resumed: "resumed";
7333
9441
  waiting: "waiting";
9442
+ resumed: "resumed";
7334
9443
  "timed-out": "timed-out";
7335
9444
  }>;
7336
9445
  autoAction: z.ZodEnum<{
@@ -7409,12 +9518,12 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7409
9518
  frameId: z.ZodString;
7410
9519
  nodeId: z.ZodString;
7411
9520
  nodeType: z.ZodEnum<{
9521
+ sequence: "sequence";
7412
9522
  station: "station";
7413
9523
  "delegate-agent": "delegate-agent";
7414
9524
  "delegate-role": "delegate-role";
7415
- sequence: "sequence";
7416
- gate: "gate";
7417
9525
  parallel: "parallel";
9526
+ gate: "gate";
7418
9527
  iterate: "iterate";
7419
9528
  "iterate-chain": "iterate-chain";
7420
9529
  loop: "loop";
@@ -7425,10 +9534,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7425
9534
  pending: "pending";
7426
9535
  completed: "completed";
7427
9536
  cancelled: "cancelled";
7428
- running: "running";
7429
9537
  failed: "failed";
7430
- skipped: "skipped";
9538
+ running: "running";
7431
9539
  waiting: "waiting";
9540
+ skipped: "skipped";
7432
9541
  }>;
7433
9542
  attempt: z.ZodDefault<z.ZodNumber>;
7434
9543
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -7602,6 +9711,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7602
9711
  }, z.core.$strip>;
7603
9712
  response: z.ZodObject<{
7604
9713
  adapterName: z.ZodString;
9714
+ providerConfigId: z.ZodOptional<z.ZodString>;
7605
9715
  model: z.ZodOptional<z.ZodString>;
7606
9716
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
7607
9717
  none: "none";
@@ -7613,8 +9723,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7613
9723
  harnessId: z.ZodOptional<z.ZodString>;
7614
9724
  systemPrompt: z.ZodOptional<z.ZodString>;
7615
9725
  contextMode: z.ZodOptional<z.ZodEnum<{
7616
- fresh: "fresh";
7617
9726
  fork: "fork";
9727
+ fresh: "fresh";
7618
9728
  }>>;
7619
9729
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7620
9730
  state: z.ZodLiteral<"resolved">;
@@ -7692,6 +9802,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7692
9802
  }, z.core.$strict>, z.ZodObject<{
7693
9803
  state: z.ZodLiteral<"unresolved">;
7694
9804
  }, z.core.$strict>], "state">>;
9805
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9806
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9807
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9808
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
7695
9809
  completion: z.ZodOptional<z.ZodEnum<{
7696
9810
  tool: "tool";
7697
9811
  turn: "turn";
@@ -7708,6 +9822,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7708
9822
  }, z.core.$strip>;
7709
9823
  response: z.ZodObject<{
7710
9824
  adapterName: z.ZodString;
9825
+ providerConfigId: z.ZodOptional<z.ZodString>;
7711
9826
  model: z.ZodOptional<z.ZodString>;
7712
9827
  reasoningEffort: z.ZodOptional<z.ZodEnum<{
7713
9828
  none: "none";
@@ -7719,8 +9834,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7719
9834
  harnessId: z.ZodOptional<z.ZodString>;
7720
9835
  systemPrompt: z.ZodOptional<z.ZodString>;
7721
9836
  contextMode: z.ZodOptional<z.ZodEnum<{
7722
- fresh: "fresh";
7723
9837
  fork: "fork";
9838
+ fresh: "fresh";
7724
9839
  }>>;
7725
9840
  providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7726
9841
  state: z.ZodLiteral<"resolved">;
@@ -7798,6 +9913,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7798
9913
  }, z.core.$strict>, z.ZodObject<{
7799
9914
  state: z.ZodLiteral<"unresolved">;
7800
9915
  }, z.core.$strict>], "state">>;
9916
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9917
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9918
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9919
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
7801
9920
  completion: z.ZodOptional<z.ZodEnum<{
7802
9921
  tool: "tool";
7803
9922
  turn: "turn";
@@ -7926,6 +10045,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7926
10045
  syncedAt: z.ZodOptional<z.ZodString>;
7927
10046
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
7928
10047
  }, z.core.$strict>], "kind">>;
10048
+ successFinalizerId: z.ZodOptional<z.ZodString>;
7929
10049
  executionHints: z.ZodOptional<z.ZodObject<{
7930
10050
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
7931
10051
  kind: z.ZodLiteral<"path">;
@@ -8012,6 +10132,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8012
10132
  "exit-and-redispatch": "exit-and-redispatch";
8013
10133
  "exit-and-resume": "exit-and-resume";
8014
10134
  }>>;
10135
+ terminalAuthority: z.ZodOptional<z.ZodEnum<{
10136
+ authority: "authority";
10137
+ worker: "worker";
10138
+ }>>;
8015
10139
  }, z.core.$strip>;
8016
10140
  };
8017
10141
  'execution.started': z.ZodObject<{
@@ -8029,6 +10153,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8029
10153
  workflowId: z.ZodString;
8030
10154
  totalDuration: z.ZodNumber;
8031
10155
  completedAt: z.ZodOptional<z.ZodNumber>;
10156
+ transitionKey: z.ZodOptional<z.ZodString>;
8032
10157
  }, z.core.$strip>;
8033
10158
  'execution.failed': z.ZodObject<{
8034
10159
  executionId: z.ZodString;
@@ -8036,12 +10161,14 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8036
10161
  error: z.ZodString;
8037
10162
  failedStepId: z.ZodOptional<z.ZodString>;
8038
10163
  completedAt: z.ZodOptional<z.ZodNumber>;
10164
+ transitionKey: z.ZodOptional<z.ZodString>;
8039
10165
  }, z.core.$strip>;
8040
10166
  'execution.cancelled': z.ZodObject<{
8041
10167
  executionId: z.ZodString;
8042
10168
  workflowId: z.ZodString;
8043
10169
  reason: z.ZodOptional<z.ZodString>;
8044
10170
  completedAt: z.ZodOptional<z.ZodNumber>;
10171
+ transitionKey: z.ZodOptional<z.ZodString>;
8045
10172
  }, z.core.$strip>;
8046
10173
  /**
8047
10174
  * Ephemeral progress signal emitted by a station handler via `ctx.updateProgress()`.
@@ -8234,12 +10361,12 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8234
10361
  frameId: z.ZodString;
8235
10362
  nodeId: z.ZodString;
8236
10363
  nodeType: z.ZodEnum<{
10364
+ sequence: "sequence";
8237
10365
  station: "station";
8238
10366
  "delegate-agent": "delegate-agent";
8239
10367
  "delegate-role": "delegate-role";
8240
- sequence: "sequence";
8241
- gate: "gate";
8242
10368
  parallel: "parallel";
10369
+ gate: "gate";
8243
10370
  iterate: "iterate";
8244
10371
  "iterate-chain": "iterate-chain";
8245
10372
  loop: "loop";
@@ -8363,9 +10490,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8363
10490
  pending: "pending";
8364
10491
  completed: "completed";
8365
10492
  cancelled: "cancelled";
8366
- running: "running";
8367
10493
  failed: "failed";
10494
+ running: "running";
8368
10495
  paused: "paused";
10496
+ finalizing: "finalizing";
8369
10497
  }>;
8370
10498
  startedAt: z.ZodNumber;
8371
10499
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -8394,12 +10522,12 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8394
10522
  frameId: z.ZodString;
8395
10523
  nodeId: z.ZodString;
8396
10524
  nodeType: z.ZodEnum<{
10525
+ sequence: "sequence";
8397
10526
  station: "station";
8398
10527
  "delegate-agent": "delegate-agent";
8399
10528
  "delegate-role": "delegate-role";
8400
- sequence: "sequence";
8401
- gate: "gate";
8402
10529
  parallel: "parallel";
10530
+ gate: "gate";
8403
10531
  iterate: "iterate";
8404
10532
  "iterate-chain": "iterate-chain";
8405
10533
  loop: "loop";
@@ -8409,10 +10537,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8409
10537
  pending: "pending";
8410
10538
  completed: "completed";
8411
10539
  cancelled: "cancelled";
8412
- running: "running";
8413
10540
  failed: "failed";
8414
- skipped: "skipped";
10541
+ running: "running";
8415
10542
  waiting: "waiting";
10543
+ skipped: "skipped";
8416
10544
  }>;
8417
10545
  attempt: z.ZodNumber;
8418
10546
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -8440,9 +10568,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8440
10568
  pending: "pending";
8441
10569
  completed: "completed";
8442
10570
  cancelled: "cancelled";
8443
- running: "running";
8444
10571
  failed: "failed";
10572
+ running: "running";
8445
10573
  paused: "paused";
10574
+ finalizing: "finalizing";
8446
10575
  }>>;
8447
10576
  limit: z.ZodOptional<z.ZodNumber>;
8448
10577
  offset: z.ZodOptional<z.ZodNumber>;
@@ -8456,9 +10585,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8456
10585
  pending: "pending";
8457
10586
  completed: "completed";
8458
10587
  cancelled: "cancelled";
8459
- running: "running";
8460
10588
  failed: "failed";
10589
+ running: "running";
8461
10590
  paused: "paused";
10591
+ finalizing: "finalizing";
8462
10592
  }>;
8463
10593
  startedAt: z.ZodNumber;
8464
10594
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -8491,6 +10621,7 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
8491
10621
  pending: z.ZodNumber;
8492
10622
  running: z.ZodNumber;
8493
10623
  paused: z.ZodNumber;
10624
+ finalizing: z.ZodNumber;
8494
10625
  completed: z.ZodNumber;
8495
10626
  failed: z.ZodNumber;
8496
10627
  cancelled: z.ZodNumber;
@@ -8703,6 +10834,7 @@ declare const WorkflowRunContextSchema$1: z.ZodObject<{
8703
10834
  syncedAt: z.ZodOptional<z.ZodString>;
8704
10835
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
8705
10836
  }, z.core.$strict>], "kind">>;
10837
+ successFinalizerId: z.ZodOptional<z.ZodString>;
8706
10838
  executionHints: z.ZodOptional<z.ZodObject<{
8707
10839
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
8708
10840
  kind: z.ZodLiteral<"path">;
@@ -8789,6 +10921,10 @@ declare const WorkflowRunContextSchema$1: z.ZodObject<{
8789
10921
  "exit-and-redispatch": "exit-and-redispatch";
8790
10922
  "exit-and-resume": "exit-and-resume";
8791
10923
  }>>;
10924
+ terminalAuthority: z.ZodOptional<z.ZodEnum<{
10925
+ authority: "authority";
10926
+ worker: "worker";
10927
+ }>>;
8792
10928
  }, z.core.$strip>;
8793
10929
  type WorkflowRunContext = z.infer<typeof WorkflowRunContextSchema$1>;
8794
10930
  //#endregion
@@ -9066,6 +11202,7 @@ declare const WorkflowWorkerConfigSchema$1: z.ZodObject<{
9066
11202
  syncedAt: z.ZodOptional<z.ZodString>;
9067
11203
  metadata: z.ZodDefault<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9068
11204
  }, z.core.$strict>], "kind">>;
11205
+ successFinalizerId: z.ZodOptional<z.ZodString>;
9069
11206
  executionHints: z.ZodOptional<z.ZodObject<{
9070
11207
  source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
9071
11208
  kind: z.ZodLiteral<"path">;
@@ -9153,6 +11290,10 @@ declare const WorkflowWorkerConfigSchema$1: z.ZodObject<{
9153
11290
  "exit-and-redispatch": "exit-and-redispatch";
9154
11291
  "exit-and-resume": "exit-and-resume";
9155
11292
  }>>;
11293
+ terminalAuthority: z.ZodOptional<z.ZodEnum<{
11294
+ authority: "authority";
11295
+ worker: "worker";
11296
+ }>>;
9156
11297
  }, z.core.$strip>;
9157
11298
  type WorkflowWorkerConfig$1 = z.infer<typeof WorkflowWorkerConfigSchema$1>;
9158
11299
  /**
@@ -9594,9 +11735,10 @@ declare const WorkLogExecutionSummarySchema: z.ZodObject<{
9594
11735
  pending: "pending";
9595
11736
  completed: "completed";
9596
11737
  cancelled: "cancelled";
9597
- running: "running";
9598
11738
  failed: "failed";
11739
+ running: "running";
9599
11740
  paused: "paused";
11741
+ finalizing: "finalizing";
9600
11742
  }>;
9601
11743
  startedAt: z.ZodNumber;
9602
11744
  completedAt: z.ZodOptional<z.ZodNumber>;
@@ -9621,12 +11763,12 @@ declare const WorkLogFrameEntrySchema$1: z.ZodObject<{
9621
11763
  frameId: z.ZodString;
9622
11764
  nodeId: z.ZodString;
9623
11765
  nodeType: z.ZodEnum<{
11766
+ sequence: "sequence";
9624
11767
  station: "station";
9625
11768
  "delegate-agent": "delegate-agent";
9626
11769
  "delegate-role": "delegate-role";
9627
- sequence: "sequence";
9628
- gate: "gate";
9629
11770
  parallel: "parallel";
11771
+ gate: "gate";
9630
11772
  iterate: "iterate";
9631
11773
  "iterate-chain": "iterate-chain";
9632
11774
  loop: "loop";
@@ -9636,10 +11778,10 @@ declare const WorkLogFrameEntrySchema$1: z.ZodObject<{
9636
11778
  pending: "pending";
9637
11779
  completed: "completed";
9638
11780
  cancelled: "cancelled";
9639
- running: "running";
9640
11781
  failed: "failed";
9641
- skipped: "skipped";
11782
+ running: "running";
9642
11783
  waiting: "waiting";
11784
+ skipped: "skipped";
9643
11785
  }>;
9644
11786
  attempt: z.ZodNumber;
9645
11787
  iteration: z.ZodOptional<z.ZodNumber>;
@@ -9692,8 +11834,8 @@ declare const WorkLogGateEventSchema: z.ZodObject<{
9692
11834
  status: z.ZodEnum<{
9693
11835
  cancelled: "cancelled";
9694
11836
  rejected: "rejected";
9695
- resumed: "resumed";
9696
11837
  waiting: "waiting";
11838
+ resumed: "resumed";
9697
11839
  "timed-out": "timed-out";
9698
11840
  }>;
9699
11841
  prompt: z.ZodOptional<z.ZodString>;
@@ -9731,6 +11873,7 @@ declare const WorkLogStatsSchema: z.ZodObject<{
9731
11873
  pending: z.ZodNumber;
9732
11874
  running: z.ZodNumber;
9733
11875
  paused: z.ZodNumber;
11876
+ finalizing: z.ZodNumber;
9734
11877
  completed: z.ZodNumber;
9735
11878
  failed: z.ZodNumber;
9736
11879
  cancelled: z.ZodNumber;
@@ -9758,462 +11901,108 @@ declare const WorkLogDynamicNodeMaterializationSchema: z.ZodObject<{
9758
11901
  }, z.core.$strip>;
9759
11902
  type WorkLogDynamicNodeMaterialization = z.infer<typeof WorkLogDynamicNodeMaterializationSchema>;
9760
11903
  //#endregion
9761
- //#region core/contracts/src/subagent/schemas.d.ts
11904
+ //#region core/contracts/src/workflow/authoring-triggers.d.ts
9762
11905
  /**
9763
- * Context mode for subagent spawning.
9764
- * - fork: Inherit parent's conversation history
9765
- * - fresh: Start with clean context
11906
+ * A workflow trigger with a phantom type parameter carrying the payload type.
11907
+ *
11908
+ * Intentionally not an interface extending `WorkflowTrigger` because
11909
+ * `WorkflowTrigger` is a discriminated union — TypeScript does not permit
11910
+ * extending unions. Instead this type uses an intersection so the full trigger
11911
+ * shape is preserved while the phantom `__payload` field threads through.
11912
+ * @typeParam TPayload - The trigger event payload type
9766
11913
  */
9767
- declare const ContextModeSchema$1: z.ZodEnum<{
9768
- fresh: "fresh";
9769
- fork: "fork";
9770
- }>;
9771
- type ContextMode = z.infer<typeof ContextModeSchema$1>;
11914
+ type WorkflowTriggerDef<TPayload> = WorkflowTrigger & {
11915
+ /**
11916
+ * Phantom type carrier — never present at runtime.
11917
+ * Use `ExtractTriggerPayload<T>` to access this type.
11918
+ */
11919
+ readonly __payload?: TPayload;
11920
+ };
9772
11921
  /**
9773
- * Subagent status enum.
9774
- * - spawning: Session creation in progress (set by spawn tool)
9775
- * - running: Session created, agent executing (set by SubagentService)
9776
- * - waiting_input: Blocked on request_input
9777
- * - hung: No activity within inactivity timeout (non-terminal; coordinator decides action)
9778
- * - completed/failed/cancelled: Terminal states
11922
+ * Extract the payload type from a {@link WorkflowTriggerDef}.
11923
+ * @typeParam T - The typed trigger definition
9779
11924
  */
9780
- declare const SubagentStatusSchema: z.ZodEnum<{
9781
- completed: "completed";
9782
- cancelled: "cancelled";
9783
- running: "running";
9784
- failed: "failed";
9785
- spawning: "spawning";
9786
- waiting_input: "waiting_input";
9787
- hung: "hung";
9788
- }>;
9789
- type SubagentStatus$1 = z.infer<typeof SubagentStatusSchema>;
11925
+ type ExtractTriggerPayload<T extends WorkflowTriggerDef<unknown>> = T extends WorkflowTriggerDef<infer TPayload> ? TPayload : never;
9790
11926
  /**
9791
- * Completion mode for a spawned subagent.
9792
- *
9793
- * - `'tool'` — the child must call `completeTask` to terminate (default, existing semantics).
9794
- * - `'turn'` — the first completed agent turn terminalizes the subagent with the final
9795
- * assistant message as its result. Use this for single-shot subagents that produce prose
9796
- * or structured output without needing to call a completion tool.
9797
- *
9798
- * Conceptual note: subagents are conversations, not one-shot calls — the parent can send
9799
- * follow-ups and the child can ask questions. "The agent stopped talking" does not generally
9800
- * mean "the task is done", which is why `'tool'` is the default. Declare `'turn'` only when
9801
- * the subagent's first response IS the result.
11927
+ * Derives the trigger payload union from a tuple of typed trigger definitions.
11928
+ * @typeParam TTriggers - Trigger tuple supplied to `defineWorkflow`
9802
11929
  */
9803
- declare const CompletionModeSchema: z.ZodEnum<{
9804
- tool: "tool";
9805
- turn: "turn";
9806
- }>;
9807
- type CompletionMode$1 = z.infer<typeof CompletionModeSchema>;
11930
+ type TriggerPayloadFromTriggers<TTriggers extends readonly WorkflowTriggerDef<unknown>[] | undefined> = TTriggers extends readonly WorkflowTriggerDef<unknown>[] ? ExtractTriggerPayload<TTriggers[number]> : never;
9808
11931
  /**
9809
- * Configuration for spawning a subagent.
11932
+ * Creates a bus-event workflow trigger that fires when a typed subject emits
11933
+ * a matching message.
11934
+ * @param options - Trigger configuration options
11935
+ * @returns A typed workflow trigger definition
11936
+ * @example
11937
+ * ```typescript
11938
+ * const trigger = BusEventWorkflowTrigger({
11939
+ * subject: GitNamespace.subjects.checkout,
11940
+ * filter: { isNewWorktree: true },
11941
+ * });
11942
+ * ```
9810
11943
  */
9811
- declare const SubagentConfigSchema$1: z.ZodObject<{
9812
- task: z.ZodString;
9813
- adapterName: z.ZodOptional<z.ZodString>;
9814
- providerConfigId: z.ZodOptional<z.ZodString>;
9815
- providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
9816
- state: z.ZodLiteral<"resolved">;
9817
- providerConfigId: z.ZodString;
9818
- definitionId: z.ZodString;
9819
- endpointOverrides: z.ZodOptional<z.ZodObject<{
9820
- anthropic: z.ZodOptional<z.ZodString>;
9821
- openai: z.ZodOptional<z.ZodString>;
9822
- }, z.core.$strip>>;
9823
- auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
9824
- mode: z.ZodLiteral<"explicit">;
9825
- method: z.ZodDiscriminatedUnion<[z.ZodObject<{
9826
- owner: z.ZodLiteral<"provider">;
9827
- providerDefinitionId: z.ZodString;
9828
- methodId: z.ZodString;
9829
- }, z.core.$strict>, z.ZodObject<{
9830
- owner: z.ZodLiteral<"client">;
9831
- clientId: z.ZodString;
9832
- methodId: z.ZodString;
9833
- }, z.core.$strict>], "owner">;
9834
- definition: z.ZodObject<{
9835
- id: z.ZodString;
9836
- mode: z.ZodLiteral<"explicit">;
9837
- label: z.ZodString;
9838
- description: z.ZodOptional<z.ZodString>;
9839
- fields: z.ZodArray<z.ZodObject<{
9840
- id: z.ZodString;
9841
- label: z.ZodString;
9842
- description: z.ZodOptional<z.ZodString>;
9843
- required: z.ZodBoolean;
9844
- secret: z.ZodBoolean;
9845
- sourceHints: z.ZodArray<z.ZodObject<{
9846
- kind: z.ZodLiteral<"environment">;
9847
- variable: z.ZodString;
9848
- }, z.core.$strict>>;
9849
- }, z.core.$strict>>;
9850
- }, z.core.$strict>;
9851
- credentialRefs: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "CredentialRef", "out">>;
9852
- }, z.core.$strict>, z.ZodObject<{
9853
- mode: z.ZodLiteral<"inferred">;
9854
- method: z.ZodObject<{
9855
- owner: z.ZodLiteral<"client">;
9856
- clientId: z.ZodString;
9857
- methodId: z.ZodString;
9858
- }, z.core.$strict>;
9859
- definition: z.ZodObject<{
9860
- id: z.ZodString;
9861
- mode: z.ZodLiteral<"inferred">;
9862
- label: z.ZodString;
9863
- description: z.ZodOptional<z.ZodString>;
9864
- }, z.core.$strict>;
9865
- account: z.ZodOptional<z.ZodObject<{
9866
- managerId: z.ZodString;
9867
- accountId: z.ZodString;
9868
- }, z.core.$strict>>;
9869
- }, z.core.$strict>, z.ZodObject<{
9870
- mode: z.ZodLiteral<"none">;
9871
- method: z.ZodDiscriminatedUnion<[z.ZodObject<{
9872
- owner: z.ZodLiteral<"provider">;
9873
- providerDefinitionId: z.ZodString;
9874
- methodId: z.ZodString;
9875
- }, z.core.$strict>, z.ZodObject<{
9876
- owner: z.ZodLiteral<"client">;
9877
- clientId: z.ZodString;
9878
- methodId: z.ZodString;
9879
- }, z.core.$strict>], "owner">;
9880
- definition: z.ZodObject<{
9881
- id: z.ZodString;
9882
- mode: z.ZodLiteral<"none">;
9883
- label: z.ZodString;
9884
- description: z.ZodOptional<z.ZodString>;
9885
- }, z.core.$strict>;
9886
- }, z.core.$strict>], "mode">;
9887
- capabilities: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9888
- }, z.core.$strict>, z.ZodObject<{
9889
- state: z.ZodLiteral<"unresolved">;
9890
- }, z.core.$strict>], "state">>;
9891
- harnessId: z.ZodOptional<z.ZodString>;
9892
- model: z.ZodOptional<z.ZodString>;
9893
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
9894
- none: "none";
9895
- low: "low";
9896
- medium: "medium";
9897
- high: "high";
9898
- "extra-high": "extra-high";
9899
- }>>;
9900
- contextMode: z.ZodDefault<z.ZodEnum<{
9901
- fresh: "fresh";
9902
- fork: "fork";
9903
- }>>;
9904
- tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9905
- disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9906
- allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
9907
- systemPrompt: z.ZodOptional<z.ZodString>;
9908
- maxDepth: z.ZodOptional<z.ZodNumber>;
9909
- responseSchema: z.ZodOptional<z.ZodObject<{
9910
- schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
9911
- name: z.ZodOptional<z.ZodString>;
9912
- strict: z.ZodOptional<z.ZodBoolean>;
9913
- }, z.core.$strict>>;
9914
- executionTargetId: z.ZodOptional<z.ZodString>;
9915
- completion: z.ZodOptional<z.ZodEnum<{
9916
- tool: "tool";
9917
- turn: "turn";
9918
- }>>;
9919
- }, z.core.$strip>;
9920
- type SubagentConfig$1 = z.infer<typeof SubagentConfigSchema$1>;
11944
+ declare function BusEventWorkflowTrigger<S extends SubjectDefinition>(options: {
11945
+ /** The bus subject to subscribe to. */readonly subject: S; /** Optional structural payload filter (AND semantics). */
11946
+ readonly filter?: TypedPayloadFilter<ExtractSubjectPayload<S>>; /** Optional jexl expression for complex filter conditions. */
11947
+ readonly filterExpression?: string;
11948
+ }): BusEventTrigger & {
11949
+ readonly __payload?: ExtractSubjectPayload<S>;
11950
+ };
9921
11951
  /**
9922
- * Platform-level constraints for subagent spawning.
11952
+ * Creates a manual workflow trigger (user-initiated only).
11953
+ * @returns A typed workflow trigger definition with `void` payload
9923
11954
  */
9924
- declare const SubagentConstraintsSchema: z.ZodObject<{
9925
- maxDepth: z.ZodDefault<z.ZodNumber>;
9926
- maxConcurrentPerSession: z.ZodDefault<z.ZodNumber>;
9927
- maxTotalActive: z.ZodDefault<z.ZodNumber>;
9928
- defaultRequestTimeoutMs: z.ZodDefault<z.ZodNumber>;
9929
- defaultAwaitTimeoutMs: z.ZodDefault<z.ZodNumber>;
9930
- stateRetentionMs: z.ZodDefault<z.ZodNumber>;
9931
- inactivityTimeoutMs: z.ZodDefault<z.ZodNumber>;
9932
- sweepIntervalMs: z.ZodDefault<z.ZodNumber>;
9933
- allowedAdapters: z.ZodDefault<z.ZodArray<z.ZodString>>;
9934
- allowedModels: z.ZodDefault<z.ZodArray<z.ZodString>>;
9935
- }, z.core.$strip>;
9936
- type SubagentConstraints$1 = z.infer<typeof SubagentConstraintsSchema>;
11955
+ declare function ManualWorkflowTrigger(): WorkflowTriggerDef<void>;
9937
11956
  /**
9938
- * Default runtime constraints (derived from schema defaults to avoid duplication).
11957
+ * Cron trigger payload injected into `context.trigger` at execution time.
9939
11958
  */
9940
- declare const DEFAULT_CONSTRAINTS$1: SubagentConstraints$1;
9941
- declare const PendingRequestSchema: z.ZodObject<{
9942
- messageId: z.ZodString;
9943
- question: z.ZodString;
9944
- context: z.ZodOptional<z.ZodString>;
9945
- }, z.core.$strip>;
9946
- type PendingRequest$1 = z.infer<typeof PendingRequestSchema>;
9947
- declare const ExecuteSubagentResponseSchema: z.ZodObject<{
9948
- success: z.ZodBoolean;
9949
- agentId: z.ZodOptional<z.ZodString>;
9950
- error: z.ZodOptional<z.ZodString>;
9951
- }, z.core.$strip>;
9952
- type ExecuteSubagentResponse = z.infer<typeof ExecuteSubagentResponseSchema>;
11959
+ interface CronTriggerPayload {
11960
+ /** Epoch milliseconds when the cron fired. */
11961
+ readonly firedAt: number;
11962
+ /** Zero-based index of this trigger in the workflow's `triggers` array. */
11963
+ readonly triggerIndex: number;
11964
+ }
9953
11965
  /**
9954
- * Subagent execution failed during startup.
11966
+ * Creates a cron-based workflow trigger.
11967
+ * @param options - Trigger configuration options
11968
+ * @returns A typed workflow trigger definition with {@link CronTriggerPayload}
9955
11969
  */
9956
- declare const SubagentExecutionFailedSchema: z.ZodObject<{
9957
- subagentId: z.ZodString;
9958
- parentSessionId: z.ZodString;
9959
- error: z.ZodString;
9960
- phase: z.ZodEnum<{
9961
- session_create: "session_create";
9962
- adapter_start: "adapter_start";
9963
- agent_start: "agent_start";
9964
- }>;
9965
- }, z.core.$strip>;
9966
- type SubagentExecutionFailed = z.infer<typeof SubagentExecutionFailedSchema>;
11970
+ declare function CronWorkflowTrigger(options: {
11971
+ /** Cron expression (e.g. `'0 9 * * 1'`). */readonly schedule: string; /** Optional IANA timezone string; defaults to UTC at runtime. */
11972
+ readonly timezone?: string;
11973
+ }): WorkflowTriggerDef<CronTriggerPayload>;
9967
11974
  /**
9968
- * Spawn RPC - replaces tool calling manager.track().
9969
- * Service validates constraints, tracks subagent, emits spawned event.
11975
+ * Webhook trigger payload injected into `context.trigger` at execution time.
9970
11976
  */
9971
- declare const SpawnSubagentRpcRequestSchema$1: z.ZodObject<{
9972
- parentSessionId: z.ZodString;
9973
- config: z.ZodObject<{
9974
- task: z.ZodString;
9975
- adapterName: z.ZodOptional<z.ZodString>;
9976
- providerConfigId: z.ZodOptional<z.ZodString>;
9977
- providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
9978
- state: z.ZodLiteral<"resolved">;
9979
- providerConfigId: z.ZodString;
9980
- definitionId: z.ZodString;
9981
- endpointOverrides: z.ZodOptional<z.ZodObject<{
9982
- anthropic: z.ZodOptional<z.ZodString>;
9983
- openai: z.ZodOptional<z.ZodString>;
9984
- }, z.core.$strip>>;
9985
- auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
9986
- mode: z.ZodLiteral<"explicit">;
9987
- method: z.ZodDiscriminatedUnion<[z.ZodObject<{
9988
- owner: z.ZodLiteral<"provider">;
9989
- providerDefinitionId: z.ZodString;
9990
- methodId: z.ZodString;
9991
- }, z.core.$strict>, z.ZodObject<{
9992
- owner: z.ZodLiteral<"client">;
9993
- clientId: z.ZodString;
9994
- methodId: z.ZodString;
9995
- }, z.core.$strict>], "owner">;
9996
- definition: z.ZodObject<{
9997
- id: z.ZodString;
9998
- mode: z.ZodLiteral<"explicit">;
9999
- label: z.ZodString;
10000
- description: z.ZodOptional<z.ZodString>;
10001
- fields: z.ZodArray<z.ZodObject<{
10002
- id: z.ZodString;
10003
- label: z.ZodString;
10004
- description: z.ZodOptional<z.ZodString>;
10005
- required: z.ZodBoolean;
10006
- secret: z.ZodBoolean;
10007
- sourceHints: z.ZodArray<z.ZodObject<{
10008
- kind: z.ZodLiteral<"environment">;
10009
- variable: z.ZodString;
10010
- }, z.core.$strict>>;
10011
- }, z.core.$strict>>;
10012
- }, z.core.$strict>;
10013
- credentialRefs: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "CredentialRef", "out">>;
10014
- }, z.core.$strict>, z.ZodObject<{
10015
- mode: z.ZodLiteral<"inferred">;
10016
- method: z.ZodObject<{
10017
- owner: z.ZodLiteral<"client">;
10018
- clientId: z.ZodString;
10019
- methodId: z.ZodString;
10020
- }, z.core.$strict>;
10021
- definition: z.ZodObject<{
10022
- id: z.ZodString;
10023
- mode: z.ZodLiteral<"inferred">;
10024
- label: z.ZodString;
10025
- description: z.ZodOptional<z.ZodString>;
10026
- }, z.core.$strict>;
10027
- account: z.ZodOptional<z.ZodObject<{
10028
- managerId: z.ZodString;
10029
- accountId: z.ZodString;
10030
- }, z.core.$strict>>;
10031
- }, z.core.$strict>, z.ZodObject<{
10032
- mode: z.ZodLiteral<"none">;
10033
- method: z.ZodDiscriminatedUnion<[z.ZodObject<{
10034
- owner: z.ZodLiteral<"provider">;
10035
- providerDefinitionId: z.ZodString;
10036
- methodId: z.ZodString;
10037
- }, z.core.$strict>, z.ZodObject<{
10038
- owner: z.ZodLiteral<"client">;
10039
- clientId: z.ZodString;
10040
- methodId: z.ZodString;
10041
- }, z.core.$strict>], "owner">;
10042
- definition: z.ZodObject<{
10043
- id: z.ZodString;
10044
- mode: z.ZodLiteral<"none">;
10045
- label: z.ZodString;
10046
- description: z.ZodOptional<z.ZodString>;
10047
- }, z.core.$strict>;
10048
- }, z.core.$strict>], "mode">;
10049
- capabilities: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
10050
- }, z.core.$strict>, z.ZodObject<{
10051
- state: z.ZodLiteral<"unresolved">;
10052
- }, z.core.$strict>], "state">>;
10053
- harnessId: z.ZodOptional<z.ZodString>;
10054
- model: z.ZodOptional<z.ZodString>;
10055
- reasoningEffort: z.ZodOptional<z.ZodEnum<{
10056
- none: "none";
10057
- low: "low";
10058
- medium: "medium";
10059
- high: "high";
10060
- "extra-high": "extra-high";
10061
- }>>;
10062
- contextMode: z.ZodDefault<z.ZodEnum<{
10063
- fresh: "fresh";
10064
- fork: "fork";
10065
- }>>;
10066
- tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
10067
- disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
10068
- allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
10069
- systemPrompt: z.ZodOptional<z.ZodString>;
10070
- maxDepth: z.ZodOptional<z.ZodNumber>;
10071
- responseSchema: z.ZodOptional<z.ZodObject<{
10072
- schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
10073
- name: z.ZodOptional<z.ZodString>;
10074
- strict: z.ZodOptional<z.ZodBoolean>;
10075
- }, z.core.$strict>>;
10076
- executionTargetId: z.ZodOptional<z.ZodString>;
10077
- completion: z.ZodOptional<z.ZodEnum<{
10078
- tool: "tool";
10079
- turn: "turn";
10080
- }>>;
10081
- }, z.core.$strip>;
10082
- depth: z.ZodNumber;
10083
- spawningToolCallId: z.ZodOptional<z.ZodString>;
10084
- }, z.core.$strip>;
10085
- type SpawnSubagentRpcRequest = z.infer<typeof SpawnSubagentRpcRequestSchema$1>;
10086
- declare const SpawnSubagentRpcResponseSchema: z.ZodObject<{
10087
- subagentId: z.ZodString;
10088
- status: z.ZodLiteral<"spawning">;
10089
- }, z.core.$strip>;
10090
- type SpawnSubagentRpcResponse = z.infer<typeof SpawnSubagentRpcResponseSchema>;
10091
- /**
10092
- * Await RPC - replaces callback-based awaiter.
10093
- * Blocks until subagent reaches terminal state or timeout.
10094
- */
10095
- declare const AwaitSubagentRequestSchema: z.ZodObject<{
10096
- subagentId: z.ZodString;
10097
- timeoutMs: z.ZodOptional<z.ZodNumber>;
10098
- }, z.core.$strip>;
10099
- type AwaitSubagentRequest = z.infer<typeof AwaitSubagentRequestSchema>;
10100
- declare const AwaitSubagentResponseSchema: z.ZodObject<{
10101
- status: z.ZodEnum<{
10102
- completed: "completed";
10103
- cancelled: "cancelled";
10104
- failed: "failed";
10105
- waiting_input: "waiting_input";
10106
- timeout: "timeout";
10107
- }>;
10108
- result: z.ZodOptional<z.ZodString>;
10109
- error: z.ZodOptional<z.ZodString>;
10110
- pendingRequest: z.ZodOptional<z.ZodObject<{
10111
- messageId: z.ZodString;
10112
- question: z.ZodString;
10113
- context: z.ZodOptional<z.ZodString>;
10114
- }, z.core.$strip>>;
10115
- completionSource: z.ZodOptional<z.ZodEnum<{
10116
- tool: "tool";
10117
- turn: "turn";
10118
- }>>;
10119
- }, z.core.$strip>;
10120
- type AwaitSubagentResponse = z.infer<typeof AwaitSubagentResponseSchema>;
10121
- /**
10122
- * Send RPC - sends message to subagent, optionally resolving pending request.
10123
- */
10124
- declare const SendToSubagentRequestSchema: z.ZodObject<{
10125
- subagentId: z.ZodString;
10126
- content: z.ZodString;
10127
- inResponseTo: z.ZodOptional<z.ZodString>;
10128
- }, z.core.$strip>;
10129
- type SendToSubagentRequest = z.infer<typeof SendToSubagentRequestSchema>;
10130
- declare const SendToSubagentResponseSchema: z.ZodObject<{
10131
- sent: z.ZodBoolean;
10132
- resolvedPending: z.ZodBoolean;
10133
- }, z.core.$strip>;
10134
- type SendToSubagentResponse = z.infer<typeof SendToSubagentResponseSchema>;
10135
- /**
10136
- * Kill RPC - terminates a running subagent.
10137
- */
10138
- declare const KillSubagentRequestSchema: z.ZodObject<{
10139
- subagentId: z.ZodString;
10140
- reason: z.ZodOptional<z.ZodString>;
10141
- }, z.core.$strip>;
10142
- type KillSubagentRequest = z.infer<typeof KillSubagentRequestSchema>;
10143
- declare const KillSubagentResponseSchema: z.ZodObject<{
10144
- killed: z.ZodBoolean;
10145
- }, z.core.$strip>;
10146
- type KillSubagentResponse = z.infer<typeof KillSubagentResponseSchema>;
10147
- /**
10148
- * Report Progress RPC - child reports progress update.
10149
- */
10150
- declare const ReportProgressRequestSchema: z.ZodObject<{
10151
- subagentId: z.ZodString;
10152
- update: z.ZodString;
10153
- percentComplete: z.ZodOptional<z.ZodNumber>;
10154
- }, z.core.$strip>;
10155
- type ReportProgressRequest = z.infer<typeof ReportProgressRequestSchema>;
10156
- declare const ReportProgressResponseSchema: z.ZodObject<{
10157
- reported: z.ZodBoolean;
10158
- }, z.core.$strip>;
10159
- type ReportProgressResponse = z.infer<typeof ReportProgressResponseSchema>;
10160
- /**
10161
- * Request Input RPC - child requests input from parent.
10162
- * Blocks until parent responds or timeout.
10163
- */
10164
- declare const RequestInputRpcRequestSchema: z.ZodObject<{
10165
- subagentId: z.ZodString;
10166
- question: z.ZodString;
10167
- context: z.ZodOptional<z.ZodString>;
10168
- timeoutMs: z.ZodOptional<z.ZodNumber>;
10169
- }, z.core.$strip>;
10170
- type RequestInputRpcRequest = z.infer<typeof RequestInputRpcRequestSchema>;
10171
- declare const RequestInputRpcResponseSchema: z.ZodObject<{
10172
- responded: z.ZodBoolean;
10173
- response: z.ZodOptional<z.ZodString>;
10174
- timedOut: z.ZodBoolean;
10175
- }, z.core.$strip>;
10176
- type RequestInputRpcResponse = z.infer<typeof RequestInputRpcResponseSchema>;
11977
+ interface WebhookTriggerPayload {
11978
+ /** Webhook event name (e.g. `'push'`, `'pull_request'`). */
11979
+ readonly event: string;
11980
+ /** Branch filter value, if configured. */
11981
+ readonly branch?: string;
11982
+ /** Repository slug (`owner/name`), if configured. */
11983
+ readonly repo?: string;
11984
+ /** Raw webhook payload forwarded from the webhook handler. */
11985
+ readonly body: Record<string, unknown>;
11986
+ }
10177
11987
  /**
10178
- * Complete Task RPC - child signals task completion.
11988
+ * Creates a webhook-based workflow trigger.
11989
+ * @param options - Trigger configuration options
11990
+ * @returns A typed workflow trigger definition with {@link WebhookTriggerPayload}
10179
11991
  */
10180
- declare const CompleteTaskRequestSchema: z.ZodObject<{
10181
- subagentId: z.ZodString;
10182
- result: z.ZodString;
10183
- summary: z.ZodOptional<z.ZodString>;
10184
- }, z.core.$strip>;
10185
- type CompleteTaskRequest = z.infer<typeof CompleteTaskRequestSchema>;
10186
- declare const CompleteTaskResponseSchema: z.ZodObject<{
10187
- completed: z.ZodBoolean;
10188
- }, z.core.$strip>;
10189
- type CompleteTaskResponse = z.infer<typeof CompleteTaskResponseSchema>;
11992
+ declare function WebhookWorkflowTrigger(options: {
11993
+ /** Webhook event name. */readonly event: string; /** Optional branch filter. */
11994
+ readonly branch?: string; /** Optional repository filter (`owner/name`). */
11995
+ readonly repo?: string;
11996
+ }): WorkflowTriggerDef<WebhookTriggerPayload>;
10190
11997
  /**
10191
- * List subagents by parent session RPC.
10192
- * Returns all non-terminal subagents spawned by the given parent session.
10193
- *
10194
- * Note: SubagentService tracks subagents in memory only. This list will be
10195
- * empty after a process restart — subagents re-register as they report back.
11998
+ * Creates an extension-contributed workflow trigger.
11999
+ * @param options - Trigger configuration options
12000
+ * @returns A typed workflow trigger definition with `Record<string, unknown>` payload
10196
12001
  */
10197
- declare const ListSubagentsBySessionRequestSchema: z.ZodObject<{
10198
- parentSessionId: z.ZodString;
10199
- }, z.core.$strip>;
10200
- type ListSubagentsBySessionRequest = z.infer<typeof ListSubagentsBySessionRequestSchema>;
10201
- declare const ListSubagentsBySessionResponseSchema: z.ZodObject<{
10202
- subagents: z.ZodArray<z.ZodObject<{
10203
- subagentId: z.ZodString;
10204
- task: z.ZodString;
10205
- status: z.ZodEnum<{
10206
- completed: "completed";
10207
- cancelled: "cancelled";
10208
- running: "running";
10209
- failed: "failed";
10210
- spawning: "spawning";
10211
- waiting_input: "waiting_input";
10212
- hung: "hung";
10213
- }>;
10214
- }, z.core.$strip>>;
10215
- }, z.core.$strip>;
10216
- type ListSubagentsBySessionResponse = z.infer<typeof ListSubagentsBySessionResponseSchema>;
12002
+ declare function ExtensionWorkflowTrigger(options: {
12003
+ /** Extension trigger type identifier (`extensionName:eventName`). */readonly extensionType: `${string}:${string}`; /** Optional opaque runtime configuration. */
12004
+ readonly config?: Record<string, unknown>;
12005
+ }): WorkflowTriggerDef<Record<string, unknown>>;
10217
12006
  //#endregion
10218
12007
  //#region core/contracts/src/workflow/authoring-context.d.ts
10219
12008
  /**
@@ -10493,108 +12282,476 @@ type StationHandler$1<TTrigger = unknown, TPreviousSteps extends Record<string,
10493
12282
  */
10494
12283
  type IterateHandler<TTrigger = unknown, TPreviousSteps extends Record<string, PreviousStepOutput<JsonValue$1>> = Record<string, PreviousStepOutput<JsonValue$1>>, TArtifactData extends Record<string, unknown> = Record<string, unknown>, TBus = unknown, TState = unknown> = StationHandler$1<TTrigger, TPreviousSteps, TArtifactData, TBus, TState>;
10495
12284
  //#endregion
10496
- //#region core/contracts/src/workflow/authoring-triggers.d.ts
12285
+ //#region core/contracts/src/subagent/schemas.d.ts
10497
12286
  /**
10498
- * A workflow trigger with a phantom type parameter carrying the payload type.
12287
+ * Context mode for subagent spawning.
12288
+ * - fork: Inherit parent's conversation history
12289
+ * - fresh: Start with clean context
12290
+ */
12291
+ declare const ContextModeSchema$1: z.ZodEnum<{
12292
+ fork: "fork";
12293
+ fresh: "fresh";
12294
+ }>;
12295
+ type ContextMode = z.infer<typeof ContextModeSchema$1>;
12296
+ /**
12297
+ * Subagent status enum.
12298
+ * - spawning: Session creation in progress (set by spawn tool)
12299
+ * - running: Session created, agent executing (set by SubagentService)
12300
+ * - waiting_input: Blocked on request_input
12301
+ * - hung: No activity within inactivity timeout (non-terminal; coordinator decides action)
12302
+ * - completed/failed/cancelled: Terminal states
12303
+ */
12304
+ declare const SubagentStatusSchema: z.ZodEnum<{
12305
+ completed: "completed";
12306
+ cancelled: "cancelled";
12307
+ failed: "failed";
12308
+ spawning: "spawning";
12309
+ running: "running";
12310
+ waiting_input: "waiting_input";
12311
+ hung: "hung";
12312
+ }>;
12313
+ type SubagentStatus$1 = z.infer<typeof SubagentStatusSchema>;
12314
+ /**
12315
+ * Completion mode for a spawned subagent.
10499
12316
  *
10500
- * Intentionally not an interface extending `WorkflowTrigger` because
10501
- * `WorkflowTrigger` is a discriminated union TypeScript does not permit
10502
- * extending unions. Instead this type uses an intersection so the full trigger
10503
- * shape is preserved while the phantom `__payload` field threads through.
10504
- * @typeParam TPayload - The trigger event payload type
12317
+ * - `'tool'` the child must call `completeTask` to terminate (default, existing semantics).
12318
+ * - `'turn'` the first completed agent turn terminalizes the subagent with the final
12319
+ * assistant message as its result. Use this for single-shot subagents that produce prose
12320
+ * or structured output without needing to call a completion tool.
12321
+ *
12322
+ * Conceptual note: subagents are conversations, not one-shot calls — the parent can send
12323
+ * follow-ups and the child can ask questions. "The agent stopped talking" does not generally
12324
+ * mean "the task is done", which is why `'tool'` is the default. Declare `'turn'` only when
12325
+ * the subagent's first response IS the result.
10505
12326
  */
10506
- type WorkflowTriggerDef<TPayload> = WorkflowTrigger & {
10507
- /**
10508
- * Phantom type carrier — never present at runtime.
10509
- * Use `ExtractTriggerPayload<T>` to access this type.
10510
- */
10511
- readonly __payload?: TPayload;
10512
- };
12327
+ declare const CompletionModeSchema: z.ZodEnum<{
12328
+ tool: "tool";
12329
+ turn: "turn";
12330
+ }>;
12331
+ type CompletionMode$1 = z.infer<typeof CompletionModeSchema>;
10513
12332
  /**
10514
- * Extract the payload type from a {@link WorkflowTriggerDef}.
10515
- * @typeParam T - The typed trigger definition
12333
+ * Configuration for spawning a subagent.
10516
12334
  */
10517
- type ExtractTriggerPayload<T extends WorkflowTriggerDef<unknown>> = T extends WorkflowTriggerDef<infer TPayload> ? TPayload : never;
12335
+ declare const SubagentConfigSchema$1: z.ZodObject<{
12336
+ task: z.ZodString;
12337
+ adapterName: z.ZodOptional<z.ZodString>;
12338
+ providerConfigId: z.ZodOptional<z.ZodString>;
12339
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
12340
+ providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12341
+ state: z.ZodLiteral<"resolved">;
12342
+ providerConfigId: z.ZodString;
12343
+ definitionId: z.ZodString;
12344
+ endpointOverrides: z.ZodOptional<z.ZodObject<{
12345
+ anthropic: z.ZodOptional<z.ZodString>;
12346
+ openai: z.ZodOptional<z.ZodString>;
12347
+ }, z.core.$strip>>;
12348
+ auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
12349
+ mode: z.ZodLiteral<"explicit">;
12350
+ method: z.ZodDiscriminatedUnion<[z.ZodObject<{
12351
+ owner: z.ZodLiteral<"provider">;
12352
+ providerDefinitionId: z.ZodString;
12353
+ methodId: z.ZodString;
12354
+ }, z.core.$strict>, z.ZodObject<{
12355
+ owner: z.ZodLiteral<"client">;
12356
+ clientId: z.ZodString;
12357
+ methodId: z.ZodString;
12358
+ }, z.core.$strict>], "owner">;
12359
+ definition: z.ZodObject<{
12360
+ id: z.ZodString;
12361
+ mode: z.ZodLiteral<"explicit">;
12362
+ label: z.ZodString;
12363
+ description: z.ZodOptional<z.ZodString>;
12364
+ fields: z.ZodArray<z.ZodObject<{
12365
+ id: z.ZodString;
12366
+ label: z.ZodString;
12367
+ description: z.ZodOptional<z.ZodString>;
12368
+ required: z.ZodBoolean;
12369
+ secret: z.ZodBoolean;
12370
+ sourceHints: z.ZodArray<z.ZodObject<{
12371
+ kind: z.ZodLiteral<"environment">;
12372
+ variable: z.ZodString;
12373
+ }, z.core.$strict>>;
12374
+ }, z.core.$strict>>;
12375
+ }, z.core.$strict>;
12376
+ credentialRefs: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "CredentialRef", "out">>;
12377
+ }, z.core.$strict>, z.ZodObject<{
12378
+ mode: z.ZodLiteral<"inferred">;
12379
+ method: z.ZodObject<{
12380
+ owner: z.ZodLiteral<"client">;
12381
+ clientId: z.ZodString;
12382
+ methodId: z.ZodString;
12383
+ }, z.core.$strict>;
12384
+ definition: z.ZodObject<{
12385
+ id: z.ZodString;
12386
+ mode: z.ZodLiteral<"inferred">;
12387
+ label: z.ZodString;
12388
+ description: z.ZodOptional<z.ZodString>;
12389
+ }, z.core.$strict>;
12390
+ account: z.ZodOptional<z.ZodObject<{
12391
+ managerId: z.ZodString;
12392
+ accountId: z.ZodString;
12393
+ }, z.core.$strict>>;
12394
+ }, z.core.$strict>, z.ZodObject<{
12395
+ mode: z.ZodLiteral<"none">;
12396
+ method: z.ZodDiscriminatedUnion<[z.ZodObject<{
12397
+ owner: z.ZodLiteral<"provider">;
12398
+ providerDefinitionId: z.ZodString;
12399
+ methodId: z.ZodString;
12400
+ }, z.core.$strict>, z.ZodObject<{
12401
+ owner: z.ZodLiteral<"client">;
12402
+ clientId: z.ZodString;
12403
+ methodId: z.ZodString;
12404
+ }, z.core.$strict>], "owner">;
12405
+ definition: z.ZodObject<{
12406
+ id: z.ZodString;
12407
+ mode: z.ZodLiteral<"none">;
12408
+ label: z.ZodString;
12409
+ description: z.ZodOptional<z.ZodString>;
12410
+ }, z.core.$strict>;
12411
+ }, z.core.$strict>], "mode">;
12412
+ capabilities: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
12413
+ }, z.core.$strict>, z.ZodObject<{
12414
+ state: z.ZodLiteral<"unresolved">;
12415
+ }, z.core.$strict>], "state">>;
12416
+ harnessId: z.ZodOptional<z.ZodString>;
12417
+ model: z.ZodOptional<z.ZodString>;
12418
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
12419
+ none: "none";
12420
+ low: "low";
12421
+ medium: "medium";
12422
+ high: "high";
12423
+ "extra-high": "extra-high";
12424
+ }>>;
12425
+ contextMode: z.ZodDefault<z.ZodEnum<{
12426
+ fork: "fork";
12427
+ fresh: "fresh";
12428
+ }>>;
12429
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
12430
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
12431
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
12432
+ systemPrompt: z.ZodOptional<z.ZodString>;
12433
+ maxDepth: z.ZodOptional<z.ZodNumber>;
12434
+ responseSchema: z.ZodOptional<z.ZodObject<{
12435
+ schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
12436
+ name: z.ZodOptional<z.ZodString>;
12437
+ strict: z.ZodOptional<z.ZodBoolean>;
12438
+ }, z.core.$strict>>;
12439
+ executionTargetId: z.ZodOptional<z.ZodString>;
12440
+ completion: z.ZodOptional<z.ZodEnum<{
12441
+ tool: "tool";
12442
+ turn: "turn";
12443
+ }>>;
12444
+ }, z.core.$strip>;
12445
+ type SubagentConfig$1 = z.infer<typeof SubagentConfigSchema$1>;
10518
12446
  /**
10519
- * Derives the trigger payload union from a tuple of typed trigger definitions.
10520
- * @typeParam TTriggers - Trigger tuple supplied to `defineWorkflow`
12447
+ * Platform-level constraints for subagent spawning.
10521
12448
  */
10522
- type TriggerPayloadFromTriggers<TTriggers extends readonly WorkflowTriggerDef<unknown>[] | undefined> = TTriggers extends readonly WorkflowTriggerDef<unknown>[] ? ExtractTriggerPayload<TTriggers[number]> : never;
12449
+ declare const SubagentConstraintsSchema: z.ZodObject<{
12450
+ maxDepth: z.ZodDefault<z.ZodNumber>;
12451
+ maxConcurrentPerSession: z.ZodDefault<z.ZodNumber>;
12452
+ maxTotalActive: z.ZodDefault<z.ZodNumber>;
12453
+ defaultRequestTimeoutMs: z.ZodDefault<z.ZodNumber>;
12454
+ defaultAwaitTimeoutMs: z.ZodDefault<z.ZodNumber>;
12455
+ stateRetentionMs: z.ZodDefault<z.ZodNumber>;
12456
+ inactivityTimeoutMs: z.ZodDefault<z.ZodNumber>;
12457
+ sweepIntervalMs: z.ZodDefault<z.ZodNumber>;
12458
+ allowedAdapters: z.ZodDefault<z.ZodArray<z.ZodString>>;
12459
+ allowedModels: z.ZodDefault<z.ZodArray<z.ZodString>>;
12460
+ }, z.core.$strip>;
12461
+ type SubagentConstraints$1 = z.infer<typeof SubagentConstraintsSchema>;
12462
+ /**
12463
+ * Default runtime constraints (derived from schema defaults to avoid duplication).
12464
+ */
12465
+ declare const DEFAULT_CONSTRAINTS$1: SubagentConstraints$1;
12466
+ declare const PendingRequestSchema: z.ZodObject<{
12467
+ messageId: z.ZodString;
12468
+ question: z.ZodString;
12469
+ context: z.ZodOptional<z.ZodString>;
12470
+ }, z.core.$strip>;
12471
+ type PendingRequest$1 = z.infer<typeof PendingRequestSchema>;
12472
+ declare const ExecuteSubagentResponseSchema: z.ZodObject<{
12473
+ success: z.ZodBoolean;
12474
+ agentId: z.ZodOptional<z.ZodString>;
12475
+ error: z.ZodOptional<z.ZodString>;
12476
+ }, z.core.$strip>;
12477
+ type ExecuteSubagentResponse = z.infer<typeof ExecuteSubagentResponseSchema>;
12478
+ /**
12479
+ * Subagent execution failed during startup.
12480
+ */
12481
+ declare const SubagentExecutionFailedSchema: z.ZodObject<{
12482
+ subagentId: z.ZodString;
12483
+ parentSessionId: z.ZodString;
12484
+ error: z.ZodString;
12485
+ phase: z.ZodEnum<{
12486
+ session_create: "session_create";
12487
+ adapter_start: "adapter_start";
12488
+ agent_start: "agent_start";
12489
+ }>;
12490
+ }, z.core.$strip>;
12491
+ type SubagentExecutionFailed = z.infer<typeof SubagentExecutionFailedSchema>;
12492
+ /**
12493
+ * Spawn RPC - replaces tool calling manager.track().
12494
+ * Service validates constraints, tracks subagent, emits spawned event.
12495
+ */
12496
+ declare const SpawnSubagentRpcRequestSchema$1: z.ZodObject<{
12497
+ parentSessionId: z.ZodString;
12498
+ config: z.ZodObject<{
12499
+ task: z.ZodString;
12500
+ adapterName: z.ZodOptional<z.ZodString>;
12501
+ providerConfigId: z.ZodOptional<z.ZodString>;
12502
+ adapterConfig: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
12503
+ providerContext: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
12504
+ state: z.ZodLiteral<"resolved">;
12505
+ providerConfigId: z.ZodString;
12506
+ definitionId: z.ZodString;
12507
+ endpointOverrides: z.ZodOptional<z.ZodObject<{
12508
+ anthropic: z.ZodOptional<z.ZodString>;
12509
+ openai: z.ZodOptional<z.ZodString>;
12510
+ }, z.core.$strip>>;
12511
+ auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
12512
+ mode: z.ZodLiteral<"explicit">;
12513
+ method: z.ZodDiscriminatedUnion<[z.ZodObject<{
12514
+ owner: z.ZodLiteral<"provider">;
12515
+ providerDefinitionId: z.ZodString;
12516
+ methodId: z.ZodString;
12517
+ }, z.core.$strict>, z.ZodObject<{
12518
+ owner: z.ZodLiteral<"client">;
12519
+ clientId: z.ZodString;
12520
+ methodId: z.ZodString;
12521
+ }, z.core.$strict>], "owner">;
12522
+ definition: z.ZodObject<{
12523
+ id: z.ZodString;
12524
+ mode: z.ZodLiteral<"explicit">;
12525
+ label: z.ZodString;
12526
+ description: z.ZodOptional<z.ZodString>;
12527
+ fields: z.ZodArray<z.ZodObject<{
12528
+ id: z.ZodString;
12529
+ label: z.ZodString;
12530
+ description: z.ZodOptional<z.ZodString>;
12531
+ required: z.ZodBoolean;
12532
+ secret: z.ZodBoolean;
12533
+ sourceHints: z.ZodArray<z.ZodObject<{
12534
+ kind: z.ZodLiteral<"environment">;
12535
+ variable: z.ZodString;
12536
+ }, z.core.$strict>>;
12537
+ }, z.core.$strict>>;
12538
+ }, z.core.$strict>;
12539
+ credentialRefs: z.ZodRecord<z.ZodString, z.core.$ZodBranded<z.ZodString, "CredentialRef", "out">>;
12540
+ }, z.core.$strict>, z.ZodObject<{
12541
+ mode: z.ZodLiteral<"inferred">;
12542
+ method: z.ZodObject<{
12543
+ owner: z.ZodLiteral<"client">;
12544
+ clientId: z.ZodString;
12545
+ methodId: z.ZodString;
12546
+ }, z.core.$strict>;
12547
+ definition: z.ZodObject<{
12548
+ id: z.ZodString;
12549
+ mode: z.ZodLiteral<"inferred">;
12550
+ label: z.ZodString;
12551
+ description: z.ZodOptional<z.ZodString>;
12552
+ }, z.core.$strict>;
12553
+ account: z.ZodOptional<z.ZodObject<{
12554
+ managerId: z.ZodString;
12555
+ accountId: z.ZodString;
12556
+ }, z.core.$strict>>;
12557
+ }, z.core.$strict>, z.ZodObject<{
12558
+ mode: z.ZodLiteral<"none">;
12559
+ method: z.ZodDiscriminatedUnion<[z.ZodObject<{
12560
+ owner: z.ZodLiteral<"provider">;
12561
+ providerDefinitionId: z.ZodString;
12562
+ methodId: z.ZodString;
12563
+ }, z.core.$strict>, z.ZodObject<{
12564
+ owner: z.ZodLiteral<"client">;
12565
+ clientId: z.ZodString;
12566
+ methodId: z.ZodString;
12567
+ }, z.core.$strict>], "owner">;
12568
+ definition: z.ZodObject<{
12569
+ id: z.ZodString;
12570
+ mode: z.ZodLiteral<"none">;
12571
+ label: z.ZodString;
12572
+ description: z.ZodOptional<z.ZodString>;
12573
+ }, z.core.$strict>;
12574
+ }, z.core.$strict>], "mode">;
12575
+ capabilities: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
12576
+ }, z.core.$strict>, z.ZodObject<{
12577
+ state: z.ZodLiteral<"unresolved">;
12578
+ }, z.core.$strict>], "state">>;
12579
+ harnessId: z.ZodOptional<z.ZodString>;
12580
+ model: z.ZodOptional<z.ZodString>;
12581
+ reasoningEffort: z.ZodOptional<z.ZodEnum<{
12582
+ none: "none";
12583
+ low: "low";
12584
+ medium: "medium";
12585
+ high: "high";
12586
+ "extra-high": "extra-high";
12587
+ }>>;
12588
+ contextMode: z.ZodDefault<z.ZodEnum<{
12589
+ fork: "fork";
12590
+ fresh: "fresh";
12591
+ }>>;
12592
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
12593
+ disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
12594
+ allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
12595
+ systemPrompt: z.ZodOptional<z.ZodString>;
12596
+ maxDepth: z.ZodOptional<z.ZodNumber>;
12597
+ responseSchema: z.ZodOptional<z.ZodObject<{
12598
+ schema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
12599
+ name: z.ZodOptional<z.ZodString>;
12600
+ strict: z.ZodOptional<z.ZodBoolean>;
12601
+ }, z.core.$strict>>;
12602
+ executionTargetId: z.ZodOptional<z.ZodString>;
12603
+ completion: z.ZodOptional<z.ZodEnum<{
12604
+ tool: "tool";
12605
+ turn: "turn";
12606
+ }>>;
12607
+ }, z.core.$strip>;
12608
+ depth: z.ZodNumber;
12609
+ spawningToolCallId: z.ZodOptional<z.ZodString>;
12610
+ }, z.core.$strip>;
12611
+ type SpawnSubagentRpcRequest = z.infer<typeof SpawnSubagentRpcRequestSchema$1>;
12612
+ declare const SpawnSubagentRpcResponseSchema: z.ZodObject<{
12613
+ subagentId: z.ZodString;
12614
+ status: z.ZodLiteral<"spawning">;
12615
+ }, z.core.$strip>;
12616
+ type SpawnSubagentRpcResponse = z.infer<typeof SpawnSubagentRpcResponseSchema>;
10523
12617
  /**
10524
- * Creates a bus-event workflow trigger that fires when a typed subject emits
10525
- * a matching message.
10526
- * @param options - Trigger configuration options
10527
- * @returns A typed workflow trigger definition
10528
- * @example
10529
- * ```typescript
10530
- * const trigger = BusEventWorkflowTrigger({
10531
- * subject: GitNamespace.subjects.checkout,
10532
- * filter: { isNewWorktree: true },
10533
- * });
10534
- * ```
12618
+ * Await RPC - replaces callback-based awaiter.
12619
+ * Blocks until subagent reaches terminal state or timeout.
10535
12620
  */
10536
- declare function BusEventWorkflowTrigger<S extends SubjectDefinition>(options: {
10537
- /** The bus subject to subscribe to. */readonly subject: S; /** Optional structural payload filter (AND semantics). */
10538
- readonly filter?: TypedPayloadFilter<ExtractSubjectPayload<S>>; /** Optional jexl expression for complex filter conditions. */
10539
- readonly filterExpression?: string;
10540
- }): BusEventTrigger & {
10541
- readonly __payload?: ExtractSubjectPayload<S>;
10542
- };
12621
+ declare const AwaitSubagentRequestSchema: z.ZodObject<{
12622
+ subagentId: z.ZodString;
12623
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
12624
+ }, z.core.$strip>;
12625
+ type AwaitSubagentRequest = z.infer<typeof AwaitSubagentRequestSchema>;
12626
+ declare const AwaitSubagentResponseSchema: z.ZodObject<{
12627
+ status: z.ZodEnum<{
12628
+ completed: "completed";
12629
+ cancelled: "cancelled";
12630
+ failed: "failed";
12631
+ waiting_input: "waiting_input";
12632
+ timeout: "timeout";
12633
+ }>;
12634
+ result: z.ZodOptional<z.ZodString>;
12635
+ error: z.ZodOptional<z.ZodString>;
12636
+ pendingRequest: z.ZodOptional<z.ZodObject<{
12637
+ messageId: z.ZodString;
12638
+ question: z.ZodString;
12639
+ context: z.ZodOptional<z.ZodString>;
12640
+ }, z.core.$strip>>;
12641
+ completionSource: z.ZodOptional<z.ZodEnum<{
12642
+ tool: "tool";
12643
+ turn: "turn";
12644
+ }>>;
12645
+ toolObservations: z.ZodOptional<z.ZodArray<z.ZodObject<{
12646
+ toolName: z.ZodString;
12647
+ outcome: z.ZodEnum<{
12648
+ success: "success";
12649
+ failure: "failure";
12650
+ }>;
12651
+ artifact: z.ZodOptional<z.ZodObject<{
12652
+ kind: z.ZodString;
12653
+ id: z.ZodString;
12654
+ revision: z.ZodString;
12655
+ }, z.core.$strict>>;
12656
+ }, z.core.$strict>>>;
12657
+ }, z.core.$strip>;
12658
+ type AwaitSubagentResponse$1 = z.infer<typeof AwaitSubagentResponseSchema>;
10543
12659
  /**
10544
- * Creates a manual workflow trigger (user-initiated only).
10545
- * @returns A typed workflow trigger definition with `void` payload
12660
+ * Send RPC - sends message to subagent, optionally resolving pending request.
10546
12661
  */
10547
- declare function ManualWorkflowTrigger(): WorkflowTriggerDef<void>;
12662
+ declare const SendToSubagentRequestSchema: z.ZodObject<{
12663
+ subagentId: z.ZodString;
12664
+ content: z.ZodString;
12665
+ inResponseTo: z.ZodOptional<z.ZodString>;
12666
+ }, z.core.$strip>;
12667
+ type SendToSubagentRequest = z.infer<typeof SendToSubagentRequestSchema>;
12668
+ declare const SendToSubagentResponseSchema: z.ZodObject<{
12669
+ sent: z.ZodBoolean;
12670
+ resolvedPending: z.ZodBoolean;
12671
+ }, z.core.$strip>;
12672
+ type SendToSubagentResponse = z.infer<typeof SendToSubagentResponseSchema>;
10548
12673
  /**
10549
- * Cron trigger payload injected into `context.trigger` at execution time.
12674
+ * Kill RPC - terminates a running subagent.
10550
12675
  */
10551
- interface CronTriggerPayload {
10552
- /** Epoch milliseconds when the cron fired. */
10553
- readonly firedAt: number;
10554
- /** Zero-based index of this trigger in the workflow's `triggers` array. */
10555
- readonly triggerIndex: number;
10556
- }
12676
+ declare const KillSubagentRequestSchema: z.ZodObject<{
12677
+ subagentId: z.ZodString;
12678
+ reason: z.ZodOptional<z.ZodString>;
12679
+ }, z.core.$strip>;
12680
+ type KillSubagentRequest = z.infer<typeof KillSubagentRequestSchema>;
12681
+ declare const KillSubagentResponseSchema: z.ZodObject<{
12682
+ killed: z.ZodBoolean;
12683
+ }, z.core.$strip>;
12684
+ type KillSubagentResponse = z.infer<typeof KillSubagentResponseSchema>;
10557
12685
  /**
10558
- * Creates a cron-based workflow trigger.
10559
- * @param options - Trigger configuration options
10560
- * @returns A typed workflow trigger definition with {@link CronTriggerPayload}
12686
+ * Report Progress RPC - child reports progress update.
10561
12687
  */
10562
- declare function CronWorkflowTrigger(options: {
10563
- /** Cron expression (e.g. `'0 9 * * 1'`). */readonly schedule: string; /** Optional IANA timezone string; defaults to UTC at runtime. */
10564
- readonly timezone?: string;
10565
- }): WorkflowTriggerDef<CronTriggerPayload>;
12688
+ declare const ReportProgressRequestSchema: z.ZodObject<{
12689
+ subagentId: z.ZodString;
12690
+ update: z.ZodString;
12691
+ percentComplete: z.ZodOptional<z.ZodNumber>;
12692
+ }, z.core.$strip>;
12693
+ type ReportProgressRequest = z.infer<typeof ReportProgressRequestSchema>;
12694
+ declare const ReportProgressResponseSchema: z.ZodObject<{
12695
+ reported: z.ZodBoolean;
12696
+ }, z.core.$strip>;
12697
+ type ReportProgressResponse = z.infer<typeof ReportProgressResponseSchema>;
10566
12698
  /**
10567
- * Webhook trigger payload injected into `context.trigger` at execution time.
12699
+ * Request Input RPC - child requests input from parent.
12700
+ * Blocks until parent responds or timeout.
10568
12701
  */
10569
- interface WebhookTriggerPayload {
10570
- /** Webhook event name (e.g. `'push'`, `'pull_request'`). */
10571
- readonly event: string;
10572
- /** Branch filter value, if configured. */
10573
- readonly branch?: string;
10574
- /** Repository slug (`owner/name`), if configured. */
10575
- readonly repo?: string;
10576
- /** Raw webhook payload forwarded from the webhook handler. */
10577
- readonly body: Record<string, unknown>;
10578
- }
12702
+ declare const RequestInputRpcRequestSchema: z.ZodObject<{
12703
+ subagentId: z.ZodString;
12704
+ question: z.ZodString;
12705
+ context: z.ZodOptional<z.ZodString>;
12706
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
12707
+ }, z.core.$strip>;
12708
+ type RequestInputRpcRequest = z.infer<typeof RequestInputRpcRequestSchema>;
12709
+ declare const RequestInputRpcResponseSchema: z.ZodObject<{
12710
+ responded: z.ZodBoolean;
12711
+ response: z.ZodOptional<z.ZodString>;
12712
+ timedOut: z.ZodBoolean;
12713
+ }, z.core.$strip>;
12714
+ type RequestInputRpcResponse = z.infer<typeof RequestInputRpcResponseSchema>;
10579
12715
  /**
10580
- * Creates a webhook-based workflow trigger.
10581
- * @param options - Trigger configuration options
10582
- * @returns A typed workflow trigger definition with {@link WebhookTriggerPayload}
12716
+ * Complete Task RPC - child signals task completion.
10583
12717
  */
10584
- declare function WebhookWorkflowTrigger(options: {
10585
- /** Webhook event name. */readonly event: string; /** Optional branch filter. */
10586
- readonly branch?: string; /** Optional repository filter (`owner/name`). */
10587
- readonly repo?: string;
10588
- }): WorkflowTriggerDef<WebhookTriggerPayload>;
12718
+ declare const CompleteTaskRequestSchema: z.ZodObject<{
12719
+ subagentId: z.ZodString;
12720
+ result: z.ZodString;
12721
+ summary: z.ZodOptional<z.ZodString>;
12722
+ }, z.core.$strip>;
12723
+ type CompleteTaskRequest = z.infer<typeof CompleteTaskRequestSchema>;
12724
+ declare const CompleteTaskResponseSchema: z.ZodObject<{
12725
+ completed: z.ZodBoolean;
12726
+ }, z.core.$strip>;
12727
+ type CompleteTaskResponse = z.infer<typeof CompleteTaskResponseSchema>;
10589
12728
  /**
10590
- * Creates an extension-contributed workflow trigger.
10591
- * @param options - Trigger configuration options
10592
- * @returns A typed workflow trigger definition with `Record<string, unknown>` payload
12729
+ * List subagents by parent session RPC.
12730
+ * Returns all non-terminal subagents spawned by the given parent session.
12731
+ *
12732
+ * Note: SubagentService tracks subagents in memory only. This list will be
12733
+ * empty after a process restart — subagents re-register as they report back.
10593
12734
  */
10594
- declare function ExtensionWorkflowTrigger(options: {
10595
- /** Extension trigger type identifier (`extensionName:eventName`). */readonly extensionType: `${string}:${string}`; /** Optional opaque runtime configuration. */
10596
- readonly config?: Record<string, unknown>;
10597
- }): WorkflowTriggerDef<Record<string, unknown>>;
12735
+ declare const ListSubagentsBySessionRequestSchema: z.ZodObject<{
12736
+ parentSessionId: z.ZodString;
12737
+ }, z.core.$strip>;
12738
+ type ListSubagentsBySessionRequest = z.infer<typeof ListSubagentsBySessionRequestSchema>;
12739
+ declare const ListSubagentsBySessionResponseSchema: z.ZodObject<{
12740
+ subagents: z.ZodArray<z.ZodObject<{
12741
+ subagentId: z.ZodString;
12742
+ task: z.ZodString;
12743
+ status: z.ZodEnum<{
12744
+ completed: "completed";
12745
+ cancelled: "cancelled";
12746
+ failed: "failed";
12747
+ spawning: "spawning";
12748
+ running: "running";
12749
+ waiting_input: "waiting_input";
12750
+ hung: "hung";
12751
+ }>;
12752
+ }, z.core.$strip>>;
12753
+ }, z.core.$strip>;
12754
+ type ListSubagentsBySessionResponse = z.infer<typeof ListSubagentsBySessionResponseSchema>;
10598
12755
  //#endregion
10599
12756
  //#region core/contracts/src/workflow/loop.d.ts
10600
12757
  /**
@@ -10662,7 +12819,9 @@ type DelegateToRoleOptions = NodeOptions & {
10662
12819
  */
10663
12820
  readonly outputSchema?: Record<string, JsonValue$1>; /** Timeout in milliseconds for the delegated role execution. */
10664
12821
  readonly timeoutMs?: number; /** Completion behavior requested from the spawned role subagent. */
10665
- readonly completion?: CompletionMode$1;
12822
+ readonly completion?: CompletionMode$1; /** Exact tool allowlist selected for this delegation. */
12823
+ readonly allowedTools?: string[]; /** Authority-owned finalizer applied to the successful delegate result. */
12824
+ readonly resultFinalizerId?: string;
10666
12825
  };
10667
12826
  /**
10668
12827
  * Configuration for a delegate-agent node created via the fluent builder.
@@ -10679,6 +12838,12 @@ interface AgentConfig {
10679
12838
  * JSON Schema for the expected agent output.
10680
12839
  */
10681
12840
  readonly outputSchema?: Record<string, JsonValue$1>;
12841
+ /** Exact tool allowlist selected for this delegation. */
12842
+ readonly allowedTools?: string[];
12843
+ /** Completion contract for the spawned subagent. Defaults to tool completion. */
12844
+ readonly completion?: CompletionMode$1;
12845
+ /** Authority-owned finalizer applied to the successful delegate result. */
12846
+ readonly resultFinalizerId?: string;
10682
12847
  }
10683
12848
  /**
10684
12849
  * Options for gate nodes, including the required resume schema.
@@ -10905,6 +13070,8 @@ interface DefineWorkflowOptions<TTriggers extends readonly WorkflowTriggerDef<un
10905
13070
  readonly description?: string;
10906
13071
  /** Initial trigger set. Additional triggers can be added via `addTrigger`. */
10907
13072
  readonly triggers?: TTriggers;
13073
+ /** Definition-owned finalizer selected after a successful workflow execution. */
13074
+ readonly successFinalizerId?: WorkflowFinalizerId;
10908
13075
  }
10909
13076
  /**
10910
13077
  * A fluent workflow builder returned by {@link defineWorkflow}.
@@ -11266,4 +13433,4 @@ declare const ExecutionHintsSchema$1: z.ZodObject<{
11266
13433
  }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
11267
13434
  type ExecutionHints = z.infer<typeof ExecutionHintsSchema$1>;
11268
13435
  //#endregion
11269
- export { AwaitSubagentRequest as $, WorkflowParallelNodeSchema as $i, JsonPatchOperationSchema$1 as $n, ExecutionStatusSchema$1 as $r, IWorkflowRunner$1 as $t, LoopGateHandler$1 as A, WorkflowGateInstance as Ai, serializeArtifactRef$1 as An, WorkflowCancelPayloadSchema as Ar, WorkLogArtifactWrite as At, WorkflowTriggerDef as B, WorkflowListQuery as Bi, BusEventPublishTarget as Bn, BusEventTrigger as Br, WorkLogStats as Bt, NodeOptions as C, WorkflowDynamicRegionSchema as Ci, WorkflowNodeVisitor as Cn, StepRunnerPlatformDefaultsSchema as Cr, SpawnSubagentRpcResponse as Ct, WorkflowStateAuthoringDefinition as D, WorkflowExecutionScopeSchema as Di, WorkflowArtifactRef as Dn, TokenUsageSchema as Dr, SubagentExecutionFailed as Dt, WorkflowBuilder as E, WorkflowExecutionScope as Ei, WorkflowRunContextSchema$1 as En, TokenUsage as Er, SubagentConstraints$1 as Et, ExtensionWorkflowTrigger as F, WorkflowGateStatusSchema as Fi, WorkflowSubjects$1 as Fn, WorkflowStepTypeSchema$1 as Fr, WorkLogExecutionSummarySchema as Ft, IterateHandler as G, WorkflowNodeBase as Gi, ContextBundleSchema as Gn, EXECUTION_LIST_DEFAULT_LIMIT$1 as Gr, CompleteExternalExecutionRequestSchema as Gt, ArtifactPatch as H, WorkflowLoopNode as Hi, BusRequestSource as Hn, EXECUTIONS_BY_ARTIFACT_REFS_DEFAULT_LIMIT_PER_REF as Hr, WorkLogUsageSummary as Ht, ExtractTriggerPayload as I, WorkflowIterateChainNode as Ii, ArtifactPublishTarget as In, createStepCancelSubject$1 as Ir, WorkLogFrameEntry as It, StationStepContext as J, WorkflowNodeType as Ji, ContextSource as Jn, ExecutionListCursor as Jr, ExternalExecutionFrameCompletionSchema as Jt, PreviousStepOutput as K, WorkflowNodeBaseSchema as Ki, ContextPublishTarget as Kn, EXECUTION_LIST_MAX_LIMIT$1 as Kr, EXTERNAL_EXECUTION_ID_PREFIX$1 as Kt, ManualWorkflowTrigger as L, WorkflowIterateChainNodeSchema as Li, ArtifactPublishTargetSchema as Ln, createWorkflowCancelSubject$1 as Lr, WorkLogFrameEntrySchema$1 as Lt, BusEventWorkflowTrigger as M, WorkflowGateNode as Mi, WorkflowProgressUpdate as Mn, WorkflowRunnerStepType as Mr, WorkLogDynamicNodeMaterialization as Mt, CronTriggerPayload as N, WorkflowGateNodeSchema as Ni, WorkflowProgressUpdateSchema as Nn, WorkflowRunnerStepTypeSchema as Nr, WorkLogDynamicNodeMaterializationSchema as Nt, WorkflowZodSchemas$1 as O, WorkflowFrameState$1 as Oi, WorkflowArtifactRefSchema as On, WORKFLOW_CANCELLED_REASON$1 as Or, SubagentStatus$1 as Ot, CronWorkflowTrigger as P, WorkflowGateStatus as Pi, WorkflowSchemas as Pn, WorkflowStepType as Pr, WorkLogExecutionSummary as Pt, WorkflowStateContext as Q, WorkflowParallelNode as Qi, JsonPatchOperation$1 as Qn, ExecutionStatus as Qr, RegisterExternalExecutionRequestSchema as Qt, WebhookTriggerPayload as R, WorkflowIterateNode as Ri, ArtifactQuerySource as Rn, IWorkflowTriggerTypeRegistry$1 as Rr, WorkLogGateEvent as Rt, LoopOptions as S, WorkflowDynamicRegion as Si, WalkRelationship as Sn, StepRunnerPlatformDefaults$1 as Sr, SpawnSubagentRpcRequestSchema$1 as St, ParallelOptions as T, WorkflowExecutionSchema$1 as Ti, WorkflowRunContext as Tn, StepTelemetrySchema as Tr, SubagentConfigSchema$1 as Tt, ArtifactUpdateOperation as U, WorkflowLoopNodeSchema as Ui, BusRequestSourceSchema as Un, EXECUTIONS_BY_ARTIFACT_REFS_MAX_LIMIT_PER_REF as Ur, WorkLogUsageSummarySchema as Ut, ArtifactContext as V, WorkflowListQuerySchema$1 as Vi, BusEventPublishTargetSchema as Vn, BusEventTriggerSchema as Vr, WorkLogStatsSchema as Vt, ArtifactUpdater as W, WorkflowNode as Wi, ContextBundle as Wn, EXECUTIONS_BY_ARTIFACT_REFS_MAX_REFS as Wr, CompleteExternalExecutionRequest as Wt, WorkflowContext as X, WorkflowParallelMode as Xi, ResolvedContextEntry as Xn, ExecutionListQuery as Xr, ExternalExecutionFrameStartSchema as Xt, StepContext as Y, WorkflowNodeTypeSchema as Yi, ContextSourceSchema as Yn, ExecutionListCursorSchema as Yr, ExternalExecutionFrameStart as Yt, WorkflowContextBase as Z, WorkflowParallelModeSchema as Zi, ResolvedContextEntrySchema as Zn, ExecutionListQuerySchema$1 as Zr, RegisterExternalExecutionRequest as Zt, BuiltWorkflow as _, WorkflowDefinitionSchema$1 as _i, ProjectedWorkflowGraph as _n, StepRunConfigSchema as _r, RequestInputRpcRequest as _t, defineWorkflowBundle as a, WorkflowSequenceNodeSchema as aa, GateInstanceListQuerySchema$1 as ai, WorkflowRunResultSchema as an, ExecutionLinkSchema$1 as ar, ContextMode as at, IterateOptions as b, WorkflowDelegateRoleNode as bi, projectWorkflowGraph as bn, StepRunnerBusAuth$1 as br, SendToSubagentResponse as bt, delegateToRole as c, WorkflowStateDefinition as ca, WorkflowArtifactBinding as ci, WorkflowWorkerBusAuthSchema as cn, SpanRecord as cr, ExecuteSubagentResponse as ct, iterateChain as d, WorkflowStationNodeSchema as da, WorkflowArtifactWriteDeclarationSchema as di, WorkflowWorkerSource$1 as dn, SpanStatusSchema as dr, ListSubagentsBySessionRequest as dt, WorkflowResolvedAgent as ea, ExecutionsByArtifactRefsQuery as ei, WorkerContributionManifest$1 as en, WorkflowError$1 as er, AwaitSubagentResponse as et, loop as f, WorkflowTrigger as fa, WorkflowCondition as fi, WorkflowWorkerSourceSchema$1 as fn, IStepRunner as fr, ListSubagentsBySessionResponse as ft, ArtifactBindingOptions as g, WorkflowDefinitionProvenanceSchema as gi, ProjectedNodeRole as gn, StepRunConfig as gr, ReportProgressResponse as gt, AgentConfig as h, WorkflowDefinitionProvenance as hi, ProjectedNode as hn, StepCancelSubject as hr, ReportProgressRequest as ht, WorkflowBundle as i, WorkflowSequenceNode as ia, GateInstanceListQuery as ii, WorkflowRunResult$1 as in, ExecutionLinkListQuerySchema$1 as ir, CompletionModeSchema as it, validateNoNestedLoops as j, WorkflowGateInstanceSchema$1 as ji, WorkflowNamespace$1 as jn, WorkflowCancelSubject as jr, WorkLogArtifactWriteSchema as jt, LoopGateContext as k, WorkflowFrameStateSchema$1 as ki, parseArtifactRef as kn, WorkflowCancelPayload as kr, SubagentStatusSchema as kt, gate as l, WorkflowStateDefinitionSchema as la, WorkflowArtifactBindingSchema as li, WorkflowWorkerConfig$1 as ln, SpanRecordSchema$1 as lr, KillSubagentRequest as lt, zodSchemaToJsonRecord$1 as m, WorkflowDefinition$1 as mi, ProjectedEdgeKind as mn, StepCancelPayloadSchema as mr, PendingRequestSchema as mt, ExecutionHintsSchema$1 as n, WorkflowResolvedRole as na, ExtensionWorkflowTrigger$1 as ni, WorkerContributionPackageRef as nn, ExecutionLink as nr, CompleteTaskResponse as nt, defineWorkflow as o, WorkflowSourceLocation as oa, LoopGateOutcome as oi, WorkflowRunnerRunOptions$1 as on, ExecutionLinkType as or, ContextModeSchema$1 as ot, station as p, WorkflowTriggerSchema as pa, WorkflowConditionSchema as pi, ProjectedEdge as pn, StepCancelPayload as pr, PendingRequest$1 as pt, StationHandler$1 as q, WorkflowNodeSchema as qi, ContextPublishTargetSchema as qn, EXECUTION_LIST_MIN_LIMIT$1 as qr, ExternalExecutionFrameCompletion as qt, ExecutionSourceHintSchema as r, WorkflowResolvedRoleSchema as ra, ExtensionWorkflowTriggerSchema as ri, WorkerContributionPackageRefSchema as rn, ExecutionLinkListQuery as rr, CompletionMode$1 as rt, delegateToAgent as s, WorkflowSourceLocationSchema as sa, LoopGateOutcomeSchema as si, WorkflowWorkerBusAuth as sn, ExecutionLinkTypeSchema as sr, DEFAULT_CONSTRAINTS$1 as st, ExecutionHints as t, WorkflowResolvedAgentSchema as ta, ExecutionsByArtifactRefsQuerySchema$1 as ti, WorkerContributionManifestSchema as tn, WorkflowErrorCode$1 as tr, CompleteTaskRequest as tt, iterate as u, WorkflowStationNode as ua, WorkflowArtifactWriteDeclaration as ui, WorkflowWorkerConfigSchema$1 as un, SpanStatus as ur, KillSubagentResponse as ut, DefineWorkflowOptions as v, WorkflowDelegateAgentNode as vi, WorkflowDefinitionPath as vn, StepRunResult as vr, RequestInputRpcResponse as vt, ParallelMode as w, WorkflowExecution as wi, walkWorkflowDefinition$1 as wn, StepTelemetry as wr, SubagentConfig$1 as wt, LoopGateRegistration as x, WorkflowDelegateRoleNodeSchema as xi, WalkContext as xn, StepRunnerBusAuthSchema as xr, SpawnSubagentRpcRequest as xt, GateOptions as y, WorkflowDelegateAgentNodeSchema as yi, WorkflowDefinitionPathSegment as yn, StepRunResultSchema as yr, SendToSubagentRequest as yt, WebhookWorkflowTrigger as z, WorkflowIterateNodeSchema as zi, ArtifactQuerySourceSchema as zn, WorkflowTriggerTypeRecord as zr, WorkLogGateEventSchema as zt };
13436
+ export { SendToSubagentResponse as $, WorkflowGateNodeSchema as $i, JsonPatchOperationSchema$1 as $n, WorkflowFinalizationIntentSchema as $r, IWorkflowRunner$1 as $t, LoopGateHandler$1 as A, WorkflowStationNode as Aa, WorkflowArtifactWriteDeclaration as Ai, serializeArtifactRef$1 as An, WorkflowCancelPayloadSchema as Ar, WorkLogArtifactWrite as At, DEFAULT_CONSTRAINTS$1 as B, WorkflowDelegateRoleNode as Bi, BusEventPublishTarget as Bn, WorkflowDelegateEconomics as Br, WorkLogStats as Bt, NodeOptions as C, WorkflowResolvedRoleSchema as Ca, ExtensionWorkflowTriggerSchema as Ci, WorkflowNodeVisitor as Cn, StepRunnerPlatformDefaultsSchema as Cr, CronWorkflowTrigger as Ct, WorkflowStateAuthoringDefinition as D, WorkflowSourceLocationSchema as Da, LoopGateOutcomeSchema as Di, WorkflowArtifactRef as Dn, TokenUsageSchema as Dr, WebhookTriggerPayload as Dt, WorkflowBuilder as E, WorkflowSourceLocation as Ea, LoopGateOutcome as Ei, WorkflowRunContextSchema$1 as En, TokenUsage as Er, ManualWorkflowTrigger as Et, CompleteTaskResponse as F, WorkflowDefinitionProvenance as Fi, WorkflowSubjects$1 as Fn, WorkflowStepTypeSchema$1 as Fr, WorkLogExecutionSummarySchema as Ft, ListSubagentsBySessionResponse as G, WorkflowExecutionSchema$1 as Gi, ContextBundleSchema as Gn, WorkflowDelegateResultFinalizationResponseSchema as Gr, CompleteExternalExecutionRequestSchema as Gt, KillSubagentRequest as H, WorkflowDynamicRegion as Hi, BusRequestSource as Hn, WorkflowDelegateResultFinalizationRequest as Hr, WorkLogUsageSummary as Ht, CompletionMode$1 as I, WorkflowDefinitionProvenanceSchema as Ii, ArtifactPublishTarget as In, createStepCancelSubject$1 as Ir, WorkLogFrameEntry as It, ReportProgressRequest as J, WorkflowFrameState$1 as Ji, ContextSource as Jn, WorkflowDelegateToolObservationSchema as Jr, ExternalExecutionFrameCompletionSchema as Jt, PendingRequest$1 as K, WorkflowExecutionScope as Ki, ContextPublishTarget as Kn, WorkflowDelegateResultFinalizerIdSchema as Kr, EXTERNAL_EXECUTION_ID_PREFIX$1 as Kt, CompletionModeSchema as L, WorkflowDefinitionSchema$1 as Li, ArtifactPublishTargetSchema as Ln, createWorkflowCancelSubject$1 as Lr, WorkLogFrameEntrySchema$1 as Lt, AwaitSubagentRequest as M, WorkflowTrigger as Ma, WorkflowCondition as Mi, WorkflowProgressUpdate as Mn, WorkflowRunnerStepType as Mr, WorkLogDynamicNodeMaterialization as Mt, AwaitSubagentResponse$1 as N, WorkflowTriggerSchema as Na, WorkflowConditionSchema as Ni, WorkflowProgressUpdateSchema as Nn, WorkflowRunnerStepTypeSchema as Nr, WorkLogDynamicNodeMaterializationSchema as Nt, WorkflowZodSchemas$1 as O, WorkflowStateDefinition as Oa, WorkflowArtifactBinding as Oi, WorkflowArtifactRefSchema as On, WORKFLOW_CANCELLED_REASON$1 as Or, WebhookWorkflowTrigger as Ot, CompleteTaskRequest as P, WorkflowDefinition$1 as Pi, WorkflowSchemas as Pn, WorkflowStepType as Pr, WorkLogExecutionSummary as Pt, SendToSubagentRequest as Q, WorkflowGateNode as Qi, JsonPatchOperation$1 as Qn, WorkflowFinalizationIntent as Qr, RegisterExternalExecutionRequestSchema as Qt, ContextMode as R, WorkflowDelegateAgentNode as Ri, ArtifactQuerySource as Rn, IWorkflowTriggerTypeRegistry$1 as Rr, WorkLogGateEvent as Rt, LoopOptions as S, WorkflowResolvedRole as Sa, ExtensionWorkflowTrigger$1 as Si, WalkRelationship as Sn, StepRunnerPlatformDefaults$1 as Sr, CronTriggerPayload as St, ParallelOptions as T, WorkflowSequenceNodeSchema as Ta, GateInstanceListQuerySchema$1 as Ti, WorkflowRunContext as Tn, StepTelemetrySchema as Tr, ExtractTriggerPayload as Tt, KillSubagentResponse as U, WorkflowDynamicRegionSchema as Ui, BusRequestSourceSchema as Un, WorkflowDelegateResultFinalizationRequestSchema as Ur, WorkLogUsageSummarySchema as Ut, ExecuteSubagentResponse as V, WorkflowDelegateRoleNodeSchema as Vi, BusEventPublishTargetSchema as Vn, WorkflowDelegateEconomicsSchema as Vr, WorkLogStatsSchema as Vt, ListSubagentsBySessionRequest as W, WorkflowExecution$1 as Wi, ContextBundle as Wn, WorkflowDelegateResultFinalizationResponse as Wr, CompleteExternalExecutionRequest as Wt, RequestInputRpcRequest as X, WorkflowGateInstance as Xi, ResolvedContextEntry as Xn, WorkflowFinalizationClaimSchema$1 as Xr, ExternalExecutionFrameStartSchema as Xt, ReportProgressResponse as Y, WorkflowFrameStateSchema$1 as Yi, ContextSourceSchema as Yn, WorkflowFinalizationClaim as Yr, ExternalExecutionFrameStart as Yt, RequestInputRpcResponse as Z, WorkflowGateInstanceSchema$1 as Zi, ResolvedContextEntrySchema as Zn, WorkflowFinalizationDeliveryResultSchema as Zr, RegisterExternalExecutionRequest as Zt, BuiltWorkflow as _, WorkflowParallelModeSchema as _a, ExecutionListQuerySchema$1 as _i, ProjectedWorkflowGraph as _n, StepRunConfigSchema as _r, StepContext as _t, defineWorkflowBundle as a, WorkflowIterateNodeSchema as aa, createWorkflowFinalizerNamespace$1 as ai, WorkflowRunResultSchema as an, ExecutionLinkSchema$1 as ar, SubagentConstraints$1 as at, IterateOptions as b, WorkflowResolvedAgent as ba, ExecutionsByArtifactRefsQuery as bi, projectWorkflowGraph as bn, StepRunnerBusAuth$1 as br, WorkflowStateContext as bt, delegateToRole as c, WorkflowLoopNode as ca, EXECUTIONS_BY_ARTIFACT_REFS_DEFAULT_LIMIT_PER_REF as ci, WorkflowWorkerBusAuthSchema as cn, SpanRecord as cr, SubagentStatusSchema as ct, iterateChain as d, WorkflowNodeBase as da, EXECUTION_LIST_DEFAULT_LIMIT$1 as di, WorkflowWorkerSource$1 as dn, SpanStatusSchema as dr, ArtifactUpdateOperation as dt, WorkflowGateStatus as ea, WorkflowFinalizerId as ei, WorkerContributionManifest$1 as en, WorkflowError$1 as er, SpawnSubagentRpcRequest as et, loop as f, WorkflowNodeBaseSchema as fa, EXECUTION_LIST_MAX_LIMIT$1 as fi, WorkflowWorkerSourceSchema$1 as fn, IStepRunner as fr, ArtifactUpdater as ft, ArtifactBindingOptions as g, WorkflowParallelMode as ga, ExecutionListQuery as gi, ProjectedNodeRole as gn, StepRunConfig as gr, StationStepContext as gt, AgentConfig as h, WorkflowNodeTypeSchema as ha, ExecutionListCursorSchema as hi, ProjectedNode as hn, StepCancelSubject as hr, StationHandler$1 as ht, WorkflowBundle as i, WorkflowIterateNode as ia, createWorkflowDelegateResultFinalizerNamespace$1 as ii, WorkflowRunResult$1 as in, ExecutionLinkListQuerySchema$1 as ir, SubagentConfigSchema$1 as it, validateNoNestedLoops as j, WorkflowStationNodeSchema as ja, WorkflowArtifactWriteDeclarationSchema as ji, WorkflowNamespace$1 as jn, WorkflowCancelSubject as jr, WorkLogArtifactWriteSchema as jt, LoopGateContext as k, WorkflowStateDefinitionSchema as ka, WorkflowArtifactBindingSchema as ki, parseArtifactRef as kn, WorkflowCancelPayload as kr, WorkflowTriggerDef as kt, gate as l, WorkflowLoopNodeSchema as la, EXECUTIONS_BY_ARTIFACT_REFS_MAX_LIMIT_PER_REF as li, WorkflowWorkerConfig$1 as ln, SpanRecordSchema$1 as lr, ArtifactContext as lt, zodSchemaToJsonRecord$1 as m, WorkflowNodeType as ma, ExecutionListCursor as mi, ProjectedEdgeKind as mn, StepCancelPayloadSchema as mr, PreviousStepOutput as mt, ExecutionHintsSchema$1 as n, WorkflowIterateChainNode as na, WorkflowTerminalStatus as ni, WorkerContributionPackageRef as nn, ExecutionLink as nr, SpawnSubagentRpcResponse as nt, defineWorkflow as o, WorkflowListQuery as oa, BusEventTrigger as oi, WorkflowRunnerRunOptions$1 as on, ExecutionLinkType as or, SubagentExecutionFailed as ot, station as p, WorkflowNodeSchema as pa, EXECUTION_LIST_MIN_LIMIT$1 as pi, ProjectedEdge as pn, StepCancelPayload as pr, IterateHandler as pt, PendingRequestSchema as q, WorkflowExecutionScopeSchema as qi, ContextPublishTargetSchema as qn, WorkflowDelegateToolObservation as qr, ExternalExecutionFrameCompletion as qt, ExecutionSourceHintSchema as r, WorkflowIterateChainNodeSchema as ra, WorkflowTerminalStatusSchema as ri, WorkerContributionPackageRefSchema as rn, ExecutionLinkListQuery as rr, SubagentConfig$1 as rt, delegateToAgent as s, WorkflowListQuerySchema$1 as sa, BusEventTriggerSchema as si, WorkflowWorkerBusAuth as sn, ExecutionLinkTypeSchema as sr, SubagentStatus$1 as st, ExecutionHints as t, WorkflowGateStatusSchema as ta, WorkflowFinalizerIdSchema$1 as ti, WorkerContributionManifestSchema as tn, WorkflowErrorCode$1 as tr, SpawnSubagentRpcRequestSchema$1 as tt, iterate as u, WorkflowNode as ua, EXECUTIONS_BY_ARTIFACT_REFS_MAX_REFS as ui, WorkflowWorkerConfigSchema$1 as un, SpanStatus as ur, ArtifactPatch as ut, DefineWorkflowOptions as v, WorkflowParallelNode as va, ExecutionStatus as vi, WorkflowDefinitionPath as vn, StepRunResult as vr, WorkflowContext as vt, ParallelMode as w, WorkflowSequenceNode as wa, GateInstanceListQuery as wi, walkWorkflowDefinition$1 as wn, StepTelemetry as wr, ExtensionWorkflowTrigger as wt, LoopGateRegistration as x, WorkflowResolvedAgentSchema as xa, ExecutionsByArtifactRefsQuerySchema$1 as xi, WalkContext as xn, StepRunnerBusAuthSchema as xr, BusEventWorkflowTrigger as xt, GateOptions as y, WorkflowParallelNodeSchema as ya, ExecutionStatusSchema$1 as yi, WorkflowDefinitionPathSegment as yn, StepRunResultSchema as yr, WorkflowContextBase as yt, ContextModeSchema$1 as z, WorkflowDelegateAgentNodeSchema as zi, ArtifactQuerySourceSchema as zn, WorkflowTriggerTypeRecord as zr, WorkLogGateEventSchema as zt };