alysis-code 0.13.0__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.
- alysis_code/__init__.py +3 -0
- alysis_code/__main__.py +4 -0
- alysis_code/_build_info.py +14 -0
- alysis_code/account_login.py +468 -0
- alysis_code/agent/README.md +35 -0
- alysis_code/agent/__init__.py +11 -0
- alysis_code/agent/acceptance_contract.py +2217 -0
- alysis_code/agent/blast_radius.py +1403 -0
- alysis_code/agent/cache_keepalive.py +227 -0
- alysis_code/agent/completion_certificate.py +366 -0
- alysis_code/agent/completion_gate.py +306 -0
- alysis_code/agent/empty_response_stall.py +403 -0
- alysis_code/agent/errors.py +28 -0
- alysis_code/agent/llm_calls.py +475 -0
- alysis_code/agent/mutation_classification.py +227 -0
- alysis_code/agent/prompt_context.py +2508 -0
- alysis_code/agent/read_ledger.py +253 -0
- alysis_code/agent/regression_baseline.py +642 -0
- alysis_code/agent/reproduction_first.py +610 -0
- alysis_code/agent/sensitive_output.py +629 -0
- alysis_code/agent/session.py +3218 -0
- alysis_code/agent/steering.py +191 -0
- alysis_code/agent/subagent_execution.py +5177 -0
- alysis_code/agent/subagent_workspace.py +666 -0
- alysis_code/agent/tools_assembly.py +4728 -0
- alysis_code/agent/turn/__init__.py +101 -0
- alysis_code/agent/turn/core.py +8483 -0
- alysis_code/agent/turn/events.py +113 -0
- alysis_code/agent/turn/exploration.py +590 -0
- alysis_code/agent/turn/interventions.py +65 -0
- alysis_code/agent/turn/read_cache.py +420 -0
- alysis_code/agent/turn/snapshot.py +179 -0
- alysis_code/agent/turn_contract.py +661 -0
- alysis_code/agent/turn_path.py +129 -0
- alysis_code/agent/verification.py +2885 -0
- alysis_code/agent/verification_commands.py +512 -0
- alysis_code/agent/verification_evidence.py +738 -0
- alysis_code/agent_loop.py +693 -0
- alysis_code/agent_runtimes/__init__.py +51 -0
- alysis_code/agent_runtimes/base.py +114 -0
- alysis_code/agent_runtimes/builtins.py +129 -0
- alysis_code/agent_runtimes/codex_cli.py +664 -0
- alysis_code/agent_runtimes/host.py +263 -0
- alysis_code/agent_runtimes/registry.py +64 -0
- alysis_code/agent_runtimes/service.py +150 -0
- alysis_code/agentbox_client.py +416 -0
- alysis_code/agentbox_integration.py +310 -0
- alysis_code/alysis_cloud.py +152 -0
- alysis_code/approval_scope.py +276 -0
- alysis_code/assets/README.md +33 -0
- alysis_code/assets/__init__.py +126 -0
- alysis_code/assets/asset_read_core.py +281 -0
- alysis_code/assets/budget_allocator.py +456 -0
- alysis_code/assets/comprehender.py +759 -0
- alysis_code/assets/index.py +654 -0
- alysis_code/assets/ingestion.py +275 -0
- alysis_code/assets/legacy_migration.py +413 -0
- alysis_code/assets/models.py +263 -0
- alysis_code/assets/ocr.py +239 -0
- alysis_code/assets/owl/ascii/f-000.txt +13 -0
- alysis_code/assets/owl/ascii/f-001.txt +13 -0
- alysis_code/assets/owl/ascii/f-002.txt +13 -0
- alysis_code/assets/owl/ascii/f-003.txt +13 -0
- alysis_code/assets/owl/ascii/f-004.txt +13 -0
- alysis_code/assets/owl/ascii/f-005.txt +13 -0
- alysis_code/assets/owl/ascii/f-006.txt +13 -0
- alysis_code/assets/owl/ascii/f-007.txt +13 -0
- alysis_code/assets/owl/ascii/f-008.txt +13 -0
- alysis_code/assets/owl/ascii/f-009.txt +13 -0
- alysis_code/assets/owl/ascii/f-010.txt +13 -0
- alysis_code/assets/owl/ascii/f-011.txt +13 -0
- alysis_code/assets/owl/ascii/f-012.txt +13 -0
- alysis_code/assets/owl/ascii/f-013.txt +13 -0
- alysis_code/assets/owl/ascii/f-014.txt +13 -0
- alysis_code/assets/owl/ascii/f-015.txt +13 -0
- alysis_code/assets/owl/ascii/f-016.txt +13 -0
- alysis_code/assets/owl/ascii/f-017.txt +13 -0
- alysis_code/assets/owl/ascii/f-018.txt +13 -0
- alysis_code/assets/owl/ascii/f-019.txt +13 -0
- alysis_code/assets/owl/ascii/f-020.txt +13 -0
- alysis_code/assets/owl/index.html +98 -0
- alysis_code/assets/owl/show-owl.sh +761 -0
- alysis_code/assets/paths.py +49 -0
- alysis_code/assets/plan_binding.py +326 -0
- alysis_code/assets/planner_context.py +466 -0
- alysis_code/assets/planner_tools.py +184 -0
- alysis_code/assets/prompts.py +101 -0
- alysis_code/assets/replanner_context.py +239 -0
- alysis_code/assets/surface.py +521 -0
- alysis_code/assets/untrusted_content.py +48 -0
- alysis_code/assets/usage_logger.py +94 -0
- alysis_code/assets/worker_mirror.py +428 -0
- alysis_code/assets/worker_section.py +303 -0
- alysis_code/assets/worker_tools.py +468 -0
- alysis_code/atomic_io.py +83 -0
- alysis_code/auth_diagnostics.py +272 -0
- alysis_code/background_runner.py +366 -0
- alysis_code/branding.py +270 -0
- alysis_code/budget_policy.py +390 -0
- alysis_code/build_identity.py +465 -0
- alysis_code/builtin_hooks/__init__.py +7 -0
- alysis_code/builtin_hooks/notify_done_windows.py +65 -0
- alysis_code/bwrap_etc.py +76 -0
- alysis_code/cancellation.py +41 -0
- alysis_code/capabilities.py +137 -0
- alysis_code/chatgpt_codex_static_provider.py +133 -0
- alysis_code/cli.py +51 -0
- alysis_code/cli_impl/__init__.py +1 -0
- alysis_code/cli_impl/assets_cli.py +537 -0
- alysis_code/cli_impl/assets_modal.py +412 -0
- alysis_code/cli_impl/chat/__init__.py +156 -0
- alysis_code/cli_impl/chat/commands.py +2616 -0
- alysis_code/cli_impl/chat/loop.py +4508 -0
- alysis_code/cli_impl/chat/mid_turn_policy.py +125 -0
- alysis_code/cli_impl/chat/rendering.py +444 -0
- alysis_code/cli_impl/chat/state.py +124 -0
- alysis_code/cli_impl/chat_resume.py +830 -0
- alysis_code/cli_impl/chat_slash_completer.py +258 -0
- alysis_code/cli_impl/commands/__init__.py +11 -0
- alysis_code/cli_impl/commands/_shared.py +89 -0
- alysis_code/cli_impl/commands/auth.py +623 -0
- alysis_code/cli_impl/commands/chat_resume_helpers.py +1531 -0
- alysis_code/cli_impl/commands/chat_state.py +158 -0
- alysis_code/cli_impl/commands/chat_status.py +1248 -0
- alysis_code/cli_impl/commands/chat_terminal.py +942 -0
- alysis_code/cli_impl/commands/chat_tui_panels.py +1018 -0
- alysis_code/cli_impl/commands/cli_common.py +1223 -0
- alysis_code/cli_impl/commands/cli_surface.py +77 -0
- alysis_code/cli_impl/commands/config.py +131 -0
- alysis_code/cli_impl/commands/conventions.py +85 -0
- alysis_code/cli_impl/commands/execution_helpers.py +350 -0
- alysis_code/cli_impl/commands/extensions.py +401 -0
- alysis_code/cli_impl/commands/forge.py +1282 -0
- alysis_code/cli_impl/commands/forge_asset_view.py +121 -0
- alysis_code/cli_impl/commands/forge_helpers.py +1215 -0
- alysis_code/cli_impl/commands/hooks.py +737 -0
- alysis_code/cli_impl/commands/ide_bridge.py +31 -0
- alysis_code/cli_impl/commands/mcp.py +700 -0
- alysis_code/cli_impl/commands/profile.py +453 -0
- alysis_code/cli_impl/commands/prompt_helpers.py +307 -0
- alysis_code/cli_impl/commands/report.py +88 -0
- alysis_code/cli_impl/commands/root.py +1118 -0
- alysis_code/cli_impl/commands/sandbox.py +184 -0
- alysis_code/cli_impl/commands/server.py +54 -0
- alysis_code/cli_impl/commands/sessions.py +252 -0
- alysis_code/cli_impl/commands/skills.py +404 -0
- alysis_code/cli_impl/commands/startup.py +946 -0
- alysis_code/cli_impl/commands/tools.py +335 -0
- alysis_code/cli_impl/commands/update.py +364 -0
- alysis_code/cli_impl/commands/welcome.py +972 -0
- alysis_code/cli_impl/config_menu.py +3882 -0
- alysis_code/cli_impl/forge.py +4509 -0
- alysis_code/cli_impl/forge_recovery.py +485 -0
- alysis_code/cli_impl/setup_wizard.py +2409 -0
- alysis_code/cli_impl/tui/__init__.py +58 -0
- alysis_code/cli_impl/tui/app.py +4551 -0
- alysis_code/cli_impl/tui/config.py +32 -0
- alysis_code/cli_impl/tui/config_flow.py +2754 -0
- alysis_code/cli_impl/tui/config_overlay.py +566 -0
- alysis_code/cli_impl/tui/content.py +78 -0
- alysis_code/cli_impl/tui/footer.py +218 -0
- alysis_code/cli_impl/tui/forge_status.py +136 -0
- alysis_code/cli_impl/tui/markdown.py +244 -0
- alysis_code/cli_impl/tui/owl.py +109 -0
- alysis_code/cli_impl/tui/plan_meta.py +477 -0
- alysis_code/cli_impl/tui/setup_app.py +519 -0
- alysis_code/cli_impl/tui/setup_flow.py +1622 -0
- alysis_code/cli_impl/tui/state.py +101 -0
- alysis_code/cli_impl/tui/subagent_identity.py +66 -0
- alysis_code/cli_impl/tui/subagent_panel.py +186 -0
- alysis_code/cli_impl/tui/surface.py +796 -0
- alysis_code/cli_impl/tui/transcript.py +514 -0
- alysis_code/cli_impl/tui/update_prompt.py +79 -0
- alysis_code/cli_impl/tui/workspace_guard.py +384 -0
- alysis_code/clipboard.py +172 -0
- alysis_code/code_review.py +1211 -0
- alysis_code/compaction/__init__.py +28 -0
- alysis_code/compaction/conversation_compactor.py +2932 -0
- alysis_code/compaction/importance.py +177 -0
- alysis_code/compaction/settings.py +297 -0
- alysis_code/compaction/tool_output_offload.py +447 -0
- alysis_code/config.py +3509 -0
- alysis_code/conflict_auto_resolver.py +895 -0
- alysis_code/context/__init__.py +1 -0
- alysis_code/context/tool_schema_budgeter.py +220 -0
- alysis_code/crash_diagnostics.py +282 -0
- alysis_code/custom_tools/README.md +34 -0
- alysis_code/custom_tools/__init__.py +43 -0
- alysis_code/custom_tools/discovery.py +903 -0
- alysis_code/custom_tools/runtime.py +1516 -0
- alysis_code/custom_tools/session.py +227 -0
- alysis_code/custom_tools/trust.py +232 -0
- alysis_code/diff_paths.py +113 -0
- alysis_code/direction_change.py +293 -0
- alysis_code/dispatch_timing.py +306 -0
- alysis_code/durable_service_manager.py +1236 -0
- alysis_code/edit_discipline.py +659 -0
- alysis_code/error_text.py +73 -0
- alysis_code/execution_budget.py +411 -0
- alysis_code/execution_context.py +915 -0
- alysis_code/execution_deadline.py +1065 -0
- alysis_code/execution_shared.py +1904 -0
- alysis_code/extensions/README.md +30 -0
- alysis_code/extensions/__init__.py +93 -0
- alysis_code/extensions/activation.py +138 -0
- alysis_code/extensions/install.py +1436 -0
- alysis_code/extensions/manifest.py +487 -0
- alysis_code/extensions/models.py +74 -0
- alysis_code/extensions/paths.py +56 -0
- alysis_code/extensions/registry.json +4 -0
- alysis_code/extensions/registry.py +52 -0
- alysis_code/extensions/state.py +83 -0
- alysis_code/extensions/workspace_trust.py +101 -0
- alysis_code/failed_task_evidence.py +369 -0
- alysis_code/failure_category.py +315 -0
- alysis_code/feedback_report.py +1647 -0
- alysis_code/file_classification.py +485 -0
- alysis_code/forge.py +2064 -0
- alysis_code/forge_completion.py +362 -0
- alysis_code/forge_events.py +475 -0
- alysis_code/frontmatter_utils.py +95 -0
- alysis_code/git_evidence.py +1181 -0
- alysis_code/git_ops.py +560 -0
- alysis_code/git_safe.py +62 -0
- alysis_code/git_worktrees.py +190 -0
- alysis_code/hooks/README.md +33 -0
- alysis_code/hooks/__init__.py +67 -0
- alysis_code/hooks/audit.py +171 -0
- alysis_code/hooks/config.py +225 -0
- alysis_code/hooks/dispatcher.py +1110 -0
- alysis_code/hooks/models.py +447 -0
- alysis_code/hooks/trust.py +202 -0
- alysis_code/host_actions.py +543 -0
- alysis_code/host_browser.py +103 -0
- alysis_code/ide/__init__.py +5 -0
- alysis_code/ide/activity_events.py +399 -0
- alysis_code/ide/approvals.py +337 -0
- alysis_code/ide/artifacts.py +153 -0
- alysis_code/ide/browser_egress_proxy.py +1076 -0
- alysis_code/ide/cdp_websocket_transport.py +1192 -0
- alysis_code/ide/change_ledger.py +1721 -0
- alysis_code/ide/context_blocks.py +979 -0
- alysis_code/ide/event_stream.py +531 -0
- alysis_code/ide/forge_protocol.py +3112 -0
- alysis_code/ide/forge_request_ledger.py +737 -0
- alysis_code/ide/health.py +965 -0
- alysis_code/ide/managed_browser.py +2251 -0
- alysis_code/ide/management_protocol.py +3414 -0
- alysis_code/ide/mcp_oauth_coordinator.py +744 -0
- alysis_code/ide/mcp_oauth_lifecycle.py +1504 -0
- alysis_code/ide/prompt_queue.py +1070 -0
- alysis_code/ide/protocol.py +191 -0
- alysis_code/ide/resumable_swarm.py +1543 -0
- alysis_code/ide/session_search.py +295 -0
- alysis_code/ide/stdio_bridge.py +9935 -0
- alysis_code/ide/structured_state.py +1579 -0
- alysis_code/ide/swarm_protocol.py +816 -0
- alysis_code/integration_gate.py +506 -0
- alysis_code/interactive_input_guard.py +39 -0
- alysis_code/interactive_plan_mode.py +26 -0
- alysis_code/internal_artifacts.py +179 -0
- alysis_code/knowledge_base.py +1409 -0
- alysis_code/knowledge_capture.py +1190 -0
- alysis_code/knowledge_librarian.py +605 -0
- alysis_code/language_policy.py +34 -0
- alysis_code/litellm_static_provider.py +535 -0
- alysis_code/llm/__init__.py +1 -0
- alysis_code/llm/anthropic_messages.py +2288 -0
- alysis_code/llm/base.py +71 -0
- alysis_code/llm/cache_capabilities.py +985 -0
- alysis_code/llm/cache_control_blocks.py +244 -0
- alysis_code/llm/cache_policy.py +388 -0
- alysis_code/llm/factory.py +373 -0
- alysis_code/llm/gemini_generate_content.py +2652 -0
- alysis_code/llm/gemini_interactions.py +739 -0
- alysis_code/llm/metadata.py +450 -0
- alysis_code/llm/openai_compat.py +2947 -0
- alysis_code/llm/openai_responses.py +2604 -0
- alysis_code/llm/protocols.py +609 -0
- alysis_code/llm/provider_limits.py +525 -0
- alysis_code/llm/request_plan.py +389 -0
- alysis_code/llm/request_shape.py +238 -0
- alysis_code/llm/streaming.py +108 -0
- alysis_code/llm/temperature_compat.py +78 -0
- alysis_code/llm/types.py +195 -0
- alysis_code/llm/usage_normalization.py +222 -0
- alysis_code/llm_error_display.py +315 -0
- alysis_code/logging_redaction.py +326 -0
- alysis_code/managed_host_deadline.py +196 -0
- alysis_code/mcp/README.md +33 -0
- alysis_code/mcp/__init__.py +24 -0
- alysis_code/mcp/client.py +1137 -0
- alysis_code/mcp/config.py +597 -0
- alysis_code/mcp/errors.py +113 -0
- alysis_code/mcp/forge_scope.py +154 -0
- alysis_code/mcp/jsonrpc.py +214 -0
- alysis_code/mcp/manager.py +2308 -0
- alysis_code/mcp/models.py +666 -0
- alysis_code/mcp/oauth.py +972 -0
- alysis_code/mcp/oauth_runtime.py +310 -0
- alysis_code/mcp/oauth_store.py +276 -0
- alysis_code/mcp/prompts.py +329 -0
- alysis_code/mcp/resources.py +295 -0
- alysis_code/mcp/roots.py +106 -0
- alysis_code/mcp/server_requests.py +75 -0
- alysis_code/mcp/token_store.py +859 -0
- alysis_code/mcp/transport_http.py +1338 -0
- alysis_code/mcp/transport_stdio.py +1267 -0
- alysis_code/mcp/untrusted_content.py +119 -0
- alysis_code/merge_conflict_reviewer.py +729 -0
- alysis_code/model_catalog/__init__.py +1 -0
- alysis_code/model_catalog/chatgpt_codex_subscription_snapshot.json +186 -0
- alysis_code/model_catalog/litellm_model_prices_snapshot.json +44715 -0
- alysis_code/model_catalog/litellm_model_prices_snapshot.meta.json +17 -0
- alysis_code/model_metadata_policy.py +223 -0
- alysis_code/model_metadata_utils.py +103 -0
- alysis_code/model_registry.py +1420 -0
- alysis_code/model_router.py +147 -0
- alysis_code/permission_policy.py +1016 -0
- alysis_code/personas.py +451 -0
- alysis_code/pipeline_facts.py +233 -0
- alysis_code/plan_assistant.py +4763 -0
- alysis_code/plan_mode.py +393 -0
- alysis_code/plan_reconciliation.py +1228 -0
- alysis_code/plan_repair.py +652 -0
- alysis_code/plan_validation.py +1099 -0
- alysis_code/planning_constraints.py +904 -0
- alysis_code/policy.py +95 -0
- alysis_code/preview_server.py +457 -0
- alysis_code/process_reaping.py +566 -0
- alysis_code/profile_presets.py +1834 -0
- alysis_code/profiles.py +666 -0
- alysis_code/provider_auth/__init__.py +29 -0
- alysis_code/provider_auth/base.py +99 -0
- alysis_code/provider_auth/openai_codex.py +951 -0
- alysis_code/provider_auth/registry.py +76 -0
- alysis_code/provider_auth/store.py +125 -0
- alysis_code/provider_diagnostics.py +1209 -0
- alysis_code/provider_model_catalog.py +685 -0
- alysis_code/provider_telemetry.py +1699 -0
- alysis_code/provider_url.py +75 -0
- alysis_code/reasoning_contracts.py +911 -0
- alysis_code/remote_sync.py +350 -0
- alysis_code/replanning.py +1195 -0
- alysis_code/repo_scan.py +1152 -0
- alysis_code/request_estimation.py +296 -0
- alysis_code/review_gate.py +617 -0
- alysis_code/run_lock.py +1141 -0
- alysis_code/run_outcome.py +58 -0
- alysis_code/run_provenance.py +774 -0
- alysis_code/run_state.py +445 -0
- alysis_code/runtime_artifacts.py +116 -0
- alysis_code/runtime_context_features.py +78 -0
- alysis_code/runtime_kind.py +52 -0
- alysis_code/safety/__init__.py +11 -0
- alysis_code/safety/mcp_sanitize.py +29 -0
- alysis_code/safety/safe_http.py +297 -0
- alysis_code/safety/subagent_report.py +184 -0
- alysis_code/sandbox_doctor.py +682 -0
- alysis_code/sandbox_runner.py +1025 -0
- alysis_code/sandbox_settings.py +423 -0
- alysis_code/serialized_paths.py +355 -0
- alysis_code/server/__init__.py +3 -0
- alysis_code/server/app.py +367 -0
- alysis_code/server/auth.py +34 -0
- alysis_code/server/job_config.py +30 -0
- alysis_code/server/settings.py +215 -0
- alysis_code/server/store.py +193 -0
- alysis_code/server/worker_runner.py +657 -0
- alysis_code/service_persistence.py +355 -0
- alysis_code/session_artifacts.py +108 -0
- alysis_code/session_metrics.py +331 -0
- alysis_code/session_store.py +624 -0
- alysis_code/skills/README.md +34 -0
- alysis_code/skills/__init__.py +104 -0
- alysis_code/skills/conventions.py +84 -0
- alysis_code/skills/discovery.py +176 -0
- alysis_code/skills/eval_models.py +232 -0
- alysis_code/skills/eval_runner.py +372 -0
- alysis_code/skills/evals.py +1344 -0
- alysis_code/skills/install.py +293 -0
- alysis_code/skills/loader.py +118 -0
- alysis_code/skills/matching.py +103 -0
- alysis_code/skills/models.py +71 -0
- alysis_code/skills/paths.py +56 -0
- alysis_code/skills/prompting.py +500 -0
- alysis_code/skills/scaffold.py +142 -0
- alysis_code/skills/state.py +441 -0
- alysis_code/skills/transactions.py +125 -0
- alysis_code/skills/validation.py +304 -0
- alysis_code/step_budget.py +238 -0
- alysis_code/subagent_labels.py +49 -0
- alysis_code/subagents.py +1072 -0
- alysis_code/surface/__init__.py +80 -0
- alysis_code/surface/base.py +305 -0
- alysis_code/surface/console.py +387 -0
- alysis_code/surface/events.py +372 -0
- alysis_code/surface/hidden_surface.py +529 -0
- alysis_code/surface/noop_surface.py +219 -0
- alysis_code/surface/rich_surface.py +1555 -0
- alysis_code/surface/styles.py +67 -0
- alysis_code/surface/theme.py +455 -0
- alysis_code/surface/types.py +100 -0
- alysis_code/swarm_backend.py +926 -0
- alysis_code/swarm_orchestrator.py +4020 -0
- alysis_code/swarm_scheduler.py +441 -0
- alysis_code/swarm_trace.py +429 -0
- alysis_code/swarm_worker.py +2119 -0
- alysis_code/swarm_write_guard.py +348 -0
- alysis_code/task_dependencies.py +170 -0
- alysis_code/task_readiness.py +992 -0
- alysis_code/task_scope.py +2148 -0
- alysis_code/terminal_manager.py +762 -0
- alysis_code/terminal_ownership.py +460 -0
- alysis_code/text_normalization.py +30 -0
- alysis_code/token_budget.py +97 -0
- alysis_code/tools/README.md +34 -0
- alysis_code/tools/__init__.py +1 -0
- alysis_code/tools/artifacts.py +127 -0
- alysis_code/tools/availability.py +188 -0
- alysis_code/tools/fs.py +1456 -0
- alysis_code/tools/git.py +461 -0
- alysis_code/tools/history.py +229 -0
- alysis_code/tools/http_timeout.py +78 -0
- alysis_code/tools/image_generation.py +552 -0
- alysis_code/tools/registry.py +2936 -0
- alysis_code/tools/repo_map.py +476 -0
- alysis_code/tools/search.py +563 -0
- alysis_code/tools/shell.py +135 -0
- alysis_code/tools/symbols.py +1350 -0
- alysis_code/tools/test_discovery.py +643 -0
- alysis_code/tools/web.py +482 -0
- alysis_code/tools/web_search.py +2012 -0
- alysis_code/tools/web_search_dashscope.py +557 -0
- alysis_code/tools/web_search_ddgs.py +221 -0
- alysis_code/tools/web_search_provider_adapters.py +1429 -0
- alysis_code/tools/web_search_tavily.py +194 -0
- alysis_code/updates.py +933 -0
- alysis_code/usage_tracker.py +1990 -0
- alysis_code/verification_command_analysis.py +1004 -0
- alysis_code/verification_contract.py +574 -0
- alysis_code/verification_failure_summary.py +273 -0
- alysis_code/verification_repair.py +385 -0
- alysis_code/verify_gate.py +3129 -0
- alysis_code/web_research.py +1872 -0
- alysis_code/web_search_adapters.py +66 -0
- alysis_code/web_search_policy.py +27 -0
- alysis_code/workspace_binding.py +389 -0
- alysis_code/workspace_binding_ui.py +408 -0
- alysis_code/workspace_context.py +273 -0
- alysis_code/workspace_isolation.py +138 -0
- alysis_code/workspace_provisioning.py +455 -0
- alysis_code-0.13.0.dist-info/METADATA +507 -0
- alysis_code-0.13.0.dist-info/RECORD +458 -0
- alysis_code-0.13.0.dist-info/WHEEL +4 -0
- alysis_code-0.13.0.dist-info/entry_points.txt +3 -0
- alysis_code-0.13.0.dist-info/licenses/LICENSE +176 -0
- alysis_code-0.13.0.dist-info/licenses/NOTICE +4 -0
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: alysis-code
|
|
3
|
+
Version: 0.13.0
|
|
4
|
+
Summary: Local CLI coding agent powered by any API.
|
|
5
|
+
Project-URL: Changelog, https://github.com/AlysisAi/alysis-code/blob/main/CHANGELOG.md
|
|
6
|
+
Project-URL: Documentation, https://github.com/AlysisAi/alysis-code/tree/main/docs
|
|
7
|
+
Project-URL: Funding, https://github.com/sponsors/AlysisAi
|
|
8
|
+
Project-URL: Issues, https://github.com/AlysisAi/alysis-code/issues
|
|
9
|
+
Project-URL: Security, https://github.com/AlysisAi/alysis-code/blob/main/SECURITY.md
|
|
10
|
+
Project-URL: Source, https://github.com/AlysisAi/alysis-code
|
|
11
|
+
License: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
License-File: NOTICE
|
|
14
|
+
Keywords: agent,api,cli,coding-agent,developer-tools,llm
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: Operating System :: MacOS
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Classifier: Topic :: Software Development
|
|
26
|
+
Classifier: Topic :: Utilities
|
|
27
|
+
Requires-Python: >=3.11
|
|
28
|
+
Requires-Dist: click>=8.0.0
|
|
29
|
+
Requires-Dist: cryptography>=50.0.0
|
|
30
|
+
Requires-Dist: ddgs>=9.0.0
|
|
31
|
+
Requires-Dist: h2>=4.4.1
|
|
32
|
+
Requires-Dist: httpcore<2.0.0,>=1.0.0
|
|
33
|
+
Requires-Dist: httpx>=0.27.0
|
|
34
|
+
Requires-Dist: keyring>=25.0.0
|
|
35
|
+
Requires-Dist: packaging>=23.0
|
|
36
|
+
Requires-Dist: pillow>=12.3.0
|
|
37
|
+
Requires-Dist: platformdirs>=4.2.0
|
|
38
|
+
Requires-Dist: prompt-toolkit>=3.0.43
|
|
39
|
+
Requires-Dist: pydantic>=2.6.0
|
|
40
|
+
Requires-Dist: rich>=13.7.1
|
|
41
|
+
Requires-Dist: tiktoken>=0.7.0
|
|
42
|
+
Requires-Dist: typer>=0.12.0
|
|
43
|
+
Requires-Dist: websockets<17.0,>=15.0
|
|
44
|
+
Provides-Extra: dev
|
|
45
|
+
Requires-Dist: editables==0.5; extra == 'dev'
|
|
46
|
+
Requires-Dist: hatchling==1.31.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: pyyaml>=6.0.0; extra == 'dev'
|
|
49
|
+
Requires-Dist: ruff>=0.6.0; extra == 'dev'
|
|
50
|
+
Provides-Extra: managed-build
|
|
51
|
+
Requires-Dist: pyinstaller-hooks-contrib==2026.6; extra == 'managed-build'
|
|
52
|
+
Requires-Dist: pyinstaller==6.21.0; extra == 'managed-build'
|
|
53
|
+
Provides-Extra: server
|
|
54
|
+
Requires-Dist: fastapi>=0.115; extra == 'server'
|
|
55
|
+
Requires-Dist: python-multipart>=0.0.9; extra == 'server'
|
|
56
|
+
Requires-Dist: uvicorn[standard]>=0.30; extra == 'server'
|
|
57
|
+
Description-Content-Type: text/markdown
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<img src="https://raw.githubusercontent.com/AlysisAi/alysis-code/main/docs/assets/alysis-demo.gif" alt="Alysis Code owl logo" width="192" height="192">
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
<h1 align="center">ALYSIS</h1>
|
|
64
|
+
|
|
65
|
+
<p align="center">
|
|
66
|
+
<strong>Local CLI coding agent that turns plans into reviewed, PR-ready code.</strong>
|
|
67
|
+
</p>
|
|
68
|
+
|
|
69
|
+
<p align="center">
|
|
70
|
+
Bring your own model. Sandboxed by default.
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<p align="center">
|
|
74
|
+
<a href="https://alysiscode.com/">Website</a> ·
|
|
75
|
+
<a href="https://github.com/AlysisAi/alysis-code/tree/main/docs">Docs</a> ·
|
|
76
|
+
<a href="https://github.com/AlysisAi/alysis-code/blob/main/CHANGELOG.md">Changelog</a>
|
|
77
|
+
</p>
|
|
78
|
+
|
|
79
|
+
<p align="center">
|
|
80
|
+
<a href="https://github.com/sponsors/AlysisAi"><img src="https://img.shields.io/github/sponsors/AlysisAi?label=Sponsor&logo=GitHub" alt="GitHub Sponsors"></a>
|
|
81
|
+
</p>
|
|
82
|
+
|
|
83
|
+
<p align="center">
|
|
84
|
+
<a href="https://github.com/AlysisAi/alysis-code/actions/workflows/ci.yml"><img src="https://github.com/AlysisAi/alysis-code/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
85
|
+
<a href="https://pypi.org/project/alysis-code/"><img src="https://img.shields.io/pypi/v/alysis-code.svg" alt="PyPI version"></a>
|
|
86
|
+
<a href="https://pypi.org/project/alysis-code/"><img src="https://img.shields.io/pypi/pyversions/alysis-code.svg" alt="Python versions"></a>
|
|
87
|
+
<a href="https://github.com/AlysisAi/alysis-code/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/alysis-code.svg" alt="License"></a>
|
|
88
|
+
</p>
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Get started
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pipx install alysis-code
|
|
96
|
+
alysis chat # pick a provider, paste your API key, start building
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Bring your own key from any supported provider — or point Alysis Code at a local endpoint (Ollama,
|
|
100
|
+
LM Studio, vLLM) and run fully offline. The `/config` picker lists every preset.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Why Alysis Code
|
|
105
|
+
|
|
106
|
+
- **Forge** — Plan, dispatch parallel workers, verify each task, ship.
|
|
107
|
+
- **Orchestrated subagents** — Run isolated workers in parallel, pin verification to their exact
|
|
108
|
+
candidates, and apply only after host-side conflict checks.
|
|
109
|
+
- **Cross-run memory** — Failures become structured issues the next run avoids.
|
|
110
|
+
- **Bring your own model** — OpenAI, Anthropic, DeepSeek, Qwen, Gemini, Mistral, Xiaomi MiMo, OpenRouter, xAI, and more — plus local endpoints.
|
|
111
|
+
- **Sandboxed by default** — Docker or Bubblewrap. An always-on denylist refuses `rm -rf /`, `curl | sh`, and `sudo` — even in `fullaccess`.
|
|
112
|
+
|
|
113
|
+
## How Forge Works
|
|
114
|
+
|
|
115
|
+
Type `/forge` in chat (or run `alysis forge plan`), describe what you want, and Forge:
|
|
116
|
+
|
|
117
|
+
1. Asks 1–3 clarifying questions if the ask is vague.
|
|
118
|
+
2. Writes `plan.json` with explicit tasks and runnable file scope.
|
|
119
|
+
3. On `/execute plan`, dispatches a swarm of workers that run tasks in parallel.
|
|
120
|
+
4. Verifies each task before marking it done. Failures become `issue` entries the next attempt sees.
|
|
121
|
+
5. Merges to `main` when everything passes, then reports what changed, where the files landed, and
|
|
122
|
+
how to try the result.
|
|
123
|
+
|
|
124
|
+
All plans, traces, and per-task artifacts persist under `.alysis/runs/<run_id>/`. Resume any time with `/forge resume`.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## Install
|
|
128
|
+
|
|
129
|
+
Alysis Code requires Python 3.11 or newer.
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
pipx install alysis-code
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
If your default `python3` is older than 3.11:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
pipx install --python python3.12 alysis-code
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`pip` also works inside a virtual environment:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
python -m pip install alysis-code
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Quick Start
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
pipx install alysis-code
|
|
151
|
+
export ALYSIS_API_KEY="YOUR_KEY"
|
|
152
|
+
alysis config set model "your-model"
|
|
153
|
+
alysis chat
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
On a fresh install, running `alysis` opens a guided setup wizard. Under
|
|
157
|
+
**Connection Method**, choose **Use an API key** or **Use an AI subscription**.
|
|
158
|
+
The subscription choice then shows the supported provider connections. Re-run
|
|
159
|
+
the wizard anytime:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
alysis setup
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Use an AI subscription
|
|
166
|
+
|
|
167
|
+
Subscription connections use provider sign-in while keeping Alysis Code's native
|
|
168
|
+
TUI, agent loop, tools, skills, MCP, subagents, and Forge. Alysis Code
|
|
169
|
+
stores refreshable credentials in its encrypted provider vault, never in
|
|
170
|
+
`config.json`. The built-in connection currently supports ChatGPT Codex sign-in:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
alysis auth login openai-codex
|
|
174
|
+
alysis run --mode readonly "Explain this repository."
|
|
175
|
+
alysis chat --mode auto
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Use `alysis auth login openai-codex --device-code` when a browser callback is
|
|
179
|
+
not practical. Then choose the account model and its supported reasoning effort
|
|
180
|
+
in **`/config` → Default Model**; setup and login do not choose them implicitly.
|
|
181
|
+
If the selected subscription is not connected, plain `alysis` still opens
|
|
182
|
+
the native TUI: type **`/login`** and choose Alysis Code or an AI subscription.
|
|
183
|
+
Model prompts remain blocked until authentication succeeds, and the TUI then
|
|
184
|
+
opens **Default Model** so the model and reasoning effort can be selected
|
|
185
|
+
together. Non-interactive `alysis run` commands continue to fail fast while
|
|
186
|
+
disconnected. The provider-specific `auth login` command remains available for
|
|
187
|
+
shell scripts and non-interactive use.
|
|
188
|
+
See [AI subscription connections](docs/account-runtimes.md) for the
|
|
189
|
+
credential, compatibility, configuration, and adapter extension boundaries.
|
|
190
|
+
|
|
191
|
+
Configure a provider endpoint and model:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
alysis config set base_url "your-base-url"
|
|
195
|
+
alysis config set model "your-model"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Per-command key, endpoint, and model overrides:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
alysis run --api-key-env OTHER_API_KEY --base-url "your-base-url" --model "your-model" "Summarize this project."
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Core Commands
|
|
205
|
+
|
|
206
|
+
| Command | Use |
|
|
207
|
+
| --- | --- |
|
|
208
|
+
| `alysis` | Start setup or interactive chat. |
|
|
209
|
+
| `alysis setup` | Choose API-key or AI-subscription model access and connect an account. |
|
|
210
|
+
| `/login` | Choose and connect an Alysis Code account or supported AI subscription inside the TUI. |
|
|
211
|
+
| `alysis auth list` | Show supported subscription connections and sign-in state. |
|
|
212
|
+
| `alysis run "..."` | Run a one-shot task in the current workspace. |
|
|
213
|
+
| `alysis chat` | Start an interactive coding session. |
|
|
214
|
+
| `alysis forge plan` | Create or update a Forge plan from the CLI. |
|
|
215
|
+
| `alysis forge exec` | Execute a Forge task non-interactively. |
|
|
216
|
+
| `alysis forge swarm` | Run Forge tasks across parallel workers. |
|
|
217
|
+
| `alysis tools` | Show built-in tools and readiness. |
|
|
218
|
+
| `alysis sandbox doctor --smoke` | Check sandbox readiness. |
|
|
219
|
+
|
|
220
|
+
Useful chat commands include `/help`, `/status`, `/mode`, `/config`, `/plan`, `/forge`, `/skill`, `/subagent`, `/terminals`, `/resume`.
|
|
221
|
+
|
|
222
|
+
## Execution Modes
|
|
223
|
+
|
|
224
|
+
Choose a mode per command with `--mode`, change it in chat with `/mode`, or set the default with `alysis config set default_mode <mode>`.
|
|
225
|
+
|
|
226
|
+
| Mode | Behavior |
|
|
227
|
+
| --- | --- |
|
|
228
|
+
| `readonly` | Inspection-only. No file writes, shell, MCP, or subagent delegation. |
|
|
229
|
+
| `review` | Default safe mode. Previews and asks before file writes and shell commands. |
|
|
230
|
+
| `auto` | Applies changes with fewer prompts. Hard denylist still applies. |
|
|
231
|
+
| `fullaccess` | No mode-level approval prompts. Denylist + audit log still active. |
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
alysis run --mode readonly "Find risky areas in this codebase."
|
|
235
|
+
alysis run --mode review "Implement the failing test fix."
|
|
236
|
+
alysis chat --mode auto
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Personas
|
|
240
|
+
|
|
241
|
+
Personas layer named postures on top of the execution-mode gate: `code` (implementation),
|
|
242
|
+
`architect` (planning; may write markdown documents only), `ask` (read-only questions), and
|
|
243
|
+
`debug` (reproduce-before-fix), plus custom personas from `.alysis_personas/*.md`. Switch
|
|
244
|
+
with `/persona`, cycle with **Tab** in the TUI, or let the model propose a switch through the
|
|
245
|
+
approval-gated `switch_mode` tool. A persona is a convention, never a permission: the clamp
|
|
246
|
+
rule means it can keep or lower your execution mode but can never raise it, and each persona
|
|
247
|
+
can bind its own model role (`persona_models.<persona>`). See
|
|
248
|
+
[Personas](docs/personas.md).
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
alysis run --persona architect "Design the auth flow and write it to PLAN.md"
|
|
252
|
+
alysis chat --persona ask
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
For execution-style `alysis run` tasks, a final answer is accepted only after the runtime sees
|
|
256
|
+
the applicable material-work and verification evidence, or an accepted concrete blocker. Text-only
|
|
257
|
+
plans/progress updates and invalid final claims get bounded continuation nudges; repeated
|
|
258
|
+
no-progress finalization stops as completion-gate stagnation, which is reported separately from
|
|
259
|
+
actual step-budget exhaustion. The default gate policy permits two targeted nudges for an
|
|
260
|
+
unchanged evidence episode before the third unchanged invalid finalization terminates; duplicate
|
|
261
|
+
nudge detection is telemetry, not an independent stop path. Empty model responses are treated as a
|
|
262
|
+
recoverable control anomaly first, and generic clarification questions are rejected for actionable
|
|
263
|
+
one-shot tasks unless safety, credentials, external inputs, or destructive choices genuinely require
|
|
264
|
+
the user.
|
|
265
|
+
|
|
266
|
+
Verification evidence is typed before it can satisfy the gate. Effective or managed verification
|
|
267
|
+
commands are authoritative, repo-native test commands can satisfy normal tasks, and task-specific
|
|
268
|
+
acceptance checks are accepted only when no known verification contract needs precedence.
|
|
269
|
+
Verification commands themselves are represented internally by one canonical command analysis with
|
|
270
|
+
stable IDs, provenance, trust level, execution mode, timeout policy, validation status, shell-control
|
|
271
|
+
classification, pipeline policy, and evidentiary capability. Ordinary commands use argv-compatible
|
|
272
|
+
execution. The only shell compound form that can satisfy verification by default is a safely
|
|
273
|
+
analyzed wrapper such as `cd <workspace> && <single assertive command>` or `bash -lc '<single
|
|
274
|
+
assertive command>'`. Pipelines such as `pytest -q | cat`, `tail`, or `tee` are rejected as
|
|
275
|
+
authoritative verification unless a future runner can guarantee pipefail semantics across every
|
|
276
|
+
backend. Explicit interpreter snippets such as Python assertions are converted to interpreter
|
|
277
|
+
invocations instead of being passed to `/bin/sh`, and malformed fragments stay diagnostic/advisory
|
|
278
|
+
rather than hard requirements.
|
|
279
|
+
Execute-intent turns also build an acceptance contract from the user instruction, trusted task
|
|
280
|
+
context, planning constraints, pre-turn workspace scan, and host verification commands. The gate
|
|
281
|
+
tracks concrete required artifacts, exact user commands, preservation constraints, durable-service
|
|
282
|
+
requests, thresholds, and repo-native check surfaces. Evidence records whether it came from a host
|
|
283
|
+
command, explicit user check, pre-existing repo or task checker, direct black-box command,
|
|
284
|
+
self-authored test, or ad hoc observation; self-authored tests are supplemental when independent
|
|
285
|
+
acceptance evidence is still missing or contradicted.
|
|
286
|
+
Path requirements are root-aware: `/app/out.txt` inside a workspace rooted at `/app` is treated as
|
|
287
|
+
`out.txt`, while external absolute paths stay external and are not probed as repo mutations. If a
|
|
288
|
+
request asks to save, write, create, export, move, or put an answer or result in a local path,
|
|
289
|
+
Alysis Code routes it through the repo-capable execution loop even when web or MCP research is needed
|
|
290
|
+
first; web-assisted execution remains able to call web tools before writing the requested artifact.
|
|
291
|
+
Explain-only, plan-only, advice-only, and no-modification requests keep their non-execution
|
|
292
|
+
precedence.
|
|
293
|
+
Mentioned paths carry roles such as required output, existing input, preservation target,
|
|
294
|
+
verification checker, or advisory reference. Criteria also carry confidence and enforcement:
|
|
295
|
+
explicit user and host requirements are hard, while weak parser inferences and extension-only
|
|
296
|
+
format hints are advisory. Finalization is decided by a completion certificate over hard criteria,
|
|
297
|
+
current-generation verification, and known failures; a green generic test run does not override a
|
|
298
|
+
missed explicit threshold or preservation violation. The same shared gate path is used for
|
|
299
|
+
interactive execute turns and one-shot runs.
|
|
300
|
+
Generic `pytest -q` is not universal authority: it is selected only when a trustworthy pre-existing
|
|
301
|
+
Python test surface exists, while explicit user commands, host commands, and discovered repo-native
|
|
302
|
+
checks take precedence. If the agent already ran the exact trusted task command through
|
|
303
|
+
`shell_run`, that successful clean run can satisfy the same verification contract without repeating
|
|
304
|
+
it through `verify_run`; a command that mutates source or requested outputs requires a later clean
|
|
305
|
+
rerun.
|
|
306
|
+
Trusted provenance is not enough by itself: vacuous or non-assertive commands such as `true`,
|
|
307
|
+
`echo ok`, `python -c 'pass'`, plain `curl -s`, and failure-masking forms such as
|
|
308
|
+
`pytest -q || true` are rejected or marked inconclusive before they can satisfy authoritative
|
|
309
|
+
verification. Process success is separate from contract success: `verify_run` reports each command
|
|
310
|
+
as `passed`, `failed`, `inconclusive`, `not_executed`, or `stale`, and `all_passed` is true only
|
|
311
|
+
when every command both exits successfully and has confirmed meaningful real execution. Pre-existing
|
|
312
|
+
workspace checker entrypoints are fingerprinted by resolved path, regular-file state, size, and
|
|
313
|
+
SHA-256 content hash; if the agent modifies, replaces, deletes, or retargets one, the evidence is
|
|
314
|
+
downgraded to supplemental `mutable_authoritative_checker`/self-authored evidence. A missing
|
|
315
|
+
managed-host verifier is represented as verifier unavailable, not as a successful host check.
|
|
316
|
+
Persistent-service requests require explicit durable-service evidence. `shell_background` remains
|
|
317
|
+
session-owned and is reaped on session close; `shell_service_start` creates a durable service with
|
|
318
|
+
detached logs/metadata, a stable `service_id`, and a bounded readiness probe that is rechecked before
|
|
319
|
+
finalization can pass.
|
|
320
|
+
In one-shot execute-intent runs, a visible plan is not a stopping point: after read-only
|
|
321
|
+
exploration the next step should normally implement, create the requested deliverable, verify
|
|
322
|
+
existing work, or report a concrete evidence-backed blocker. Explicit plan-only, advice-only,
|
|
323
|
+
review-only, or "do not modify files" requests remain non-execution requests.
|
|
324
|
+
|
|
325
|
+
One-shot runs can also take an invocation-wide wall-clock deadline:
|
|
326
|
+
`alysis run --deadline-seconds 600 "..."`. This is separate from the
|
|
327
|
+
per-provider LLM timeout: the run deadline stops new LLM, tool, verification,
|
|
328
|
+
and subagent work once the monotonic deadline is exhausted, while LLM timeout
|
|
329
|
+
controls a single model request.
|
|
330
|
+
Managed benchmark hosts should invoke `alysis run` with both
|
|
331
|
+
`--benchmark`, `--deadline-seconds N`, and `--require-deadline`, passing the
|
|
332
|
+
instruction after a positional `--` separator. `--benchmark` selects the raw
|
|
333
|
+
autonomy profile: auto posture, code-only routing, a longer fixed step budget,
|
|
334
|
+
and no optional subagents, skills, custom tools, or web search by
|
|
335
|
+
default. The host deadline should be derived from the final effective agent
|
|
336
|
+
timeout, not verifier or environment-build timeouts, and should leave host-side
|
|
337
|
+
reserve for process collection and artifact flushing. This host reserve is
|
|
338
|
+
separate from Alysis Code's internal finalization reserve.
|
|
339
|
+
The Terminal-Bench adapter enforces this contract by requiring
|
|
340
|
+
`managed_host_agent_timeout_sec` through `--agent-kwarg`; with current
|
|
341
|
+
Terminal-Bench runners, pass the same value as `--global-agent-timeout-sec`
|
|
342
|
+
because the runner applies per-task timeout multipliers inside the harness and
|
|
343
|
+
does not expose that computed value to imported agents. The host shutdown
|
|
344
|
+
reserve is configured by `managed_host_shutdown_reserve_sec`, then
|
|
345
|
+
`ALYSIS_MANAGED_HOST_SHUTDOWN_RESERVE_SEC`, then the conservative default of
|
|
346
|
+
30 seconds. When an agent logging directory is available, the adapter writes a
|
|
347
|
+
sanitized `managed-host-deadline.json` artifact with the timeout source, elapsed
|
|
348
|
+
pre-launch time, host reserve, computed Alysis Code deadline, and validation
|
|
349
|
+
status. The Terminal-Bench adapter does not pass a default `--verify-cmd`; when
|
|
350
|
+
no explicit host verifier is supplied, setup clears managed-profile explicit
|
|
351
|
+
verifier commands, marks the host verifier unavailable, lets repo-native
|
|
352
|
+
verification discovery run normally, and records only sanitized verifier
|
|
353
|
+
status/count/hash metadata.
|
|
354
|
+
Transient provider transport failures such as stream truncation, incomplete
|
|
355
|
+
chunked reads, peer-closed connections, and provider-side throttling are retried
|
|
356
|
+
only when the remaining deadline budget can safely absorb the retry. During the
|
|
357
|
+
soft finalization window, provider retries are limited to one bounded restart so
|
|
358
|
+
the agent preserves time to materialize or truthfully summarize the best result.
|
|
359
|
+
|
|
360
|
+
## Model-Independent Web Search
|
|
361
|
+
|
|
362
|
+
Alysis Code exposes `web_search` to the active model and lets the model decide when
|
|
363
|
+
current external evidence is needed. Native protocol clients map that capability
|
|
364
|
+
to the provider's server-side tool; other models call the same Alysis Code tool and
|
|
365
|
+
use the provider adapter selected for their profile.
|
|
366
|
+
|
|
367
|
+
Configure one search backend for the installation:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
alysis config set web_search_policy auto
|
|
371
|
+
alysis config set web_search_mode auto
|
|
372
|
+
export ALYSIS_WEB_SEARCH_API_KEY=<tavily-key>
|
|
373
|
+
alysis tools
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
`web_search_policy=auto` makes search available to the model; `off` hides it.
|
|
377
|
+
`web_search_mode` independently selects `auto`, provider-hosted, external-only,
|
|
378
|
+
or disabled backend behavior. Direct providers without hosted search, including
|
|
379
|
+
DeepSeek, use the configured external adapter. See the
|
|
380
|
+
[provider coverage matrix](docs/web-search.md) for the exact API and model support.
|
|
381
|
+
|
|
382
|
+
## Sandbox & Safety
|
|
383
|
+
|
|
384
|
+
Shell and verification execution run inside a hardened Docker or Bubblewrap sandbox by default.
|
|
385
|
+
Shell commands and verification commands default to strict sandboxing. To deliberately disable
|
|
386
|
+
verification sandboxing for a trusted local setup, set `verify_sandbox.mode="off"` or
|
|
387
|
+
`ALYSIS_VERIFY_SANDBOX_MODE=off`.
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
docker pull ghcr.io/alysisai/alysis-sandbox:dev
|
|
391
|
+
docker pull ghcr.io/alysisai/alysis-sandbox:server
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Prepare or diagnose:
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
alysis sandbox setup
|
|
398
|
+
alysis sandbox doctor --smoke
|
|
399
|
+
alysis sandbox pull
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
The denylist is always-on across every mode. It refuses `rm -rf /`, `curl ... | sh`, `sudo`, force-push to `main` / `master`, raw disk writes, fork-bombs, recursive `chmod 777 /`, and direct `> /dev/sd*` redirects. In `fullaccess`, every successful shell command additionally writes a JSONL audit event.
|
|
403
|
+
|
|
404
|
+
Outbound HTTP from web tools and MCP OAuth goes through `safe_http_request` with SSRF guards: rejects non-HTTP schemes, loopback / link-local / private / multicast targets across IPv4 and IPv6, validates redirects, and enforces a streamed byte cap.
|
|
405
|
+
`web_fetch` is additionally provenance-gated: fetch targets must be explicitly
|
|
406
|
+
provided by the user, returned by `web_search`, reached through an observed
|
|
407
|
+
canonical redirect, or recovered through a bounded same-origin/search-mediated
|
|
408
|
+
path. URLs discovered inside trusted fetched pages, local file reads, and
|
|
409
|
+
registered tool or shell output are tracked as source-linked derived URLs rather
|
|
410
|
+
than broad same-domain permission. Finalization does not start optional web
|
|
411
|
+
research just to repair missing provenance.
|
|
412
|
+
|
|
413
|
+
See [Shell sandbox](docs/sandbox.md) for backend requirements, image cosign signatures, SLSA provenance, and production pinning. See [Security model](docs/security_model.md) for the full threat boundary.
|
|
414
|
+
|
|
415
|
+
## Extend Alysis Code
|
|
416
|
+
|
|
417
|
+
Six capability surfaces. Four of them — skills, custom tools, MCP servers, hooks — bundle into a single declarative `.toml` plugin manifest.
|
|
418
|
+
|
|
419
|
+
- [**MCP**](docs/mcp.md) — connect stdio or Streamable HTTP MCP servers, with OAuth, frozen catalogs, and narrowing-only project overrides.
|
|
420
|
+
- [**Custom tools**](docs/custom_tools.md) — drop Python scripts into `.alysis/tools/*.py`. AST-only discovery, trust-keyed by file hash.
|
|
421
|
+
- [**Skills**](docs/skills.md) — `SKILL.md` instruction bundles. Native + interop roots (`.alysis_skills/`, `.agents/skills/`, `.claude/skills/`, `.github/skills/`).
|
|
422
|
+
- [**Subagents**](docs/subagents.md) — focused delegation. Drop YAML+markdown into `.alysis_agents/*.md` for custom agents. Built-ins include `explorer`, `dependency-scout`, `implementer`, `frontend-engineer`, `debugger`, `verifier`, `code-reviewer`, `test-strategist`, and the opt-in `visual-designer` image generator.
|
|
423
|
+
- [**Hooks**](docs/hooks.md) — lifecycle policy across 11 events (`PreToolUse`, `PostToolUse`, `SessionStart`, ...). Three trust layers.
|
|
424
|
+
- [**Plugins**](docs/plugins.md) — declarative bundles of skills + custom tools + MCP servers + hooks. Pinned install (registry id or `git+https://...@<sha40>`).
|
|
425
|
+
|
|
426
|
+
Run as an HTTP service with [Server mode](docs/server.md) — worker jobs, uploads, queues, and authentication.
|
|
427
|
+
|
|
428
|
+
**Repo conventions.** Alysis Code reads `AGENTS.md`, `CLAUDE.md`, and `CONVENTIONS.md` from your repo root as read-only project context.
|
|
429
|
+
|
|
430
|
+
## Configuration & Credentials
|
|
431
|
+
|
|
432
|
+
API keys can come from per-command options, `ALYSIS_API_KEY` or persisted credentials.
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
alysis config show
|
|
436
|
+
alysis config set-api-key
|
|
437
|
+
alysis config clear-api-key
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
Provider profiles switch between configured endpoints:
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
alysis profile presets
|
|
444
|
+
alysis profile use openai
|
|
445
|
+
alysis profile list
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
AI-subscription credentials follow a separate boundary: Alysis Code encrypts them
|
|
449
|
+
in its provider vault and attaches them only to the selected adapter's allowlisted
|
|
450
|
+
destinations. `config.json` contains only the connection plus the model and
|
|
451
|
+
reasoning effort explicitly chosen in `/config`. See
|
|
452
|
+
[AI subscription connections](docs/account-runtimes.md).
|
|
453
|
+
|
|
454
|
+
See [Credentials](docs/credentials.md) for key resolution and storage details.
|
|
455
|
+
|
|
456
|
+
Reliability knobs:
|
|
457
|
+
|
|
458
|
+
- Normal chat, run, Forge, and subagent execution is autonomous and has no
|
|
459
|
+
default step ceiling. `--max-steps N` adds an optional safety limit for a
|
|
460
|
+
specific invocation; persisted legacy caps are used only by the opt-in
|
|
461
|
+
`limited` policy. Setup and `/config` do not ask for step budgets.
|
|
462
|
+
- `run_deadline_seconds` or `ALYSIS_RUN_DEADLINE_SECONDS` sets a default
|
|
463
|
+
one-shot wall-clock deadline. `--deadline-seconds` overrides it for one run.
|
|
464
|
+
Near the end of a configured deadline, Alysis Code enters a soft finalization
|
|
465
|
+
window: it stops new subagents and broad exploration, keeps bounded finishing
|
|
466
|
+
actions available, and asks the agent once to materialize the best valid
|
|
467
|
+
result before the hard deadline.
|
|
468
|
+
- `crash_diagnostic_log_path` or `ALYSIS_CRASH_DIAGNOSTIC_LOG_PATH` enables
|
|
469
|
+
an opt-in minimal JSONL diagnostic log. `--diagnostic-log PATH` overrides it
|
|
470
|
+
for a command and still works with `--no-log`.
|
|
471
|
+
|
|
472
|
+
The diagnostic log records lifecycle/status metadata only: event type, run and
|
|
473
|
+
session IDs, step/tool names, durations, deadline phase/source/reserve state,
|
|
474
|
+
and normalized status. It does not persist prompts, tool arguments, command
|
|
475
|
+
output, source text, environment dumps, or secrets.
|
|
476
|
+
|
|
477
|
+
## Workspace Behavior
|
|
478
|
+
|
|
479
|
+
`alysis run` and `alysis chat` bind a workspace before the session starts. The requested path is `--path` or the current directory. In a git repository, Alysis Code binds to the repository root while preserving the starting directory as the focus directory.
|
|
480
|
+
|
|
481
|
+
Missing paths require `--create-path`. Broad directories such as `~` require an explicit override. `/` is blocked as a workspace root.
|
|
482
|
+
|
|
483
|
+
Runtime artifacts such as logs, session files, and coverage output are classified separately from
|
|
484
|
+
material source, config, and deliverable changes. Verification commands that mutate material
|
|
485
|
+
source/config files or requested deliverables are not allowed to satisfy the completion gate until a
|
|
486
|
+
clean verification result follows.
|
|
487
|
+
Explicit unchanged or only-touch constraints are checked against material touched paths. Required
|
|
488
|
+
thresholds stay failed when measured output misses the requested target, and performance-style
|
|
489
|
+
thresholds require repeated samples instead of a single lucky observation.
|
|
490
|
+
After tool results, blank assistant responses use a separate model-control anomaly budget: the
|
|
491
|
+
runtime records recovery telemetry, appends one compact action-only directive, and may request a
|
|
492
|
+
safe forced tool call only when the provider advertises that capability and an appropriate tool
|
|
493
|
+
schema is present. Providers without explicit forced-tool support fall back to ordinary prompting.
|
|
494
|
+
|
|
495
|
+
## Project Links
|
|
496
|
+
|
|
497
|
+
- [Website](https://alysiscode.com/)
|
|
498
|
+
- [Docs index](docs/README.md)
|
|
499
|
+
- [Release checklist](docs/release_checklist.md)
|
|
500
|
+
- [Changelog](CHANGELOG.md)
|
|
501
|
+
- [Contributing](CONTRIBUTING.md)
|
|
502
|
+
- [Security policy](SECURITY.md)
|
|
503
|
+
- [License](LICENSE)
|
|
504
|
+
|
|
505
|
+
Use Python 3.11 or newer for local development. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and PR expectations. Report vulnerabilities through [SECURITY.md](SECURITY.md), not public GitHub issues.
|
|
506
|
+
|
|
507
|
+
Alysis Code is distributed under the [Apache License 2.0](LICENSE).
|