Commit Graph

388 Commits

Author SHA1 Message Date
Peter Steinberger
63b0a16357 feat(cli): colorize gateway health + daemon output 2026-01-10 03:01:27 +01:00
Peter Steinberger
c69c4caa33 fix: polish opencode-zen onboarding (#623) (thanks @magimetal) 2026-01-10 01:09:34 +01:00
Magi Metal
05bd100f7a style: fix formatting 2026-01-10 01:09:34 +01:00
Magi Metal
a399fa36c8 feat(onboard): add OpenCode Zen as model provider 2026-01-10 01:09:34 +01:00
Peter Steinberger
3554004968 fix: QuickStart provider selection (#485) 2026-01-10 01:08:00 +01:00
Peter Steinberger
097550c299 fix: centralize verbose overrides and tool stream gating 2026-01-10 00:52:24 +01:00
Peter Steinberger
79f5ccc99d fix(gateway): harden agent provider routing 2026-01-09 23:00:36 +01:00
Peter Steinberger
6c7a27c010 refactor: normalize main session key handling 2026-01-09 22:30:15 +01:00
Peter Steinberger
55e830b009 fix: harden onboarding for non-systemd environments 2026-01-09 22:17:09 +01:00
Peter Steinberger
c27b1441f7 fix(auth): billing backoff + cooldown UX 2026-01-09 22:00:14 +01:00
Peter Steinberger
42a0089b3b fix: require explicit system event session keys 2026-01-09 21:59:01 +01:00
Peter Steinberger
564caf49bb feat: add config --section 2026-01-09 21:27:51 +01:00
Peter Steinberger
6d378ee608 feat(telegram): inline keyboard buttons (#491)
Co-authored-by: Azade <azade@hey.com>
2026-01-09 20:47:03 +01:00
Peter Steinberger
7e81980747 refactor: centralize model override validation 2026-01-09 20:14:42 +01:00
Peter Steinberger
42ead1499f refactor: centralize minimax onboarding + keys 2026-01-09 18:37:06 +01:00
Peter Steinberger
a6a469435a fix: finalize minimax-api onboarding (#590) (thanks @mneves75) 2026-01-09 18:17:13 +01:00
mneves75
9279795c47 feat: Add MiniMax Anthropic-compatible API support (minimax-api)
Add --auth-choice minimax-api for direct MiniMax API usage at
https://api.minimax.io/anthropic using the anthropic-messages API.

Changes:
- Add applyMinimaxApiConfig() function with provider/model config
- Add minimax-api to AuthChoice type and CLI options
- Add handler and non-interactive support
- Fix duplicate minimax entry in envMap
- Update live test to use anthropic-messages API
- Add 11 unit tests covering all edge cases
- Document configuration in gateway docs

Test results:
- 11/11 unit tests pass
- 1/1 live API test passes (verified with real API key)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 18:13:18 +01:00
Peter Steinberger
377885bd36 style: format doctor gateway services 2026-01-09 17:53:57 +01:00
Peter Steinberger
c3083f0186 feat: add setup-token + token auth 2026-01-09 17:50:34 +01:00
Peter Steinberger
083877d286 fix: audit doctor service entrypoint 2026-01-09 17:50:28 +01:00
Peter Steinberger
fd9e2d3def feat: remove provider config in configure 2026-01-09 16:55:47 +01:00
Peter Steinberger
4ffbd9802a refactor(test): consolidate temp home + vitest setup 2026-01-09 16:41:05 +01:00
Peter Steinberger
f436808735 refactor: consolidate schema scrub + test harness 2026-01-09 16:27:28 +01:00
Peter Steinberger
f5cc6bb283 fix: harden node bridge keepalive 2026-01-09 15:46:45 +01:00
Peter Steinberger
c4c0f1349a fix: keep build green after main rebase (#570) (thanks @azade-c) 2026-01-09 15:40:36 +01:00
Peter Steinberger
2c5ec94843 test: stabilize sandbox/doctor tests 2026-01-09 15:17:20 +01:00
Peter Steinberger
fc7580ab5e fix: remove configure control-ui prompt 2026-01-09 15:17:20 +01:00
Peter Steinberger
3e400ff9f2 feat(models): add per-agent auth order overrides 2026-01-09 14:07:45 +00:00
Peter Steinberger
b5c32a4c79 fix(onboarding): remove redundant model spread fallback 2026-01-09 14:16:37 +01:00
Peter Steinberger
cb86d0d6d4 fix: land mac node bridge ping loop (#572) (thanks @ngutman) 2026-01-09 14:01:20 +01:00
Peter Steinberger
7b81d97ec2 feat: wire multi-agent config and routing
Co-authored-by: Mark Pors <1078320+pors@users.noreply.github.com>
2026-01-09 12:48:42 +00:00
Peter Steinberger
ac922e83d3 Merge branch 'main' into tobias-sync 2026-01-09 13:42:34 +01:00
Peter Steinberger
dc6f22c2c5 fix: add hosted minimax onboarding (#495, thanks @tobiasbischoff) 2026-01-09 13:40:01 +01:00
Tobias Bischoff
a0bb2bccaf Onboarding: add MiniMax hosted API key option 2026-01-09 13:39:28 +01:00
Peter Steinberger
22d517a520 fix: clarify WhatsApp owner number prompts 2026-01-09 13:32:52 +01:00
Peter Steinberger
201c879772 fix(sandbox): compare list to config images (#563) - thanks @pasogott 2026-01-09 13:29:47 +01:00
sheeek
7883491ce2 test(sandbox): add unit tests for formatter functions
Add comprehensive tests for sandbox-formatters.ts (20 tests):
- formatStatus: running/stopped with emojis
- formatSimpleStatus: running/stopped without emojis
- formatImageMatch: match/mismatch indicators
- formatAge: seconds, minutes, hours, days with edge cases
- countRunning: count items by running state
- countMismatches: count items by image mismatch

All pure functions now covered. 152 LOC tests added.

Total test count: 39 tests (19 integration + 20 unit)
Test coverage increased from ~66% to ~80%.
2026-01-09 13:23:16 +01:00
sheeek
7f02b62bba style(sandbox): fix linting errors
- Remove unused normalizeOptions function
- Fix line length violations (format long lines)
- Fix import order (alphabetical)
- Format function signatures for readability

All lint checks now passing.
2026-01-09 13:23:16 +01:00
sheeek
1c757ae35e refactor(sandbox): use extracted display and formatter modules
Update sandbox.ts to import and use functions from:
- sandbox-display.ts for all UI output
- sandbox-formatters.ts for data formatting

Removes 141 LOC of display/formatting code from sandbox.ts,
reducing it from 351 to 210 LOC (-40%).

Core business logic now clearer and more focused.
2026-01-09 13:23:16 +01:00
sheeek
81c55be19b refactor(sandbox): extract display logic into separate module
Move all display functions to sandbox-display.ts:
- displayContainers, displayBrowsers with generic displayItems helper
- displaySummary with image mismatch warnings
- displayRecreatePreview, displayRecreateResult

Uses DisplayConfig pattern to reduce duplication between container
and browser display logic. 156 LOC.
2026-01-09 13:23:16 +01:00
sheeek
dd0104290e refactor(sandbox): extract formatters into separate module
Move formatting utilities to sandbox-formatters.ts:
- formatStatus, formatSimpleStatus, formatImageMatch, formatAge
- countRunning, countMismatches helper functions
- ContainerItem type definition

Improves modularity and reusability. 49 LOC.
2026-01-09 13:23:16 +01:00
sheeek
c3932c8508 test(sandbox): add comprehensive test suite for CLI commands
Add 19 tests covering sandboxListCommand and sandboxRecreateCommand:
- List command: human/JSON output, browser flag, error handling
- Recreate command: validation, filtering (session/agent), confirmation flow
- Factory functions (createContainer, createBrowser) reduce duplication
- Helper functions (expectLogContains, setupDefaultMocks) improve readability

All tests passing. 365 LOC with ~66% production code coverage.
2026-01-09 13:23:16 +01:00
sheeek
00b77421dd refactor: improve sandbox commands code structure
Improvements:
- Extract validation into separate function
- Split display logic from business logic
- Create reusable container matcher for agent filtering
- Abstract status/image formatting into helpers
- Reduce code duplication between containers and browsers
- Extract container removal into generic function
- Add type safety with FilteredContainers type
- Improve readability with smaller, focused functions

Changes:
- validateRecreateOptions(): Validate mutual exclusivity
- fetchAndFilterContainers(): Fetch + filter in one place
- createAgentMatcher(): Reusable agent filter predicate
- displayContainers/Browsers(): Dedicated display functions
- displaySummary/RecreatePreview/Result(): Clear separation
- removeContainer(): Generic removal with error handling
- Format helpers: formatStatus, formatImageMatch, etc.
- Count helpers: countRunning, countMismatches

Result: 85 more lines but much better maintainability and testability.
2026-01-09 13:23:16 +01:00
sheeek
5e78d5a21f feat: add sandbox CLI commands for container management
Add 'clawd sandbox list' and 'clawd sandbox recreate' commands to manage
sandbox containers. This fixes the issue where containers continue using
old images/configs after updates.

Problem:
- When sandbox Docker images or configs are updated, existing containers
  keep running with old settings
- Containers are only recreated after 24h inactivity (pruning)
- If agents are used regularly, old containers run indefinitely

Solution:
- 'clawd sandbox list': Show all containers with status, age, and image match
- 'clawd sandbox recreate': Force container removal (recreated on next use)
  - Supports --all, --session, --agent, --browser filters
  - Requires confirmation unless --force is used

Implementation:
- Added helper functions to sandbox.ts (list/remove containers)
- Created sandbox-cli.ts following existing CLI patterns
- Created commands/sandbox.ts with list and recreate logic
- Integrated into program.ts

Use case: After updating sandbox images or changing sandbox config,
run 'clawd sandbox recreate --all' to ensure fresh containers.
2026-01-09 13:22:51 +01:00
Peter Steinberger
475d598ecb fix: normalize poll providers and msteams deps 2026-01-09 11:07:32 +01:00
Peter Steinberger
e55358c65d feat: finalize msteams polls + outbound parity 2026-01-09 11:07:32 +01:00
Onur
7f326ae4ae fix: sync doctor-prompter.ts with main 2026-01-09 11:07:17 +01:00
Onur
13b47e6047 fix(doctor): restore initialValue behavior in non-interactive mode
The repair/force commit added an early return that broke non-interactive
mode - migrations would return false instead of using initialValue.
2026-01-09 11:07:01 +01:00
Peter Steinberger
d258c68ca1 feat: add gateway dev config options 2026-01-09 10:39:00 +01:00
Peter Steinberger
0c167e85af style: sort configure imports 2026-01-09 10:03:52 +01:00