deepstrike 0.2.80__tar.gz → 0.2.81__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.80 → deepstrike-0.2.81}/Cargo.lock +7 -7
- {deepstrike-0.2.80 → deepstrike-0.2.81}/Cargo.toml +3 -3
- {deepstrike-0.2.80 → deepstrike-0.2.81}/PKG-INFO +1 -1
- deepstrike-0.2.81/crates/deepstrike-core/src/context/graph.rs +147 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/item.rs +81 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/manager.rs +442 -14
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/mod.rs +1 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/partitions.rs +70 -12
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/observation.rs +14 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/checkpoint.rs +11 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/continuation.rs +11 -1
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/effects.rs +7 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/projection.rs +4 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/tests.rs +57 -2
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver.rs +22 -6
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/root.rs +4 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/session.rs +13 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/mod.rs +5 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/_session_event_registry.py +1 -1
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/canonical_kernel_step.py +5 -1
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/kernel_event_log.py +5 -3
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/runner.py +1 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/session_log.py +32 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/pyproject.toml +1 -1
- {deepstrike-0.2.80 → deepstrike-0.2.81}/LICENSE +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/README.md +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/Cargo.toml +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/LICENSE +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/benches/kernel_baseline.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/benches/wait_index_baseline.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/benchmark/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/compression.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/config.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/fault.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/measurement.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/policy.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/pressure.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/renderer.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/renewal.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/skill_catalog.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/summarizer.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/task_state.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/text.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/token_engine.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/units.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/context/utility.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/constraint.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/permission.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/pipeline.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/quota.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/rate_limit.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/repeat_fuse.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/governance/veto.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/harness/eval.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/harness/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/lexical.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/lib.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/memory/curator.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/memory/durable.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/memory/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/mm/handle.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/mm/memory.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/mm/memory_candidate.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/mm/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/mm/value.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/orchestration/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/orchestration/task_graph.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/orchestration/workflow/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/orchestration/workflow/run.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/proc/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/projection_pairs.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/event_log.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/binding.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/command.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/config.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/crash_point.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/events.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/planning.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/provider.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/driver/syscall.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/effect.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/envelope.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/event.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/fault.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/memory_authority.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/projection.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/record.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/restore.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/scalar.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/syscall.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/terminal.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/tests.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire/transaction.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel/wire.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/kernel.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/repair.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/replay.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/session_registry_tests.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/runtime/session_wire.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/budget_grant.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/cross_operation.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/entropy.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/mailbox.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/milestone.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/policy.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/rollback.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/runnable.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/cancellation.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/capability.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/eviction.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/gate.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/milestone_exec.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/process.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/signal.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/tests.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/state_machine/workflow.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/tcb.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/scheduler/wait_index.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/signals/attention.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/signals/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/signals/queue.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/signals/router.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/syscall/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/agent.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/capability.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/contract.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/durable_content.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/error.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/message.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/milestone.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/mod.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/policy.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/result.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/signal.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/skill.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-core/src/types/task.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-py/Cargo.toml +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-py/LICENSE +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-py/src/lib.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-tokenizer/Cargo.toml +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-tokenizer/LICENSE +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/crates/deepstrike-tokenizer/src/lib.rs +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/agent.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/collaboration/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/collaboration/contract.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/collaboration/handoff.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/collaboration/harness.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/collaboration/modes.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/collaboration/pool.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/governance.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/harness/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/harness/harness.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/harness/judge.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/kernel/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/kernel/canonical.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/knowledge/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/knowledge/source.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/agent.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/attestation.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/authority.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/candidate_sink.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/durable.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/durable_candidate_sink.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/durable_lifecycle_store.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/in_memory_store.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/lifecycle.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/protocols.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/ranking.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/recall_projection.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/retention.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/runtime_policy.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/working.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/memory/writer.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/anthropic.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/anthropic_adapter.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/anthropic_compaction.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/anthropic_compatible.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/base.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/capability_router.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/credentials.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/embedding.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/factories.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/fallback.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/gemini.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/gemini_adapter.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/model_catalog.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/model_registry.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/ollama.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/ollama_adapter.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/openai.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/openai_chat_adapter.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/openai_responses.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/prepared_request.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/protocol_adapter.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/protocols.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/provider_error.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/qwen.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/replay.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/replay_validator.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/request_plan.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/runtime_registry.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/stop_reason.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/stream.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/usage.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/providers/vendor_profiles.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/agent_declaration.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/archive.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/context_policy.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/credential_vault.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/durable_content.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/dynamic_workflow.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/eval.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/eval_dataset.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/event_stream.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/execution_evidence.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/execution_plane.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/facade.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/filtered_plane.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/kernel_journal.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/kernel_step.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/loop_driver.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/mcp_proxy_plane.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/os_profile.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/os_snapshot.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/output_schema.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/payload_store.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/process_sandbox_plane.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/provider_replay.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/reaction_checkpoint.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/reactive_session.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/reliability.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/remote_vpc_plane.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/replay_fixture.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/replay_provider.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/replay_sanitize.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/run_group.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/session_repair.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/sub_agent_orchestrator.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/tool_arguments.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/turn_policy.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/workflow_replay.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/workflow_store.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/runtime/worktree_plane.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/safety/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/safety/permissions.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/signals/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/signals/gateway.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/signals/scheduled.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/signals/types.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/skills/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/skills/loader.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/skills/registry.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/skills/watcher.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/tools/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/tools/builtin/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/tools/builtin/read_file.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/tools/errors.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/tools/execution.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/tools/registry.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/types/__init__.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/types/agent.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/types/content.py +0 -0
- {deepstrike-0.2.80 → deepstrike-0.2.81}/deepstrike/types/content_policy.py +0 -0
|
@@ -293,7 +293,7 @@ dependencies = [
|
|
|
293
293
|
|
|
294
294
|
[[package]]
|
|
295
295
|
name = "deepstrike-core"
|
|
296
|
-
version = "0.2.
|
|
296
|
+
version = "0.2.81"
|
|
297
297
|
dependencies = [
|
|
298
298
|
"compact_str",
|
|
299
299
|
"deepstrike-tokenizer",
|
|
@@ -307,7 +307,7 @@ dependencies = [
|
|
|
307
307
|
|
|
308
308
|
[[package]]
|
|
309
309
|
name = "deepstrike-lab"
|
|
310
|
-
version = "0.2.
|
|
310
|
+
version = "0.2.81"
|
|
311
311
|
dependencies = [
|
|
312
312
|
"serde",
|
|
313
313
|
"serde_json",
|
|
@@ -315,7 +315,7 @@ dependencies = [
|
|
|
315
315
|
|
|
316
316
|
[[package]]
|
|
317
317
|
name = "deepstrike-node"
|
|
318
|
-
version = "0.2.
|
|
318
|
+
version = "0.2.81"
|
|
319
319
|
dependencies = [
|
|
320
320
|
"compact_str",
|
|
321
321
|
"deepstrike-core",
|
|
@@ -327,7 +327,7 @@ dependencies = [
|
|
|
327
327
|
|
|
328
328
|
[[package]]
|
|
329
329
|
name = "deepstrike-py"
|
|
330
|
-
version = "0.2.
|
|
330
|
+
version = "0.2.81"
|
|
331
331
|
dependencies = [
|
|
332
332
|
"compact_str",
|
|
333
333
|
"deepstrike-core",
|
|
@@ -338,7 +338,7 @@ dependencies = [
|
|
|
338
338
|
|
|
339
339
|
[[package]]
|
|
340
340
|
name = "deepstrike-sdk"
|
|
341
|
-
version = "0.2.
|
|
341
|
+
version = "0.2.81"
|
|
342
342
|
dependencies = [
|
|
343
343
|
"async-stream",
|
|
344
344
|
"async-trait",
|
|
@@ -376,7 +376,7 @@ dependencies = [
|
|
|
376
376
|
|
|
377
377
|
[[package]]
|
|
378
378
|
name = "deepstrike-tokenizer"
|
|
379
|
-
version = "0.2.
|
|
379
|
+
version = "0.2.81"
|
|
380
380
|
dependencies = [
|
|
381
381
|
"pretty_assertions",
|
|
382
382
|
"tiktoken-rs",
|
|
@@ -384,7 +384,7 @@ dependencies = [
|
|
|
384
384
|
|
|
385
385
|
[[package]]
|
|
386
386
|
name = "deepstrike-wasm"
|
|
387
|
-
version = "0.2.
|
|
387
|
+
version = "0.2.81"
|
|
388
388
|
dependencies = [
|
|
389
389
|
"compact_str",
|
|
390
390
|
"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.81"
|
|
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.81" }
|
|
12
|
+
deepstrike-tokenizer = { path = "crates/deepstrike-tokenizer", version = "0.2.81" }
|
|
13
13
|
notify = "6"
|
|
14
14
|
serde = { version = "1", features = ["derive"] }
|
|
15
15
|
serde_json = "1"
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
//! Plan task 7.1 · the item graph: typed, directed edges between the items of one operation.
|
|
2
|
+
//!
|
|
3
|
+
//! The item table says what each item is; the graph says how items relate: which call a tool result
|
|
4
|
+
//! answers, which history item referenced which knowledge item and by what evidence, what a read
|
|
5
|
+
//! brought back, what a provider summary covers. Edges are recorded from committed input only (D1),
|
|
6
|
+
//! so a replay rebuilds the same graph, and they travel in the checkpoint.
|
|
7
|
+
//!
|
|
8
|
+
//! The graph is bounded. An edge whose two ends are both still resident is always kept; of the
|
|
9
|
+
//! edges that touch an item which has left, only the latest [`RETIRED_EDGE_CAP`] are kept and the
|
|
10
|
+
//! rest are counted in [`ItemGraph::omitted`]. In 0.2.81 the graph only reports: no decision reads it.
|
|
11
|
+
|
|
12
|
+
use std::collections::BTreeSet;
|
|
13
|
+
|
|
14
|
+
use crate::context::item::{ExternalEdge, HISTORY_ITEM_DETAIL_CAP, ItemEdge, ItemId};
|
|
15
|
+
|
|
16
|
+
/// Edges touching a retired item that the graph keeps, newest last.
|
|
17
|
+
pub const RETIRED_EDGE_CAP: usize = HISTORY_ITEM_DETAIL_CAP;
|
|
18
|
+
|
|
19
|
+
/// Edges the graph holds before it prunes against residency.
|
|
20
|
+
pub const EDGE_PRUNE_AT: usize = 1024;
|
|
21
|
+
|
|
22
|
+
#[derive(Debug, Clone, Default, PartialEq, Eq)]
|
|
23
|
+
pub struct ItemGraph {
|
|
24
|
+
edges: Vec<ItemEdge>,
|
|
25
|
+
omitted: u32,
|
|
26
|
+
/// Plan task 7.4 · edges to items of other runs, the latest [`RETIRED_EDGE_CAP`] kept.
|
|
27
|
+
external: Vec<ExternalEdge>,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
impl ItemGraph {
|
|
31
|
+
/// Record `edge` unless it is degenerate (an untracked end, a self-loop) or already recorded.
|
|
32
|
+
/// Returns whether it was added.
|
|
33
|
+
pub fn add(&mut self, edge: ItemEdge) -> bool {
|
|
34
|
+
if edge.from == 0 || edge.to == 0 || edge.from == edge.to {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if self
|
|
38
|
+
.edges
|
|
39
|
+
.iter()
|
|
40
|
+
.any(|e| e.from == edge.from && e.to == edge.to && e.relation == edge.relation)
|
|
41
|
+
{
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
self.edges.push(edge);
|
|
45
|
+
true
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/// Whether the graph has grown past [`EDGE_PRUNE_AT`] and should be pruned.
|
|
49
|
+
pub fn over_limit(&self) -> bool {
|
|
50
|
+
self.edges.len() > EDGE_PRUNE_AT
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// Keep every edge whose ends are both in `resident`, and the latest [`RETIRED_EDGE_CAP`] of
|
|
54
|
+
/// the others; count what is dropped. If resident edges alone still exceed
|
|
55
|
+
/// [`EDGE_PRUNE_AT`], the oldest go too.
|
|
56
|
+
pub fn prune(&mut self, resident: &BTreeSet<ItemId>) {
|
|
57
|
+
let live = |edge: &ItemEdge| resident.contains(&edge.from) && resident.contains(&edge.to);
|
|
58
|
+
let retired = self.edges.iter().filter(|edge| !live(edge)).count();
|
|
59
|
+
let mut drop_retired = retired.saturating_sub(RETIRED_EDGE_CAP);
|
|
60
|
+
let before = self.edges.len();
|
|
61
|
+
self.edges.retain(|edge| {
|
|
62
|
+
if live(edge) || drop_retired == 0 {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
drop_retired -= 1;
|
|
66
|
+
false
|
|
67
|
+
});
|
|
68
|
+
let overflow = self.edges.len().saturating_sub(EDGE_PRUNE_AT);
|
|
69
|
+
self.edges.drain(..overflow);
|
|
70
|
+
self.omitted = self.omitted.saturating_add((before - self.edges.len()) as u32);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/// Record an edge to another run's item; the oldest goes past [`RETIRED_EDGE_CAP`].
|
|
74
|
+
pub fn add_external(&mut self, edge: ExternalEdge) -> bool {
|
|
75
|
+
if edge.from == 0 || self.external.contains(&edge) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
self.external.push(edge);
|
|
79
|
+
if self.external.len() > RETIRED_EDGE_CAP {
|
|
80
|
+
self.external.remove(0);
|
|
81
|
+
self.omitted = self.omitted.saturating_add(1);
|
|
82
|
+
}
|
|
83
|
+
true
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
pub fn external(&self) -> &[ExternalEdge] {
|
|
87
|
+
&self.external
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
pub fn edges(&self) -> &[ItemEdge] {
|
|
91
|
+
&self.edges
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/// Edges dropped by pruning over the run.
|
|
95
|
+
pub fn omitted(&self) -> u32 {
|
|
96
|
+
self.omitted
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/// The recorded edges into `to`.
|
|
100
|
+
pub fn in_edges(&self, to: ItemId) -> impl Iterator<Item = &ItemEdge> {
|
|
101
|
+
self.edges.iter().filter(move |edge| edge.to == to)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/// Rebuild from a checkpoint.
|
|
105
|
+
pub fn restore(&mut self, edges: Vec<ItemEdge>, external: Vec<ExternalEdge>, omitted: u32) {
|
|
106
|
+
self.edges = edges;
|
|
107
|
+
self.external = external;
|
|
108
|
+
self.omitted = omitted;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#[cfg(test)]
|
|
113
|
+
mod tests {
|
|
114
|
+
use super::*;
|
|
115
|
+
use crate::context::item::Relation;
|
|
116
|
+
|
|
117
|
+
fn edge(from: ItemId, to: ItemId) -> ItemEdge {
|
|
118
|
+
ItemEdge { from, to, relation: Relation::ReferencesLexical, turn: 0 }
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
#[test]
|
|
122
|
+
fn degenerate_and_repeated_edges_are_not_recorded() {
|
|
123
|
+
let mut graph = ItemGraph::default();
|
|
124
|
+
assert!(!graph.add(edge(0, 3)));
|
|
125
|
+
assert!(!graph.add(edge(3, 3)));
|
|
126
|
+
assert!(graph.add(edge(4, 3)));
|
|
127
|
+
assert!(!graph.add(edge(4, 3)));
|
|
128
|
+
assert!(graph.add(ItemEdge { relation: Relation::ReferencesStrong, ..edge(4, 3) }));
|
|
129
|
+
assert_eq!(graph.in_edges(3).count(), 2);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
#[test]
|
|
133
|
+
fn pruning_keeps_resident_edges_and_the_latest_retired_ones() {
|
|
134
|
+
let mut graph = ItemGraph::default();
|
|
135
|
+
let total = RETIRED_EDGE_CAP as u64 + 5;
|
|
136
|
+
for from in 1..=total {
|
|
137
|
+
graph.add(edge(from + 1000, 1));
|
|
138
|
+
}
|
|
139
|
+
graph.add(edge(2, 3));
|
|
140
|
+
let resident = BTreeSet::from([2, 3]);
|
|
141
|
+
graph.prune(&resident);
|
|
142
|
+
assert_eq!(graph.omitted(), 5);
|
|
143
|
+
assert_eq!(graph.edges().len(), RETIRED_EDGE_CAP + 1);
|
|
144
|
+
assert_eq!(graph.edges()[0].from, 1006, "the oldest retired edges go first");
|
|
145
|
+
assert!(graph.edges().contains(&edge(2, 3)));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -19,6 +19,80 @@ pub const RECALL_LEASE_TURNS: u32 = 8;
|
|
|
19
19
|
/// (a message restored from a checkpoint without item ids).
|
|
20
20
|
pub type ItemId = u64;
|
|
21
21
|
|
|
22
|
+
/// Plan task 7.1 · what an edge of the item graph says about its two ends. Fixed and small: the
|
|
23
|
+
/// graph records relations the kernel already acts on, not arbitrary links.
|
|
24
|
+
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
|
|
25
|
+
#[serde(rename_all = "snake_case")]
|
|
26
|
+
pub enum Relation {
|
|
27
|
+
/// A tool result answers the call its assistant item made.
|
|
28
|
+
Answers,
|
|
29
|
+
/// A history item names a knowledge item (its key or record id).
|
|
30
|
+
ReferencesStrong,
|
|
31
|
+
/// A history item shares a knowledge item's distinctive terms.
|
|
32
|
+
ReferencesLexical,
|
|
33
|
+
/// The item that asked (`read_result`, `memory`) read the target back.
|
|
34
|
+
ReadsBack,
|
|
35
|
+
/// A provider summary stands in for the item it covered.
|
|
36
|
+
Summarizes,
|
|
37
|
+
/// A memory hit in history gives a recalled index line's record in full.
|
|
38
|
+
Expands,
|
|
39
|
+
/// Plan task 7.4 · a child run's copy of knowledge it inherited → the parent run's item.
|
|
40
|
+
InheritedFrom,
|
|
41
|
+
/// Plan task 7.4 · the item that read a dependency output back → the run that produced it.
|
|
42
|
+
DependsOn,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
impl Relation {
|
|
46
|
+
pub fn label(self) -> &'static str {
|
|
47
|
+
match self {
|
|
48
|
+
Self::Answers => "answers",
|
|
49
|
+
Self::ReferencesStrong => "references_strong",
|
|
50
|
+
Self::ReferencesLexical => "references_lexical",
|
|
51
|
+
Self::ReadsBack => "reads_back",
|
|
52
|
+
Self::Summarizes => "summarizes",
|
|
53
|
+
Self::Expands => "expands",
|
|
54
|
+
Self::InheritedFrom => "inherited_from",
|
|
55
|
+
Self::DependsOn => "depends_on",
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// One directed edge `from → to`, recorded on the turn the kernel observed it. Built only from
|
|
61
|
+
/// committed input (D1), so a replay rebuilds the same graph.
|
|
62
|
+
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
|
63
|
+
#[serde(deny_unknown_fields)]
|
|
64
|
+
pub struct ItemEdge {
|
|
65
|
+
pub from: ItemId,
|
|
66
|
+
pub to: ItemId,
|
|
67
|
+
pub relation: Relation,
|
|
68
|
+
#[serde(default)]
|
|
69
|
+
pub turn: u32,
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/// Plan task 7.4 · an item of another run: a parent operation's item, or a dependency's output.
|
|
73
|
+
#[derive(Debug, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
|
|
74
|
+
#[serde(deny_unknown_fields)]
|
|
75
|
+
pub struct ExternalItem {
|
|
76
|
+
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
77
|
+
pub operation: Option<String>,
|
|
78
|
+
/// The workflow agent whose output it is.
|
|
79
|
+
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
80
|
+
pub agent: Option<String>,
|
|
81
|
+
#[serde(default, skip_serializing_if = "is_zero_u64")]
|
|
82
|
+
pub item: ItemId,
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/// Plan task 7.4 · an edge from an item of this run to an item of another run.
|
|
86
|
+
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
87
|
+
#[serde(deny_unknown_fields)]
|
|
88
|
+
pub struct ExternalEdge {
|
|
89
|
+
pub from: ItemId,
|
|
90
|
+
pub to: ExternalItem,
|
|
91
|
+
pub relation: Relation,
|
|
92
|
+
#[serde(default)]
|
|
93
|
+
pub turn: u32,
|
|
94
|
+
}
|
|
95
|
+
|
|
22
96
|
/// The identity a history message carries as an item.
|
|
23
97
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
|
24
98
|
#[serde(deny_unknown_fields)]
|
|
@@ -330,6 +404,9 @@ impl HistoryItemRecord {
|
|
|
330
404
|
/// One knowledge-tier item.
|
|
331
405
|
#[derive(Debug, Clone)]
|
|
332
406
|
pub struct ContextItem {
|
|
407
|
+
/// From the operation's item allocator, shared with history; an upsert keeps it. `0` until the
|
|
408
|
+
/// manager admits the item (a partition used on its own never allocates).
|
|
409
|
+
pub id: ItemId,
|
|
333
410
|
/// `None` appends an unkeyed item. Keyed items upsert.
|
|
334
411
|
pub key: Option<CompactString>,
|
|
335
412
|
pub origin: ItemOrigin,
|
|
@@ -395,6 +472,7 @@ impl ContextItem {
|
|
|
395
472
|
) -> Self {
|
|
396
473
|
let lease = Lease::for_item(origin, pinned);
|
|
397
474
|
Self {
|
|
475
|
+
id: 0,
|
|
398
476
|
key,
|
|
399
477
|
origin,
|
|
400
478
|
lease,
|
|
@@ -441,6 +519,7 @@ impl ContextItem {
|
|
|
441
519
|
|
|
442
520
|
pub fn record(&self, end: Option<ItemEnd>) -> ItemRecord {
|
|
443
521
|
ItemRecord {
|
|
522
|
+
id: self.id,
|
|
444
523
|
key: self.key.as_ref().map(ToString::to_string),
|
|
445
524
|
origin: self.origin,
|
|
446
525
|
tokens: self.tokens,
|
|
@@ -454,6 +533,8 @@ impl ContextItem {
|
|
|
454
533
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
|
455
534
|
#[serde(deny_unknown_fields)]
|
|
456
535
|
pub struct ItemRecord {
|
|
536
|
+
#[serde(default, skip_serializing_if = "is_zero_u64")]
|
|
537
|
+
pub id: ItemId,
|
|
457
538
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
|
458
539
|
pub key: Option<String>,
|
|
459
540
|
pub origin: ItemOrigin,
|