aidevops 2.101.0 → 2.103.0

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.
package/README.md CHANGED
@@ -93,7 +93,7 @@ The result: AI agents that work *with* your development process, not around it.
93
93
 
94
94
  - Primary agents (Build+, SEO, Marketing, etc.) with @plan-plus subagent for planning-only mode
95
95
  - 614+ subagent markdown files organized by domain
96
- - 164 helper scripts in `.agent/scripts/`
96
+ - 167 helper scripts in `.agent/scripts/`
97
97
  - 28 slash commands for common workflows
98
98
 
99
99
  <!-- AI-CONTEXT-END -->
@@ -423,6 +423,14 @@ See `.agent/tools/terminal/terminal-title.md` for customization options.
423
423
  - Git platform management, domain purchasing, setup automation
424
424
  - [WordPress](https://wordpress.org/) management, credential security, code auditing
425
425
 
426
+ **Autonomous Orchestration:**
427
+
428
+ - **Supervisor** - SQLite state machine dispatches tasks to parallel AI agents with retry cycles, batch management, and cron scheduling
429
+ - **Runners** - Named headless agent instances with persistent identity, instructions, and memory namespaces
430
+ - **`/runners` command** - Batch dispatch from task IDs, PR URLs, or descriptions with concurrency control and progress monitoring
431
+ - **Mailbox** - SQLite-backed inter-agent messaging for coordination across parallel sessions
432
+ - **Worktree isolation** - Each agent works on its own branch in a separate directory, no merge conflicts
433
+
426
434
  **Unified Interface:**
427
435
 
428
436
  - Standardized commands across all providers
@@ -432,7 +440,8 @@ See `.agent/tools/terminal/terminal-title.md` for customization options.
432
440
  **Quality Control & Monitoring:**
433
441
 
434
442
  - **Multi-Platform Analysis**: SonarCloud, CodeFactor, Codacy, CodeRabbit, Qlty, Gemini Code Assist, Snyk
435
- - **Performance Auditing**: PageSpeed Insights, Lighthouse, Core Web Vitals (`/performance` command)
443
+ - **Performance Auditing**: PageSpeed Insights, Lighthouse, WebPageTest, Core Web Vitals (`/performance` command)
444
+ - **SEO Toolchain**: 13 SEO subagents including Semrush, Ahrefs, ContentKing, Screaming Frog, Bing Webmaster Tools, Rich Results Test, programmatic SEO, analytics tracking, schema validation
436
445
  - **SEO Debugging**: Open Graph validation, favicon checker, social preview testing
437
446
  - **Email Deliverability**: SPF/DKIM/DMARC/MX validation, blacklist checking
438
447
  - **Uptime Monitoring**: Updown.io integration for website and SSL monitoring
@@ -480,7 +489,7 @@ aidevops implements proven agent design patterns identified by [Lance Martin (La
480
489
 
481
490
  | Pattern | Description | aidevops Implementation |
482
491
  |---------|-------------|------------------------|
483
- | **Give Agents a Computer** | Filesystem + shell for persistent context | `~/.aidevops/.agent-workspace/`, 164 helper scripts |
492
+ | **Give Agents a Computer** | Filesystem + shell for persistent context | `~/.aidevops/.agent-workspace/`, 167 helper scripts |
484
493
  | **Multi-Layer Action Space** | Few tools, push actions to computer | Per-agent MCP filtering (~12-20 tools each) |
485
494
  | **Progressive Disclosure** | Load context on-demand | Subagent routing with content summaries, YAML frontmatter, read-on-demand |
486
495
  | **Offload Context** | Write results to filesystem | `.agent-workspace/work/[project]/` for persistence |
@@ -506,7 +515,7 @@ Run multiple AI agents in parallel on separate branches, coordinated through a l
506
515
  ```text
507
516
  Coordinator (pulse loop)
508
517
  ├── Agent Registry (TOON format - who's active, what branch, idle/busy)
509
- ├── Mailbox System (file-based, per-agent inbox/outbox)
518
+ ├── Mailbox System (SQLite WAL-mode, indexed queries)
510
519
  │ ├── task_assignment → worker inbox
511
520
  │ ├── status_report → coordinator outbox
512
521
  │ └── broadcast → all agents
@@ -517,8 +526,9 @@ Coordinator (pulse loop)
517
526
 
518
527
  | Component | Script | Purpose |
519
528
  |-----------|--------|---------|
520
- | Mailbox | `mail-helper.sh` | TOON-based inter-agent messaging (send, check, broadcast, archive) |
529
+ | Mailbox | `mail-helper.sh` | SQLite-backed inter-agent messaging (send, check, broadcast, archive) |
521
530
  | Coordinator | `coordinator-helper.sh` | Stateless pulse loop: collect reports, dispatch tasks, track idle workers |
531
+ | Supervisor | `supervisor-helper.sh` | Autonomous multi-task orchestration with SQLite state machine, batches, retry cycles, cron scheduling, auto-pickup from TODO.md |
522
532
  | Registry | `mail-helper.sh register` | Agent registration with role, branch, worktree, heartbeat |
523
533
  | Model routing | `model-routing.md`, `/route` | Cost-aware 5-tier routing guidance (haiku/flash/sonnet/pro/opus) |
524
534
 
@@ -527,8 +537,8 @@ Coordinator (pulse loop)
527
537
  1. Each agent registers on startup (`mail-helper.sh register --role worker`)
528
538
  2. Coordinator runs periodic pulses (`coordinator-helper.sh pulse`)
529
539
  3. Pulse collects status reports, dispatches queued tasks to idle workers
530
- 4. Agents send completion reports back via outbox
531
- 5. File locking (`noclobber` + retry) prevents race conditions
540
+ 4. Agents send completion reports back via mailbox
541
+ 5. SQLite WAL mode + `busy_timeout` handles concurrent access (79x faster than previous file-based system)
532
542
 
533
543
  **Compaction plugin** (`.agent/plugins/opencode-aidevops/`): When OpenCode compacts context (at ~200K tokens), the plugin injects current session state - agent registry, pending mailbox messages, git context, and relevant memories - ensuring continuity across compaction boundaries.
534
544
 
@@ -536,7 +546,9 @@ Coordinator (pulse loop)
536
546
 
537
547
  **Subagent index** (`.agent/subagent-index.toon`): Compressed TOON routing table listing all agents, subagents, workflows, and scripts with model tier assignments - enables fast agent discovery without loading full markdown files.
538
548
 
539
- ## **Advanced Capabilities** (Planned)
549
+ ## **Autonomous Orchestration & Parallel Agents**
550
+
551
+ **Why this matters:** Long-running tasks -- batch PR reviews, multi-site SEO audits, large refactors -- are where AI agents deliver the most value. Instead of babysitting one task at a time, the supervisor dispatches work to parallel agents, each in its own git worktree, with automatic retry, progress tracking, and batch completion reporting.
540
552
 
541
553
  ### Parallel Agents & Headless Dispatch
542
554
 
@@ -589,7 +601,23 @@ OpenCode Server (opencode serve)
589
601
 
590
602
  **Example runner templates:** [code-reviewer](.agent/tools/ai-assistants/runners/code-reviewer.md), [seo-analyst](.agent/tools/ai-assistants/runners/seo-analyst.md) - copy and customize for your own runners.
591
603
 
592
- **See:** [headless-dispatch.md](.agent/tools/ai-assistants/headless-dispatch.md) for full documentation including parallel vs sequential decision guide, SDK examples, CI/CD integration, and custom agent configuration.
604
+ **Matrix bot dispatch** (optional): Bridge Matrix chat rooms to runners for chat-triggered AI.
605
+
606
+ ```bash
607
+ # Setup Matrix bot (interactive wizard)
608
+ matrix-dispatch-helper.sh setup
609
+
610
+ # Map rooms to runners
611
+ matrix-dispatch-helper.sh map '!dev-room:server' code-reviewer
612
+ matrix-dispatch-helper.sh map '!seo-room:server' seo-analyst
613
+
614
+ # Start bot (daemon mode)
615
+ matrix-dispatch-helper.sh start --daemon
616
+
617
+ # In Matrix room: "!ai Review src/auth.ts for security issues"
618
+ ```
619
+
620
+ **See:** [headless-dispatch.md](.agent/tools/ai-assistants/headless-dispatch.md) for full documentation including parallel vs sequential decision guide, SDK examples, CI/CD integration, and custom agent configuration. [matrix-bot.md](.agent/services/communications/matrix-bot.md) for Matrix bot setup including Cloudron Synapse guide.
593
621
 
594
622
  ### Self-Improving Agent System
595
623
 
@@ -609,6 +637,30 @@ Agents that learn from experience and contribute improvements:
609
637
  - Dry-run default, explicit opt-in for PR creation
610
638
  - Audit log to memory
611
639
 
640
+ ### Agent Testing Framework
641
+
642
+ Test agent behavior through isolated AI sessions with automated validation:
643
+
644
+ ```bash
645
+ # Create a test suite
646
+ agent-test-helper.sh create my-tests
647
+
648
+ # Run tests (auto-detects claude or opencode CLI)
649
+ agent-test-helper.sh run my-tests
650
+
651
+ # Quick single-prompt test
652
+ agent-test-helper.sh run-one "What tools do you have?" --expect "bash"
653
+
654
+ # Before/after comparison for agent changes
655
+ agent-test-helper.sh baseline my-tests # Save current behavior
656
+ # ... modify agents ...
657
+ agent-test-helper.sh compare my-tests # Detect regressions
658
+ ```
659
+
660
+ Test suites are JSON files with prompts and validation rules (`expect_contains`, `expect_not_contains`, `expect_regex`, `min_length`, `max_length`). Results are saved for historical tracking.
661
+
662
+ **See:** `agent-testing.md` subagent for full documentation and example test suites.
663
+
612
664
  ### Voice Integration
613
665
 
614
666
  Speech-to-speech AI conversations:
@@ -739,17 +791,20 @@ The setup script offers to install these tools automatically.
739
791
  ### **Document Processing & OCR**
740
792
 
741
793
  - **[LibPDF](https://libpdf.dev/)**: PDF form filling, digital signatures (PAdES B-B/T/LT/LTA), encryption, merge/split, text extraction
794
+ - **[MinerU](https://github.com/opendatalab/MinerU)**: Layout-aware PDF-to-markdown/JSON conversion with OCR (109 languages), formula-to-LaTeX, and table extraction (53k+ stars, AGPL-3.0)
742
795
  - **[Unstract](https://github.com/Zipstack/unstract)**: LLM-powered structured data extraction from unstructured documents (PDF, images, DOCX)
743
796
  - **[GLM-OCR](https://ollama.com/library/glm-ocr)**: Local OCR via Ollama - purpose-built for document text extraction (tables, forms, complex layouts) with zero cloud dependency
744
797
 
745
- **OCR Tool Selection:**
798
+ **PDF/OCR Tool Selection:**
746
799
 
747
800
  | Need | Tool | Why |
748
801
  |------|------|-----|
802
+ | **Complex PDF to markdown** | MinerU | Layout-aware, formulas, tables, 109-language OCR |
749
803
  | **Quick text extraction** | GLM-OCR | Local, fast, no API keys, privacy-first |
750
804
  | **Structured JSON output** | Unstract | Schema-based extraction, complex documents |
751
805
  | **Screen/window OCR** | Peekaboo + GLM-OCR | `peekaboo image --analyze --model ollama/glm-ocr` |
752
806
  | **PDF text extraction** | LibPDF | Native PDF parsing, no AI needed |
807
+ | **Simple format conversion** | Pandoc | Lightweight, broad format support |
753
808
 
754
809
  **Quick start:**
755
810
 
@@ -764,6 +819,7 @@ See `.agent/tools/ocr/glm-ocr.md` for batch processing, PDF workflows, and Peeka
764
819
 
765
820
  - **[Twilio](https://www.twilio.com/)**: SMS, voice calls, WhatsApp, phone verification (Verify API), call recording & transcription
766
821
  - **[Telfon](https://mytelfon.com/)**: Twilio-powered cloud phone system with iOS/Android/Chrome apps for end-user calling interface
822
+ - **[Matrix](https://matrix.org/)**: Self-hosted chat with bot integration for AI runner dispatch (`matrix-dispatch-helper.sh`)
767
823
 
768
824
  ### **Animation & Video**
769
825
 
@@ -775,6 +831,7 @@ See `.agent/tools/ocr/glm-ocr.md` for batch processing, PDF workflows, and Peeka
775
831
 
776
832
  - **[PageSpeed Insights](https://pagespeed.web.dev/)**: Website performance auditing
777
833
  - **[Lighthouse](https://developer.chrome.com/docs/lighthouse/)**: Comprehensive web app analysis
834
+ - **[WebPageTest](https://www.webpagetest.org/)**: Real-world performance testing from 40+ global locations with filmstrip, waterfall, and Core Web Vitals
778
835
  - **[Updown.io](https://updown.io/)**: Website uptime and SSL monitoring
779
836
 
780
837
  ### **AI & Documentation**
@@ -826,6 +883,9 @@ These use direct API calls via curl, avoiding MCP server startup entirely:
826
883
  | [Ahrefs](https://ahrefs.com/api) | SEO analysis & backlinks | Yes |
827
884
  | [DataForSEO](https://dataforseo.com/) | SERP, keywords, backlinks, on-page | Yes |
828
885
  | [Serper](https://serper.dev/) | Google Search API (web, images, news) | Yes |
886
+ | [Semrush](https://www.semrush.com/api-documentation/) | Domain analytics, keywords, backlinks, competitor research | Yes |
887
+ | [ContentKing](https://www.contentkingapp.com/) | Real-time SEO monitoring, change tracking, issues | Yes |
888
+ | [WebPageTest](https://www.webpagetest.org/) | Real-world performance testing from 40+ global locations | Yes |
829
889
  | [Hostinger](https://developers.hostinger.com/) | Hosting management | Yes |
830
890
  | [NeuronWriter](https://neuronwriter.com/) | Content optimization & NLP analysis | Yes |
831
891
 
@@ -875,6 +935,7 @@ These use direct API calls via curl, avoiding MCP server startup entirely:
875
935
  **Data Extraction:**
876
936
 
877
937
  - [Outscraper](https://outscraper.com/) - Google Maps, business data, reviews extraction
938
+ - [curl-copy](.agent/tools/browser/curl-copy.md) - Authenticated scraping via DevTools "Copy as cURL" (no browser automation needed)
878
939
 
879
940
  **Performance & Security:**
880
941
 
@@ -945,7 +1006,7 @@ These catch formatting and syntax issues during editing, reducing preflight/post
945
1006
 
946
1007
  ## **Browser Automation**
947
1008
 
948
- 8 browser tools + anti-detect stack, benchmarked and integrated for AI-assisted web automation, dev testing, data extraction, and bot detection evasion. Agents automatically select the optimal tool based on task requirements.
1009
+ 8 browser tools + anti-detect stack + device emulation, benchmarked and integrated for AI-assisted web automation, dev testing, mobile/responsive testing, data extraction, and bot detection evasion. Agents automatically select the optimal tool based on task requirements.
949
1010
 
950
1011
  ### Performance Benchmarks
951
1012
 
@@ -967,6 +1028,7 @@ Tested on macOS ARM64, all headless, warm daemon:
967
1028
  | **Proxy/VPN** | Full | No | Via args | No | Full | Your browser | Via args |
968
1029
  | **Extensions** | Yes (persistent) | No | Yes (profile) | No | No | Yes (yours) | Possible |
969
1030
  | **Password managers** | Partial (needs unlock) | No | Partial | No | No | **Yes** (unlocked) | No |
1031
+ | **Device emulation** | **Full** (100+ devices) | No | No | No | No | No | Via Playwright |
970
1032
  | **Parallel sessions** | 5 ctx/2.1s | --session | Shared | 3 sess/2.0s | arun_many 1.7x | Shared | Per-instance |
971
1033
  | **Session persistence** | storageState | Profile dir | Profile dir | state save/load | user_data_dir | Your browser | Per-instance |
972
1034
  | **Tracing** | Full API | Built-in CLI | Via Playwright | Via Playwright | No | Via CDP | Via Playwright |
@@ -989,6 +1051,8 @@ Tested on macOS ARM64, all headless, warm daemon:
989
1051
  | **iOS mobile testing** | agent-browser | Real Safari in iOS Simulator (macOS only) |
990
1052
  | **Unknown pages** | Stagehand | Natural language, self-healing |
991
1053
  | **Performance debugging** | Chrome DevTools MCP | Companion tool, pairs with any browser |
1054
+ | **Mobile/tablet emulation** | Playwright | 100+ device presets, viewport, touch, geolocation, locale |
1055
+ | **Authenticated one-off scrape** | curl-copy | DevTools "Copy as cURL" → paste to terminal/AI |
992
1056
  | **Bot detection evasion** | Anti-detect stack | Camoufox (full) or rebrowser-patches (quick) |
993
1057
  | **Multi-account** | Browser profiles | Persistent fingerprint + proxy per account |
994
1058
 
@@ -1005,6 +1069,37 @@ Agents use lightweight methods instead of expensive vision API calls:
1005
1069
 
1006
1070
  See [`.agent/tools/browser/browser-automation.md`](.agent/tools/browser/browser-automation.md) for the full decision tree and [`browser-benchmark.md`](.agent/tools/browser/browser-benchmark.md) for reproducible benchmark scripts.
1007
1071
 
1072
+ ### Device Emulation
1073
+
1074
+ Test responsive layouts and mobile-specific behavior using Playwright's built-in device emulation. Supports 100+ device presets with viewport, user agent, touch events, device scale factor, geolocation, locale/timezone, permissions, color scheme, offline mode, and network throttling.
1075
+
1076
+ **Common device presets:**
1077
+
1078
+ | Device | Viewport | Scale | Touch |
1079
+ |--------|----------|-------|-------|
1080
+ | `iPhone 15` | 393x852 | 3 | Yes |
1081
+ | `iPad Pro 11` | 834x1194 | 2 | Yes |
1082
+ | `Pixel 7` | 412x915 | 2.625 | Yes |
1083
+ | `Galaxy S9+` | 320x658 | 4.5 | Yes |
1084
+ | `Desktop Chrome` | 1280x720 | 1 | No |
1085
+
1086
+ **Emulation capabilities:**
1087
+
1088
+ | Feature | Example |
1089
+ |---------|---------|
1090
+ | **Device presets** | `devices['iPhone 13']` - viewport, UA, touch, scale |
1091
+ | **Viewport/HiDPI** | `viewport: { width: 2560, height: 1440 }, deviceScaleFactor: 2` |
1092
+ | **Geolocation** | `geolocation: { longitude: -74.006, latitude: 40.7128 }` |
1093
+ | **Locale/timezone** | `locale: 'de-DE', timezoneId: 'Europe/Berlin'` |
1094
+ | **Color scheme** | `colorScheme: 'dark'` |
1095
+ | **Offline mode** | `offline: true` |
1096
+ | **Permissions** | `permissions: ['geolocation', 'notifications']` |
1097
+ | **Network throttling** | CDP-based Slow 3G / Fast 3G emulation |
1098
+
1099
+ **Recipes included:** Responsive breakpoint testing, multi-device parallel testing, touch gesture testing, geolocation-dependent features, dark mode visual regression, and network condition emulation.
1100
+
1101
+ See [`.agent/tools/browser/playwright-emulation.md`](.agent/tools/browser/playwright-emulation.md) for complete documentation with code examples.
1102
+
1008
1103
  ### Anti-Detect Browser
1009
1104
 
1010
1105
  Open-source alternative to AdsPower, GoLogin, and OctoBrowser for multi-account automation and bot detection evasion.
@@ -1596,6 +1691,7 @@ Configure time tracking per-repo via `.aidevops.json`.
1596
1691
  | `/session-review` | Review session for completeness and capture learnings |
1597
1692
  | `/full-loop` | End-to-end development loop (task → preflight → PR → postflight → deploy) |
1598
1693
  | `/preflight-loop` | Run preflight checks iteratively until all pass |
1694
+ | `/runners` | Batch dispatch tasks to parallel agents (task IDs, PR URLs, or descriptions) |
1599
1695
  | `/log-issue-aidevops` | Report issues with aidevops (gathers diagnostics, checks duplicates, creates GitHub issue) |
1600
1696
 
1601
1697
  ### Ralph Loop - Iterative AI Development
@@ -1755,7 +1851,9 @@ See `.agent/workflows/session-manager.md` for the complete guide.
1755
1851
  | `/remember {content}` | Store a memory with AI-assisted categorization |
1756
1852
  | `/recall {query}` | Search memories by keyword |
1757
1853
  | `/recall --recent` | Show 10 most recent memories |
1854
+ | `/recall --auto-only` | Search only auto-captured memories |
1758
1855
  | `/recall --stats` | Show memory statistics |
1856
+ | `/memory-log` | Show recent auto-captured memories |
1759
1857
  | `/patterns {task}` | Show success/failure patterns for a task type |
1760
1858
  | `/route {task}` | Suggest optimal model tier for a task |
1761
1859
 
@@ -1794,11 +1892,16 @@ pattern-tracker-helper.sh record --outcome success --task-type bugfix \
1794
1892
  pattern-tracker-helper.sh suggest "refactor the auth middleware"
1795
1893
  ```
1796
1894
 
1895
+ **Auto-capture:** AI agents automatically store memories using `--auto` flag when they detect working solutions, failed approaches, or decisions. Privacy filters strip `<private>` tags and reject secret patterns.
1896
+
1797
1897
  **CLI usage:**
1798
1898
 
1799
1899
  ```bash
1800
1900
  # Store a memory
1801
- ~/.aidevops/agents/scripts/memory-helper.sh store "WORKING_SOLUTION" "Fixed CORS with nginx headers" "cors,nginx"
1901
+ ~/.aidevops/agents/scripts/memory-helper.sh store --type "WORKING_SOLUTION" --content "Fixed CORS with nginx headers" --tags "cors,nginx"
1902
+
1903
+ # Store auto-captured memory (from AI agent)
1904
+ ~/.aidevops/agents/scripts/memory-helper.sh store --auto --content "Fixed CORS with nginx headers" --type WORKING_SOLUTION
1802
1905
 
1803
1906
  # Recall memories (keyword search - default)
1804
1907
  ~/.aidevops/agents/scripts/memory-helper.sh recall "cors"
@@ -1806,7 +1909,10 @@ pattern-tracker-helper.sh suggest "refactor the auth middleware"
1806
1909
  # Recall memories (semantic similarity - opt-in)
1807
1910
  ~/.aidevops/agents/scripts/memory-helper.sh recall "cors" --semantic
1808
1911
 
1809
- # View statistics
1912
+ # Show auto-capture log
1913
+ ~/.aidevops/agents/scripts/memory-helper.sh log
1914
+
1915
+ # View statistics (includes auto-capture counts)
1810
1916
  ~/.aidevops/agents/scripts/memory-helper.sh stats
1811
1917
 
1812
1918
  # Maintenance
@@ -1974,7 +2080,8 @@ bash .agent/scripts/continue-cli.sh review
1974
2080
  **Agent Guides** (in `.agent/`):
1975
2081
 
1976
2082
  - **[API Integrations](.agent/aidevops/api-integrations.md)** - Service APIs
1977
- - **[Browser Automation](.agent/tools/browser/browser-automation.md)** - 6 tools + anti-detect stack: decision tree, parallel, extensions, fingerprinting
2083
+ - **[Browser Automation](.agent/tools/browser/browser-automation.md)** - 8 tools + anti-detect stack: decision tree, parallel, extensions, fingerprinting
2084
+ - **[Device Emulation](.agent/tools/browser/playwright-emulation.md)** - Mobile/tablet testing: 100+ device presets, viewport, geolocation, locale, dark mode
1978
2085
  - **[Anti-Detect Browser](.agent/tools/browser/anti-detect-browser.md)** - Multi-profile management, fingerprint rotation, proxy integration
1979
2086
  - **[Web Performance](.agent/tools/performance/performance.md)** - Core Web Vitals, network dependencies, accessibility (Chrome DevTools MCP)
1980
2087
  - **[PageSpeed](.agent/tools/browser/pagespeed.md)** - Lighthouse CLI and PageSpeed Insights API
@@ -2043,7 +2150,7 @@ credential-helper.sh set GITHUB_TOKEN ghp_xxx
2043
2150
  echo "client-acme" > .aidevops-tenant
2044
2151
 
2045
2152
  # Export for scripts
2046
- eval $(credential-helper.sh export)
2153
+ source <(credential-helper.sh export)
2047
2154
  ```
2048
2155
 
2049
2156
  **Resolution priority:** Project `.aidevops-tenant` → Global active tenant → Default
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.101.0
1
+ 2.103.0
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 2.101.0
6
+ # Version: 2.103.0
7
7
 
8
8
  set -euo pipefail
9
9
 
@@ -545,6 +545,17 @@ cmd_update() {
545
545
 
546
546
  if [[ "$local_hash" == "$remote_hash" ]]; then
547
547
  print_success "Framework already up to date!"
548
+
549
+ # Even when repo is current, deployed agents may be stale
550
+ # (e.g., previous setup.sh was interrupted or failed)
551
+ local repo_version deployed_version
552
+ repo_version=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
553
+ deployed_version=$(cat "$HOME/.aidevops/agents/VERSION" 2>/dev/null || echo "none")
554
+ if [[ "$repo_version" != "$deployed_version" ]]; then
555
+ print_warning "Deployed agents ($deployed_version) don't match repo ($repo_version)"
556
+ print_info "Re-running setup to sync agents..."
557
+ bash "$INSTALL_DIR/setup.sh"
558
+ fi
548
559
  else
549
560
  print_info "Pulling latest changes..."
550
561
  if git pull --ff-only origin main; then
@@ -1322,11 +1333,25 @@ cmd_upgrade_planning() {
1322
1333
  # Find the Backlog TOON block and insert tasks after its closing -->
1323
1334
  if grep -q "<!--TOON:backlog" "$todo_file"; then
1324
1335
  local temp_file="${todo_file}.merge"
1325
- awk -v tasks="$existing_tasks" '
1326
- /<!--TOON:backlog/ { in_backlog=1 }
1327
- in_backlog && /^-->$/ { print; print ""; print tasks; in_backlog=0; next }
1328
- { print }
1329
- ' "$todo_file" > "$temp_file"
1336
+ local tasks_file
1337
+ tasks_file=$(mktemp)
1338
+ printf '%s\n' "$existing_tasks" > "$tasks_file"
1339
+ # Use while-read to avoid BSD awk "newline in string" warning with -v
1340
+ local in_backlog=false
1341
+ while IFS= read -r line || [[ -n "$line" ]]; do
1342
+ if [[ "$line" == *"<!--TOON:backlog"* ]]; then
1343
+ in_backlog=true
1344
+ fi
1345
+ if [[ "$in_backlog" == true && "$line" == "-->" ]]; then
1346
+ echo "$line"
1347
+ echo ""
1348
+ cat "$tasks_file"
1349
+ in_backlog=false
1350
+ continue
1351
+ fi
1352
+ echo "$line"
1353
+ done < "$todo_file" > "$temp_file"
1354
+ rm -f "$tasks_file"
1330
1355
  mv "$temp_file" "$todo_file"
1331
1356
  print_success "Merged existing tasks into Backlog"
1332
1357
  fi
@@ -1373,11 +1398,25 @@ cmd_upgrade_planning() {
1373
1398
  if [[ -n "$existing_plans" ]]; then
1374
1399
  if grep -q "<!--TOON:active_plans" "$plans_file"; then
1375
1400
  local temp_file="${plans_file}.merge"
1376
- awk -v plans="$existing_plans" '
1377
- /<!--TOON:active_plans/ { in_active=1 }
1378
- in_active && /^-->$/ { print; print ""; print plans; in_active=0; next }
1379
- { print }
1380
- ' "$plans_file" > "$temp_file"
1401
+ local plans_content_file
1402
+ plans_content_file=$(mktemp)
1403
+ printf '%s\n' "$existing_plans" > "$plans_content_file"
1404
+ # Use while-read to avoid BSD awk "newline in string" warning with -v
1405
+ local in_active=false
1406
+ while IFS= read -r line || [[ -n "$line" ]]; do
1407
+ if [[ "$line" == *"<!--TOON:active_plans"* ]]; then
1408
+ in_active=true
1409
+ fi
1410
+ if [[ "$in_active" == true && "$line" == "-->" ]]; then
1411
+ echo "$line"
1412
+ echo ""
1413
+ cat "$plans_content_file"
1414
+ in_active=false
1415
+ continue
1416
+ fi
1417
+ echo "$line"
1418
+ done < "$plans_file" > "$temp_file"
1419
+ rm -f "$plans_content_file"
1381
1420
  mv "$temp_file" "$plans_file"
1382
1421
  print_success "Merged existing plans into Active Plans"
1383
1422
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "2.101.0",
3
+ "version": "2.103.0",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/setup.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI Assistant Server Access Framework Setup Script
4
4
  # Helps developers set up the framework for their infrastructure
5
5
  #
6
- # Version: 2.101.0
6
+ # Version: 2.103.0
7
7
  #
8
8
  # Quick Install (one-liner):
9
9
  # bash <(curl -fsSL https://aidevops.dev/install)
@@ -466,6 +466,23 @@ validate_opencode_config() {
466
466
  local needs_repair=false
467
467
  local issues=""
468
468
 
469
+ # Check 0: Remove deprecated top-level keys that OpenCode no longer recognizes
470
+ # "compaction" was removed in OpenCode v1.1.x - causes "Unrecognized key" error
471
+ local deprecated_keys=("compaction")
472
+ for key in "${deprecated_keys[@]}"; do
473
+ if jq -e ".[\"$key\"]" "$opencode_config" > /dev/null 2>&1; then
474
+ local tmp_fix
475
+ tmp_fix=$(mktemp)
476
+ if jq "del(.[\"$key\"])" "$opencode_config" > "$tmp_fix" 2>/dev/null; then
477
+ create_backup_with_rotation "$opencode_config" "opencode"
478
+ mv "$tmp_fix" "$opencode_config"
479
+ print_info "Removed deprecated '$key' key from OpenCode config"
480
+ else
481
+ rm -f "$tmp_fix"
482
+ fi
483
+ fi
484
+ done
485
+
469
486
  # Check 1: MCP entries must have "type" field (usually "local")
470
487
  # Invalid: {"mcp": {"foo": {"command": "..."}}}
471
488
  # Valid: {"mcp": {"foo": {"type": "local", "command": "..."}}}