agent-tune-kit 2.4.1__tar.gz → 2.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/.codex-plugin/plugin.json +1 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/PKG-INFO +12 -15
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/README.en.md +11 -14
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/README.md +11 -14
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/__init__.py +1 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/dataset.py +14 -39
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/evaluation.py +9 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/main.py +5 -5
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/output.py +2 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/results.py +17 -8
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/trace.py +35 -12
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/visualize.py +9 -24
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/datasets/prepare.py +9 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/datasets/truth.py +66 -22
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/datasets/updates.py +53 -26
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/datasets/validation.py +13 -6
- agent_tune_kit-2.4.3/agent_tune_kit/execution/__init__.py +17 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/execution/calibration.py +31 -7
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/execution/logs.py +16 -4
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/execution/rules.py +19 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/execution/runner.py +197 -60
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/execution/runtime.py +48 -23
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/execution/tracing.py +44 -56
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/installer.py +51 -27
- agent_tune_kit-2.4.3/agent_tune_kit/models.py +1598 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/results/assessment.py +34 -11
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/results/evidence.py +272 -80
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/results/judgments.py +28 -5
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/results/summary.py +63 -29
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/results/versions.py +35 -17
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/archive.py +58 -29
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/capture.py +125 -25
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/categories.py +45 -13
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/langfuse.py +71 -29
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/migrate.py +23 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/progress.py +16 -7
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/projects.py +74 -16
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/query.py +87 -43
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/records.py +200 -61
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/segments.py +63 -19
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/store.py +148 -191
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/utils/csv_io.py +7 -3
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/utils/files.py +8 -3
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/dataset/app.js +40 -18
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/dataset/styles.css +0 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/failures/app.js +54 -9
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/failures/styles.css +0 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/shared/base.css +12 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/trace/app.js +184 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/trace/lanes.js +31 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/trace/styles.css +9 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/traces/app.js +70 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/traces/styles.css +9 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/dataset.py +63 -33
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/failures.py +70 -32
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/fields.py +7 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/history.py +78 -26
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/render.py +2 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/timeline.py +71 -29
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/trace.py +144 -50
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/traces.py +72 -30
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/codex_agent_tuning_prd.md +1 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/shared-versioning-and-confirmation.md +8 -8
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/skill-template-pack-usage.md +12 -41
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/trace-tuning.md +38 -10
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/pyproject.toml +8 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/scripts/check-release.py +47 -30
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/scripts/publish-release.py +12 -16
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/scripts/release-version.py +14 -8
- agent_tune_kit-2.4.3/scripts/release-version.sh +7 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/scripts/validate_skill_pack.py +17 -18
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-dataset/SKILL.md +0 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-init/SKILL.md +1 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-trace-capture/SKILL.md +1 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-trace-detect/SKILL.md +16 -15
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-trace-diagnose/SKILL.md +12 -10
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-trace-init/SKILL.md +7 -7
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-trace-optimize/SKILL.md +18 -11
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-trace-verify/SKILL.md +12 -3
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-visualize-trace/SKILL.md +5 -1
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/templates/.atk/runner/eval_runner.py.md +4 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/templates/.atk/runner/failure_rule.py.md +3 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/templates/.atk/runner/import_evidence.py.md +2 -2
- agent_tune_kit-2.4.3/tests/fixtures/legacy_trace/captures/CAP-001/manifest.json +1 -0
- agent_tune_kit-2.4.3/tests/fixtures/legacy_trace/captures/CAP-001/raw/export.json +1 -0
- agent_tune_kit-2.4.3/tests/fixtures/legacy_trace/session.json +1 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/fixtures/managed_v1.py.md +3 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_assessment_contract.py +4 -11
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_dataset_updates.py +18 -27
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_diagnosis.py +12 -15
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_evidence_import.py +2 -6
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_execution_evidence.py +1 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_execution_tracing.py +10 -24
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_generate_dataset_browser.py +4 -14
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_generate_failure_browser.py +3 -15
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_install_plugin.py +17 -30
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_judge_calibration.py +1 -6
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_plugin_cache.py +2 -12
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_release_scripts.py +19 -20
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_runtime_contracts.py +1 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_capture.py +16 -17
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_categories.py +7 -4
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_cli.py +58 -17
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_langfuse.py +0 -9
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_projects.py +37 -11
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_records.py +24 -10
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_scroll_layout.py +34 -7
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_store.py +95 -31
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_truth_cli.py +1 -2
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_truth_contract.py +1 -4
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_visualize_trace.py +6 -5
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_visualize_traces.py +6 -5
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-projects.cjs +14 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-scroll-layout.cjs +24 -0
- agent_tune_kit-2.4.3/tests/trace_fixtures.py +67 -0
- agent_tune_kit-2.4.1/agent_tune_kit/execution/__init__.py +0 -13
- agent_tune_kit-2.4.1/docs/assets/arch-en.png +0 -0
- agent_tune_kit-2.4.1/docs/assets/arch.png +0 -0
- agent_tune_kit-2.4.1/docs/assets/architecture.en.svg +0 -86
- agent_tune_kit-2.4.1/docs/assets/architecture.svg +0 -86
- agent_tune_kit-2.4.1/docs/ato-atk-project-boundary-recommendation-2026-11-05.md +0 -98
- agent_tune_kit-2.4.1/docs/cli-skill-modularization-plan.md +0 -599
- agent_tune_kit-2.4.1/docs/execution-evidence-and-tracing-plan.md +0 -902
- agent_tune_kit-2.4.1/docs/ground-truth-and-grading-assessment-2026-10-25.md +0 -405
- agent_tune_kit-2.4.1/docs/surginame-atk-capability-review-2026-10-27.md +0 -51
- agent_tune_kit-2.4.1/docs/trace-change-verification-readability-diagnosis.md +0 -124
- agent_tune_kit-2.4.1/docs/trace-dashboard-design.md +0 -339
- agent_tune_kit-2.4.1/docs/trace-swimlane-design.md +0 -150
- agent_tune_kit-2.4.1/docs/trace-tuning-validation.md +0 -97
- agent_tune_kit-2.4.1/scripts/dev-refresh-install.sh +0 -9
- agent_tune_kit-2.4.1/scripts/install_plugin.py +0 -26
- agent_tune_kit-2.4.1/scripts/publish-pypi.sh +0 -9
- agent_tune_kit-2.4.1/scripts/release-version.sh +0 -6
- agent_tune_kit-2.4.1/skills/atk-dataset/scripts/update_dataset.py +0 -18
- agent_tune_kit-2.4.1/skills/atk-visualize-dataset/scripts/generate_dataset_browser.py +0 -18
- agent_tune_kit-2.4.1/skills/atk-visualize-failures/scripts/generate_failure_browser.py +0 -18
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/.gitignore +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/cli/__main__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/datasets/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/errors.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/results/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/traces/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/utils/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/dataset/page.html +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/dataset/vendor/echarts.min.js +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/failures/page.html +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/trace/page.html +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/trace/vendor/markdown-it.LICENSE +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/trace/vendor/markdown-it.min.js +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/visualize/assets/traces/page.html +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/agent_tune_kit/workspace.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/assets/agent_tune_kit_evaluation.png +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/assets/agent_tune_kit_trace.png +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/local-context.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/trace-project-attribution-design.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/docs/truth-and-assessment.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-diagnose/SKILL.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-eval/SKILL.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-optimize/SKILL.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-report/SKILL.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-visualize-dataset/SKILL.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/skills/atk-visualize-failures/SKILL.md +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/templates/.gitkeep +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/__init__.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/conftest.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/fixtures/legacy_eval_runner.py.txt +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_atk_init_contract.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_cli_workflow.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_evidence_judgments.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_evidence_packaging.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_evidence_versions.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_execution_outcomes.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_local_context.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_runner_output_columns.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_runner_template_row_logging.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_snapshot_reads.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_event_list.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_progress.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_query.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_trace_segments.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_truth_browser.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_truth_runner.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/test_v2_progress.py +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-controls.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-dashboard.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-event-detail.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-event-layout.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-event-list.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-event-wheel.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-fragments.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-issue-cards.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-preview-scroll.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-selection-reason.cjs +0 -0
- {agent_tune_kit-2.4.1 → agent_tune_kit-2.4.3}/tests/trace-stage-cards.cjs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-tune-kit",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Local Codex plugin for batch Agent evaluation and session trace tuning with evidence-backed issues, focused changes, verification and offline review.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "hustyichi",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agent-tune-kit
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: Local Codex plugin for iterative Agent tuning with guided Skills, reusable runner templates, versioned results, and static validation.
|
|
5
5
|
Project-URL: Homepage, https://github.com/hustyichi/agent-tune-kit
|
|
6
6
|
Project-URL: Repository, https://github.com/hustyichi/agent-tune-kit
|
|
@@ -25,7 +25,7 @@ Agent Tune Kit is a **local Codex plugin** for tuning an Agent's prompts, code,
|
|
|
25
25
|
|
|
26
26
|
## Install and Enable
|
|
27
27
|
|
|
28
|
-
Run these commands in your terminal to install ATK and its bundled Skills.
|
|
28
|
+
Run these commands in your terminal to install ATK from PyPI and set up its bundled Skills.
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
uv tool install agent-tune-kit
|
|
@@ -35,14 +35,7 @@ atk install
|
|
|
35
35
|
In Codex, enter `/plugins`, select and enable `Agent Tune Kit`, then restart Codex and open a new session.
|
|
36
36
|
|
|
37
37
|
<details>
|
|
38
|
-
<summary>Install
|
|
39
|
-
|
|
40
|
-
To install with pipx, run the following commands.
|
|
41
|
-
|
|
42
|
-
```sh
|
|
43
|
-
pipx install agent-tune-kit
|
|
44
|
-
atk install
|
|
45
|
-
```
|
|
38
|
+
<summary>Install from local source</summary>
|
|
46
39
|
|
|
47
40
|
To install from local source, update your chosen branch and run these commands from the **ATK repository root**. Rerun them after source updates, including when the version stays the same.
|
|
48
41
|
|
|
@@ -154,16 +147,18 @@ Run `atk trace --help` to check whether your CLI supports trace tuning. If the c
|
|
|
154
147
|
- **Langfuse v4**. Use `$atk-trace-init` to record project settings and configure read-only access on first setup. Configuration references credentials by environment-variable name. Then send `$atk-trace-capture Download session <session-id> from <start time> to <end time>`.
|
|
155
148
|
- **Local files**. Send `$atk-trace-capture Import traces for session <session-id> from <file path>, with source <source>`. You can also provide files with verifiable ties to the session during analysis and let detection import them. Analyze an already archived session directly.
|
|
156
149
|
|
|
157
|
-
The capture step downloads or imports data. Before saving, decide which content to retain and which fields to redact. ATK
|
|
150
|
+
The capture step downloads or imports data. Before saving, decide which content to retain and which fields to redact. ATK checks whether Git ignores `.atk/traces/` and adds a rule to the project's `.gitignore` if needed.
|
|
151
|
+
|
|
152
|
+
`$atk-trace-init` infers and saves the tuning scope from project documents and implementation; later detection, diagnosis, repair and verification use it. No manual configuration is required. You can also say "For this run, focus on this project or component." When you skip initialization, analysis fills in the necessary context and explains any unresolved boundaries.
|
|
158
153
|
|
|
159
154
|
### 2. Analyze and Review Evidence
|
|
160
155
|
|
|
161
156
|
```text
|
|
162
|
-
$atk-trace-detect
|
|
157
|
+
$atk-trace-detect Analyze session <session-id> for issues actionable within this project. List evidence and what you did not inspect.
|
|
163
158
|
$atk-visualize-trace Open the execution lanes for session <session-id> and jump from issues to the relevant trace segments and evidence fields.
|
|
164
159
|
```
|
|
165
160
|
|
|
166
|
-
|
|
161
|
+
By default, detection retains evidence-backed issues worth pursuing that have a project mechanism, an improvement direction and a minimal verification approach; the root cause may still be uncertain. It explains out-of-scope findings and missing actionability evidence, and still calls attention to serious problems. You can explicitly request a comprehensive quality audit or investigation of a specific symptom without an existing improvement lead. No retained issues does not prove the session was correct.
|
|
167
162
|
|
|
168
163
|
The capture, detect, diagnose, optimize and verify Skills generate or update `.atk/traces/<session_id>/preview.html` at stage end without opening a browser. Use `$atk-visualize-trace` when you want to open it; refresh an already open page after the file changes. Initialization has no session trace and does not generate an empty page.
|
|
169
164
|
|
|
@@ -176,11 +171,13 @@ Use Trace IDs to locate evidence within the session and open issue details to re
|
|
|
176
171
|
```text
|
|
177
172
|
$atk-trace-diagnose Investigate session <session-id> and propose repair and verification plans.
|
|
178
173
|
$atk-trace-diagnose Investigate ISSUE-001 in session <session-id> and propose a repair and verification plan.
|
|
179
|
-
$atk-trace-optimize
|
|
174
|
+
$atk-trace-optimize Prepare a detailed implementation plan for ISSUE-001 in session <session-id>, then implement after confirmation.
|
|
180
175
|
$atk-trace-verify Verify the candidate for ISSUE-001 in session <session-id> and check relevant behavior that should still work.
|
|
181
176
|
```
|
|
182
177
|
|
|
183
|
-
|
|
178
|
+
`$atk-trace-optimize` first lists the files, exact modification locations, before/after behavior and supporting checks in Codex. Discuss adjustments in chat; only after you confirm the final version does it save the detailed plan and edit the code. Material scope expansion requires another confirmation; an unchanged confirmed plan does not. Draft discussion stays in chat by default, while the session preview shows the final plan and actual changes.
|
|
179
|
+
|
|
180
|
+
Without specified issues, diagnosis reviews all available session traces, selects new issues within the tuning scope and reviews each existing issue. Findings established as unrelated to the implementation may be excluded with their reasons and history preserved; existing issues with uncertain relevance are not simply deleted. Specified issues or concrete symptoms define the investigation scope, and a temporary focus does not permanently exclude other issues. You can start directly with diagnosis without a separate detection invocation.
|
|
184
181
|
|
|
185
182
|
Diagnoses and verification conclusions are saved per issue. If the evidence cannot establish which candidate loaded or whether key verification conditions were met, the verification outcome is `inconclusive`. Investigation results identify unread ranges and evidence gaps. As new issues surface, work through them individually or start another analysis with a new session trace.
|
|
186
183
|
|
|
@@ -11,7 +11,7 @@ Agent Tune Kit is a **local Codex plugin** for tuning an Agent's prompts, code,
|
|
|
11
11
|
|
|
12
12
|
## Install and Enable
|
|
13
13
|
|
|
14
|
-
Run these commands in your terminal to install ATK and its bundled Skills.
|
|
14
|
+
Run these commands in your terminal to install ATK from PyPI and set up its bundled Skills.
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
17
|
uv tool install agent-tune-kit
|
|
@@ -21,14 +21,7 @@ atk install
|
|
|
21
21
|
In Codex, enter `/plugins`, select and enable `Agent Tune Kit`, then restart Codex and open a new session.
|
|
22
22
|
|
|
23
23
|
<details>
|
|
24
|
-
<summary>Install
|
|
25
|
-
|
|
26
|
-
To install with pipx, run the following commands.
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
pipx install agent-tune-kit
|
|
30
|
-
atk install
|
|
31
|
-
```
|
|
24
|
+
<summary>Install from local source</summary>
|
|
32
25
|
|
|
33
26
|
To install from local source, update your chosen branch and run these commands from the **ATK repository root**. Rerun them after source updates, including when the version stays the same.
|
|
34
27
|
|
|
@@ -140,16 +133,18 @@ Run `atk trace --help` to check whether your CLI supports trace tuning. If the c
|
|
|
140
133
|
- **Langfuse v4**. Use `$atk-trace-init` to record project settings and configure read-only access on first setup. Configuration references credentials by environment-variable name. Then send `$atk-trace-capture Download session <session-id> from <start time> to <end time>`.
|
|
141
134
|
- **Local files**. Send `$atk-trace-capture Import traces for session <session-id> from <file path>, with source <source>`. You can also provide files with verifiable ties to the session during analysis and let detection import them. Analyze an already archived session directly.
|
|
142
135
|
|
|
143
|
-
The capture step downloads or imports data. Before saving, decide which content to retain and which fields to redact. ATK
|
|
136
|
+
The capture step downloads or imports data. Before saving, decide which content to retain and which fields to redact. ATK checks whether Git ignores `.atk/traces/` and adds a rule to the project's `.gitignore` if needed.
|
|
137
|
+
|
|
138
|
+
`$atk-trace-init` infers and saves the tuning scope from project documents and implementation; later detection, diagnosis, repair and verification use it. No manual configuration is required. You can also say "For this run, focus on this project or component." When you skip initialization, analysis fills in the necessary context and explains any unresolved boundaries.
|
|
144
139
|
|
|
145
140
|
### 2. Analyze and Review Evidence
|
|
146
141
|
|
|
147
142
|
```text
|
|
148
|
-
$atk-trace-detect
|
|
143
|
+
$atk-trace-detect Analyze session <session-id> for issues actionable within this project. List evidence and what you did not inspect.
|
|
149
144
|
$atk-visualize-trace Open the execution lanes for session <session-id> and jump from issues to the relevant trace segments and evidence fields.
|
|
150
145
|
```
|
|
151
146
|
|
|
152
|
-
|
|
147
|
+
By default, detection retains evidence-backed issues worth pursuing that have a project mechanism, an improvement direction and a minimal verification approach; the root cause may still be uncertain. It explains out-of-scope findings and missing actionability evidence, and still calls attention to serious problems. You can explicitly request a comprehensive quality audit or investigation of a specific symptom without an existing improvement lead. No retained issues does not prove the session was correct.
|
|
153
148
|
|
|
154
149
|
The capture, detect, diagnose, optimize and verify Skills generate or update `.atk/traces/<session_id>/preview.html` at stage end without opening a browser. Use `$atk-visualize-trace` when you want to open it; refresh an already open page after the file changes. Initialization has no session trace and does not generate an empty page.
|
|
155
150
|
|
|
@@ -162,11 +157,13 @@ Use Trace IDs to locate evidence within the session and open issue details to re
|
|
|
162
157
|
```text
|
|
163
158
|
$atk-trace-diagnose Investigate session <session-id> and propose repair and verification plans.
|
|
164
159
|
$atk-trace-diagnose Investigate ISSUE-001 in session <session-id> and propose a repair and verification plan.
|
|
165
|
-
$atk-trace-optimize
|
|
160
|
+
$atk-trace-optimize Prepare a detailed implementation plan for ISSUE-001 in session <session-id>, then implement after confirmation.
|
|
166
161
|
$atk-trace-verify Verify the candidate for ISSUE-001 in session <session-id> and check relevant behavior that should still work.
|
|
167
162
|
```
|
|
168
163
|
|
|
169
|
-
|
|
164
|
+
`$atk-trace-optimize` first lists the files, exact modification locations, before/after behavior and supporting checks in Codex. Discuss adjustments in chat; only after you confirm the final version does it save the detailed plan and edit the code. Material scope expansion requires another confirmation; an unchanged confirmed plan does not. Draft discussion stays in chat by default, while the session preview shows the final plan and actual changes.
|
|
165
|
+
|
|
166
|
+
Without specified issues, diagnosis reviews all available session traces, selects new issues within the tuning scope and reviews each existing issue. Findings established as unrelated to the implementation may be excluded with their reasons and history preserved; existing issues with uncertain relevance are not simply deleted. Specified issues or concrete symptoms define the investigation scope, and a temporary focus does not permanently exclude other issues. You can start directly with diagnosis without a separate detection invocation.
|
|
170
167
|
|
|
171
168
|
Diagnoses and verification conclusions are saved per issue. If the evidence cannot establish which candidate loaded or whether key verification conditions were met, the verification outcome is `inconclusive`. Investigation results identify unread ranges and evidence gaps. As new issues surface, work through them individually or start another analysis with a new session trace.
|
|
172
169
|
|
|
@@ -11,7 +11,7 @@ Agent Tune Kit 是一个**本地 Codex 插件**,用于调优 Agent 的提示
|
|
|
11
11
|
|
|
12
12
|
## 安装与启用
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
在终端运行以下命令,从 PyPI 安装 ATK,再安装配套 Skills。
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
17
|
uv tool install agent-tune-kit
|
|
@@ -21,14 +21,7 @@ atk install
|
|
|
21
21
|
在 Codex 中输入 `/plugins`,选择并启用 `Agent Tune Kit`,然后重启 Codex 并新建会话。
|
|
22
22
|
|
|
23
23
|
<details>
|
|
24
|
-
<summary
|
|
25
|
-
|
|
26
|
-
用 pipx 安装。
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
pipx install agent-tune-kit
|
|
30
|
-
atk install
|
|
31
|
-
```
|
|
24
|
+
<summary>从本地源码安装</summary>
|
|
32
25
|
|
|
33
26
|
从本地源码安装时,先更新所需分支,再在 **ATK 仓库根目录**运行以下命令。更新源码后可重新执行,包括版本号未变的情况。
|
|
34
27
|
|
|
@@ -140,16 +133,18 @@ $atk-report
|
|
|
140
133
|
- **Langfuse v4**。首次接入可用 `$atk-trace-init` 记录项目和只读来源配置。配置只引用凭据的环境变量名。然后发送 `$atk-trace-capture 下载 <session-id> 的会话,时间范围是 <开始时间> 到 <结束时间>`。
|
|
141
134
|
- **本地文件**。发送 `$atk-trace-capture 从 <文件路径> 导入 <session-id> 的轨迹,来源是 <来源>`。也可在分析时提供可验证会话归属的文件,由分析流程导入。已归档的会话可直接分析。
|
|
142
135
|
|
|
143
|
-
|
|
136
|
+
采集步骤负责下载或导入。保存前确认哪些正文可以留存、哪些字段需要脱敏。ATK 确保 Git 忽略 `.atk/traces/`,需要时会补写项目的 `.gitignore`。
|
|
137
|
+
|
|
138
|
+
`$atk-trace-init` 会根据项目说明和实现自动识别并保存调优范围,后续分析、诊断、修复和验证沿用该范围。无需手工配置;也可直接说明“本轮只看某个项目或组件”。跳过初始化时,分析流程会自动补齐必要上下文,无法确定的边界会明确说明。
|
|
144
139
|
|
|
145
140
|
### 2. 分析并查看证据
|
|
146
141
|
|
|
147
142
|
```text
|
|
148
|
-
$atk-trace-detect 分析 <session-id
|
|
143
|
+
$atk-trace-detect 分析 <session-id>,筛选当前项目可调优的问题,列出证据和未检查的范围。
|
|
149
144
|
$atk-visualize-trace 打开 <session-id> 的执行泳道,从问题跳到相关轨迹片段和证据字段。
|
|
150
145
|
```
|
|
151
146
|
|
|
152
|
-
|
|
147
|
+
分析默认保留有证据、值得投入,且能说明项目机制、改进方向和最小验证办法的问题;根因尚未确定也可进入后续诊断。范围外的问题说明未纳入原因,暂缺可处理性证据的问题说明缺口,严重问题仍会提示。需要全面质量审计或调查某个具体症状时可直接提出,不限于已有改进线索。没有保留问题不代表会话完全正确。
|
|
153
148
|
|
|
154
149
|
采集、分析、诊断、修复和验证 Skill 在阶段结束后默认生成或更新 `.atk/traces/<session_id>/preview.html`,不自动打开浏览器。需要打开时使用 `$atk-visualize-trace`;已打开的页面在文件更新后需刷新。初始化没有会话轨迹,不生成空页面。
|
|
155
150
|
|
|
@@ -162,11 +157,13 @@ $atk-visualize-trace 打开 <session-id> 的执行泳道,从问题跳到相关
|
|
|
162
157
|
```text
|
|
163
158
|
$atk-trace-diagnose 调查 <session-id>,给出修复和验证方案。
|
|
164
159
|
$atk-trace-diagnose 调查 <session-id> 的 ISSUE-001,给出修复和验证方案。
|
|
165
|
-
$atk-trace-optimize
|
|
160
|
+
$atk-trace-optimize 为 <session-id> 的 ISSUE-001 准备详细修改方案,确认后实施。
|
|
166
161
|
$atk-trace-verify 验证 <session-id> 的 ISSUE-001 对应候选,并检查相关正常行为。
|
|
167
162
|
```
|
|
168
163
|
|
|
169
|
-
|
|
164
|
+
`$atk-trace-optimize` 会先在 Codex 中列出具体文件、修改位置、前后行为和配套验证。你可以在对话中调整方案;确认最终版本后,才保存详细实施方案并修改代码。实质扩大范围时会再次确认,同一已确认方案无需重复确认。讨论稿默认保留在对话中;会话预览展示最终方案与实际修改。
|
|
165
|
+
|
|
166
|
+
未指定问题时,调查默认检查会话中可用的全部轨迹,按调优范围筛选新问题,并逐项审阅已记录的问题。证据确认与现有实现无关的问题可以排除,并保留理由和历史;已记录但关联尚不明确的问题不会直接删除。指定问题或具体症状时,按指定范围调查,临时收窄范围不会永久排除其他问题。可以直接从调查开始,无需先单独执行检测。
|
|
170
167
|
|
|
171
168
|
诊断和验证结论分别按问题保存。证据不足以确认实际加载的候选或关键验证条件时,验证效果记为 `inconclusive`(无法判断)。调查结果会说明未检查的范围和证据缺口。后续发现新的问题,可继续按问题处理,或用新会话的轨迹开始下一次分析。
|
|
172
169
|
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any
|
|
6
|
+
|
|
1
7
|
from agent_tune_kit import datasets
|
|
2
|
-
from agent_tune_kit.datasets import updates
|
|
3
8
|
from agent_tune_kit.workspace import DATASET_PATH
|
|
4
9
|
|
|
5
10
|
|
|
6
|
-
def add_options(parser):
|
|
11
|
+
def add_options(parser: argparse.ArgumentParser) -> None:
|
|
7
12
|
parser.add_argument("--dataset-path", default=str(DATASET_PATH))
|
|
8
13
|
parser.add_argument("--field", default="ground_truth")
|
|
9
14
|
parser.add_argument("--input-fields", nargs="+")
|
|
@@ -14,10 +19,11 @@ def add_options(parser):
|
|
|
14
19
|
parser.add_argument("--json", action="store_true")
|
|
15
20
|
|
|
16
21
|
|
|
17
|
-
def register(subparsers):
|
|
22
|
+
def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
18
23
|
commands = subparsers.add_parser("dataset", help="prepare, inspect and update evaluation data").add_subparsers(
|
|
19
24
|
dest="action", required=True
|
|
20
25
|
)
|
|
26
|
+
|
|
21
27
|
prepare = commands.add_parser("prepare")
|
|
22
28
|
prepare.add_argument("--source", required=True)
|
|
23
29
|
prepare.add_argument("--dataset-path", default=str(DATASET_PATH))
|
|
@@ -25,16 +31,19 @@ def register(subparsers):
|
|
|
25
31
|
mode.add_argument("--append", action="store_true")
|
|
26
32
|
mode.add_argument("--overwrite", action="store_true")
|
|
27
33
|
prepare.add_argument("--json", action="store_true")
|
|
34
|
+
|
|
28
35
|
add_options(commands.add_parser("inspect"))
|
|
36
|
+
|
|
29
37
|
update = commands.add_parser("update")
|
|
30
38
|
add_options(update)
|
|
31
39
|
update.add_argument("--updates-path")
|
|
32
40
|
|
|
33
41
|
|
|
34
|
-
def execute(args):
|
|
42
|
+
def execute(args: argparse.Namespace) -> Mapping[str, object]:
|
|
35
43
|
if args.action == "prepare":
|
|
36
44
|
return datasets.prepare_dataset(args.source, args.dataset_path, append=args.append, overwrite=args.overwrite)
|
|
37
|
-
|
|
45
|
+
|
|
46
|
+
options: dict[str, Any] = dict(
|
|
38
47
|
dataset_path=args.dataset_path,
|
|
39
48
|
direct=args.direct,
|
|
40
49
|
review_path=args.review_path,
|
|
@@ -45,37 +54,3 @@ def execute(args):
|
|
|
45
54
|
if args.action == "inspect":
|
|
46
55
|
return datasets.inspect_dataset(**options)
|
|
47
56
|
return datasets.update_dataset(args.updates_path, **options)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def legacy_main(argv=None):
|
|
51
|
-
import argparse
|
|
52
|
-
import json
|
|
53
|
-
import sys
|
|
54
|
-
|
|
55
|
-
parser = argparse.ArgumentParser()
|
|
56
|
-
add_options(parser)
|
|
57
|
-
parser.add_argument("--updates-path")
|
|
58
|
-
parser.add_argument("--dump-context", action="store_true")
|
|
59
|
-
args = parser.parse_args(argv)
|
|
60
|
-
options = dict(
|
|
61
|
-
dataset_path=args.dataset_path,
|
|
62
|
-
direct=args.direct,
|
|
63
|
-
review_path=args.review_path,
|
|
64
|
-
field=args.field,
|
|
65
|
-
home_dir=args.home_dir,
|
|
66
|
-
input_fields=args.input_fields,
|
|
67
|
-
)
|
|
68
|
-
try:
|
|
69
|
-
if args.dump_context or not args.updates_path:
|
|
70
|
-
print(json.dumps(datasets.inspect_dataset(**options), ensure_ascii=False, indent=2))
|
|
71
|
-
if args.updates_path:
|
|
72
|
-
from .output import emit
|
|
73
|
-
|
|
74
|
-
emit(datasets.update_dataset(args.updates_path, **options))
|
|
75
|
-
return 0
|
|
76
|
-
except updates.UserActionRequired as exc:
|
|
77
|
-
print(str(exc), file=sys.stderr)
|
|
78
|
-
return 2
|
|
79
|
-
except Exception as exc:
|
|
80
|
-
print(f"Unexpected error: {exc}", file=sys.stderr)
|
|
81
|
-
return 1
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
|
|
1
5
|
from agent_tune_kit.execution import run_evaluation
|
|
6
|
+
from agent_tune_kit.models import EvaluationResult
|
|
2
7
|
|
|
3
8
|
|
|
4
|
-
def register(subparsers):
|
|
9
|
+
def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
5
10
|
parser = subparsers.add_parser("eval", help="run the project Agent with the shared engine")
|
|
6
11
|
parser.add_argument("--check", action="store_true")
|
|
7
12
|
parser.add_argument("--limit", type=int)
|
|
8
13
|
parser.add_argument("--offset", type=int, default=0)
|
|
9
14
|
parser.add_argument("--concurrency", type=int, default=1)
|
|
15
|
+
|
|
10
16
|
selection = parser.add_mutually_exclusive_group()
|
|
11
17
|
selection.add_argument("--only-failures", action="store_true")
|
|
12
18
|
selection.add_argument("--ids", nargs="+", help="select canonical samples by stable atk_id before offset/limit")
|
|
19
|
+
|
|
13
20
|
parser.add_argument("--no-progress", action="store_true")
|
|
14
21
|
parser.add_argument("--python")
|
|
15
22
|
parser.add_argument("--json", action="store_true")
|
|
16
23
|
|
|
17
24
|
|
|
18
|
-
def execute(args):
|
|
25
|
+
def execute(args: argparse.Namespace) -> EvaluationResult:
|
|
19
26
|
return run_evaluation(
|
|
20
27
|
**{
|
|
21
28
|
key: getattr(args, key)
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"""Public command dispatch; business behavior lives in domain packages."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
import argparse
|
|
4
6
|
import sys
|
|
7
|
+
from collections.abc import Sequence
|
|
5
8
|
|
|
6
9
|
from agent_tune_kit import installer
|
|
7
10
|
from agent_tune_kit.errors import UserActionRequired
|
|
@@ -13,12 +16,8 @@ from .output import emit
|
|
|
13
16
|
HANDLERS = {"dataset": dataset, "eval": evaluation, "results": results, "visualize": visualize, "trace": trace}
|
|
14
17
|
|
|
15
18
|
|
|
16
|
-
def main(argv=None):
|
|
19
|
+
def main(argv: Sequence[str] | None = None) -> int:
|
|
17
20
|
argv = list(sys.argv[1:] if argv is None else argv)
|
|
18
|
-
if argv and argv[0] == "_legacy":
|
|
19
|
-
if argv[1] == "atk-dataset":
|
|
20
|
-
return dataset.legacy_main(argv[2:])
|
|
21
|
-
return visualize.legacy_main("dataset" if argv[1] == "atk-visualize-dataset" else "failures", argv[2:])
|
|
22
21
|
if not argv or argv[0] not in HANDLERS:
|
|
23
22
|
if argv and argv[0] in ["-h", "--help"]:
|
|
24
23
|
parser = argparse.ArgumentParser(description="Register Agent Tune Kit and run shared project capabilities")
|
|
@@ -30,6 +29,7 @@ def main(argv=None):
|
|
|
30
29
|
parser.print_help()
|
|
31
30
|
return 0
|
|
32
31
|
return installer.main(argv)
|
|
32
|
+
|
|
33
33
|
parser = argparse.ArgumentParser(prog="atk")
|
|
34
34
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
35
35
|
for module in HANDLERS.values():
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
|
|
1
6
|
from agent_tune_kit import results
|
|
2
7
|
from agent_tune_kit.execution import run_rule
|
|
8
|
+
from agent_tune_kit.execution.calibration import launch_calibration
|
|
9
|
+
from agent_tune_kit.results.evidence import import_evidence, query_evidence
|
|
3
10
|
|
|
4
11
|
|
|
5
|
-
def register(subparsers):
|
|
12
|
+
def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
6
13
|
commands = subparsers.add_parser("results", help="inspect and judge versioned results").add_subparsers(
|
|
7
14
|
dest="action", required=True
|
|
8
15
|
)
|
|
16
|
+
|
|
9
17
|
calibration = commands.add_parser(
|
|
10
18
|
"calibrate", help="check a judge against reviewed outputs without running the Agent"
|
|
11
19
|
)
|
|
@@ -18,12 +26,14 @@ def register(subparsers):
|
|
|
18
26
|
calibration.add_argument("--instructions")
|
|
19
27
|
calibration.add_argument("--python")
|
|
20
28
|
calibration.add_argument("--json", action="store_true")
|
|
29
|
+
|
|
21
30
|
for name in ["inspect", "run-rule", "apply-judgments", "compare", "evidence", "import-evidence"]:
|
|
22
31
|
parser = commands.add_parser(name)
|
|
23
32
|
parser.add_argument("--results-dir", default=".atk/results")
|
|
24
33
|
parser.add_argument("--json", action="store_true")
|
|
25
34
|
if name != "import-evidence":
|
|
26
35
|
parser.add_argument("--version")
|
|
36
|
+
|
|
27
37
|
if name == "run-rule":
|
|
28
38
|
parser.add_argument("--rule-path", default=".atk/runner/failure_rule.py")
|
|
29
39
|
parser.add_argument("--python")
|
|
@@ -46,10 +56,8 @@ def register(subparsers):
|
|
|
46
56
|
parser.add_argument("--limit", type=int)
|
|
47
57
|
|
|
48
58
|
|
|
49
|
-
def execute(args):
|
|
59
|
+
def execute(args: argparse.Namespace) -> Mapping[str, object]:
|
|
50
60
|
if args.action == "calibrate":
|
|
51
|
-
from agent_tune_kit.execution.calibration import launch_calibration
|
|
52
|
-
|
|
53
61
|
return launch_calibration(
|
|
54
62
|
**{
|
|
55
63
|
key: getattr(args, key)
|
|
@@ -64,13 +72,11 @@ def execute(args):
|
|
|
64
72
|
)
|
|
65
73
|
}
|
|
66
74
|
)
|
|
67
|
-
if args.action == "import-evidence":
|
|
68
|
-
from agent_tune_kit.results.evidence import import_evidence
|
|
69
75
|
|
|
76
|
+
if args.action == "import-evidence":
|
|
70
77
|
return import_evidence(args.source, args.adapter, args.results_dir)
|
|
71
|
-
if args.action == "evidence":
|
|
72
|
-
from agent_tune_kit.results.evidence import query_evidence
|
|
73
78
|
|
|
79
|
+
if args.action == "evidence":
|
|
74
80
|
return query_evidence(
|
|
75
81
|
**{
|
|
76
82
|
key: getattr(args, key)
|
|
@@ -88,12 +94,15 @@ def execute(args):
|
|
|
88
94
|
]
|
|
89
95
|
}
|
|
90
96
|
)
|
|
97
|
+
|
|
91
98
|
if args.action == "inspect":
|
|
92
99
|
return results.inspect_results(args.results_dir, version=args.version)
|
|
93
100
|
if args.action == "compare":
|
|
94
101
|
return results.compare_targets(args.ids, args.results_dir, version=args.version)
|
|
102
|
+
|
|
95
103
|
if args.action == "apply-judgments":
|
|
96
104
|
return results.apply_judgments(
|
|
97
105
|
args.judgments_path, source_results=args.source_results, results_dir=args.results_dir, version=args.version
|
|
98
106
|
)
|
|
107
|
+
|
|
99
108
|
return run_rule(rule_path=args.rule_path, results_dir=args.results_dir, python=args.python, version=args.version)
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
"""Explicit session commands; analysis and effect judgments belong to the host."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
3
6
|
import json
|
|
7
|
+
from collections.abc import Mapping
|
|
4
8
|
from pathlib import Path
|
|
9
|
+
from typing import Any, cast
|
|
5
10
|
|
|
11
|
+
from agent_tune_kit.models import IssueUpdate, PathInput
|
|
6
12
|
from agent_tune_kit.traces import categories, records, store
|
|
7
13
|
from agent_tune_kit.traces.capture import fetch_session, import_session
|
|
14
|
+
from agent_tune_kit.traces.migrate import migrate
|
|
15
|
+
from agent_tune_kit.traces.projects import discover_projects, load_projects, save_project
|
|
8
16
|
from agent_tune_kit.traces.query import overview, search, show
|
|
9
17
|
|
|
10
18
|
|
|
11
|
-
def read_json(path):
|
|
19
|
+
def read_json(path: PathInput | None) -> dict[str, Any] | None:
|
|
12
20
|
if path is None:
|
|
13
21
|
return None
|
|
14
22
|
value = json.loads(Path(path).read_text(encoding="utf-8"))
|
|
@@ -17,23 +25,25 @@ def read_json(path):
|
|
|
17
25
|
return value
|
|
18
26
|
|
|
19
27
|
|
|
20
|
-
def add_session_options(parser):
|
|
28
|
+
def add_session_options(parser: argparse.ArgumentParser) -> None:
|
|
21
29
|
parser.add_argument("--project-root", default=".")
|
|
22
30
|
parser.add_argument("--session-id", required=True)
|
|
23
31
|
parser.add_argument("--source", help="JSON file with type, instance, project and environment")
|
|
24
32
|
parser.add_argument("--json", action="store_true")
|
|
25
33
|
|
|
26
34
|
|
|
27
|
-
def register(subparsers):
|
|
35
|
+
def register(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
|
|
28
36
|
commands = subparsers.add_parser(
|
|
29
37
|
"trace", help="capture and investigate one session, independently of batch evaluation"
|
|
30
38
|
)
|
|
31
39
|
actions = commands.add_subparsers(dest="action", required=True)
|
|
40
|
+
|
|
32
41
|
init = actions.add_parser("init", help="save project context and non-secret source configuration")
|
|
33
42
|
init.add_argument("--project-root", default=".")
|
|
34
43
|
init.add_argument("--config", help="non-secret configuration JSON file")
|
|
35
44
|
init.add_argument("--project-file", help="project context Markdown file")
|
|
36
45
|
init.add_argument("--json", action="store_true")
|
|
46
|
+
|
|
37
47
|
project = actions.add_parser("project", help="discover, list or update workspace projects")
|
|
38
48
|
project.add_argument("--project-root", default=".")
|
|
39
49
|
mode = project.add_mutually_exclusive_group(required=True)
|
|
@@ -41,12 +51,14 @@ def register(subparsers):
|
|
|
41
51
|
mode.add_argument("--list", action="store_true")
|
|
42
52
|
mode.add_argument("--data")
|
|
43
53
|
project.add_argument("--json", action="store_true")
|
|
54
|
+
|
|
44
55
|
category = actions.add_parser("category", help="list or update the project issue category vocabulary")
|
|
45
56
|
category.add_argument("--project-root", default=".")
|
|
46
57
|
mode = category.add_mutually_exclusive_group(required=True)
|
|
47
58
|
mode.add_argument("--list", action="store_true", help="list categories with per-session issue counts")
|
|
48
59
|
mode.add_argument("--data", help="category JSON; revising the vocabulary requires its current revision")
|
|
49
60
|
category.add_argument("--json", action="store_true")
|
|
61
|
+
|
|
50
62
|
for action in [
|
|
51
63
|
"migrate",
|
|
52
64
|
"fetch",
|
|
@@ -110,33 +122,34 @@ def register(subparsers):
|
|
|
110
122
|
parser.add_argument("--expected-revision", type=int)
|
|
111
123
|
|
|
112
124
|
|
|
113
|
-
def execute(args):
|
|
125
|
+
def execute(args: argparse.Namespace) -> Mapping[str, object]:
|
|
114
126
|
if args.action == "project":
|
|
115
|
-
from agent_tune_kit.traces.projects import discover_projects, load_projects, save_project
|
|
116
|
-
|
|
117
127
|
if args.discover:
|
|
118
128
|
return discover_projects(args.project_root)
|
|
119
129
|
if args.list:
|
|
120
130
|
return load_projects(store.trace_root(args.project_root))
|
|
121
131
|
return save_project(args.project_root, read_json(args.data))
|
|
132
|
+
|
|
122
133
|
if args.action == "init":
|
|
123
134
|
text = Path(args.project_file).read_text(encoding="utf-8") if args.project_file else None
|
|
124
135
|
return store.init_workspace(args.project_root, config=read_json(args.config), project_text=text)
|
|
136
|
+
|
|
125
137
|
if args.action == "category":
|
|
126
138
|
if args.list:
|
|
127
139
|
return categories.list_categories(args.project_root)
|
|
128
140
|
return categories.save_category(args.project_root, read_json(args.data))
|
|
141
|
+
|
|
129
142
|
source = read_json(args.source)
|
|
130
143
|
if args.action == "migrate":
|
|
131
|
-
from agent_tune_kit.traces.migrate import migrate
|
|
132
|
-
|
|
133
144
|
return migrate(args.project_root, args.session_id, source)
|
|
145
|
+
|
|
134
146
|
if args.action == "fetch":
|
|
135
147
|
config = read_json(args.config)
|
|
136
148
|
if source is not None:
|
|
137
149
|
if config is None:
|
|
138
|
-
config = read_json(Path(args.project_root) / ".atk/traces/config.json")
|
|
150
|
+
config = cast(dict[str, Any], read_json(Path(args.project_root) / ".atk/traces/config.json"))
|
|
139
151
|
config = {**config, "source": source}
|
|
152
|
+
|
|
140
153
|
return fetch_session(
|
|
141
154
|
args.project_root,
|
|
142
155
|
args.session_id,
|
|
@@ -145,10 +158,12 @@ def execute(args):
|
|
|
145
158
|
to_time=args.to_time,
|
|
146
159
|
retention=read_json(args.retention),
|
|
147
160
|
)
|
|
161
|
+
|
|
148
162
|
if args.action == "import":
|
|
149
163
|
if source is None:
|
|
150
|
-
config = read_json(Path(args.project_root) / ".atk/traces/config.json")
|
|
164
|
+
config = cast(dict[str, Any], read_json(Path(args.project_root) / ".atk/traces/config.json"))
|
|
151
165
|
source = config.get("source")
|
|
166
|
+
|
|
152
167
|
return import_session(
|
|
153
168
|
args.project_root,
|
|
154
169
|
args.session_id,
|
|
@@ -157,21 +172,26 @@ def execute(args):
|
|
|
157
172
|
association=read_json(args.association),
|
|
158
173
|
retention=read_json(args.retention),
|
|
159
174
|
)
|
|
175
|
+
|
|
160
176
|
session_dir = store.resolve_session(args.project_root, args.session_id, source)
|
|
161
177
|
if args.action in {"overview", "search", "show"}:
|
|
162
|
-
options = {"offset": args.offset, "limit": args.limit}
|
|
178
|
+
options: dict[str, Any] = {"offset": args.offset, "limit": args.limit}
|
|
163
179
|
if args.action == "show":
|
|
164
180
|
return show(session_dir, read_json(args.ref), **options)
|
|
181
|
+
|
|
165
182
|
options["capture_id"] = args.capture_id
|
|
166
183
|
if args.action == "search":
|
|
167
184
|
return search(session_dir, args.text, **options)
|
|
185
|
+
|
|
168
186
|
if getattr(args, "trace_id", None):
|
|
169
187
|
options["trace_id"] = args.trace_id
|
|
170
188
|
return overview(session_dir, **options)
|
|
189
|
+
|
|
171
190
|
if args.action == "status":
|
|
172
191
|
return records.status(session_dir)
|
|
173
192
|
if args.action == "ref":
|
|
174
193
|
return store.evidence_ref(session_dir, args.path, args.pointer)
|
|
194
|
+
|
|
175
195
|
if args.action == "diagnose":
|
|
176
196
|
return records.save_diagnosis(
|
|
177
197
|
session_dir,
|
|
@@ -180,11 +200,14 @@ def execute(args):
|
|
|
180
200
|
diagnosis_id=args.diagnosis_id,
|
|
181
201
|
expected_revision=args.expected_revision,
|
|
182
202
|
)
|
|
203
|
+
|
|
183
204
|
data = read_json(args.data)
|
|
184
205
|
if args.action == "issue":
|
|
185
|
-
|
|
206
|
+
# prepare_issue validates the command's raw input without rewriting it.
|
|
207
|
+
return records.save_issue(session_dir, cast(IssueUpdate, data), dry_run=bool(getattr(args, "dry_run", False)))
|
|
186
208
|
if args.action == "detect":
|
|
187
209
|
return records.save_detection(session_dir, data)
|
|
210
|
+
|
|
188
211
|
if args.action == "change":
|
|
189
212
|
return records.save_change(session_dir, args.issue_id, data)
|
|
190
213
|
return records.save_verification(session_dir, args.issue_id, args.change_id, data)
|