pulseed 0.5.0 → 0.5.2

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 (224) hide show
  1. package/dist/adapters/types/a2a.d.ts +6 -6
  2. package/dist/base/config/identity-loader.d.ts +6 -0
  3. package/dist/base/config/identity-loader.d.ts.map +1 -1
  4. package/dist/base/config/identity-loader.js +34 -8
  5. package/dist/base/config/identity-loader.js.map +1 -1
  6. package/dist/grounding/gateway.d.ts.map +1 -1
  7. package/dist/grounding/gateway.js +2 -1
  8. package/dist/grounding/gateway.js.map +1 -1
  9. package/dist/grounding/providers/static-policy-provider.d.ts +1 -1
  10. package/dist/grounding/providers/static-policy-provider.d.ts.map +1 -1
  11. package/dist/grounding/providers/static-policy-provider.js +12 -8
  12. package/dist/grounding/providers/static-policy-provider.js.map +1 -1
  13. package/dist/interface/chat/chat-runner.d.ts +1 -0
  14. package/dist/interface/chat/chat-runner.d.ts.map +1 -1
  15. package/dist/interface/chat/chat-runner.js +73 -16
  16. package/dist/interface/chat/chat-runner.js.map +1 -1
  17. package/dist/interface/chat/cross-platform-session.d.ts +3 -0
  18. package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
  19. package/dist/interface/chat/cross-platform-session.js +9 -0
  20. package/dist/interface/chat/cross-platform-session.js.map +1 -1
  21. package/dist/interface/chat/grounding.d.ts +1 -1
  22. package/dist/interface/chat/grounding.d.ts.map +1 -1
  23. package/dist/interface/chat/grounding.js +2 -2
  24. package/dist/interface/chat/grounding.js.map +1 -1
  25. package/dist/interface/chat/ingress-router.d.ts +2 -0
  26. package/dist/interface/chat/ingress-router.d.ts.map +1 -1
  27. package/dist/interface/chat/ingress-router.js +11 -1
  28. package/dist/interface/chat/ingress-router.js.map +1 -1
  29. package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
  30. package/dist/interface/cli/commands/daemon.js +41 -7
  31. package/dist/interface/cli/commands/daemon.js.map +1 -1
  32. package/dist/interface/cli/commands/setup/steps-identity.d.ts.map +1 -1
  33. package/dist/interface/cli/commands/setup/steps-identity.js +5 -0
  34. package/dist/interface/cli/commands/setup/steps-identity.js.map +1 -1
  35. package/dist/interface/cli/commands/setup/steps-runtime.d.ts +2 -0
  36. package/dist/interface/cli/commands/setup/steps-runtime.d.ts.map +1 -1
  37. package/dist/interface/cli/commands/setup/steps-runtime.js +11 -2
  38. package/dist/interface/cli/commands/setup/steps-runtime.js.map +1 -1
  39. package/dist/interface/cli/setup.d.ts.map +1 -1
  40. package/dist/interface/cli/setup.js +14 -1
  41. package/dist/interface/cli/setup.js.map +1 -1
  42. package/dist/interface/tui/app.d.ts +2 -0
  43. package/dist/interface/tui/app.d.ts.map +1 -1
  44. package/dist/interface/tui/app.js +51 -15
  45. package/dist/interface/tui/app.js.map +1 -1
  46. package/dist/interface/tui/entry.d.ts.map +1 -1
  47. package/dist/interface/tui/entry.js +14 -1
  48. package/dist/interface/tui/entry.js.map +1 -1
  49. package/dist/orchestrator/execution/adapter-layer.d.ts +2 -0
  50. package/dist/orchestrator/execution/adapter-layer.d.ts.map +1 -1
  51. package/dist/orchestrator/execution/adapter-layer.js.map +1 -1
  52. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
  53. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +27 -0
  54. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
  55. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts +1 -0
  56. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -1
  57. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +10 -3
  58. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -1
  59. package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.d.ts.map +1 -1
  60. package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.js +2 -1
  61. package/dist/orchestrator/execution/agent-loop/agent-loop-session-factory.js.map +1 -1
  62. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +2 -0
  63. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
  64. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
  65. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
  66. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +45 -0
  67. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
  68. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +12 -4
  69. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
  70. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +44 -127
  71. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
  72. package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts +27 -0
  73. package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts.map +1 -0
  74. package/dist/orchestrator/execution/agent-loop/chat-display-output.js +157 -0
  75. package/dist/orchestrator/execution/agent-loop/chat-display-output.js.map +1 -0
  76. package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts +1 -1
  77. package/dist/orchestrator/execution/agent-loop/core-phase-runner.d.ts.map +1 -1
  78. package/dist/orchestrator/execution/agent-loop/core-phase-runner.js.map +1 -1
  79. package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.d.ts +2 -0
  80. package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.d.ts.map +1 -1
  81. package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.js +10 -0
  82. package/dist/orchestrator/execution/agent-loop/task-agent-loop-factory.js.map +1 -1
  83. package/dist/orchestrator/goal/goal-suggest.d.ts +4 -4
  84. package/dist/orchestrator/goal/types/goal-tree.d.ts +2 -2
  85. package/dist/orchestrator/loop/core-loop/contracts.d.ts +19 -0
  86. package/dist/orchestrator/loop/core-loop/contracts.d.ts.map +1 -1
  87. package/dist/orchestrator/loop/core-loop/contracts.js.map +1 -1
  88. package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts +1 -0
  89. package/dist/orchestrator/loop/core-loop/iteration-kernel.d.ts.map +1 -1
  90. package/dist/orchestrator/loop/core-loop/iteration-kernel.js +61 -2
  91. package/dist/orchestrator/loop/core-loop/iteration-kernel.js.map +1 -1
  92. package/dist/orchestrator/loop/core-loop/phase-policy.d.ts.map +1 -1
  93. package/dist/orchestrator/loop/core-loop/phase-policy.js +24 -0
  94. package/dist/orchestrator/loop/core-loop/phase-policy.js.map +1 -1
  95. package/dist/orchestrator/loop/core-loop/phase-specs.d.ts +37 -0
  96. package/dist/orchestrator/loop/core-loop/phase-specs.d.ts.map +1 -1
  97. package/dist/orchestrator/loop/core-loop/phase-specs.js +28 -0
  98. package/dist/orchestrator/loop/core-loop/phase-specs.js.map +1 -1
  99. package/dist/orchestrator/loop/core-loop/task-cycle.d.ts +12 -0
  100. package/dist/orchestrator/loop/core-loop/task-cycle.d.ts.map +1 -1
  101. package/dist/orchestrator/loop/core-loop/task-cycle.js +170 -23
  102. package/dist/orchestrator/loop/core-loop/task-cycle.js.map +1 -1
  103. package/dist/orchestrator/loop/core-loop.d.ts +2 -1
  104. package/dist/orchestrator/loop/core-loop.d.ts.map +1 -1
  105. package/dist/orchestrator/loop/core-loop.js +3 -0
  106. package/dist/orchestrator/loop/core-loop.js.map +1 -1
  107. package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
  108. package/dist/orchestrator/loop/loop-report-helper.js +24 -0
  109. package/dist/orchestrator/loop/loop-report-helper.js.map +1 -1
  110. package/dist/orchestrator/loop/loop-result-types.d.ts +7 -0
  111. package/dist/orchestrator/loop/loop-result-types.d.ts.map +1 -1
  112. package/dist/orchestrator/loop/loop-result-types.js.map +1 -1
  113. package/dist/orchestrator/strategy/portfolio-manager.d.ts +2 -2
  114. package/dist/orchestrator/strategy/portfolio-manager.d.ts.map +1 -1
  115. package/dist/orchestrator/strategy/portfolio-manager.js +11 -1
  116. package/dist/orchestrator/strategy/portfolio-manager.js.map +1 -1
  117. package/dist/orchestrator/strategy/portfolio-rebalance.d.ts +4 -2
  118. package/dist/orchestrator/strategy/portfolio-rebalance.d.ts.map +1 -1
  119. package/dist/orchestrator/strategy/portfolio-rebalance.js +490 -12
  120. package/dist/orchestrator/strategy/portfolio-rebalance.js.map +1 -1
  121. package/dist/orchestrator/strategy/strategy-manager.js +3 -3
  122. package/dist/orchestrator/strategy/strategy-manager.js.map +1 -1
  123. package/dist/orchestrator/strategy/types/cross-portfolio.d.ts +2 -2
  124. package/dist/orchestrator/strategy/types/portfolio.d.ts +12 -12
  125. package/dist/orchestrator/strategy/types/strategy.d.ts +639 -8
  126. package/dist/orchestrator/strategy/types/strategy.d.ts.map +1 -1
  127. package/dist/orchestrator/strategy/types/strategy.js +122 -0
  128. package/dist/orchestrator/strategy/types/strategy.js.map +1 -1
  129. package/dist/platform/dream/dream-types.d.ts +52 -52
  130. package/dist/platform/drive/types/satisficing.d.ts +2 -2
  131. package/dist/platform/knowledge/types/memory-lifecycle.d.ts +2 -2
  132. package/dist/platform/observation/observation-helpers.d.ts +2 -2
  133. package/dist/platform/soil/contracts.d.ts +47 -47
  134. package/dist/platform/traits/types/curiosity.d.ts +24 -24
  135. package/dist/prompt/purposes/learning.d.ts +4 -4
  136. package/dist/reporting/report-formatters.d.ts.map +1 -1
  137. package/dist/reporting/report-formatters.js +33 -2
  138. package/dist/reporting/report-formatters.js.map +1 -1
  139. package/dist/reporting/reporting-engine.d.ts.map +1 -1
  140. package/dist/reporting/reporting-engine.js +2 -1
  141. package/dist/reporting/reporting-engine.js.map +1 -1
  142. package/dist/reporting/reporting-types.d.ts +11 -0
  143. package/dist/reporting/reporting-types.d.ts.map +1 -1
  144. package/dist/reporting/types/report.d.ts +72 -4
  145. package/dist/reporting/types/report.d.ts.map +1 -1
  146. package/dist/reporting/types/report.js +10 -0
  147. package/dist/reporting/types/report.js.map +1 -1
  148. package/dist/runtime/approval-broker.d.ts +1 -1
  149. package/dist/runtime/approval-broker.d.ts.map +1 -1
  150. package/dist/runtime/approval-broker.js +1 -2
  151. package/dist/runtime/approval-broker.js.map +1 -1
  152. package/dist/runtime/control/index.d.ts +1 -0
  153. package/dist/runtime/control/index.d.ts.map +1 -1
  154. package/dist/runtime/control/index.js +1 -0
  155. package/dist/runtime/control/index.js.map +1 -1
  156. package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
  157. package/dist/runtime/control/runtime-control-intent.js +0 -8
  158. package/dist/runtime/control/runtime-control-intent.js.map +1 -1
  159. package/dist/runtime/control/runtime-control-result-routing.d.ts +28 -0
  160. package/dist/runtime/control/runtime-control-result-routing.d.ts.map +1 -0
  161. package/dist/runtime/control/runtime-control-result-routing.js +47 -0
  162. package/dist/runtime/control/runtime-control-result-routing.js.map +1 -0
  163. package/dist/runtime/control/runtime-control-service.d.ts +2 -1
  164. package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
  165. package/dist/runtime/control/runtime-control-service.js +32 -4
  166. package/dist/runtime/control/runtime-control-service.js.map +1 -1
  167. package/dist/runtime/daemon/index.d.ts +1 -0
  168. package/dist/runtime/daemon/index.d.ts.map +1 -1
  169. package/dist/runtime/daemon/index.js +1 -0
  170. package/dist/runtime/daemon/index.js.map +1 -1
  171. package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
  172. package/dist/runtime/daemon/runner-goal-cycle.js +55 -8
  173. package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
  174. package/dist/runtime/daemon/runner-startup.d.ts +2 -1
  175. package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
  176. package/dist/runtime/daemon/runner-startup.js +10 -4
  177. package/dist/runtime/daemon/runner-startup.js.map +1 -1
  178. package/dist/runtime/daemon/runner.d.ts +2 -0
  179. package/dist/runtime/daemon/runner.d.ts.map +1 -1
  180. package/dist/runtime/daemon/runner.js +15 -1
  181. package/dist/runtime/daemon/runner.js.map +1 -1
  182. package/dist/runtime/daemon/wait-deadline-resolver.d.ts +25 -0
  183. package/dist/runtime/daemon/wait-deadline-resolver.d.ts.map +1 -0
  184. package/dist/runtime/daemon/wait-deadline-resolver.js +88 -0
  185. package/dist/runtime/daemon/wait-deadline-resolver.js.map +1 -0
  186. package/dist/runtime/gateway/chat-session-dispatch.d.ts +1 -0
  187. package/dist/runtime/gateway/chat-session-dispatch.d.ts.map +1 -1
  188. package/dist/runtime/gateway/chat-session-dispatch.js +1 -0
  189. package/dist/runtime/gateway/chat-session-dispatch.js.map +1 -1
  190. package/dist/runtime/gateway/discord-gateway-adapter.d.ts.map +1 -1
  191. package/dist/runtime/gateway/discord-gateway-adapter.js +1 -0
  192. package/dist/runtime/gateway/discord-gateway-adapter.js.map +1 -1
  193. package/dist/runtime/gateway/signal-gateway-adapter.d.ts.map +1 -1
  194. package/dist/runtime/gateway/signal-gateway-adapter.js +1 -0
  195. package/dist/runtime/gateway/signal-gateway-adapter.js.map +1 -1
  196. package/dist/runtime/gateway/slack-channel-adapter.d.ts +4 -0
  197. package/dist/runtime/gateway/slack-channel-adapter.d.ts.map +1 -1
  198. package/dist/runtime/gateway/slack-channel-adapter.js +105 -10
  199. package/dist/runtime/gateway/slack-channel-adapter.js.map +1 -1
  200. package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
  201. package/dist/runtime/gateway/telegram-gateway-adapter.js +1 -0
  202. package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
  203. package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts.map +1 -1
  204. package/dist/runtime/gateway/whatsapp-gateway-adapter.js +1 -0
  205. package/dist/runtime/gateway/whatsapp-gateway-adapter.js.map +1 -1
  206. package/dist/runtime/store/runtime-operation-schemas.d.ts +48 -8
  207. package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -1
  208. package/dist/runtime/store/runtime-operation-schemas.js +5 -0
  209. package/dist/runtime/store/runtime-operation-schemas.js.map +1 -1
  210. package/dist/runtime/store/runtime-schemas.d.ts +6 -6
  211. package/dist/runtime/types/cron.d.ts +4 -4
  212. package/dist/runtime/types/daemon.d.ts +57 -0
  213. package/dist/runtime/types/daemon.d.ts.map +1 -1
  214. package/dist/runtime/types/daemon.js +13 -0
  215. package/dist/runtime/types/daemon.js.map +1 -1
  216. package/dist/runtime/types/envelope.d.ts +2 -2
  217. package/dist/runtime/types/notification.d.ts +1 -1
  218. package/dist/tools/query/ArchitectureTool/ArchitectureTool.js +1 -1
  219. package/dist/tools/query/ArchitectureTool/ArchitectureTool.js.map +1 -1
  220. package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts +35 -7
  221. package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.d.ts.map +1 -1
  222. package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js +128 -3
  223. package/dist/tools/system/ProcessSessionTool/ProcessSessionTool.js.map +1 -1
  224. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import type { RebalanceTrigger } from "./portfolio.js";
2
3
  export declare const ExpectedEffectSchema: z.ZodObject<{
3
4
  dimension: z.ZodString;
4
5
  direction: z.ZodEnum<["increase", "decrease"]>;
@@ -114,6 +115,7 @@ export declare const StrategySchema: z.ZodObject<{
114
115
  primary_dimension: string;
115
116
  started_at: string | null;
116
117
  completed_at: string | null;
118
+ effectiveness_score: number | null;
117
119
  hypothesis: string;
118
120
  expected_effect: {
119
121
  dimension: string;
@@ -132,7 +134,6 @@ export declare const StrategySchema: z.ZodObject<{
132
134
  allocation: number;
133
135
  gap_snapshot_at_start: number | null;
134
136
  tasks_generated: string[];
135
- effectiveness_score: number | null;
136
137
  consecutive_stall_count: number;
137
138
  source_template_id: string | null;
138
139
  cross_goal_context: string | null;
@@ -164,11 +165,11 @@ export declare const StrategySchema: z.ZodObject<{
164
165
  };
165
166
  started_at?: string | null | undefined;
166
167
  completed_at?: string | null | undefined;
168
+ effectiveness_score?: number | null | undefined;
167
169
  state?: "completed" | "candidate" | "active" | "evaluating" | "suspended" | "terminated" | undefined;
168
170
  allocation?: number | undefined;
169
171
  gap_snapshot_at_start?: number | null | undefined;
170
172
  tasks_generated?: string[] | undefined;
171
- effectiveness_score?: number | null | undefined;
172
173
  consecutive_stall_count?: number | undefined;
173
174
  source_template_id?: string | null | undefined;
174
175
  cross_goal_context?: string | null | undefined;
@@ -257,6 +258,7 @@ export declare const WaitStrategySchema: z.ZodObject<{
257
258
  primary_dimension: string;
258
259
  started_at: string | null;
259
260
  completed_at: string | null;
261
+ effectiveness_score: number | null;
260
262
  hypothesis: string;
261
263
  expected_effect: {
262
264
  dimension: string;
@@ -275,7 +277,6 @@ export declare const WaitStrategySchema: z.ZodObject<{
275
277
  allocation: number;
276
278
  gap_snapshot_at_start: number | null;
277
279
  tasks_generated: string[];
278
- effectiveness_score: number | null;
279
280
  consecutive_stall_count: number;
280
281
  source_template_id: string | null;
281
282
  cross_goal_context: string | null;
@@ -315,11 +316,11 @@ export declare const WaitStrategySchema: z.ZodObject<{
315
316
  fallback_strategy_id: string | null;
316
317
  started_at?: string | null | undefined;
317
318
  completed_at?: string | null | undefined;
319
+ effectiveness_score?: number | null | undefined;
318
320
  state?: "completed" | "candidate" | "active" | "evaluating" | "suspended" | "terminated" | undefined;
319
321
  allocation?: number | undefined;
320
322
  gap_snapshot_at_start?: number | null | undefined;
321
323
  tasks_generated?: string[] | undefined;
322
- effectiveness_score?: number | null | undefined;
323
324
  consecutive_stall_count?: number | undefined;
324
325
  source_template_id?: string | null | undefined;
325
326
  cross_goal_context?: string | null | undefined;
@@ -331,6 +332,636 @@ export declare const WaitStrategySchema: z.ZodObject<{
331
332
  required_tools?: string[] | undefined;
332
333
  }>;
333
334
  export type WaitStrategy = z.infer<typeof WaitStrategySchema>;
335
+ export declare const TimeUntilWaitConditionSchema: z.ZodObject<{
336
+ type: z.ZodLiteral<"time_until">;
337
+ until: z.ZodString;
338
+ }, "strip", z.ZodTypeAny, {
339
+ type: "time_until";
340
+ until: string;
341
+ }, {
342
+ type: "time_until";
343
+ until: string;
344
+ }>;
345
+ export declare const FileExistsWaitConditionSchema: z.ZodObject<{
346
+ type: z.ZodLiteral<"file_exists">;
347
+ path: z.ZodString;
348
+ }, "strip", z.ZodTypeAny, {
349
+ path: string;
350
+ type: "file_exists";
351
+ }, {
352
+ path: string;
353
+ type: "file_exists";
354
+ }>;
355
+ export declare const FileMtimeChangedWaitConditionSchema: z.ZodObject<{
356
+ type: z.ZodLiteral<"file_mtime_changed">;
357
+ path: z.ZodString;
358
+ previous_mtime_ms: z.ZodNumber;
359
+ }, "strip", z.ZodTypeAny, {
360
+ path: string;
361
+ type: "file_mtime_changed";
362
+ previous_mtime_ms: number;
363
+ }, {
364
+ path: string;
365
+ type: "file_mtime_changed";
366
+ previous_mtime_ms: number;
367
+ }>;
368
+ export declare const ProcessSessionExitedWaitConditionSchema: z.ZodObject<{
369
+ type: z.ZodLiteral<"process_session_exited">;
370
+ session_id: z.ZodString;
371
+ }, "strip", z.ZodTypeAny, {
372
+ type: "process_session_exited";
373
+ session_id: string;
374
+ }, {
375
+ type: "process_session_exited";
376
+ session_id: string;
377
+ }>;
378
+ export declare const ArtifactJsonValueWaitConditionSchema: z.ZodObject<{
379
+ type: z.ZodLiteral<"artifact_json_value">;
380
+ path: z.ZodString;
381
+ json_pointer: z.ZodString;
382
+ expected: z.ZodUnknown;
383
+ }, "strip", z.ZodTypeAny, {
384
+ path: string;
385
+ type: "artifact_json_value";
386
+ json_pointer: string;
387
+ expected?: unknown;
388
+ }, {
389
+ path: string;
390
+ type: "artifact_json_value";
391
+ json_pointer: string;
392
+ expected?: unknown;
393
+ }>;
394
+ export declare const MetricThresholdWaitConditionSchema: z.ZodObject<{
395
+ type: z.ZodLiteral<"metric_threshold">;
396
+ metric: z.ZodString;
397
+ operator: z.ZodEnum<["lt", "lte", "eq", "gte", "gt"]>;
398
+ value: z.ZodNumber;
399
+ }, "strip", z.ZodTypeAny, {
400
+ value: number;
401
+ type: "metric_threshold";
402
+ metric: string;
403
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
404
+ }, {
405
+ value: number;
406
+ type: "metric_threshold";
407
+ metric: string;
408
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
409
+ }>;
410
+ export declare const WaitConditionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
411
+ type: z.ZodLiteral<"time_until">;
412
+ until: z.ZodString;
413
+ }, "strip", z.ZodTypeAny, {
414
+ type: "time_until";
415
+ until: string;
416
+ }, {
417
+ type: "time_until";
418
+ until: string;
419
+ }>, z.ZodObject<{
420
+ type: z.ZodLiteral<"file_exists">;
421
+ path: z.ZodString;
422
+ }, "strip", z.ZodTypeAny, {
423
+ path: string;
424
+ type: "file_exists";
425
+ }, {
426
+ path: string;
427
+ type: "file_exists";
428
+ }>, z.ZodObject<{
429
+ type: z.ZodLiteral<"file_mtime_changed">;
430
+ path: z.ZodString;
431
+ previous_mtime_ms: z.ZodNumber;
432
+ }, "strip", z.ZodTypeAny, {
433
+ path: string;
434
+ type: "file_mtime_changed";
435
+ previous_mtime_ms: number;
436
+ }, {
437
+ path: string;
438
+ type: "file_mtime_changed";
439
+ previous_mtime_ms: number;
440
+ }>, z.ZodObject<{
441
+ type: z.ZodLiteral<"process_session_exited">;
442
+ session_id: z.ZodString;
443
+ }, "strip", z.ZodTypeAny, {
444
+ type: "process_session_exited";
445
+ session_id: string;
446
+ }, {
447
+ type: "process_session_exited";
448
+ session_id: string;
449
+ }>, z.ZodObject<{
450
+ type: z.ZodLiteral<"artifact_json_value">;
451
+ path: z.ZodString;
452
+ json_pointer: z.ZodString;
453
+ expected: z.ZodUnknown;
454
+ }, "strip", z.ZodTypeAny, {
455
+ path: string;
456
+ type: "artifact_json_value";
457
+ json_pointer: string;
458
+ expected?: unknown;
459
+ }, {
460
+ path: string;
461
+ type: "artifact_json_value";
462
+ json_pointer: string;
463
+ expected?: unknown;
464
+ }>, z.ZodObject<{
465
+ type: z.ZodLiteral<"metric_threshold">;
466
+ metric: z.ZodString;
467
+ operator: z.ZodEnum<["lt", "lte", "eq", "gte", "gt"]>;
468
+ value: z.ZodNumber;
469
+ }, "strip", z.ZodTypeAny, {
470
+ value: number;
471
+ type: "metric_threshold";
472
+ metric: string;
473
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
474
+ }, {
475
+ value: number;
476
+ type: "metric_threshold";
477
+ metric: string;
478
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
479
+ }>]>;
480
+ export type WaitCondition = z.infer<typeof WaitConditionSchema>;
481
+ export declare const WaitObservationResultSchema: z.ZodObject<{
482
+ status: z.ZodEnum<["pending", "satisfied", "stale", "failed", "expired"]>;
483
+ evidence: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
484
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
485
+ confidence: z.ZodDefault<z.ZodNumber>;
486
+ resume_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
487
+ }, "strip", z.ZodTypeAny, {
488
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
489
+ confidence: number;
490
+ evidence: Record<string, unknown>;
491
+ next_observe_at: string | null;
492
+ resume_hint: string | null;
493
+ }, {
494
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
495
+ confidence?: number | undefined;
496
+ evidence?: Record<string, unknown> | undefined;
497
+ next_observe_at?: string | null | undefined;
498
+ resume_hint?: string | null | undefined;
499
+ }>;
500
+ export type WaitObservationResult = z.infer<typeof WaitObservationResultSchema>;
501
+ export declare const WaitResumePlanSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
502
+ action: z.ZodLiteral<"continue_strategy">;
503
+ }, "strip", z.ZodTypeAny, {
504
+ action: "continue_strategy";
505
+ }, {
506
+ action: "continue_strategy";
507
+ }>, z.ZodObject<{
508
+ action: z.ZodLiteral<"activate_fallback">;
509
+ strategy_id: z.ZodString;
510
+ }, "strip", z.ZodTypeAny, {
511
+ strategy_id: string;
512
+ action: "activate_fallback";
513
+ }, {
514
+ strategy_id: string;
515
+ action: "activate_fallback";
516
+ }>, z.ZodObject<{
517
+ action: z.ZodLiteral<"request_approval">;
518
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
519
+ }, "strip", z.ZodTypeAny, {
520
+ reason: string | null;
521
+ action: "request_approval";
522
+ }, {
523
+ action: "request_approval";
524
+ reason?: string | null | undefined;
525
+ }>, z.ZodObject<{
526
+ action: z.ZodLiteral<"complete_wait">;
527
+ }, "strip", z.ZodTypeAny, {
528
+ action: "complete_wait";
529
+ }, {
530
+ action: "complete_wait";
531
+ }>, z.ZodObject<{
532
+ action: z.ZodLiteral<"generate_task">;
533
+ prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
534
+ }, "strip", z.ZodTypeAny, {
535
+ action: "generate_task";
536
+ prompt: string | null;
537
+ }, {
538
+ action: "generate_task";
539
+ prompt?: string | null | undefined;
540
+ }>]>;
541
+ export type WaitResumePlan = z.infer<typeof WaitResumePlanSchema>;
542
+ export declare const WaitMetadataSchema: z.ZodObject<{
543
+ schema_version: z.ZodDefault<z.ZodLiteral<1>>;
544
+ wait_until: z.ZodString;
545
+ conditions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
546
+ type: z.ZodLiteral<"time_until">;
547
+ until: z.ZodString;
548
+ }, "strip", z.ZodTypeAny, {
549
+ type: "time_until";
550
+ until: string;
551
+ }, {
552
+ type: "time_until";
553
+ until: string;
554
+ }>, z.ZodObject<{
555
+ type: z.ZodLiteral<"file_exists">;
556
+ path: z.ZodString;
557
+ }, "strip", z.ZodTypeAny, {
558
+ path: string;
559
+ type: "file_exists";
560
+ }, {
561
+ path: string;
562
+ type: "file_exists";
563
+ }>, z.ZodObject<{
564
+ type: z.ZodLiteral<"file_mtime_changed">;
565
+ path: z.ZodString;
566
+ previous_mtime_ms: z.ZodNumber;
567
+ }, "strip", z.ZodTypeAny, {
568
+ path: string;
569
+ type: "file_mtime_changed";
570
+ previous_mtime_ms: number;
571
+ }, {
572
+ path: string;
573
+ type: "file_mtime_changed";
574
+ previous_mtime_ms: number;
575
+ }>, z.ZodObject<{
576
+ type: z.ZodLiteral<"process_session_exited">;
577
+ session_id: z.ZodString;
578
+ }, "strip", z.ZodTypeAny, {
579
+ type: "process_session_exited";
580
+ session_id: string;
581
+ }, {
582
+ type: "process_session_exited";
583
+ session_id: string;
584
+ }>, z.ZodObject<{
585
+ type: z.ZodLiteral<"artifact_json_value">;
586
+ path: z.ZodString;
587
+ json_pointer: z.ZodString;
588
+ expected: z.ZodUnknown;
589
+ }, "strip", z.ZodTypeAny, {
590
+ path: string;
591
+ type: "artifact_json_value";
592
+ json_pointer: string;
593
+ expected?: unknown;
594
+ }, {
595
+ path: string;
596
+ type: "artifact_json_value";
597
+ json_pointer: string;
598
+ expected?: unknown;
599
+ }>, z.ZodObject<{
600
+ type: z.ZodLiteral<"metric_threshold">;
601
+ metric: z.ZodString;
602
+ operator: z.ZodEnum<["lt", "lte", "eq", "gte", "gt"]>;
603
+ value: z.ZodNumber;
604
+ }, "strip", z.ZodTypeAny, {
605
+ value: number;
606
+ type: "metric_threshold";
607
+ metric: string;
608
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
609
+ }, {
610
+ value: number;
611
+ type: "metric_threshold";
612
+ metric: string;
613
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
614
+ }>]>, "many">>;
615
+ resume_plan: z.ZodDefault<z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
616
+ action: z.ZodLiteral<"continue_strategy">;
617
+ }, "strip", z.ZodTypeAny, {
618
+ action: "continue_strategy";
619
+ }, {
620
+ action: "continue_strategy";
621
+ }>, z.ZodObject<{
622
+ action: z.ZodLiteral<"activate_fallback">;
623
+ strategy_id: z.ZodString;
624
+ }, "strip", z.ZodTypeAny, {
625
+ strategy_id: string;
626
+ action: "activate_fallback";
627
+ }, {
628
+ strategy_id: string;
629
+ action: "activate_fallback";
630
+ }>, z.ZodObject<{
631
+ action: z.ZodLiteral<"request_approval">;
632
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ reason: string | null;
635
+ action: "request_approval";
636
+ }, {
637
+ action: "request_approval";
638
+ reason?: string | null | undefined;
639
+ }>, z.ZodObject<{
640
+ action: z.ZodLiteral<"complete_wait">;
641
+ }, "strip", z.ZodTypeAny, {
642
+ action: "complete_wait";
643
+ }, {
644
+ action: "complete_wait";
645
+ }>, z.ZodObject<{
646
+ action: z.ZodLiteral<"generate_task">;
647
+ prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
648
+ }, "strip", z.ZodTypeAny, {
649
+ action: "generate_task";
650
+ prompt: string | null;
651
+ }, {
652
+ action: "generate_task";
653
+ prompt?: string | null | undefined;
654
+ }>]>>;
655
+ process_refs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
656
+ artifact_refs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
657
+ approval_policy: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
658
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
659
+ latest_observation: z.ZodDefault<z.ZodNullable<z.ZodObject<{
660
+ status: z.ZodEnum<["pending", "satisfied", "stale", "failed", "expired"]>;
661
+ evidence: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
662
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
663
+ confidence: z.ZodDefault<z.ZodNumber>;
664
+ resume_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
665
+ }, "strip", z.ZodTypeAny, {
666
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
667
+ confidence: number;
668
+ evidence: Record<string, unknown>;
669
+ next_observe_at: string | null;
670
+ resume_hint: string | null;
671
+ }, {
672
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
673
+ confidence?: number | undefined;
674
+ evidence?: Record<string, unknown> | undefined;
675
+ next_observe_at?: string | null | undefined;
676
+ resume_hint?: string | null | undefined;
677
+ }>>>;
678
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
679
+ schema_version: z.ZodDefault<z.ZodLiteral<1>>;
680
+ wait_until: z.ZodString;
681
+ conditions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
682
+ type: z.ZodLiteral<"time_until">;
683
+ until: z.ZodString;
684
+ }, "strip", z.ZodTypeAny, {
685
+ type: "time_until";
686
+ until: string;
687
+ }, {
688
+ type: "time_until";
689
+ until: string;
690
+ }>, z.ZodObject<{
691
+ type: z.ZodLiteral<"file_exists">;
692
+ path: z.ZodString;
693
+ }, "strip", z.ZodTypeAny, {
694
+ path: string;
695
+ type: "file_exists";
696
+ }, {
697
+ path: string;
698
+ type: "file_exists";
699
+ }>, z.ZodObject<{
700
+ type: z.ZodLiteral<"file_mtime_changed">;
701
+ path: z.ZodString;
702
+ previous_mtime_ms: z.ZodNumber;
703
+ }, "strip", z.ZodTypeAny, {
704
+ path: string;
705
+ type: "file_mtime_changed";
706
+ previous_mtime_ms: number;
707
+ }, {
708
+ path: string;
709
+ type: "file_mtime_changed";
710
+ previous_mtime_ms: number;
711
+ }>, z.ZodObject<{
712
+ type: z.ZodLiteral<"process_session_exited">;
713
+ session_id: z.ZodString;
714
+ }, "strip", z.ZodTypeAny, {
715
+ type: "process_session_exited";
716
+ session_id: string;
717
+ }, {
718
+ type: "process_session_exited";
719
+ session_id: string;
720
+ }>, z.ZodObject<{
721
+ type: z.ZodLiteral<"artifact_json_value">;
722
+ path: z.ZodString;
723
+ json_pointer: z.ZodString;
724
+ expected: z.ZodUnknown;
725
+ }, "strip", z.ZodTypeAny, {
726
+ path: string;
727
+ type: "artifact_json_value";
728
+ json_pointer: string;
729
+ expected?: unknown;
730
+ }, {
731
+ path: string;
732
+ type: "artifact_json_value";
733
+ json_pointer: string;
734
+ expected?: unknown;
735
+ }>, z.ZodObject<{
736
+ type: z.ZodLiteral<"metric_threshold">;
737
+ metric: z.ZodString;
738
+ operator: z.ZodEnum<["lt", "lte", "eq", "gte", "gt"]>;
739
+ value: z.ZodNumber;
740
+ }, "strip", z.ZodTypeAny, {
741
+ value: number;
742
+ type: "metric_threshold";
743
+ metric: string;
744
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
745
+ }, {
746
+ value: number;
747
+ type: "metric_threshold";
748
+ metric: string;
749
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
750
+ }>]>, "many">>;
751
+ resume_plan: z.ZodDefault<z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
752
+ action: z.ZodLiteral<"continue_strategy">;
753
+ }, "strip", z.ZodTypeAny, {
754
+ action: "continue_strategy";
755
+ }, {
756
+ action: "continue_strategy";
757
+ }>, z.ZodObject<{
758
+ action: z.ZodLiteral<"activate_fallback">;
759
+ strategy_id: z.ZodString;
760
+ }, "strip", z.ZodTypeAny, {
761
+ strategy_id: string;
762
+ action: "activate_fallback";
763
+ }, {
764
+ strategy_id: string;
765
+ action: "activate_fallback";
766
+ }>, z.ZodObject<{
767
+ action: z.ZodLiteral<"request_approval">;
768
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
769
+ }, "strip", z.ZodTypeAny, {
770
+ reason: string | null;
771
+ action: "request_approval";
772
+ }, {
773
+ action: "request_approval";
774
+ reason?: string | null | undefined;
775
+ }>, z.ZodObject<{
776
+ action: z.ZodLiteral<"complete_wait">;
777
+ }, "strip", z.ZodTypeAny, {
778
+ action: "complete_wait";
779
+ }, {
780
+ action: "complete_wait";
781
+ }>, z.ZodObject<{
782
+ action: z.ZodLiteral<"generate_task">;
783
+ prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
784
+ }, "strip", z.ZodTypeAny, {
785
+ action: "generate_task";
786
+ prompt: string | null;
787
+ }, {
788
+ action: "generate_task";
789
+ prompt?: string | null | undefined;
790
+ }>]>>;
791
+ process_refs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
792
+ artifact_refs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
793
+ approval_policy: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
794
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
795
+ latest_observation: z.ZodDefault<z.ZodNullable<z.ZodObject<{
796
+ status: z.ZodEnum<["pending", "satisfied", "stale", "failed", "expired"]>;
797
+ evidence: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
798
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
799
+ confidence: z.ZodDefault<z.ZodNumber>;
800
+ resume_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
801
+ }, "strip", z.ZodTypeAny, {
802
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
803
+ confidence: number;
804
+ evidence: Record<string, unknown>;
805
+ next_observe_at: string | null;
806
+ resume_hint: string | null;
807
+ }, {
808
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
809
+ confidence?: number | undefined;
810
+ evidence?: Record<string, unknown> | undefined;
811
+ next_observe_at?: string | null | undefined;
812
+ resume_hint?: string | null | undefined;
813
+ }>>>;
814
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
815
+ schema_version: z.ZodDefault<z.ZodLiteral<1>>;
816
+ wait_until: z.ZodString;
817
+ conditions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
818
+ type: z.ZodLiteral<"time_until">;
819
+ until: z.ZodString;
820
+ }, "strip", z.ZodTypeAny, {
821
+ type: "time_until";
822
+ until: string;
823
+ }, {
824
+ type: "time_until";
825
+ until: string;
826
+ }>, z.ZodObject<{
827
+ type: z.ZodLiteral<"file_exists">;
828
+ path: z.ZodString;
829
+ }, "strip", z.ZodTypeAny, {
830
+ path: string;
831
+ type: "file_exists";
832
+ }, {
833
+ path: string;
834
+ type: "file_exists";
835
+ }>, z.ZodObject<{
836
+ type: z.ZodLiteral<"file_mtime_changed">;
837
+ path: z.ZodString;
838
+ previous_mtime_ms: z.ZodNumber;
839
+ }, "strip", z.ZodTypeAny, {
840
+ path: string;
841
+ type: "file_mtime_changed";
842
+ previous_mtime_ms: number;
843
+ }, {
844
+ path: string;
845
+ type: "file_mtime_changed";
846
+ previous_mtime_ms: number;
847
+ }>, z.ZodObject<{
848
+ type: z.ZodLiteral<"process_session_exited">;
849
+ session_id: z.ZodString;
850
+ }, "strip", z.ZodTypeAny, {
851
+ type: "process_session_exited";
852
+ session_id: string;
853
+ }, {
854
+ type: "process_session_exited";
855
+ session_id: string;
856
+ }>, z.ZodObject<{
857
+ type: z.ZodLiteral<"artifact_json_value">;
858
+ path: z.ZodString;
859
+ json_pointer: z.ZodString;
860
+ expected: z.ZodUnknown;
861
+ }, "strip", z.ZodTypeAny, {
862
+ path: string;
863
+ type: "artifact_json_value";
864
+ json_pointer: string;
865
+ expected?: unknown;
866
+ }, {
867
+ path: string;
868
+ type: "artifact_json_value";
869
+ json_pointer: string;
870
+ expected?: unknown;
871
+ }>, z.ZodObject<{
872
+ type: z.ZodLiteral<"metric_threshold">;
873
+ metric: z.ZodString;
874
+ operator: z.ZodEnum<["lt", "lte", "eq", "gte", "gt"]>;
875
+ value: z.ZodNumber;
876
+ }, "strip", z.ZodTypeAny, {
877
+ value: number;
878
+ type: "metric_threshold";
879
+ metric: string;
880
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
881
+ }, {
882
+ value: number;
883
+ type: "metric_threshold";
884
+ metric: string;
885
+ operator: "lt" | "lte" | "eq" | "gte" | "gt";
886
+ }>]>, "many">>;
887
+ resume_plan: z.ZodDefault<z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
888
+ action: z.ZodLiteral<"continue_strategy">;
889
+ }, "strip", z.ZodTypeAny, {
890
+ action: "continue_strategy";
891
+ }, {
892
+ action: "continue_strategy";
893
+ }>, z.ZodObject<{
894
+ action: z.ZodLiteral<"activate_fallback">;
895
+ strategy_id: z.ZodString;
896
+ }, "strip", z.ZodTypeAny, {
897
+ strategy_id: string;
898
+ action: "activate_fallback";
899
+ }, {
900
+ strategy_id: string;
901
+ action: "activate_fallback";
902
+ }>, z.ZodObject<{
903
+ action: z.ZodLiteral<"request_approval">;
904
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
905
+ }, "strip", z.ZodTypeAny, {
906
+ reason: string | null;
907
+ action: "request_approval";
908
+ }, {
909
+ action: "request_approval";
910
+ reason?: string | null | undefined;
911
+ }>, z.ZodObject<{
912
+ action: z.ZodLiteral<"complete_wait">;
913
+ }, "strip", z.ZodTypeAny, {
914
+ action: "complete_wait";
915
+ }, {
916
+ action: "complete_wait";
917
+ }>, z.ZodObject<{
918
+ action: z.ZodLiteral<"generate_task">;
919
+ prompt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
920
+ }, "strip", z.ZodTypeAny, {
921
+ action: "generate_task";
922
+ prompt: string | null;
923
+ }, {
924
+ action: "generate_task";
925
+ prompt?: string | null | undefined;
926
+ }>]>>;
927
+ process_refs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
928
+ artifact_refs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
929
+ approval_policy: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
930
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
931
+ latest_observation: z.ZodDefault<z.ZodNullable<z.ZodObject<{
932
+ status: z.ZodEnum<["pending", "satisfied", "stale", "failed", "expired"]>;
933
+ evidence: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
934
+ next_observe_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
935
+ confidence: z.ZodDefault<z.ZodNumber>;
936
+ resume_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
937
+ }, "strip", z.ZodTypeAny, {
938
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
939
+ confidence: number;
940
+ evidence: Record<string, unknown>;
941
+ next_observe_at: string | null;
942
+ resume_hint: string | null;
943
+ }, {
944
+ status: "pending" | "satisfied" | "stale" | "failed" | "expired";
945
+ confidence?: number | undefined;
946
+ evidence?: Record<string, unknown> | undefined;
947
+ next_observe_at?: string | null | undefined;
948
+ resume_hint?: string | null | undefined;
949
+ }>>>;
950
+ }, z.ZodTypeAny, "passthrough">>;
951
+ export type WaitMetadata = z.infer<typeof WaitMetadataSchema>;
952
+ export declare const WaitExpiryOutcomeStatusSchema: z.ZodEnum<["not_due", "improved", "unchanged", "worsened", "unknown", "fallback_activated", "approval_required"]>;
953
+ export type WaitExpiryOutcomeStatus = z.infer<typeof WaitExpiryOutcomeStatusSchema>;
954
+ export interface WaitExpiryOutcome {
955
+ status: WaitExpiryOutcomeStatus;
956
+ goal_id: string;
957
+ strategy_id: string;
958
+ details?: string;
959
+ rebalance_trigger?: RebalanceTrigger;
960
+ }
961
+ export declare function waitConditionFromWaitUntil(waitUntil: string): WaitCondition;
962
+ export declare function buildDefaultWaitMetadata(waitStrategy: WaitStrategy): WaitMetadata;
963
+ export declare function normalizeWaitMetadata(waitStrategy: WaitStrategy, data: unknown): WaitMetadata;
964
+ export declare function resolveWaitNextObserveAt(waitStrategy: WaitStrategy, metadata: WaitMetadata): string | null;
334
965
  /**
335
966
  * Parse a strategy object, preserving WaitStrategy extension fields.
336
967
  * Uses duck-typing: if the object has wait_reason or wait_until fields,
@@ -349,6 +980,7 @@ export declare const PortfolioSchema: z.ZodObject<{
349
980
  primary_dimension: string;
350
981
  started_at: string | null;
351
982
  completed_at: string | null;
983
+ effectiveness_score: number | null;
352
984
  hypothesis: string;
353
985
  expected_effect: {
354
986
  dimension: string;
@@ -367,7 +999,6 @@ export declare const PortfolioSchema: z.ZodObject<{
367
999
  allocation: number;
368
1000
  gap_snapshot_at_start: number | null;
369
1001
  tasks_generated: string[];
370
- effectiveness_score: number | null;
371
1002
  consecutive_stall_count: number;
372
1003
  source_template_id: string | null;
373
1004
  cross_goal_context: string | null;
@@ -385,6 +1016,7 @@ export declare const PortfolioSchema: z.ZodObject<{
385
1016
  primary_dimension: string;
386
1017
  started_at: string | null;
387
1018
  completed_at: string | null;
1019
+ effectiveness_score: number | null;
388
1020
  hypothesis: string;
389
1021
  expected_effect: {
390
1022
  dimension: string;
@@ -403,7 +1035,6 @@ export declare const PortfolioSchema: z.ZodObject<{
403
1035
  allocation: number;
404
1036
  gap_snapshot_at_start: number | null;
405
1037
  tasks_generated: string[];
406
- effectiveness_score: number | null;
407
1038
  consecutive_stall_count: number;
408
1039
  source_template_id: string | null;
409
1040
  cross_goal_context: string | null;
@@ -439,6 +1070,7 @@ export declare const PortfolioSchema: z.ZodObject<{
439
1070
  primary_dimension: string;
440
1071
  started_at: string | null;
441
1072
  completed_at: string | null;
1073
+ effectiveness_score: number | null;
442
1074
  hypothesis: string;
443
1075
  expected_effect: {
444
1076
  dimension: string;
@@ -457,7 +1089,6 @@ export declare const PortfolioSchema: z.ZodObject<{
457
1089
  allocation: number;
458
1090
  gap_snapshot_at_start: number | null;
459
1091
  tasks_generated: string[];
460
- effectiveness_score: number | null;
461
1092
  consecutive_stall_count: number;
462
1093
  source_template_id: string | null;
463
1094
  cross_goal_context: string | null;
@@ -475,6 +1106,7 @@ export declare const PortfolioSchema: z.ZodObject<{
475
1106
  primary_dimension: string;
476
1107
  started_at: string | null;
477
1108
  completed_at: string | null;
1109
+ effectiveness_score: number | null;
478
1110
  hypothesis: string;
479
1111
  expected_effect: {
480
1112
  dimension: string;
@@ -493,7 +1125,6 @@ export declare const PortfolioSchema: z.ZodObject<{
493
1125
  allocation: number;
494
1126
  gap_snapshot_at_start: number | null;
495
1127
  tasks_generated: string[];
496
- effectiveness_score: number | null;
497
1128
  consecutive_stall_count: number;
498
1129
  source_template_id: string | null;
499
1130
  cross_goal_context: string | null;