diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..98bb81f9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + smoke: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - run: python -m py_compile agent_loop.py agentmain.py ga.py llmcore.py simphtml.py TMWebDriver.py diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..ad40ccfd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,22 @@ +# Repository Agent Instructions + +## Scope + +- Follow `README.md`, `GETTING_STARTED.md`, and the existing Python entry points before adding new abstractions. +- Treat `mykey.py` and any local credential files as private local state; never print or commit real keys. +- Do not commit secrets, tokens, cookies, generated credentials, browser profiles, private logs, or local machine paths. + +## Commands + +- Launch app: `python launch.pyw`. +- CLI/helper entry: use `Start-GenericAgent-CLI.ps1` when the task is about the local CLI wrapper. +- Install dependencies only after checking the README and existing environment notes. + +## Verification + +For Python changes, run the narrowest import, smoke, or entry-point check that does not require real credentials or account actions. For docs-only changes, inspect the touched Markdown and referenced paths. + +## Git + +- Preserve unrelated dirty changes. +- Do not rewrite history, delete branches, push, publish, or open PRs without explicit confirmation. diff --git a/Start-GenericAgent-CLI.ps1 b/Start-GenericAgent-CLI.ps1 new file mode 100644 index 00000000..735e11e5 --- /dev/null +++ b/Start-GenericAgent-CLI.ps1 @@ -0,0 +1,20 @@ +$ErrorActionPreference = "Stop" + +$repo = "E:\codemain\github\GenericAgent" +$python = Join-Path $repo ".venv\Scripts\python.exe" + +if (-not (Test-Path -LiteralPath $python)) { + throw "GenericAgent venv not found. Expected: $python" +} + +if (-not $env:OPENROUTER_API_KEY) { + throw "OPENROUTER_API_KEY is not set. GenericAgent needs a model API key before it can run." +} + +Push-Location $repo +try { + & $python agentmain.py +} +finally { + Pop-Location +}