{"_id":"@9matesu/autotask","_rev":"2-cff58f0694fc4e05fb0b199e512528c5","name":"@9matesu/autotask","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@9matesu/autotask","version":"0.1.0","keywords":["ai-coding","autonomous-agent","queue","supervisor","orchestrator","terminal","tui","opencode","task-runner"],"author":{"name":"Autotask Contributors"},"license":"MIT","_id":"@9matesu/autotask@0.1.0","maintainers":[{"name":"9matesu","email":"mcos.mateus@gmail.com"}],"homepage":"https://github.com/9matesu/autotask#readme","bugs":{"url":"https://github.com/9matesu/autotask/issues"},"bin":{"ocq":"dist/cli.js","autotask":"dist/cli.js"},"dist":{"shasum":"90ad8fe8043447b85b7d9cd772102f2862c740e4","tarball":"https://registry.npmjs.org/@9matesu/autotask/-/autotask-0.1.0.tgz","fileCount":111,"integrity":"sha512-WtHmtqfqxQtgu3dVlm/D9+1yHeMXLyw1VrmagHiWt/a2T5XqqElyYulV5A7DoVsZBo4qlYsFjemXGqMsuxwghg==","signatures":[{"sig":"MEQCIGYcO2HLG82eMznCAmu60UY0MoSIYv2vC0ee0PkT50lWAiBpPpY1mF83xTpSixtkAIbj3AZa9GwrbTYgDUvh2dt2Jw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":252056},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"417dc141b8d93ff80b349ee36cf7740d50db665f","scripts":{"dev":"tsx src/cli.ts","test":"vitest run","build":"tsc","dev:mock":"tsx src/cli.ts --mock","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"9matesu","email":"mcos.mateus@gmail.com"},"repository":{"url":"git+https://github.com/9matesu/autotask.git","type":"git"},"_npmVersion":"11.13.0","description":"Terminal queue supervisor and execution orchestrator for AI coding agents","directories":{},"_nodeVersion":"26.1.0","dependencies":{"ink":"^5.1.0","zod":"^3.24.2","chalk":"^5.4.1","react":"^18.3.1","commander":"^13.1.0","tree-kill":"^1.2.2","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","vitest":"^3.0.7","typescript":"^5.8.2","@types/node":"^22.13.9","@types/react":"^18.3.18"},"_npmOperationalInternal":{"tmp":"tmp/autotask_0.1.0_1786664640183_0.5758177296859524","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@9matesu/autotask","version":"0.1.1","description":"Terminal queue supervisor and execution orchestrator for AI coding agents","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"autotask":"dist/cli.js","ocq":"dist/cli.js"},"repository":{"type":"git","url":"git+https://github.com/9matesu/autotask.git"},"bugs":{"url":"https://github.com/9matesu/autotask/issues"},"homepage":"https://github.com/9matesu/autotask#readme","publishConfig":{"access":"public"},"scripts":{"build":"tsup","dev":"tsx src/cli.ts","dev:mock":"tsx src/cli.ts --mock","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","prepublishOnly":"npm run build && npm test","release":"npm publish --access public","release:patch":"npm version patch && git push --follow-tags && npm publish --access public","release:minor":"npm version minor && git push --follow-tags && npm publish --access public","release:major":"npm version major && git push --follow-tags && npm publish --access public"},"keywords":["ai-coding","autonomous-agent","queue","supervisor","orchestrator","terminal","tui","opencode","task-runner"],"author":{"name":"Autotask Contributors"},"license":"MIT","dependencies":{"chalk":"^5.4.1","commander":"^13.1.0","ink":"^5.1.0","ink-spinner":"^5.0.0","ink-text-input":"^6.0.0","react":"^18.3.1","tree-kill":"^1.2.2","zod":"^3.24.2"},"devDependencies":{"@types/node":"^22.13.9","@types/react":"^18.3.18","esbuild":"^0.28.2","tsup":"^8.5.1","tsx":"^4.19.3","typescript":"^5.8.2","vitest":"^3.0.7"},"engines":{"node":">=20.0.0"},"overrides":{"esbuild":"^0.28.2"},"gitHead":"9e5240e99b9f8a78a827360e1476e00ac4873b2e","_id":"@9matesu/autotask@0.1.1","_nodeVersion":"26.1.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-mQTwc+o5xsERtpcXJbW2NG0LSn5ivozZTF9Yldjb47M7q0CQYO34ZHMrnDuiMzmn7pwt0qnKAXkAQSKei6FF/Q==","shasum":"d45fa1d0a9b8fcf7e63783aaef1d5fee7501546a","tarball":"https://registry.npmjs.org/@9matesu/autotask/-/autotask-0.1.1.tgz","fileCount":6,"unpackedSize":1859021,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGKVBXEkRgbP/i4nT6gOW3mvFbhmRPHI9GMLnF0L1YPyAiA5MzLMLrRu2bHaxzCiedSqXATgfO3zQx5lkXXD8B6E2Q=="}]},"_npmUser":{"name":"9matesu","email":"mcos.mateus@gmail.com"},"directories":{},"maintainers":[{"name":"9matesu","email":"mcos.mateus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/autotask_0.1.1_1786668032674_0.43327106428495665"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T23:44:00.032Z","modified":"2026-08-14T00:40:33.019Z","0.1.0":"2026-08-13T23:44:00.335Z","0.1.1":"2026-08-14T00:40:32.860Z"},"bugs":{"url":"https://github.com/9matesu/autotask/issues"},"author":{"name":"Autotask Contributors"},"license":"MIT","homepage":"https://github.com/9matesu/autotask#readme","keywords":["ai-coding","autonomous-agent","queue","supervisor","orchestrator","terminal","tui","opencode","task-runner"],"repository":{"type":"git","url":"git+https://github.com/9matesu/autotask.git"},"description":"Terminal queue supervisor and execution orchestrator for AI coding agents","maintainers":[{"name":"9matesu","email":"mcos.mateus@gmail.com"}],"readme":"# Autotask\n\n```text\n╭─────────────────────────────────────────────────────────────────────────────╮\n│                                                                             │\n│   █████╗ ██╗   ██╗████████╗ ██████╗ ████████╗ █████╗ ███████╗██╗  ██╗       │\n│  ██╔══██╗██║   ██║╚══██╔══╝██╔═══██╗╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝       │\n│  ███████║██║   ██║   ██║   ██║   ██║   ██║   ███████║███████╗█████╔╝        │\n│  ██╔══██║██║   ██║   ██║   ██║   ██║   ██║   ██╔══██║╚════██║██╔═██╗        │\n│  ██║  ██║╚██████╔╝   ██║   ╚██████╔╝   ██║   ██║  ██║███████║██║  ██╗       │\n│  ╚═╝  ╚═╝ ╚═════╝    ╚═╝    ╚═════╝    ╚═╝   ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝       │\n│                                                                             │\n│               Autonomous Coding Queue Supervisor & Orchestrator              │\n│                                                                             │\n╰─────────────────────────────────────────────────────────────────────────────╯\n```\n\nAutotask is a local terminal queue supervisor and execution orchestrator for AI coding agents. Designed for unattended, production-grade engineering workflows, Autotask manages multi-task sequential execution, process tree lifecycle enforcement, intelligent git-diff-aware retries, context overflow recovery, and automated Git checkpoints.\n\nAutotask ships with native support for the **OpenCode CLI** as its initial execution engine, backed by an extensible adapter architecture engineered for future agent engine integrations.\n\n---\n\n## Architectural Principles\n\n* **Cumulative Sequential Execution (`concurrency = 1`)**: Executes queued tasks sequentially against a single working tree, guaranteeing that each subsequent task builds upon the verified state left by prior completions.\n* **Intelligent Continuation & State Recovery**: Rather than blindly restarting failed tasks, Autotask computes repository state diffs and synthesizes continuation prompts that preserve completed progress.\n* **Context Overflow & Token Lifecycle Supervision**: Detects token exhaustion thresholds, orchestrates compaction requests, and provisions clean continuation sessions with delta context when limits are exceeded.\n* **Provider Rate-Limit Backoff**: Applies exponential backoff with randomized jitter and evaluates `Retry-After` headers to sustain long-running batches on low-RPM inference providers.\n* **Process Tree Isolation (Windows & POSIX)**: Enforces hard timeouts and idle watchdog monitoring, using native tree termination to prevent orphaned language server or tool subprocesses.\n* **Non-Destructive Git Checkpoints**: Runs optional pre-commit test suites and generates verified checkpoint commits without ever running destructive checkout or reset routines.\n* **Terminal Interface**: High-density Amber TUI built with Ink and React, featuring split-pane task tracking, streaming telemetry feeds, autocomplete slash commands, and status diagnostics.\n* **Zero-Token Mock Engine**: Built-in deterministic simulation runner for end-to-end queue and supervisor validation without API token consumption.\n\n---\n\n## System Architecture\n\n```text\n┌─────────────────────────────────────────────────────────────┐\n│                      Autotask Interface                     │\n│  - Ink TUI: Split Queue & Streaming Execution Panes         │\n│  - Command Registry: Autocomplete Slash Commands            │\n├─────────────────────────────────────────────────────────────┤\n│                      Supervisor Core                        │\n│  - TaskQueue: Multi-Format Parser & Priority Scheduling     │\n│  - TaskRunner: Sequential State Machine & Lifecycle Hooks   │\n│  - RetryManager: Jitter Backoff & Continuation Synthesis    │\n│  - GitManager: Working Tree Verification & Safe Checkpoints │\n│  - ProcessMonitor: Watchdog Heartbeats & Tree Termination   │\n├─────────────────────────────────────────────────────────────┤\n│                    Storage & Diagnostics                    │\n│  - StateStore: Atomic queue.json State Persistence          │\n│  - TaskLogger: Secret-Redacted Per-Attempt Telemetry Logs   │\n│  - ConfigManager: Schema-Validated Configuration Store      │\n│  - DoctorService: Environment & Tool Diagnostic Engine      │\n├─────────────────────────────────────────────────────────────┤\n│                     Adapter Layer                           │\n│  - OpenCodeAdapter (Default Native Engine)                  │\n│  - MockOpenCodeRunner (Zero-Token Simulation Engine)        │\n│  - Future Agent Adapters (Claude Code, Codex, Custom)       │\n└─────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Installation & Quick Start\n\n### Global Installation\n\n```bash\nnpm install -g @9matesu/autotask\n```\n\n### Local Build & Development\n\n```bash\ngit clone https://github.com/9matesu/autotask.git\ncd autotask\nnpm install\nnpm run build\nnpm link\n```\n\n### Usage\n\nLaunch Autotask in any local repository:\n\n```bash\nautotask\n```\n\nAlias:\n\n```bash\nocq\n```\n\nRun in offline simulation mode:\n\n```bash\nautotask --mock\n```\n\nRun environment diagnostics:\n\n```bash\nautotask --doctor\n```\n\n---\n\n## Terminal User Interface\n\n```text\n┌──────────────────────────────────────────────────────────────┐\n│ AUTOTASK │ repository-name │ BUILD │ OpenCode │ ● RUNNING    │\n├───────────────────────────────┬──────────────────────────────┤\n│ TASK QUEUE (5 total)          │ EXECUTION LOG                │\n│                               │                              │\n│ ▶ #001 [RUNNING] Auth Module  │ 20:00:15 > Reading directory │\n│   #002 [PENDING] Token Refresh│ 20:00:18 > Executing tool    │\n│   #003 [PENDING] Unit Tests   │ 20:00:22 > Applying patch    │\n│   #004 [PENDING] Middleware   │                              │\n│   #005 [PENDING] Documentation│                              │\n├───────────────────────────────┴──────────────────────────────┤\n│ Task #001 │ Attempt 1/3 │ 00:42 │ Tokens: 1630               │\n├──────────────────────────────────────────────────────────────┤\n│ > /add Implement middleware validation                        │\n└──────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Task Input & Parsing\n\nTasks can be entered interactively or pasted in batches. Autotask parses standard input patterns:\n\n### Single Task Command\n```text\n/add Implement OAuth2 token refresh endpoint\n```\nOr type the instruction directly into the prompt without a prefix.\n\n### Bulleted Lists (Clipboard Paste)\n```text\n- Implement OAuth2 authorization code flow\n* Add JWT payload verification middleware\n• Write unit tests for token expiration\n```\n\n### Numbered Action Lists\n```text\n1. Refactor authentication controller\n2. Add rate limiting middleware to public endpoints\n3. Update OpenAPI schema documentation\n```\n\n### Mode Tags\nTarget specific agent execution profiles per task:\n```text\n[PLAN] Analyze database schema migration strategy\n[BUILD] Implement user registration endpoint\n@plan Review API security headers\n```\n\n---\n\n## Slash Commands\n\n| Command | Aliases | Description |\n| :--- | :--- | :--- |\n| `/help` | `/?`, `/h` | Display command reference and operational hints |\n| `/add <text>` | `/task`, `/paste` | Enqueue tasks from text or multiline lists |\n| `/start` | `/resume`, `/run` | Start or resume queue processing |\n| `/pause` | — | Pause the queue supervisor |\n| `/stop` | — | Terminate active task execution tree and pause queue |\n| `/queue` | `/tasks`, `/status`| Display overview of tasks, statuses, and attempts |\n| `/retry <id>`| — | Requeue a specific task for re-execution (e.g., `/retry 001`) |\n| `/skip <id>` | — | Mark a pending or failed task as skipped |\n| `/clear` | — | Purge completed and skipped tasks from the queue |\n| `/doctor` | — | Execute diagnostic checks on Node, Git, OpenCode, and storage |\n| `/git` | — | Inspect working branch and uncommitted change count |\n| `/diff` | — | Print working tree git diff summary |\n| `/log [id]` | `/logs` | Display recent execution logs or specific attempt output |\n| `/mode <plan\\|build>` | — | Switch the default agent execution mode |\n| `/config` | — | Output active configuration JSON |\n| `/quit` | `/q`, `/exit` | Terminate session and exit Autotask |\n\n---\n\n## Configuration\n\nConfiguration is loaded from `.autotask/config.json`:\n\n```json\n{\n  \"repository\": \".\",\n  \"opencode\": {\n    \"command\": \"opencode\",\n    \"agent\": \"build\",\n    \"model\": null,\n    \"useServer\": false,\n    \"autoApprove\": false\n  },\n  \"queue\": {\n    \"concurrency\": 1,\n    \"autoStart\": false\n  },\n  \"retry\": {\n    \"enabled\": true,\n    \"maxAttempts\": 3,\n    \"initialBackoffSeconds\": 5,\n    \"maxBackoffSeconds\": 300,\n    \"backoffMultiplier\": 2,\n    \"jitter\": true,\n    \"respectRetryAfter\": true\n  },\n  \"monitoring\": {\n    \"idleTimeoutSeconds\": 300,\n    \"hardTimeoutSeconds\": 1800\n  },\n  \"context\": {\n    \"autoCompact\": true\n  },\n  \"git\": {\n    \"autoCommit\": true,\n    \"commitPrefix\": \"agent: complete task\",\n    \"postTaskCommand\": null\n  },\n  \"providerPolicy\": {\n    \"rateLimitBackoff\": true,\n    \"initialBackoffSeconds\": 10,\n    \"maxBackoffSeconds\": 300,\n    \"respectRetryAfter\": true\n  }\n}\n```\n\n---\n\n## Security & Reliability\n\n* **Automatic Credential Redaction**: Telemetry pipelines automatically sanitize API keys, bearer tokens, and credentials (`sk-...`, `nvapi-...`, `Bearer ...`, `Authorization: ...`) prior to writing logs.\n* **Non-Destructive Operations**: Working directory modifications are preserved across retries; Autotask never invokes destructive Git clean or hard resets.\n* **Atomic State Persistence**: Queue state updates are committed via temporary file replacement and fsync routines to protect against power interruption or process termination.\n\n---\n\n## Verification & Testing\n\nExecute the automated test suite with Vitest:\n\n```bash\nnpm test\n```\n\n---\n\n## License\n\nMIT © Autotask Contributors\n","readmeFilename":"README.md"}