koder 0.5.0__tar.gz → 0.5.1__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.
- {koder-0.5.0 → koder-0.5.1}/.gitignore +1 -0
- {koder-0.5.0 → koder-0.5.1}/PKG-INFO +29 -23
- {koder-0.5.0 → koder-0.5.1}/README.md +4 -3
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/interactive.py +8 -4
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/status_line.py +6 -3
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/runtime_commands.py +1 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/interactive.py +109 -105
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/managed_settings.py +9 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/service.py +60 -9
- koder-0.5.1/koder_agent/harness/sandbox/__init__.py +19 -0
- koder-0.5.1/koder_agent/harness/sandbox/backend.py +87 -0
- koder-0.5.1/koder_agent/harness/sandbox/policy.py +146 -0
- koder-0.5.1/koder_agent/harness/sandbox/registry.py +289 -0
- koder-0.5.1/koder_agent/harness/sandbox/sdk_backend.py +103 -0
- koder-0.5.1/koder_agent/harness/sandbox/smoke.py +160 -0
- koder-0.5.1/koder_agent/harness/sandbox/workspace.py +100 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/sandbox_settings.py +98 -20
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/shell_executor.py +57 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/agent.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/ask_user.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/code_intelligence.py +2 -1
- koder-0.5.1/koder_agent/tools/compat.py +44 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/config_tool.py +2 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/cron.py +2 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/file.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/mcp_resource.py +1 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/notebook_edit.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/plan_mode.py +2 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/powershell.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/search.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/send_message.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/shell.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/skill.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/sleep.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/structured_output.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/task.py +3 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/task_lifecycle.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/task_output.py +2 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/task_stop.py +2 -2
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/team.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/todo.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/tool_search.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/web.py +2 -1
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/worktree.py +1 -1
- {koder-0.5.0 → koder-0.5.1}/pyproject.toml +30 -25
- {koder-0.5.0 → koder-0.5.1}/.claude/settings.local.json +0 -0
- {koder-0.5.0 → koder-0.5.1}/LICENSE +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/agent.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/api_errors.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/approval_hooks.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/hook_guardrail.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/hooks.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/plan_guardrail.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/agentic/skill_guardrail.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/base.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/callback_server.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/client_integration.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/codex_prompts.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/constants.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/litellm_oauth.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/providers/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/providers/antigravity.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/providers/chatgpt.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/providers/claude.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/providers/google.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/secure_storage.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/token_storage.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/auth/tool_utils.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/cli.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/config/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/config/manager.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/config/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/at_completer.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/at_mentions.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/auto_suggest.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/bash_security.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/file_index.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/keybindings.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/keyboard_listener.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/notifications.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/scheduler.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/security.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/session.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/shell_completer.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/skill_usage.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/streaming_display.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/terminal_reflow.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/usage_tracker.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/core/vim_mode.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/data/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/data/model_prices_and_context_window.json +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/add_dir_validation.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/definitions.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/hooks.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/messages.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/summary.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/context.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/in_process.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/memory_sync.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/permission_bridge.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/routing.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/runtime.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/task_service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/agents/teams/tmux_backend.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/auth/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/auth/commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/bootstrap.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/buddy.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/gate.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/interceptor.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/notification.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/permissions.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/state.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/channels/types.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/cli/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/cli/entrypoint.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/code_intelligence.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/advisor.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/agents_view.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/brief.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/buddy.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/config_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/inspection_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/plugin_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/session_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/workflow_review_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/builtins/workflow_state_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/internal/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/internal/debug_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/internal/diagnostic_commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/pr_comments.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/registry.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/review_context.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/security_review.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/commands/workflow_helpers.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/backup.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/migration.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/schema.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/config/settings_bundle.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/cron/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/cron/scheduler.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/cron/storage.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/github_actions.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/hooks/runtime.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ide.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/magic_docs.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/mcp/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/mcp/commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/auto_compact.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/auto_dream.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/budget.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/compact.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/extraction.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/legacy_db.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/memory_files.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/micro_compact.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/post_compact.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/pruning.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/recovery.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/retrieval.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/session_memory.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/transcript_store.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/memory/writer_lock.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/onboarding.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/paths.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/ai_classifier.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/denial_log.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/modes.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/path_policy.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/persistence.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/powershell_classifier.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/propagation.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/results.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/rule_sources.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/rules.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/permissions/shell_classifier.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plan/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plan/mode.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/catalog.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/commands.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/env.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/lifecycle.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/manifest.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/marketplace.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/name_validation.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/options.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/registry.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/session_root.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/state.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/plugins/validator.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/policy_limits.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/pr_status.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/prompt_suggestion.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/reasoning_display.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/release_notes.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/runtime.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/session_env.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/session_flow.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/skills/bundled.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/skills/discovery.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/state/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/state/actions.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/state/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/state/selectors.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/state/store.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/statusline_settings.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/statusline_setup.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tasks/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tasks/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tasks/output.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tasks/service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tasks/storage.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tips.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/code_intelligence_ops.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/file_ops.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/mcp_ops.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/registry.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/search_ops.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/shell.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/tools/web_ops.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/app.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/permissions/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/permissions/dialog.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/screens/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/screens/main.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/screens/plugins.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/widgets/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/widgets/prompt_buffer.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/ui/widgets/status_line.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/version_info.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/voice/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/voice/keyterms.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/voice/service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/worktree/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/worktree/conflicts.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/harness/worktree/service.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/litellm_cost_map.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/elicitation.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/limits.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/notifications.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/oauth.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/project_approvals.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/prompts.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/reconnection.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/serve.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/server_config.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/server_factory.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/mcp/server_manager.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/providers/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/providers/compat.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/providers/models.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/engine.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/file_state.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/fork_agent.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/orchestration.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/tools/skill_context.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/__init__.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/client.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/model_deprecation.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/model_info.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/prompts.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/queue.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/sessions.py +0 -0
- {koder-0.5.0 → koder-0.5.1}/koder_agent/utils/terminal_theme.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: koder
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: An intuitive AI coding assistant and interactive CLI tool that boosts developer productivity with intelligent automation and context-aware support.
|
|
5
5
|
Project-URL: Homepage, https://github.com/feiskyer/koder
|
|
6
6
|
Project-URL: Repository, https://github.com/feiskyer/koder
|
|
@@ -9,33 +9,38 @@ License-File: LICENSE
|
|
|
9
9
|
Keywords: agent,agentic,ai,copilot,litellm,openai,vibe coding
|
|
10
10
|
Requires-Python: >=3.10
|
|
11
11
|
Requires-Dist: aiosqlite>=0.22.1
|
|
12
|
-
Requires-Dist: anthropic>=0.
|
|
12
|
+
Requires-Dist: anthropic>=0.100.0
|
|
13
13
|
Requires-Dist: apscheduler>=3.11.2
|
|
14
14
|
Requires-Dist: backoff>=2.2.1
|
|
15
15
|
Requires-Dist: beautifulsoup4>=4.14.3
|
|
16
|
-
Requires-Dist: boto3>=1.
|
|
17
|
-
Requires-Dist: cryptography>=
|
|
18
|
-
Requires-Dist: ddgs>=9.
|
|
19
|
-
Requires-Dist:
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
16
|
+
Requires-Dist: boto3>=1.43.6
|
|
17
|
+
Requires-Dist: cryptography>=48.0.0
|
|
18
|
+
Requires-Dist: ddgs>=9.14.2
|
|
19
|
+
Requires-Dist: docker>=7.1.0
|
|
20
|
+
Requires-Dist: e2b-code-interpreter>=2.6.2
|
|
21
|
+
Requires-Dist: e2b>=2.21.0
|
|
22
|
+
Requires-Dist: fastapi-sso>=0.21.0
|
|
23
|
+
Requires-Dist: fastapi>=0.136.1
|
|
24
|
+
Requires-Dist: google-cloud-aiplatform>=1.151.0
|
|
22
25
|
Requires-Dist: httpx[socks]>=0.28.1
|
|
23
|
-
Requires-Dist: jsonschema>=4.
|
|
24
|
-
Requires-Dist: litellm>=1.
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist: openai
|
|
27
|
-
Requires-Dist:
|
|
26
|
+
Requires-Dist: jsonschema>=4.26.0
|
|
27
|
+
Requires-Dist: litellm>=1.83.0
|
|
28
|
+
Requires-Dist: modal>=1.4.2
|
|
29
|
+
Requires-Dist: openai-agents[litellm]>=0.17.0
|
|
30
|
+
Requires-Dist: openai==2.36.0
|
|
31
|
+
Requires-Dist: orjson>=3.11.9
|
|
28
32
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
29
|
-
Requires-Dist: pydantic>=2.
|
|
30
|
-
Requires-Dist: pyjwt>=2.
|
|
33
|
+
Requires-Dist: pydantic>=2.13.4
|
|
34
|
+
Requires-Dist: pyjwt>=2.12.1
|
|
31
35
|
Requires-Dist: pynacl>=1.6.2
|
|
32
|
-
Requires-Dist: python-multipart>=0.0.
|
|
36
|
+
Requires-Dist: python-multipart>=0.0.27
|
|
33
37
|
Requires-Dist: pyyaml>=6.0.3
|
|
34
|
-
Requires-Dist: requests>=2.
|
|
35
|
-
Requires-Dist: rich>=
|
|
36
|
-
Requires-Dist: sounddevice>=0.5.
|
|
38
|
+
Requires-Dist: requests>=2.33.1
|
|
39
|
+
Requires-Dist: rich>=15.0.0
|
|
40
|
+
Requires-Dist: sounddevice>=0.5.5
|
|
37
41
|
Requires-Dist: tiktoken>=0.12.0
|
|
38
|
-
Requires-Dist:
|
|
42
|
+
Requires-Dist: vercel>=0.5.8
|
|
43
|
+
Requires-Dist: websockets>=16.0
|
|
39
44
|
Requires-Dist: whatthepatch>=1.0.7
|
|
40
45
|
Description-Content-Type: text/markdown
|
|
41
46
|
|
|
@@ -147,7 +152,7 @@ Good first commands inside the TUI:
|
|
|
147
152
|
| Check usage and cost | `/usage`, `/cost` |
|
|
148
153
|
| Manage agents and teams | `/agents`, `/fork`, `/peers`, `/tasks` |
|
|
149
154
|
| Manage extensions | `/skills`, `/plugin`, `/mcp`, `/channels` |
|
|
150
|
-
| Manage permissions | `/permissions`, `/sandbox`, `/
|
|
155
|
+
| Manage permissions | `/permissions`, `/sandbox`, `/add-dir` |
|
|
151
156
|
|
|
152
157
|
See the [Command Reference](docs/commands.md) for the complete slash-command catalog.
|
|
153
158
|
|
|
@@ -342,7 +347,7 @@ uv run pytest -v -k "test_name"
|
|
|
342
347
|
- OAuth tokens and cached provider model lists are stored under `~/.koder/tokens/`.
|
|
343
348
|
- Sessions, transcripts, memories, tasks, agents, and teams are stored locally under `~/.koder/` and project `.koder/` paths.
|
|
344
349
|
- Koder does not upload sessions to a Koder-hosted service. Model requests still go to the provider you configure.
|
|
345
|
-
- Shell, file, MCP, and teammate operations are mediated by local permission and sandbox policy.
|
|
350
|
+
- Shell, file, MCP, and teammate operations are mediated by local permission and sandbox policy. Foreground shell commands can use a real sandbox backend when `/sandbox status` reports that backend as available.
|
|
346
351
|
|
|
347
352
|
Use these commands to inspect boundaries:
|
|
348
353
|
|
|
@@ -355,7 +360,7 @@ Use these commands to inspect boundaries:
|
|
|
355
360
|
/context
|
|
356
361
|
```
|
|
357
362
|
|
|
358
|
-
See [Permissions and Privacy](docs/permissions-and-privacy.md) for details.
|
|
363
|
+
See [Sandbox Guide](docs/sandbox.md) and [Permissions and Privacy](docs/permissions-and-privacy.md) for details.
|
|
359
364
|
|
|
360
365
|
## Documentation
|
|
361
366
|
|
|
@@ -368,6 +373,7 @@ See [Permissions and Privacy](docs/permissions-and-privacy.md) for details.
|
|
|
368
373
|
- [Workflows](docs/workflows.md) - review, planning, Git, GitHub, release, and verification workflows
|
|
369
374
|
- [Skills, Plugins, and MCP](docs/extensions.md) - extending Koder with skills, plugins, MCP servers, channels, and Magic Docs
|
|
370
375
|
- [Permissions and Privacy](docs/permissions-and-privacy.md) - approvals, sandbox policy, managed settings, workspace roots, and data boundaries
|
|
376
|
+
- [Sandbox Guide](docs/sandbox.md) - shell sandbox backends, status fields, configuration, and troubleshooting
|
|
371
377
|
- [Voice Mode](docs/voice-mode.md) - voice dictation setup and provider-specific notes
|
|
372
378
|
- [Command Reference](docs/commands.md) - complete slash-command catalog
|
|
373
379
|
|
|
@@ -106,7 +106,7 @@ Good first commands inside the TUI:
|
|
|
106
106
|
| Check usage and cost | `/usage`, `/cost` |
|
|
107
107
|
| Manage agents and teams | `/agents`, `/fork`, `/peers`, `/tasks` |
|
|
108
108
|
| Manage extensions | `/skills`, `/plugin`, `/mcp`, `/channels` |
|
|
109
|
-
| Manage permissions | `/permissions`, `/sandbox`, `/
|
|
109
|
+
| Manage permissions | `/permissions`, `/sandbox`, `/add-dir` |
|
|
110
110
|
|
|
111
111
|
See the [Command Reference](docs/commands.md) for the complete slash-command catalog.
|
|
112
112
|
|
|
@@ -301,7 +301,7 @@ uv run pytest -v -k "test_name"
|
|
|
301
301
|
- OAuth tokens and cached provider model lists are stored under `~/.koder/tokens/`.
|
|
302
302
|
- Sessions, transcripts, memories, tasks, agents, and teams are stored locally under `~/.koder/` and project `.koder/` paths.
|
|
303
303
|
- Koder does not upload sessions to a Koder-hosted service. Model requests still go to the provider you configure.
|
|
304
|
-
- Shell, file, MCP, and teammate operations are mediated by local permission and sandbox policy.
|
|
304
|
+
- Shell, file, MCP, and teammate operations are mediated by local permission and sandbox policy. Foreground shell commands can use a real sandbox backend when `/sandbox status` reports that backend as available.
|
|
305
305
|
|
|
306
306
|
Use these commands to inspect boundaries:
|
|
307
307
|
|
|
@@ -314,7 +314,7 @@ Use these commands to inspect boundaries:
|
|
|
314
314
|
/context
|
|
315
315
|
```
|
|
316
316
|
|
|
317
|
-
See [Permissions and Privacy](docs/permissions-and-privacy.md) for details.
|
|
317
|
+
See [Sandbox Guide](docs/sandbox.md) and [Permissions and Privacy](docs/permissions-and-privacy.md) for details.
|
|
318
318
|
|
|
319
319
|
## Documentation
|
|
320
320
|
|
|
@@ -327,6 +327,7 @@ See [Permissions and Privacy](docs/permissions-and-privacy.md) for details.
|
|
|
327
327
|
- [Workflows](docs/workflows.md) - review, planning, Git, GitHub, release, and verification workflows
|
|
328
328
|
- [Skills, Plugins, and MCP](docs/extensions.md) - extending Koder with skills, plugins, MCP servers, channels, and Magic Docs
|
|
329
329
|
- [Permissions and Privacy](docs/permissions-and-privacy.md) - approvals, sandbox policy, managed settings, workspace roots, and data boundaries
|
|
330
|
+
- [Sandbox Guide](docs/sandbox.md) - shell sandbox backends, status fields, configuration, and troubleshooting
|
|
330
331
|
- [Voice Mode](docs/voice-mode.md) - voice dictation setup and provider-specific notes
|
|
331
332
|
- [Command Reference](docs/commands.md) - complete slash-command catalog
|
|
332
333
|
|
|
@@ -281,8 +281,10 @@ class InteractivePrompt:
|
|
|
281
281
|
self._config_service = config_service or RuntimeConfigService()
|
|
282
282
|
self._voice_controller = VoiceDictationController(
|
|
283
283
|
config_getter=self._config_service.load,
|
|
284
|
-
model_provider_getter=lambda: (
|
|
285
|
-
|
|
284
|
+
model_provider_getter=lambda: (
|
|
285
|
+
(get_config().model.provider or "").strip().lower()
|
|
286
|
+
or get_model_name().replace("litellm/", "").split("/", 1)[0]
|
|
287
|
+
),
|
|
286
288
|
)
|
|
287
289
|
self._last_space_pressed_at: Optional[float] = None
|
|
288
290
|
self.history = InMemoryHistory()
|
|
@@ -752,8 +754,10 @@ class InteractivePrompt:
|
|
|
752
754
|
return 80, 24
|
|
753
755
|
|
|
754
756
|
show_status_line = Condition(
|
|
755
|
-
lambda:
|
|
756
|
-
|
|
757
|
+
lambda: (
|
|
758
|
+
self.status_line is not None
|
|
759
|
+
and _should_show_status_line(rows=_get_terminal_size()[1])
|
|
760
|
+
)
|
|
757
761
|
)
|
|
758
762
|
show_completion_menu = Condition(
|
|
759
763
|
lambda: (
|
|
@@ -347,9 +347,12 @@ class StatusLine:
|
|
|
347
347
|
fragments.extend(pr_fragments)
|
|
348
348
|
|
|
349
349
|
if self._notice:
|
|
350
|
-
|
|
351
|
-
self._notice
|
|
352
|
-
|
|
350
|
+
if self._notice.startswith("Voice error:"):
|
|
351
|
+
notice = self._notice
|
|
352
|
+
else:
|
|
353
|
+
notice = self._truncate(
|
|
354
|
+
self._notice, max(10, columns - sum(len(t) for _, t in fragments) - 12)
|
|
355
|
+
)
|
|
353
356
|
if notice:
|
|
354
357
|
self._append_field(fragments, "Notice: ", notice)
|
|
355
358
|
|
|
@@ -25,8 +25,7 @@ RUNTIME_COMMAND_SPECS = {
|
|
|
25
25
|
"pr_comments": {"help_text": "Render GitHub PR comments for the current branch"},
|
|
26
26
|
"privacy-settings": {"help_text": "Show local privacy and data-storage settings"},
|
|
27
27
|
"release-notes": {"help_text": "Show recent Koder release notes or commits"},
|
|
28
|
-
"sandbox": {"help_text": "Inspect sandbox settings"},
|
|
29
|
-
"sandbox-toggle": {"help_text": "Toggle local sandbox policy settings"},
|
|
28
|
+
"sandbox": {"help_text": "Inspect and configure sandbox settings"},
|
|
30
29
|
"schedule": {"help_text": "Inspect scheduled task registry"},
|
|
31
30
|
"security-review": {"help_text": "Run a security-focused review of pending changes"},
|
|
32
31
|
"share": {"help_text": "Show share metadata for the active session"},
|
|
@@ -439,7 +439,6 @@ class HarnessInteractiveCommandHandler:
|
|
|
439
439
|
"teleport": self._execute_teleport,
|
|
440
440
|
"voice": self._execute_voice,
|
|
441
441
|
"ctx_viz": self._execute_ctx_viz,
|
|
442
|
-
"sandbox-toggle": self._execute_sandbox_toggle,
|
|
443
442
|
"security-review": self._execute_security_review,
|
|
444
443
|
"summary": self._execute_summary,
|
|
445
444
|
"onboarding": self._execute_onboarding,
|
|
@@ -4324,20 +4323,118 @@ Be specific — reference file names and line numbers. Prioritize issues by seve
|
|
|
4324
4323
|
return "\n".join(lines)
|
|
4325
4324
|
|
|
4326
4325
|
async def _execute_sandbox(self, _scheduler, _args: list[str]) -> str:
|
|
4327
|
-
"""Show sandbox
|
|
4326
|
+
"""Show and update sandbox settings."""
|
|
4328
4327
|
from pathlib import Path
|
|
4329
4328
|
|
|
4330
|
-
from koder_agent.harness.
|
|
4329
|
+
from koder_agent.harness.sandbox.registry import BACKEND_IDS, normalize_backend_id
|
|
4331
4330
|
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4331
|
+
cwd = Path.cwd()
|
|
4332
|
+
|
|
4333
|
+
def _render_backend_choices(prefix: str | None = None) -> str:
|
|
4334
|
+
state = resolve_sandbox_settings(cwd)
|
|
4335
|
+
lines: list[str] = []
|
|
4336
|
+
if prefix:
|
|
4337
|
+
lines.append(prefix)
|
|
4338
|
+
lines.append("Available sandbox backends:")
|
|
4339
|
+
for status in state.backend_statuses:
|
|
4340
|
+
marker = "*" if status.backend_id == state.backend else "-"
|
|
4341
|
+
availability = "available" if status.available else "unavailable"
|
|
4342
|
+
lines.append(f" {marker} {status.backend_id}: {availability} ({status.reason})")
|
|
4343
|
+
lines.append("Usage: /sandbox enable <backend>")
|
|
4344
|
+
lines.append("Example: /sandbox enable unix-local")
|
|
4345
|
+
return "\n".join(lines)
|
|
4346
|
+
|
|
4347
|
+
def _render_status(prefix: str | None = None) -> str:
|
|
4348
|
+
state = resolve_sandbox_settings(cwd)
|
|
4349
|
+
lines: list[str] = []
|
|
4350
|
+
if prefix:
|
|
4351
|
+
lines.append(prefix)
|
|
4352
|
+
lines.extend(
|
|
4353
|
+
[
|
|
4354
|
+
f"sandbox_enabled: {str(state.enabled).lower()}",
|
|
4355
|
+
f"backend: {state.backend}",
|
|
4356
|
+
f"backend_available: {str(state.backend_available).lower()}",
|
|
4357
|
+
f"backend_reason: {state.backend_reason}",
|
|
4358
|
+
f"mode: {state.policy_mode}",
|
|
4359
|
+
f"auto_allow_bash_if_sandboxed: {str(state.auto_allow_bash_if_sandboxed).lower()}",
|
|
4360
|
+
f"network_access: {str(state.network_access).lower()}",
|
|
4361
|
+
"allowed_domains: "
|
|
4362
|
+
+ (", ".join(state.allowed_domains) if state.allowed_domains else "none"),
|
|
4363
|
+
"denied_domains: "
|
|
4364
|
+
+ (", ".join(state.denied_domains) if state.denied_domains else "none"),
|
|
4365
|
+
"protected_paths: "
|
|
4366
|
+
+ (", ".join(state.protected_paths) if state.protected_paths else "none"),
|
|
4367
|
+
f"excluded_commands: {len(state.excluded_commands)}",
|
|
4368
|
+
f"policy_locked: {str(state.policy_locked).lower()}",
|
|
4369
|
+
f"settings_path: {state.settings_path}",
|
|
4370
|
+
"backend_options: " + ", ".join(BACKEND_IDS),
|
|
4371
|
+
]
|
|
4372
|
+
)
|
|
4373
|
+
if state.enabled and state.backend_available and state.platform_enabled:
|
|
4374
|
+
lines.append(
|
|
4375
|
+
f"note: foreground shell commands use sandbox backend {state.backend}."
|
|
4376
|
+
)
|
|
4377
|
+
elif state.enabled:
|
|
4378
|
+
lines.append(
|
|
4379
|
+
"note: sandbox is enabled, but the configured backend is unavailable; "
|
|
4380
|
+
"non-excluded foreground shell commands are denied."
|
|
4381
|
+
)
|
|
4382
|
+
else:
|
|
4383
|
+
lines.append(
|
|
4384
|
+
"note: sandbox disabled; shell commands use the normal local executor."
|
|
4385
|
+
)
|
|
4386
|
+
return "\n".join(lines)
|
|
4387
|
+
|
|
4388
|
+
if not _args or _args[0].lower() == "status":
|
|
4389
|
+
return _render_status()
|
|
4390
|
+
|
|
4391
|
+
subcommand = _args[0].lower()
|
|
4392
|
+
state = resolve_sandbox_settings(cwd)
|
|
4393
|
+
if subcommand in {"backends", "list"}:
|
|
4394
|
+
return _render_backend_choices()
|
|
4395
|
+
|
|
4396
|
+
if state.policy_locked and subcommand in {"enable", "disable", "off", "exclude"}:
|
|
4397
|
+
return _render_status("sandbox: settings locked by managed policy")
|
|
4398
|
+
|
|
4399
|
+
if subcommand == "enable":
|
|
4400
|
+
if len(_args) < 2:
|
|
4401
|
+
return _render_backend_choices("sandbox: choose a backend")
|
|
4402
|
+
backend = normalize_backend_id(_args[1])
|
|
4403
|
+
if backend not in BACKEND_IDS:
|
|
4404
|
+
return _render_backend_choices(f"sandbox: unknown backend {backend}")
|
|
4405
|
+
update_local_sandbox_settings(
|
|
4406
|
+
cwd,
|
|
4407
|
+
enabled=True,
|
|
4408
|
+
backend=backend,
|
|
4409
|
+
)
|
|
4410
|
+
return _render_status("sandbox: enabled")
|
|
4411
|
+
|
|
4412
|
+
if subcommand in {"disable", "off"}:
|
|
4413
|
+
update_local_sandbox_settings(cwd, enabled=False)
|
|
4414
|
+
return _render_status("sandbox: disabled")
|
|
4415
|
+
|
|
4416
|
+
if subcommand == "exclude":
|
|
4417
|
+
command_pattern = " ".join(_args[1:]).strip()
|
|
4418
|
+
if not command_pattern:
|
|
4419
|
+
return 'Usage: /sandbox exclude "command pattern"'
|
|
4420
|
+
if (
|
|
4421
|
+
len(command_pattern) >= 2
|
|
4422
|
+
and command_pattern[0] == command_pattern[-1]
|
|
4423
|
+
and command_pattern[0] in {'"', "'"}
|
|
4424
|
+
):
|
|
4425
|
+
command_pattern = command_pattern[1:-1]
|
|
4426
|
+
target, normalized = add_excluded_command(cwd, command_pattern)
|
|
4427
|
+
state = resolve_sandbox_settings(cwd)
|
|
4428
|
+
return (
|
|
4429
|
+
"sandbox: excluded command added\n"
|
|
4430
|
+
f"pattern: {normalized}\n"
|
|
4431
|
+
f"excluded_commands: {len(state.excluded_commands)}\n"
|
|
4432
|
+
f"settings_path: {target}"
|
|
4433
|
+
)
|
|
4434
|
+
|
|
4435
|
+
return (
|
|
4436
|
+
'Usage: /sandbox [status|backends|enable <backend>|disable|exclude "command pattern"]'
|
|
4437
|
+
)
|
|
4341
4438
|
|
|
4342
4439
|
async def _execute_schedule(self, _scheduler, _args: list[str]) -> str:
|
|
4343
4440
|
"""Show/manage cron tasks."""
|
|
@@ -5055,99 +5152,6 @@ Be specific — reference file names and line numbers. Prioritize issues by seve
|
|
|
5055
5152
|
|
|
5056
5153
|
return "\n\n".join(section for section in sections if section).strip()
|
|
5057
5154
|
|
|
5058
|
-
async def _execute_sandbox_toggle(self, _scheduler, _args: list[str]) -> str:
|
|
5059
|
-
cwd = Path.cwd()
|
|
5060
|
-
state = resolve_sandbox_settings(cwd)
|
|
5061
|
-
|
|
5062
|
-
def _render_status(prefix: str | None = None) -> str:
|
|
5063
|
-
lines: list[str] = []
|
|
5064
|
-
if prefix:
|
|
5065
|
-
lines.append(prefix)
|
|
5066
|
-
lines.extend(
|
|
5067
|
-
[
|
|
5068
|
-
f"sandbox_enabled: {str(state.enabled).lower()}",
|
|
5069
|
-
f"execution_mode: {state.execution_mode}",
|
|
5070
|
-
f"allow_unsandboxed_commands: {str(state.allow_unsandboxed_commands).lower()}",
|
|
5071
|
-
(
|
|
5072
|
-
"auto_allow_bash_if_sandboxed: "
|
|
5073
|
-
f"{str(state.auto_allow_bash_if_sandboxed).lower()}"
|
|
5074
|
-
),
|
|
5075
|
-
f"excluded_commands: {len(state.excluded_commands)}",
|
|
5076
|
-
f"platform: {state.platform}",
|
|
5077
|
-
f"platform_supported: {str(state.platform_supported).lower()}",
|
|
5078
|
-
f"platform_enabled: {str(state.platform_enabled).lower()}",
|
|
5079
|
-
f"policy_locked: {str(state.policy_locked).lower()}",
|
|
5080
|
-
(
|
|
5081
|
-
"dependency_errors: "
|
|
5082
|
-
+ (
|
|
5083
|
-
", ".join(state.dependency_errors)
|
|
5084
|
-
if state.dependency_errors
|
|
5085
|
-
else "none"
|
|
5086
|
-
)
|
|
5087
|
-
),
|
|
5088
|
-
f"settings_path: {state.settings_path}",
|
|
5089
|
-
(
|
|
5090
|
-
"note: koder does not provide an OS-level sandbox executor; "
|
|
5091
|
-
"strict mode blocks non-excluded model shell commands."
|
|
5092
|
-
),
|
|
5093
|
-
]
|
|
5094
|
-
)
|
|
5095
|
-
return "\n".join(lines)
|
|
5096
|
-
|
|
5097
|
-
if not _args or (_args and _args[0].lower() == "status"):
|
|
5098
|
-
return _render_status()
|
|
5099
|
-
|
|
5100
|
-
subcommand = _args[0].lower()
|
|
5101
|
-
if state.policy_locked:
|
|
5102
|
-
return _render_status("sandbox-toggle: settings locked by managed policy")
|
|
5103
|
-
|
|
5104
|
-
if subcommand == "strict":
|
|
5105
|
-
update_local_sandbox_settings(
|
|
5106
|
-
cwd,
|
|
5107
|
-
enabled=True,
|
|
5108
|
-
allow_unsandboxed_commands=False,
|
|
5109
|
-
)
|
|
5110
|
-
state = resolve_sandbox_settings(cwd)
|
|
5111
|
-
return _render_status("sandbox-toggle: strict mode enabled")
|
|
5112
|
-
|
|
5113
|
-
if subcommand in {"fallback", "enable"}:
|
|
5114
|
-
update_local_sandbox_settings(
|
|
5115
|
-
cwd,
|
|
5116
|
-
enabled=True,
|
|
5117
|
-
allow_unsandboxed_commands=True,
|
|
5118
|
-
)
|
|
5119
|
-
state = resolve_sandbox_settings(cwd)
|
|
5120
|
-
return _render_status("sandbox-toggle: fallback mode enabled")
|
|
5121
|
-
|
|
5122
|
-
if subcommand in {"disable", "off"}:
|
|
5123
|
-
update_local_sandbox_settings(
|
|
5124
|
-
cwd,
|
|
5125
|
-
enabled=False,
|
|
5126
|
-
)
|
|
5127
|
-
state = resolve_sandbox_settings(cwd)
|
|
5128
|
-
return _render_status("sandbox-toggle: disabled")
|
|
5129
|
-
|
|
5130
|
-
if subcommand == "exclude":
|
|
5131
|
-
command_pattern = " ".join(_args[1:]).strip()
|
|
5132
|
-
if not command_pattern:
|
|
5133
|
-
return 'Usage: /sandbox-toggle exclude "command pattern"'
|
|
5134
|
-
if (
|
|
5135
|
-
len(command_pattern) >= 2
|
|
5136
|
-
and command_pattern[0] == command_pattern[-1]
|
|
5137
|
-
and command_pattern[0] in {'"', "'"}
|
|
5138
|
-
):
|
|
5139
|
-
command_pattern = command_pattern[1:-1]
|
|
5140
|
-
target, normalized = add_excluded_command(cwd, command_pattern)
|
|
5141
|
-
state = resolve_sandbox_settings(cwd)
|
|
5142
|
-
return (
|
|
5143
|
-
"sandbox-toggle: excluded command added\n"
|
|
5144
|
-
f"pattern: {normalized}\n"
|
|
5145
|
-
f"excluded_commands: {len(state.excluded_commands)}\n"
|
|
5146
|
-
f"settings_path: {target}"
|
|
5147
|
-
)
|
|
5148
|
-
|
|
5149
|
-
return 'Usage: /sandbox-toggle [status|strict|fallback|disable|exclude "command pattern"]'
|
|
5150
|
-
|
|
5151
5155
|
async def _execute_security_review(self, _scheduler, _args: list[str]) -> str:
|
|
5152
5156
|
return await run_security_review(cwd=Path.cwd())
|
|
5153
5157
|
|
|
@@ -86,8 +86,16 @@ def render_managed_settings_status(path: Path | None = None) -> str:
|
|
|
86
86
|
key in sandbox
|
|
87
87
|
for key in (
|
|
88
88
|
"enabled",
|
|
89
|
+
"mode",
|
|
90
|
+
"backend",
|
|
91
|
+
"networkAccess",
|
|
92
|
+
"writableRoots",
|
|
93
|
+
"allowRead",
|
|
94
|
+
"denyRead",
|
|
95
|
+
"allowWrite",
|
|
96
|
+
"denyWrite",
|
|
97
|
+
"protectedPaths",
|
|
89
98
|
"autoAllowBashIfSandboxed",
|
|
90
|
-
"allowUnsandboxedCommands",
|
|
91
99
|
)
|
|
92
100
|
)
|
|
93
101
|
)
|
|
@@ -7,6 +7,7 @@ from dataclasses import dataclass, field
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from typing import TYPE_CHECKING
|
|
9
9
|
|
|
10
|
+
from ..sandbox.workspace import protected_write_violation, read_only_violation
|
|
10
11
|
from ..sandbox_settings import is_excluded_command, resolve_sandbox_settings
|
|
11
12
|
from .denial_log import DenialLog
|
|
12
13
|
from .modes import PermissionMode
|
|
@@ -301,11 +302,16 @@ class PermissionService:
|
|
|
301
302
|
)
|
|
302
303
|
current_cwd = Path.cwd()
|
|
303
304
|
state = resolve_sandbox_settings(current_cwd)
|
|
304
|
-
|
|
305
|
-
|
|
305
|
+
excluded_from_sandbox = is_excluded_command(command, cwd=current_cwd)
|
|
306
|
+
decision = (
|
|
307
|
+
classify_powershell_command(command)
|
|
308
|
+
if tool_name == "run_powershell"
|
|
309
|
+
else classify_shell_command(command)
|
|
310
|
+
)
|
|
311
|
+
if state.enabled and not excluded_from_sandbox:
|
|
312
|
+
if tool_name == "run_powershell":
|
|
306
313
|
reason = (
|
|
307
|
-
"
|
|
308
|
-
"model shell commands; allow unsandboxed fallback or add an excluded command"
|
|
314
|
+
"sandbox is enabled, but PowerShell sandbox execution is not implemented"
|
|
309
315
|
)
|
|
310
316
|
self.denial_log.record(tool_name, reason)
|
|
311
317
|
return PermissionEvaluationResult.deny(
|
|
@@ -313,11 +319,56 @@ class PermissionService:
|
|
|
313
319
|
reason=reason,
|
|
314
320
|
mode=self.mode,
|
|
315
321
|
)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
322
|
+
if bool(arguments.get("run_in_background")):
|
|
323
|
+
reason = (
|
|
324
|
+
"sandbox is enabled, but background sandbox execution is not implemented "
|
|
325
|
+
"for model shell commands"
|
|
326
|
+
)
|
|
327
|
+
self.denial_log.record(tool_name, reason)
|
|
328
|
+
return PermissionEvaluationResult.deny(
|
|
329
|
+
tool_name=tool_name,
|
|
330
|
+
reason=reason,
|
|
331
|
+
mode=self.mode,
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
if not state.backend_available or not state.platform_enabled:
|
|
335
|
+
reason = (
|
|
336
|
+
"sandbox is enabled, but the configured backend is unavailable; "
|
|
337
|
+
f"backend={state.backend}; reason={state.backend_reason}"
|
|
338
|
+
)
|
|
339
|
+
self.denial_log.record(tool_name, reason)
|
|
340
|
+
return PermissionEvaluationResult.deny(
|
|
341
|
+
tool_name=tool_name,
|
|
342
|
+
reason=reason,
|
|
343
|
+
mode=self.mode,
|
|
344
|
+
)
|
|
345
|
+
elif tool_name == "run_shell" and state.policy is not None:
|
|
346
|
+
violation = read_only_violation(command, policy=state.policy)
|
|
347
|
+
if violation is None:
|
|
348
|
+
violation = protected_write_violation(
|
|
349
|
+
command,
|
|
350
|
+
policy=state.policy,
|
|
351
|
+
repo_root=current_cwd,
|
|
352
|
+
)
|
|
353
|
+
if violation is not None:
|
|
354
|
+
self.denial_log.record(tool_name, violation)
|
|
355
|
+
return PermissionEvaluationResult.deny(
|
|
356
|
+
tool_name=tool_name,
|
|
357
|
+
reason=violation,
|
|
358
|
+
mode=self.mode,
|
|
359
|
+
)
|
|
360
|
+
if (
|
|
361
|
+
decision.requires_approval
|
|
362
|
+
and state.auto_allow_bash_if_sandboxed
|
|
363
|
+
and state.backend_available
|
|
364
|
+
):
|
|
365
|
+
return PermissionEvaluationResult.allow(
|
|
366
|
+
tool_name=tool_name,
|
|
367
|
+
mode=self.mode,
|
|
368
|
+
reason=(
|
|
369
|
+
f"sandboxed shell command auto-allowed; backend={state.backend}"
|
|
370
|
+
),
|
|
371
|
+
)
|
|
321
372
|
if not decision.allowed:
|
|
322
373
|
self.denial_log.record(tool_name, decision.reason)
|
|
323
374
|
return PermissionEvaluationResult.deny(
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Sandbox policy, backend registry, and execution helpers for Koder."""
|
|
2
|
+
|
|
3
|
+
from .backend import (
|
|
4
|
+
SandboxBackendStatus,
|
|
5
|
+
SandboxExecutionContext,
|
|
6
|
+
SandboxExecutionResult,
|
|
7
|
+
)
|
|
8
|
+
from .policy import SandboxPolicy
|
|
9
|
+
from .registry import BACKEND_IDS, DEFAULT_BACKEND_ID, get_backend_statuses
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"BACKEND_IDS",
|
|
13
|
+
"DEFAULT_BACKEND_ID",
|
|
14
|
+
"SandboxBackendStatus",
|
|
15
|
+
"SandboxExecutionContext",
|
|
16
|
+
"SandboxExecutionResult",
|
|
17
|
+
"SandboxPolicy",
|
|
18
|
+
"get_backend_statuses",
|
|
19
|
+
]
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""Shared sandbox backend data types."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass, field
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass(frozen=True)
|
|
10
|
+
class SandboxBackendCapabilities:
|
|
11
|
+
"""Capability summary for one sandbox backend."""
|
|
12
|
+
|
|
13
|
+
supports_shell: bool = True
|
|
14
|
+
supports_filesystem: bool = True
|
|
15
|
+
supports_pty: str = "unknown"
|
|
16
|
+
supports_background: bool = False
|
|
17
|
+
supports_network_policy: str = "unknown"
|
|
18
|
+
supports_protected_paths: str = "unknown"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass(frozen=True)
|
|
22
|
+
class SandboxBackendStatus:
|
|
23
|
+
"""Availability record for one configured sandbox backend."""
|
|
24
|
+
|
|
25
|
+
backend_id: str
|
|
26
|
+
selected: bool = False
|
|
27
|
+
available: bool = False
|
|
28
|
+
reason: str = "not checked"
|
|
29
|
+
dependency_errors: tuple[str, ...] = ()
|
|
30
|
+
credential_errors: tuple[str, ...] = ()
|
|
31
|
+
capabilities: SandboxBackendCapabilities = field(default_factory=SandboxBackendCapabilities)
|
|
32
|
+
validation_tier: str = "mocked-unit"
|
|
33
|
+
setup_hint: str | None = None
|
|
34
|
+
last_smoke: str | None = None
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def unavailable_reasons(self) -> tuple[str, ...]:
|
|
38
|
+
reasons = [*self.dependency_errors, *self.credential_errors]
|
|
39
|
+
if not reasons and not self.available and self.reason:
|
|
40
|
+
reasons.append(self.reason)
|
|
41
|
+
return tuple(reasons)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass(frozen=True)
|
|
45
|
+
class SandboxExecutionContext:
|
|
46
|
+
"""Runtime inputs for a sandboxed shell execution request."""
|
|
47
|
+
|
|
48
|
+
cwd: Path
|
|
49
|
+
repo_root: Path
|
|
50
|
+
command: str
|
|
51
|
+
env: dict[str, str]
|
|
52
|
+
timeout: int
|
|
53
|
+
background: bool
|
|
54
|
+
session_id: str | None
|
|
55
|
+
policy: object
|
|
56
|
+
output_limit: int | None = None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@dataclass(frozen=True)
|
|
60
|
+
class SandboxExecutionResult:
|
|
61
|
+
"""Result returned by a sandbox backend adapter."""
|
|
62
|
+
|
|
63
|
+
status: str
|
|
64
|
+
stdout: str = ""
|
|
65
|
+
stderr: str = ""
|
|
66
|
+
exit_code: int | None = None
|
|
67
|
+
backend_id: str | None = None
|
|
68
|
+
sandboxed: bool = False
|
|
69
|
+
violation: str | None = None
|
|
70
|
+
reason: str | None = None
|
|
71
|
+
|
|
72
|
+
def combined_output(self) -> str:
|
|
73
|
+
output = self.stdout.strip()
|
|
74
|
+
stderr = self.stderr.strip()
|
|
75
|
+
if stderr:
|
|
76
|
+
output = f"{output}\n[stderr]: {stderr}" if output else f"[stderr]: {stderr}"
|
|
77
|
+
if self.exit_code not in (None, 0):
|
|
78
|
+
output = (
|
|
79
|
+
f"{output}\n[exit code]: {self.exit_code}"
|
|
80
|
+
if output
|
|
81
|
+
else f"[exit code]: {self.exit_code}"
|
|
82
|
+
)
|
|
83
|
+
if self.violation:
|
|
84
|
+
output = f"sandbox violation: {self.violation}" + (f"\n{output}" if output else "")
|
|
85
|
+
if not output:
|
|
86
|
+
output = "(no output)"
|
|
87
|
+
return output
|