agent-lifecycle-kit 1.50.1__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.
- agent_lifecycle/__init__.py +5 -0
- agent_lifecycle/__main__.py +5 -0
- agent_lifecycle/_version.py +3 -0
- agent_lifecycle/adapter_sessions/__init__.py +41 -0
- agent_lifecycle/adapter_sessions/contracts.py +133 -0
- agent_lifecycle/adapter_sessions/env.py +44 -0
- agent_lifecycle/adapter_sessions/launcher.py +101 -0
- agent_lifecycle/adapter_sessions/process.py +39 -0
- agent_lifecycle/adapter_sessions/redaction.py +30 -0
- agent_lifecycle/adapter_sessions/session_store.py +64 -0
- agent_lifecycle/adapter_sessions/task_intake.py +450 -0
- agent_lifecycle/adapter_sessions/workflow_bridge.py +154 -0
- agent_lifecycle/audit/__init__.py +67 -0
- agent_lifecycle/audit/bug_forensics.py +94 -0
- agent_lifecycle/audit/implementation.py +516 -0
- agent_lifecycle/audit/ownership.py +119 -0
- agent_lifecycle/audit/proof_integrity.py +814 -0
- agent_lifecycle/audit/review_verdict.py +116 -0
- agent_lifecycle/changesets/__init__.py +5 -0
- agent_lifecycle/changesets/git.py +35 -0
- agent_lifecycle/cli/__init__.py +5 -0
- agent_lifecycle/cli/adapter.py +360 -0
- agent_lifecycle/cli/dispatch.py +1220 -0
- agent_lifecycle/cli/followup.py +89 -0
- agent_lifecycle/cli/main.py +41 -0
- agent_lifecycle/cli/metrics_parser.py +49 -0
- agent_lifecycle/cli/parsers.py +618 -0
- agent_lifecycle/cli/policy.py +101 -0
- agent_lifecycle/cli/progress_hooks.py +117 -0
- agent_lifecycle/cli/worktree.py +74 -0
- agent_lifecycle/compiler/__init__.py +17 -0
- agent_lifecycle/compiler/small_model_packets.py +322 -0
- agent_lifecycle/compiler/task_packets.py +229 -0
- agent_lifecycle/context/__init__.py +20 -0
- agent_lifecycle/context/episode_retrieval.py +30 -0
- agent_lifecycle/context/external_memory.py +71 -0
- agent_lifecycle/context/profiles.py +104 -0
- agent_lifecycle/context/rendering.py +226 -0
- agent_lifecycle/contracts/__init__.py +25 -0
- agent_lifecycle/contracts/adapter_contract_schemas.py +130 -0
- agent_lifecycle/contracts/adapter_event_schemas.py +118 -0
- agent_lifecycle/contracts/adapter_session_schemas.py +130 -0
- agent_lifecycle/contracts/adapter_task_schemas.py +90 -0
- agent_lifecycle/contracts/audit_schemas.py +133 -0
- agent_lifecycle/contracts/bug_forensics_schemas.py +400 -0
- agent_lifecycle/contracts/canonical.py +55 -0
- agent_lifecycle/contracts/compatibility.py +242 -0
- agent_lifecycle/contracts/context_model_schemas.py +265 -0
- agent_lifecycle/contracts/core_schemas.py +252 -0
- agent_lifecycle/contracts/cross_check_schemas.py +121 -0
- agent_lifecycle/contracts/errors.py +26 -0
- agent_lifecycle/contracts/evidence_import_schemas.py +152 -0
- agent_lifecycle/contracts/host_capability_schemas.py +64 -0
- agent_lifecycle/contracts/import_dialect_schemas.py +166 -0
- agent_lifecycle/contracts/metric_schemas.py +315 -0
- agent_lifecycle/contracts/paths.py +31 -0
- agent_lifecycle/contracts/plan_contract_schemas.py +148 -0
- agent_lifecycle/contracts/policy_schemas.py +350 -0
- agent_lifecycle/contracts/progress_bridge_schemas.py +114 -0
- agent_lifecycle/contracts/progress_hook_schemas.py +119 -0
- agent_lifecycle/contracts/proof_integrity_schemas.py +240 -0
- agent_lifecycle/contracts/release_contract_schemas.py +476 -0
- agent_lifecycle/contracts/review_mesh_recommendation_schemas.py +64 -0
- agent_lifecycle/contracts/review_mesh_schemas.py +222 -0
- agent_lifecycle/contracts/review_quality_schemas.py +109 -0
- agent_lifecycle/contracts/runner_schemas.py +91 -0
- agent_lifecycle/contracts/runner_worktree_schemas.py +389 -0
- agent_lifecycle/contracts/sandbox_schemas.py +159 -0
- agent_lifecycle/contracts/schema_builders.py +23 -0
- agent_lifecycle/contracts/schemas.py +93 -0
- agent_lifecycle/contracts/status_goal_schemas.py +469 -0
- agent_lifecycle/contracts/task_template_schemas.py +96 -0
- agent_lifecycle/contracts/usage_export_schemas.py +68 -0
- agent_lifecycle/diagnostics/__init__.py +17 -0
- agent_lifecycle/diagnostics/bundles.py +124 -0
- agent_lifecycle/diagnostics/readiness.py +733 -0
- agent_lifecycle/evidence_index/__init__.py +39 -0
- agent_lifecycle/evidence_index/core.py +272 -0
- agent_lifecycle/evidence_index/episode_index.py +329 -0
- agent_lifecycle/evidence_index/external_context.py +276 -0
- agent_lifecycle/followup/__init__.py +23 -0
- agent_lifecycle/followup/records.py +404 -0
- agent_lifecycle/freeze/__init__.py +5 -0
- agent_lifecycle/freeze/locks.py +23 -0
- agent_lifecycle/goal/__init__.py +15 -0
- agent_lifecycle/goal/records.py +244 -0
- agent_lifecycle/goal/view.py +109 -0
- agent_lifecycle/host_protocol/__init__.py +65 -0
- agent_lifecycle/host_protocol/acp_capability.py +195 -0
- agent_lifecycle/host_protocol/capabilities.py +268 -0
- agent_lifecycle/host_protocol/contracts.py +214 -0
- agent_lifecycle/host_protocol/event_capture.py +390 -0
- agent_lifecycle/host_protocol/events.py +196 -0
- agent_lifecycle/host_protocol/inspection.py +194 -0
- agent_lifecycle/host_protocol/inspection_common.py +310 -0
- agent_lifecycle/host_protocol/inspection_cursor.py +164 -0
- agent_lifecycle/host_protocol/inspection_gemini_cli.py +163 -0
- agent_lifecycle/host_protocol/inspection_hermes.py +161 -0
- agent_lifecycle/host_protocol/inspection_kimi_code.py +169 -0
- agent_lifecycle/host_protocol/inspection_opencode.py +147 -0
- agent_lifecycle/host_protocol/inspection_qwen_code.py +143 -0
- agent_lifecycle/host_protocol/receipts.py +58 -0
- agent_lifecycle/host_protocol/scaffold.py +329 -0
- agent_lifecycle/host_protocol/validation.py +229 -0
- agent_lifecycle/imports/__init__.py +76 -0
- agent_lifecycle/imports/agentskills_profile.py +54 -0
- agent_lifecycle/imports/bmad_profile.py +49 -0
- agent_lifecycle/imports/constitution_adr.py +91 -0
- agent_lifecycle/imports/dialect_profiles.py +121 -0
- agent_lifecycle/imports/external_agent.py +28 -0
- agent_lifecycle/imports/external_dialects.py +486 -0
- agent_lifecycle/imports/external_workflow.py +28 -0
- agent_lifecycle/imports/multi_markdown.py +111 -0
- agent_lifecycle/imports/openspec_profile.py +49 -0
- agent_lifecycle/imports/planning.py +536 -0
- agent_lifecycle/imports/spec_kit_profile.py +49 -0
- agent_lifecycle/imports/spec_kitty_profile.py +49 -0
- agent_lifecycle/metrics/__init__.py +60 -0
- agent_lifecycle/metrics/cost_collection.py +315 -0
- agent_lifecycle/metrics/costs.py +203 -0
- agent_lifecycle/metrics/outcome_index.py +330 -0
- agent_lifecycle/metrics/phase_resources.py +208 -0
- agent_lifecycle/metrics/recommendations.py +507 -0
- agent_lifecycle/metrics/regression_signals.py +64 -0
- agent_lifecycle/metrics/usage_export.py +390 -0
- agent_lifecycle/model_routing/__init__.py +19 -0
- agent_lifecycle/model_routing/profiles.py +323 -0
- agent_lifecycle/model_routing/receipts.py +140 -0
- agent_lifecycle/model_routing/resolver.py +566 -0
- agent_lifecycle/neutrality/__init__.py +12 -0
- agent_lifecycle/neutrality/__main__.py +6 -0
- agent_lifecycle/neutrality/authority.py +265 -0
- agent_lifecycle/neutrality/canonical.py +28 -0
- agent_lifecycle/neutrality/cli.py +294 -0
- agent_lifecycle/neutrality/ed25519.py +124 -0
- agent_lifecycle/neutrality/errors.py +89 -0
- agent_lifecycle/neutrality/gate.py +269 -0
- agent_lifecycle/neutrality/paths.py +92 -0
- agent_lifecycle/neutrality/policy.py +76 -0
- agent_lifecycle/neutrality/receipt.py +135 -0
- agent_lifecycle/neutrality/scanner.py +310 -0
- agent_lifecycle/neutrality/test_runner.py +116 -0
- agent_lifecycle/planning/__init__.py +47 -0
- agent_lifecycle/planning/acceptance_markdown.py +159 -0
- agent_lifecycle/planning/completeness.py +362 -0
- agent_lifecycle/planning/continuity.py +255 -0
- agent_lifecycle/planning/templates.py +294 -0
- agent_lifecycle/planning/tiering.py +87 -0
- agent_lifecycle/planning/validation.py +72 -0
- agent_lifecycle/policy/__init__.py +37 -0
- agent_lifecycle/policy/adaptive_lifecycle.py +416 -0
- agent_lifecycle/policy/apply.py +44 -0
- agent_lifecycle/policy/proposals.py +189 -0
- agent_lifecycle/policy/quality_floor.py +144 -0
- agent_lifecycle/policy/runtime_receipts.py +160 -0
- agent_lifecycle/py.typed +1 -0
- agent_lifecycle/quality/__init__.py +89 -0
- agent_lifecycle/quality/bug_forensics.py +727 -0
- agent_lifecycle/quality/bug_forensics_advisor.py +88 -0
- agent_lifecycle/quality/bug_forensics_recipes.py +239 -0
- agent_lifecycle/quality/cross_check.py +437 -0
- agent_lifecycle/quality/failure_classification.py +318 -0
- agent_lifecycle/quality/packs.py +265 -0
- agent_lifecycle/reporting/__init__.py +37 -0
- agent_lifecycle/reporting/change_summary.py +156 -0
- agent_lifecycle/reporting/event_feed.py +101 -0
- agent_lifecycle/reporting/progress_bridge.py +153 -0
- agent_lifecycle/reporting/progress_hooks.py +161 -0
- agent_lifecycle/reporting/progress_terminal.py +95 -0
- agent_lifecycle/reporting/progress_view.py +284 -0
- agent_lifecycle/reporting/status_view.py +125 -0
- agent_lifecycle/reporting/usage_export.py +59 -0
- agent_lifecycle/review/__init__.py +5 -0
- agent_lifecycle/review/validation.py +29 -0
- agent_lifecycle/review_mesh/__init__.py +83 -0
- agent_lifecycle/review_mesh/assignments.py +160 -0
- agent_lifecycle/review_mesh/contracts.py +685 -0
- agent_lifecycle/review_mesh/operator_templates.py +320 -0
- agent_lifecycle/review_mesh/quorum.py +38 -0
- agent_lifecycle/review_mesh/recommendation.py +487 -0
- agent_lifecycle/review_mesh/results.py +98 -0
- agent_lifecycle/review_mesh/synthesis.py +102 -0
- agent_lifecycle/runner/__init__.py +47 -0
- agent_lifecycle/runner/attempt_snapshots.py +244 -0
- agent_lifecycle/runner/core.py +653 -0
- agent_lifecycle/runner/sandbox_receipts.py +628 -0
- agent_lifecycle/specification/__init__.py +23 -0
- agent_lifecycle/specification/completion_check.py +135 -0
- agent_lifecycle/specification/completion_gate.py +501 -0
- agent_lifecycle/specification/completion_signal.py +75 -0
- agent_lifecycle/specification/validation.py +48 -0
- agent_lifecycle/workflow/__init__.py +79 -0
- agent_lifecycle/workflow/artifacts.py +74 -0
- agent_lifecycle/workflow/budget_decisions.py +370 -0
- agent_lifecycle/workflow/budget_policy.py +140 -0
- agent_lifecycle/workflow/budget_receipts.py +70 -0
- agent_lifecycle/workflow/bug_forensics_gates.py +284 -0
- agent_lifecycle/workflow/controller.py +45 -0
- agent_lifecycle/workflow/events.py +50 -0
- agent_lifecycle/workflow/final_proof_integrity.py +74 -0
- agent_lifecycle/workflow/finalization.py +422 -0
- agent_lifecycle/workflow/gates.py +185 -0
- agent_lifecycle/workflow/implementation_audit_gate.py +126 -0
- agent_lifecycle/workflow/leases.py +220 -0
- agent_lifecycle/workflow/lineage.py +108 -0
- agent_lifecycle/workflow/managed_runner.py +167 -0
- agent_lifecycle/workflow/model_usage.py +106 -0
- agent_lifecycle/workflow/next_action.py +86 -0
- agent_lifecycle/workflow/operation_kernel.py +98 -0
- agent_lifecycle/workflow/plan_adoption.py +439 -0
- agent_lifecycle/workflow/query.py +52 -0
- agent_lifecycle/workflow/review_mesh_gate.py +93 -0
- agent_lifecycle/workflow/reviews.py +168 -0
- agent_lifecycle/workflow/run_transitions.py +163 -0
- agent_lifecycle/workflow/sandbox_policy.py +214 -0
- agent_lifecycle/workflow/selectors.py +57 -0
- agent_lifecycle/workflow/state.py +130 -0
- agent_lifecycle/workflow/task_transitions.py +421 -0
- agent_lifecycle/worktree/__init__.py +17 -0
- agent_lifecycle/worktree/isolation.py +407 -0
- agent_lifecycle_kit-1.50.1.dist-info/METADATA +201 -0
- agent_lifecycle_kit-1.50.1.dist-info/RECORD +227 -0
- agent_lifecycle_kit-1.50.1.dist-info/WHEEL +5 -0
- agent_lifecycle_kit-1.50.1.dist-info/entry_points.txt +3 -0
- agent_lifecycle_kit-1.50.1.dist-info/licenses/LICENSE +201 -0
- agent_lifecycle_kit-1.50.1.dist-info/licenses/NOTICE +5 -0
- agent_lifecycle_kit-1.50.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
"""Argparse construction for the root CLI."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
|
|
7
|
+
from agent_lifecycle.cli.adapter import add_adapter_parser
|
|
8
|
+
from agent_lifecycle.cli.followup import add_followup_parser
|
|
9
|
+
from agent_lifecycle.cli.metrics_parser import add_metrics_parser
|
|
10
|
+
from agent_lifecycle.cli.policy import add_policy_parser
|
|
11
|
+
from agent_lifecycle.cli.progress_hooks import add_progress_hook_args
|
|
12
|
+
from agent_lifecycle.cli.worktree import add_worktree_parser
|
|
13
|
+
from agent_lifecycle.contracts.review_mesh_schemas import REVIEW_MESH_MODE_IDS
|
|
14
|
+
from agent_lifecycle.review_mesh.operator_templates import REVIEW_MESH_OPERATOR_TEMPLATE_IDS
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
18
|
+
parser = argparse.ArgumentParser(prog="agent-lifecycle")
|
|
19
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
20
|
+
subparsers.add_parser("version", help="print package version as compact JSON")
|
|
21
|
+
_add_diagnose_parser(subparsers)
|
|
22
|
+
_add_diagnostics_parser(subparsers)
|
|
23
|
+
_add_schema_parser(subparsers)
|
|
24
|
+
_add_contract_parser(subparsers)
|
|
25
|
+
subparsers.add_parser("neutrality", help="run neutrality subcommands")
|
|
26
|
+
_add_evidence_parser(subparsers)
|
|
27
|
+
_add_import_parser(subparsers)
|
|
28
|
+
_add_quality_parser(subparsers)
|
|
29
|
+
_add_review_mesh_parser(subparsers)
|
|
30
|
+
_add_report_parser(subparsers)
|
|
31
|
+
add_policy_parser(subparsers)
|
|
32
|
+
_add_workflow_parser(subparsers)
|
|
33
|
+
_add_audit_parser(subparsers)
|
|
34
|
+
_add_context_parser(subparsers)
|
|
35
|
+
_add_goal_parser(subparsers)
|
|
36
|
+
add_followup_parser(subparsers)
|
|
37
|
+
add_worktree_parser(subparsers)
|
|
38
|
+
_add_model_parser(subparsers)
|
|
39
|
+
add_metrics_parser(subparsers)
|
|
40
|
+
_add_runner_parser(subparsers)
|
|
41
|
+
_add_tier_parser(subparsers)
|
|
42
|
+
_add_specification_parser(subparsers)
|
|
43
|
+
_add_plan_parser(subparsers)
|
|
44
|
+
_add_task_parser(subparsers)
|
|
45
|
+
add_adapter_parser(subparsers)
|
|
46
|
+
subparsers.add_parser("conformance", help="conformance commands")
|
|
47
|
+
return parser
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _add_diagnose_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
51
|
+
diagnose = subparsers.add_parser("diagnose", help="build a redacted readiness report")
|
|
52
|
+
diagnose.add_argument("--project-root", default=".")
|
|
53
|
+
diagnose.add_argument("--adapter", action="append", default=[])
|
|
54
|
+
diagnose.add_argument("--context-profile")
|
|
55
|
+
diagnose.add_argument("--model-profile")
|
|
56
|
+
diagnose.add_argument("--adapter-baseline")
|
|
57
|
+
diagnose.add_argument("--no-install-plans", action="store_true")
|
|
58
|
+
diagnose.add_argument("--include-host-probes", action="store_true")
|
|
59
|
+
diagnose.add_argument("--timeout-seconds", type=float, default=5.0)
|
|
60
|
+
diagnose.add_argument("--max-host-probes", type=int, default=1)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _add_diagnostics_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
64
|
+
diagnostics = subparsers.add_parser("diagnostics", help="optional diagnostics commands")
|
|
65
|
+
diagnostics_sub = diagnostics.add_subparsers(dest="diagnostics_command", required=True)
|
|
66
|
+
bundle = diagnostics_sub.add_parser("bundle")
|
|
67
|
+
bundle.add_argument("--project-root", default=".")
|
|
68
|
+
bundle.add_argument("--artifact", action="append", default=[])
|
|
69
|
+
bundle.add_argument("--max-artifacts", type=int, default=8)
|
|
70
|
+
bundle.add_argument("--max-input-bytes", type=int, default=20000)
|
|
71
|
+
bundle.add_argument("--out")
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def _add_schema_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
75
|
+
schema = subparsers.add_parser("schema", help="inspect bundled JSON schemas")
|
|
76
|
+
schema_sub = schema.add_subparsers(dest="schema_command", required=True)
|
|
77
|
+
schema_sub.add_parser("list")
|
|
78
|
+
show = schema_sub.add_parser("show")
|
|
79
|
+
show.add_argument("schema_id")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _add_contract_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
83
|
+
contract = subparsers.add_parser("contract", help="public contract commands")
|
|
84
|
+
contract_sub = contract.add_subparsers(dest="contract_command", required=True)
|
|
85
|
+
policy = contract_sub.add_parser("policy")
|
|
86
|
+
policy.add_argument("--out")
|
|
87
|
+
check = contract_sub.add_parser("check")
|
|
88
|
+
check.add_argument("--policy")
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _add_evidence_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
92
|
+
evidence = subparsers.add_parser("evidence", help="optional evidence index commands")
|
|
93
|
+
evidence_sub = evidence.add_subparsers(dest="evidence_command", required=True)
|
|
94
|
+
index = evidence_sub.add_parser("index")
|
|
95
|
+
index.add_argument("--project-root", default=".")
|
|
96
|
+
index.add_argument("--artifact", action="append", default=[])
|
|
97
|
+
index.add_argument("--max-artifacts", type=int, default=64)
|
|
98
|
+
index.add_argument("--max-input-bytes", type=int, default=65536)
|
|
99
|
+
index.add_argument("--target-tokens", type=int, default=2048)
|
|
100
|
+
index.add_argument("--out")
|
|
101
|
+
search = evidence_sub.add_parser("search")
|
|
102
|
+
search.add_argument("--index", required=True)
|
|
103
|
+
search.add_argument("--query", default="")
|
|
104
|
+
search.add_argument("--max-results", type=int, default=8)
|
|
105
|
+
search.add_argument("--target-tokens", type=int, default=2048)
|
|
106
|
+
search.add_argument("--out")
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _add_import_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
110
|
+
imports = subparsers.add_parser("import", help="optional import commands for untrusted planning inputs")
|
|
111
|
+
import_sub = imports.add_subparsers(dest="import_command", required=True)
|
|
112
|
+
profile_list = import_sub.add_parser("profile-list")
|
|
113
|
+
profile_list.add_argument("--out")
|
|
114
|
+
plan = import_sub.add_parser("plan")
|
|
115
|
+
plan.add_argument("--source", required=True)
|
|
116
|
+
plan.add_argument("--dialect", choices=["openspec", "spec-kit", "bmad", "spec-kitty"])
|
|
117
|
+
plan.add_argument("--package-id", default="imported-plan")
|
|
118
|
+
plan.add_argument("--max-input-bytes", type=int, default=32768)
|
|
119
|
+
plan.add_argument("--max-files", type=int, default=32)
|
|
120
|
+
plan.add_argument("--target-tokens", type=int, default=4096)
|
|
121
|
+
plan.add_argument("--out")
|
|
122
|
+
external = import_sub.add_parser("external")
|
|
123
|
+
external.add_argument("--source", required=True)
|
|
124
|
+
external.add_argument("--family", choices=["workflow", "agent"], required=True)
|
|
125
|
+
external.add_argument("--profile", default="generic")
|
|
126
|
+
external.add_argument("--package-id", default="external-dialect-import")
|
|
127
|
+
external.add_argument("--max-input-bytes", type=int, default=32768)
|
|
128
|
+
external.add_argument("--target-tokens", type=int, default=4096)
|
|
129
|
+
external.add_argument("--out")
|
|
130
|
+
check = import_sub.add_parser("check")
|
|
131
|
+
check.add_argument("--candidate", required=True)
|
|
132
|
+
external_check = import_sub.add_parser("external-check")
|
|
133
|
+
external_check.add_argument("--candidate", required=True)
|
|
134
|
+
proposal_check = import_sub.add_parser("proposal-check")
|
|
135
|
+
proposal_check.add_argument("--proposal", required=True)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def _add_quality_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
139
|
+
quality = subparsers.add_parser("quality", help="optional quality commands")
|
|
140
|
+
quality_sub = quality.add_subparsers(dest="quality_command", required=True)
|
|
141
|
+
pack_check = quality_sub.add_parser("pack-check")
|
|
142
|
+
pack_check.add_argument("--manifest")
|
|
143
|
+
behavior_check = quality_sub.add_parser("behavior-check")
|
|
144
|
+
behavior_check.add_argument("--manifest")
|
|
145
|
+
behavior_check.add_argument("--fixture", action="append", default=[])
|
|
146
|
+
template_list = quality_sub.add_parser("template-list")
|
|
147
|
+
template_list.add_argument("--out")
|
|
148
|
+
template_check = quality_sub.add_parser("template-check")
|
|
149
|
+
template_check.add_argument("--project-root", default=".")
|
|
150
|
+
template_check.add_argument("--template-id")
|
|
151
|
+
template_check.add_argument("--out")
|
|
152
|
+
bug_recipe_list = quality_sub.add_parser("bug-recipe-list")
|
|
153
|
+
bug_recipe_list.add_argument("--out")
|
|
154
|
+
bug_recipe_check = quality_sub.add_parser("bug-recipe-check")
|
|
155
|
+
bug_recipe_check.add_argument("--recipe-id")
|
|
156
|
+
bug_recipe_check.add_argument("--out")
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
def _add_review_mesh_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
160
|
+
review_mesh = subparsers.add_parser("review-mesh", help="optional Review Mesh commands")
|
|
161
|
+
review_mesh_sub = review_mesh.add_subparsers(dest="review_mesh_command", required=True)
|
|
162
|
+
template_list = review_mesh_sub.add_parser("template-list")
|
|
163
|
+
template_list.add_argument("--out")
|
|
164
|
+
profile = review_mesh_sub.add_parser("profile")
|
|
165
|
+
profile.add_argument("--profile-id", default="optional-review-mesh")
|
|
166
|
+
profile.add_argument("--mode", choices=list(REVIEW_MESH_MODE_IDS), action="append", default=[])
|
|
167
|
+
profile.add_argument("--default-mode", choices=list(REVIEW_MESH_MODE_IDS), default="leader-draft-multi-review")
|
|
168
|
+
profile.add_argument("--reviewer-model-class", action="append", default=[])
|
|
169
|
+
profile.add_argument("--require-independence", action="store_true")
|
|
170
|
+
profile.add_argument("--independence-dimension", choices=["host", "model"], action="append", default=[])
|
|
171
|
+
profile.add_argument("--allow-live-calls", action="store_true")
|
|
172
|
+
profile.add_argument("--max-invocations", type=int)
|
|
173
|
+
profile.add_argument("--max-input-tokens", type=int)
|
|
174
|
+
profile.add_argument("--max-output-tokens", type=int)
|
|
175
|
+
profile.add_argument("--max-wall-seconds", type=int)
|
|
176
|
+
profile.add_argument("--out")
|
|
177
|
+
recommend = review_mesh_sub.add_parser("recommend")
|
|
178
|
+
source = recommend.add_mutually_exclusive_group(required=True)
|
|
179
|
+
source.add_argument("--text")
|
|
180
|
+
source.add_argument("--file")
|
|
181
|
+
source.add_argument("--intake")
|
|
182
|
+
source.add_argument("--manifest")
|
|
183
|
+
recommend.add_argument("--sdd-tier", choices=["S0", "S1", "S2"])
|
|
184
|
+
recommend.add_argument("--risk-flag", action="append", default=[])
|
|
185
|
+
recommend.add_argument("--out")
|
|
186
|
+
prepare = review_mesh_sub.add_parser("prepare")
|
|
187
|
+
prepare_source = prepare.add_mutually_exclusive_group(required=True)
|
|
188
|
+
prepare_source.add_argument("--manifest")
|
|
189
|
+
prepare_source.add_argument("--intake")
|
|
190
|
+
prepare_source.add_argument("--handoff")
|
|
191
|
+
prepare.add_argument("--template", choices=list(REVIEW_MESH_OPERATOR_TEMPLATE_IDS), default="leader-draft-review")
|
|
192
|
+
prepare.add_argument("--profile-id")
|
|
193
|
+
prepare.add_argument("--phase")
|
|
194
|
+
prepare.add_argument("--reviewer", action="append", default=[])
|
|
195
|
+
prepare.add_argument("--blocking", action="store_true")
|
|
196
|
+
prepare.add_argument("--evidence-id", action="append", default=[])
|
|
197
|
+
prepare.add_argument("--out-dir")
|
|
198
|
+
prepare.add_argument("--out")
|
|
199
|
+
assign = review_mesh_sub.add_parser("assign")
|
|
200
|
+
assign_source = assign.add_mutually_exclusive_group(required=True)
|
|
201
|
+
assign_source.add_argument("--manifest")
|
|
202
|
+
assign_source.add_argument("--intake")
|
|
203
|
+
assign_source.add_argument("--handoff")
|
|
204
|
+
assign.add_argument("--profile")
|
|
205
|
+
assign.add_argument("--mode", choices=list(REVIEW_MESH_MODE_IDS), required=True)
|
|
206
|
+
assign.add_argument("--phase", required=True)
|
|
207
|
+
assign.add_argument("--assignment-id", required=True)
|
|
208
|
+
assign.add_argument("--reviewer-id", required=True)
|
|
209
|
+
assign.add_argument("--reviewer-role", default="reviewer")
|
|
210
|
+
assign.add_argument("--reviewer-model-class", default="strong-reasoning")
|
|
211
|
+
assign.add_argument("--reviewer-host-identity-hash")
|
|
212
|
+
assign.add_argument("--reviewer-model-identity-hash")
|
|
213
|
+
assign.add_argument("--blocking", action="store_true")
|
|
214
|
+
assign.add_argument("--evidence-id", action="append", default=[])
|
|
215
|
+
assign.add_argument("--out")
|
|
216
|
+
import_result = review_mesh_sub.add_parser("import-result")
|
|
217
|
+
import_result.add_argument("--profile", required=True)
|
|
218
|
+
import_result.add_argument("--assignment", required=True)
|
|
219
|
+
import_result.add_argument("--reviewer-output", required=True)
|
|
220
|
+
import_result.add_argument("--allow-local-evidence-ref", action="store_true")
|
|
221
|
+
import_result.add_argument("--out")
|
|
222
|
+
synthesize = review_mesh_sub.add_parser("synthesize")
|
|
223
|
+
synthesize.add_argument("--profile", required=True)
|
|
224
|
+
synthesize.add_argument("--result", action="append", required=True)
|
|
225
|
+
synthesize.add_argument("--mode", choices=list(REVIEW_MESH_MODE_IDS))
|
|
226
|
+
synthesize.add_argument("--accepted-finding-id", action="append", default=[])
|
|
227
|
+
synthesize.add_argument("--rejected-finding-id", action="append", default=[])
|
|
228
|
+
synthesize.add_argument("--out")
|
|
229
|
+
quorum = review_mesh_sub.add_parser("quorum")
|
|
230
|
+
quorum.add_argument("--profile", required=True)
|
|
231
|
+
quorum.add_argument("--synthesis", required=True)
|
|
232
|
+
quorum.add_argument("--min-reviewers", type=int, required=True)
|
|
233
|
+
quorum.add_argument("--required-role", action="append", default=[])
|
|
234
|
+
quorum.add_argument("--reviewer-role", action="append", default=[])
|
|
235
|
+
quorum.add_argument("--out")
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def _add_report_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
239
|
+
report = subparsers.add_parser("report", help="read-only report commands")
|
|
240
|
+
report_sub = report.add_subparsers(dest="report_command", required=True)
|
|
241
|
+
status_view = report_sub.add_parser("status-view")
|
|
242
|
+
status_view.add_argument("--project-root", default=".")
|
|
243
|
+
status_view.add_argument("--artifact", action="append", default=[])
|
|
244
|
+
status_view.add_argument("--max-items", type=int, default=12)
|
|
245
|
+
status_view.add_argument("--target-window", default="8k")
|
|
246
|
+
status_view.add_argument("--out")
|
|
247
|
+
event_feed = report_sub.add_parser("event-feed")
|
|
248
|
+
event_feed.add_argument("--state", required=True)
|
|
249
|
+
event_feed.add_argument("--out")
|
|
250
|
+
progress = report_sub.add_parser("progress")
|
|
251
|
+
progress.add_argument("--state", required=True)
|
|
252
|
+
progress.add_argument("--usage-receipt", action="append", default=[])
|
|
253
|
+
progress.add_argument("--change-summary")
|
|
254
|
+
progress.add_argument("--watch", action="store_true")
|
|
255
|
+
progress.add_argument("--watch-iterations", type=int, default=5)
|
|
256
|
+
progress.add_argument("--watch-interval", type=float, default=1.0)
|
|
257
|
+
progress.add_argument("--terminal", action="store_true")
|
|
258
|
+
progress.add_argument("--out")
|
|
259
|
+
progress_bridge = report_sub.add_parser("progress-bridge")
|
|
260
|
+
progress_bridge.add_argument("--adapter", required=True)
|
|
261
|
+
progress_bridge.add_argument("--support-level", choices=["AUTO", "WATCH", "MANUAL", "UNSUPPORTED"], required=True)
|
|
262
|
+
progress_bridge.add_argument(
|
|
263
|
+
"--hook-point",
|
|
264
|
+
choices=[
|
|
265
|
+
"after-workflow-run",
|
|
266
|
+
"after-task-result",
|
|
267
|
+
"after-task-accept",
|
|
268
|
+
"after-finalize",
|
|
269
|
+
"side-terminal-watch",
|
|
270
|
+
"manual",
|
|
271
|
+
],
|
|
272
|
+
required=True,
|
|
273
|
+
)
|
|
274
|
+
progress_bridge.add_argument("--state", required=True)
|
|
275
|
+
progress_bridge.add_argument("--usage-receipt", action="append", default=[])
|
|
276
|
+
progress_bridge.add_argument("--change-summary")
|
|
277
|
+
progress_bridge.add_argument("--display-mode", choices=["terminal", "json"], default="terminal")
|
|
278
|
+
progress_bridge.add_argument("--watch", action="store_true")
|
|
279
|
+
progress_bridge.add_argument("--watch-iterations", type=int, default=1)
|
|
280
|
+
progress_bridge.add_argument("--watch-interval", type=float, default=0.0)
|
|
281
|
+
progress_bridge.add_argument("--terminal", action="store_true")
|
|
282
|
+
progress_bridge.add_argument("--out")
|
|
283
|
+
change_summary = report_sub.add_parser("change-summary")
|
|
284
|
+
change_summary.add_argument("--project-root", default=".")
|
|
285
|
+
change_summary.add_argument("--base")
|
|
286
|
+
change_summary.add_argument("--head")
|
|
287
|
+
change_summary.add_argument("--staged", action="store_true")
|
|
288
|
+
change_summary.add_argument("--path", action="append", default=[])
|
|
289
|
+
change_summary.add_argument("--out")
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def _add_workflow_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
293
|
+
workflow = subparsers.add_parser("workflow", help="workflow commands")
|
|
294
|
+
workflow_sub = workflow.add_subparsers(dest="workflow_command", required=True)
|
|
295
|
+
workflow_status = workflow_sub.add_parser("status")
|
|
296
|
+
workflow_status.add_argument("--state", required=True)
|
|
297
|
+
workflow_status.add_argument("--full", action="store_true")
|
|
298
|
+
workflow_next = workflow_sub.add_parser("next")
|
|
299
|
+
workflow_next.add_argument("--state", required=True)
|
|
300
|
+
workflow_run = workflow_sub.add_parser("run")
|
|
301
|
+
workflow_run.add_argument("--state", required=True)
|
|
302
|
+
workflow_run.add_argument("--manifest", required=True)
|
|
303
|
+
workflow_run.add_argument("--lock")
|
|
304
|
+
workflow_run.add_argument("--operation-id", required=True)
|
|
305
|
+
workflow_run.add_argument("--expected-revision", required=True, type=int)
|
|
306
|
+
workflow_run.add_argument("--source-revision", required=True)
|
|
307
|
+
workflow_run.add_argument("--reason")
|
|
308
|
+
workflow_run.add_argument("--out")
|
|
309
|
+
add_progress_hook_args(workflow_run)
|
|
310
|
+
workflow_adopt = workflow_sub.add_parser("adopt-plan")
|
|
311
|
+
workflow_adopt.add_argument("--state", required=True)
|
|
312
|
+
workflow_adopt.add_argument("--manifest", required=True)
|
|
313
|
+
workflow_adopt.add_argument("--operation-id", required=True)
|
|
314
|
+
workflow_adopt.add_argument("--expected-revision", required=True, type=int)
|
|
315
|
+
workflow_adopt.add_argument("--source-revision", required=True)
|
|
316
|
+
workflow_adopt.add_argument("--reset-tasks", action="store_true")
|
|
317
|
+
workflow_adopt.add_argument("--preserve-accepted-compatible", action="store_true")
|
|
318
|
+
workflow_adopt.add_argument(
|
|
319
|
+
"--start-mode",
|
|
320
|
+
choices=["approval-required", "auto-after-freeze", "plan-only"],
|
|
321
|
+
default="approval-required",
|
|
322
|
+
)
|
|
323
|
+
workflow_adopt.add_argument("--authorized-by")
|
|
324
|
+
workflow_run_start = workflow_sub.add_parser("run-start")
|
|
325
|
+
workflow_run_start.add_argument("--state", required=True)
|
|
326
|
+
workflow_run_start.add_argument("--operation-id", required=True)
|
|
327
|
+
workflow_run_start.add_argument("--expected-revision", required=True, type=int)
|
|
328
|
+
workflow_run_start.add_argument("--source-revision", required=True)
|
|
329
|
+
workflow_run_start.add_argument("--reason", required=True)
|
|
330
|
+
workflow_block = workflow_sub.add_parser("block")
|
|
331
|
+
workflow_block.add_argument("--state", required=True)
|
|
332
|
+
workflow_block.add_argument("--operation-id", required=True)
|
|
333
|
+
workflow_block.add_argument("--expected-revision", required=True, type=int)
|
|
334
|
+
workflow_block.add_argument("--blocker-code", required=True)
|
|
335
|
+
workflow_block.add_argument("--reason", required=True)
|
|
336
|
+
workflow_resolve = workflow_sub.add_parser("resolve")
|
|
337
|
+
workflow_resolve.add_argument("--state", required=True)
|
|
338
|
+
workflow_resolve.add_argument("--operation-id", required=True)
|
|
339
|
+
workflow_resolve.add_argument("--expected-revision", required=True, type=int)
|
|
340
|
+
workflow_resolve.add_argument("--reason", required=True)
|
|
341
|
+
workflow_task = workflow_sub.add_parser("task-start")
|
|
342
|
+
workflow_task.add_argument("--state", required=True)
|
|
343
|
+
workflow_task.add_argument("--task", required=True)
|
|
344
|
+
workflow_task.add_argument("--operation-id", required=True)
|
|
345
|
+
workflow_task.add_argument("--expected-revision", required=True, type=int)
|
|
346
|
+
workflow_task.add_argument("--source-revision", required=True)
|
|
347
|
+
workflow_task.add_argument("--reason", required=True)
|
|
348
|
+
workflow_result = workflow_sub.add_parser("task-result")
|
|
349
|
+
workflow_result.add_argument("--state", required=True)
|
|
350
|
+
workflow_result.add_argument("--task", required=True)
|
|
351
|
+
workflow_result.add_argument("--operation-id", required=True)
|
|
352
|
+
workflow_result.add_argument("--expected-revision", required=True, type=int)
|
|
353
|
+
workflow_result.add_argument("--source-revision", required=True)
|
|
354
|
+
workflow_result.add_argument("--result", required=True)
|
|
355
|
+
workflow_result.add_argument("--model-usage-receipt")
|
|
356
|
+
workflow_result.add_argument("--budget-targets")
|
|
357
|
+
workflow_result.add_argument("--reason", required=True)
|
|
358
|
+
add_progress_hook_args(workflow_result)
|
|
359
|
+
workflow_budget = workflow_sub.add_parser("budget-decision")
|
|
360
|
+
workflow_budget.add_argument("--state", required=True)
|
|
361
|
+
workflow_budget.add_argument("--task", required=True)
|
|
362
|
+
workflow_budget.add_argument("--operation-id", required=True)
|
|
363
|
+
workflow_budget.add_argument("--expected-revision", required=True, type=int)
|
|
364
|
+
workflow_budget.add_argument("--source-revision", required=True)
|
|
365
|
+
workflow_budget.add_argument("--model-usage-receipt")
|
|
366
|
+
workflow_budget.add_argument("--budget-policy")
|
|
367
|
+
workflow_budget.add_argument("--receipt", required=True)
|
|
368
|
+
workflow_budget.add_argument(
|
|
369
|
+
"--action",
|
|
370
|
+
choices=["continue-same-route", "reroute-cheaper", "reroute-stronger", "split-task", "abort"],
|
|
371
|
+
)
|
|
372
|
+
workflow_budget.add_argument("--decision-receipt")
|
|
373
|
+
workflow_budget.add_argument("--route-decision")
|
|
374
|
+
workflow_budget.add_argument("--split-packet")
|
|
375
|
+
workflow_budget.add_argument("--cap-deltas")
|
|
376
|
+
workflow_budget.add_argument("--operator-identity-hash")
|
|
377
|
+
workflow_budget.add_argument("--reason", required=True)
|
|
378
|
+
workflow_budget_policy = workflow_sub.add_parser("budget-policy-check")
|
|
379
|
+
workflow_budget_policy.add_argument("--policy", required=True)
|
|
380
|
+
workflow_accept = workflow_sub.add_parser("task-accept")
|
|
381
|
+
workflow_accept.add_argument("--state", required=True)
|
|
382
|
+
workflow_accept.add_argument("--task", required=True)
|
|
383
|
+
workflow_accept.add_argument("--operation-id", required=True)
|
|
384
|
+
workflow_accept.add_argument("--expected-revision", required=True, type=int)
|
|
385
|
+
workflow_accept.add_argument("--review", required=True)
|
|
386
|
+
workflow_accept.add_argument("--implementation-audit")
|
|
387
|
+
workflow_accept.add_argument("--reason", required=True)
|
|
388
|
+
add_progress_hook_args(workflow_accept)
|
|
389
|
+
workflow_finalize = workflow_sub.add_parser("finalize")
|
|
390
|
+
workflow_finalize.add_argument("--state", required=True)
|
|
391
|
+
workflow_finalize.add_argument("--operation-id", required=True)
|
|
392
|
+
workflow_finalize.add_argument("--expected-revision", required=True, type=int)
|
|
393
|
+
workflow_finalize.add_argument("--source-revision", required=True)
|
|
394
|
+
workflow_finalize.add_argument("--final-audit", required=True)
|
|
395
|
+
workflow_finalize.add_argument("--proof", required=True)
|
|
396
|
+
workflow_finalize.add_argument("--proof-integrity")
|
|
397
|
+
workflow_finalize.add_argument("--goal-record")
|
|
398
|
+
workflow_finalize.add_argument("--follow-up-register")
|
|
399
|
+
workflow_finalize.add_argument("--completion-gate-receipt")
|
|
400
|
+
workflow_finalize.add_argument("--final-implementation-audit")
|
|
401
|
+
workflow_finalize.add_argument("--review-mesh-quorum", action="append", default=[])
|
|
402
|
+
workflow_finalize.add_argument("--reason", required=True)
|
|
403
|
+
add_progress_hook_args(workflow_finalize)
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
def _add_audit_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
407
|
+
audit = subparsers.add_parser("audit", help="audit commands")
|
|
408
|
+
audit_sub = audit.add_subparsers(dest="audit_command", required=True)
|
|
409
|
+
ownership = audit_sub.add_parser("ownership")
|
|
410
|
+
ownership.add_argument("--manifest", required=True)
|
|
411
|
+
ownership.add_argument("--base", required=False)
|
|
412
|
+
ownership.add_argument("--path", action="append", default=[])
|
|
413
|
+
ownership.add_argument("--fail-on-unowned", action="store_true")
|
|
414
|
+
ownership.add_argument("--fail-on-forbidden", action="store_true")
|
|
415
|
+
review_check = audit_sub.add_parser("review-check")
|
|
416
|
+
review_check.add_argument("--review", required=True)
|
|
417
|
+
implementation = audit_sub.add_parser("implementation")
|
|
418
|
+
implementation.add_argument("--manifest", required=True)
|
|
419
|
+
implementation.add_argument("--state", required=True)
|
|
420
|
+
implementation.add_argument("--task", required=True)
|
|
421
|
+
implementation.add_argument("--result", required=True)
|
|
422
|
+
implementation.add_argument("--review", required=True)
|
|
423
|
+
implementation.add_argument("--evidence", action="append", default=[])
|
|
424
|
+
implementation.add_argument("--sandbox-receipt", action="append", default=[])
|
|
425
|
+
implementation.add_argument("--review-mesh-quorum", action="append", default=[])
|
|
426
|
+
implementation.add_argument("--path", action="append", default=[])
|
|
427
|
+
implementation.add_argument("--base")
|
|
428
|
+
implementation.add_argument("--expected-revision", type=int)
|
|
429
|
+
implementation.add_argument("--auditor-id", default="implementation-auditor")
|
|
430
|
+
implementation.add_argument("--auditor-surface", default="cli")
|
|
431
|
+
implementation.add_argument("--out")
|
|
432
|
+
final_implementation = audit_sub.add_parser("final-implementation")
|
|
433
|
+
final_implementation.add_argument("--manifest", required=True)
|
|
434
|
+
final_implementation.add_argument("--state", required=True)
|
|
435
|
+
final_implementation.add_argument("--report", action="append", required=True)
|
|
436
|
+
final_implementation.add_argument("--auditor-id", default="final-implementation-auditor")
|
|
437
|
+
final_implementation.add_argument("--auditor-surface", default="cli")
|
|
438
|
+
final_implementation.add_argument("--out")
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
def _add_context_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
442
|
+
context = subparsers.add_parser("context", help="compact context commands")
|
|
443
|
+
context_sub = context.add_subparsers(dest="context_command", required=True)
|
|
444
|
+
profile_check = context_sub.add_parser("profile-check")
|
|
445
|
+
profile_check.add_argument("--profile", required=True)
|
|
446
|
+
context_check = context_sub.add_parser("check")
|
|
447
|
+
context_check.add_argument("--profile", required=True)
|
|
448
|
+
context_check.add_argument("--task-packet", required=True)
|
|
449
|
+
context_check.add_argument("--summary", required=True)
|
|
450
|
+
context_check.add_argument("--target-window")
|
|
451
|
+
context_check.add_argument("--latest-user", default="")
|
|
452
|
+
context_render = context_sub.add_parser("render")
|
|
453
|
+
context_render.add_argument("--profile", required=True)
|
|
454
|
+
context_render.add_argument("--task-packet", required=True)
|
|
455
|
+
context_render.add_argument("--summary", required=True)
|
|
456
|
+
context_render.add_argument("--target-window")
|
|
457
|
+
context_render.add_argument("--latest-user", default="")
|
|
458
|
+
external_import = context_sub.add_parser("external-import")
|
|
459
|
+
external_import.add_argument("--source", required=True)
|
|
460
|
+
external_import.add_argument("--citation")
|
|
461
|
+
external_import.add_argument("--source-id")
|
|
462
|
+
external_import.add_argument("--max-input-bytes", type=int, default=32768)
|
|
463
|
+
external_import.add_argument("--target-tokens", type=int, default=2048)
|
|
464
|
+
external_import.add_argument("--out")
|
|
465
|
+
episode_retrieve = context_sub.add_parser("episode-retrieve")
|
|
466
|
+
episode_retrieve.add_argument("--project-root", default=".")
|
|
467
|
+
episode_retrieve.add_argument("--artifact", action="append", required=True)
|
|
468
|
+
episode_retrieve.add_argument("--external-context", action="append", default=[])
|
|
469
|
+
episode_retrieve.add_argument("--query", default="")
|
|
470
|
+
episode_retrieve.add_argument("--max-results", type=int, default=8)
|
|
471
|
+
episode_retrieve.add_argument("--max-external-context-hints", type=int, default=4)
|
|
472
|
+
episode_retrieve.add_argument("--target-tokens", type=int, default=2048)
|
|
473
|
+
episode_retrieve.add_argument("--out")
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
def _add_goal_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
477
|
+
goal = subparsers.add_parser("goal", help="goal continuity commands")
|
|
478
|
+
goal_sub = goal.add_subparsers(dest="goal_command", required=True)
|
|
479
|
+
goal_check = goal_sub.add_parser("check")
|
|
480
|
+
goal_check.add_argument("--record", required=True)
|
|
481
|
+
goal_check.add_argument("--state")
|
|
482
|
+
goal_check.add_argument("--current", action="store_true")
|
|
483
|
+
goal_summarize = goal_sub.add_parser("summarize")
|
|
484
|
+
goal_summarize.add_argument("--record", required=True)
|
|
485
|
+
goal_summarize.add_argument("--state", required=True)
|
|
486
|
+
goal_summarize.add_argument("--profile")
|
|
487
|
+
goal_summarize.add_argument("--target-window")
|
|
488
|
+
goal_view = goal_sub.add_parser("view")
|
|
489
|
+
goal_view.add_argument("--record", required=True)
|
|
490
|
+
goal_view.add_argument("--state", required=True)
|
|
491
|
+
goal_view.add_argument("--usage-receipt", action="append", default=[])
|
|
492
|
+
goal_view.add_argument("--change-summary")
|
|
493
|
+
goal_view.add_argument("--allow-stale-goal", action="store_true")
|
|
494
|
+
goal_view.add_argument("--terminal", action="store_true")
|
|
495
|
+
goal_view.add_argument("--out")
|
|
496
|
+
goal_update = goal_sub.add_parser("update")
|
|
497
|
+
goal_update.add_argument("--record", required=True)
|
|
498
|
+
goal_update.add_argument("--state", required=True)
|
|
499
|
+
goal_update.add_argument("--reason", required=True)
|
|
500
|
+
goal_update.add_argument("--status", choices=["ACTIVE", "BLOCKED", "READY_FOR_FINALIZATION", "COMPLETE"])
|
|
501
|
+
goal_update.add_argument("--evidence-id", action="append", default=[])
|
|
502
|
+
goal_update.add_argument("--out")
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
def _add_model_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
506
|
+
model = subparsers.add_parser("model", help="model routing commands")
|
|
507
|
+
model_sub = model.add_subparsers(dest="model_command", required=True)
|
|
508
|
+
model_route = model_sub.add_parser("route")
|
|
509
|
+
model_route.add_argument("--request", required=True)
|
|
510
|
+
model_route.add_argument("--profile", default="profiles/model-routing-profile.v1.json")
|
|
511
|
+
model_route.add_argument("--host-profile")
|
|
512
|
+
model_profile_check = model_sub.add_parser("profile-check")
|
|
513
|
+
model_profile_check.add_argument("--profile", required=True)
|
|
514
|
+
model_profile_check.add_argument("--type", choices=["auto", "routing", "host"], default="auto")
|
|
515
|
+
model_usage_check = model_sub.add_parser("usage-check")
|
|
516
|
+
model_usage_check.add_argument("--receipt", required=True)
|
|
517
|
+
model_usage_check.add_argument("--route-decision")
|
|
518
|
+
model_usage_check.add_argument("--budget-targets")
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
def _add_runner_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
522
|
+
runner = subparsers.add_parser("runner", help="controlled execution-loop commands")
|
|
523
|
+
runner_sub = runner.add_subparsers(dest="runner_command", required=True)
|
|
524
|
+
runner_start = runner_sub.add_parser("start")
|
|
525
|
+
runner_start.add_argument("--state", required=True)
|
|
526
|
+
runner_start.add_argument("--runner", required=True)
|
|
527
|
+
runner_start.add_argument("--policy")
|
|
528
|
+
runner_start.add_argument("--operation-id", required=True)
|
|
529
|
+
runner_start.add_argument("--reason", required=True)
|
|
530
|
+
runner_status = runner_sub.add_parser("status")
|
|
531
|
+
runner_status.add_argument("--runner", required=True)
|
|
532
|
+
runner_status.add_argument("--state")
|
|
533
|
+
runner_status.add_argument("--profile")
|
|
534
|
+
runner_status.add_argument("--target-window")
|
|
535
|
+
runner_transition = runner_sub.add_parser("transition")
|
|
536
|
+
runner_transition.add_argument("--runner", required=True)
|
|
537
|
+
runner_transition.add_argument("--state", required=True)
|
|
538
|
+
runner_transition.add_argument("--request", required=True)
|
|
539
|
+
runner_stop = runner_sub.add_parser("stop")
|
|
540
|
+
runner_stop.add_argument("--runner", required=True)
|
|
541
|
+
runner_stop.add_argument("--state", required=True)
|
|
542
|
+
runner_stop.add_argument("--operation-id", required=True)
|
|
543
|
+
runner_stop.add_argument("--expected-runner-revision", required=True, type=int)
|
|
544
|
+
runner_stop.add_argument("--reason", required=True)
|
|
545
|
+
runner_resume = runner_sub.add_parser("resume")
|
|
546
|
+
runner_resume.add_argument("--runner", required=True)
|
|
547
|
+
runner_resume.add_argument("--state", required=True)
|
|
548
|
+
runner_resume.add_argument("--operation-id", required=True)
|
|
549
|
+
runner_resume.add_argument("--expected-runner-revision", required=True, type=int)
|
|
550
|
+
runner_resume.add_argument("--reason", required=True)
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
def _add_tier_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
554
|
+
tier = subparsers.add_parser("tier", help="SDD tier commands")
|
|
555
|
+
tier_sub = tier.add_subparsers(dest="tier_command", required=True)
|
|
556
|
+
tier_resolve = tier_sub.add_parser("resolve")
|
|
557
|
+
tier_resolve.add_argument("--request", required=True)
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
def _add_specification_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
561
|
+
specification = subparsers.add_parser("specification", help="specification commands")
|
|
562
|
+
specification_sub = specification.add_subparsers(dest="specification_command", required=True)
|
|
563
|
+
specification_check = specification_sub.add_parser("check")
|
|
564
|
+
specification_check.add_argument("--specification", required=True)
|
|
565
|
+
completion_gate = specification_sub.add_parser("completion-gate")
|
|
566
|
+
completion_gate.add_argument("--state", required=True)
|
|
567
|
+
completion_gate.add_argument("--final-audit")
|
|
568
|
+
completion_gate.add_argument("--follow-up-register")
|
|
569
|
+
completion_gate.add_argument("--input")
|
|
570
|
+
completion_gate.add_argument("--verifier", default="completion-gate")
|
|
571
|
+
completion_gate.add_argument("--out")
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
def _add_plan_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
575
|
+
plan = subparsers.add_parser("plan", help="plan commands")
|
|
576
|
+
plan_sub = plan.add_subparsers(dest="plan_command", required=True)
|
|
577
|
+
plan_check = plan_sub.add_parser("check")
|
|
578
|
+
plan_check.add_argument("--manifest", required=True)
|
|
579
|
+
plan_check.add_argument("--lock")
|
|
580
|
+
plan_check.add_argument("--require-completeness", action="store_true")
|
|
581
|
+
plan_check.add_argument("--completeness-profile")
|
|
582
|
+
completeness_check = plan_sub.add_parser("completeness-check")
|
|
583
|
+
completeness_check.add_argument("--manifest", required=True)
|
|
584
|
+
completeness_check.add_argument("--profile")
|
|
585
|
+
completeness_check.add_argument("--out")
|
|
586
|
+
acceptance_check = plan_sub.add_parser("acceptance-check")
|
|
587
|
+
acceptance_check.add_argument("--manifest", required=True)
|
|
588
|
+
acceptance_check.add_argument("--acceptance", required=True)
|
|
589
|
+
refs_check = plan_sub.add_parser("refs-check")
|
|
590
|
+
refs_check.add_argument("--manifest", required=True)
|
|
591
|
+
snapshot = plan_sub.add_parser("snapshot")
|
|
592
|
+
snapshot.add_argument("--manifest", required=True)
|
|
593
|
+
snapshot.add_argument("--out")
|
|
594
|
+
reconcile = plan_sub.add_parser("reconcile")
|
|
595
|
+
reconcile.add_argument("--manifest", required=True)
|
|
596
|
+
reconcile.add_argument("--snapshot", required=True)
|
|
597
|
+
handoff = plan_sub.add_parser("handoff")
|
|
598
|
+
handoff.add_argument("--manifest", required=True)
|
|
599
|
+
handoff.add_argument("--snapshot")
|
|
600
|
+
handoff.add_argument("--max-workstreams", type=int, default=12)
|
|
601
|
+
handoff.add_argument("--target-tokens", type=int, default=4096)
|
|
602
|
+
handoff.add_argument("--out")
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
def _add_task_parser(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
606
|
+
task = subparsers.add_parser("task", help="task commands")
|
|
607
|
+
task_sub = task.add_subparsers(dest="task_command", required=True)
|
|
608
|
+
task_compile = task_sub.add_parser("compile")
|
|
609
|
+
task_compile.add_argument("--manifest", required=True)
|
|
610
|
+
task_compile.add_argument("--out-dir")
|
|
611
|
+
task_compile.add_argument("--write", action="store_true")
|
|
612
|
+
small_compile = task_sub.add_parser("compile-small")
|
|
613
|
+
small_compile.add_argument("--manifest", required=True)
|
|
614
|
+
small_compile.add_argument("--context-profile", default="profiles/small-context-profile.v1.json")
|
|
615
|
+
small_compile.add_argument("--target-window", default="4k-strict")
|
|
616
|
+
small_compile.add_argument("--adaptive-decision")
|
|
617
|
+
small_compile.add_argument("--out-dir")
|
|
618
|
+
small_compile.add_argument("--write", action="store_true")
|