deepstrike 0.2.73__tar.gz → 0.2.75__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 (270) hide show
  1. {deepstrike-0.2.73 → deepstrike-0.2.75}/Cargo.lock +7 -6
  2. {deepstrike-0.2.73 → deepstrike-0.2.75}/Cargo.toml +3 -3
  3. {deepstrike-0.2.73 → deepstrike-0.2.75}/PKG-INFO +1 -1
  4. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/manager.rs +11 -0
  5. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/partitions.rs +23 -0
  6. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/pipeline.rs +21 -0
  7. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/mm/memory.rs +107 -0
  8. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/orchestration/workflow/run.rs +5 -6
  9. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/chain_validator/mod.rs +3 -0
  10. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/observation.rs +33 -0
  11. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/command.rs +80 -1
  12. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/config.rs +57 -8
  13. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/crash_point.rs +2 -0
  14. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/continuation.rs +18 -0
  15. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/effects.rs +33 -0
  16. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/events.rs +228 -0
  17. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/planning.rs +24 -0
  18. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/syscall.rs +71 -27
  19. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/tests.rs +796 -1
  20. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver.rs +97 -15
  21. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/effect.rs +15 -0
  22. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/event.rs +4 -0
  23. deepstrike-0.2.75/crates/deepstrike-core/src/runtime/kernel/wire/memory_authority.rs +174 -0
  24. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/projection.rs +2 -2
  25. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/root.rs +19 -1
  26. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/scalar.rs +5 -0
  27. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire.rs +1 -0
  28. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/session.rs +26 -0
  29. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/mod.rs +91 -0
  30. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/workflow.rs +4 -1
  31. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-py/src/lib.rs +9 -0
  32. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/__init__.py +16 -3
  33. deepstrike-0.2.75/deepstrike/agent.py +624 -0
  34. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/governance.py +26 -38
  35. deepstrike-0.2.75/deepstrike/memory/authority.py +62 -0
  36. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/__init__.py +2 -1
  37. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/anthropic_adapter.py +4 -2
  38. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/base.py +7 -5
  39. deepstrike-0.2.75/deepstrike/providers/fallback.py +52 -0
  40. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/openai.py +7 -4
  41. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/openai_chat_adapter.py +3 -1
  42. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/openai_responses.py +3 -1
  43. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/qwen.py +5 -4
  44. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/stream.py +3 -0
  45. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/__init__.py +3 -1
  46. deepstrike-0.2.75/deepstrike/runtime/agent_declaration.py +209 -0
  47. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/canonical_kernel_step.py +341 -93
  48. deepstrike-0.2.75/deepstrike/runtime/eval_dataset.py +81 -0
  49. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/execution_plane.py +7 -1
  50. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/facade.py +12 -0
  51. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/kernel_journal.py +23 -1
  52. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/kernel_step.py +6 -3
  53. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/mcp_proxy_plane.py +33 -11
  54. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/remote_vpc_plane.py +4 -1
  55. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/replay_fixture.py +5 -1
  56. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/replay_provider.py +8 -1
  57. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/runner.py +468 -298
  58. deepstrike-0.2.75/deepstrike/runtime/tool_arguments.py +66 -0
  59. deepstrike-0.2.75/deepstrike/runtime/workflow_replay.py +52 -0
  60. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/types/agent.py +10 -56
  61. {deepstrike-0.2.73 → deepstrike-0.2.75}/pyproject.toml +1 -1
  62. deepstrike-0.2.73/deepstrike/agent.py +0 -125
  63. deepstrike-0.2.73/deepstrike/agent_ir.py +0 -211
  64. {deepstrike-0.2.73 → deepstrike-0.2.75}/LICENSE +0 -0
  65. {deepstrike-0.2.73 → deepstrike-0.2.75}/README.md +0 -0
  66. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/Cargo.toml +0 -0
  67. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/LICENSE +0 -0
  68. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/benches/kernel_baseline.rs +0 -0
  69. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/benches/verifiable_baseline.rs +0 -0
  70. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/benches/wait_index_baseline.rs +0 -0
  71. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/benchmark/mod.rs +0 -0
  72. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/bin/deepstrike.rs +0 -0
  73. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/bin/support/evidence_io.rs +0 -0
  74. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/compression.rs +0 -0
  75. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/config.rs +0 -0
  76. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/execution.rs +0 -0
  77. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/fault.rs +0 -0
  78. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/measurement.rs +0 -0
  79. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/mod.rs +0 -0
  80. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/policy.rs +0 -0
  81. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/pressure.rs +0 -0
  82. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/renderer.rs +0 -0
  83. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/renewal.rs +0 -0
  84. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/skill_catalog.rs +0 -0
  85. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/summarizer.rs +0 -0
  86. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/task_state.rs +0 -0
  87. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/text.rs +0 -0
  88. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/token_engine.rs +0 -0
  89. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/units.rs +0 -0
  90. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/context/utility.rs +0 -0
  91. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/evolution.rs +0 -0
  92. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/constraint.rs +0 -0
  93. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/mod.rs +0 -0
  94. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/permission.rs +0 -0
  95. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/quota.rs +0 -0
  96. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/rate_limit.rs +0 -0
  97. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/repeat_fuse.rs +0 -0
  98. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/governance/veto.rs +0 -0
  99. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/harness/eval.rs +0 -0
  100. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/harness/mod.rs +0 -0
  101. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/lexical.rs +0 -0
  102. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/lib.rs +0 -0
  103. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/memory/curator.rs +0 -0
  104. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/memory/durable.rs +0 -0
  105. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/memory/mod.rs +0 -0
  106. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/mm/handle.rs +0 -0
  107. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/mm/mod.rs +0 -0
  108. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/mm/value.rs +0 -0
  109. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/orchestration/mod.rs +0 -0
  110. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/orchestration/task_graph.rs +0 -0
  111. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/orchestration/tournament.rs +0 -0
  112. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/orchestration/workflow/mod.rs +0 -0
  113. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/proc/mod.rs +0 -0
  114. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/projection_pairs.rs +0 -0
  115. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/event_log.rs +0 -0
  116. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/binding.rs +0 -0
  117. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/checkpoint.rs +0 -0
  118. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/projection.rs +0 -0
  119. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/driver/provider.rs +0 -0
  120. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/envelope.rs +0 -0
  121. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/fault.rs +0 -0
  122. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/record.rs +0 -0
  123. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/restore.rs +0 -0
  124. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/syscall.rs +0 -0
  125. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/terminal.rs +0 -0
  126. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/tests.rs +0 -0
  127. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel/wire/transaction.rs +0 -0
  128. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/kernel.rs +0 -0
  129. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/mod.rs +0 -0
  130. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/repair.rs +0 -0
  131. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/replay.rs +0 -0
  132. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/runtime/verifiable.rs +0 -0
  133. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/budget_grant.rs +0 -0
  134. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/cross_operation.rs +0 -0
  135. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/entropy.rs +0 -0
  136. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/mailbox.rs +0 -0
  137. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/milestone.rs +0 -0
  138. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/mod.rs +0 -0
  139. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/policy.rs +0 -0
  140. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/rollback.rs +0 -0
  141. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/runnable.rs +0 -0
  142. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/cancellation.rs +0 -0
  143. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/capability.rs +0 -0
  144. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/eviction.rs +0 -0
  145. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/gate.rs +0 -0
  146. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/milestone_exec.rs +0 -0
  147. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/process.rs +0 -0
  148. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/signal.rs +0 -0
  149. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/state_machine/tests.rs +0 -0
  150. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/tcb.rs +0 -0
  151. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/scheduler/wait_index.rs +0 -0
  152. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/signals/attention.rs +0 -0
  153. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/signals/mod.rs +0 -0
  154. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/signals/queue.rs +0 -0
  155. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/signals/router.rs +0 -0
  156. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/syscall/mod.rs +0 -0
  157. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/agent.rs +0 -0
  158. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/capability.rs +0 -0
  159. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/contract.rs +0 -0
  160. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/durable_content.rs +0 -0
  161. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/error.rs +0 -0
  162. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/message.rs +0 -0
  163. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/milestone.rs +0 -0
  164. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/mod.rs +0 -0
  165. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/policy.rs +0 -0
  166. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/result.rs +0 -0
  167. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/signal.rs +0 -0
  168. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/skill.rs +0 -0
  169. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-core/src/types/task.rs +0 -0
  170. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-py/Cargo.toml +0 -0
  171. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-py/LICENSE +0 -0
  172. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-tokenizer/Cargo.toml +0 -0
  173. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-tokenizer/LICENSE +0 -0
  174. {deepstrike-0.2.73 → deepstrike-0.2.75}/crates/deepstrike-tokenizer/src/lib.rs +0 -0
  175. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/collaboration/__init__.py +0 -0
  176. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/collaboration/contract.py +0 -0
  177. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/collaboration/handoff.py +0 -0
  178. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/collaboration/harness.py +0 -0
  179. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/collaboration/modes.py +0 -0
  180. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/collaboration/pool.py +0 -0
  181. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/harness/__init__.py +0 -0
  182. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/harness/harness.py +0 -0
  183. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/harness/judge.py +0 -0
  184. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/kernel/__init__.py +0 -0
  185. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/kernel/canonical.py +0 -0
  186. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/knowledge/__init__.py +0 -0
  187. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/knowledge/source.py +0 -0
  188. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/__init__.py +0 -0
  189. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/agent.py +0 -0
  190. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/durable.py +0 -0
  191. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/extraction.py +0 -0
  192. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/in_memory_store.py +0 -0
  193. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/protocols.py +0 -0
  194. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/ranking.py +0 -0
  195. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/retention.py +0 -0
  196. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/memory/working.py +0 -0
  197. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/anthropic.py +0 -0
  198. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/anthropic_compatible.py +0 -0
  199. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/capability_router.py +0 -0
  200. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/credentials.py +0 -0
  201. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/embedding.py +0 -0
  202. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/factories.py +0 -0
  203. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/gemini.py +0 -0
  204. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/gemini_adapter.py +0 -0
  205. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/model_catalog.py +0 -0
  206. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/model_registry.py +0 -0
  207. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/ollama.py +0 -0
  208. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/ollama_adapter.py +0 -0
  209. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/prepared_request.py +0 -0
  210. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/protocol_adapter.py +0 -0
  211. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/protocols.py +0 -0
  212. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/provider_error.py +0 -0
  213. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/replay.py +0 -0
  214. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/replay_validator.py +0 -0
  215. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/request_plan.py +0 -0
  216. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/runtime_registry.py +0 -0
  217. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/stop_reason.py +0 -0
  218. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/usage.py +0 -0
  219. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/providers/vendor_profiles.py +0 -0
  220. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/archive.py +0 -0
  221. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/context.py +0 -0
  222. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/context_policy.py +0 -0
  223. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/credential_vault.py +0 -0
  224. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/durable_content.py +0 -0
  225. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/eval.py +0 -0
  226. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/event_stream.py +0 -0
  227. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/evolution.py +0 -0
  228. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/execution_evidence.py +0 -0
  229. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/filtered_plane.py +0 -0
  230. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/kernel_event_log.py +0 -0
  231. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/loop_driver.py +0 -0
  232. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/os_profile.py +0 -0
  233. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/os_snapshot.py +0 -0
  234. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/output_schema.py +0 -0
  235. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/payload_store.py +0 -0
  236. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/process_sandbox_plane.py +0 -0
  237. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/provider_replay.py +0 -0
  238. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/reaction_checkpoint.py +0 -0
  239. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/reactive_session.py +0 -0
  240. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/reducers.py +0 -0
  241. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/reliability.py +0 -0
  242. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/replay_sanitize.py +0 -0
  243. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/run_group.py +0 -0
  244. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/session_log.py +0 -0
  245. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/session_repair.py +0 -0
  246. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/sub_agent_orchestrator.py +0 -0
  247. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/turn_policy.py +0 -0
  248. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/verifiable_report.py +0 -0
  249. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/workflow_control_flow.py +0 -0
  250. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/workflow_store.py +0 -0
  251. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/runtime/worktree_plane.py +0 -0
  252. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/safety/__init__.py +0 -0
  253. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/safety/permissions.py +0 -0
  254. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/signals/__init__.py +0 -0
  255. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/signals/gateway.py +0 -0
  256. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/signals/scheduled.py +0 -0
  257. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/signals/types.py +0 -0
  258. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/skills/__init__.py +0 -0
  259. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/skills/loader.py +0 -0
  260. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/skills/registry.py +0 -0
  261. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/skills/watcher.py +0 -0
  262. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/tools/__init__.py +0 -0
  263. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/tools/builtin/__init__.py +0 -0
  264. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/tools/builtin/read_file.py +0 -0
  265. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/tools/errors.py +0 -0
  266. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/tools/execution.py +0 -0
  267. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/tools/registry.py +0 -0
  268. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/types/__init__.py +0 -0
  269. {deepstrike-0.2.73 → deepstrike-0.2.75}/deepstrike/types/content.py +0 -0
  270. {deepstrike-0.2.73 → deepstrike-0.2.75}/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.73"
257
+ version = "0.2.75"
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.73"
271
+ version = "0.2.75"
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.73"
283
+ version = "0.2.75"
284
284
  dependencies = [
285
285
  "compact_str",
286
286
  "deepstrike-core",
@@ -291,10 +291,11 @@ dependencies = [
291
291
 
292
292
  [[package]]
293
293
  name = "deepstrike-sdk"
294
- version = "0.2.73"
294
+ version = "0.2.75"
295
295
  dependencies = [
296
296
  "async-stream",
297
297
  "async-trait",
298
+ "base64 0.22.1",
298
299
  "bytes",
299
300
  "compact_str",
300
301
  "deepstrike-core",
@@ -327,7 +328,7 @@ dependencies = [
327
328
 
328
329
  [[package]]
329
330
  name = "deepstrike-tokenizer"
330
- version = "0.2.73"
331
+ version = "0.2.75"
331
332
  dependencies = [
332
333
  "pretty_assertions",
333
334
  "tiktoken-rs",
@@ -335,7 +336,7 @@ dependencies = [
335
336
 
336
337
  [[package]]
337
338
  name = "deepstrike-wasm"
338
- version = "0.2.73"
339
+ version = "0.2.75"
339
340
  dependencies = [
340
341
  "compact_str",
341
342
  "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.73"
6
+ version = "0.2.75"
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.73" }
12
- deepstrike-tokenizer = { path = "crates/deepstrike-tokenizer", version = "0.2.73" }
11
+ deepstrike-core = { path = "crates/deepstrike-core", version = "0.2.75" }
12
+ deepstrike-tokenizer = { path = "crates/deepstrike-tokenizer", version = "0.2.75" }
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.73
3
+ Version: 0.2.75
4
4
  Requires-Dist: httpx>=0.27
5
5
  Requires-Dist: pyyaml>=6.0
6
6
  Requires-Dist: anyio>=4.0
@@ -994,6 +994,17 @@ impl ContextManager {
994
994
  .is_none()
995
995
  }
996
996
 
997
+ /// A refused `skill` activation: withdraw the `skill:<name>` knowledge the host staged for it,
998
+ /// unless the skill is already active under an earlier admission.
999
+ pub fn retract_refused_skill(&mut self, name: &str) -> bool {
1000
+ if self.active_skills.contains_key(name) {
1001
+ return false;
1002
+ }
1003
+ self.partitions
1004
+ .knowledge
1005
+ .retract_staged(&format!("skill:{name}"))
1006
+ }
1007
+
997
1008
  /// K3: deactivate a skill — the toolset re-widens at the next `emit_call_llm` (an epoch event,
998
1009
  /// same cache cost class as activation) and the skill's `skill:<name>` knowledge pin is marked
999
1010
  /// for the next boundary sweep. Errs-open: not-active is a no-op (returns false).
@@ -209,6 +209,29 @@ impl KnowledgePartition {
209
209
  }))
210
210
  }
211
211
 
212
+ /// Withdraw content staged under `key` for something the kernel then refused (a skill whose
213
+ /// activation was rejected). A freshly appended entry has never been rendered, so it is dropped
214
+ /// outright; an existing entry keeps its rendered bytes, loses the staged upsert, and leaves at
215
+ /// the next boundary. Returns whether anything was withdrawn.
216
+ pub fn retract_staged(&mut self, key: &str) -> bool {
217
+ let Some(index) = self
218
+ .entries
219
+ .iter()
220
+ .position(|entry| entry.key.as_deref() == Some(key))
221
+ else {
222
+ return false;
223
+ };
224
+ let entry = &mut self.entries[index];
225
+ if entry.pending.take().is_some() {
226
+ entry.evict_at_boundary = true;
227
+ return true;
228
+ }
229
+ let tokens = entry.tokens;
230
+ self.entries.remove(index);
231
+ self.token_count = self.token_count.saturating_sub(tokens);
232
+ true
233
+ }
234
+
212
235
  /// Mark the keyed entry for removal at the next boundary. Errs-open: unknown key is a no-op.
213
236
  /// Returns whether a matching entry was marked.
214
237
  pub fn remove(&mut self, key: &str) -> bool {
@@ -14,6 +14,8 @@ pub struct GovernancePipeline {
14
14
  pub veto: VetoAuthority,
15
15
  pub rate_limiter: RateLimiter,
16
16
  pub constraints: ConstraintValidator,
17
+ /// Withhold statically denied tools from the provider surface (see [`Self::denies_tool`]).
18
+ pub hide_denied_tools: bool,
17
19
  }
18
20
 
19
21
  fn severity(v: &GovernanceVerdict) -> u8 {
@@ -32,9 +34,28 @@ impl GovernancePipeline {
32
34
  veto: VetoAuthority::new(),
33
35
  rate_limiter: RateLimiter::default(),
34
36
  constraints: ConstraintValidator::new(),
37
+ hide_denied_tools: false,
35
38
  }
36
39
  }
37
40
 
41
+ /// Whether every call to `name` is denied regardless of its arguments or timing — a veto or a
42
+ /// `deny` permission. Argument constraints and rate limits are per-call, and `ask_user` is a
43
+ /// runtime decision, so none of them make a tool statically unusable.
44
+ pub fn denies_tool(&self, name: &str) -> bool {
45
+ let probe = ToolCall {
46
+ id: "governance-surface".into(),
47
+ name: name.into(),
48
+ arguments: serde_json::Value::Null,
49
+ };
50
+ matches!(
51
+ self.veto.check(&probe),
52
+ Some(GovernanceVerdict::Deny { .. })
53
+ ) || matches!(
54
+ self.permission.check(&probe),
55
+ Some(GovernanceVerdict::Deny { .. })
56
+ )
57
+ }
58
+
38
59
  /// Set the current timestamp for rate limiting.
39
60
  pub fn set_time(&mut self, now_ms: u64) {
40
61
  self.rate_limiter.set_time(now_ms);
@@ -393,6 +393,65 @@ pub struct MemoryRecallLifecycle {
393
393
  pub last_recalled_at: u64,
394
394
  }
395
395
 
396
+ /// What the host's store holds for one record it just recalled — the only input the recall
397
+ /// lifecycle needs. The store reports state; it never reports the *next* state.
398
+ #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
399
+ #[serde(deny_unknown_fields)]
400
+ pub struct MemoryRecallPrior {
401
+ pub record_id: String,
402
+ #[serde(default)]
403
+ pub recall_count: u64,
404
+ #[serde(default)]
405
+ pub pinned: bool,
406
+ }
407
+
408
+ /// A recalled record whose count crossed the promotion threshold on this recall (M4).
409
+ #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
410
+ #[serde(deny_unknown_fields)]
411
+ pub struct MemoryPromotion {
412
+ pub record_id: String,
413
+ pub recall_count: u64,
414
+ }
415
+
416
+ /// M3/M4 · the one derivation of a recall's lifecycle, shared by the model's `query_memory`
417
+ /// syscall and every host recall route.
418
+ ///
419
+ /// Each distinct record counts once per derivation however many hits named it, so a prefetch that
420
+ /// issues several overlapping queries cannot inflate a count. Promotion is edge-triggered — it is
421
+ /// suggested on the recall that crosses the threshold, never again on later ones — and a pinned
422
+ /// record is never suggested, because it is already where a promotion would put it.
423
+ pub fn derive_recall_lifecycle(
424
+ priors: &[MemoryRecallPrior],
425
+ recalled_at: u64,
426
+ promotion_threshold: Option<u64>,
427
+ ) -> (Vec<MemoryRecallLifecycle>, Vec<MemoryPromotion>) {
428
+ let mut seen = std::collections::BTreeSet::new();
429
+ let mut recalls = Vec::with_capacity(priors.len());
430
+ let mut promotions = Vec::new();
431
+ for prior in priors {
432
+ if !seen.insert(prior.record_id.as_str()) {
433
+ continue;
434
+ }
435
+ let recall_count = prior.recall_count.saturating_add(1);
436
+ recalls.push(MemoryRecallLifecycle {
437
+ record_id: prior.record_id.clone(),
438
+ recall_count,
439
+ last_recalled_at: recalled_at,
440
+ });
441
+ if let Some(threshold) = promotion_threshold
442
+ && !prior.pinned
443
+ && prior.recall_count < threshold
444
+ && recall_count >= threshold
445
+ {
446
+ promotions.push(MemoryPromotion {
447
+ record_id: prior.record_id.clone(),
448
+ recall_count,
449
+ });
450
+ }
451
+ }
452
+ (recalls, promotions)
453
+ }
454
+
396
455
  /// Memory validation error.
397
456
  #[derive(Debug, Clone, Serialize, Deserialize)]
398
457
  #[serde(tag = "error_kind", rename_all = "snake_case")]
@@ -770,4 +829,52 @@ mod tests {
770
829
  ));
771
830
  assert_eq!(store.len(), 1);
772
831
  }
832
+
833
+ fn prior(record_id: &str, recall_count: u64, pinned: bool) -> MemoryRecallPrior {
834
+ MemoryRecallPrior {
835
+ record_id: record_id.into(),
836
+ recall_count,
837
+ pinned,
838
+ }
839
+ }
840
+
841
+ #[test]
842
+ fn a_recall_counts_each_record_once_and_suggests_promotion_only_on_the_crossing() {
843
+ let (recalls, promotions) = derive_recall_lifecycle(
844
+ &[
845
+ prior("crossing", 2, false),
846
+ prior("crossing", 2, false),
847
+ prior("already_past", 3, false),
848
+ prior("pinned", 2, true),
849
+ prior("fresh", 0, false),
850
+ ],
851
+ 42,
852
+ Some(3),
853
+ );
854
+ assert_eq!(
855
+ recalls
856
+ .iter()
857
+ .map(|recall| (recall.record_id.as_str(), recall.recall_count))
858
+ .collect::<Vec<_>>(),
859
+ vec![
860
+ ("crossing", 3),
861
+ ("already_past", 4),
862
+ ("pinned", 3),
863
+ ("fresh", 1)
864
+ ]
865
+ );
866
+ assert!(recalls.iter().all(|recall| recall.last_recalled_at == 42));
867
+ assert_eq!(
868
+ promotions,
869
+ vec![MemoryPromotion {
870
+ record_id: "crossing".into(),
871
+ recall_count: 3
872
+ }]
873
+ );
874
+ assert!(
875
+ derive_recall_lifecycle(&[prior("crossing", 2, false)], 1, None)
876
+ .1
877
+ .is_empty()
878
+ );
879
+ }
773
880
  }
@@ -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() {
@@ -2097,6 +2097,8 @@ mod tests {
2097
2097
  ),
2098
2098
  tokens: Some(64),
2099
2099
  tool_call_id: None,
2100
+ is_error: false,
2101
+ tool_calls: Vec::new(),
2100
2102
  })
2101
2103
  .collect(),
2102
2104
  ..InitialContext::default()
@@ -2184,6 +2186,7 @@ mod tests {
2184
2186
  Vec::new()
2185
2187
  },
2186
2188
  tool_call_id: None,
2189
+ is_error: false,
2187
2190
  tokens: None,
2188
2191
  },
2189
2192
  observed_input_tokens: None,
@@ -76,6 +76,14 @@ pub enum KernelObservation {
76
76
  subject: Option<String>,
77
77
  reason: String,
78
78
  },
79
+ /// A model `skill` syscall the kernel admitted. Hosts pin the skill's content only on this
80
+ /// fact, never on the raw call: activation is a capability mutation the kernel adjudicates.
81
+ SkillAdmitted {
82
+ turn: u32,
83
+ name: String,
84
+ #[serde(default, skip_serializing_if = "Option::is_none")]
85
+ expires_at_turn: Option<u32>,
86
+ },
79
87
  CapabilityChanged {
80
88
  turn: u32,
81
89
  #[serde(default, skip_serializing_if = "Vec::is_empty")]
@@ -236,6 +244,31 @@ pub enum KernelObservation {
236
244
  #[serde(default, skip_serializing_if = "Option::is_none")]
237
245
  submitter: Option<String>,
238
246
  },
247
+ /// The host's dynamic plan was accepted and bound to this kernel workflow transition. The
248
+ /// canonical DAG remains authoritative for scheduling; this fact preserves replay identity,
249
+ /// dependencies and the host's replay disposition in the journal.
250
+ DynamicWorkflowPlanCommitted {
251
+ turn: u32,
252
+ run_id: String,
253
+ sequence: u32,
254
+ node_ids: Vec<String>,
255
+ dependencies: Vec<Vec<String>>,
256
+ prompt_fingerprints: Vec<String>,
257
+ replay: Vec<String>,
258
+ },
259
+ /// A dynamic invocation replay decision observed by the kernel.
260
+ DynamicWorkflowReplayRecorded {
261
+ turn: u32,
262
+ run_id: String,
263
+ sequence: u32,
264
+ node_id: String,
265
+ prompt_fingerprint: String,
266
+ status: String,
267
+ replay: String,
268
+ result_digest: String,
269
+ #[serde(default, skip_serializing_if = "Option::is_none")]
270
+ termination: Option<String>,
271
+ },
239
272
  /// A runtime node batch was rejected before any graph mutation.
240
273
  NodesRejected {
241
274
  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
@@ -34,6 +43,12 @@ pub enum HostCommand {
34
43
  ApplySkillActivation(ApplySkillActivationCommand),
35
44
  ApplyPolicyPatch(ApplyPolicyPatchCommand),
36
45
  UpdateDeadline(UpdateDeadlineCommand),
46
+ /// §22.13 · a memory write the host authored while this operation runs (a session extract, a
47
+ /// semantic archive summary). The host still performs the I/O; the kernel is the one that says
48
+ /// whether the write may happen, by the same validation rule and the same rolling write quota
49
+ /// the model's `write_memory` syscall answers to. A refusal is journaled as
50
+ /// `memory_validation_failed`; an admitted write journals nothing and the host persists it.
51
+ AdmitMemoryWrite(AdmitMemoryWriteCommand),
37
52
  }
38
53
 
39
54
  /// Cancellation. The operation id lives in the envelope and is **not** repeated here: the
@@ -67,6 +82,52 @@ pub struct UpdateTaskCommand {
67
82
  pub update: TaskUpdate,
68
83
  }
69
84
 
85
+ #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
86
+ #[serde(deny_unknown_fields)]
87
+ pub struct AppendWorkflowNodesCommand {
88
+ pub nodes: Vec<WorkflowNode>,
89
+ /// Host-generated plan metadata. The kernel records it, but scheduling remains driven by the
90
+ /// canonical DAG built from `nodes`.
91
+ #[serde(default, skip_serializing_if = "Option::is_none")]
92
+ pub plan: Option<DynamicWorkflowPlan>,
93
+ }
94
+
95
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
96
+ #[serde(deny_unknown_fields)]
97
+ pub struct DynamicWorkflowPlan {
98
+ pub run_id: String,
99
+ pub sequence: u32,
100
+ pub nodes: Vec<DynamicWorkflowPlanNode>,
101
+ }
102
+
103
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
104
+ #[serde(deny_unknown_fields)]
105
+ pub struct DynamicWorkflowPlanNode {
106
+ pub node_id: String,
107
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
108
+ pub depends_on: Vec<String>,
109
+ pub prompt_fingerprint: String,
110
+ pub replay: String,
111
+ }
112
+
113
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
114
+ #[serde(deny_unknown_fields)]
115
+ pub struct DynamicWorkflowReplayCommand {
116
+ pub run_id: String,
117
+ pub sequence: u32,
118
+ pub node_id: String,
119
+ pub prompt_fingerprint: String,
120
+ pub status: String,
121
+ pub replay: String,
122
+ pub result_digest: String,
123
+ #[serde(default, skip_serializing_if = "Option::is_none")]
124
+ pub termination: Option<String>,
125
+ }
126
+
127
+ #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
128
+ #[serde(deny_unknown_fields)]
129
+ pub struct CompleteDynamicWorkflowCommand {}
130
+
70
131
  /// A partial edit of the task state. Every field is optional; absent ⇒ unchanged.
71
132
  #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
72
133
  #[serde(deny_unknown_fields)]
@@ -126,6 +187,16 @@ pub struct SeedKnowledgeCommand {
126
187
  pub entries: Vec<KnowledgeEntry>,
127
188
  }
128
189
 
190
+ #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
191
+ #[serde(deny_unknown_fields)]
192
+ pub struct AdmitMemoryWriteCommand {
193
+ /// The host's record id, named by the audit fact when the write is refused.
194
+ pub record_id: String,
195
+ pub name: String,
196
+ /// UTF-8 byte length of the content the host intends to persist.
197
+ pub content_bytes: u32,
198
+ }
199
+
129
200
  /// §13.2 · skill activation state. Both directions in one command so a swap is atomic.
130
201
  #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
131
202
  #[serde(deny_unknown_fields)]
@@ -210,6 +281,11 @@ pub struct GovernancePolicy {
210
281
  pub rate_limits: Vec<RateLimitSpec>,
211
282
  #[serde(default, skip_serializing_if = "Vec::is_empty")]
212
283
  pub constraints: Vec<ParamConstraint>,
284
+ /// Withhold tools this policy statically denies (veto or `deny` permission) from the provider
285
+ /// surface, and say so once in the knowledge slot. The kernel decides the hidden set with the
286
+ /// same rules that enforce the calls, so the surface and the gate cannot disagree.
287
+ #[serde(default, skip_serializing_if = "Option::is_none")]
288
+ pub hide_denied_tools: Option<bool>,
213
289
  }
214
290
 
215
291
  /// Per-tool rolling-window rate limit.
@@ -503,6 +579,9 @@ impl LivePolicyPatch {
503
579
  next.governance_policy.vetoed_tools = policy.vetoed_tools.clone();
504
580
  next.governance_policy.rate_limits = policy.rate_limits.clone();
505
581
  next.governance_policy.constraints = policy.constraints.clone();
582
+ next.governance_policy.hide_denied_tools = policy
583
+ .hide_denied_tools
584
+ .unwrap_or(current.governance_policy.hide_denied_tools);
506
585
  super::config::validate_governance(
507
586
  &next.governance_policy,
508
587
  current.kernel_limits.collection_limits.governance_rules,
@@ -659,6 +659,8 @@ pub struct ResolvedGovernancePolicy {
659
659
  pub vetoed_tools: Vec<String>,
660
660
  pub rate_limits: Vec<super::command::RateLimitSpec>,
661
661
  pub constraints: Vec<super::command::ParamConstraint>,
662
+ #[serde(default, skip_serializing_if = "std::ops::Not::not")]
663
+ pub hide_denied_tools: bool,
662
664
  }
663
665
 
664
666
  #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
@@ -831,6 +833,56 @@ pub struct ResolvedMemoryPolicy {
831
833
  pub promotion_recall_threshold: Option<WireU64>,
832
834
  }
833
835
 
836
+ impl ResolvedMemoryPolicy {
837
+ /// The baseline every operation starts from, and the policy a host without a live operation
838
+ /// is judged by when it names none.
839
+ pub const DEFAULT: Self = Self {
840
+ stale_warning_days: 2,
841
+ retrieval_top_k: 5,
842
+ validation_enabled: true,
843
+ max_content_bytes: 10_000,
844
+ max_name_length: 100,
845
+ promotion_recall_threshold: None,
846
+ };
847
+
848
+ /// §22.13 · the one admission rule for a memory write, whoever proposes it.
849
+ ///
850
+ /// The model's `write_memory` syscall, a host write inside a live operation and a host write
851
+ /// with no operation at all are judged by this function and nothing else — historically each
852
+ /// SDK carried its own copy, and the copies disagreed about bytes versus characters, about
853
+ /// which fields were required, and about whether the model's path was checked at all.
854
+ ///
855
+ /// The content is judged by its UTF-8 byte length, so a host need not ship a body across the
856
+ /// boundary just to have it measured.
857
+ pub fn check_write(&self, name: &str, content_bytes: usize) -> Result<(), String> {
858
+ if !self.validation_enabled {
859
+ return Ok(());
860
+ }
861
+ if name.trim().is_empty() {
862
+ return Err("memory name must not be empty".to_string());
863
+ }
864
+ if name.chars().count() > self.max_name_length as usize {
865
+ return Err(format!(
866
+ "memory name exceeds {} characters",
867
+ self.max_name_length
868
+ ));
869
+ }
870
+ if content_bytes > self.max_content_bytes as usize {
871
+ return Err(format!(
872
+ "memory content exceeds {} bytes",
873
+ self.max_content_bytes
874
+ ));
875
+ }
876
+ Ok(())
877
+ }
878
+
879
+ /// The same resolution an operation's genesis applies, for a host that holds a policy but no
880
+ /// live operation: absent fields fall back to [`Self::DEFAULT`] and the same invariants hold.
881
+ pub fn resolve(policy: Option<&MemoryPolicy>) -> Result<Self, WireRejection> {
882
+ resolve_memory_policy(policy, &Self::DEFAULT)
883
+ }
884
+ }
885
+
834
886
  #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
835
887
  #[serde(deny_unknown_fields)]
836
888
  pub struct ResolvedFeaturePolicy {
@@ -887,6 +939,7 @@ impl ConfigDefaults {
887
939
  vetoed_tools: Vec::new(),
888
940
  rate_limits: Vec::new(),
889
941
  constraints: Vec::new(),
942
+ hide_denied_tools: false,
890
943
  },
891
944
  scheduler_policy: ResolvedSchedulerPolicy {
892
945
  critical_path_weight: 1_000_000,
@@ -948,14 +1001,7 @@ impl ConfigDefaults {
948
1001
  },
949
1002
  },
950
1003
  memory_access: None,
951
- memory_policy: ResolvedMemoryPolicy {
952
- stale_warning_days: 2,
953
- retrieval_top_k: 5,
954
- validation_enabled: true,
955
- max_content_bytes: 10_000,
956
- max_name_length: 100,
957
- promotion_recall_threshold: None,
958
- },
1004
+ memory_policy: ResolvedMemoryPolicy::DEFAULT,
959
1005
  tool_catalog: Vec::new(),
960
1006
  skill_catalog: Vec::new(),
961
1007
  verification_contracts: Vec::new(),
@@ -1525,6 +1571,7 @@ fn resolve_governance(
1525
1571
  resolved.vetoed_tools = policy.vetoed_tools.clone();
1526
1572
  resolved.rate_limits = policy.rate_limits.clone();
1527
1573
  resolved.constraints = policy.constraints.clone();
1574
+ resolved.hide_denied_tools = policy.hide_denied_tools.unwrap_or(false);
1528
1575
  }
1529
1576
  validate_governance(&resolved, rule_bound)?;
1530
1577
  Ok(resolved)
@@ -2150,6 +2197,7 @@ mod tests {
2150
2197
  tool: "write".to_string(),
2151
2198
  param_path: "destination".to_string(),
2152
2199
  })],
2200
+ hide_denied_tools: None,
2153
2201
  }),
2154
2202
  scheduler_policy: Some(SchedulerPolicy {
2155
2203
  critical_path_weight: Some(900_000),
@@ -2440,6 +2488,7 @@ mod tests {
2440
2488
  window_ms: WireU64::new(1_000),
2441
2489
  }],
2442
2490
  constraints: Vec::new(),
2491
+ hide_denied_tools: None,
2443
2492
  },
2444
2493
  }),
2445
2494
  LivePolicyPatch::TightenResourceQuota(TightenResourceQuota {
@@ -342,6 +342,7 @@ fn provider_result(
342
342
  content: String::new(),
343
343
  tool_calls: calls,
344
344
  tool_call_id: None,
345
+ is_error: false,
345
346
  tokens: None,
346
347
  },
347
348
  observed_input_tokens: None,
@@ -394,6 +395,7 @@ fn provider_answer(id: &str, at: u64, effect: &EffectId, text: &str) -> WireEnve
394
395
  content: text.to_string(),
395
396
  tool_calls: Vec::new(),
396
397
  tool_call_id: None,
398
+ is_error: false,
397
399
  tokens: None,
398
400
  },
399
401
  observed_input_tokens: None,
@@ -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(),