deepstrike 0.2.73__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.
- {deepstrike-0.2.73 → deepstrike-0.2.74}/Cargo.lock +6 -6
- {deepstrike-0.2.73 → deepstrike-0.2.74}/Cargo.toml +3 -3
- {deepstrike-0.2.73 → deepstrike-0.2.74}/PKG-INFO +1 -1
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/workflow/run.rs +5 -6
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/observation.rs +25 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/command.rs +56 -1
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/continuation.rs +18 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/events.rs +189 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/planning.rs +24 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/tests.rs +236 -1
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver.rs +43 -3
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/root.rs +12 -1
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/session.rs +26 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/mod.rs +22 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/workflow.rs +4 -1
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/__init__.py +14 -2
- deepstrike-0.2.74/deepstrike/agent.py +624 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/__init__.py +2 -1
- deepstrike-0.2.74/deepstrike/providers/fallback.py +52 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/__init__.py +3 -1
- deepstrike-0.2.74/deepstrike/runtime/agent_declaration.py +209 -0
- deepstrike-0.2.74/deepstrike/runtime/eval_dataset.py +81 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/facade.py +12 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/mcp_proxy_plane.py +29 -10
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/replay_fixture.py +5 -1
- deepstrike-0.2.74/deepstrike/runtime/workflow_replay.py +52 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/pyproject.toml +1 -1
- deepstrike-0.2.73/deepstrike/agent.py +0 -125
- deepstrike-0.2.73/deepstrike/agent_ir.py +0 -211
- {deepstrike-0.2.73 → deepstrike-0.2.74}/LICENSE +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/README.md +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/Cargo.toml +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/LICENSE +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/benches/kernel_baseline.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/benches/verifiable_baseline.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/benches/wait_index_baseline.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/benchmark/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/bin/deepstrike.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/bin/support/evidence_io.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/compression.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/config.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/execution.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/fault.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/manager.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/measurement.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/partitions.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/policy.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/pressure.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/renderer.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/renewal.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/skill_catalog.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/summarizer.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/task_state.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/text.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/token_engine.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/units.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/context/utility.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/evolution.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/constraint.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/permission.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/pipeline.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/quota.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/rate_limit.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/repeat_fuse.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/governance/veto.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/harness/eval.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/harness/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/lexical.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/lib.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/memory/curator.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/memory/durable.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/memory/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/handle.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/memory.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/mm/value.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/task_graph.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/tournament.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/workflow/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/proc/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/projection_pairs.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/chain_validator/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/event_log.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/binding.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/checkpoint.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/config.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/crash_point.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/effects.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/projection.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/provider.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/driver/syscall.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/effect.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/envelope.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/event.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/fault.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/projection.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/record.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/restore.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/scalar.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/syscall.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/terminal.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/tests.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/transaction.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/repair.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/replay.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/verifiable.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/budget_grant.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/cross_operation.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/entropy.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/mailbox.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/milestone.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/policy.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/rollback.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/runnable.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/cancellation.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/capability.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/eviction.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/gate.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/milestone_exec.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/process.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/signal.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/state_machine/tests.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/tcb.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/scheduler/wait_index.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/attention.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/queue.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/signals/router.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/syscall/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/agent.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/capability.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/contract.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/durable_content.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/error.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/message.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/milestone.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/mod.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/policy.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/result.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/signal.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/skill.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/types/task.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-py/Cargo.toml +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-py/LICENSE +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-py/src/lib.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-tokenizer/Cargo.toml +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-tokenizer/LICENSE +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-tokenizer/src/lib.rs +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/collaboration/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/collaboration/contract.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/collaboration/handoff.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/collaboration/harness.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/collaboration/modes.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/collaboration/pool.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/governance.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/harness/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/harness/harness.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/harness/judge.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/kernel/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/kernel/canonical.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/knowledge/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/knowledge/source.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/agent.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/durable.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/extraction.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/in_memory_store.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/protocols.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/ranking.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/retention.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/memory/working.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/anthropic.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/anthropic_adapter.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/anthropic_compatible.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/base.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/capability_router.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/credentials.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/embedding.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/factories.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/gemini.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/gemini_adapter.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/model_catalog.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/model_registry.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/ollama.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/ollama_adapter.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/openai.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/openai_chat_adapter.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/openai_responses.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/prepared_request.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/protocol_adapter.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/protocols.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/provider_error.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/qwen.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/replay.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/replay_validator.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/request_plan.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/runtime_registry.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/stop_reason.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/stream.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/usage.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/providers/vendor_profiles.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/archive.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/canonical_kernel_step.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/context.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/context_policy.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/credential_vault.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/durable_content.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/eval.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/event_stream.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/evolution.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/execution_evidence.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/execution_plane.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/filtered_plane.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/kernel_event_log.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/kernel_journal.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/kernel_step.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/loop_driver.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/os_profile.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/os_snapshot.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/output_schema.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/payload_store.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/process_sandbox_plane.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/provider_replay.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/reaction_checkpoint.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/reactive_session.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/reducers.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/reliability.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/remote_vpc_plane.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/replay_provider.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/replay_sanitize.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/run_group.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/runner.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/session_log.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/session_repair.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/sub_agent_orchestrator.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/turn_policy.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/verifiable_report.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/workflow_control_flow.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/workflow_store.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/runtime/worktree_plane.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/safety/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/safety/permissions.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/signals/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/signals/gateway.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/signals/scheduled.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/signals/types.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/skills/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/skills/loader.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/skills/registry.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/skills/watcher.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/tools/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/tools/builtin/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/tools/builtin/read_file.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/tools/errors.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/tools/execution.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/tools/registry.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/types/__init__.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/types/agent.py +0 -0
- {deepstrike-0.2.73 → deepstrike-0.2.74}/deepstrike/types/content.py +0 -0
- {deepstrike-0.2.73 → 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
12
|
-
deepstrike-tokenizer = { path = "crates/deepstrike-tokenizer", version = "0.2.
|
|
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"
|
{deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/orchestration/workflow/run.rs
RENAMED
|
@@ -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() {
|
{deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/observation.rs
RENAMED
|
@@ -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,
|
{deepstrike-0.2.73 → deepstrike-0.2.74}/crates/deepstrike-core/src/runtime/kernel/wire/command.rs
RENAMED
|
@@ -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)]
|
|
@@ -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(),
|
|
@@ -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
|
}
|