loopx 0.4.8__py3-none-any.whl
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.
- loopx/__init__.py +5 -0
- loopx/agent_onboarding.py +654 -0
- loopx/agent_registry.py +112 -0
- loopx/ark_managed_agent_host.py +59 -0
- loopx/authority.py +805 -0
- loopx/benchmark.py +2875 -0
- loopx/benchmark_adapters/__init__.py +1 -0
- loopx/benchmark_adapters/agentissue.py +2644 -0
- loopx/benchmark_adapters/agents_last_exam.py +3998 -0
- loopx/benchmark_adapters/edgebench.py +322 -0
- loopx/benchmark_adapters/skillsbench.py +5978 -0
- loopx/benchmark_adapters/skillsbench_acp_failure_policy.py +143 -0
- loopx/benchmark_adapters/skillsbench_acp_process.py +31 -0
- loopx/benchmark_adapters/skillsbench_acp_relay.py +4832 -0
- loopx/benchmark_adapters/skillsbench_batch.py +124 -0
- loopx/benchmark_adapters/skillsbench_bridge_guard.py +209 -0
- loopx/benchmark_adapters/skillsbench_bridge_summary.py +203 -0
- loopx/benchmark_adapters/skillsbench_codex_goal_recovery.py +271 -0
- loopx/benchmark_adapters/skillsbench_codex_goal_trace.py +81 -0
- loopx/benchmark_adapters/skillsbench_codex_runtime.py +339 -0
- loopx/benchmark_adapters/skillsbench_dockerfile_runtime.py +467 -0
- loopx/benchmark_adapters/skillsbench_failure_signals.py +652 -0
- loopx/benchmark_adapters/skillsbench_proxy_runtime.py +327 -0
- loopx/benchmark_adapters/skillsbench_remote_bridge.py +402 -0
- loopx/benchmark_adapters/skillsbench_result_discovery.py +143 -0
- loopx/benchmark_adapters/skillsbench_runner_profile.py +436 -0
- loopx/benchmark_adapters/skillsbench_runner_source.py +99 -0
- loopx/benchmark_adapters/skillsbench_setup_preflight.py +771 -0
- loopx/benchmark_adapters/skillsbench_signals.py +15 -0
- loopx/benchmark_adapters/skillsbench_task_source.py +141 -0
- loopx/benchmark_adapters/skillsbench_turn_route.py +723 -0
- loopx/benchmark_adapters/skillsbench_turn_runtime.py +1069 -0
- loopx/benchmark_adapters/skillsbench_typed_repair.py +689 -0
- loopx/benchmark_adapters/skillsbench_uv_cache.py +111 -0
- loopx/benchmark_adapters/skillsbench_verifier_bootstrap.py +227 -0
- loopx/benchmark_adapters/skillsbench_verifier_cache.py +138 -0
- loopx/benchmark_adapters/terminal_bench.py +10078 -0
- loopx/benchmark_case_analysis.py +1276 -0
- loopx/benchmark_case_state.py +1079 -0
- loopx/benchmark_core/__init__.py +239 -0
- loopx/benchmark_core/adapter.py +84 -0
- loopx/benchmark_core/artifacts.py +517 -0
- loopx/benchmark_core/attempts.py +199 -0
- loopx/benchmark_core/container_exec.py +216 -0
- loopx/benchmark_core/io.py +68 -0
- loopx/benchmark_core/lifecycle.py +211 -0
- loopx/benchmark_core/loop_protocol.py +689 -0
- loopx/benchmark_core/observable_handles.py +348 -0
- loopx/benchmark_core/parity.py +256 -0
- loopx/benchmark_core/remote_closeout.py +482 -0
- loopx/benchmark_core/rounds.py +215 -0
- loopx/benchmark_core/route_profile.py +509 -0
- loopx/benchmark_core/run_permissions.py +206 -0
- loopx/benchmark_core/split_control.py +925 -0
- loopx/benchmark_core/turn_fidelity.py +326 -0
- loopx/benchmark_ledger.py +3793 -0
- loopx/benchmark_ledger_countability.py +372 -0
- loopx/benchmark_ledger_current.py +724 -0
- loopx/benchmark_trajectory.py +405 -0
- loopx/benchmarks/__init__.py +1 -0
- loopx/benchmarks/qualification/__init__.py +1 -0
- loopx/benchmarks/qualification/release_outcome_baseline.py +360 -0
- loopx/benchmarks/read_models/__init__.py +1 -0
- loopx/benchmarks/read_models/benchmark_attempt_accounting.py +53 -0
- loopx/benchmarks/read_models/benchmark_comparison.py +414 -0
- loopx/benchmarks/read_models/benchmark_event_timeline.py +113 -0
- loopx/benchmarks/read_models/benchmark_experiment_report.py +475 -0
- loopx/benchmarks/read_models/benchmark_learning_ledger.py +137 -0
- loopx/benchmarks/read_models/benchmark_lifecycle_contracts.py +228 -0
- loopx/benchmarks/read_models/benchmark_projection.py +723 -0
- loopx/benchmarks/read_models/benchmark_result.py +146 -0
- loopx/benchmarks/read_models/benchmark_run_execution_contract.py +116 -0
- loopx/benchmarks/read_models/benchmark_run_failure.py +157 -0
- loopx/benchmarks/read_models/benchmark_run_metrics.py +213 -0
- loopx/benchmarks/read_models/benchmark_run_post_execution.py +635 -0
- loopx/benchmarks/read_models/benchmark_run_pre_execution.py +541 -0
- loopx/benchmarks/read_models/benchmark_status_compaction.py +1255 -0
- loopx/benchmarks/read_models/benchmark_status_runner.py +780 -0
- loopx/benchmarks/read_models/goal_start_control_score.py +857 -0
- loopx/benchmarks/read_models/skillsbench_post_run_debug.py +746 -0
- loopx/benchmarks/read_models/skillsbench_verifier_attribution.py +269 -0
- loopx/bootstrap.py +1116 -0
- loopx/bootstrap_command_pack.py +2167 -0
- loopx/boundary_authority.py +199 -0
- loopx/canary/__init__.py +1 -0
- loopx/canary/maintainability_ratchet.py +800 -0
- loopx/canary/planner.py +1984 -0
- loopx/canary/premerge.py +1130 -0
- loopx/canary/qualification_profiles.py +309 -0
- loopx/canary/quality_surface_catalog.py +838 -0
- loopx/canary/release_profiles.py +51 -0
- loopx/canary/runner.py +1107 -0
- loopx/canary/smoke_health.py +581 -0
- loopx/canary/smoke_profiles.py +212 -0
- loopx/capabilities/__init__.py +0 -0
- loopx/capabilities/agent_turn_recall/__init__.py +17 -0
- loopx/capabilities/agent_turn_recall/cli.py +369 -0
- loopx/capabilities/agent_turn_recall/core.py +296 -0
- loopx/capabilities/auto_research/__init__.py +16 -0
- loopx/capabilities/auto_research/bootstrap_contract.py +157 -0
- loopx/capabilities/auto_research/cli.py +1468 -0
- loopx/capabilities/auto_research/core.py +11 -0
- loopx/capabilities/auto_research/defaults.py +79 -0
- loopx/capabilities/auto_research/demo_e2e.py +1848 -0
- loopx/capabilities/auto_research/demo_supervisor.py +186 -0
- loopx/capabilities/auto_research/evidence_packet.py +767 -0
- loopx/capabilities/auto_research/human_view.py +794 -0
- loopx/capabilities/auto_research/kernel.py +191 -0
- loopx/capabilities/auto_research/knn_demo_workspace.py +322 -0
- loopx/capabilities/auto_research/live_evidence.py +248 -0
- loopx/capabilities/auto_research/preset.py +176 -0
- loopx/capabilities/auto_research/research_state.py +1085 -0
- loopx/capabilities/auto_research/role_profiles.py +394 -0
- loopx/capabilities/auto_research/rollout_append.py +97 -0
- loopx/capabilities/auto_research/terminal_result_contract.py +422 -0
- loopx/capabilities/auto_research/terminal_result_projection.py +171 -0
- loopx/capabilities/auto_research/terminal_result_query.py +233 -0
- loopx/capabilities/auto_research/terminal_results.py +349 -0
- loopx/capabilities/auto_research/user_contract.py +190 -0
- loopx/capabilities/auto_research/worker_loop.py +163 -0
- loopx/capabilities/auto_research/worker_runtime.py +777 -0
- loopx/capabilities/auto_research/worker_skill/SKILL.md +343 -0
- loopx/capabilities/benchmark_toolkit/__init__.py +19 -0
- loopx/capabilities/benchmark_toolkit/integrity.py +387 -0
- loopx/capabilities/catalog.py +1875 -0
- loopx/capabilities/change_quality/__init__.py +19 -0
- loopx/capabilities/change_quality/cli.py +171 -0
- loopx/capabilities/change_quality/context.py +156 -0
- loopx/capabilities/change_quality/oracles.py +269 -0
- loopx/capabilities/change_quality/policy.py +34 -0
- loopx/capabilities/change_quality/receipt.py +482 -0
- loopx/capabilities/change_quality/result.py +493 -0
- loopx/capabilities/change_quality/scope.py +171 -0
- loopx/capabilities/change_quality/shadow.py +680 -0
- loopx/capabilities/content_ops/__init__.py +0 -0
- loopx/capabilities/content_ops/cli.py +649 -0
- loopx/capabilities/content_ops/connector_packets.py +164 -0
- loopx/capabilities/content_ops/item_lifecycle.py +1000 -0
- loopx/capabilities/content_ops/layout.py +451 -0
- loopx/capabilities/content_ops/markdown.py +456 -0
- loopx/capabilities/content_ops/schemas.py +51 -0
- loopx/capabilities/content_ops/social_browser_x.py +107 -0
- loopx/capabilities/content_ops/surface.py +1956 -0
- loopx/capabilities/content_ops/templates/layout-catalog-v0.json +72 -0
- loopx/capabilities/context_providers/__init__.py +36 -0
- loopx/capabilities/context_providers/base.py +189 -0
- loopx/capabilities/context_providers/factory.py +32 -0
- loopx/capabilities/context_providers/openviking.py +702 -0
- loopx/capabilities/context_providers/service_ownership.py +185 -0
- loopx/capabilities/decision_context/__init__.py +129 -0
- loopx/capabilities/decision_context/architecture.py +83 -0
- loopx/capabilities/decision_context/assembler.py +849 -0
- loopx/capabilities/decision_context/catalog_entry.py +195 -0
- loopx/capabilities/decision_context/cli.py +310 -0
- loopx/capabilities/decision_context/cursor_commit.py +535 -0
- loopx/capabilities/decision_context/outcome_feedback.py +352 -0
- loopx/capabilities/decision_context/packets.py +654 -0
- loopx/capabilities/decision_context/private_state.py +189 -0
- loopx/capabilities/decision_context/profile.py +453 -0
- loopx/capabilities/decision_context/providers.py +228 -0
- loopx/capabilities/decision_context/review_settlement.py +136 -0
- loopx/capabilities/decision_context/runtime.py +273 -0
- loopx/capabilities/decision_context/sources.py +415 -0
- loopx/capabilities/explore/__init__.py +1 -0
- loopx/capabilities/explore/activation.py +198 -0
- loopx/capabilities/explore/adaptive_replay_planner.py +221 -0
- loopx/capabilities/explore/child_replay_runtime.py +463 -0
- loopx/capabilities/explore/composition_frontier.py +291 -0
- loopx/capabilities/explore/counterfactual_runtime.py +578 -0
- loopx/capabilities/explore/episode_runtime.py +647 -0
- loopx/capabilities/explore/harness_checkpoint.py +171 -0
- loopx/capabilities/explore/harness_gate.py +115 -0
- loopx/capabilities/explore/harness_runtime.py +1124 -0
- loopx/capabilities/explore/replay_metrics.py +206 -0
- loopx/capabilities/explore/replay_runtime.py +1271 -0
- loopx/capabilities/explore/resource_portfolio.py +173 -0
- loopx/capabilities/explore/result_log.py +974 -0
- loopx/capabilities/explore/router_state.py +432 -0
- loopx/capabilities/explore/source_history_reconcile.py +255 -0
- loopx/capabilities/explore/speculative_scheduler.py +498 -0
- loopx/capabilities/explore/todo_branch_plan.py +650 -0
- loopx/capabilities/explore/todo_evidence.py +141 -0
- loopx/capabilities/explore/trace_runtime.py +284 -0
- loopx/capabilities/explore/worker_branch_plan.py +1257 -0
- loopx/capabilities/integration_branch/__init__.py +13 -0
- loopx/capabilities/integration_branch/cli.py +148 -0
- loopx/capabilities/integration_branch/core.py +916 -0
- loopx/capabilities/issue_fix/__init__.py +19 -0
- loopx/capabilities/issue_fix/acceptance_loop.py +1050 -0
- loopx/capabilities/issue_fix/candidate_evidence.py +503 -0
- loopx/capabilities/issue_fix/candidate_preflight.py +676 -0
- loopx/capabilities/issue_fix/cli.py +1822 -0
- loopx/capabilities/issue_fix/cli_input.py +87 -0
- loopx/capabilities/issue_fix/content_ops_cli.py +148 -0
- loopx/capabilities/issue_fix/discovered_issue_promotion.py +947 -0
- loopx/capabilities/issue_fix/explore_projection.py +710 -0
- loopx/capabilities/issue_fix/feasibility.py +542 -0
- loopx/capabilities/issue_fix/github_public.py +661 -0
- loopx/capabilities/issue_fix/intake_surface.py +832 -0
- loopx/capabilities/issue_fix/metadata_preview.py +218 -0
- loopx/capabilities/issue_fix/metrics_projection.py +1340 -0
- loopx/capabilities/issue_fix/metrics_supplement.py +634 -0
- loopx/capabilities/issue_fix/metrics_supplement_cli.py +127 -0
- loopx/capabilities/issue_fix/outcome_projection.py +1235 -0
- loopx/capabilities/issue_fix/periodic_report.py +189 -0
- loopx/capabilities/issue_fix/pr_description.py +418 -0
- loopx/capabilities/issue_fix/pr_gate_reconcile.py +496 -0
- loopx/capabilities/issue_fix/pr_gate_reconcile_cli.py +464 -0
- loopx/capabilities/issue_fix/pr_lifecycle.py +1327 -0
- loopx/capabilities/issue_fix/pr_lifecycle_rollout.py +85 -0
- loopx/capabilities/issue_fix/pr_monitor_materialization.py +257 -0
- loopx/capabilities/issue_fix/pr_review_ack.py +439 -0
- loopx/capabilities/issue_fix/provider_hooks.py +24 -0
- loopx/capabilities/issue_fix/repository_commit_evidence.py +186 -0
- loopx/capabilities/issue_fix/repository_context.py +457 -0
- loopx/capabilities/issue_fix/repository_memory.py +459 -0
- loopx/capabilities/issue_fix/repository_memory_provider.py +1454 -0
- loopx/capabilities/issue_fix/repository_snapshot.py +454 -0
- loopx/capabilities/issue_fix/reviewer_cli.py +917 -0
- loopx/capabilities/issue_fix/reviewer_notification.py +882 -0
- loopx/capabilities/issue_fix/reviewer_notification_drain.py +942 -0
- loopx/capabilities/issue_fix/reviewer_recommendation.py +1057 -0
- loopx/capabilities/issue_fix/reviewer_request.py +1282 -0
- loopx/capabilities/issue_fix/reward_memory.py +879 -0
- loopx/capabilities/issue_fix/workflow_plan.py +1286 -0
- loopx/capabilities/material_lifecycle/__init__.py +161 -0
- loopx/capabilities/material_lifecycle/_validation.py +183 -0
- loopx/capabilities/material_lifecycle/apply.py +672 -0
- loopx/capabilities/material_lifecycle/architecture.py +122 -0
- loopx/capabilities/material_lifecycle/cli.py +161 -0
- loopx/capabilities/material_lifecycle/decision_planning.py +470 -0
- loopx/capabilities/material_lifecycle/explore_execution.py +306 -0
- loopx/capabilities/material_lifecycle/intake.py +869 -0
- loopx/capabilities/material_lifecycle/inventory.py +147 -0
- loopx/capabilities/material_lifecycle/lifecycle.py +98 -0
- loopx/capabilities/material_lifecycle/preparation.py +147 -0
- loopx/capabilities/material_lifecycle/project_skill.py +83 -0
- loopx/capabilities/material_lifecycle/ranking.py +267 -0
- loopx/capabilities/material_lifecycle/readable_projection.py +500 -0
- loopx/capabilities/material_lifecycle/rebuild.py +480 -0
- loopx/capabilities/material_lifecycle/settlement.py +238 -0
- loopx/capabilities/periodic_report/__init__.py +71 -0
- loopx/capabilities/periodic_report/adapters.py +939 -0
- loopx/capabilities/periodic_report/archive.py +422 -0
- loopx/capabilities/periodic_report/bindings.py +705 -0
- loopx/capabilities/periodic_report/cli.py +277 -0
- loopx/capabilities/periodic_report/core.py +691 -0
- loopx/capabilities/periodic_report/extension_envelope.py +66 -0
- loopx/capabilities/periodic_report/presets.py +103 -0
- loopx/capabilities/periodic_report/profile.py +235 -0
- loopx/capabilities/periodic_report/project_progress.py +179 -0
- loopx/capabilities/periodic_report/triggers.py +452 -0
- loopx/capabilities/pr_review_queue/__init__.py +17 -0
- loopx/capabilities/pr_review_queue/core.py +506 -0
- loopx/capabilities/pr_review_queue/review_contract.py +506 -0
- loopx/capabilities/registry.py +192 -0
- loopx/capabilities/reward_memory/__init__.py +75 -0
- loopx/capabilities/reward_memory/application.py +819 -0
- loopx/capabilities/reward_memory/architecture.py +572 -0
- loopx/capabilities/reward_memory/candidate_review.py +511 -0
- loopx/capabilities/reward_memory/cli.py +469 -0
- loopx/capabilities/reward_memory/dogfood.py +574 -0
- loopx/capabilities/reward_memory/evaluation.py +296 -0
- loopx/capabilities/reward_memory/evaluation_fixtures.py +362 -0
- loopx/capabilities/reward_memory/experiment.py +567 -0
- loopx/capabilities/reward_memory/health.py +222 -0
- loopx/capabilities/reward_memory/ingestion.py +519 -0
- loopx/capabilities/reward_memory/registry.py +600 -0
- loopx/capabilities/reward_memory/runtime_hooks.py +312 -0
- loopx/capabilities/reward_memory/scoped_feedback.py +173 -0
- loopx/capabilities/semantic_preference/__init__.py +12 -0
- loopx/capabilities/semantic_preference/cli.py +189 -0
- loopx/capabilities/semantic_preference/contract.py +592 -0
- loopx/capabilities/semantic_preference/reward_memory.py +62 -0
- loopx/capabilities/value_connectors/__init__.py +1 -0
- loopx/capabilities/value_connectors/cli.py +401 -0
- loopx/capabilities/value_connectors/finance_extension_migration.py +108 -0
- loopx/capabilities/value_connectors/install_check.py +147 -0
- loopx/capabilities/value_connectors/planner.py +733 -0
- loopx/capabilities/value_connectors/source_map.py +446 -0
- loopx/claude_goal_baseline.py +138 -0
- loopx/claude_goal_mode/__init__.py +23 -0
- loopx/claude_goal_mode/hooks/goal_policy.py +212 -0
- loopx/claude_goal_mode/hooks/goal_state.py +139 -0
- loopx/claude_goal_mode/mcp/loopx_mcp.py +167 -0
- loopx/claude_goal_mode/scripts/connect.py +103 -0
- loopx/claude_goal_mode/scripts/goalmode_cmd.py +241 -0
- loopx/claude_goal_mode/scripts/install.py +328 -0
- loopx/claude_goal_mode/statusline/goal_status.py +97 -0
- loopx/cli.py +836 -0
- loopx/cli_commands/__init__.py +334 -0
- loopx/cli_commands/_host_thread.py +13 -0
- loopx/cli_commands/agentissue_runner_flow.py +447 -0
- loopx/cli_commands/agents_last_exam.py +160 -0
- loopx/cli_commands/agents_last_exam_baked_input.py +302 -0
- loopx/cli_commands/agents_last_exam_host_codex.py +374 -0
- loopx/cli_commands/agents_last_exam_launch_dry_run.py +372 -0
- loopx/cli_commands/agents_last_exam_local_plan.py +322 -0
- loopx/cli_commands/agents_last_exam_runner_source.py +352 -0
- loopx/cli_commands/agents_last_exam_task_material.py +335 -0
- loopx/cli_commands/agents_last_exam_validation_gate.py +236 -0
- loopx/cli_commands/benchmark_boundary.py +499 -0
- loopx/cli_commands/benchmark_dispatch.py +161 -0
- loopx/cli_commands/benchmark_release_outcome.py +123 -0
- loopx/cli_commands/benchmark_review_lifecycle.py +1275 -0
- loopx/cli_commands/benchmark_run_ledger.py +763 -0
- loopx/cli_commands/benchmark_run_ledger_case_analysis.py +249 -0
- loopx/cli_commands/benchmark_run_ledger_classification.py +45 -0
- loopx/cli_commands/benchmark_run_ledger_maintenance.py +486 -0
- loopx/cli_commands/benchmark_run_ledger_maintenance_registration.py +342 -0
- loopx/cli_commands/benchmark_run_ledger_maintenance_rendering.py +233 -0
- loopx/cli_commands/benchmark_run_ledger_parity.py +92 -0
- loopx/cli_commands/bootstrap_connect.py +238 -0
- loopx/cli_commands/canary.py +707 -0
- loopx/cli_commands/canary_release_qualification.py +79 -0
- loopx/cli_commands/capability.py +96 -0
- loopx/cli_commands/doctor.py +43 -0
- loopx/cli_commands/dreaming.py +143 -0
- loopx/cli_commands/edgebench.py +205 -0
- loopx/cli_commands/evidence_log.py +275 -0
- loopx/cli_commands/explore.py +989 -0
- loopx/cli_commands/explore_planning_commands.py +157 -0
- loopx/cli_commands/extension.py +271 -0
- loopx/cli_commands/first_run_report.py +73 -0
- loopx/cli_commands/goal_channel.py +656 -0
- loopx/cli_commands/handoff_mode.py +158 -0
- loopx/cli_commands/history.py +622 -0
- loopx/cli_commands/host_mode_plan.py +113 -0
- loopx/cli_commands/lark_inbox.py +431 -0
- loopx/cli_commands/lark_kanban.py +629 -0
- loopx/cli_commands/ml_experiment.py +321 -0
- loopx/cli_commands/multi_agent.py +211 -0
- loopx/cli_commands/opencode2_goal_worker.py +217 -0
- loopx/cli_commands/pr_review.py +167 -0
- loopx/cli_commands/presentation.py +218 -0
- loopx/cli_commands/preset.py +96 -0
- loopx/cli_commands/project.py +150 -0
- loopx/cli_commands/project_lifecycle.py +915 -0
- loopx/cli_commands/quota.py +859 -0
- loopx/cli_commands/quota_registration.py +241 -0
- loopx/cli_commands/quota_request.py +113 -0
- loopx/cli_commands/ready_score.py +110 -0
- loopx/cli_commands/registry_admin.py +975 -0
- loopx/cli_commands/registry_admin_configure.py +344 -0
- loopx/cli_commands/registry_admin_peer.py +84 -0
- loopx/cli_commands/registry_authority.py +218 -0
- loopx/cli_commands/review_batch.py +146 -0
- loopx/cli_commands/slash_commands.py +145 -0
- loopx/cli_commands/start_goal.py +251 -0
- loopx/cli_commands/starter.py +175 -0
- loopx/cli_commands/starter_bootstrap.py +179 -0
- loopx/cli_commands/starter_bootstrap_registration.py +198 -0
- loopx/cli_commands/starter_runtime_idle.py +107 -0
- loopx/cli_commands/starter_scheduler.py +207 -0
- loopx/cli_commands/starter_session_runtime.py +152 -0
- loopx/cli_commands/starter_visible_common.py +54 -0
- loopx/cli_commands/starter_visible_driver.py +161 -0
- loopx/cli_commands/starter_visible_pilot.py +278 -0
- loopx/cli_commands/status.py +867 -0
- loopx/cli_commands/status_registration.py +239 -0
- loopx/cli_commands/summary_all.py +222 -0
- loopx/cli_commands/support_control.py +809 -0
- loopx/cli_commands/support_control_registry.py +68 -0
- loopx/cli_commands/support_control_supervisor.py +289 -0
- loopx/cli_commands/task_lease.py +306 -0
- loopx/cli_commands/terminal_bench_adapter.py +717 -0
- loopx/cli_commands/terminal_bench_environment_result.py +1246 -0
- loopx/cli_commands/todo.py +940 -0
- loopx/cli_commands/todo_argument_validation.py +572 -0
- loopx/cli_commands/todo_event.py +114 -0
- loopx/cli_commands/turn.py +804 -0
- loopx/cli_commands/version.py +46 -0
- loopx/cli_commands/worker_bridge.py +659 -0
- loopx/cli_rollout.py +314 -0
- loopx/codex_cli_goal_tui.py +672 -0
- loopx/codex_cli_probe.py +1530 -0
- loopx/codex_cli_probe_markdown.py +935 -0
- loopx/codex_cli_runtime_probe.py +733 -0
- loopx/codex_cli_scheduler.py +564 -0
- loopx/codex_goal_baseline.py +620 -0
- loopx/configuration_catalog.py +617 -0
- loopx/configure_goal.py +1375 -0
- loopx/contract.py +996 -0
- loopx/control_plane/__init__.py +71 -0
- loopx/control_plane/agents/__init__.py +1 -0
- loopx/control_plane/agents/agent_lane_recommendation.py +516 -0
- loopx/control_plane/agents/agent_scope.py +1578 -0
- loopx/control_plane/agents/agent_scope_frontier.py +60 -0
- loopx/control_plane/agents/capability_gate.py +531 -0
- loopx/control_plane/agents/identity.py +140 -0
- loopx/control_plane/agents/legacy_migration.py +169 -0
- loopx/control_plane/agents/management_projection.py +658 -0
- loopx/control_plane/agents/material_frontier.py +608 -0
- loopx/control_plane/agents/material_handoff.py +156 -0
- loopx/control_plane/agents/multi_agent/__init__.py +1 -0
- loopx/control_plane/agents/multi_agent/codex_executable.py +207 -0
- loopx/control_plane/agents/multi_agent/collective_round_ledger.py +387 -0
- loopx/control_plane/agents/multi_agent/contract.py +474 -0
- loopx/control_plane/agents/multi_agent/recipe.py +110 -0
- loopx/control_plane/agents/multi_agent/role_successor.py +297 -0
- loopx/control_plane/agents/multi_agent/runtime_scripts.py +426 -0
- loopx/control_plane/agents/multi_agent/visible_launch_policy.py +149 -0
- loopx/control_plane/agents/multi_agent/visible_wake_scheduler.py +392 -0
- loopx/control_plane/agents/profile.py +216 -0
- loopx/control_plane/agents/runtime_model.py +73 -0
- loopx/control_plane/agents/subagent_activity.py +164 -0
- loopx/control_plane/agents/supervisor.py +544 -0
- loopx/control_plane/agents/supervisor_events.py +462 -0
- loopx/control_plane/agents/supervisor_inject.py +204 -0
- loopx/control_plane/agents/work_mode.py +56 -0
- loopx/control_plane/agents/workspace_guard.py +364 -0
- loopx/control_plane/effect_program.py +644 -0
- loopx/control_plane/goals/__init__.py +1 -0
- loopx/control_plane/goals/active_state_event_projection.py +103 -0
- loopx/control_plane/goals/active_state_metadata.py +47 -0
- loopx/control_plane/goals/active_state_sections.py +58 -0
- loopx/control_plane/goals/configure_goal_service.py +354 -0
- loopx/control_plane/goals/contract_health.py +132 -0
- loopx/control_plane/goals/dreaming.py +152 -0
- loopx/control_plane/goals/global_registry_health.py +199 -0
- loopx/control_plane/goals/global_registry_shadow.py +33 -0
- loopx/control_plane/goals/goal_channel.py +34 -0
- loopx/control_plane/goals/goal_channel_projection.py +560 -0
- loopx/control_plane/goals/goal_frontier/__init__.py +1917 -0
- loopx/control_plane/goals/goal_frontier/ack_policy.py +149 -0
- loopx/control_plane/goals/goal_frontier/outcome_continuity.py +437 -0
- loopx/control_plane/goals/goal_frontier/replan_rules.py +210 -0
- loopx/control_plane/goals/goal_frontier/semantic_history.py +314 -0
- loopx/control_plane/goals/goal_frontier/terminal.py +180 -0
- loopx/control_plane/goals/goal_vision.py +443 -0
- loopx/control_plane/goals/goal_vision_policy.py +36 -0
- loopx/control_plane/goals/goal_vision_state.py +62 -0
- loopx/control_plane/goals/goal_vision_wait.py +290 -0
- loopx/control_plane/goals/path_resolution.py +20 -0
- loopx/control_plane/goals/start_contract.py +206 -0
- loopx/control_plane/goals/vision_checkpoint.py +92 -0
- loopx/control_plane/handoff/__init__.py +1 -0
- loopx/control_plane/handoff/cross_runtime_impl_review.py +311 -0
- loopx/control_plane/handoff/delivery_contract.py +161 -0
- loopx/control_plane/handoff/handoff_runs.py +71 -0
- loopx/control_plane/handoff/project_handoff.py +155 -0
- loopx/control_plane/handoff/review_batch.py +463 -0
- loopx/control_plane/handoff/review_packet_context.py +216 -0
- loopx/control_plane/heartbeat/agent.py +173 -0
- loopx/control_plane/heartbeat/budget.py +66 -0
- loopx/control_plane/heartbeat/builder.py +501 -0
- loopx/control_plane/heartbeat/host.py +64 -0
- loopx/control_plane/heartbeat/rules.py +68 -0
- loopx/control_plane/heartbeat/task_body.py +759 -0
- loopx/control_plane/heartbeat/visible_goal.py +86 -0
- loopx/control_plane/projects/__init__.py +1 -0
- loopx/control_plane/projects/contract.py +25 -0
- loopx/control_plane/projects/registry.py +663 -0
- loopx/control_plane/quota/__init__.py +1 -0
- loopx/control_plane/quota/cli_projection.py +704 -0
- loopx/control_plane/quota/decision_summary.py +431 -0
- loopx/control_plane/quota/effect_program.py +152 -0
- loopx/control_plane/quota/error_codes.py +19 -0
- loopx/control_plane/quota/goal_boundary.py +464 -0
- loopx/control_plane/quota/heartbeat_receipt.py +277 -0
- loopx/control_plane/quota/heartbeat_recommendation.py +718 -0
- loopx/control_plane/quota/host_poll_receipts.py +162 -0
- loopx/control_plane/quota/live_decision.py +142 -0
- loopx/control_plane/quota/monitor_poll.py +786 -0
- loopx/control_plane/quota/policy_constants.py +40 -0
- loopx/control_plane/quota/projection_repair.py +262 -0
- loopx/control_plane/quota/recent_runs.py +210 -0
- loopx/control_plane/quota/scheduler_ack.py +490 -0
- loopx/control_plane/quota/selected_todo_projection.py +139 -0
- loopx/control_plane/quota/settlement.py +437 -0
- loopx/control_plane/quota/settlement_cli.py +246 -0
- loopx/control_plane/quota/settlement_validation.py +64 -0
- loopx/control_plane/quota/settlement_workspace_causality.py +180 -0
- loopx/control_plane/quota/should_run.py +249 -0
- loopx/control_plane/quota/should_run_packet.py +1165 -0
- loopx/control_plane/quota/should_run_prepare.py +675 -0
- loopx/control_plane/quota/slot_accounting.py +1123 -0
- loopx/control_plane/quota/spend_sources.py +11 -0
- loopx/control_plane/quota/stall_repair.py +397 -0
- loopx/control_plane/quota/states.py +29 -0
- loopx/control_plane/quota/task_orchestration.py +448 -0
- loopx/control_plane/quota/task_orchestration_admission.py +497 -0
- loopx/control_plane/quota/turn_envelope.py +889 -0
- loopx/control_plane/quota/usage_summary.py +140 -0
- loopx/control_plane/reward_memory.py +43 -0
- loopx/control_plane/runtime/__init__.py +2 -0
- loopx/control_plane/runtime/active_user_assisted_pilot.py +275 -0
- loopx/control_plane/runtime/agent_scoped_evidence_log.py +435 -0
- loopx/control_plane/runtime/decision_freshness.py +203 -0
- loopx/control_plane/runtime/event_ledger.py +197 -0
- loopx/control_plane/runtime/event_store_migration_bridge.py +196 -0
- loopx/control_plane/runtime/goal_project_route.py +70 -0
- loopx/control_plane/runtime/local_state_write_correctness.py +242 -0
- loopx/control_plane/runtime/promotion_readiness.py +152 -0
- loopx/control_plane/runtime/public_safety.py +120 -0
- loopx/control_plane/runtime/run_artifacts.py +78 -0
- loopx/control_plane/runtime/run_compaction.py +397 -0
- loopx/control_plane/runtime/run_context_retention.py +241 -0
- loopx/control_plane/runtime/run_history.py +132 -0
- loopx/control_plane/runtime/run_index_duplicates.py +205 -0
- loopx/control_plane/runtime/run_index_rebuild.py +263 -0
- loopx/control_plane/runtime/run_ingest_health.py +336 -0
- loopx/control_plane/runtime/runtime_projection_route.py +624 -0
- loopx/control_plane/runtime/runtime_projection_writer.py +98 -0
- loopx/control_plane/runtime/session_runtime.py +339 -0
- loopx/control_plane/runtime/shared_runtime_material_projection.py +332 -0
- loopx/control_plane/runtime/shared_runtime_refresh_projection.py +183 -0
- loopx/control_plane/runtime/stale_latest_run.py +90 -0
- loopx/control_plane/runtime/status_classifications.py +49 -0
- loopx/control_plane/runtime/status_projection_cache.py +235 -0
- loopx/control_plane/runtime/stride_observation.py +144 -0
- loopx/control_plane/runtime/time.py +39 -0
- loopx/control_plane/runtime/trajectory_hygiene.py +149 -0
- loopx/control_plane/runtime/validation_command.py +69 -0
- loopx/control_plane/scheduler/__init__.py +1 -0
- loopx/control_plane/scheduler/ack.py +329 -0
- loopx/control_plane/scheduler/arbitration.py +188 -0
- loopx/control_plane/scheduler/automation_liveness.py +183 -0
- loopx/control_plane/scheduler/execution_context.py +555 -0
- loopx/control_plane/scheduler/external_evidence_observation.py +428 -0
- loopx/control_plane/scheduler/monitor_display.py +143 -0
- loopx/control_plane/scheduler/monitor_poll_policy.py +161 -0
- loopx/control_plane/scheduler/monitor_poll_writeback.py +351 -0
- loopx/control_plane/scheduler/monitor_target.py +64 -0
- loopx/control_plane/scheduler/monitor_todo.py +146 -0
- loopx/control_plane/scheduler/monitor_wait.py +237 -0
- loopx/control_plane/scheduler/scheduler_hint.py +1284 -0
- loopx/control_plane/scheduler/state.py +354 -0
- loopx/control_plane/scheduler/state_transition_rules.py +179 -0
- loopx/control_plane/scheduler/time.py +10 -0
- loopx/control_plane/settlement_driver.py +293 -0
- loopx/control_plane/status/__init__.py +6 -0
- loopx/control_plane/status/active_state_projection.py +105 -0
- loopx/control_plane/status/agent_lane_projection.py +375 -0
- loopx/control_plane/status/attention_projection.py +74 -0
- loopx/control_plane/status/autonomous_replan_projection.py +103 -0
- loopx/control_plane/status/collection.py +140 -0
- loopx/control_plane/status/contract_projection.py +31 -0
- loopx/control_plane/status/dreaming_projection.py +52 -0
- loopx/control_plane/status/goal_attention_projection.py +157 -0
- loopx/control_plane/status/lifecycle_projection.py +110 -0
- loopx/control_plane/status/monitor_display_projection.py +69 -0
- loopx/control_plane/status/registry_health_projection.py +75 -0
- loopx/control_plane/status/run_projection.py +70 -0
- loopx/control_plane/status/runtime_summaries.py +161 -0
- loopx/control_plane/testing/__init__.py +1 -0
- loopx/control_plane/testing/actual_default_model_behavior_portfolio.py +1371 -0
- loopx/control_plane/testing/canary_harness.py +182 -0
- loopx/control_plane/testing/capability_monitor_repair_tool_behavior.py +674 -0
- loopx/control_plane/testing/cli_output_budget.py +807 -0
- loopx/control_plane/testing/cli_output_differential.py +250 -0
- loopx/control_plane/testing/cli_output_semantics.py +87 -0
- loopx/control_plane/testing/control_plane_composition_scenarios.py +225 -0
- loopx/control_plane/testing/decision_replay.py +268 -0
- loopx/control_plane/testing/doubao_model_behavior_actor.py +559 -0
- loopx/control_plane/testing/model_behavior_corpus.py +344 -0
- loopx/control_plane/testing/model_behavior_qualification.py +769 -0
- loopx/control_plane/testing/model_behavior_retained_cases.py +235 -0
- loopx/control_plane/testing/model_tool_behavior.py +536 -0
- loopx/control_plane/testing/onboarding_model_behavior_qualification.py +642 -0
- loopx/control_plane/testing/quota_fixtures.py +208 -0
- loopx/control_plane/testing/quota_should_run_parity.py +57 -0
- loopx/control_plane/testing/release_commit_qualification.py +671 -0
- loopx/control_plane/testing/replan_semantic_action_behavior.py +1302 -0
- loopx/control_plane/testing/scoped_gate_successor_tool_behavior.py +527 -0
- loopx/control_plane/testing/selected_todo_tool_behavior.py +1002 -0
- loopx/control_plane/testing/terminal_settlement_tool_behavior.py +656 -0
- loopx/control_plane/todos/__init__.py +1 -0
- loopx/control_plane/todos/active_state_editing.py +296 -0
- loopx/control_plane/todos/active_state_todo_parser.py +138 -0
- loopx/control_plane/todos/active_state_todos.py +175 -0
- loopx/control_plane/todos/addition.py +103 -0
- loopx/control_plane/todos/claim_visibility.py +253 -0
- loopx/control_plane/todos/completed_archive.py +139 -0
- loopx/control_plane/todos/completion_fence.py +49 -0
- loopx/control_plane/todos/completion_policy.py +153 -0
- loopx/control_plane/todos/completion_validation.py +248 -0
- loopx/control_plane/todos/completion_validation_accountability.py +27 -0
- loopx/control_plane/todos/completion_validation_projection.py +57 -0
- loopx/control_plane/todos/contract.py +1476 -0
- loopx/control_plane/todos/decision_scope.py +554 -0
- loopx/control_plane/todos/deferred_resume.py +546 -0
- loopx/control_plane/todos/durable_completion.py +201 -0
- loopx/control_plane/todos/event_writeback.py +484 -0
- loopx/control_plane/todos/frontier_deadline.py +132 -0
- loopx/control_plane/todos/handoff_gate.py +283 -0
- loopx/control_plane/todos/handoff_mode.py +444 -0
- loopx/control_plane/todos/handoff_note.py +202 -0
- loopx/control_plane/todos/line_update.py +361 -0
- loopx/control_plane/todos/list_projection.py +205 -0
- loopx/control_plane/todos/markdown.py +199 -0
- loopx/control_plane/todos/monitor_metadata.py +88 -0
- loopx/control_plane/todos/mutation_authority.py +299 -0
- loopx/control_plane/todos/projection.py +655 -0
- loopx/control_plane/todos/quota_summary.py +1138 -0
- loopx/control_plane/todos/route_continuation.py +267 -0
- loopx/control_plane/todos/succession_warning.py +174 -0
- loopx/control_plane/todos/summary_item.py +223 -0
- loopx/control_plane/todos/text.py +30 -0
- loopx/control_plane/todos/todo_index.py +226 -0
- loopx/control_plane/todos/todo_summary.py +1458 -0
- loopx/control_plane/todos/unblock_resume.py +326 -0
- loopx/control_plane/todos/user_gate.py +263 -0
- loopx/control_plane/todos/write_hint.py +63 -0
- loopx/control_plane/todos/write_policy.py +135 -0
- loopx/control_plane/turn_driver/__init__.py +85 -0
- loopx/control_plane/turn_driver/codex_cli.py +502 -0
- loopx/control_plane/turn_driver/driver.py +355 -0
- loopx/control_plane/turn_driver/executor.py +1468 -0
- loopx/control_plane/turn_driver/loop_controller.py +669 -0
- loopx/control_plane/turn_driver/settlement.py +318 -0
- loopx/control_plane/turn_driver/transaction.py +375 -0
- loopx/control_plane/work_items/__init__.py +1 -0
- loopx/control_plane/work_items/attention_fields.py +56 -0
- loopx/control_plane/work_items/attention_item.py +77 -0
- loopx/control_plane/work_items/attention_queue.py +322 -0
- loopx/control_plane/work_items/attention_routing.py +213 -0
- loopx/control_plane/work_items/autonomous_candidates.py +135 -0
- loopx/control_plane/work_items/autonomous_replan_ack.py +276 -0
- loopx/control_plane/work_items/autonomous_replan_obligation.py +786 -0
- loopx/control_plane/work_items/backlog_hygiene.py +59 -0
- loopx/control_plane/work_items/capability_monitor_fallback.py +221 -0
- loopx/control_plane/work_items/delivery_batch_scale.py +66 -0
- loopx/control_plane/work_items/delivery_outcome.py +152 -0
- loopx/control_plane/work_items/delivery_signals.py +113 -0
- loopx/control_plane/work_items/execution_obligation.py +235 -0
- loopx/control_plane/work_items/goal_route_hint.py +320 -0
- loopx/control_plane/work_items/interaction_contract.py +1540 -0
- loopx/control_plane/work_items/issue_meta_surface.py +159 -0
- loopx/control_plane/work_items/lifecycle.py +139 -0
- loopx/control_plane/work_items/operator_inbox.py +266 -0
- loopx/control_plane/work_items/outcome_followthrough.py +69 -0
- loopx/control_plane/work_items/primary_action.py +326 -0
- loopx/control_plane/work_items/progress_observation.py +630 -0
- loopx/control_plane/work_items/project_asset.py +675 -0
- loopx/control_plane/work_items/repair_delta.py +693 -0
- loopx/control_plane/work_items/runtime_capability_reentry.py +168 -0
- loopx/control_plane/work_items/semantic_replan_writeback.py +177 -0
- loopx/control_plane/work_items/status_contract.py +49 -0
- loopx/control_plane/work_items/task_graph.py +1046 -0
- loopx/control_plane/work_items/task_lease.py +1254 -0
- loopx/control_plane/work_items/task_lease_settlement.py +422 -0
- loopx/control_plane/work_items/work_lane.py +510 -0
- loopx/control_plane/work_items/work_lane_context.py +161 -0
- loopx/demo.py +247 -0
- loopx/diagnose.py +633 -0
- loopx/doctor.py +1251 -0
- loopx/domain_packs/__init__.py +1 -0
- loopx/domain_packs/issue_fix.py +571 -0
- loopx/domain_packs/ml_experiment.py +854 -0
- loopx/domain_state.py +137 -0
- loopx/dreaming.py +706 -0
- loopx/entrypoint.py +16 -0
- loopx/event_sourced_state.py +981 -0
- loopx/execution_profile.py +286 -0
- loopx/experiments/__init__.py +1 -0
- loopx/experiments/planner_worker/__init__.py +1 -0
- loopx/experiments/planner_worker/contract.py +523 -0
- loopx/experiments/planner_worker/runtime.py +391 -0
- loopx/experiments/planner_worker/traex.py +461 -0
- loopx/explore_graph.py +11 -0
- loopx/extensions/__init__.py +1 -0
- loopx/extensions/bundled.py +28 -0
- loopx/extensions/execution_envelope.py +126 -0
- loopx/extensions/lark/__init__.py +11 -0
- loopx/extensions/lark/event_collector.py +478 -0
- loopx/extensions/lark/event_collector_runtime.py +506 -0
- loopx/extensions/lark/event_inbox.py +454 -0
- loopx/extensions/lark/extension.toml +88 -0
- loopx/extensions/lark/goal_channel.py +44 -0
- loopx/extensions/lark/goal_channel_contracts.py +388 -0
- loopx/extensions/lark/goal_channel_lifecycle.py +218 -0
- loopx/extensions/lark/goal_channel_runtime.py +792 -0
- loopx/extensions/lark/goal_channel_setup.py +805 -0
- loopx/extensions/lark/goal_channel_targets.py +215 -0
- loopx/extensions/lark/goal_channel_transport.py +281 -0
- loopx/extensions/lark/inbox_reactions.py +650 -0
- loopx/extensions/lark/inbox_reply.py +430 -0
- loopx/extensions/lark/presentation/__init__.py +11 -0
- loopx/extensions/lark/presentation/explore_results.py +2276 -0
- loopx/extensions/lark/presentation/explore_singleflight.py +127 -0
- loopx/extensions/lark/presentation/explore_source_guard.py +121 -0
- loopx/extensions/lark/presentation/explore_stage_document.py +703 -0
- loopx/extensions/lark/presentation/explore_visual_integrity.py +122 -0
- loopx/extensions/lark/presentation/explore_visual_readback.py +452 -0
- loopx/extensions/lark/presentation/explore_visual_styles.py +156 -0
- loopx/extensions/lark/presentation/issue_fix_surface.py +612 -0
- loopx/extensions/lark/presentation/kanban.py +2791 -0
- loopx/extensions/lark/presentation/message_card.py +112 -0
- loopx/extensions/lark/presentation/periodic_report.py +261 -0
- loopx/extensions/lark/presentation/projection_rows.py +600 -0
- loopx/extensions/lark/presentation/record_io.py +95 -0
- loopx/extensions/lark/presentation/sync_receipt.py +145 -0
- loopx/extensions/lark/private_json.py +40 -0
- loopx/extensions/lark/provider.py +86 -0
- loopx/extensions/lark/reviewer_notification.py +604 -0
- loopx/extensions/manifest.py +385 -0
- loopx/extensions/openviking_periodic_report/__init__.py +17 -0
- loopx/extensions/openviking_periodic_report/activation.py +173 -0
- loopx/extensions/openviking_periodic_report/extension.toml +17 -0
- loopx/extensions/openviking_periodic_report/provider.py +355 -0
- loopx/extensions/openviking_periodic_report/sink.py +117 -0
- loopx/extensions/openviking_semantic_preference/__init__.py +5 -0
- loopx/extensions/openviking_semantic_preference/extension.toml +16 -0
- loopx/extensions/openviking_semantic_preference/history_export.py +484 -0
- loopx/extensions/openviking_semantic_preference/project_peer.py +68 -0
- loopx/extensions/openviking_semantic_preference/provider.py +312 -0
- loopx/extensions/presentation.py +979 -0
- loopx/extensions/process_runtime.py +204 -0
- loopx/extensions/readiness.py +168 -0
- loopx/extensions/runtime.py +931 -0
- loopx/extensions/scaffold.py +335 -0
- loopx/feedback.py +581 -0
- loopx/file_lock.py +382 -0
- loopx/global_registry.py +842 -0
- loopx/global_risks.py +970 -0
- loopx/global_todos.py +568 -0
- loopx/handoff_budget.py +28 -0
- loopx/heartbeat_prequota.py +80 -0
- loopx/heartbeat_prompt.py +159 -0
- loopx/help_surface.py +516 -0
- loopx/history.py +1507 -0
- loopx/host_loop_activation.py +1311 -0
- loopx/host_mode_planner.py +991 -0
- loopx/install_contract.py +1 -0
- loopx/interface_budget.py +196 -0
- loopx/long_task_cadence.py +208 -0
- loopx/materials.py +185 -0
- loopx/ml_experiment.py +3 -0
- loopx/onboarding.py +214 -0
- loopx/opencode2_goal_mode/README.md +81 -0
- loopx/opencode2_goal_mode/__init__.py +9 -0
- loopx/opencode2_goal_mode/opencode2-goal-worker.mjs +1018 -0
- loopx/opencode_goal_mode/README.md +99 -0
- loopx/opencode_goal_mode/__init__.py +13 -0
- loopx/opencode_goal_mode/goal-bridge-runtime.mjs +858 -0
- loopx/opencode_goal_mode/loopx-goal.js +8 -0
- loopx/operator_gate.py +420 -0
- loopx/orchestration.py +127 -0
- loopx/paths.py +59 -0
- loopx/pi_goal_mode/README.md +67 -0
- loopx/pi_goal_mode/__init__.py +13 -0
- loopx/pi_goal_mode/loopx-goal.ts +254 -0
- loopx/pi_goal_mode/pi-goal-loop-runtime.mjs +574 -0
- loopx/pr_review.py +1206 -0
- loopx/presentation/__init__.py +1 -0
- loopx/presentation/explore_views.py +1334 -0
- loopx/presentation/markdown.py +61 -0
- loopx/presentation/projection_source_reconcile.py +140 -0
- loopx/presentation/public_safety.py +42 -0
- loopx/presentation/renderers/__init__.py +17 -0
- loopx/presentation/renderers/goal_channel_html.py +269 -0
- loopx/presentation/renderers/periodic_report_html.py +786 -0
- loopx/presentation/renderers/periodic_report_markdown.py +184 -0
- loopx/presentation/renderers/quota_event_markdown.py +116 -0
- loopx/presentation/renderers/quota_markdown.py +1112 -0
- loopx/presentation/renderers/status_markdown.py +1570 -0
- loopx/presentation/renderers/trajectory_hygiene_markdown.py +39 -0
- loopx/presentation/renderers/turn_envelope_markdown.py +33 -0
- loopx/presentation/sinks/__init__.py +5 -0
- loopx/presentation/sinks/openviking_periodic_report.py +7 -0
- loopx/presentation/static_site.py +691 -0
- loopx/presets.py +369 -0
- loopx/project_alias.py +217 -0
- loopx/project_map.py +589 -0
- loopx/project_prompt.py +1153 -0
- loopx/project_skill_cli.py +125 -0
- loopx/project_skill_delivery.py +470 -0
- loopx/project_uninstall.py +462 -0
- loopx/promotion_gate.py +197 -0
- loopx/quota.py +1197 -0
- loopx/ready_score.py +413 -0
- loopx/registry.py +621 -0
- loopx/registry_writability.py +64 -0
- loopx/release_candidate.py +148 -0
- loopx/release_manifest.py +316 -0
- loopx/repository_identity.py +100 -0
- loopx/review_packet.py +1024 -0
- loopx/rollout_event_log.py +505 -0
- loopx/runtime.py +112 -0
- loopx/self_update.py +750 -0
- loopx/session_runtime.py +418 -0
- loopx/skill_install_readback.py +500 -0
- loopx/slash_command_install.py +1393 -0
- loopx/slash_commands.py +264 -0
- loopx/state_backup.py +573 -0
- loopx/state_migration.py +350 -0
- loopx/state_projection.py +809 -0
- loopx/state_refresh.py +1416 -0
- loopx/status.py +1383 -0
- loopx/status_server.py +935 -0
- loopx/summary_all.py +725 -0
- loopx/terminal_bench_agent.py +2056 -0
- loopx/thread_agent_binding.py +408 -0
- loopx/todo_followups.py +168 -0
- loopx/todo_suggestion_prompt.py +204 -0
- loopx/todos.py +2229 -0
- loopx/turn_identity.py +17 -0
- loopx/upgrade.py +1083 -0
- loopx/visible_governance.py +667 -0
- loopx/visible_multi_agent_launcher.py +1253 -0
- loopx/visible_multi_agent_tmux.py +429 -0
- loopx/worker_bridge.py +1574 -0
- loopx-0.4.8.dist-info/METADATA +708 -0
- loopx-0.4.8.dist-info/RECORD +811 -0
- loopx-0.4.8.dist-info/WHEEL +5 -0
- loopx-0.4.8.dist-info/entry_points.txt +5 -0
- loopx-0.4.8.dist-info/licenses/LICENSE +202 -0
- loopx-0.4.8.dist-info/licenses/LICENSE-MIT +21 -0
- loopx-0.4.8.dist-info/licenses/NOTICE +6 -0
- loopx-0.4.8.dist-info/top_level.txt +1 -0
loopx/status.py
ADDED
|
@@ -0,0 +1,1383 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import re
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
7
|
+
from .control_plane import compact_control_plane_policy
|
|
8
|
+
from .control_plane.status.collection import (
|
|
9
|
+
StatusCollectionContext,
|
|
10
|
+
collect_status as _collect_status_read_model,
|
|
11
|
+
)
|
|
12
|
+
from .control_plane.status.runtime_summaries import (
|
|
13
|
+
StatusRuntimeSummaryContext,
|
|
14
|
+
build_status_runtime_summaries as _build_status_runtime_summaries_read_model,
|
|
15
|
+
)
|
|
16
|
+
from .contract import check_contract
|
|
17
|
+
from .control_plane.work_items.delivery_batch_scale import (
|
|
18
|
+
SMALL_DELIVERY_BATCH_SCALES as STRUCTURED_SMALL_DELIVERY_BATCH_SCALES,
|
|
19
|
+
UNKNOWN_DELIVERY_BATCH_SCALE,
|
|
20
|
+
)
|
|
21
|
+
from .control_plane.work_items.delivery_outcome import (
|
|
22
|
+
DELIVERY_OUTCOME_NOT_CONFIGURED,
|
|
23
|
+
delivery_turn_kind_for_run,
|
|
24
|
+
)
|
|
25
|
+
from .doctor import (
|
|
26
|
+
PROMOTION_READINESS_CLASSIFICATIONS,
|
|
27
|
+
PROMOTION_READINESS_FRESHNESS_HOURS,
|
|
28
|
+
add_promotion_readiness_freshness,
|
|
29
|
+
latest_promotion_readiness_event,
|
|
30
|
+
)
|
|
31
|
+
from .execution_profile import (
|
|
32
|
+
compact_execution_profile,
|
|
33
|
+
execution_profile_outcome_floor,
|
|
34
|
+
)
|
|
35
|
+
from .control_plane.goals.goal_channel_projection import build_goal_channel_projection
|
|
36
|
+
from .handoff_budget import handoff_budget_contract
|
|
37
|
+
from .history import collect_history, load_registry
|
|
38
|
+
from .history import STATUS_NEUTRAL_CLASSIFICATIONS as HISTORY_STATUS_NEUTRAL_CLASSIFICATIONS
|
|
39
|
+
from .interface_budget import interface_budget_cadence_for_runs
|
|
40
|
+
from .long_task_cadence import build_long_task_cadence_hint
|
|
41
|
+
from .orchestration import compact_orchestration_policy
|
|
42
|
+
from .paths import resolve_runtime_root
|
|
43
|
+
from .control_plane.work_items.task_graph import (
|
|
44
|
+
build_task_graph_projection as _build_task_graph_projection_read_model,
|
|
45
|
+
)
|
|
46
|
+
from .control_plane.work_items.project_asset import (
|
|
47
|
+
TODO_PROJECTION_DETAIL_POINTER_SCHEMA_VERSION as TODO_PROJECTION_DETAIL_POINTER_SCHEMA_VERSION,
|
|
48
|
+
TODO_PROJECTION_VIEW_SCHEMA_VERSION as TODO_PROJECTION_VIEW_SCHEMA_VERSION,
|
|
49
|
+
attach_active_state_project_asset_fields as _attach_active_state_project_asset_fields,
|
|
50
|
+
build_project_asset,
|
|
51
|
+
enrich_project_asset as _enrich_project_asset_read_model,
|
|
52
|
+
project_asset_handoff_check_projection,
|
|
53
|
+
project_asset_latest_validation,
|
|
54
|
+
project_asset_quota_state,
|
|
55
|
+
project_asset_quota_summary,
|
|
56
|
+
project_asset_summary_is_public_safe as project_asset_summary_is_public_safe,
|
|
57
|
+
project_asset_todo_projection_gap,
|
|
58
|
+
project_asset_user_todo_open_count,
|
|
59
|
+
)
|
|
60
|
+
from .control_plane.todos.completed_archive import completed_todo_archive_warning
|
|
61
|
+
from .control_plane.handoff.project_handoff import (
|
|
62
|
+
project_asset_handoff_readiness as _project_asset_handoff_readiness_read_model,
|
|
63
|
+
project_asset_handoff_state as _project_asset_handoff_state_read_model,
|
|
64
|
+
)
|
|
65
|
+
from .control_plane.work_items.autonomous_candidates import (
|
|
66
|
+
MAX_AUTONOMOUS_TODO_CANDIDATES as _MAX_AUTONOMOUS_TODO_CANDIDATES,
|
|
67
|
+
)
|
|
68
|
+
from .control_plane.goals.active_state_metadata import (
|
|
69
|
+
parse_state_frontmatter,
|
|
70
|
+
)
|
|
71
|
+
from .control_plane.todos.active_state_todos import (
|
|
72
|
+
MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION as _MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION,
|
|
73
|
+
active_state_todo_fields as _active_state_todo_fields_read_model,
|
|
74
|
+
)
|
|
75
|
+
from .control_plane.todos.active_state_todo_parser import (
|
|
76
|
+
parse_active_state_todos,
|
|
77
|
+
)
|
|
78
|
+
from .control_plane.work_items.attention_item import (
|
|
79
|
+
attention_item as _attention_item_read_model,
|
|
80
|
+
)
|
|
81
|
+
from .control_plane.work_items.attention_queue import (
|
|
82
|
+
AttentionQueueContext,
|
|
83
|
+
build_attention_queue as _build_attention_queue_read_model,
|
|
84
|
+
)
|
|
85
|
+
from .control_plane.work_items.autonomous_replan_ack import (
|
|
86
|
+
AUTONOMOUS_REPLAN_ACK_MATERIAL_RUN_WINDOW,
|
|
87
|
+
compact_autonomous_replan_ack,
|
|
88
|
+
)
|
|
89
|
+
from .control_plane.work_items.autonomous_replan_obligation import (
|
|
90
|
+
AUTONOMOUS_REPLAN_STALL_THRESHOLD as _AUTONOMOUS_REPLAN_STALL_THRESHOLD_READ_MODEL,
|
|
91
|
+
MAX_AUTONOMOUS_REPLAN_TRIGGERS as _MAX_AUTONOMOUS_REPLAN_TRIGGERS_READ_MODEL,
|
|
92
|
+
)
|
|
93
|
+
from .control_plane.work_items.backlog_hygiene import (
|
|
94
|
+
MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS as _MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS_READ_MODEL,
|
|
95
|
+
)
|
|
96
|
+
from .control_plane.work_items.delivery_signals import (
|
|
97
|
+
classification_contains_any as _classification_contains_any_read_model,
|
|
98
|
+
delivery_batch_scale_for_run as _delivery_batch_scale_for_run_read_model,
|
|
99
|
+
delivery_outcome_for_run as _delivery_outcome_for_run_read_model,
|
|
100
|
+
outcome_floor_configured as _outcome_floor_configured_read_model,
|
|
101
|
+
outcome_gap_streak as _outcome_gap_streak_read_model,
|
|
102
|
+
small_delivery_batch_scale_streak as _small_delivery_batch_scale_streak_read_model,
|
|
103
|
+
)
|
|
104
|
+
from .control_plane.runtime.run_compaction import (
|
|
105
|
+
RUN_BASE_COMPACT_FIELDS,
|
|
106
|
+
attach_run_summary_projections as _attach_run_summary_projections_read_model,
|
|
107
|
+
compact_controller_readiness,
|
|
108
|
+
compact_human_reward,
|
|
109
|
+
compact_operator_gate,
|
|
110
|
+
compact_operator_gate_resume_contract,
|
|
111
|
+
compact_run_base as _compact_run_base_read_model,
|
|
112
|
+
)
|
|
113
|
+
from .control_plane.runtime.status_classifications import (
|
|
114
|
+
BLOCKING_CLASSIFICATIONS,
|
|
115
|
+
CODEX_READY_CLASSIFICATIONS,
|
|
116
|
+
DREAMING_ADVISORY_CLASSIFICATIONS, # noqa: F401
|
|
117
|
+
HANDOFF_READY_CLASSIFICATIONS,
|
|
118
|
+
USER_OR_CONTROLLER_CLASSIFICATIONS,
|
|
119
|
+
)
|
|
120
|
+
from .benchmarks.read_models.benchmark_comparison import (
|
|
121
|
+
benchmark_comparison_decision_note as _benchmark_comparison_decision_note_read_model,
|
|
122
|
+
compact_benchmark_comparison as _compact_benchmark_comparison_read_model,
|
|
123
|
+
)
|
|
124
|
+
from .benchmarks.read_models.benchmark_experiment_report import (
|
|
125
|
+
benchmark_experiment_report_readiness_note,
|
|
126
|
+
benchmark_experiment_report_replay_decision,
|
|
127
|
+
compact_benchmark_experiment_report,
|
|
128
|
+
)
|
|
129
|
+
from .benchmarks.read_models.benchmark_learning_ledger import (
|
|
130
|
+
compact_benchmark_learning_ledger,
|
|
131
|
+
)
|
|
132
|
+
from .benchmarks.read_models.benchmark_result import compact_benchmark_result
|
|
133
|
+
from .benchmarks.read_models.skillsbench_post_run_debug import (
|
|
134
|
+
build_skillsbench_post_run_debug_gate, # noqa: F401
|
|
135
|
+
)
|
|
136
|
+
from .control_plane.runtime.public_safety import (
|
|
137
|
+
public_safe_compact_text,
|
|
138
|
+
)
|
|
139
|
+
from .control_plane.runtime.active_user_assisted_pilot import (
|
|
140
|
+
compact_active_user_assisted_pilot as _compact_active_user_assisted_pilot_read_model,
|
|
141
|
+
)
|
|
142
|
+
from .control_plane.runtime.run_ingest_health import (
|
|
143
|
+
worker_bridge_ingest_health_note,
|
|
144
|
+
)
|
|
145
|
+
from .control_plane.runtime.time import parse_timestamp
|
|
146
|
+
from .control_plane.runtime.decision_freshness import (
|
|
147
|
+
DECISION_FRESHNESS_CLASSIFICATION_PREFIXES,
|
|
148
|
+
DECISION_FRESHNESS_ITEM_LIMIT,
|
|
149
|
+
DECISION_FRESHNESS_PROXY_NOTE,
|
|
150
|
+
DECISION_FRESHNESS_WINDOW_DAYS,
|
|
151
|
+
)
|
|
152
|
+
from .control_plane.runtime.promotion_readiness import (
|
|
153
|
+
PROMOTION_READINESS_PROXY_NOTE,
|
|
154
|
+
)
|
|
155
|
+
from .control_plane.handoff.handoff_runs import (
|
|
156
|
+
is_custom_post_handoff_work_run as _is_custom_post_handoff_work_run_read_model,
|
|
157
|
+
is_handoff_ready_run as _is_handoff_ready_run_read_model,
|
|
158
|
+
run_has_external_evidence_watch_signal as _run_has_external_evidence_watch_signal_read_model,
|
|
159
|
+
)
|
|
160
|
+
from .control_plane.goals.global_registry_shadow import (
|
|
161
|
+
attach_global_registry_shadow_finding,
|
|
162
|
+
)
|
|
163
|
+
from .control_plane.goals.path_resolution import resolve_goal_local_path
|
|
164
|
+
from .control_plane.goals.goal_channel import (
|
|
165
|
+
attach_goal_channel_projection as _attach_goal_channel_projection_read_model,
|
|
166
|
+
)
|
|
167
|
+
from .control_plane.goals.goal_vision import (
|
|
168
|
+
compact_goal_vision_packet as _compact_goal_vision_packet_read_model,
|
|
169
|
+
)
|
|
170
|
+
from .control_plane.runtime.session_runtime import (
|
|
171
|
+
compact_session_runtime_projection_from_run,
|
|
172
|
+
)
|
|
173
|
+
from .control_plane.agents.subagent_activity import (
|
|
174
|
+
MAX_SUBAGENT_ACTIVITY_ITEMS,
|
|
175
|
+
compact_subagent_run,
|
|
176
|
+
subagent_activity_for_goal,
|
|
177
|
+
)
|
|
178
|
+
from .control_plane.agents.management_projection import (
|
|
179
|
+
build_agent_management_projection as _build_agent_management_projection_read_model,
|
|
180
|
+
)
|
|
181
|
+
from .control_plane.runtime.agent_scoped_evidence_log import (
|
|
182
|
+
MAX_PROJECTED_READ_RECEIPTS,
|
|
183
|
+
project_evidence_log_read_receipts,
|
|
184
|
+
)
|
|
185
|
+
from .control_plane.runtime.stale_latest_run import (
|
|
186
|
+
stale_latest_run_projection_warning as _stale_latest_run_projection_warning_read_model,
|
|
187
|
+
)
|
|
188
|
+
from .control_plane.todos.todo_summary import (
|
|
189
|
+
MAX_DEFERRED_TODO_VISIBILITY_ITEMS as _TODO_SUMMARY_MAX_DEFERRED_TODO_VISIBILITY_ITEMS,
|
|
190
|
+
MAX_DEPENDENCY_BLOCKERS as _TODO_SUMMARY_MAX_DEPENDENCY_BLOCKERS,
|
|
191
|
+
MAX_MONITOR_DUE_ITEMS as _TODO_SUMMARY_MAX_MONITOR_DUE_ITEMS,
|
|
192
|
+
MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS as _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS,
|
|
193
|
+
MAX_PROJECT_ASSET_TODO_ITEMS as _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_ITEMS,
|
|
194
|
+
MAX_STATUS_TODOS_PER_ROLE as _TODO_SUMMARY_MAX_STATUS_TODOS_PER_ROLE,
|
|
195
|
+
MAX_TODO_VISIBILITY_LANE_ITEMS as _TODO_SUMMARY_MAX_TODO_VISIBILITY_LANE_ITEMS,
|
|
196
|
+
active_state_todo_attention_item as _active_state_todo_attention_item_read_model,
|
|
197
|
+
active_next_action_todo_ids,
|
|
198
|
+
attach_dependency_blockers,
|
|
199
|
+
claimed_visibility_items as claimed_visibility_items,
|
|
200
|
+
compact_todo_group as compact_todo_group,
|
|
201
|
+
compact_todo_item as compact_todo_item,
|
|
202
|
+
first_open_todo_text,
|
|
203
|
+
open_todo_items,
|
|
204
|
+
project_asset_todo_summary,
|
|
205
|
+
sync_connected_attention_action_from_todos as _sync_connected_attention_action_from_todos_read_model,
|
|
206
|
+
todo_lane_items as todo_lane_items,
|
|
207
|
+
todo_item_is_deferred as todo_item_is_deferred,
|
|
208
|
+
todo_item_is_due_monitor as todo_item_is_due_monitor,
|
|
209
|
+
todo_item_missing_monitor_schedule as todo_item_missing_monitor_schedule,
|
|
210
|
+
todo_item_next_due_at as todo_item_next_due_at,
|
|
211
|
+
todo_item_task_class,
|
|
212
|
+
todo_projection_sort_key as todo_projection_sort_key,
|
|
213
|
+
)
|
|
214
|
+
from .control_plane.todos.todo_index import (
|
|
215
|
+
MAX_TODO_INDEX_ITEMS,
|
|
216
|
+
MAX_TODO_INDEX_ROLLOUT_EVENTS_PER_GOAL,
|
|
217
|
+
)
|
|
218
|
+
from .promotion_gate import build_promotion_gate
|
|
219
|
+
from .quota import quota_status, quota_with_handoff_outcome_floor
|
|
220
|
+
from .rollout_event_log import load_rollout_events, rollout_event_log_path
|
|
221
|
+
from .state_projection import (
|
|
222
|
+
active_state_next_action_entries,
|
|
223
|
+
next_action_projection_warning,
|
|
224
|
+
state_projection_gap_warning,
|
|
225
|
+
)
|
|
226
|
+
from .control_plane.todos.contract import (
|
|
227
|
+
TODO_STATUS_OPEN,
|
|
228
|
+
TODO_TASK_CLASS_USER_GATE,
|
|
229
|
+
normalize_todo_status,
|
|
230
|
+
normalize_todo_task_class as normalize_todo_task_class,
|
|
231
|
+
todo_done_for_status,
|
|
232
|
+
)
|
|
233
|
+
from .control_plane.todos.projection import (
|
|
234
|
+
todo_item_is_expired_monitor as todo_item_is_expired_monitor,
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
_PUBLIC_COMPAT_REEXPORTS = {
|
|
239
|
+
"build_skillsbench_post_run_debug_gate": "loopx.benchmarks.read_models.skillsbench_post_run_debug",
|
|
240
|
+
"DREAMING_ADVISORY_CLASSIFICATIONS": "loopx.control_plane.runtime.status_classifications",
|
|
241
|
+
"TODO_PROJECTION_DETAIL_POINTER_SCHEMA_VERSION": "loopx.control_plane.work_items.project_asset",
|
|
242
|
+
"TODO_PROJECTION_VIEW_SCHEMA_VERSION": "loopx.control_plane.work_items.project_asset",
|
|
243
|
+
"project_asset_summary_is_public_safe": "loopx.control_plane.work_items.project_asset",
|
|
244
|
+
"claimed_visibility_items": "loopx.control_plane.todos.todo_summary",
|
|
245
|
+
"compact_todo_group": "loopx.control_plane.todos.todo_summary",
|
|
246
|
+
"compact_todo_item": "loopx.control_plane.todos.todo_summary",
|
|
247
|
+
"todo_lane_items": "loopx.control_plane.todos.todo_summary",
|
|
248
|
+
"todo_item_is_deferred": "loopx.control_plane.todos.todo_summary",
|
|
249
|
+
"todo_item_is_due_monitor": "loopx.control_plane.todos.todo_summary",
|
|
250
|
+
"todo_item_missing_monitor_schedule": "loopx.control_plane.todos.todo_summary",
|
|
251
|
+
"todo_item_next_due_at": "loopx.control_plane.todos.todo_summary",
|
|
252
|
+
"todo_projection_sort_key": "loopx.control_plane.todos.todo_summary",
|
|
253
|
+
"normalize_todo_task_class": "loopx.control_plane.todos.contract",
|
|
254
|
+
"todo_item_is_expired_monitor": "loopx.control_plane.todos.projection",
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
STATUS_NEUTRAL_CLASSIFICATIONS = HISTORY_STATUS_NEUTRAL_CLASSIFICATIONS
|
|
259
|
+
STATE_EVENT_LOG_BASENAME = "events.jsonl"
|
|
260
|
+
STATUS_CONTROL_PLANE_CONTEXT_LIMIT = 20
|
|
261
|
+
AGENT_LANE_PROGRESS_SCOPE = "agent_lane"
|
|
262
|
+
REGISTRY_WAITING_ON_OVERRIDES = {
|
|
263
|
+
"user_or_controller",
|
|
264
|
+
"controller",
|
|
265
|
+
"codex",
|
|
266
|
+
"external_evidence",
|
|
267
|
+
}
|
|
268
|
+
LEGACY_EXTERNAL_EVIDENCE_CLASSIFICATION_PREFIXES = (
|
|
269
|
+
"await_",
|
|
270
|
+
"external_evidence_observation_",
|
|
271
|
+
)
|
|
272
|
+
MONITOR_SIGNAL_WAITING_ON = "monitor_signal"
|
|
273
|
+
MONITOR_DISPLAY_SCHEMA_VERSION = "monitor_quiet_display_v0"
|
|
274
|
+
MONITOR_DISPLAY_STOP_CONDITION = (
|
|
275
|
+
"stop until a material monitor transition, regression, or concrete blocker appears"
|
|
276
|
+
)
|
|
277
|
+
MONITOR_DISPLAY_FALLBACK_ACTION = (
|
|
278
|
+
"No immediate agent work; keep the monitor quiet until a material monitor "
|
|
279
|
+
"transition, regression, or concrete blocker appears."
|
|
280
|
+
)
|
|
281
|
+
BENCHMARK_RUN_SCHEMA_VERSION = "benchmark_run_v0"
|
|
282
|
+
MAX_BENCHMARK_RUN_TRIALS = 3
|
|
283
|
+
MAX_BENCHMARK_RUN_LIST_ITEMS = 5
|
|
284
|
+
STATUS_CONTRACT_SCHEMA_VERSION = 2
|
|
285
|
+
MINIMUM_DASHBOARD_STATUS_CONTRACT_SCHEMA_VERSION = 2
|
|
286
|
+
STATUS_CONTRACT_RELOAD_HINT = "scripts/macos-dashboard-launchagent.sh restart"
|
|
287
|
+
STATUS_CONTRACT_SIGNAL_LIMIT = 3
|
|
288
|
+
MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION = _MONITOR_WRITEBACK_CONTRACT_SCHEMA_VERSION
|
|
289
|
+
EVENT_LEDGER_DECISION_CLASSIFICATIONS = USER_OR_CONTROLLER_CLASSIFICATIONS | {
|
|
290
|
+
"operator_gate_approved",
|
|
291
|
+
}
|
|
292
|
+
EVENT_LEDGER_STATE_CLASSIFICATIONS = {
|
|
293
|
+
"state_refreshed",
|
|
294
|
+
"public_harness_healthy",
|
|
295
|
+
}
|
|
296
|
+
EVENT_LEDGER_EVIDENCE_CLASSIFICATIONS = {
|
|
297
|
+
"inspect_eval_result",
|
|
298
|
+
"inspect_result",
|
|
299
|
+
"needs_more_read_only_evidence",
|
|
300
|
+
"read_only_project_map",
|
|
301
|
+
}
|
|
302
|
+
EVENT_LEDGER_EVIDENCE_HINTS = (
|
|
303
|
+
"artifact",
|
|
304
|
+
"blocker",
|
|
305
|
+
"ci",
|
|
306
|
+
"data",
|
|
307
|
+
"deploy",
|
|
308
|
+
"done",
|
|
309
|
+
"eval",
|
|
310
|
+
"evidence",
|
|
311
|
+
"failure",
|
|
312
|
+
"fail",
|
|
313
|
+
"metric",
|
|
314
|
+
"monitor",
|
|
315
|
+
"validation",
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
DELIVERY_BATCH_SCALE_TEST_ONLY_CLASSIFICATION_HINTS = (
|
|
320
|
+
"_test",
|
|
321
|
+
"_smoke",
|
|
322
|
+
"readiness_test",
|
|
323
|
+
"integrity_test",
|
|
324
|
+
)
|
|
325
|
+
DELIVERY_BATCH_SCALE_MULTI_SURFACE_CLASSIFICATION_HINTS = (
|
|
326
|
+
"batch",
|
|
327
|
+
"cross_benchmark",
|
|
328
|
+
"downstream_pack",
|
|
329
|
+
"matrix",
|
|
330
|
+
"owner_handoff_consumer",
|
|
331
|
+
)
|
|
332
|
+
DELIVERY_BATCH_SCALE_IMPLEMENTATION_CLASSIFICATION_HINTS = (
|
|
333
|
+
"adapter",
|
|
334
|
+
"builder",
|
|
335
|
+
"consumer",
|
|
336
|
+
"implementation",
|
|
337
|
+
"runner",
|
|
338
|
+
)
|
|
339
|
+
SMALL_DELIVERY_BATCH_SCALES = {
|
|
340
|
+
*(scale.value for scale in STRUCTURED_SMALL_DELIVERY_BATCH_SCALES),
|
|
341
|
+
UNKNOWN_DELIVERY_BATCH_SCALE,
|
|
342
|
+
}
|
|
343
|
+
CONNECTED_ADAPTER_STATUSES = {
|
|
344
|
+
"connected",
|
|
345
|
+
"connected-read-only",
|
|
346
|
+
"pre-tick-runnable",
|
|
347
|
+
}
|
|
348
|
+
CONNECTED_DELIVERY_ADAPTER_STATUSES = {
|
|
349
|
+
"connected-delivery",
|
|
350
|
+
}
|
|
351
|
+
SOURCE_REGISTRY_SHADOW_FINDINGS = {
|
|
352
|
+
"source_registry_missing",
|
|
353
|
+
"stale_source_registry",
|
|
354
|
+
}
|
|
355
|
+
PLANNED_CONTROLLER_OPT_IN_RECOMMENDED_ACTION = (
|
|
356
|
+
"先在 LoopX 完成 operator 判断;同意后项目 Agent 只执行 read-only map dry-run"
|
|
357
|
+
)
|
|
358
|
+
RUN_COMPACT_FIELDS = RUN_BASE_COMPACT_FIELDS
|
|
359
|
+
LIFECYCLE_PRIORITY = (
|
|
360
|
+
"controller_ready",
|
|
361
|
+
"reward_judged",
|
|
362
|
+
"operator_approved",
|
|
363
|
+
"controller_gated",
|
|
364
|
+
"operator_gated",
|
|
365
|
+
"adapter_inspected",
|
|
366
|
+
"mapped",
|
|
367
|
+
"refreshed",
|
|
368
|
+
"connected",
|
|
369
|
+
"registered",
|
|
370
|
+
"planned",
|
|
371
|
+
"run_recorded",
|
|
372
|
+
)
|
|
373
|
+
SECTION_HEADING_PATTERN = re.compile(r"^##+\s+(.+?)\s*$")
|
|
374
|
+
MAX_STATUS_TODOS_PER_ROLE = _TODO_SUMMARY_MAX_STATUS_TODOS_PER_ROLE
|
|
375
|
+
MAX_ACTIVE_DONE_TODOS_BEFORE_ARCHIVE = MAX_STATUS_TODOS_PER_ROLE
|
|
376
|
+
MAX_PROJECT_ASSET_TODO_ITEMS = _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_ITEMS
|
|
377
|
+
MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS = _TODO_SUMMARY_MAX_PROJECT_ASSET_TODO_BACKLOG_ITEMS
|
|
378
|
+
MAX_TODO_VISIBILITY_LANE_ITEMS = _TODO_SUMMARY_MAX_TODO_VISIBILITY_LANE_ITEMS
|
|
379
|
+
MAX_DEFERRED_TODO_VISIBILITY_ITEMS = _TODO_SUMMARY_MAX_DEFERRED_TODO_VISIBILITY_ITEMS
|
|
380
|
+
MAX_MONITOR_DUE_ITEMS = _TODO_SUMMARY_MAX_MONITOR_DUE_ITEMS
|
|
381
|
+
MAX_DEPENDENCY_BLOCKERS = _TODO_SUMMARY_MAX_DEPENDENCY_BLOCKERS
|
|
382
|
+
MAX_AUTONOMOUS_BACKLOG_CANDIDATES = _MAX_AUTONOMOUS_TODO_CANDIDATES
|
|
383
|
+
MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS = _MAX_BACKLOG_HYGIENE_EVIDENCE_ITEMS_READ_MODEL
|
|
384
|
+
MAX_AUTONOMOUS_REPLAN_TRIGGERS = _MAX_AUTONOMOUS_REPLAN_TRIGGERS_READ_MODEL
|
|
385
|
+
AUTONOMOUS_REPLAN_STALL_THRESHOLD = _AUTONOMOUS_REPLAN_STALL_THRESHOLD_READ_MODEL
|
|
386
|
+
DEAD_MONITOR_REPEAT_THRESHOLD = 6
|
|
387
|
+
AUTONOMOUS_REPLAN_PERIODIC_RUN_THRESHOLD = AUTONOMOUS_REPLAN_ACK_MATERIAL_RUN_WINDOW
|
|
388
|
+
AUTONOMOUS_REPLAN_PERIODIC_LOOKBACK = 30
|
|
389
|
+
BACKLOG_HYGIENE_SECTION_HEADINGS = ("Next Action", "Operating Lessons")
|
|
390
|
+
BACKLOG_HYGIENE_BULLET_PATTERN = re.compile(r"^\s*(?:[-*]|\d+[.)])\s+(.+?)\s*$")
|
|
391
|
+
BACKLOG_HYGIENE_HINT_PATTERN = re.compile(
|
|
392
|
+
r"(?i)(?:\[p[0-4]\]|todo|backlog|follow[- ]?up|queue|audit|regression|smoke|cadence|mirror|monitor|sub-?agent|待办|回归|审计|修复|检查|推进)"
|
|
393
|
+
)
|
|
394
|
+
AUTONOMOUS_REPLAN_SCHEMA_VERSION = "autonomous_replan_obligation_v0"
|
|
395
|
+
DEAD_MONITOR_REPEAT_SCHEMA_VERSION = "dead_monitor_repeat_v0"
|
|
396
|
+
AUTONOMOUS_RUN_HISTORY_NEUTRAL_CLASSIFICATIONS = {
|
|
397
|
+
"quota_slot_spent",
|
|
398
|
+
"quota_slot_voided",
|
|
399
|
+
"delivery_completion_spend_accounted_v0",
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
def state_event_log_candidates(goal: dict[str, Any], *, state_path: Path) -> list[Path]:
|
|
406
|
+
from .control_plane.status.active_state_projection import (
|
|
407
|
+
state_event_log_candidates as _state_event_log_candidates,
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
return _state_event_log_candidates(goal, state_path=state_path)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
def active_state_event_projection_fields(
|
|
414
|
+
goal: dict[str, Any],
|
|
415
|
+
*,
|
|
416
|
+
state_path: Path,
|
|
417
|
+
preferred_todo_ids: set[str] | None = None,
|
|
418
|
+
rollout_events: list[dict[str, Any]] | None = None,
|
|
419
|
+
item_limit: int | None = MAX_STATUS_TODOS_PER_ROLE,
|
|
420
|
+
) -> dict[str, Any]:
|
|
421
|
+
from .control_plane.status.active_state_projection import (
|
|
422
|
+
active_state_event_projection_fields as _active_state_event_projection_fields,
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
return _active_state_event_projection_fields(
|
|
426
|
+
goal,
|
|
427
|
+
state_path=state_path,
|
|
428
|
+
preferred_todo_ids=preferred_todo_ids,
|
|
429
|
+
rollout_events=rollout_events,
|
|
430
|
+
item_limit=item_limit,
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
def active_state_sections(state_text: str, headings: tuple[str, ...]) -> dict[str, list[str]]:
|
|
435
|
+
from .control_plane.status.active_state_projection import (
|
|
436
|
+
active_state_sections as _active_state_sections,
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
return _active_state_sections(state_text, headings)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
def parse_issue_meta_surface(state_text: str) -> dict[str, Any] | None:
|
|
443
|
+
from .control_plane.status.active_state_projection import (
|
|
444
|
+
parse_issue_meta_surface as _parse_issue_meta_surface,
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
return _parse_issue_meta_surface(state_text)
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
def active_state_section_entries(lines: list[str]) -> list[str]:
|
|
451
|
+
from .control_plane.status.active_state_projection import (
|
|
452
|
+
active_state_section_entries as _active_state_section_entries,
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
return _active_state_section_entries(lines)
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
def backlog_hygiene_warning(state_text: str, *, agent_todos: dict[str, Any] | None) -> dict[str, Any] | None:
|
|
459
|
+
from .control_plane.status.active_state_projection import (
|
|
460
|
+
backlog_hygiene_warning as _backlog_hygiene_warning,
|
|
461
|
+
)
|
|
462
|
+
|
|
463
|
+
return _backlog_hygiene_warning(state_text, agent_todos=agent_todos)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
def build_autonomous_replan_obligation(
|
|
467
|
+
evidence: list[dict[str, Any]],
|
|
468
|
+
*,
|
|
469
|
+
agent_todos: dict[str, Any] | None,
|
|
470
|
+
) -> dict[str, Any] | None:
|
|
471
|
+
from .control_plane.status.autonomous_replan_projection import (
|
|
472
|
+
build_autonomous_replan_obligation as _build_autonomous_replan_obligation,
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
return _build_autonomous_replan_obligation(
|
|
476
|
+
evidence,
|
|
477
|
+
agent_todos=agent_todos,
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
def run_history_monitor_wait_already_acknowledged(
|
|
482
|
+
latest_runs: list[dict[str, Any]] | None,
|
|
483
|
+
*,
|
|
484
|
+
signal_count: int,
|
|
485
|
+
) -> bool:
|
|
486
|
+
from .control_plane.status.autonomous_replan_projection import (
|
|
487
|
+
run_history_monitor_wait_already_acknowledged as _run_history_monitor_wait_already_acknowledged,
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
return _run_history_monitor_wait_already_acknowledged(
|
|
491
|
+
latest_runs,
|
|
492
|
+
signal_count=signal_count,
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
def latest_autonomous_replan_ack_for_projection(
|
|
497
|
+
latest_runs: list[dict[str, Any]] | None,
|
|
498
|
+
) -> dict[str, Any] | None:
|
|
499
|
+
from .control_plane.status.autonomous_replan_projection import (
|
|
500
|
+
latest_autonomous_replan_ack_for_projection as _latest_autonomous_replan_ack_for_projection,
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
return _latest_autonomous_replan_ack_for_projection(latest_runs)
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
def autonomous_replan_periodic_review_from_runs(
|
|
507
|
+
latest_runs: list[dict[str, Any]] | None,
|
|
508
|
+
*,
|
|
509
|
+
agent_todos: dict[str, Any] | None,
|
|
510
|
+
) -> dict[str, Any] | None:
|
|
511
|
+
from .control_plane.status.autonomous_replan_projection import (
|
|
512
|
+
autonomous_replan_periodic_review_from_runs as _autonomous_replan_periodic_review_from_runs,
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
return _autonomous_replan_periodic_review_from_runs(
|
|
516
|
+
latest_runs,
|
|
517
|
+
agent_todos=agent_todos,
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
def autonomous_replan_obligation_from_runs(
|
|
522
|
+
latest_runs: list[dict[str, Any]] | None,
|
|
523
|
+
*,
|
|
524
|
+
agent_todos: dict[str, Any] | None,
|
|
525
|
+
agent_id: str | None = None,
|
|
526
|
+
) -> dict[str, Any] | None:
|
|
527
|
+
from .control_plane.status.autonomous_replan_projection import (
|
|
528
|
+
autonomous_replan_obligation_from_runs as _autonomous_replan_obligation_from_runs,
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
return _autonomous_replan_obligation_from_runs(
|
|
532
|
+
latest_runs,
|
|
533
|
+
agent_todos=agent_todos,
|
|
534
|
+
agent_id=agent_id,
|
|
535
|
+
)
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
def autonomous_backlog_candidates(
|
|
539
|
+
items: list[dict[str, Any]],
|
|
540
|
+
*,
|
|
541
|
+
limit: int = MAX_AUTONOMOUS_BACKLOG_CANDIDATES,
|
|
542
|
+
) -> dict[str, Any] | None:
|
|
543
|
+
from .control_plane.status.attention_projection import (
|
|
544
|
+
autonomous_backlog_candidates as _autonomous_backlog_candidates,
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
return _autonomous_backlog_candidates(items, limit=limit)
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
def autonomous_monitor_candidates(
|
|
551
|
+
items: list[dict[str, Any]],
|
|
552
|
+
*,
|
|
553
|
+
limit: int = MAX_AUTONOMOUS_BACKLOG_CANDIDATES,
|
|
554
|
+
) -> dict[str, Any] | None:
|
|
555
|
+
from .control_plane.status.attention_projection import (
|
|
556
|
+
autonomous_monitor_candidates as _autonomous_monitor_candidates,
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
return _autonomous_monitor_candidates(items, limit=limit)
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
def build_attention_queue_projection(
|
|
563
|
+
*,
|
|
564
|
+
items: list[dict[str, Any]],
|
|
565
|
+
goal_id_filter: str | None,
|
|
566
|
+
autonomous_backlog_candidates: dict[str, Any] | None,
|
|
567
|
+
autonomous_monitor_candidates: dict[str, Any] | None,
|
|
568
|
+
) -> dict[str, Any]:
|
|
569
|
+
from .control_plane.status.attention_projection import (
|
|
570
|
+
build_attention_queue_projection as _build_attention_queue_projection,
|
|
571
|
+
)
|
|
572
|
+
|
|
573
|
+
return _build_attention_queue_projection(
|
|
574
|
+
items=items,
|
|
575
|
+
goal_id_filter=goal_id_filter,
|
|
576
|
+
autonomous_backlog_candidates=autonomous_backlog_candidates,
|
|
577
|
+
autonomous_monitor_candidates=autonomous_monitor_candidates,
|
|
578
|
+
)
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
def active_state_projection_warning(goal: dict[str, Any], current_run: dict[str, Any] | None) -> dict[str, Any] | None:
|
|
582
|
+
return _stale_latest_run_projection_warning_read_model(
|
|
583
|
+
goal,
|
|
584
|
+
current_run,
|
|
585
|
+
agent_lane_progress_scope=AGENT_LANE_PROGRESS_SCOPE,
|
|
586
|
+
resolve_goal_local_path=lambda raw, goal_value: resolve_goal_local_path(
|
|
587
|
+
raw,
|
|
588
|
+
goal_value,
|
|
589
|
+
fallback_base=Path.cwd(),
|
|
590
|
+
),
|
|
591
|
+
parse_state_frontmatter=parse_state_frontmatter,
|
|
592
|
+
parse_timestamp=parse_timestamp,
|
|
593
|
+
)
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
def is_handoff_ready_run(run: dict[str, Any]) -> bool:
|
|
597
|
+
return _is_handoff_ready_run_read_model(
|
|
598
|
+
run,
|
|
599
|
+
handoff_ready_classifications=HANDOFF_READY_CLASSIFICATIONS,
|
|
600
|
+
compact_operator_gate=compact_operator_gate,
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
def run_has_external_evidence_watch_signal(run: dict[str, Any]) -> bool:
|
|
605
|
+
"""Return true only for explicit external-evidence watch state.
|
|
606
|
+
|
|
607
|
+
Feature names may legitimately start with words such as "monitor"; routing
|
|
608
|
+
to an external-evidence wait must come from structured state or explicit
|
|
609
|
+
legacy external-evidence classifications, not broad classification prefixes.
|
|
610
|
+
"""
|
|
611
|
+
|
|
612
|
+
return _run_has_external_evidence_watch_signal_read_model(
|
|
613
|
+
run,
|
|
614
|
+
legacy_external_evidence_classification_prefixes=LEGACY_EXTERNAL_EVIDENCE_CLASSIFICATION_PREFIXES,
|
|
615
|
+
)
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
def is_custom_post_handoff_work_run(run: dict[str, Any]) -> bool:
|
|
619
|
+
return _is_custom_post_handoff_work_run_read_model(
|
|
620
|
+
run,
|
|
621
|
+
is_status_neutral_run=is_status_neutral_run,
|
|
622
|
+
is_handoff_ready_run=is_handoff_ready_run,
|
|
623
|
+
run_has_external_evidence_watch_signal=run_has_external_evidence_watch_signal,
|
|
624
|
+
codex_ready_classifications=CODEX_READY_CLASSIFICATIONS,
|
|
625
|
+
user_or_controller_classifications=USER_OR_CONTROLLER_CLASSIFICATIONS,
|
|
626
|
+
blocking_classifications=BLOCKING_CLASSIFICATIONS,
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
def delivery_batch_scale_for_run(run: dict[str, Any]) -> str:
|
|
631
|
+
return _delivery_batch_scale_for_run_read_model(
|
|
632
|
+
run,
|
|
633
|
+
test_only_hints=DELIVERY_BATCH_SCALE_TEST_ONLY_CLASSIFICATION_HINTS,
|
|
634
|
+
multi_surface_hints=DELIVERY_BATCH_SCALE_MULTI_SURFACE_CLASSIFICATION_HINTS,
|
|
635
|
+
implementation_hints=DELIVERY_BATCH_SCALE_IMPLEMENTATION_CLASSIFICATION_HINTS,
|
|
636
|
+
)
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
def _classification_contains_any(classification: str, hints: list[Any]) -> bool:
|
|
640
|
+
return _classification_contains_any_read_model(classification, hints)
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
def delivery_outcome_for_run(run: dict[str, Any], profile: dict[str, Any] | None = None) -> str:
|
|
644
|
+
return _delivery_outcome_for_run_read_model(
|
|
645
|
+
run,
|
|
646
|
+
profile,
|
|
647
|
+
execution_profile_outcome_floor=execution_profile_outcome_floor,
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
def outcome_floor_configured(profile: dict[str, Any] | None) -> bool:
|
|
652
|
+
return _outcome_floor_configured_read_model(
|
|
653
|
+
profile,
|
|
654
|
+
execution_profile_outcome_floor=execution_profile_outcome_floor,
|
|
655
|
+
)
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
def outcome_gap_streak(runs: list[dict[str, Any]], profile: dict[str, Any] | None = None) -> int:
|
|
659
|
+
return _outcome_gap_streak_read_model(
|
|
660
|
+
runs,
|
|
661
|
+
profile,
|
|
662
|
+
delivery_outcome_for_run=delivery_outcome_for_run,
|
|
663
|
+
outcome_floor_configured=outcome_floor_configured,
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
def compact_post_handoff_run(run: dict[str, Any], profile: dict[str, Any] | None = None) -> dict[str, Any]:
|
|
668
|
+
compact: dict[str, Any] = {}
|
|
669
|
+
for field in ("generated_at", "classification", "health_check", "json_exists", "markdown_exists"):
|
|
670
|
+
if field in run:
|
|
671
|
+
compact[field] = run[field]
|
|
672
|
+
compact["delivery_batch_scale"] = delivery_batch_scale_for_run(run)
|
|
673
|
+
outcome = delivery_outcome_for_run(run, profile)
|
|
674
|
+
if outcome != DELIVERY_OUTCOME_NOT_CONFIGURED:
|
|
675
|
+
compact["delivery_outcome"] = outcome
|
|
676
|
+
compact["delivery_turn_kind"] = delivery_turn_kind_for_run(
|
|
677
|
+
run,
|
|
678
|
+
delivery_outcome=outcome,
|
|
679
|
+
)
|
|
680
|
+
return _attach_run_summary_projections_read_model(
|
|
681
|
+
compact,
|
|
682
|
+
run,
|
|
683
|
+
compact_benchmark_run=compact_benchmark_run,
|
|
684
|
+
worker_bridge_ingest_health_note=worker_bridge_ingest_health_note,
|
|
685
|
+
compact_benchmark_result=compact_benchmark_result,
|
|
686
|
+
compact_benchmark_comparison=_compact_benchmark_comparison_read_model,
|
|
687
|
+
benchmark_comparison_decision_note=_benchmark_comparison_decision_note_read_model,
|
|
688
|
+
compact_benchmark_learning_ledger=compact_benchmark_learning_ledger,
|
|
689
|
+
compact_benchmark_experiment_report=compact_benchmark_experiment_report,
|
|
690
|
+
benchmark_experiment_report_readiness_note=(
|
|
691
|
+
benchmark_experiment_report_readiness_note
|
|
692
|
+
),
|
|
693
|
+
benchmark_experiment_report_replay_decision=(
|
|
694
|
+
benchmark_experiment_report_replay_decision
|
|
695
|
+
),
|
|
696
|
+
compact_active_user_assisted_pilot=_compact_active_user_assisted_pilot_read_model,
|
|
697
|
+
compact_session_runtime_projection_from_run=(
|
|
698
|
+
compact_session_runtime_projection_from_run
|
|
699
|
+
),
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
def small_delivery_batch_scale_streak(runs: list[dict[str, Any]]) -> int:
|
|
704
|
+
return _small_delivery_batch_scale_streak_read_model(
|
|
705
|
+
runs,
|
|
706
|
+
delivery_batch_scale_for_run=delivery_batch_scale_for_run,
|
|
707
|
+
small_delivery_batch_scales=SMALL_DELIVERY_BATCH_SCALES,
|
|
708
|
+
)
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
def project_asset_handoff_state(
|
|
712
|
+
*,
|
|
713
|
+
ready: bool,
|
|
714
|
+
project_asset: dict[str, Any],
|
|
715
|
+
latest_runs: list[dict[str, Any]] | None,
|
|
716
|
+
) -> dict[str, Any]:
|
|
717
|
+
return _project_asset_handoff_state_read_model(
|
|
718
|
+
ready=ready,
|
|
719
|
+
project_asset=project_asset,
|
|
720
|
+
latest_runs=latest_runs,
|
|
721
|
+
compact_execution_profile=compact_execution_profile,
|
|
722
|
+
parse_timestamp=parse_timestamp,
|
|
723
|
+
is_handoff_ready_run=is_handoff_ready_run,
|
|
724
|
+
is_custom_post_handoff_work_run=is_custom_post_handoff_work_run,
|
|
725
|
+
is_status_neutral_run=is_status_neutral_run,
|
|
726
|
+
compact_post_handoff_run=compact_post_handoff_run,
|
|
727
|
+
small_delivery_batch_scale_streak=small_delivery_batch_scale_streak,
|
|
728
|
+
outcome_floor_configured=outcome_floor_configured,
|
|
729
|
+
outcome_gap_streak=outcome_gap_streak,
|
|
730
|
+
)
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
def project_asset_handoff_readiness(
|
|
734
|
+
item: dict[str, Any],
|
|
735
|
+
*,
|
|
736
|
+
latest_runs: list[dict[str, Any]] | None = None,
|
|
737
|
+
) -> dict[str, Any] | None:
|
|
738
|
+
return _project_asset_handoff_readiness_read_model(
|
|
739
|
+
item,
|
|
740
|
+
latest_runs=latest_runs,
|
|
741
|
+
project_asset_handoff_check_projection=project_asset_handoff_check_projection,
|
|
742
|
+
handoff_budget_contract=handoff_budget_contract,
|
|
743
|
+
project_asset_handoff_state=project_asset_handoff_state,
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
def enrich_project_asset(
|
|
748
|
+
item: dict[str, Any],
|
|
749
|
+
*,
|
|
750
|
+
user_todos: dict[str, Any] | None = None,
|
|
751
|
+
agent_todos: dict[str, Any] | None = None,
|
|
752
|
+
quota: dict[str, Any] | None = None,
|
|
753
|
+
latest_validation: dict[str, Any] | None = None,
|
|
754
|
+
latest_runs: list[dict[str, Any]] | None = None,
|
|
755
|
+
execution_profile: dict[str, Any] | None = None,
|
|
756
|
+
orchestration: dict[str, Any] | None = None,
|
|
757
|
+
subagent_activity: dict[str, Any] | None = None,
|
|
758
|
+
interface_budget_cadence: dict[str, Any] | None = None,
|
|
759
|
+
) -> None:
|
|
760
|
+
_enrich_project_asset_read_model(
|
|
761
|
+
item,
|
|
762
|
+
user_todos=user_todos,
|
|
763
|
+
agent_todos=agent_todos,
|
|
764
|
+
quota=quota,
|
|
765
|
+
latest_validation=latest_validation,
|
|
766
|
+
latest_runs=latest_runs,
|
|
767
|
+
execution_profile=execution_profile,
|
|
768
|
+
orchestration=orchestration,
|
|
769
|
+
subagent_activity=subagent_activity,
|
|
770
|
+
interface_budget_cadence=interface_budget_cadence,
|
|
771
|
+
project_asset_todo_summary=project_asset_todo_summary,
|
|
772
|
+
project_asset_todo_projection_gap=project_asset_todo_projection_gap,
|
|
773
|
+
project_asset_quota_summary=project_asset_quota_summary,
|
|
774
|
+
compact_execution_profile=compact_execution_profile,
|
|
775
|
+
compact_orchestration_policy=compact_orchestration_policy,
|
|
776
|
+
project_asset_handoff_readiness=project_asset_handoff_readiness,
|
|
777
|
+
project_asset_quota_state=project_asset_quota_state,
|
|
778
|
+
project_asset_user_todo_open_count=project_asset_user_todo_open_count,
|
|
779
|
+
build_long_task_cadence_hint=build_long_task_cadence_hint,
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
def active_state_todo_fields(
|
|
784
|
+
goal: dict[str, Any],
|
|
785
|
+
*,
|
|
786
|
+
runtime_root: Path | None = None,
|
|
787
|
+
) -> dict[str, Any]:
|
|
788
|
+
return _active_state_todo_fields_read_model(
|
|
789
|
+
goal,
|
|
790
|
+
runtime_root=runtime_root,
|
|
791
|
+
resolve_goal_local_path=resolve_goal_local_path,
|
|
792
|
+
active_state_next_action_entries=active_state_next_action_entries,
|
|
793
|
+
active_next_action_todo_ids=active_next_action_todo_ids,
|
|
794
|
+
load_rollout_events=load_rollout_events,
|
|
795
|
+
rollout_event_log_path=rollout_event_log_path,
|
|
796
|
+
max_todo_index_rollout_events_per_goal=MAX_TODO_INDEX_ROLLOUT_EVENTS_PER_GOAL,
|
|
797
|
+
active_state_event_projection_fields=active_state_event_projection_fields,
|
|
798
|
+
parse_active_state_todos=parse_active_state_todos,
|
|
799
|
+
parse_issue_meta_surface=parse_issue_meta_surface,
|
|
800
|
+
backlog_hygiene_warning=backlog_hygiene_warning,
|
|
801
|
+
completed_todo_archive_warning=completed_todo_archive_warning,
|
|
802
|
+
state_projection_gap_warning=state_projection_gap_warning,
|
|
803
|
+
)
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
def attention_item(
|
|
807
|
+
*,
|
|
808
|
+
goal_id: str,
|
|
809
|
+
status: str,
|
|
810
|
+
waiting_on: str,
|
|
811
|
+
severity: str,
|
|
812
|
+
recommended_action: str,
|
|
813
|
+
source: str,
|
|
814
|
+
operator_question: str | None = None,
|
|
815
|
+
agent_command: str | None = None,
|
|
816
|
+
controller_stage: str | None = None,
|
|
817
|
+
missing_gates: list[str] | None = None,
|
|
818
|
+
next_handoff_condition: str | None = None,
|
|
819
|
+
lifecycle_phase: str | None = None,
|
|
820
|
+
lifecycle_flags: list[str] | None = None,
|
|
821
|
+
user_todos: dict[str, Any] | None = None,
|
|
822
|
+
agent_todos: dict[str, Any] | None = None,
|
|
823
|
+
todo_state_file: str | None = None,
|
|
824
|
+
dreaming_proposal: dict[str, Any] | None = None,
|
|
825
|
+
) -> dict[str, Any]:
|
|
826
|
+
return _attention_item_read_model(
|
|
827
|
+
goal_id=goal_id,
|
|
828
|
+
status=status,
|
|
829
|
+
waiting_on=waiting_on,
|
|
830
|
+
severity=severity,
|
|
831
|
+
recommended_action=recommended_action,
|
|
832
|
+
source=source,
|
|
833
|
+
build_project_asset=build_project_asset,
|
|
834
|
+
compact_dreaming_lane_badge=compact_dreaming_lane_badge,
|
|
835
|
+
operator_question=operator_question,
|
|
836
|
+
agent_command=agent_command,
|
|
837
|
+
controller_stage=controller_stage,
|
|
838
|
+
missing_gates=missing_gates,
|
|
839
|
+
next_handoff_condition=next_handoff_condition,
|
|
840
|
+
lifecycle_phase=lifecycle_phase,
|
|
841
|
+
lifecycle_flags=lifecycle_flags,
|
|
842
|
+
user_todos=user_todos,
|
|
843
|
+
agent_todos=agent_todos,
|
|
844
|
+
todo_state_file=todo_state_file,
|
|
845
|
+
dreaming_proposal=dreaming_proposal,
|
|
846
|
+
)
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
def sync_connected_attention_action_from_todos(item: dict[str, Any]) -> None:
|
|
850
|
+
_sync_connected_attention_action_from_todos_read_model(
|
|
851
|
+
item,
|
|
852
|
+
first_open_todo_text=first_open_todo_text,
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
def active_state_todo_attention_item(
|
|
857
|
+
goal: dict[str, Any],
|
|
858
|
+
fields: dict[str, Any],
|
|
859
|
+
current_run: dict[str, Any] | None,
|
|
860
|
+
) -> dict[str, Any] | None:
|
|
861
|
+
return _active_state_todo_attention_item_read_model(
|
|
862
|
+
goal,
|
|
863
|
+
fields,
|
|
864
|
+
current_run,
|
|
865
|
+
public_safe_compact_text=public_safe_compact_text,
|
|
866
|
+
first_open_todo_text=first_open_todo_text,
|
|
867
|
+
todo_summary_open_count=todo_summary_open_count,
|
|
868
|
+
goal_lifecycle_fields=goal_lifecycle_fields,
|
|
869
|
+
attention_item=attention_item,
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
def todo_summary_open_count(summary: dict[str, Any] | None) -> int:
|
|
874
|
+
from .control_plane.status.monitor_display_projection import (
|
|
875
|
+
todo_summary_open_count as _todo_summary_open_count,
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
return _todo_summary_open_count(summary)
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
def todo_summary_lane_items(summary: dict[str, Any] | None, lane: str) -> list[dict[str, Any]]:
|
|
882
|
+
from .control_plane.status.monitor_display_projection import (
|
|
883
|
+
todo_summary_lane_items as _todo_summary_lane_items,
|
|
884
|
+
)
|
|
885
|
+
|
|
886
|
+
return _todo_summary_lane_items(summary, lane)
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
def attention_item_is_monitor_quiet_display_candidate(item: dict[str, Any]) -> bool:
|
|
890
|
+
from .control_plane.status.monitor_display_projection import (
|
|
891
|
+
attention_item_is_monitor_quiet_display_candidate as _attention_item_is_monitor_quiet_display_candidate,
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
return _attention_item_is_monitor_quiet_display_candidate(item)
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
def quiet_monitor_display_action(raw_action: str | None) -> str:
|
|
898
|
+
from .control_plane.status.monitor_display_projection import (
|
|
899
|
+
quiet_monitor_display_action as _quiet_monitor_display_action,
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
return _quiet_monitor_display_action(raw_action)
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
def normalize_monitor_quiet_attention_display(item: dict[str, Any]) -> None:
|
|
906
|
+
from .control_plane.status.monitor_display_projection import (
|
|
907
|
+
normalize_monitor_quiet_attention_display as _normalize_monitor_quiet_attention_display,
|
|
908
|
+
)
|
|
909
|
+
|
|
910
|
+
_normalize_monitor_quiet_attention_display(item)
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
def merge_global_registry_attention_findings(
|
|
914
|
+
*,
|
|
915
|
+
health_items: list[dict[str, Any]],
|
|
916
|
+
history_items: list[dict[str, Any]],
|
|
917
|
+
findings: list[Any],
|
|
918
|
+
goal_id_filter: str | None,
|
|
919
|
+
) -> None:
|
|
920
|
+
from .control_plane.status.registry_health_projection import (
|
|
921
|
+
merge_global_registry_attention_findings as _merge_global_registry_attention_findings,
|
|
922
|
+
)
|
|
923
|
+
|
|
924
|
+
_merge_global_registry_attention_findings(
|
|
925
|
+
health_items=health_items,
|
|
926
|
+
history_items=history_items,
|
|
927
|
+
findings=findings,
|
|
928
|
+
goal_id_filter=goal_id_filter,
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
def collect_global_registry_health(
|
|
933
|
+
*,
|
|
934
|
+
registry_path: Path,
|
|
935
|
+
runtime_root: Path,
|
|
936
|
+
current_registry: dict[str, Any],
|
|
937
|
+
) -> dict[str, Any]:
|
|
938
|
+
from .control_plane.status.registry_health_projection import (
|
|
939
|
+
collect_global_registry_health as _collect_global_registry_health,
|
|
940
|
+
)
|
|
941
|
+
|
|
942
|
+
return _collect_global_registry_health(
|
|
943
|
+
registry_path=registry_path,
|
|
944
|
+
runtime_root=runtime_root,
|
|
945
|
+
current_registry=current_registry,
|
|
946
|
+
)
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
def is_status_neutral_run(run: dict[str, Any]) -> bool:
|
|
950
|
+
from .control_plane.status.run_projection import (
|
|
951
|
+
is_status_neutral_run as _is_status_neutral_run,
|
|
952
|
+
)
|
|
953
|
+
|
|
954
|
+
return _is_status_neutral_run(run)
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
def latest_agent_lane_run(goal: dict[str, Any]) -> dict[str, Any] | None:
|
|
958
|
+
from .control_plane.status.run_projection import (
|
|
959
|
+
latest_agent_lane_run as _latest_agent_lane_run,
|
|
960
|
+
)
|
|
961
|
+
|
|
962
|
+
return _latest_agent_lane_run(goal)
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
def compact_agent_lane_recommendation(run: dict[str, Any] | None) -> dict[str, Any] | None:
|
|
966
|
+
from .control_plane.status.run_projection import (
|
|
967
|
+
compact_agent_lane_recommendation as _compact_agent_lane_recommendation,
|
|
968
|
+
)
|
|
969
|
+
|
|
970
|
+
return _compact_agent_lane_recommendation(run)
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
def latest_run_recommended_action_for_projection(
|
|
974
|
+
*,
|
|
975
|
+
current_status_run: dict[str, Any] | None,
|
|
976
|
+
agent_lane_recommendation: dict[str, Any] | None,
|
|
977
|
+
active_state_next_action: Any = None,
|
|
978
|
+
preferred_agent_id: str | None = None,
|
|
979
|
+
limit: int = 320,
|
|
980
|
+
) -> tuple[str | None, str | None]:
|
|
981
|
+
from .control_plane.status.run_projection import (
|
|
982
|
+
latest_run_recommended_action_for_projection as _latest_run_recommended_action_for_projection,
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
return _latest_run_recommended_action_for_projection(
|
|
986
|
+
current_status_run=current_status_run,
|
|
987
|
+
agent_lane_recommendation=agent_lane_recommendation,
|
|
988
|
+
active_state_next_action=active_state_next_action,
|
|
989
|
+
preferred_agent_id=preferred_agent_id,
|
|
990
|
+
limit=limit,
|
|
991
|
+
)
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
def latest_run(goal: dict[str, Any]) -> dict[str, Any] | None:
|
|
995
|
+
from .control_plane.status.run_projection import (
|
|
996
|
+
latest_run as _latest_run,
|
|
997
|
+
)
|
|
998
|
+
|
|
999
|
+
return _latest_run(goal)
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
def ordered_lifecycle_flags(flags: list[str]) -> list[str]:
|
|
1003
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1004
|
+
ordered_lifecycle_flags as _ordered_lifecycle_flags,
|
|
1005
|
+
)
|
|
1006
|
+
|
|
1007
|
+
return _ordered_lifecycle_flags(flags)
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
def primary_lifecycle_phase(flags: list[str], fallback: str = "registered") -> str:
|
|
1011
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1012
|
+
primary_lifecycle_phase as _primary_lifecycle_phase,
|
|
1013
|
+
)
|
|
1014
|
+
|
|
1015
|
+
return _primary_lifecycle_phase(flags, fallback=fallback)
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
def run_lifecycle_flags(run: dict[str, Any] | None) -> list[str]:
|
|
1019
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1020
|
+
run_lifecycle_flags as _run_lifecycle_flags,
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
return _run_lifecycle_flags(run)
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
def run_lifecycle_phase(run: dict[str, Any] | None) -> str:
|
|
1027
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1028
|
+
run_lifecycle_phase as _run_lifecycle_phase,
|
|
1029
|
+
)
|
|
1030
|
+
|
|
1031
|
+
return _run_lifecycle_phase(run)
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
def goal_lifecycle_fields(goal: dict[str, Any], current_run: dict[str, Any] | None) -> dict[str, Any]:
|
|
1035
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1036
|
+
goal_lifecycle_fields as _goal_lifecycle_fields,
|
|
1037
|
+
)
|
|
1038
|
+
|
|
1039
|
+
return _goal_lifecycle_fields(goal, current_run)
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
def readiness_attention_fields(run: dict[str, Any] | None) -> dict[str, Any]:
|
|
1043
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1044
|
+
readiness_attention_fields as _readiness_attention_fields,
|
|
1045
|
+
)
|
|
1046
|
+
|
|
1047
|
+
return _readiness_attention_fields(run)
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
def operator_gate_attention_fields(run: dict[str, Any] | None) -> dict[str, Any]:
|
|
1051
|
+
from .control_plane.status.lifecycle_projection import (
|
|
1052
|
+
operator_gate_attention_fields as _operator_gate_attention_fields,
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
return _operator_gate_attention_fields(run)
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
def compact_server_planning_contract(value: Any) -> dict[str, Any]:
|
|
1059
|
+
from .control_plane.status.dreaming_projection import (
|
|
1060
|
+
compact_server_planning_contract as _compact_server_planning_contract,
|
|
1061
|
+
)
|
|
1062
|
+
|
|
1063
|
+
return _compact_server_planning_contract(value)
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
def compact_dreaming_proposal(run: dict[str, Any] | None) -> dict[str, Any] | None:
|
|
1067
|
+
from .control_plane.status.dreaming_projection import (
|
|
1068
|
+
compact_dreaming_proposal as _compact_dreaming_proposal,
|
|
1069
|
+
)
|
|
1070
|
+
|
|
1071
|
+
return _compact_dreaming_proposal(run)
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
def compact_dreaming_lane_badge(proposal: dict[str, Any] | None) -> dict[str, Any] | None:
|
|
1075
|
+
from .control_plane.status.dreaming_projection import (
|
|
1076
|
+
compact_dreaming_lane_badge as _compact_dreaming_lane_badge,
|
|
1077
|
+
)
|
|
1078
|
+
|
|
1079
|
+
return _compact_dreaming_lane_badge(proposal)
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
def dreaming_attention_fields(run: dict[str, Any] | None) -> dict[str, Any]:
|
|
1083
|
+
from .control_plane.status.dreaming_projection import (
|
|
1084
|
+
dreaming_attention_fields as _dreaming_attention_fields,
|
|
1085
|
+
)
|
|
1086
|
+
|
|
1087
|
+
return _dreaming_attention_fields(run)
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
def legacy_runtime_goal_attention(
|
|
1091
|
+
goal: dict[str, Any],
|
|
1092
|
+
current_run: dict[str, Any] | None,
|
|
1093
|
+
readiness_fields: dict[str, Any],
|
|
1094
|
+
) -> dict[str, Any] | None:
|
|
1095
|
+
from .control_plane.status.goal_attention_projection import (
|
|
1096
|
+
legacy_runtime_goal_attention as _legacy_runtime_goal_attention,
|
|
1097
|
+
)
|
|
1098
|
+
|
|
1099
|
+
return _legacy_runtime_goal_attention(
|
|
1100
|
+
goal,
|
|
1101
|
+
current_run,
|
|
1102
|
+
readiness_fields,
|
|
1103
|
+
)
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
def goal_attention(goal: dict[str, Any]) -> dict[str, Any] | None:
|
|
1107
|
+
from .control_plane.status.goal_attention_projection import (
|
|
1108
|
+
goal_attention as _goal_attention,
|
|
1109
|
+
)
|
|
1110
|
+
|
|
1111
|
+
return _goal_attention(goal)
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
def build_task_graph_projection(
|
|
1115
|
+
item: dict[str, Any],
|
|
1116
|
+
*,
|
|
1117
|
+
goal: dict[str, Any],
|
|
1118
|
+
goal_latest_runs: list[dict[str, Any]] | None = None,
|
|
1119
|
+
) -> dict[str, Any] | None:
|
|
1120
|
+
return _build_task_graph_projection_read_model(
|
|
1121
|
+
item,
|
|
1122
|
+
goal=goal,
|
|
1123
|
+
goal_latest_runs=goal_latest_runs,
|
|
1124
|
+
public_safe_compact_text=public_safe_compact_text,
|
|
1125
|
+
normalize_todo_status=normalize_todo_status,
|
|
1126
|
+
todo_done_for_status=todo_done_for_status,
|
|
1127
|
+
todo_status_open=TODO_STATUS_OPEN,
|
|
1128
|
+
open_todo_items=open_todo_items,
|
|
1129
|
+
max_status_todos_per_role=MAX_STATUS_TODOS_PER_ROLE,
|
|
1130
|
+
todo_item_task_class=todo_item_task_class,
|
|
1131
|
+
user_gate_task_class=TODO_TASK_CLASS_USER_GATE,
|
|
1132
|
+
todo_summary_open_count=todo_summary_open_count,
|
|
1133
|
+
latest_run=latest_run,
|
|
1134
|
+
)
|
|
1135
|
+
|
|
1136
|
+
def attach_goal_channel_projection(
|
|
1137
|
+
item: dict[str, Any],
|
|
1138
|
+
*,
|
|
1139
|
+
goal: dict[str, Any],
|
|
1140
|
+
goal_latest_runs: list[dict[str, Any]],
|
|
1141
|
+
runtime_root: Path | None = None,
|
|
1142
|
+
) -> None:
|
|
1143
|
+
_attach_goal_channel_projection_read_model(
|
|
1144
|
+
item,
|
|
1145
|
+
goal=goal,
|
|
1146
|
+
goal_latest_runs=goal_latest_runs,
|
|
1147
|
+
build_goal_channel_projection=build_goal_channel_projection,
|
|
1148
|
+
runtime_root=runtime_root,
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
def build_attention_queue(
|
|
1153
|
+
*,
|
|
1154
|
+
contract: dict[str, Any],
|
|
1155
|
+
history: dict[str, Any],
|
|
1156
|
+
global_registry: dict[str, Any],
|
|
1157
|
+
runtime_root: Path | None = None,
|
|
1158
|
+
include_task_graph: bool = False,
|
|
1159
|
+
goal_id_filter: str | None = None,
|
|
1160
|
+
) -> dict[str, Any]:
|
|
1161
|
+
queue = _build_attention_queue_read_model(
|
|
1162
|
+
contract=contract,
|
|
1163
|
+
history=history,
|
|
1164
|
+
global_registry=global_registry,
|
|
1165
|
+
context=AttentionQueueContext(
|
|
1166
|
+
active_state_todo_fields=active_state_todo_fields,
|
|
1167
|
+
active_state_todo_attention_item=active_state_todo_attention_item,
|
|
1168
|
+
latest_run=latest_run,
|
|
1169
|
+
goal_attention=goal_attention,
|
|
1170
|
+
compact_agent_lane_recommendation=compact_agent_lane_recommendation,
|
|
1171
|
+
latest_agent_lane_run=latest_agent_lane_run,
|
|
1172
|
+
latest_run_recommended_action_for_projection=latest_run_recommended_action_for_projection,
|
|
1173
|
+
compact_autonomous_replan_ack=compact_autonomous_replan_ack,
|
|
1174
|
+
latest_autonomous_replan_ack_for_projection=latest_autonomous_replan_ack_for_projection,
|
|
1175
|
+
compact_control_plane_policy=compact_control_plane_policy,
|
|
1176
|
+
subagent_activity_for_goal=subagent_activity_for_goal,
|
|
1177
|
+
interface_budget_cadence_for_runs=interface_budget_cadence_for_runs,
|
|
1178
|
+
active_state_projection_warning=active_state_projection_warning,
|
|
1179
|
+
enrich_project_asset=enrich_project_asset,
|
|
1180
|
+
project_asset_latest_validation=project_asset_latest_validation,
|
|
1181
|
+
attach_active_state_project_asset_fields=_attach_active_state_project_asset_fields,
|
|
1182
|
+
sync_connected_attention_action_from_todos=sync_connected_attention_action_from_todos,
|
|
1183
|
+
quota_status=quota_status,
|
|
1184
|
+
quota_with_handoff_outcome_floor=quota_with_handoff_outcome_floor,
|
|
1185
|
+
normalize_monitor_quiet_attention_display=normalize_monitor_quiet_attention_display,
|
|
1186
|
+
build_task_graph_projection=build_task_graph_projection,
|
|
1187
|
+
attach_goal_channel_projection=attach_goal_channel_projection,
|
|
1188
|
+
attach_dependency_blockers=attach_dependency_blockers,
|
|
1189
|
+
autonomous_backlog_candidates=autonomous_backlog_candidates,
|
|
1190
|
+
autonomous_monitor_candidates=autonomous_monitor_candidates,
|
|
1191
|
+
attention_item=attention_item,
|
|
1192
|
+
attach_global_registry_shadow_finding=attach_global_registry_shadow_finding,
|
|
1193
|
+
next_action_projection_warning=next_action_projection_warning,
|
|
1194
|
+
autonomous_replan_obligation_from_runs=autonomous_replan_obligation_from_runs,
|
|
1195
|
+
source_registry_shadow_findings=SOURCE_REGISTRY_SHADOW_FINDINGS,
|
|
1196
|
+
monitor_signal_waiting_on=MONITOR_SIGNAL_WAITING_ON,
|
|
1197
|
+
),
|
|
1198
|
+
runtime_root=runtime_root,
|
|
1199
|
+
include_task_graph=include_task_graph,
|
|
1200
|
+
goal_id_filter=goal_id_filter,
|
|
1201
|
+
)
|
|
1202
|
+
if runtime_root is not None:
|
|
1203
|
+
for item in queue.get("items") or []:
|
|
1204
|
+
if not isinstance(item, dict):
|
|
1205
|
+
continue
|
|
1206
|
+
goal_id = str(item.get("goal_id") or "").strip()
|
|
1207
|
+
if not goal_id:
|
|
1208
|
+
continue
|
|
1209
|
+
receipts = project_evidence_log_read_receipts(
|
|
1210
|
+
load_rollout_events(
|
|
1211
|
+
rollout_event_log_path(runtime_root, goal_id),
|
|
1212
|
+
limit=MAX_TODO_INDEX_ROLLOUT_EVENTS_PER_GOAL,
|
|
1213
|
+
),
|
|
1214
|
+
limit=MAX_PROJECTED_READ_RECEIPTS,
|
|
1215
|
+
)
|
|
1216
|
+
if receipts:
|
|
1217
|
+
item["evidence_log_read_receipts"] = receipts
|
|
1218
|
+
return queue
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
def _compact_benchmark_post_launch_materialization(value: Any) -> dict[str, Any] | None:
|
|
1222
|
+
from .benchmarks.read_models.benchmark_status_runner import (
|
|
1223
|
+
_compact_benchmark_post_launch_materialization as _impl,
|
|
1224
|
+
)
|
|
1225
|
+
|
|
1226
|
+
return _impl(value)
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
def compact_benchmark_post_launch_materialization(value: Any) -> dict[str, Any] | None:
|
|
1230
|
+
from .benchmarks.read_models.benchmark_status_runner import (
|
|
1231
|
+
compact_benchmark_post_launch_materialization as _impl,
|
|
1232
|
+
)
|
|
1233
|
+
|
|
1234
|
+
return _impl(value)
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
def compact_benchmark_run(run: dict[str, Any]) -> dict[str, Any] | None:
|
|
1238
|
+
from .benchmarks.read_models.benchmark_status_runner import (
|
|
1239
|
+
compact_benchmark_run as _impl,
|
|
1240
|
+
)
|
|
1241
|
+
|
|
1242
|
+
return _impl(run)
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
def compact_run(run: dict[str, Any]) -> dict[str, Any]:
|
|
1246
|
+
compact = _compact_run_base_read_model(
|
|
1247
|
+
run,
|
|
1248
|
+
run_compact_fields=RUN_COMPACT_FIELDS,
|
|
1249
|
+
run_lifecycle_flags=run_lifecycle_flags,
|
|
1250
|
+
primary_lifecycle_phase=primary_lifecycle_phase,
|
|
1251
|
+
compact_human_reward=compact_human_reward,
|
|
1252
|
+
compact_operator_gate=compact_operator_gate,
|
|
1253
|
+
compact_autonomous_replan_ack=compact_autonomous_replan_ack,
|
|
1254
|
+
compact_operator_gate_resume_contract=compact_operator_gate_resume_contract,
|
|
1255
|
+
compact_controller_readiness=compact_controller_readiness,
|
|
1256
|
+
public_safe_compact_text=public_safe_compact_text,
|
|
1257
|
+
compact_subagent_run=compact_subagent_run,
|
|
1258
|
+
max_subagent_activity_items=MAX_SUBAGENT_ACTIVITY_ITEMS,
|
|
1259
|
+
compact_agent_vision=_compact_goal_vision_packet_read_model,
|
|
1260
|
+
)
|
|
1261
|
+
return _attach_run_summary_projections_read_model(
|
|
1262
|
+
compact,
|
|
1263
|
+
run,
|
|
1264
|
+
compact_benchmark_run=compact_benchmark_run,
|
|
1265
|
+
worker_bridge_ingest_health_note=worker_bridge_ingest_health_note,
|
|
1266
|
+
compact_benchmark_result=compact_benchmark_result,
|
|
1267
|
+
compact_benchmark_comparison=_compact_benchmark_comparison_read_model,
|
|
1268
|
+
benchmark_comparison_decision_note=_benchmark_comparison_decision_note_read_model,
|
|
1269
|
+
compact_benchmark_learning_ledger=compact_benchmark_learning_ledger,
|
|
1270
|
+
compact_benchmark_experiment_report=compact_benchmark_experiment_report,
|
|
1271
|
+
benchmark_experiment_report_readiness_note=benchmark_experiment_report_readiness_note,
|
|
1272
|
+
benchmark_experiment_report_replay_decision=benchmark_experiment_report_replay_decision,
|
|
1273
|
+
compact_active_user_assisted_pilot=_compact_active_user_assisted_pilot_read_model,
|
|
1274
|
+
compact_session_runtime_projection_from_run=compact_session_runtime_projection_from_run,
|
|
1275
|
+
)
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
def build_status_contract() -> dict[str, Any]:
|
|
1279
|
+
from .control_plane.status.contract_projection import (
|
|
1280
|
+
build_status_contract as _build_status_contract,
|
|
1281
|
+
)
|
|
1282
|
+
|
|
1283
|
+
return _build_status_contract()
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
def build_contract_health_projection(contract: dict[str, Any]) -> dict[str, Any]:
|
|
1287
|
+
from .control_plane.status.contract_projection import (
|
|
1288
|
+
build_contract_health_projection as _build_contract_health_projection,
|
|
1289
|
+
)
|
|
1290
|
+
|
|
1291
|
+
return _build_contract_health_projection(contract)
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
def build_status_runtime_summary_context() -> StatusRuntimeSummaryContext:
|
|
1295
|
+
return StatusRuntimeSummaryContext(
|
|
1296
|
+
latest_run=latest_run,
|
|
1297
|
+
goal_lifecycle_fields=goal_lifecycle_fields,
|
|
1298
|
+
subagent_activity_for_goal=subagent_activity_for_goal,
|
|
1299
|
+
compact_run=compact_run,
|
|
1300
|
+
quota_status=quota_status,
|
|
1301
|
+
parse_timestamp=parse_timestamp,
|
|
1302
|
+
compact_benchmark_run=compact_benchmark_run,
|
|
1303
|
+
compact_benchmark_result=compact_benchmark_result,
|
|
1304
|
+
compact_benchmark_comparison=_compact_benchmark_comparison_read_model,
|
|
1305
|
+
compact_benchmark_learning_ledger=compact_benchmark_learning_ledger,
|
|
1306
|
+
compact_benchmark_experiment_report=compact_benchmark_experiment_report,
|
|
1307
|
+
compact_active_user_assisted_pilot=_compact_active_user_assisted_pilot_read_model,
|
|
1308
|
+
run_has_external_evidence_watch_signal=run_has_external_evidence_watch_signal,
|
|
1309
|
+
decision_classifications=EVENT_LEDGER_DECISION_CLASSIFICATIONS,
|
|
1310
|
+
evidence_classifications=EVENT_LEDGER_EVIDENCE_CLASSIFICATIONS,
|
|
1311
|
+
evidence_hints=EVENT_LEDGER_EVIDENCE_HINTS,
|
|
1312
|
+
state_classifications=EVENT_LEDGER_STATE_CLASSIFICATIONS,
|
|
1313
|
+
promotion_readiness_classifications=PROMOTION_READINESS_CLASSIFICATIONS,
|
|
1314
|
+
add_promotion_readiness_freshness=add_promotion_readiness_freshness,
|
|
1315
|
+
latest_promotion_readiness_event=latest_promotion_readiness_event,
|
|
1316
|
+
promotion_readiness_freshness_hours=PROMOTION_READINESS_FRESHNESS_HOURS,
|
|
1317
|
+
promotion_readiness_proxy_note=PROMOTION_READINESS_PROXY_NOTE,
|
|
1318
|
+
public_safe_compact_text=public_safe_compact_text,
|
|
1319
|
+
decision_freshness_classification_prefixes=DECISION_FRESHNESS_CLASSIFICATION_PREFIXES,
|
|
1320
|
+
decision_freshness_window_days=DECISION_FRESHNESS_WINDOW_DAYS,
|
|
1321
|
+
decision_freshness_item_limit=DECISION_FRESHNESS_ITEM_LIMIT,
|
|
1322
|
+
decision_freshness_proxy_note=DECISION_FRESHNESS_PROXY_NOTE,
|
|
1323
|
+
)
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
def build_status_runtime_summaries(
|
|
1327
|
+
*,
|
|
1328
|
+
history: dict[str, Any],
|
|
1329
|
+
queue: dict[str, Any],
|
|
1330
|
+
runtime_root: Path,
|
|
1331
|
+
goal_id_filter: str | None,
|
|
1332
|
+
display_limit: int,
|
|
1333
|
+
todo_index_limit: int,
|
|
1334
|
+
) -> dict[str, Any]:
|
|
1335
|
+
return _build_status_runtime_summaries_read_model(
|
|
1336
|
+
history=history,
|
|
1337
|
+
queue=queue,
|
|
1338
|
+
runtime_root=runtime_root,
|
|
1339
|
+
goal_id_filter=goal_id_filter,
|
|
1340
|
+
display_limit=display_limit,
|
|
1341
|
+
todo_index_limit=todo_index_limit,
|
|
1342
|
+
context=build_status_runtime_summary_context(),
|
|
1343
|
+
)
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
def build_status_collection_context() -> StatusCollectionContext:
|
|
1347
|
+
return StatusCollectionContext(
|
|
1348
|
+
load_registry=load_registry,
|
|
1349
|
+
resolve_runtime_root=resolve_runtime_root,
|
|
1350
|
+
collect_global_registry_health=collect_global_registry_health,
|
|
1351
|
+
collect_history=collect_history,
|
|
1352
|
+
check_contract=check_contract,
|
|
1353
|
+
build_attention_queue=build_attention_queue,
|
|
1354
|
+
build_runtime_summaries=build_status_runtime_summaries,
|
|
1355
|
+
build_promotion_gate=build_promotion_gate,
|
|
1356
|
+
build_status_contract=build_status_contract,
|
|
1357
|
+
build_contract_health_projection=build_contract_health_projection,
|
|
1358
|
+
build_agent_management_projection=_build_agent_management_projection_read_model,
|
|
1359
|
+
status_control_plane_context_limit=STATUS_CONTROL_PLANE_CONTEXT_LIMIT,
|
|
1360
|
+
max_todo_index_items=MAX_TODO_INDEX_ITEMS,
|
|
1361
|
+
)
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
def collect_status(
|
|
1365
|
+
*,
|
|
1366
|
+
registry_path: Path,
|
|
1367
|
+
runtime_root_override: str | None,
|
|
1368
|
+
scan_roots: list[Path],
|
|
1369
|
+
limit: int,
|
|
1370
|
+
include_task_graph: bool = False,
|
|
1371
|
+
goal_id: str | None = None,
|
|
1372
|
+
available_capabilities: Any = None,
|
|
1373
|
+
) -> dict[str, Any]:
|
|
1374
|
+
return _collect_status_read_model(
|
|
1375
|
+
registry_path=registry_path,
|
|
1376
|
+
runtime_root_override=runtime_root_override,
|
|
1377
|
+
scan_roots=scan_roots,
|
|
1378
|
+
limit=limit,
|
|
1379
|
+
include_task_graph=include_task_graph,
|
|
1380
|
+
goal_id=goal_id,
|
|
1381
|
+
available_capabilities=available_capabilities,
|
|
1382
|
+
context=build_status_collection_context(),
|
|
1383
|
+
)
|