deepstrike 0.2.72__tar.gz → 0.2.74__tar.gz

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 (267) hide show
  1. {deepstrike-0.2.72 → deepstrike-0.2.74}/Cargo.lock +6 -6
  2. {deepstrike-0.2.72 → deepstrike-0.2.74}/Cargo.toml +3 -3
  3. {deepstrike-0.2.72 → deepstrike-0.2.74}/PKG-INFO +11 -23
  4. {deepstrike-0.2.72 → deepstrike-0.2.74}/README.md +10 -22
  5. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/measurement.rs +1 -2
  6. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/workflow/run.rs +5 -6
  7. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/observation.rs +25 -0
  8. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/command.rs +56 -1
  9. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/config.rs +3 -8
  10. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/continuation.rs +18 -0
  11. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/effects.rs +0 -8
  12. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/events.rs +189 -0
  13. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/planning.rs +24 -0
  14. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/tests.rs +236 -1
  15. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver.rs +43 -3
  16. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/effect.rs +6 -67
  17. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/projection.rs +1 -11
  18. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/root.rs +12 -1
  19. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/session.rs +26 -0
  20. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/mod.rs +22 -0
  21. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/workflow.rs +4 -1
  22. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/__init__.py +15 -3
  23. deepstrike-0.2.74/deepstrike/agent.py +624 -0
  24. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/__init__.py +2 -1
  25. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/base.py +2 -3
  26. deepstrike-0.2.74/deepstrike/providers/fallback.py +52 -0
  27. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/model_registry.py +1 -7
  28. deepstrike-0.2.74/deepstrike/providers/protocols.py +18 -0
  29. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/__init__.py +3 -1
  30. deepstrike-0.2.74/deepstrike/runtime/agent_declaration.py +209 -0
  31. deepstrike-0.2.74/deepstrike/runtime/eval_dataset.py +81 -0
  32. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/facade.py +12 -0
  33. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/mcp_proxy_plane.py +29 -10
  34. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/replay_fixture.py +5 -1
  35. deepstrike-0.2.74/deepstrike/runtime/workflow_replay.py +52 -0
  36. {deepstrike-0.2.72 → deepstrike-0.2.74}/pyproject.toml +1 -1
  37. deepstrike-0.2.72/deepstrike/agent.py +0 -69
  38. deepstrike-0.2.72/deepstrike/agent_ir.py +0 -211
  39. {deepstrike-0.2.72 → deepstrike-0.2.74}/LICENSE +0 -0
  40. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/Cargo.toml +0 -0
  41. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/LICENSE +0 -0
  42. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/benches/kernel_baseline.rs +0 -0
  43. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/benches/verifiable_baseline.rs +0 -0
  44. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/benches/wait_index_baseline.rs +0 -0
  45. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/benchmark/mod.rs +0 -0
  46. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/bin/deepstrike.rs +0 -0
  47. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/bin/support/evidence_io.rs +0 -0
  48. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/compression.rs +0 -0
  49. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/config.rs +0 -0
  50. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/execution.rs +0 -0
  51. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/fault.rs +0 -0
  52. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/manager.rs +0 -0
  53. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/mod.rs +0 -0
  54. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/partitions.rs +0 -0
  55. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/policy.rs +0 -0
  56. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/pressure.rs +0 -0
  57. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/renderer.rs +0 -0
  58. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/renewal.rs +0 -0
  59. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/skill_catalog.rs +0 -0
  60. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/summarizer.rs +0 -0
  61. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/task_state.rs +0 -0
  62. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/text.rs +0 -0
  63. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/token_engine.rs +0 -0
  64. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/units.rs +0 -0
  65. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/utility.rs +0 -0
  66. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/evolution.rs +0 -0
  67. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/constraint.rs +0 -0
  68. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/mod.rs +0 -0
  69. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/permission.rs +0 -0
  70. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/pipeline.rs +0 -0
  71. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/quota.rs +0 -0
  72. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/rate_limit.rs +0 -0
  73. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/repeat_fuse.rs +0 -0
  74. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/veto.rs +0 -0
  75. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/harness/eval.rs +0 -0
  76. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/harness/mod.rs +0 -0
  77. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/lexical.rs +0 -0
  78. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/lib.rs +0 -0
  79. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/memory/curator.rs +0 -0
  80. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/memory/durable.rs +0 -0
  81. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/memory/mod.rs +0 -0
  82. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/handle.rs +0 -0
  83. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/memory.rs +0 -0
  84. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/mod.rs +0 -0
  85. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/value.rs +0 -0
  86. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/mod.rs +0 -0
  87. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/task_graph.rs +0 -0
  88. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/tournament.rs +0 -0
  89. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/workflow/mod.rs +0 -0
  90. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/proc/mod.rs +0 -0
  91. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/projection_pairs.rs +0 -0
  92. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/chain_validator/mod.rs +0 -0
  93. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/event_log.rs +0 -0
  94. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/binding.rs +0 -0
  95. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/checkpoint.rs +0 -0
  96. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/crash_point.rs +0 -0
  97. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/projection.rs +0 -0
  98. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/provider.rs +0 -0
  99. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/syscall.rs +0 -0
  100. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/envelope.rs +0 -0
  101. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/event.rs +0 -0
  102. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/fault.rs +0 -0
  103. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/record.rs +0 -0
  104. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/restore.rs +0 -0
  105. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/scalar.rs +0 -0
  106. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/syscall.rs +0 -0
  107. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/terminal.rs +0 -0
  108. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/tests.rs +0 -0
  109. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/transaction.rs +0 -0
  110. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire.rs +0 -0
  111. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel.rs +0 -0
  112. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/mod.rs +0 -0
  113. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/repair.rs +0 -0
  114. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/replay.rs +0 -0
  115. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/verifiable.rs +0 -0
  116. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/budget_grant.rs +0 -0
  117. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/cross_operation.rs +0 -0
  118. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/entropy.rs +0 -0
  119. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/mailbox.rs +0 -0
  120. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/milestone.rs +0 -0
  121. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/mod.rs +0 -0
  122. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/policy.rs +0 -0
  123. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/rollback.rs +0 -0
  124. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/runnable.rs +0 -0
  125. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/cancellation.rs +0 -0
  126. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/capability.rs +0 -0
  127. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/eviction.rs +0 -0
  128. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/gate.rs +0 -0
  129. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/milestone_exec.rs +0 -0
  130. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/process.rs +0 -0
  131. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/signal.rs +0 -0
  132. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/tests.rs +0 -0
  133. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/tcb.rs +0 -0
  134. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/wait_index.rs +0 -0
  135. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/attention.rs +0 -0
  136. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/mod.rs +0 -0
  137. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/queue.rs +0 -0
  138. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/router.rs +0 -0
  139. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/syscall/mod.rs +0 -0
  140. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/agent.rs +0 -0
  141. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/capability.rs +0 -0
  142. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/contract.rs +0 -0
  143. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/durable_content.rs +0 -0
  144. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/error.rs +0 -0
  145. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/message.rs +0 -0
  146. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/milestone.rs +0 -0
  147. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/mod.rs +0 -0
  148. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/policy.rs +0 -0
  149. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/result.rs +0 -0
  150. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/signal.rs +0 -0
  151. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/skill.rs +0 -0
  152. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/task.rs +0 -0
  153. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-py/Cargo.toml +0 -0
  154. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-py/LICENSE +0 -0
  155. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-py/src/lib.rs +0 -0
  156. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-tokenizer/Cargo.toml +0 -0
  157. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-tokenizer/LICENSE +0 -0
  158. {deepstrike-0.2.72 → deepstrike-0.2.74}/crates/deepstrike-tokenizer/src/lib.rs +0 -0
  159. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/collaboration/__init__.py +0 -0
  160. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/collaboration/contract.py +0 -0
  161. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/collaboration/handoff.py +0 -0
  162. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/collaboration/harness.py +0 -0
  163. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/collaboration/modes.py +0 -0
  164. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/collaboration/pool.py +0 -0
  165. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/governance.py +0 -0
  166. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/harness/__init__.py +0 -0
  167. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/harness/harness.py +0 -0
  168. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/harness/judge.py +0 -0
  169. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/kernel/__init__.py +0 -0
  170. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/kernel/canonical.py +0 -0
  171. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/knowledge/__init__.py +0 -0
  172. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/knowledge/source.py +0 -0
  173. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/__init__.py +0 -0
  174. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/agent.py +0 -0
  175. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/durable.py +0 -0
  176. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/extraction.py +0 -0
  177. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/in_memory_store.py +0 -0
  178. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/protocols.py +0 -0
  179. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/ranking.py +0 -0
  180. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/retention.py +0 -0
  181. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/memory/working.py +0 -0
  182. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/anthropic.py +0 -0
  183. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/anthropic_adapter.py +0 -0
  184. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/anthropic_compatible.py +0 -0
  185. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/capability_router.py +0 -0
  186. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/credentials.py +0 -0
  187. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/embedding.py +0 -0
  188. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/factories.py +0 -0
  189. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/gemini.py +0 -0
  190. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/gemini_adapter.py +0 -0
  191. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/model_catalog.py +0 -0
  192. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/ollama.py +0 -0
  193. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/ollama_adapter.py +0 -0
  194. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/openai.py +0 -0
  195. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/openai_chat_adapter.py +0 -0
  196. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/openai_responses.py +0 -0
  197. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/prepared_request.py +0 -0
  198. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/protocol_adapter.py +0 -0
  199. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/provider_error.py +0 -0
  200. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/qwen.py +0 -0
  201. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/replay.py +0 -0
  202. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/replay_validator.py +0 -0
  203. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/request_plan.py +0 -0
  204. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/runtime_registry.py +0 -0
  205. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/stop_reason.py +0 -0
  206. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/stream.py +0 -0
  207. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/usage.py +0 -0
  208. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/providers/vendor_profiles.py +0 -0
  209. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/archive.py +0 -0
  210. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/canonical_kernel_step.py +0 -0
  211. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/context.py +0 -0
  212. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/context_policy.py +0 -0
  213. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/credential_vault.py +0 -0
  214. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/durable_content.py +0 -0
  215. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/eval.py +0 -0
  216. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/event_stream.py +0 -0
  217. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/evolution.py +0 -0
  218. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/execution_evidence.py +0 -0
  219. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/execution_plane.py +0 -0
  220. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/filtered_plane.py +0 -0
  221. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/kernel_event_log.py +0 -0
  222. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/kernel_journal.py +0 -0
  223. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/kernel_step.py +0 -0
  224. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/loop_driver.py +0 -0
  225. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/os_profile.py +0 -0
  226. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/os_snapshot.py +0 -0
  227. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/output_schema.py +0 -0
  228. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/payload_store.py +0 -0
  229. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/process_sandbox_plane.py +0 -0
  230. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/provider_replay.py +0 -0
  231. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/reaction_checkpoint.py +0 -0
  232. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/reactive_session.py +0 -0
  233. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/reducers.py +0 -0
  234. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/reliability.py +0 -0
  235. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/remote_vpc_plane.py +0 -0
  236. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/replay_provider.py +0 -0
  237. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/replay_sanitize.py +0 -0
  238. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/run_group.py +0 -0
  239. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/runner.py +0 -0
  240. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/session_log.py +0 -0
  241. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/session_repair.py +0 -0
  242. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/sub_agent_orchestrator.py +0 -0
  243. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/turn_policy.py +0 -0
  244. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/verifiable_report.py +0 -0
  245. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/workflow_control_flow.py +0 -0
  246. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/workflow_store.py +0 -0
  247. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/runtime/worktree_plane.py +0 -0
  248. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/safety/__init__.py +0 -0
  249. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/safety/permissions.py +0 -0
  250. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/signals/__init__.py +0 -0
  251. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/signals/gateway.py +0 -0
  252. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/signals/scheduled.py +0 -0
  253. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/signals/types.py +0 -0
  254. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/skills/__init__.py +0 -0
  255. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/skills/loader.py +0 -0
  256. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/skills/registry.py +0 -0
  257. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/skills/watcher.py +0 -0
  258. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/tools/__init__.py +0 -0
  259. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/tools/builtin/__init__.py +0 -0
  260. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/tools/builtin/read_file.py +0 -0
  261. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/tools/errors.py +0 -0
  262. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/tools/execution.py +0 -0
  263. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/tools/registry.py +0 -0
  264. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/types/__init__.py +0 -0
  265. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/types/agent.py +0 -0
  266. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/types/content.py +0 -0
  267. {deepstrike-0.2.72 → deepstrike-0.2.74}/deepstrike/types/content_policy.py +0 -0
@@ -254,7 +254,7 @@ dependencies = [
254
254
 
255
255
  [[package]]
256
256
  name = "deepstrike-core"
257
- version = "0.2.72"
257
+ version = "0.2.74"
258
258
  dependencies = [
259
259
  "compact_str",
260
260
  "deepstrike-tokenizer",
@@ -268,7 +268,7 @@ dependencies = [
268
268
 
269
269
  [[package]]
270
270
  name = "deepstrike-node"
271
- version = "0.2.72"
271
+ version = "0.2.74"
272
272
  dependencies = [
273
273
  "compact_str",
274
274
  "deepstrike-core",
@@ -280,7 +280,7 @@ dependencies = [
280
280
 
281
281
  [[package]]
282
282
  name = "deepstrike-py"
283
- version = "0.2.72"
283
+ version = "0.2.74"
284
284
  dependencies = [
285
285
  "compact_str",
286
286
  "deepstrike-core",
@@ -291,7 +291,7 @@ dependencies = [
291
291
 
292
292
  [[package]]
293
293
  name = "deepstrike-sdk"
294
- version = "0.2.72"
294
+ version = "0.2.74"
295
295
  dependencies = [
296
296
  "async-stream",
297
297
  "async-trait",
@@ -327,7 +327,7 @@ dependencies = [
327
327
 
328
328
  [[package]]
329
329
  name = "deepstrike-tokenizer"
330
- version = "0.2.72"
330
+ version = "0.2.74"
331
331
  dependencies = [
332
332
  "pretty_assertions",
333
333
  "tiktoken-rs",
@@ -335,7 +335,7 @@ dependencies = [
335
335
 
336
336
  [[package]]
337
337
  name = "deepstrike-wasm"
338
- version = "0.2.72"
338
+ version = "0.2.74"
339
339
  dependencies = [
340
340
  "compact_str",
341
341
  "deepstrike-core",
@@ -3,13 +3,13 @@ resolver = "2"
3
3
  members = ["crates/deepstrike-core", "crates/deepstrike-tokenizer", "crates/deepstrike-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.2.72"
6
+ version = "0.2.74"
7
7
  edition = "2024"
8
8
  repository = "https://github.com/kongusen/deepstrike"
9
9
 
10
10
  [workspace.dependencies]
11
- deepstrike-core = { path = "crates/deepstrike-core", version = "0.2.72" }
12
- deepstrike-tokenizer = { path = "crates/deepstrike-tokenizer", version = "0.2.72" }
11
+ deepstrike-core = { path = "crates/deepstrike-core", version = "0.2.74" }
12
+ deepstrike-tokenizer = { path = "crates/deepstrike-tokenizer", version = "0.2.74" }
13
13
  notify = "6"
14
14
  serde = { version = "1", features = ["derive"] }
15
15
  serde_json = "1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepstrike
3
- Version: 0.2.72
3
+ Version: 0.2.74
4
4
  Requires-Dist: httpx>=0.27
5
5
  Requires-Dist: pyyaml>=6.0
6
6
  Requires-Dist: anyio>=4.0
@@ -42,40 +42,28 @@ maturin develop --manifest-path crates/deepstrike-py/Cargo.toml
42
42
 
43
43
  ```python
44
44
  import asyncio
45
- from deepstrike import (
46
- FileSessionLog,
47
- InMemorySessionLog,
48
- LocalExecutionPlane,
49
- OpenAIProvider,
50
- RuntimeOptions,
51
- RuntimeRunner,
52
- collect_text,
53
- tool,
54
- )
45
+ from deepstrike import OpenAIProvider, create_agent, tool
55
46
 
56
47
  @tool
57
48
  async def add(x: int, y: int) -> str:
58
49
  """Add two numbers."""
59
50
  return str(x + y)
60
51
 
61
- plane = LocalExecutionPlane().register(add)
62
- runner = RuntimeRunner(RuntimeOptions(
63
- provider=OpenAIProvider(api_key="sk-...", model="gpt-5-mini"),
64
- session_log=FileSessionLog(".deepstrike/sessions"),
65
- execution_plane=plane,
66
- max_tokens=4096,
67
- ))
52
+ agent = create_agent(
53
+ "math",
54
+ model="openai/gpt-5-mini",
55
+ runtime_binding={"provider": OpenAIProvider(api_key="sk-...", model="gpt-5-mini")},
56
+ tools=[add],
57
+ )
68
58
 
69
- asyncio.run(collect_text(runner.run(
70
- session_id="math-1",
71
- goal="What is 17 + 28?",
72
- )))
59
+ result = asyncio.run(agent.run("What is 17 + 28?", session_id="math-1"))
60
+ print(result["output"])
73
61
  # => "45"
74
62
  ```
75
63
 
76
64
  ### Recipes — the canonical entry points
77
65
 
78
- Most apps need one of two shapes. Start with the facades; drop to `RuntimeRunner` for streaming, tools, signals, memory, or governance.
66
+ Most apps start with `Agent`; use `RuntimeRunner` from the runtime submodule only for custom host control.
79
67
 
80
68
  ```python
81
69
  from deepstrike import run_agent, run_fanout
@@ -28,40 +28,28 @@ maturin develop --manifest-path crates/deepstrike-py/Cargo.toml
28
28
 
29
29
  ```python
30
30
  import asyncio
31
- from deepstrike import (
32
- FileSessionLog,
33
- InMemorySessionLog,
34
- LocalExecutionPlane,
35
- OpenAIProvider,
36
- RuntimeOptions,
37
- RuntimeRunner,
38
- collect_text,
39
- tool,
40
- )
31
+ from deepstrike import OpenAIProvider, create_agent, tool
41
32
 
42
33
  @tool
43
34
  async def add(x: int, y: int) -> str:
44
35
  """Add two numbers."""
45
36
  return str(x + y)
46
37
 
47
- plane = LocalExecutionPlane().register(add)
48
- runner = RuntimeRunner(RuntimeOptions(
49
- provider=OpenAIProvider(api_key="sk-...", model="gpt-5-mini"),
50
- session_log=FileSessionLog(".deepstrike/sessions"),
51
- execution_plane=plane,
52
- max_tokens=4096,
53
- ))
38
+ agent = create_agent(
39
+ "math",
40
+ model="openai/gpt-5-mini",
41
+ runtime_binding={"provider": OpenAIProvider(api_key="sk-...", model="gpt-5-mini")},
42
+ tools=[add],
43
+ )
54
44
 
55
- asyncio.run(collect_text(runner.run(
56
- session_id="math-1",
57
- goal="What is 17 + 28?",
58
- )))
45
+ result = asyncio.run(agent.run("What is 17 + 28?", session_id="math-1"))
46
+ print(result["output"])
59
47
  # => "45"
60
48
  ```
61
49
 
62
50
  ### Recipes — the canonical entry points
63
51
 
64
- Most apps need one of two shapes. Start with the facades; drop to `RuntimeRunner` for streaming, tools, signals, memory, or governance.
52
+ Most apps start with `Agent`; use `RuntimeRunner` from the runtime submodule only for custom host control.
65
53
 
66
54
  ```python
67
55
  from deepstrike import run_agent, run_fanout
@@ -2,8 +2,7 @@
2
2
  //! ("measure provider-visible input, never underestimate") requires between what a request is
3
3
  //! *estimated* to cost before it is sent (`PromptMeasurement`, this module), what the provider
4
4
  //! actually reports back (`ProviderUsage`, Node/Python Host layer — not this crate). This module
5
- //! only defines a preflight fact. The `MeasurePrompt` wire tag is reserved, but A-00R removed its
6
- //! scheduler producer until request fingerprinting and durable replay semantics are defined.
5
+ //! only defines a host-side preflight fact for provider-visible request preparation.
7
6
 
8
7
  use serde::{Deserialize, Serialize};
9
8
 
@@ -320,6 +320,11 @@ impl WorkflowRun {
320
320
  self.graph.ready_tasks()
321
321
  }
322
322
 
323
+ /// Whether every workflow node has reached a terminal state.
324
+ pub fn is_complete(&self) -> bool {
325
+ self.graph.all_done()
326
+ }
327
+
323
328
  pub fn set_scheduler_policy(
324
329
  &mut self,
325
330
  policy: crate::scheduler::policy::SchedulerPolicyConfig,
@@ -1002,12 +1007,6 @@ impl WorkflowRun {
1002
1007
  })
1003
1008
  }
1004
1009
 
1005
- /// Test instrument: every node reached one of the four terminal statuses.
1006
- #[cfg(test)]
1007
- pub(crate) fn is_complete(&self) -> bool {
1008
- self.graph.all_done()
1009
- }
1010
-
1011
1010
  /// Close a workflow and return exactly one typed terminal outcome per graph node.
1012
1011
  pub fn finish(&mut self) -> Vec<WorkflowNodeOutcome> {
1013
1012
  for node in 0..self.graph.len() {
@@ -236,6 +236,31 @@ pub enum KernelObservation {
236
236
  #[serde(default, skip_serializing_if = "Option::is_none")]
237
237
  submitter: Option<String>,
238
238
  },
239
+ /// The host's dynamic plan was accepted and bound to this kernel workflow transition. The
240
+ /// canonical DAG remains authoritative for scheduling; this fact preserves replay identity,
241
+ /// dependencies and the host's replay disposition in the journal.
242
+ DynamicWorkflowPlanCommitted {
243
+ turn: u32,
244
+ run_id: String,
245
+ sequence: u32,
246
+ node_ids: Vec<String>,
247
+ dependencies: Vec<Vec<String>>,
248
+ prompt_fingerprints: Vec<String>,
249
+ replay: Vec<String>,
250
+ },
251
+ /// A dynamic invocation replay decision observed by the kernel.
252
+ DynamicWorkflowReplayRecorded {
253
+ turn: u32,
254
+ run_id: String,
255
+ sequence: u32,
256
+ node_id: String,
257
+ prompt_fingerprint: String,
258
+ status: String,
259
+ replay: String,
260
+ result_digest: String,
261
+ #[serde(default, skip_serializing_if = "Option::is_none")]
262
+ termination: Option<String>,
263
+ },
239
264
  /// A runtime node batch was rejected before any graph mutation.
240
265
  NodesRejected {
241
266
  turn: u32,
@@ -2,7 +2,7 @@
2
2
 
3
3
  use serde::{Deserialize, Serialize};
4
4
 
5
- use super::root::{CapabilityGrant, CapabilityRef, KnowledgeEntry};
5
+ use super::root::{CapabilityGrant, CapabilityRef, KnowledgeEntry, WorkflowNode};
6
6
  use super::scalar::{CallId, WireU64};
7
7
 
8
8
  /// Live commands a host may issue against a running operation.
@@ -22,6 +22,15 @@ pub enum HostCommand {
22
22
  Cancel(CancelCommand),
23
23
  ForceCompact(ForceCompactCommand),
24
24
  UpdateTask(UpdateTaskCommand),
25
+ /// Dynamic workflow controller growth. The host remains the author of the request, while the
26
+ /// kernel still owns DAG validation, quota gating, trust coercion, scheduling, and durable
27
+ /// spawn facts. This is intentionally separate from the model-facing append syscall: it has
28
+ /// host authority and no caller-supplied agent identity.
29
+ AppendWorkflowNodes(AppendWorkflowNodesCommand),
30
+ /// A host replay decision recorded in the canonical journal alongside workflow facts.
31
+ RecordDynamicWorkflowReplay(DynamicWorkflowReplayCommand),
32
+ /// Close a host-driven dynamic workflow after its script and all submitted batches settle.
33
+ CompleteDynamicWorkflow(CompleteDynamicWorkflowCommand),
25
34
  ApplyCapabilityPatch(ApplyCapabilityPatchCommand),
26
35
  ApplyKnowledgeMutation(ApplyKnowledgeMutationCommand),
27
36
  /// DEC-9: the host seeding entries into the knowledge partition. Named apart from the P1
@@ -67,6 +76,52 @@ pub struct UpdateTaskCommand {
67
76
  pub update: TaskUpdate,
68
77
  }
69
78
 
79
+ #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
80
+ #[serde(deny_unknown_fields)]
81
+ pub struct AppendWorkflowNodesCommand {
82
+ pub nodes: Vec<WorkflowNode>,
83
+ /// Host-generated plan metadata. The kernel records it, but scheduling remains driven by the
84
+ /// canonical DAG built from `nodes`.
85
+ #[serde(default, skip_serializing_if = "Option::is_none")]
86
+ pub plan: Option<DynamicWorkflowPlan>,
87
+ }
88
+
89
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
90
+ #[serde(deny_unknown_fields)]
91
+ pub struct DynamicWorkflowPlan {
92
+ pub run_id: String,
93
+ pub sequence: u32,
94
+ pub nodes: Vec<DynamicWorkflowPlanNode>,
95
+ }
96
+
97
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
98
+ #[serde(deny_unknown_fields)]
99
+ pub struct DynamicWorkflowPlanNode {
100
+ pub node_id: String,
101
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
102
+ pub depends_on: Vec<String>,
103
+ pub prompt_fingerprint: String,
104
+ pub replay: String,
105
+ }
106
+
107
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
108
+ #[serde(deny_unknown_fields)]
109
+ pub struct DynamicWorkflowReplayCommand {
110
+ pub run_id: String,
111
+ pub sequence: u32,
112
+ pub node_id: String,
113
+ pub prompt_fingerprint: String,
114
+ pub status: String,
115
+ pub replay: String,
116
+ pub result_digest: String,
117
+ #[serde(default, skip_serializing_if = "Option::is_none")]
118
+ pub termination: Option<String>,
119
+ }
120
+
121
+ #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
122
+ #[serde(deny_unknown_fields)]
123
+ pub struct CompleteDynamicWorkflowCommand {}
124
+
70
125
  /// A partial edit of the task state. Every field is optional; absent ⇒ unchanged.
71
126
  #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
72
127
  #[serde(deny_unknown_fields)]
@@ -2557,7 +2557,7 @@ mod tests {
2557
2557
  serde_json::from_value::<HostEffectSupport>(json!({ "supported": ["load_payload"] }))
2558
2558
  .is_ok()
2559
2559
  );
2560
- assert_eq!(EffectKindTag::ALL.len(), 11);
2560
+ assert_eq!(EffectKindTag::ALL.len(), 10);
2561
2561
  }
2562
2562
 
2563
2563
  // -----------------------------------------------------------------------------------------
@@ -2926,17 +2926,12 @@ mod tests {
2926
2926
  // required kind from the
2927
2927
  // support declaration must be refused — and the rejection must name the kind, because a
2928
2928
  // host reading it has to know which declaration to fix. Iterating `ALL` also means a new
2929
- // effect kind cannot be added without deciding what switches it on. `MeasurePrompt` is a
2930
- // reserved wire shape with no scheduler producer after SPC-013 A-00R, so it deliberately
2931
- // imposes no host-support requirement.
2929
+ // effect kind cannot be added without deciding what switches it on.
2932
2930
  let full = fully_populated_config();
2933
2931
  full.resolve(&defaults())
2934
2932
  .expect("declaring every kind satisfies every trigger");
2935
2933
 
2936
- for dropped in EffectKindTag::ALL
2937
- .into_iter()
2938
- .filter(|kind| *kind != EffectKindTag::MeasurePrompt)
2939
- {
2934
+ for dropped in EffectKindTag::ALL {
2940
2935
  let mut config = full.clone();
2941
2936
  config.host_effect_support = HostEffectSupport::new(
2942
2937
  EffectKindTag::ALL
@@ -412,6 +412,24 @@ impl CanonicalOperationDriver {
412
412
  if let Some(output_schema) = &info.output_schema {
413
413
  metadata.insert("output_schema".to_string(), output_schema.clone());
414
414
  }
415
+ if let Some(token_budget) = info.token_budget {
416
+ metadata.insert(
417
+ "token_budget".to_string(),
418
+ serde_json::Value::Number(token_budget.into()),
419
+ );
420
+ }
421
+ if let Some(max_turns) = info.max_turns {
422
+ metadata.insert(
423
+ "max_turns".to_string(),
424
+ serde_json::Value::Number(max_turns.into()),
425
+ );
426
+ }
427
+ if let Some(max_wall_ms) = info.max_wall_ms {
428
+ metadata.insert(
429
+ "max_wall_ms".to_string(),
430
+ serde_json::Value::Number(max_wall_ms.into()),
431
+ );
432
+ }
415
433
  if !info.input_agent_ids.is_empty() {
416
434
  metadata.insert(
417
435
  "input_agent_ids".to_string(),
@@ -220,10 +220,6 @@ impl CanonicalOperationDriver {
220
220
  EffectSuccess::PayloadLoaded(loaded) => {
221
221
  self.commit_payload_load(context, effect_id, loaded)
222
222
  }
223
- EffectSuccess::PromptMeasured(_) => Err(KernelFault::new(
224
- KernelFaultCode::UnexpectedEffectOutcome,
225
- "prompt measurement outcomes are reserved but adaptive measurement has no scheduler producer",
226
- )),
227
223
  }
228
224
  }
229
225
 
@@ -462,10 +458,6 @@ impl CanonicalOperationDriver {
462
458
  step.focus = self.focus.clone();
463
459
  Ok(step)
464
460
  }
465
- EffectKindTag::MeasurePrompt => Err(KernelFault::new(
466
- KernelFaultCode::UnexpectedEffectOutcome,
467
- "prompt measurement failures are reserved but adaptive measurement has no scheduler producer",
468
- )),
469
461
  }
470
462
  }
471
463
 
@@ -404,6 +404,15 @@ impl CanonicalOperationDriver {
404
404
  self.continue_after(context, LoopAction::AwaitingResume, root_kind)
405
405
  }
406
406
  HostCommand::UpdateTask(update) => self.plan_host_task_update(update),
407
+ HostCommand::AppendWorkflowNodes(append) => {
408
+ self.plan_dynamic_workflow_append(context, append)
409
+ }
410
+ HostCommand::RecordDynamicWorkflowReplay(fact) => {
411
+ self.plan_dynamic_workflow_replay(context, fact)
412
+ }
413
+ HostCommand::CompleteDynamicWorkflow(_) => {
414
+ self.plan_dynamic_workflow_complete(context)
415
+ }
407
416
  HostCommand::ApplyCapabilityPatch(patch) => self.plan_capability_patch(patch),
408
417
  HostCommand::ApplyKnowledgeMutation(mutation) => self.plan_knowledge_mutation(mutation),
409
418
  HostCommand::SeedKnowledge(seed) => self.plan_seed_knowledge(seed),
@@ -413,6 +422,186 @@ impl CanonicalOperationDriver {
413
422
  }
414
423
  }
415
424
 
425
+ /// Grow a root dynamic workflow from the host controller while keeping the same kernel-owned
426
+ /// DAG, quota ledger, trust coercion, and spawn queue as model-authored workflow growth. The
427
+ /// host command is only admitted for an active root workflow; it cannot bootstrap or stack a
428
+ /// second operation.
429
+ pub(super) fn plan_dynamic_workflow_append(
430
+ &mut self,
431
+ context: &PlanContext<'_>,
432
+ append: &AppendWorkflowNodesCommand,
433
+ ) -> Result<PlannedStep, KernelFault> {
434
+ if append.nodes.is_empty() {
435
+ return Err(KernelFault::new(
436
+ KernelFaultCode::InvalidConfig,
437
+ "a dynamic workflow append must contain at least one node",
438
+ ));
439
+ }
440
+ if self.root_kind != Some(RootKind::Workflow)
441
+ || !self.engine().is_some_and(LoopStateMachine::workflow_active)
442
+ {
443
+ return Err(KernelFault::new(
444
+ KernelFaultCode::InvalidAuthority,
445
+ "dynamic workflow nodes may only be appended to an active root workflow",
446
+ ));
447
+ }
448
+ for node in &append.nodes {
449
+ self.require_known_contract(context.config, node.run_spec.as_ref())?;
450
+ }
451
+ if let Some(plan) = &append.plan {
452
+ if plan.run_id.is_empty() || plan.nodes.len() != append.nodes.len() {
453
+ return Err(KernelFault::new(
454
+ KernelFaultCode::InvalidConfig,
455
+ "dynamic workflow plan must name a run and one entry per appended node",
456
+ ));
457
+ }
458
+ if plan.nodes.iter().any(|node| node.replay != "executed") {
459
+ return Err(KernelFault::new(
460
+ KernelFaultCode::InvalidConfig,
461
+ "dynamic workflow append plans may only describe executed nodes",
462
+ ));
463
+ }
464
+ for planned in &plan.nodes {
465
+ if planned.node_id.is_empty() || planned.prompt_fingerprint.is_empty() {
466
+ return Err(KernelFault::new(
467
+ KernelFaultCode::InvalidConfig,
468
+ "dynamic workflow plan nodes require an identity and prompt fingerprint",
469
+ ));
470
+ }
471
+ if planned
472
+ .depends_on
473
+ .iter()
474
+ .any(|dependency| dependency == &planned.node_id)
475
+ {
476
+ return Err(KernelFault::new(
477
+ KernelFaultCode::InvalidConfig,
478
+ format!("dynamic workflow plan node {:?} cannot depend on itself", planned.node_id),
479
+ ));
480
+ }
481
+ }
482
+ }
483
+ let wire_spec = WireSpec {
484
+ name: String::new(),
485
+ nodes: append.nodes.clone(),
486
+ };
487
+ let core_spec = build_core_spec(&wire_spec)?;
488
+ let node_ids = wire_node_ids(&wire_spec);
489
+ // A host append is the explicit append operation, even though the underlying DAG is the
490
+ // same one used by model-authored workflow growth. Keeping the `SubmitNodes` gate and
491
+ // `submit_workflow_nodes` label here preserves the kernel→host action contract: a quota
492
+ // denial must come back as a dynamic append rejection, not as a fresh workflow start.
493
+ let action = self
494
+ .engine_mut()?
495
+ .submit_workflow_nodes(core_spec.nodes, None);
496
+ let appended = self.engine().is_some_and(|engine| {
497
+ engine.observations.iter().any(|observation| {
498
+ matches!(
499
+ observation,
500
+ KernelObservation::WorkflowNodesSubmitted { .. }
501
+ )
502
+ })
503
+ });
504
+ if appended {
505
+ self.node_ids.extend(node_ids);
506
+ self.workflow_nodes.extend(append.nodes.clone());
507
+ if let Some(plan) = &append.plan {
508
+ let engine = self.engine_mut()?;
509
+ engine
510
+ .observations
511
+ .push(KernelObservation::DynamicWorkflowPlanCommitted {
512
+ turn: engine.turn,
513
+ run_id: plan.run_id.clone(),
514
+ sequence: plan.sequence,
515
+ node_ids: plan.nodes.iter().map(|node| node.node_id.clone()).collect(),
516
+ dependencies: plan
517
+ .nodes
518
+ .iter()
519
+ .map(|node| node.depends_on.clone())
520
+ .collect(),
521
+ prompt_fingerprints: plan
522
+ .nodes
523
+ .iter()
524
+ .map(|node| node.prompt_fingerprint.clone())
525
+ .collect(),
526
+ replay: plan.nodes.iter().map(|node| node.replay.clone()).collect(),
527
+ });
528
+ }
529
+ }
530
+ self.continue_after(context, action, RootKind::Workflow)
531
+ }
532
+
533
+ pub(super) fn plan_dynamic_workflow_replay(
534
+ &mut self,
535
+ _context: &PlanContext<'_>,
536
+ fact: &DynamicWorkflowReplayCommand,
537
+ ) -> Result<PlannedStep, KernelFault> {
538
+ if fact.run_id.is_empty()
539
+ || fact.node_id.is_empty()
540
+ || fact.prompt_fingerprint.is_empty()
541
+ || fact.result_digest.is_empty()
542
+ {
543
+ return Err(KernelFault::new(
544
+ KernelFaultCode::InvalidConfig,
545
+ "dynamic workflow replay facts require run_id, node_id, prompt_fingerprint and result_digest",
546
+ ));
547
+ }
548
+ if !matches!(fact.replay.as_str(), "executed" | "reused") {
549
+ return Err(KernelFault::new(
550
+ KernelFaultCode::InvalidConfig,
551
+ "dynamic workflow replay must be executed or reused",
552
+ ));
553
+ }
554
+ if !matches!(
555
+ fact.status.as_str(),
556
+ "completed" | "completed_partial" | "failed" | "skipped_upstream_failed" | "cancelled"
557
+ ) {
558
+ return Err(KernelFault::new(
559
+ KernelFaultCode::InvalidConfig,
560
+ "dynamic workflow replay fact has an unsupported status",
561
+ ));
562
+ }
563
+ if self.root_kind != Some(RootKind::Workflow)
564
+ || !self.engine().is_some_and(LoopStateMachine::workflow_active)
565
+ {
566
+ return Err(KernelFault::new(
567
+ KernelFaultCode::InvalidAuthority,
568
+ "dynamic workflow replay facts require a live workflow operation",
569
+ ));
570
+ }
571
+ let engine = self.engine_mut()?;
572
+ engine
573
+ .observations
574
+ .push(KernelObservation::DynamicWorkflowReplayRecorded {
575
+ turn: engine.turn,
576
+ run_id: fact.run_id.clone(),
577
+ sequence: fact.sequence,
578
+ node_id: fact.node_id.clone(),
579
+ prompt_fingerprint: fact.prompt_fingerprint.clone(),
580
+ status: fact.status.clone(),
581
+ replay: fact.replay.clone(),
582
+ result_digest: fact.result_digest.clone(),
583
+ termination: fact.termination.clone(),
584
+ });
585
+ Ok(self.quiet_step())
586
+ }
587
+
588
+ pub(super) fn plan_dynamic_workflow_complete(
589
+ &mut self,
590
+ context: &PlanContext<'_>,
591
+ ) -> Result<PlannedStep, KernelFault> {
592
+ if self.root_kind != Some(RootKind::Workflow)
593
+ || !self.engine().is_some_and(LoopStateMachine::workflow_active)
594
+ || !self.engine().is_some_and(LoopStateMachine::is_dynamic_workflow_open)
595
+ {
596
+ return Err(KernelFault::new(
597
+ KernelFaultCode::InvalidAuthority,
598
+ "dynamic workflow close requires an active host-driven dynamic root",
599
+ ));
600
+ }
601
+ let action = self.engine_mut()?.close_dynamic_workflow();
602
+ self.continue_after(context, action, RootKind::Workflow)
603
+ }
604
+
416
605
  /// §11.1 · the cancellation ladder, and the only path an operation is cancelled through.
417
606
  ///
418
607
  /// The order is downstream-first and it happens **inside one transition**, because §7.12 admits
@@ -395,6 +395,30 @@ impl CanonicalOperationDriver {
395
395
  disposition,
396
396
  })
397
397
  }
398
+ RootEntry::DynamicWorkflow(_) => {
399
+ // A dynamic root intentionally publishes no first spawn effect. The host script
400
+ // supplies its first batch through `AppendWorkflowNodes`; the explicit open bit
401
+ // prevents the empty DAG from self-terminating in the state machine.
402
+ let workflow_id = mint_workflow_id(&context.input.operation_id, context.step_seq);
403
+ let engine = self.engine_mut()?;
404
+ seed_initial_context(engine, initial);
405
+ engine.set_root_workflow(true);
406
+ engine.set_dynamic_workflow_open(true);
407
+ let action = engine.load_workflow_as(
408
+ crate::orchestration::workflow::WorkflowSpec::default(),
409
+ ROOT_TASK_ID,
410
+ );
411
+ debug_assert!(matches!(action, LoopAction::AwaitingResume));
412
+ self.node_ids.clear();
413
+ self.workflow_nodes.clear();
414
+ self.workflow_id = Some(workflow_id.clone());
415
+ Ok(PlannedStep {
416
+ root_kind: Some(RootKind::Workflow),
417
+ focus: Some(ExecutionFocus::workflow_controller(workflow_id, None)),
418
+ observations: Vec::new(),
419
+ disposition: self.quiet_step().disposition,
420
+ })
421
+ }
398
422
  }
399
423
  }
400
424
  }