Skip to content

feat(agent): add PowerShell command interface - #6238

Open
Avallix wants to merge 1 commit into
odysseus-dev:devfrom
Avallix:codex/powershell-command-interface
Open

feat(agent): add PowerShell command interface#6238
Avallix wants to merge 1 commit into
odysseus-dev:devfrom
Avallix:codex/powershell-command-interface

Conversation

@Avallix

@Avallix Avallix commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Adds PowerShell as a first-class command interface so Windows users can run PowerShell commands through the agent tool loop instead of having PowerShell requests route as unavailable shell/tool actions. The change adds the executor, parser/schema wiring, routing and permission gates, UI labels, and regression coverage for the new tool path.

Target branch

  • This PR targets dev, not main. All PRs land in dev; main is curated by the maintainer at each release. If your PR is on main by accident, click "Edit" on this PR and change the base.

Linked Issue

Fixes #6237

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.
  • I did not run the app/runtime validation and stated that gap in How to Test. Leave this unchecked when the app-run box above is checked.

How to Test

  1. Start the app from a clean temporary local data directory with auth disabled for validation:

    $env:AUTH_ENABLED='false'
    $env:ODYSSEUS_DATA_DIR = Join-Path $env:TEMP 'odysseus-pr-6238-data'
    $env:APP_PORT='7701'
    .\venv\Scripts\python.exe -m uvicorn app:app --host 127.0.0.1 --port 7701

    The app started successfully at http://127.0.0.1:7701/. ChromaDB-backed RAG/memory reported degraded because ChromaDB was not running locally; the app remained usable and that service is unrelated to this PowerShell command-interface change.

  2. Open Settings → Agent Tools, expand the Code section, and verify PowerShell appears with the description Execute PowerShell commands.

  3. Run the focused validation used for this branch:

    .\venv\Scripts\python.exe -m py_compile routes\chat_routes.py src\action_intents.py src\agent_loop.py src\agent_tools\__init__.py src\agent_tools\admin_tools.py src\agent_tools\subprocess_tools.py src\task_scheduler.py src\tool_capabilities.py src\tool_index.py src\tool_parsing.py src\tool_policy.py src\tool_schemas.py src\tool_security.py
    .\venv\Scripts\python.exe -m pytest tests\test_action_intents.py tests\test_action_intents_shell_verbs.py tests\test_fenced_inline_args.py tests\test_function_call_non_object_args.py tests\test_live_strip_email_tool_fences.py tests\test_external_context_tool_gate.py tests\test_task_shell_tools.py tests\test_chat_route_tool_policy.py

    Result from the local run: 235 passed, 1 warning.

  4. Run the manual PowerShell smoke checks:

    Get-Command i | Select-Object -ExpandProperty Source

    The direct tool smoke resolved i.exe, and the dispatcher smoke returned dispatcher-ok with exit code 0.

Visual / UI changes — REQUIRED if you touched anything that renders

Anything that changes what the UI looks like — buttons, icons, padding, colors, fonts, spacing, layout, CSS, HTML, SVG, or any static/js module that draws to the DOM — needs all of the following. PRs that change rendering without these WILL be closed.

  • Screenshot or short clip of the change in the running app, attached below. Mobile screenshot too if the change affects mobile.
  • Style match: the change uses Odysseus's existing visual language. Specifically:
    • Reuse existing CSS variables (--red, --fg, --bg, --card, --border, etc.) — do not introduce new color values, font sizes, or spacing units.
    • Reuse existing button/input/card/border classes. Don't invent parallel styling.
    • No Unicode emoji in UI or code. Use inline SVG (matching the monochrome icon style already in static/index.html) or plain text.
    • Monospaced font (Fira Code) for primary UI text. Don't override.
    • Dark theme is the default; any light-mode work must be wired through the existing theme system, not hard-coded.
  • No new component patterns. If a similar widget already exists in the app, extend it instead of writing a parallel one.
  • I am not an LLM agent submitting a bulk PR. This PR was prepared with an agent, and issue Add PowerShell as a native command interface #6237 was opened first as requested by the contribution guide.

Screenshots / clips

PowerShell visible in Settings Agent Tools

Add a native PowerShell executor, schema and parser wiring, routing and permission gates, UI metadata, and regression tests.
@github-actions github-actions Bot added needs work PR description incomplete — please update before review needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap needs visual evidence UI-sensitive change without an attested screenshot or clip from the running app ready for review Description complete — ready for maintainer review and removed needs work PR description incomplete — please update before review needs runtime validation Runtime validation not attested — tick the app-run box after running it, or state the gap needs visual evidence UI-sensitive change without an attested screenshot or clip from the running app labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PowerShell as a native command interface

1 participant