Commit Graph

2228 Commits

Author SHA1 Message Date
Azade
48ad3bbbe6 fix: use resolveStateDir() for node-pairing and voicewake storage
Both node-pairing.ts and voicewake.ts were using a local defaultBaseDir()
that hardcoded ~/.clawdbot, ignoring CLAWDBOT_STATE_DIR.

This caused nodes/paired.json and settings/voicewake.json to be stored
in ~/.clawdbot instead of the configured state directory.

Fixes the bug where paired nodes config was stored in a different
location than the rest of the gateway state.
2026-01-10 17:55:30 +01:00
Peter Steinberger
843ff5f2d4 fix(sessions): tolerate ENOENT during lock 2026-01-10 17:50:53 +01:00
Peter Steinberger
60bf349201 fix(sessions): lock store saves; wait for bash close 2026-01-10 17:47:12 +01:00
Peter Steinberger
a54706a063 fix: throttle cli credential sync 2026-01-10 17:44:03 +01:00
Peter Steinberger
12722acb55 feat: wizard model picker (#611, thanks @jonasjancarik) 2026-01-10 16:32:59 +00:00
Jonáš Jančařík
687a10b8cc fix: map opencode-zen preferred provider 2026-01-10 16:32:59 +00:00
Jonáš Jančařík
9f80d8ec7c fix: skip model picker when auth choice preset 2026-01-10 16:32:59 +00:00
Jonáš Jančařík
dcc41e932d feat: add shared model picker to configure/onboarding 2026-01-10 16:32:59 +00:00
Peter Steinberger
e3cd431551 fix(auto-reply): RawBody commands + locked session updates (#643) 2026-01-10 17:32:31 +01:00
Peter Steinberger
e2ea02160d test: add workspace path regressions 2026-01-10 17:28:43 +01:00
Peter Steinberger
a1533a17f7 fix(gateway): harden chat abort semantics 2026-01-10 17:23:27 +01:00
Peter Steinberger
84d64f9395 Merge pull request #446 from tony-freedomology/feat/human-delay
feat(agent): add human-like delay between block replies
2026-01-10 16:16:52 +00:00
Peter Steinberger
fb03149df4 fix: finalize human delay config typing (#446) (thanks @tony-freedomology) 2026-01-10 17:15:27 +01:00
Lloyd
ab994d2c63 feat(agent): add human-like delay between block replies
Adds `agent.humanDelay` config option to create natural rhythm between
streamed message bubbles. When enabled, introduces a random delay
(default 800-2500ms) between block replies, making multi-message
responses feel more like natural human texting.

Config example:
```json
{
  "agent": {
    "blockStreamingDefault": "on",
    "humanDelay": {
      "enabled": true,
      "minMs": 800,
      "maxMs": 2500
    }
  }
}
```

- First message sends immediately
- Subsequent messages wait a random delay before sending
- Works with iMessage, Signal, and Discord providers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 17:12:50 +01:00
Muhammed Mukhthar CM
de5b75eff6 fix(tools): resolve Read/Write/Edit paths against workspace directory
Previously, Read/Write/Edit tools used the global tool instances from
pi-coding-agent which had process.cwd() baked in at import time. Since
the gateway starts from /root/dev/ai/clawdbot, relative paths like
'SOUL.md' would incorrectly resolve there instead of the agent's
workspace (/root/clawd).

This fix:
- Adds workspaceDir option to createClawdbotCodingTools
- Creates fresh Read/Write/Edit tools bound to workspaceDir
- Adds cwd option to Bash tool defaults for consistency
- Passes effectiveWorkspace from pi-embedded-runner

Absolute paths and ~/... paths are unaffected. Sandboxed sessions
continue to use sandbox root as before.

Includes tests for Read/Write/Edit workspace path resolution.
2026-01-10 17:08:56 +01:00
Peter Steinberger
d1943a9337 chore: format reply session 2026-01-10 17:03:17 +01:00
Peter Steinberger
d781508952 fix: make chat.send non-blocking 2026-01-10 17:02:28 +01:00
Peter Steinberger
b7fdc266ad test(auto-reply): cover native /model session routing 2026-01-10 16:50:32 +01:00
Peter Steinberger
b99eb4c9f3 fix(auto-reply): apply native commands to target session 2026-01-10 16:48:53 +01:00
Peter Steinberger
8978ac425e fix: harden cli credential sync 2026-01-10 16:37:54 +01:00
Peter Steinberger
81f9093c3c fix(pairing): accept positional provider args 2026-01-10 16:36:43 +01:00
Peter Steinberger
41c8bdfada feat: add ZAI auth choice 2026-01-10 16:32:21 +01:00
Peter Steinberger
8b47368167 fix: harden cli credential sync 2026-01-10 16:25:40 +01:00
Peter Steinberger
e60c3fc1b3 fix: doctor ignore install dir in legacy workspace check 2026-01-10 16:23:35 +01:00
Peter Steinberger
78532d76bd test: clean up lint warnings 2026-01-10 16:17:02 +01:00
Peter Steinberger
53a0c966a5 refactor: unify configure auth choice 2026-01-10 16:14:49 +01:00
Peter Steinberger
43b530ca1c fix(agents): suppress partial replies with reasoning 2026-01-10 16:03:17 +01:00
Peter Steinberger
44564df028 refactor(sessions): add mergeSessionEntry 2026-01-10 16:03:17 +01:00
Peter Steinberger
70c1732dd1 refactor: centralize messaging dedupe helpers 2026-01-10 16:02:56 +01:00
Peter Steinberger
5a93447294 fix: prevent claude-cli oauth downgrade (#654) (thanks @radek-paclt) 2026-01-10 15:50:25 +01:00
Radek Paclt
a39951d463 fix(auth): enable OAuth refresh for Claude CLI credentials
When Claude CLI credentials (anthropic:claude-cli) expire, automatically
refresh using the stored refresh token instead of failing with
"No credentials found" error.

Changes:
- Read refreshToken from Claude CLI and store as OAuth credential type
- Implement bidirectional sync: after refresh, write new tokens back to
  Claude Code storage (file on Linux/Windows, Keychain on macOS)
- Prefer OAuth over Token credentials (enables auto-refresh capability)
- Maintain backward compatibility for credentials without refreshToken

This enables long-running agents to operate autonomously without manual
re-authentication when OAuth tokens expire.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 15:40:27 +01:00
Peter Steinberger
1281c1d155 Merge pull request #655 from antons/fix/reasoning-imsg
Fix reasoning in iMessage
2026-01-10 14:39:14 +00:00
Peter Steinberger
236f8560b3 fix: reasoning iMessage sessions + final reply (#655) (thanks @antons) 2026-01-10 15:31:57 +01:00
Peter Steinberger
ae3711bfbd Merge pull request #659 from mickahouan/fix/dedupe-message-tool
Fix: avoid duplicate replies when message tool sends
2026-01-10 14:30:02 +00:00
Peter Steinberger
449bee9645 fix: bundle node runtime for mac app 2026-01-10 15:28:37 +01:00
Peter Steinberger
4d146ea2f5 fix: dedupe message tool replies (#659) (thanks @mickahouan) 2026-01-10 15:28:13 +01:00
Anton Sotkov
3b5149ca39 fix: send only final answer with reasoning
When reasoning is enabled on non‑block providers, we now ignore interim streaming chunks and send only the final assistant answer at completion, so replies aren’t partial or duplicated.
2026-01-10 15:28:04 +01:00
Anton Sotkov
4c86da044e fix(sessions): persist reasoning/elevated across DMs 2026-01-10 15:28:04 +01:00
Mickaël Ahouansou
d01e06f09a Fix: dedupe message tool sends 2026-01-10 15:25:20 +01:00
Peter Steinberger
65c2532cd5 fix: minimax apiKey optional for providers (#656) (thanks @mneves75) 2026-01-10 15:08:12 +01:00
mneves75
3e2e3eb023 Config: add MiniMax direct API authentication option
Makes apiKey optional in ModelProviderConfig so MiniMax can use auth
profiles or environment variables (MINIMAX_API_KEY) instead of requiring
explicit config.

Changes:
- src/config/types.ts: apiKey changed from required to optional
- src/config/zod-schema.ts: use z.string().min(1).optional() for validation
- src/commands/configure.ts: add minimax-api auth choice in wizard
- src/commands/onboard-auth.ts: MiniMax provider omits apiKey (uses env/auth)
- patches/@mariozechner__pi-ai@0.42.1.patch: map minimax → MINIMAX_API_KEY

Auth Resolution Order (unchanged):
1. Auth profiles (highest priority)
2. Environment variables (MINIMAX_API_KEY, etc.)
3. Custom provider apiKey from models.json (lowest priority)
2026-01-10 10:57:09 -03:00
Peter Steinberger
920b3880c1 test: add elevated mode regressions 2026-01-10 05:31:48 +01:00
Peter Steinberger
66db6c749d fix: persist elevated off override 2026-01-10 05:23:46 +01:00
Peter Steinberger
2045395ccb test(live): add optional write/bash probes 2026-01-10 04:14:39 +00:00
Peter Steinberger
d3674f4d6c test(onboard): cover remote + lan token flows 2026-01-10 04:14:39 +00:00
Peter Steinberger
cdb915d527 chore: normalize Clawdbot naming 2026-01-10 05:14:09 +01:00
Peter Steinberger
a7c8341452 feat: show more session flags 2026-01-10 05:14:07 +01:00
Peter Steinberger
7b392ca74b test(onboard): gateway token auth flow 2026-01-10 03:54:29 +00:00
Peter Steinberger
eee04fa2ce fix(onboard): persist gateway token in config 2026-01-10 03:54:25 +00:00
Peter Steinberger
4fac94f259 test(gateway): add wizard e2e + isolate live suite 2026-01-10 03:44:21 +00:00