@makaio/framework 1.0.0-dev-1783615060726 → 1.0.0-dev-1783687982716

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 (115) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapter-CA8rPIUz.mjs +1 -0
  3. package/dist/adapters/config/index.d.mts +1 -1
  4. package/dist/adapters/index.d.mts +38 -3
  5. package/dist/adapters/index.mjs +4 -4
  6. package/dist/bus/index.mjs +1 -1
  7. package/dist/client-DaR4mzqn.mjs +1 -0
  8. package/dist/contracts/adapter/index.d.mts +2 -2
  9. package/dist/contracts/adapter/index.mjs +1 -1
  10. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  11. package/dist/contracts/artifact/index.d.mts +1 -1
  12. package/dist/contracts/client/index.d.mts +2 -2
  13. package/dist/contracts/client/index.mjs +1 -1
  14. package/dist/contracts/config/index.d.mts +12 -12
  15. package/dist/contracts/extension/index.d.mts +3 -3
  16. package/dist/contracts/facet/index.d.mts +1 -1
  17. package/dist/contracts/harness/index.d.mts +1 -1
  18. package/dist/contracts/index.d.mts +120 -68
  19. package/dist/contracts/index.mjs +1 -1
  20. package/dist/contracts/materialization/index.d.mts +3 -3
  21. package/dist/contracts/provider/index.d.mts +1 -1
  22. package/dist/contracts/session/index.d.mts +3 -3
  23. package/dist/contracts/session/index.mjs +1 -1
  24. package/dist/contracts/shared/index.d.mts +1 -1
  25. package/dist/contracts/skill/index.d.mts +1 -1
  26. package/dist/contracts/variant/index.d.mts +1 -1
  27. package/dist/contracts/workflow/index.d.mts +3 -3
  28. package/dist/contracts/workflow/index.mjs +1 -1
  29. package/dist/{definition-DePb3ke-.d.mts → definition-s9PIua2B.d.mts} +1 -1
  30. package/dist/drizzle/0024_external_settlement_fingerprint.sql +1 -0
  31. package/dist/drizzle/0025_external_registration_frame.sql +1 -0
  32. package/dist/drizzle/meta/_journal.json +14 -0
  33. package/dist/{index-BSprsrul.d.mts → index-B4ZddkPI.d.mts} +171 -132
  34. package/dist/{index-DWu3qrwe.d.mts → index-B9d_8_V2.d.mts} +8 -8
  35. package/dist/{index-Qd1Qom8M.d.mts → index-BUrNl0QJ.d.mts} +36 -36
  36. package/dist/{index-2fK9iSHI.d.mts → index-BWIkf5oJ.d.mts} +6 -6
  37. package/dist/{index-Cx1Bm6WD.d.mts → index-Bc82MC0z.d.mts} +4 -4
  38. package/dist/{index-S7lj2TLp.d.mts → index-CAhKyxfm.d.mts} +481 -101
  39. package/dist/{index-DZPNuWMc.d.mts → index-CmHdpW0E.d.mts} +11 -11
  40. package/dist/{index-C9FCWOhp.d.mts → index-D4gn93gL.d.mts} +4 -4
  41. package/dist/{index-DLNRgZPo2.d.mts → index-D94cDExW2.d.mts} +15 -15
  42. package/dist/{index-D8wmMJLi.d.mts → index-DLDQDXhD.d.mts} +3 -3
  43. package/dist/{index-DKaEpPFS.d.mts → index-DNfNwGu6.d.mts} +9 -9
  44. package/dist/{index-BMbmoarE.d.mts → index-DTBQOCar.d.mts} +16 -16
  45. package/dist/{index-DZ14azod.d.mts → index-DTkGyKKA.d.mts} +174 -15
  46. package/dist/{index-DEzdNQum.d.mts → index-Di84JjS0.d.mts} +2 -2
  47. package/dist/{index-DoEF9LAc.d.mts → index-DsLpP5ek.d.mts} +1 -1
  48. package/dist/{index-CaerrEDH.d.mts → index-NkNbYFud.d.mts} +1 -1
  49. package/dist/{index-CqCe7Phc.d.mts → index-mU2lnU7O.d.mts} +6 -6
  50. package/dist/{index-BbQpQ1N3.d.mts → index-oePgeOph.d.mts} +87 -3
  51. package/dist/kernel/extension/index.d.mts +1 -1
  52. package/dist/kernel/index.d.mts +2 -2
  53. package/dist/kernel/observability/index.d.mts +1 -1
  54. package/dist/loop-gate-handlers-o2B5FPdF.mjs +1 -0
  55. package/dist/{namespace-j7vFsmYL.d.mts → namespace-3yGm4WF9.d.mts} +2 -2
  56. package/dist/{namespace-D8P8Sxce2.d.mts → namespace-6sIu5nBI2.d.mts} +2 -2
  57. package/dist/{namespace-CZK2ff3B.d.mts → namespace-B9V9R3AY.d.mts} +22 -22
  58. package/dist/{namespace-Ceg3zkt2.d.mts → namespace-BGIeqwfU.d.mts} +20 -20
  59. package/dist/{namespace-CfvtDD_U.d.mts → namespace-BLER-Qom.d.mts} +2 -2
  60. package/dist/{namespace-Dc94fHZW.d.mts → namespace-Dm454cNM.d.mts} +36 -36
  61. package/dist/{namespace-DuUCiVmK.d.mts → namespace-d_0I6P7N.d.mts} +58 -58
  62. package/dist/package-Co_GO3UD.mjs +7 -0
  63. package/dist/{package-B6mEMD8r.d.mts → package-DmVZxufT.d.mts} +1 -1
  64. package/dist/package.json +1 -1
  65. package/dist/{schema-B9goOieO.d.mts → schema-B5vHi7Uu.d.mts} +1 -1
  66. package/dist/{schemas-CoFCV42v.d.mts → schemas-B_t6oOK-.d.mts} +2 -2
  67. package/dist/{schemas-D512XweP.d.mts → schemas-CJ2JvA7d.d.mts} +3 -3
  68. package/dist/{schemas-Br-rSxPE2.d.mts → schemas-CNUk34qC2.d.mts} +19 -19
  69. package/dist/schemas-CVo8qAK-.mjs +1 -0
  70. package/dist/{schemas-lnE9YoG7.d.mts → schemas-CscdPqCt.d.mts} +3 -3
  71. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  72. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  73. package/dist/services/agent-runtime/index.d.mts +2 -2
  74. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  75. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  76. package/dist/services/context-rules/index.d.mts +14 -14
  77. package/dist/services/execution-target/index.d.mts +1 -1
  78. package/dist/services/filesystem/namespace.d.mts +12 -12
  79. package/dist/services/filesystem/schemas.d.mts +6 -6
  80. package/dist/services/harness/index.d.mts +3 -3
  81. package/dist/services/index.d.mts +65 -65
  82. package/dist/services/session/index.d.mts +5 -5
  83. package/dist/services/session/messages/namespace.d.mts +1 -1
  84. package/dist/services/session/session-events/namespace.d.mts +1 -1
  85. package/dist/services/session/storage/namespace.d.mts +1 -1
  86. package/dist/services/session/storage/schema.d.mts +1 -1
  87. package/dist/services/session-editor/index.d.mts +1 -1
  88. package/dist/services/settings/namespace.d.mts +19 -19
  89. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  90. package/dist/services/subagent-template/index.d.mts +2 -2
  91. package/dist/services/subagent-template/namespace.d.mts +1 -1
  92. package/dist/services/subagent-template/schemas.d.mts +1 -1
  93. package/dist/services/tray-menu/index.d.mts +2 -2
  94. package/dist/services/tray-menu/namespace.d.mts +1 -1
  95. package/dist/services/tray-menu/schemas.d.mts +1 -1
  96. package/dist/session-DBfQkgdy.mjs +1 -0
  97. package/dist/{session-lineage-NBFNVkUE.d.mts → session-lineage-C1M7-O3C.d.mts} +1 -1
  98. package/dist/{transition-CmI3q3FA.d.mts → transition-OzGXyy3p.d.mts} +1 -1
  99. package/dist/{types-VwMx5_lS.d.mts → types-1a2D10yb.d.mts} +13 -2
  100. package/dist/{types-BNW5n6qm.d.mts → types-BMS6yfLS.d.mts} +1 -1
  101. package/dist/{types-Dhou-Itn.d.mts → types-BSilhlYE.d.mts} +64 -50
  102. package/dist/workflow-C3dgVwTY.mjs +1 -0
  103. package/dist/workflow-engine/index.d.mts +323 -55
  104. package/dist/workflow-engine/index.mjs +1 -1
  105. package/dist/workflow-engine/package.d.mts +1 -1
  106. package/dist/workflow-engine/package.mjs +1 -1
  107. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  108. package/package.json +1 -1
  109. package/dist/adapter-Lx6K7yQS.mjs +0 -1
  110. package/dist/client-l1Rq5p6X.mjs +0 -1
  111. package/dist/loop-gate-handlers-Bjmat-K3.mjs +0 -1
  112. package/dist/package-BQn_RTo7.mjs +0 -1
  113. package/dist/schemas-CkOigLAT.mjs +0 -1
  114. package/dist/session-D5rVMqmE.mjs +0 -1
  115. package/dist/workflow-C1z7I5CI.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import { It as ArtifactRevision$1 } from "./index-DWu3qrwe.mjs";
1
+ import { It as ArtifactRevision$1 } from "./index-B9d_8_V2.mjs";
2
2
  import { i as JsonValue$1, t as JsonObjectContractSchema } from "./json-value-DtIkQN7g.mjs";
3
3
  import { z } from "zod";
4
4
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -173,10 +173,10 @@ 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";
177
176
  station: "station";
178
177
  "delegate-agent": "delegate-agent";
179
178
  "delegate-role": "delegate-role";
179
+ sequence: "sequence";
180
180
  parallel: "parallel";
181
181
  gate: "gate";
182
182
  iterate: "iterate";
@@ -845,8 +845,8 @@ declare const ExecutionStatusSchema$1: z.ZodEnum<{
845
845
  pending: "pending";
846
846
  completed: "completed";
847
847
  cancelled: "cancelled";
848
- failed: "failed";
849
848
  running: "running";
849
+ failed: "failed";
850
850
  paused: "paused";
851
851
  }>;
852
852
  type ExecutionStatus = z.infer<typeof ExecutionStatusSchema$1>;
@@ -861,8 +861,8 @@ declare const WorkflowExecutionSchema$1: z.ZodObject<{
861
861
  pending: "pending";
862
862
  completed: "completed";
863
863
  cancelled: "cancelled";
864
- failed: "failed";
865
864
  running: "running";
865
+ failed: "failed";
866
866
  paused: "paused";
867
867
  }>;
868
868
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -902,10 +902,10 @@ declare const WorkflowFrameStateSchema$1: z.ZodObject<{
902
902
  frameId: z.ZodString;
903
903
  nodeId: z.ZodString;
904
904
  nodeType: z.ZodEnum<{
905
- sequence: "sequence";
906
905
  station: "station";
907
906
  "delegate-agent": "delegate-agent";
908
907
  "delegate-role": "delegate-role";
908
+ sequence: "sequence";
909
909
  parallel: "parallel";
910
910
  gate: "gate";
911
911
  iterate: "iterate";
@@ -918,8 +918,8 @@ declare const WorkflowFrameStateSchema$1: z.ZodObject<{
918
918
  pending: "pending";
919
919
  completed: "completed";
920
920
  cancelled: "cancelled";
921
- failed: "failed";
922
921
  running: "running";
922
+ failed: "failed";
923
923
  skipped: "skipped";
924
924
  waiting: "waiting";
925
925
  }>;
@@ -993,8 +993,8 @@ declare const WorkflowResolvedRoleSchema: z.ZodObject<{
993
993
  harnessId: z.ZodOptional<z.ZodString>;
994
994
  systemPrompt: z.ZodOptional<z.ZodString>;
995
995
  contextMode: z.ZodOptional<z.ZodEnum<{
996
- fresh: "fresh";
997
996
  fork: "fork";
997
+ fresh: "fresh";
998
998
  }>>;
999
999
  providerContext: z.ZodOptional<z.ZodObject<{
1000
1000
  providerConfigId: z.ZodString;
@@ -1035,8 +1035,8 @@ declare const WorkflowResolvedAgentSchema: z.ZodObject<{
1035
1035
  harnessId: z.ZodOptional<z.ZodString>;
1036
1036
  systemPrompt: z.ZodOptional<z.ZodString>;
1037
1037
  contextMode: z.ZodOptional<z.ZodEnum<{
1038
- fresh: "fresh";
1039
1038
  fork: "fork";
1039
+ fresh: "fresh";
1040
1040
  }>>;
1041
1041
  providerContext: z.ZodOptional<z.ZodObject<{
1042
1042
  providerConfigId: z.ZodString;
@@ -1118,8 +1118,8 @@ declare const ExecutionListQuerySchema$1: z.ZodObject<{
1118
1118
  pending: "pending";
1119
1119
  completed: "completed";
1120
1120
  cancelled: "cancelled";
1121
- failed: "failed";
1122
1121
  running: "running";
1122
+ failed: "failed";
1123
1123
  paused: "paused";
1124
1124
  }>>;
1125
1125
  artifactRef: z.ZodOptional<z.ZodObject<{
@@ -1236,13 +1236,13 @@ interface IWorkflowTriggerTypeRegistry$1 {
1236
1236
  * excluded — they emit lifecycle events only as parent frames, not as runner
1237
1237
  * targets. `gate` is included because gate resolution events are observable.
1238
1238
  */
1239
- declare const WorkflowStepTypeSchema: z.ZodEnum<{
1239
+ declare const WorkflowStepTypeSchema$1: z.ZodEnum<{
1240
1240
  station: "station";
1241
1241
  "delegate-agent": "delegate-agent";
1242
1242
  "delegate-role": "delegate-role";
1243
1243
  gate: "gate";
1244
1244
  }>;
1245
- type WorkflowStepType = z.infer<typeof WorkflowStepTypeSchema>;
1245
+ type WorkflowStepType = z.infer<typeof WorkflowStepTypeSchema$1>;
1246
1246
  /**
1247
1247
  * Node types that are dispatchable to a {@link IStepRunner}.
1248
1248
  * Gates and delegation nodes are coordination steps handled by the orchestrator,
@@ -1472,8 +1472,8 @@ interface IStepRunner {
1472
1472
  */
1473
1473
  declare const SpanStatusSchema: z.ZodEnum<{
1474
1474
  completed: "completed";
1475
- failed: "failed";
1476
1475
  running: "running";
1476
+ failed: "failed";
1477
1477
  skipped: "skipped";
1478
1478
  }>;
1479
1479
  type SpanStatus = z.infer<typeof SpanStatusSchema>;
@@ -1497,8 +1497,8 @@ declare const SpanRecordSchema$1: z.ZodObject<{
1497
1497
  }>;
1498
1498
  status: z.ZodEnum<{
1499
1499
  completed: "completed";
1500
- failed: "failed";
1501
1500
  running: "running";
1501
+ failed: "failed";
1502
1502
  skipped: "skipped";
1503
1503
  }>;
1504
1504
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -2564,8 +2564,8 @@ declare const WorkflowSchemas: {
2564
2564
  pending: "pending";
2565
2565
  completed: "completed";
2566
2566
  cancelled: "cancelled";
2567
- failed: "failed";
2568
2567
  running: "running";
2568
+ failed: "failed";
2569
2569
  paused: "paused";
2570
2570
  }>;
2571
2571
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -2621,8 +2621,8 @@ declare const WorkflowSchemas: {
2621
2621
  pending: "pending";
2622
2622
  completed: "completed";
2623
2623
  cancelled: "cancelled";
2624
- failed: "failed";
2625
2624
  running: "running";
2625
+ failed: "failed";
2626
2626
  paused: "paused";
2627
2627
  }>>;
2628
2628
  artifactRef: z.ZodOptional<z.ZodObject<{
@@ -2644,8 +2644,8 @@ declare const WorkflowSchemas: {
2644
2644
  pending: "pending";
2645
2645
  completed: "completed";
2646
2646
  cancelled: "cancelled";
2647
- failed: "failed";
2648
2647
  running: "running";
2648
+ failed: "failed";
2649
2649
  paused: "paused";
2650
2650
  }>;
2651
2651
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -2700,8 +2700,8 @@ declare const WorkflowSchemas: {
2700
2700
  pending: "pending";
2701
2701
  completed: "completed";
2702
2702
  cancelled: "cancelled";
2703
- failed: "failed";
2704
2703
  running: "running";
2704
+ failed: "failed";
2705
2705
  paused: "paused";
2706
2706
  }>;
2707
2707
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -2754,8 +2754,8 @@ declare const WorkflowSchemas: {
2754
2754
  }>;
2755
2755
  status: z.ZodEnum<{
2756
2756
  completed: "completed";
2757
- failed: "failed";
2758
2757
  running: "running";
2758
+ failed: "failed";
2759
2759
  skipped: "skipped";
2760
2760
  }>;
2761
2761
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -2881,10 +2881,10 @@ declare const WorkflowSchemas: {
2881
2881
  frameId: z.ZodString;
2882
2882
  nodeId: z.ZodString;
2883
2883
  nodeType: z.ZodEnum<{
2884
- sequence: "sequence";
2885
2884
  station: "station";
2886
2885
  "delegate-agent": "delegate-agent";
2887
2886
  "delegate-role": "delegate-role";
2887
+ sequence: "sequence";
2888
2888
  parallel: "parallel";
2889
2889
  gate: "gate";
2890
2890
  iterate: "iterate";
@@ -2897,8 +2897,8 @@ declare const WorkflowSchemas: {
2897
2897
  pending: "pending";
2898
2898
  completed: "completed";
2899
2899
  cancelled: "cancelled";
2900
- failed: "failed";
2901
2900
  running: "running";
2901
+ failed: "failed";
2902
2902
  skipped: "skipped";
2903
2903
  waiting: "waiting";
2904
2904
  }>;
@@ -2962,22 +2962,24 @@ declare const WorkflowSchemas: {
2962
2962
  /**
2963
2963
  * Register an external execution that is not driven by the workflow engine.
2964
2964
  *
2965
- * Creates a minimal `workflow_executions` row so that subsequent lifecycle
2966
- * events (`execution.started`, `frame.*`, `execution.completed/failed`)
2967
- * satisfy the foreign-key constraints on WorkLog projection tables.
2965
+ * Atomically creates the `workflow_executions` row, its running WorkLog
2966
+ * summary, and the optional initial frame. A caller-supplied external ID
2967
+ * makes an identical registration replay idempotent; conflicting replays are
2968
+ * rejected without overwriting durable state.
2968
2969
  *
2969
2970
  * External executions are not associated with a persisted workflow definition
2970
2971
  * and do not create coordinator sessions, run-context snapshots, or
2971
- * runtime state. They exist solely to provide a legitimate parent row for
2972
- * telemetry projections.
2972
+ * runtime state.
2973
2973
  *
2974
- * After registration the caller is responsible for emitting the standard
2975
- * execution and frame lifecycle events on the bus. The WorkLog projection
2976
- * consumes them exactly as it does for engine-driven executions.
2974
+ * Standard execution and frame lifecycle events remain useful as advisory
2975
+ * signals for other consumers, but WorkLog durability does not depend on
2976
+ * those events.
2977
2977
  */
2978
2978
  registerExternalExecution: {
2979
2979
  request: z.ZodObject<{
2980
+ executionId: z.ZodOptional<z.ZodString>;
2980
2981
  name: z.ZodString;
2982
+ startedAt: z.ZodOptional<z.ZodNumber>;
2981
2983
  scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
2982
2984
  type: z.ZodLiteral<"global">;
2983
2985
  }, z.core.$strict>, z.ZodObject<{
@@ -2997,17 +2999,33 @@ declare const WorkflowSchemas: {
2997
2999
  }, z.core.$strip>>;
2998
3000
  input: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
2999
3001
  triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
3002
+ frame: z.ZodOptional<z.ZodObject<{
3003
+ frameId: z.ZodOptional<z.ZodString>;
3004
+ nodeId: z.ZodString;
3005
+ nodeType: z.ZodEnum<{
3006
+ station: "station";
3007
+ "delegate-agent": "delegate-agent";
3008
+ "delegate-role": "delegate-role";
3009
+ gate: "gate";
3010
+ }>;
3011
+ path: z.ZodOptional<z.ZodArray<z.ZodString>>;
3012
+ attempt: z.ZodDefault<z.ZodNumber>;
3013
+ iteration: z.ZodOptional<z.ZodNumber>;
3014
+ branchKey: z.ZodOptional<z.ZodString>;
3015
+ startedAt: z.ZodOptional<z.ZodNumber>;
3016
+ }, z.core.$strict>>;
3000
3017
  }, z.core.$strip>;
3001
3018
  response: z.ZodObject<{
3002
3019
  executionId: z.ZodString;
3020
+ frameId: z.ZodOptional<z.ZodString>;
3003
3021
  }, z.core.$strip>;
3004
3022
  };
3005
3023
  /**
3006
- * Complete an external execution by updating its terminal status.
3024
+ * Complete an external execution and its WorkLog projection atomically.
3007
3025
  *
3008
- * Callers should also emit the corresponding lifecycle event
3009
- * (`execution.completed`, `execution.failed`, or `execution.cancelled`)
3010
- * so that WorkLog projections update the summary row.
3026
+ * Identical terminal replays succeed. Conflicting execution status, metadata,
3027
+ * or frame identity fails without overwriting the existing settlement.
3028
+ * Lifecycle events may still be emitted for advisory consumers.
3011
3029
  *
3012
3030
  * Cross-field invariants (enforced by schema refinement):
3013
3031
  * - `'failed'` requires a non-empty `error` string.
@@ -3025,6 +3043,22 @@ declare const WorkflowSchemas: {
3025
3043
  error: z.ZodOptional<z.ZodString>;
3026
3044
  reason: z.ZodOptional<z.ZodString>;
3027
3045
  completedAt: z.ZodOptional<z.ZodNumber>;
3046
+ frame: z.ZodOptional<z.ZodObject<{
3047
+ frameId: z.ZodString;
3048
+ nodeId: z.ZodString;
3049
+ nodeType: z.ZodEnum<{
3050
+ station: "station";
3051
+ "delegate-agent": "delegate-agent";
3052
+ "delegate-role": "delegate-role";
3053
+ gate: "gate";
3054
+ }>;
3055
+ path: z.ZodArray<z.ZodString>;
3056
+ attempt: z.ZodDefault<z.ZodNumber>;
3057
+ iteration: z.ZodOptional<z.ZodNumber>;
3058
+ branchKey: z.ZodOptional<z.ZodString>;
3059
+ startedAt: z.ZodNumber;
3060
+ durationMs: z.ZodOptional<z.ZodNumber>;
3061
+ }, z.core.$strict>>;
3028
3062
  }, z.core.$strip>;
3029
3063
  response: z.ZodObject<{
3030
3064
  success: z.ZodBoolean;
@@ -3051,8 +3085,8 @@ declare const WorkflowSchemas: {
3051
3085
  harnessId: z.ZodOptional<z.ZodString>;
3052
3086
  systemPrompt: z.ZodOptional<z.ZodString>;
3053
3087
  contextMode: z.ZodOptional<z.ZodEnum<{
3054
- fresh: "fresh";
3055
3088
  fork: "fork";
3089
+ fresh: "fresh";
3056
3090
  }>>;
3057
3091
  providerContext: z.ZodOptional<z.ZodObject<{
3058
3092
  providerConfigId: z.ZodString;
@@ -3093,8 +3127,8 @@ declare const WorkflowSchemas: {
3093
3127
  harnessId: z.ZodOptional<z.ZodString>;
3094
3128
  systemPrompt: z.ZodOptional<z.ZodString>;
3095
3129
  contextMode: z.ZodOptional<z.ZodEnum<{
3096
- fresh: "fresh";
3097
3130
  fork: "fork";
3131
+ fresh: "fresh";
3098
3132
  }>>;
3099
3133
  providerContext: z.ZodOptional<z.ZodObject<{
3100
3134
  providerConfigId: z.ZodString;
@@ -3544,10 +3578,10 @@ declare const WorkflowSchemas: {
3544
3578
  frameId: z.ZodString;
3545
3579
  nodeId: z.ZodString;
3546
3580
  nodeType: z.ZodEnum<{
3547
- sequence: "sequence";
3548
3581
  station: "station";
3549
3582
  "delegate-agent": "delegate-agent";
3550
3583
  "delegate-role": "delegate-role";
3584
+ sequence: "sequence";
3551
3585
  parallel: "parallel";
3552
3586
  gate: "gate";
3553
3587
  iterate: "iterate";
@@ -3673,8 +3707,8 @@ declare const WorkflowSchemas: {
3673
3707
  pending: "pending";
3674
3708
  completed: "completed";
3675
3709
  cancelled: "cancelled";
3676
- failed: "failed";
3677
3710
  running: "running";
3711
+ failed: "failed";
3678
3712
  paused: "paused";
3679
3713
  }>;
3680
3714
  startedAt: z.ZodNumber;
@@ -3688,6 +3722,55 @@ declare const WorkflowSchemas: {
3688
3722
  }, z.core.$strip>>;
3689
3723
  }, z.core.$strip>;
3690
3724
  };
3725
+ /**
3726
+ * Retrieve one projected WorkLog frame entry by frame identifier (RPC).
3727
+ *
3728
+ * This narrow lookup lets repair and audit consumers verify durable frame
3729
+ * state without loading the execution's runtime frame tree.
3730
+ */
3731
+ 'worklog.frame.get': {
3732
+ request: z.ZodObject<{
3733
+ frameId: z.ZodString;
3734
+ }, z.core.$strip>;
3735
+ response: z.ZodObject<{
3736
+ frame: z.ZodNullable<z.ZodObject<{
3737
+ executionId: z.ZodString;
3738
+ frameId: z.ZodString;
3739
+ nodeId: z.ZodString;
3740
+ nodeType: z.ZodEnum<{
3741
+ station: "station";
3742
+ "delegate-agent": "delegate-agent";
3743
+ "delegate-role": "delegate-role";
3744
+ sequence: "sequence";
3745
+ parallel: "parallel";
3746
+ gate: "gate";
3747
+ iterate: "iterate";
3748
+ "iterate-chain": "iterate-chain";
3749
+ loop: "loop";
3750
+ }>;
3751
+ path: z.ZodArray<z.ZodString>;
3752
+ status: z.ZodEnum<{
3753
+ pending: "pending";
3754
+ completed: "completed";
3755
+ cancelled: "cancelled";
3756
+ running: "running";
3757
+ failed: "failed";
3758
+ skipped: "skipped";
3759
+ waiting: "waiting";
3760
+ }>;
3761
+ attempt: z.ZodNumber;
3762
+ iteration: z.ZodOptional<z.ZodNumber>;
3763
+ branchKey: z.ZodOptional<z.ZodString>;
3764
+ startedAt: z.ZodOptional<z.ZodNumber>;
3765
+ completedAt: z.ZodOptional<z.ZodNumber>;
3766
+ durationMs: z.ZodOptional<z.ZodNumber>;
3767
+ inputTokens: z.ZodOptional<z.ZodNumber>;
3768
+ outputTokens: z.ZodOptional<z.ZodNumber>;
3769
+ estimatedCost: z.ZodOptional<z.ZodNumber>;
3770
+ error: z.ZodOptional<z.ZodString>;
3771
+ }, z.core.$strip>>;
3772
+ }, z.core.$strip>;
3773
+ };
3691
3774
  /**
3692
3775
  * List WorkLog execution summaries with optional filtering (RPC).
3693
3776
  *
@@ -3701,8 +3784,8 @@ declare const WorkflowSchemas: {
3701
3784
  pending: "pending";
3702
3785
  completed: "completed";
3703
3786
  cancelled: "cancelled";
3704
- failed: "failed";
3705
3787
  running: "running";
3788
+ failed: "failed";
3706
3789
  paused: "paused";
3707
3790
  }>>;
3708
3791
  limit: z.ZodOptional<z.ZodNumber>;
@@ -3717,8 +3800,8 @@ declare const WorkflowSchemas: {
3717
3800
  pending: "pending";
3718
3801
  completed: "completed";
3719
3802
  cancelled: "cancelled";
3720
- failed: "failed";
3721
3803
  running: "running";
3804
+ failed: "failed";
3722
3805
  paused: "paused";
3723
3806
  }>;
3724
3807
  startedAt: z.ZodNumber;
@@ -4553,8 +4636,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4553
4636
  pending: "pending";
4554
4637
  completed: "completed";
4555
4638
  cancelled: "cancelled";
4556
- failed: "failed";
4557
4639
  running: "running";
4640
+ failed: "failed";
4558
4641
  paused: "paused";
4559
4642
  }>;
4560
4643
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -4610,8 +4693,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4610
4693
  pending: "pending";
4611
4694
  completed: "completed";
4612
4695
  cancelled: "cancelled";
4613
- failed: "failed";
4614
4696
  running: "running";
4697
+ failed: "failed";
4615
4698
  paused: "paused";
4616
4699
  }>>;
4617
4700
  artifactRef: z.ZodOptional<z.ZodObject<{
@@ -4633,8 +4716,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4633
4716
  pending: "pending";
4634
4717
  completed: "completed";
4635
4718
  cancelled: "cancelled";
4636
- failed: "failed";
4637
4719
  running: "running";
4720
+ failed: "failed";
4638
4721
  paused: "paused";
4639
4722
  }>;
4640
4723
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -4689,8 +4772,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4689
4772
  pending: "pending";
4690
4773
  completed: "completed";
4691
4774
  cancelled: "cancelled";
4692
- failed: "failed";
4693
4775
  running: "running";
4776
+ failed: "failed";
4694
4777
  paused: "paused";
4695
4778
  }>;
4696
4779
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -4743,8 +4826,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4743
4826
  }>;
4744
4827
  status: z.ZodEnum<{
4745
4828
  completed: "completed";
4746
- failed: "failed";
4747
4829
  running: "running";
4830
+ failed: "failed";
4748
4831
  skipped: "skipped";
4749
4832
  }>;
4750
4833
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -4870,10 +4953,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4870
4953
  frameId: z.ZodString;
4871
4954
  nodeId: z.ZodString;
4872
4955
  nodeType: z.ZodEnum<{
4873
- sequence: "sequence";
4874
4956
  station: "station";
4875
4957
  "delegate-agent": "delegate-agent";
4876
4958
  "delegate-role": "delegate-role";
4959
+ sequence: "sequence";
4877
4960
  parallel: "parallel";
4878
4961
  gate: "gate";
4879
4962
  iterate: "iterate";
@@ -4886,8 +4969,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4886
4969
  pending: "pending";
4887
4970
  completed: "completed";
4888
4971
  cancelled: "cancelled";
4889
- failed: "failed";
4890
4972
  running: "running";
4973
+ failed: "failed";
4891
4974
  skipped: "skipped";
4892
4975
  waiting: "waiting";
4893
4976
  }>;
@@ -4951,22 +5034,24 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4951
5034
  /**
4952
5035
  * Register an external execution that is not driven by the workflow engine.
4953
5036
  *
4954
- * Creates a minimal `workflow_executions` row so that subsequent lifecycle
4955
- * events (`execution.started`, `frame.*`, `execution.completed/failed`)
4956
- * satisfy the foreign-key constraints on WorkLog projection tables.
5037
+ * Atomically creates the `workflow_executions` row, its running WorkLog
5038
+ * summary, and the optional initial frame. A caller-supplied external ID
5039
+ * makes an identical registration replay idempotent; conflicting replays are
5040
+ * rejected without overwriting durable state.
4957
5041
  *
4958
5042
  * External executions are not associated with a persisted workflow definition
4959
5043
  * and do not create coordinator sessions, run-context snapshots, or
4960
- * runtime state. They exist solely to provide a legitimate parent row for
4961
- * telemetry projections.
5044
+ * runtime state.
4962
5045
  *
4963
- * After registration the caller is responsible for emitting the standard
4964
- * execution and frame lifecycle events on the bus. The WorkLog projection
4965
- * consumes them exactly as it does for engine-driven executions.
5046
+ * Standard execution and frame lifecycle events remain useful as advisory
5047
+ * signals for other consumers, but WorkLog durability does not depend on
5048
+ * those events.
4966
5049
  */
4967
5050
  registerExternalExecution: {
4968
5051
  request: z.ZodObject<{
5052
+ executionId: z.ZodOptional<z.ZodString>;
4969
5053
  name: z.ZodString;
5054
+ startedAt: z.ZodOptional<z.ZodNumber>;
4970
5055
  scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
4971
5056
  type: z.ZodLiteral<"global">;
4972
5057
  }, z.core.$strict>, z.ZodObject<{
@@ -4986,17 +5071,33 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
4986
5071
  }, z.core.$strip>>;
4987
5072
  input: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
4988
5073
  triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
5074
+ frame: z.ZodOptional<z.ZodObject<{
5075
+ frameId: z.ZodOptional<z.ZodString>;
5076
+ nodeId: z.ZodString;
5077
+ nodeType: z.ZodEnum<{
5078
+ station: "station";
5079
+ "delegate-agent": "delegate-agent";
5080
+ "delegate-role": "delegate-role";
5081
+ gate: "gate";
5082
+ }>;
5083
+ path: z.ZodOptional<z.ZodArray<z.ZodString>>;
5084
+ attempt: z.ZodDefault<z.ZodNumber>;
5085
+ iteration: z.ZodOptional<z.ZodNumber>;
5086
+ branchKey: z.ZodOptional<z.ZodString>;
5087
+ startedAt: z.ZodOptional<z.ZodNumber>;
5088
+ }, z.core.$strict>>;
4989
5089
  }, z.core.$strip>;
4990
5090
  response: z.ZodObject<{
4991
5091
  executionId: z.ZodString;
5092
+ frameId: z.ZodOptional<z.ZodString>;
4992
5093
  }, z.core.$strip>;
4993
5094
  };
4994
5095
  /**
4995
- * Complete an external execution by updating its terminal status.
5096
+ * Complete an external execution and its WorkLog projection atomically.
4996
5097
  *
4997
- * Callers should also emit the corresponding lifecycle event
4998
- * (`execution.completed`, `execution.failed`, or `execution.cancelled`)
4999
- * so that WorkLog projections update the summary row.
5098
+ * Identical terminal replays succeed. Conflicting execution status, metadata,
5099
+ * or frame identity fails without overwriting the existing settlement.
5100
+ * Lifecycle events may still be emitted for advisory consumers.
5000
5101
  *
5001
5102
  * Cross-field invariants (enforced by schema refinement):
5002
5103
  * - `'failed'` requires a non-empty `error` string.
@@ -5014,6 +5115,22 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5014
5115
  error: z.ZodOptional<z.ZodString>;
5015
5116
  reason: z.ZodOptional<z.ZodString>;
5016
5117
  completedAt: z.ZodOptional<z.ZodNumber>;
5118
+ frame: z.ZodOptional<z.ZodObject<{
5119
+ frameId: z.ZodString;
5120
+ nodeId: z.ZodString;
5121
+ nodeType: z.ZodEnum<{
5122
+ station: "station";
5123
+ "delegate-agent": "delegate-agent";
5124
+ "delegate-role": "delegate-role";
5125
+ gate: "gate";
5126
+ }>;
5127
+ path: z.ZodArray<z.ZodString>;
5128
+ attempt: z.ZodDefault<z.ZodNumber>;
5129
+ iteration: z.ZodOptional<z.ZodNumber>;
5130
+ branchKey: z.ZodOptional<z.ZodString>;
5131
+ startedAt: z.ZodNumber;
5132
+ durationMs: z.ZodOptional<z.ZodNumber>;
5133
+ }, z.core.$strict>>;
5017
5134
  }, z.core.$strip>;
5018
5135
  response: z.ZodObject<{
5019
5136
  success: z.ZodBoolean;
@@ -5040,8 +5157,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5040
5157
  harnessId: z.ZodOptional<z.ZodString>;
5041
5158
  systemPrompt: z.ZodOptional<z.ZodString>;
5042
5159
  contextMode: z.ZodOptional<z.ZodEnum<{
5043
- fresh: "fresh";
5044
5160
  fork: "fork";
5161
+ fresh: "fresh";
5045
5162
  }>>;
5046
5163
  providerContext: z.ZodOptional<z.ZodObject<{
5047
5164
  providerConfigId: z.ZodString;
@@ -5082,8 +5199,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5082
5199
  harnessId: z.ZodOptional<z.ZodString>;
5083
5200
  systemPrompt: z.ZodOptional<z.ZodString>;
5084
5201
  contextMode: z.ZodOptional<z.ZodEnum<{
5085
- fresh: "fresh";
5086
5202
  fork: "fork";
5203
+ fresh: "fresh";
5087
5204
  }>>;
5088
5205
  providerContext: z.ZodOptional<z.ZodObject<{
5089
5206
  providerConfigId: z.ZodString;
@@ -5533,10 +5650,10 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5533
5650
  frameId: z.ZodString;
5534
5651
  nodeId: z.ZodString;
5535
5652
  nodeType: z.ZodEnum<{
5536
- sequence: "sequence";
5537
5653
  station: "station";
5538
5654
  "delegate-agent": "delegate-agent";
5539
5655
  "delegate-role": "delegate-role";
5656
+ sequence: "sequence";
5540
5657
  parallel: "parallel";
5541
5658
  gate: "gate";
5542
5659
  iterate: "iterate";
@@ -5662,8 +5779,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5662
5779
  pending: "pending";
5663
5780
  completed: "completed";
5664
5781
  cancelled: "cancelled";
5665
- failed: "failed";
5666
5782
  running: "running";
5783
+ failed: "failed";
5667
5784
  paused: "paused";
5668
5785
  }>;
5669
5786
  startedAt: z.ZodNumber;
@@ -5677,6 +5794,55 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5677
5794
  }, z.core.$strip>>;
5678
5795
  }, z.core.$strip>;
5679
5796
  };
5797
+ /**
5798
+ * Retrieve one projected WorkLog frame entry by frame identifier (RPC).
5799
+ *
5800
+ * This narrow lookup lets repair and audit consumers verify durable frame
5801
+ * state without loading the execution's runtime frame tree.
5802
+ */
5803
+ 'worklog.frame.get': {
5804
+ request: z.ZodObject<{
5805
+ frameId: z.ZodString;
5806
+ }, z.core.$strip>;
5807
+ response: z.ZodObject<{
5808
+ frame: z.ZodNullable<z.ZodObject<{
5809
+ executionId: z.ZodString;
5810
+ frameId: z.ZodString;
5811
+ nodeId: z.ZodString;
5812
+ nodeType: z.ZodEnum<{
5813
+ station: "station";
5814
+ "delegate-agent": "delegate-agent";
5815
+ "delegate-role": "delegate-role";
5816
+ sequence: "sequence";
5817
+ parallel: "parallel";
5818
+ gate: "gate";
5819
+ iterate: "iterate";
5820
+ "iterate-chain": "iterate-chain";
5821
+ loop: "loop";
5822
+ }>;
5823
+ path: z.ZodArray<z.ZodString>;
5824
+ status: z.ZodEnum<{
5825
+ pending: "pending";
5826
+ completed: "completed";
5827
+ cancelled: "cancelled";
5828
+ running: "running";
5829
+ failed: "failed";
5830
+ skipped: "skipped";
5831
+ waiting: "waiting";
5832
+ }>;
5833
+ attempt: z.ZodNumber;
5834
+ iteration: z.ZodOptional<z.ZodNumber>;
5835
+ branchKey: z.ZodOptional<z.ZodString>;
5836
+ startedAt: z.ZodOptional<z.ZodNumber>;
5837
+ completedAt: z.ZodOptional<z.ZodNumber>;
5838
+ durationMs: z.ZodOptional<z.ZodNumber>;
5839
+ inputTokens: z.ZodOptional<z.ZodNumber>;
5840
+ outputTokens: z.ZodOptional<z.ZodNumber>;
5841
+ estimatedCost: z.ZodOptional<z.ZodNumber>;
5842
+ error: z.ZodOptional<z.ZodString>;
5843
+ }, z.core.$strip>>;
5844
+ }, z.core.$strip>;
5845
+ };
5680
5846
  /**
5681
5847
  * List WorkLog execution summaries with optional filtering (RPC).
5682
5848
  *
@@ -5690,8 +5856,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5690
5856
  pending: "pending";
5691
5857
  completed: "completed";
5692
5858
  cancelled: "cancelled";
5693
- failed: "failed";
5694
5859
  running: "running";
5860
+ failed: "failed";
5695
5861
  paused: "paused";
5696
5862
  }>>;
5697
5863
  limit: z.ZodOptional<z.ZodNumber>;
@@ -5706,8 +5872,8 @@ declare const WorkflowNamespace$1: _$_makaio_core0.BusNamespaceDefinition<"workf
5706
5872
  pending: "pending";
5707
5873
  completed: "completed";
5708
5874
  cancelled: "cancelled";
5709
- failed: "failed";
5710
5875
  running: "running";
5876
+ failed: "failed";
5711
5877
  paused: "paused";
5712
5878
  }>;
5713
5879
  startedAt: z.ZodNumber;
@@ -6542,8 +6708,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6542
6708
  pending: "pending";
6543
6709
  completed: "completed";
6544
6710
  cancelled: "cancelled";
6545
- failed: "failed";
6546
6711
  running: "running";
6712
+ failed: "failed";
6547
6713
  paused: "paused";
6548
6714
  }>;
6549
6715
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -6599,8 +6765,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6599
6765
  pending: "pending";
6600
6766
  completed: "completed";
6601
6767
  cancelled: "cancelled";
6602
- failed: "failed";
6603
6768
  running: "running";
6769
+ failed: "failed";
6604
6770
  paused: "paused";
6605
6771
  }>>;
6606
6772
  artifactRef: z.ZodOptional<z.ZodObject<{
@@ -6622,8 +6788,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6622
6788
  pending: "pending";
6623
6789
  completed: "completed";
6624
6790
  cancelled: "cancelled";
6625
- failed: "failed";
6626
6791
  running: "running";
6792
+ failed: "failed";
6627
6793
  paused: "paused";
6628
6794
  }>;
6629
6795
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -6678,8 +6844,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6678
6844
  pending: "pending";
6679
6845
  completed: "completed";
6680
6846
  cancelled: "cancelled";
6681
- failed: "failed";
6682
6847
  running: "running";
6848
+ failed: "failed";
6683
6849
  paused: "paused";
6684
6850
  }>;
6685
6851
  inputs: z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>;
@@ -6732,8 +6898,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6732
6898
  }>;
6733
6899
  status: z.ZodEnum<{
6734
6900
  completed: "completed";
6735
- failed: "failed";
6736
6901
  running: "running";
6902
+ failed: "failed";
6737
6903
  skipped: "skipped";
6738
6904
  }>;
6739
6905
  startedAt: z.ZodOptional<z.ZodNumber>;
@@ -6859,10 +7025,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6859
7025
  frameId: z.ZodString;
6860
7026
  nodeId: z.ZodString;
6861
7027
  nodeType: z.ZodEnum<{
6862
- sequence: "sequence";
6863
7028
  station: "station";
6864
7029
  "delegate-agent": "delegate-agent";
6865
7030
  "delegate-role": "delegate-role";
7031
+ sequence: "sequence";
6866
7032
  parallel: "parallel";
6867
7033
  gate: "gate";
6868
7034
  iterate: "iterate";
@@ -6875,8 +7041,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6875
7041
  pending: "pending";
6876
7042
  completed: "completed";
6877
7043
  cancelled: "cancelled";
6878
- failed: "failed";
6879
7044
  running: "running";
7045
+ failed: "failed";
6880
7046
  skipped: "skipped";
6881
7047
  waiting: "waiting";
6882
7048
  }>;
@@ -6940,22 +7106,24 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6940
7106
  /**
6941
7107
  * Register an external execution that is not driven by the workflow engine.
6942
7108
  *
6943
- * Creates a minimal `workflow_executions` row so that subsequent lifecycle
6944
- * events (`execution.started`, `frame.*`, `execution.completed/failed`)
6945
- * satisfy the foreign-key constraints on WorkLog projection tables.
7109
+ * Atomically creates the `workflow_executions` row, its running WorkLog
7110
+ * summary, and the optional initial frame. A caller-supplied external ID
7111
+ * makes an identical registration replay idempotent; conflicting replays are
7112
+ * rejected without overwriting durable state.
6946
7113
  *
6947
7114
  * External executions are not associated with a persisted workflow definition
6948
7115
  * and do not create coordinator sessions, run-context snapshots, or
6949
- * runtime state. They exist solely to provide a legitimate parent row for
6950
- * telemetry projections.
7116
+ * runtime state.
6951
7117
  *
6952
- * After registration the caller is responsible for emitting the standard
6953
- * execution and frame lifecycle events on the bus. The WorkLog projection
6954
- * consumes them exactly as it does for engine-driven executions.
7118
+ * Standard execution and frame lifecycle events remain useful as advisory
7119
+ * signals for other consumers, but WorkLog durability does not depend on
7120
+ * those events.
6955
7121
  */
6956
7122
  registerExternalExecution: {
6957
7123
  request: z.ZodObject<{
7124
+ executionId: z.ZodOptional<z.ZodString>;
6958
7125
  name: z.ZodString;
7126
+ startedAt: z.ZodOptional<z.ZodNumber>;
6959
7127
  scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
6960
7128
  type: z.ZodLiteral<"global">;
6961
7129
  }, z.core.$strict>, z.ZodObject<{
@@ -6975,17 +7143,33 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
6975
7143
  }, z.core.$strip>>;
6976
7144
  input: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
6977
7145
  triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
7146
+ frame: z.ZodOptional<z.ZodObject<{
7147
+ frameId: z.ZodOptional<z.ZodString>;
7148
+ nodeId: z.ZodString;
7149
+ nodeType: z.ZodEnum<{
7150
+ station: "station";
7151
+ "delegate-agent": "delegate-agent";
7152
+ "delegate-role": "delegate-role";
7153
+ gate: "gate";
7154
+ }>;
7155
+ path: z.ZodOptional<z.ZodArray<z.ZodString>>;
7156
+ attempt: z.ZodDefault<z.ZodNumber>;
7157
+ iteration: z.ZodOptional<z.ZodNumber>;
7158
+ branchKey: z.ZodOptional<z.ZodString>;
7159
+ startedAt: z.ZodOptional<z.ZodNumber>;
7160
+ }, z.core.$strict>>;
6978
7161
  }, z.core.$strip>;
6979
7162
  response: z.ZodObject<{
6980
7163
  executionId: z.ZodString;
7164
+ frameId: z.ZodOptional<z.ZodString>;
6981
7165
  }, z.core.$strip>;
6982
7166
  };
6983
7167
  /**
6984
- * Complete an external execution by updating its terminal status.
7168
+ * Complete an external execution and its WorkLog projection atomically.
6985
7169
  *
6986
- * Callers should also emit the corresponding lifecycle event
6987
- * (`execution.completed`, `execution.failed`, or `execution.cancelled`)
6988
- * so that WorkLog projections update the summary row.
7170
+ * Identical terminal replays succeed. Conflicting execution status, metadata,
7171
+ * or frame identity fails without overwriting the existing settlement.
7172
+ * Lifecycle events may still be emitted for advisory consumers.
6989
7173
  *
6990
7174
  * Cross-field invariants (enforced by schema refinement):
6991
7175
  * - `'failed'` requires a non-empty `error` string.
@@ -7003,6 +7187,22 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7003
7187
  error: z.ZodOptional<z.ZodString>;
7004
7188
  reason: z.ZodOptional<z.ZodString>;
7005
7189
  completedAt: z.ZodOptional<z.ZodNumber>;
7190
+ frame: z.ZodOptional<z.ZodObject<{
7191
+ frameId: z.ZodString;
7192
+ nodeId: z.ZodString;
7193
+ nodeType: z.ZodEnum<{
7194
+ station: "station";
7195
+ "delegate-agent": "delegate-agent";
7196
+ "delegate-role": "delegate-role";
7197
+ gate: "gate";
7198
+ }>;
7199
+ path: z.ZodArray<z.ZodString>;
7200
+ attempt: z.ZodDefault<z.ZodNumber>;
7201
+ iteration: z.ZodOptional<z.ZodNumber>;
7202
+ branchKey: z.ZodOptional<z.ZodString>;
7203
+ startedAt: z.ZodNumber;
7204
+ durationMs: z.ZodOptional<z.ZodNumber>;
7205
+ }, z.core.$strict>>;
7006
7206
  }, z.core.$strip>;
7007
7207
  response: z.ZodObject<{
7008
7208
  success: z.ZodBoolean;
@@ -7029,8 +7229,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7029
7229
  harnessId: z.ZodOptional<z.ZodString>;
7030
7230
  systemPrompt: z.ZodOptional<z.ZodString>;
7031
7231
  contextMode: z.ZodOptional<z.ZodEnum<{
7032
- fresh: "fresh";
7033
7232
  fork: "fork";
7233
+ fresh: "fresh";
7034
7234
  }>>;
7035
7235
  providerContext: z.ZodOptional<z.ZodObject<{
7036
7236
  providerConfigId: z.ZodString;
@@ -7071,8 +7271,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7071
7271
  harnessId: z.ZodOptional<z.ZodString>;
7072
7272
  systemPrompt: z.ZodOptional<z.ZodString>;
7073
7273
  contextMode: z.ZodOptional<z.ZodEnum<{
7074
- fresh: "fresh";
7075
7274
  fork: "fork";
7275
+ fresh: "fresh";
7076
7276
  }>>;
7077
7277
  providerContext: z.ZodOptional<z.ZodObject<{
7078
7278
  providerConfigId: z.ZodString;
@@ -7522,10 +7722,10 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7522
7722
  frameId: z.ZodString;
7523
7723
  nodeId: z.ZodString;
7524
7724
  nodeType: z.ZodEnum<{
7525
- sequence: "sequence";
7526
7725
  station: "station";
7527
7726
  "delegate-agent": "delegate-agent";
7528
7727
  "delegate-role": "delegate-role";
7728
+ sequence: "sequence";
7529
7729
  parallel: "parallel";
7530
7730
  gate: "gate";
7531
7731
  iterate: "iterate";
@@ -7651,8 +7851,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7651
7851
  pending: "pending";
7652
7852
  completed: "completed";
7653
7853
  cancelled: "cancelled";
7654
- failed: "failed";
7655
7854
  running: "running";
7855
+ failed: "failed";
7656
7856
  paused: "paused";
7657
7857
  }>;
7658
7858
  startedAt: z.ZodNumber;
@@ -7666,6 +7866,55 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7666
7866
  }, z.core.$strip>>;
7667
7867
  }, z.core.$strip>;
7668
7868
  };
7869
+ /**
7870
+ * Retrieve one projected WorkLog frame entry by frame identifier (RPC).
7871
+ *
7872
+ * This narrow lookup lets repair and audit consumers verify durable frame
7873
+ * state without loading the execution's runtime frame tree.
7874
+ */
7875
+ 'worklog.frame.get': {
7876
+ request: z.ZodObject<{
7877
+ frameId: z.ZodString;
7878
+ }, z.core.$strip>;
7879
+ response: z.ZodObject<{
7880
+ frame: z.ZodNullable<z.ZodObject<{
7881
+ executionId: z.ZodString;
7882
+ frameId: z.ZodString;
7883
+ nodeId: z.ZodString;
7884
+ nodeType: z.ZodEnum<{
7885
+ station: "station";
7886
+ "delegate-agent": "delegate-agent";
7887
+ "delegate-role": "delegate-role";
7888
+ sequence: "sequence";
7889
+ parallel: "parallel";
7890
+ gate: "gate";
7891
+ iterate: "iterate";
7892
+ "iterate-chain": "iterate-chain";
7893
+ loop: "loop";
7894
+ }>;
7895
+ path: z.ZodArray<z.ZodString>;
7896
+ status: z.ZodEnum<{
7897
+ pending: "pending";
7898
+ completed: "completed";
7899
+ cancelled: "cancelled";
7900
+ running: "running";
7901
+ failed: "failed";
7902
+ skipped: "skipped";
7903
+ waiting: "waiting";
7904
+ }>;
7905
+ attempt: z.ZodNumber;
7906
+ iteration: z.ZodOptional<z.ZodNumber>;
7907
+ branchKey: z.ZodOptional<z.ZodString>;
7908
+ startedAt: z.ZodOptional<z.ZodNumber>;
7909
+ completedAt: z.ZodOptional<z.ZodNumber>;
7910
+ durationMs: z.ZodOptional<z.ZodNumber>;
7911
+ inputTokens: z.ZodOptional<z.ZodNumber>;
7912
+ outputTokens: z.ZodOptional<z.ZodNumber>;
7913
+ estimatedCost: z.ZodOptional<z.ZodNumber>;
7914
+ error: z.ZodOptional<z.ZodString>;
7915
+ }, z.core.$strip>>;
7916
+ }, z.core.$strip>;
7917
+ };
7669
7918
  /**
7670
7919
  * List WorkLog execution summaries with optional filtering (RPC).
7671
7920
  *
@@ -7679,8 +7928,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7679
7928
  pending: "pending";
7680
7929
  completed: "completed";
7681
7930
  cancelled: "cancelled";
7682
- failed: "failed";
7683
7931
  running: "running";
7932
+ failed: "failed";
7684
7933
  paused: "paused";
7685
7934
  }>>;
7686
7935
  limit: z.ZodOptional<z.ZodNumber>;
@@ -7695,8 +7944,8 @@ declare const WorkflowSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
7695
7944
  pending: "pending";
7696
7945
  completed: "completed";
7697
7946
  cancelled: "cancelled";
7698
- failed: "failed";
7699
7947
  running: "running";
7948
+ failed: "failed";
7700
7949
  paused: "paused";
7701
7950
  }>;
7702
7951
  startedAt: z.ZodNumber;
@@ -8691,6 +8940,132 @@ interface IWorkflowRunner$1 {
8691
8940
  dispose?(): Promise<void>;
8692
8941
  }
8693
8942
  //#endregion
8943
+ //#region core/contracts/src/workflow/external-execution.d.ts
8944
+ /** Reserved identifier prefix for executions owned by the external lifecycle API. */
8945
+ declare const EXTERNAL_EXECUTION_ID_PREFIX$1 = "wfx-ext-";
8946
+ /**
8947
+ * Frame metadata persisted atomically when an external execution is registered.
8948
+ *
8949
+ * `frameId`, `path`, and `startedAt` may be omitted so the workflow service can
8950
+ * derive stable defaults after it allocates the execution identifier. The
8951
+ * resolved values are returned and durably written before registration is
8952
+ * acknowledged.
8953
+ */
8954
+ declare const ExternalExecutionFrameStartSchema: z.ZodObject<{
8955
+ frameId: z.ZodOptional<z.ZodString>;
8956
+ nodeId: z.ZodString;
8957
+ nodeType: z.ZodEnum<{
8958
+ station: "station";
8959
+ "delegate-agent": "delegate-agent";
8960
+ "delegate-role": "delegate-role";
8961
+ gate: "gate";
8962
+ }>;
8963
+ path: z.ZodOptional<z.ZodArray<z.ZodString>>;
8964
+ attempt: z.ZodDefault<z.ZodNumber>;
8965
+ iteration: z.ZodOptional<z.ZodNumber>;
8966
+ branchKey: z.ZodOptional<z.ZodString>;
8967
+ startedAt: z.ZodOptional<z.ZodNumber>;
8968
+ }, z.core.$strict>;
8969
+ /** Inferred external frame registration metadata. */
8970
+ type ExternalExecutionFrameStart = z.infer<typeof ExternalExecutionFrameStartSchema>;
8971
+ /**
8972
+ * Exact frame metadata supplied when an external execution settles.
8973
+ *
8974
+ * The workflow service derives the terminal frame status, completion timestamp,
8975
+ * duration, and failure text from the enclosing completion request, then writes
8976
+ * the execution, WorkLog summary, and frame in one transaction.
8977
+ */
8978
+ declare const ExternalExecutionFrameCompletionSchema: z.ZodObject<{
8979
+ frameId: z.ZodString;
8980
+ nodeId: z.ZodString;
8981
+ nodeType: z.ZodEnum<{
8982
+ station: "station";
8983
+ "delegate-agent": "delegate-agent";
8984
+ "delegate-role": "delegate-role";
8985
+ gate: "gate";
8986
+ }>;
8987
+ path: z.ZodArray<z.ZodString>;
8988
+ attempt: z.ZodDefault<z.ZodNumber>;
8989
+ iteration: z.ZodOptional<z.ZodNumber>;
8990
+ branchKey: z.ZodOptional<z.ZodString>;
8991
+ startedAt: z.ZodNumber;
8992
+ durationMs: z.ZodOptional<z.ZodNumber>;
8993
+ }, z.core.$strict>;
8994
+ /** Inferred external frame completion metadata. */
8995
+ type ExternalExecutionFrameCompletion = z.infer<typeof ExternalExecutionFrameCompletionSchema>;
8996
+ /** Request contract for atomic external execution registration. */
8997
+ declare const RegisterExternalExecutionRequestSchema: z.ZodObject<{
8998
+ executionId: z.ZodOptional<z.ZodString>;
8999
+ name: z.ZodString;
9000
+ startedAt: z.ZodOptional<z.ZodNumber>;
9001
+ scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
9002
+ type: z.ZodLiteral<"global">;
9003
+ }, z.core.$strict>, z.ZodObject<{
9004
+ type: z.ZodLiteral<"workspace">;
9005
+ id: z.ZodString;
9006
+ }, z.core.$strict>, z.ZodObject<{
9007
+ type: z.ZodLiteral<"session">;
9008
+ id: z.ZodString;
9009
+ }, z.core.$strict>, z.ZodObject<{
9010
+ type: z.ZodLiteral<"external">;
9011
+ kind: z.ZodString;
9012
+ id: z.ZodString;
9013
+ }, z.core.$strict>], "type">>;
9014
+ artifactRef: z.ZodOptional<z.ZodObject<{
9015
+ kind: z.ZodString;
9016
+ id: z.ZodString;
9017
+ }, z.core.$strip>>;
9018
+ input: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
9019
+ triggerPayload: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
9020
+ frame: z.ZodOptional<z.ZodObject<{
9021
+ frameId: z.ZodOptional<z.ZodString>;
9022
+ nodeId: z.ZodString;
9023
+ nodeType: z.ZodEnum<{
9024
+ station: "station";
9025
+ "delegate-agent": "delegate-agent";
9026
+ "delegate-role": "delegate-role";
9027
+ gate: "gate";
9028
+ }>;
9029
+ path: z.ZodOptional<z.ZodArray<z.ZodString>>;
9030
+ attempt: z.ZodDefault<z.ZodNumber>;
9031
+ iteration: z.ZodOptional<z.ZodNumber>;
9032
+ branchKey: z.ZodOptional<z.ZodString>;
9033
+ startedAt: z.ZodOptional<z.ZodNumber>;
9034
+ }, z.core.$strict>>;
9035
+ }, z.core.$strip>;
9036
+ /** Parsed external execution registration request. */
9037
+ type RegisterExternalExecutionRequest = z.infer<typeof RegisterExternalExecutionRequestSchema>;
9038
+ /** Request contract for atomic, idempotent external execution settlement. */
9039
+ declare const CompleteExternalExecutionRequestSchema: z.ZodObject<{
9040
+ executionId: z.ZodString;
9041
+ status: z.ZodEnum<{
9042
+ completed: "completed";
9043
+ cancelled: "cancelled";
9044
+ failed: "failed";
9045
+ }>;
9046
+ error: z.ZodOptional<z.ZodString>;
9047
+ reason: z.ZodOptional<z.ZodString>;
9048
+ completedAt: z.ZodOptional<z.ZodNumber>;
9049
+ frame: z.ZodOptional<z.ZodObject<{
9050
+ frameId: z.ZodString;
9051
+ nodeId: z.ZodString;
9052
+ nodeType: z.ZodEnum<{
9053
+ station: "station";
9054
+ "delegate-agent": "delegate-agent";
9055
+ "delegate-role": "delegate-role";
9056
+ gate: "gate";
9057
+ }>;
9058
+ path: z.ZodArray<z.ZodString>;
9059
+ attempt: z.ZodDefault<z.ZodNumber>;
9060
+ iteration: z.ZodOptional<z.ZodNumber>;
9061
+ branchKey: z.ZodOptional<z.ZodString>;
9062
+ startedAt: z.ZodNumber;
9063
+ durationMs: z.ZodOptional<z.ZodNumber>;
9064
+ }, z.core.$strict>>;
9065
+ }, z.core.$strip>;
9066
+ /** Parsed external execution completion request. */
9067
+ type CompleteExternalExecutionRequest = z.infer<typeof CompleteExternalExecutionRequestSchema>;
9068
+ //#endregion
8694
9069
  //#region core/contracts/src/workflow/worklog.d.ts
8695
9070
  /**
8696
9071
  * Summarised view of a workflow execution.
@@ -8707,8 +9082,8 @@ declare const WorkLogExecutionSummarySchema: z.ZodObject<{
8707
9082
  pending: "pending";
8708
9083
  completed: "completed";
8709
9084
  cancelled: "cancelled";
8710
- failed: "failed";
8711
9085
  running: "running";
9086
+ failed: "failed";
8712
9087
  paused: "paused";
8713
9088
  }>;
8714
9089
  startedAt: z.ZodNumber;
@@ -8729,7 +9104,7 @@ type WorkLogExecutionSummary = z.infer<typeof WorkLogExecutionSummarySchema>;
8729
9104
  * Multiple entries may exist per `nodeId` if the node is retried or
8730
9105
  * executed inside an `iterate`/`iterate-chain` expansion.
8731
9106
  */
8732
- declare const WorkLogFrameEntrySchema: z.ZodObject<{
9107
+ declare const WorkLogFrameEntrySchema$1: z.ZodObject<{
8733
9108
  executionId: z.ZodString;
8734
9109
  frameId: z.ZodString;
8735
9110
  nodeId: z.ZodString;
@@ -8737,15 +9112,20 @@ declare const WorkLogFrameEntrySchema: z.ZodObject<{
8737
9112
  station: "station";
8738
9113
  "delegate-agent": "delegate-agent";
8739
9114
  "delegate-role": "delegate-role";
9115
+ sequence: "sequence";
9116
+ parallel: "parallel";
8740
9117
  gate: "gate";
9118
+ iterate: "iterate";
9119
+ "iterate-chain": "iterate-chain";
9120
+ loop: "loop";
8741
9121
  }>;
8742
9122
  path: z.ZodArray<z.ZodString>;
8743
9123
  status: z.ZodEnum<{
8744
9124
  pending: "pending";
8745
9125
  completed: "completed";
8746
9126
  cancelled: "cancelled";
8747
- failed: "failed";
8748
9127
  running: "running";
9128
+ failed: "failed";
8749
9129
  skipped: "skipped";
8750
9130
  waiting: "waiting";
8751
9131
  }>;
@@ -8760,7 +9140,7 @@ declare const WorkLogFrameEntrySchema: z.ZodObject<{
8760
9140
  estimatedCost: z.ZodOptional<z.ZodNumber>;
8761
9141
  error: z.ZodOptional<z.ZodString>;
8762
9142
  }, z.core.$strip>;
8763
- type WorkLogFrameEntry = z.infer<typeof WorkLogFrameEntrySchema>;
9143
+ type WorkLogFrameEntry = z.infer<typeof WorkLogFrameEntrySchema$1>;
8764
9144
  /**
8765
9145
  * A single artifact write event recorded in the WorkLog.
8766
9146
  *
@@ -8873,8 +9253,8 @@ type WorkLogDynamicNodeMaterialization = z.infer<typeof WorkLogDynamicNodeMateri
8873
9253
  * - fresh: Start with clean context
8874
9254
  */
8875
9255
  declare const ContextModeSchema$1: z.ZodEnum<{
8876
- fresh: "fresh";
8877
9256
  fork: "fork";
9257
+ fresh: "fresh";
8878
9258
  }>;
8879
9259
  type ContextMode = z.infer<typeof ContextModeSchema$1>;
8880
9260
  /**
@@ -8888,11 +9268,11 @@ type ContextMode = z.infer<typeof ContextModeSchema$1>;
8888
9268
  declare const SubagentStatusSchema: z.ZodEnum<{
8889
9269
  completed: "completed";
8890
9270
  cancelled: "cancelled";
8891
- failed: "failed";
8892
- running: "running";
8893
9271
  spawning: "spawning";
9272
+ running: "running";
8894
9273
  waiting_input: "waiting_input";
8895
9274
  hung: "hung";
9275
+ failed: "failed";
8896
9276
  }>;
8897
9277
  type SubagentStatus$1 = z.infer<typeof SubagentStatusSchema>;
8898
9278
  /**
@@ -8942,8 +9322,8 @@ declare const SubagentConfigSchema$1: z.ZodObject<{
8942
9322
  "extra-high": "extra-high";
8943
9323
  }>>;
8944
9324
  contextMode: z.ZodDefault<z.ZodEnum<{
8945
- fresh: "fresh";
8946
9325
  fork: "fork";
9326
+ fresh: "fresh";
8947
9327
  }>>;
8948
9328
  tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
8949
9329
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -9040,8 +9420,8 @@ declare const SpawnSubagentRpcRequestSchema$1: z.ZodObject<{
9040
9420
  "extra-high": "extra-high";
9041
9421
  }>>;
9042
9422
  contextMode: z.ZodDefault<z.ZodEnum<{
9043
- fresh: "fresh";
9044
9423
  fork: "fork";
9424
+ fresh: "fresh";
9045
9425
  }>>;
9046
9426
  tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
9047
9427
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -9081,8 +9461,8 @@ declare const AwaitSubagentResponseSchema: z.ZodObject<{
9081
9461
  status: z.ZodEnum<{
9082
9462
  completed: "completed";
9083
9463
  cancelled: "cancelled";
9084
- failed: "failed";
9085
9464
  waiting_input: "waiting_input";
9465
+ failed: "failed";
9086
9466
  timeout: "timeout";
9087
9467
  }>;
9088
9468
  result: z.ZodOptional<z.ZodString>;
@@ -9185,11 +9565,11 @@ declare const ListSubagentsBySessionResponseSchema: z.ZodObject<{
9185
9565
  status: z.ZodEnum<{
9186
9566
  completed: "completed";
9187
9567
  cancelled: "cancelled";
9188
- failed: "failed";
9189
- running: "running";
9190
9568
  spawning: "spawning";
9569
+ running: "running";
9191
9570
  waiting_input: "waiting_input";
9192
9571
  hung: "hung";
9572
+ failed: "failed";
9193
9573
  }>;
9194
9574
  }, z.core.$strip>>;
9195
9575
  }, z.core.$strip>;
@@ -10246,4 +10626,4 @@ declare const ExecutionHintsSchema$1: z.ZodObject<{
10246
10626
  }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
10247
10627
  type ExecutionHints = z.infer<typeof ExecutionHintsSchema$1>;
10248
10628
  //#endregion
10249
- export { AwaitSubagentRequest as $, WorkflowStateDefinition as $i, SpanRecord as $n, WorkflowArtifactBinding as $r, WorkflowWorkerBusAuthSchema as $t, LoopGateHandler$1 as A, WorkflowIterateNodeSchema as Ai, ArtifactQuerySourceSchema as An, WorkflowTriggerTypeRecord as Ar, WorkLogArtifactWrite as At, WorkflowTriggerDef as B, WorkflowNodeTypeSchema as Bi, ContextSourceSchema as Bn, ExecutionListCursorSchema as Br, WorkLogStats as Bt, NodeOptions as C, WorkflowGateNode as Ci, WorkflowProgressUpdate as Cn, WorkflowRunnerStepType as Cr, SpawnSubagentRpcResponse as Ct, WorkflowStateAuthoringDefinition as D, WorkflowIterateChainNode as Di, ArtifactPublishTarget as Dn, createStepCancelSubject$1 as Dr, SubagentExecutionFailed as Dt, WorkflowBuilder as E, WorkflowGateStatusSchema as Ei, WorkflowSubjects$1 as En, WorkflowStepTypeSchema as Er, SubagentConstraints$1 as Et, ExtensionWorkflowTrigger as F, WorkflowNode as Fi, ContextBundle as Fn, EXECUTIONS_BY_ARTIFACT_REFS_MAX_REFS as Fr, WorkLogExecutionSummarySchema as Ft, IterateHandler as G, WorkflowResolvedAgent as Gi, WorkflowError$1 as Gn, ExecutionsByArtifactRefsQuery as Gr, WorkerContributionManifest$1 as Gt, ArtifactPatch as H, WorkflowParallelModeSchema as Hi, ResolvedContextEntrySchema as Hn, ExecutionListQuerySchema$1 as Hr, WorkLogUsageSummary as Ht, ExtractTriggerPayload as I, WorkflowNodeBase as Ii, ContextBundleSchema as In, EXECUTION_LIST_DEFAULT_LIMIT$1 as Ir, WorkLogFrameEntry as It, StationStepContext as J, WorkflowResolvedRoleSchema as Ji, ExecutionLinkListQuery as Jn, ExtensionWorkflowTriggerSchema as Jr, WorkerContributionPackageRefSchema as Jt, PreviousStepOutput as K, WorkflowResolvedAgentSchema as Ki, WorkflowErrorCode$1 as Kn, ExecutionsByArtifactRefsQuerySchema$1 as Kr, WorkerContributionManifestSchema as Kt, ManualWorkflowTrigger as L, WorkflowNodeBaseSchema as Li, ContextPublishTarget as Ln, EXECUTION_LIST_MAX_LIMIT$1 as Lr, WorkLogFrameEntrySchema as Lt, BusEventWorkflowTrigger as M, WorkflowListQuerySchema$1 as Mi, BusEventPublishTargetSchema as Mn, BusEventTriggerSchema as Mr, WorkLogDynamicNodeMaterialization as Mt, CronTriggerPayload as N, WorkflowLoopNode as Ni, BusRequestSource as Nn, EXECUTIONS_BY_ARTIFACT_REFS_DEFAULT_LIMIT_PER_REF as Nr, WorkLogDynamicNodeMaterializationSchema as Nt, WorkflowZodSchemas$1 as O, WorkflowIterateChainNodeSchema as Oi, ArtifactPublishTargetSchema as On, createWorkflowCancelSubject$1 as Or, SubagentStatus$1 as Ot, CronWorkflowTrigger as P, WorkflowLoopNodeSchema as Pi, BusRequestSourceSchema as Pn, EXECUTIONS_BY_ARTIFACT_REFS_MAX_LIMIT_PER_REF as Pr, WorkLogExecutionSummary as Pt, WorkflowStateContext as Q, WorkflowSourceLocationSchema as Qi, ExecutionLinkTypeSchema as Qn, LoopGateOutcomeSchema as Qr, WorkflowWorkerBusAuth as Qt, WebhookTriggerPayload as R, WorkflowNodeSchema as Ri, ContextPublishTargetSchema as Rn, EXECUTION_LIST_MIN_LIMIT$1 as Rr, WorkLogGateEvent as Rt, LoopOptions as S, WorkflowGateInstanceSchema$1 as Si, WorkflowNamespace$1 as Sn, WorkflowCancelSubject as Sr, SpawnSubagentRpcRequestSchema$1 as St, ParallelOptions as T, WorkflowGateStatus as Ti, WorkflowSchemas as Tn, WorkflowStepType as Tr, SubagentConfigSchema$1 as Tt, ArtifactUpdateOperation as U, WorkflowParallelNode as Ui, JsonPatchOperation$1 as Un, ExecutionStatus as Ur, WorkLogUsageSummarySchema as Ut, ArtifactContext as V, WorkflowParallelMode as Vi, ResolvedContextEntry as Vn, ExecutionListQuery as Vr, WorkLogStatsSchema as Vt, ArtifactUpdater as W, WorkflowParallelNodeSchema as Wi, JsonPatchOperationSchema$1 as Wn, ExecutionStatusSchema$1 as Wr, IWorkflowRunner$1 as Wt, WorkflowContext as X, WorkflowSequenceNodeSchema as Xi, ExecutionLinkSchema$1 as Xn, GateInstanceListQuerySchema$1 as Xr, WorkflowRunResultSchema as Xt, StepContext as Y, WorkflowSequenceNode as Yi, ExecutionLinkListQuerySchema$1 as Yn, GateInstanceListQuery as Yr, WorkflowRunResult$1 as Yt, WorkflowContextBase as Z, WorkflowSourceLocation as Zi, ExecutionLinkType as Zn, LoopGateOutcome as Zr, WorkflowRunnerRunOptions$1 as Zt, BuiltWorkflow as _, WorkflowExecutionScope as _i, WorkflowRunContextSchema$1 as _n, TokenUsage as _r, RequestInputRpcRequest as _t, defineWorkflowBundle as a, WorkflowDefinition$1 as ai, ProjectedEdgeKind as an, StepCancelPayloadSchema as ar, ContextMode as at, IterateOptions as b, WorkflowFrameStateSchema$1 as bi, parseArtifactRef as bn, WorkflowCancelPayload as br, SendToSubagentResponse as bt, delegateToRole as c, WorkflowDefinitionSchema$1 as ci, ProjectedWorkflowGraph as cn, StepRunConfigSchema as cr, ExecuteSubagentResponse as ct, iterateChain as d, WorkflowDelegateRoleNode as di, projectWorkflowGraph as dn, StepRunnerBusAuth$1 as dr, ListSubagentsBySessionRequest as dt, WorkflowStateDefinitionSchema as ea, WorkflowArtifactBindingSchema as ei, WorkflowWorkerConfig$1 as en, SpanRecordSchema$1 as er, AwaitSubagentResponse as et, loop as f, WorkflowDelegateRoleNodeSchema as fi, WalkContext as fn, StepRunnerBusAuthSchema as fr, ListSubagentsBySessionResponse as ft, ArtifactBindingOptions as g, WorkflowExecutionSchema$1 as gi, WorkflowRunContext as gn, StepTelemetrySchema as gr, ReportProgressResponse as gt, AgentConfig as h, WorkflowExecution as hi, walkWorkflowDefinition$1 as hn, StepTelemetry as hr, ReportProgressRequest as ht, WorkflowBundle as i, WorkflowTriggerSchema as ia, WorkflowConditionSchema as ii, ProjectedEdge as in, StepCancelPayload as ir, CompletionModeSchema as it, validateNoNestedLoops as j, WorkflowListQuery as ji, BusEventPublishTarget as jn, BusEventTrigger as jr, WorkLogArtifactWriteSchema as jt, LoopGateContext as k, WorkflowIterateNode as ki, ArtifactQuerySource as kn, IWorkflowTriggerTypeRegistry$1 as kr, SubagentStatusSchema as kt, gate as l, WorkflowDelegateAgentNode as li, WorkflowDefinitionPath as ln, StepRunResult as lr, KillSubagentRequest as lt, zodSchemaToJsonRecord$1 as m, WorkflowDynamicRegionSchema as mi, WorkflowNodeVisitor as mn, StepRunnerPlatformDefaultsSchema as mr, PendingRequestSchema as mt, ExecutionHintsSchema$1 as n, WorkflowStationNodeSchema as na, WorkflowArtifactWriteDeclarationSchema as ni, WorkflowWorkerSource$1 as nn, SpanStatusSchema as nr, CompleteTaskResponse as nt, defineWorkflow as o, WorkflowDefinitionProvenance as oi, ProjectedNode as on, StepCancelSubject as or, ContextModeSchema$1 as ot, station as p, WorkflowDynamicRegion as pi, WalkRelationship as pn, StepRunnerPlatformDefaults$1 as pr, PendingRequest$1 as pt, StationHandler$1 as q, WorkflowResolvedRole as qi, ExecutionLink as qn, ExtensionWorkflowTrigger$1 as qr, WorkerContributionPackageRef as qt, ExecutionSourceHintSchema as r, WorkflowTrigger as ra, WorkflowCondition as ri, WorkflowWorkerSourceSchema$1 as rn, IStepRunner as rr, CompletionMode$1 as rt, delegateToAgent as s, WorkflowDefinitionProvenanceSchema as si, ProjectedNodeRole as sn, StepRunConfig as sr, DEFAULT_CONSTRAINTS$1 as st, ExecutionHints as t, WorkflowStationNode as ta, WorkflowArtifactWriteDeclaration as ti, WorkflowWorkerConfigSchema$1 as tn, SpanStatus as tr, CompleteTaskRequest as tt, iterate as u, WorkflowDelegateAgentNodeSchema as ui, WorkflowDefinitionPathSegment as un, StepRunResultSchema as ur, KillSubagentResponse as ut, DefineWorkflowOptions as v, WorkflowExecutionScopeSchema as vi, WorkflowArtifactRef as vn, TokenUsageSchema as vr, RequestInputRpcResponse as vt, ParallelMode as w, WorkflowGateNodeSchema as wi, WorkflowProgressUpdateSchema as wn, WorkflowRunnerStepTypeSchema as wr, SubagentConfig$1 as wt, LoopGateRegistration as x, WorkflowGateInstance as xi, serializeArtifactRef$1 as xn, WorkflowCancelPayloadSchema as xr, SpawnSubagentRpcRequest as xt, GateOptions as y, WorkflowFrameState$1 as yi, WorkflowArtifactRefSchema as yn, WORKFLOW_CANCELLED_REASON$1 as yr, SendToSubagentRequest as yt, WebhookWorkflowTrigger as z, WorkflowNodeType as zi, ContextSource as zn, ExecutionListCursor as zr, WorkLogGateEventSchema as zt };
10629
+ 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 };