@drakon-systems/multi-clawd 1.4.0 → 1.4.2
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 +50 -11
- package/dist/index.js +2 -2
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -167,7 +167,7 @@ dependency (the host provides it), so the install stays lean.
|
|
|
167
167
|
**From ClawHub (alternative registry):**
|
|
168
168
|
|
|
169
169
|
```bash
|
|
170
|
-
openclaw plugins install clawhub
|
|
170
|
+
openclaw plugins install clawhub:@drakon-systems/multi-clawd
|
|
171
171
|
```
|
|
172
172
|
|
|
173
173
|
**From source (contributors, or ahead of a release):**
|
|
@@ -224,17 +224,28 @@ install → re-add plan.
|
|
|
224
224
|
|
|
225
225
|
## Set up a second account
|
|
226
226
|
|
|
227
|
-
**Easiest: the
|
|
228
|
-
main account, isolated second account, token storage,
|
|
229
|
-
result into `openclaw.json` non-destructively (backup
|
|
230
|
-
re-runs are no-ops,
|
|
227
|
+
**Easiest: the wizard, then the login command.** The wizard walks you through
|
|
228
|
+
the whole shape below — main account, isolated second account, token storage,
|
|
229
|
+
pool — and merges the result into `openclaw.json` non-destructively (backup
|
|
230
|
+
first, merge by id, existing accounts never overwritten, re-runs are no-ops,
|
|
231
|
+
never sees a token value). Then `login` performs the actual Claude sign-in
|
|
232
|
+
for any account — right flow, right config dir, verified afterwards with the
|
|
233
|
+
signed-in email shown:
|
|
231
234
|
|
|
232
235
|
```bash
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
multi-clawd setup # wire the accounts + pool (add --dry-run to preview)
|
|
237
|
+
multi-clawd login claw2 # launch the second account's Claude sign-in
|
|
238
|
+
multi-clawd login claw1 # (works for re-authing ANY account, any time)
|
|
236
239
|
```
|
|
237
240
|
|
|
241
|
+
`login` knows what each account is: a native account signs in against the
|
|
242
|
+
default dir/keychain, an isolated-dir account inside its own dir (created
|
|
243
|
+
`0700` if missing), and token accounts get `claude setup-token` — in a
|
|
244
|
+
throwaway scratch dir when the account has no dir of its own, so your main
|
|
245
|
+
login is never disturbed. You do the OAuth in the launched flow; the CLI
|
|
246
|
+
never captures, stores, or prints a token value.
|
|
247
|
+
(From a source checkout, `npm run setup` still works for the wizard.)
|
|
248
|
+
|
|
238
249
|
The key idea either way: your **main** account keeps the default `~/.claude`
|
|
239
250
|
login untouched, and each **extra** account gets its *own isolated config
|
|
240
251
|
dir* — a separate Claude "app" — so the logins can never clobber each other.
|
|
@@ -435,6 +446,19 @@ event, and no plugin API can force a rebuild. See `DESIGN.md`.
|
|
|
435
446
|
|
|
436
447
|
## Security
|
|
437
448
|
|
|
449
|
+
**Full declaration of what this plugin touches — nothing else:**
|
|
450
|
+
|
|
451
|
+
| Surface | What multi-clawd does |
|
|
452
|
+
|---|---|
|
|
453
|
+
| Network | **Zero egress of its own.** The only network activity is npm/registry traffic during `install`/`update`, and the Claude Code subprocesses talking to Anthropic exactly as the bundled backend does. No telemetry, no analytics, no vendor endpoints. |
|
|
454
|
+
| Credentials | Reads each account's setup-token at launch (file, or a secret-manager reference resolved by your gateway) and passes it **only** via the child process env. Never written elsewhere, never logged, never printed — log redaction is covered by dedicated tests. |
|
|
455
|
+
| Files read | `~/.openclaw/openclaw.json` (config), account config dirs you declare (e.g. `~/.claw2`), token files you declare. |
|
|
456
|
+
| Files written | `~/.openclaw/state/multi-clawd/<account>.json` (local usage-health telemetry, stays on the box), config backups the wizard takes before merging, and — only if you accept the wizard's watchdog step — one systemd user unit / launchd plist pointing at the installed watchdog script. |
|
|
457
|
+
| Processes | Spawns the `claude` CLI per turn (same as the bundled backend). The optional watchdog may restart the OpenClaw gateway when the eviction signature appears — that's its entire job, documented below. |
|
|
458
|
+
| Consent | The wizard asks before every write, merges non-destructively, and never overwrites an existing account entry. `--dry-run` previews everything. |
|
|
459
|
+
|
|
460
|
+
Housekeeping:
|
|
461
|
+
|
|
438
462
|
- Tokens are never committed and never logged; `.gitignore` blocks token
|
|
439
463
|
and account directories by default.
|
|
440
464
|
- Prefer a secret reference (`oauthTokenRef`, v0.3) over a plaintext
|
|
@@ -477,10 +501,25 @@ Early but real — built for and dogfooded in production.
|
|
|
477
501
|
(capped at 8d with a clock-skew alarm), reset-less windows keep TTL/decay,
|
|
478
502
|
and model windows age by their own TTL independent of pool `staleAfterMs`
|
|
479
503
|
— closes the quiet-pool blindness half of the no-flip failure class ✅
|
|
480
|
-
- **
|
|
504
|
+
- **v1.0** — the public line: published to npm as
|
|
505
|
+
[`@drakon-systems/multi-clawd`](https://www.npmjs.com/package/@drakon-systems/multi-clawd),
|
|
506
|
+
`openclaw` demoted to an optional peer, registry installs verified
|
|
507
|
+
end-to-end ✅
|
|
508
|
+
- **v1.1–v1.2** — the `multi-clawd` CLI (`update` / `setup` / `doctor`);
|
|
509
|
+
wizard owns the eviction watchdog (schedules it, detects + repoints
|
|
510
|
+
orphaned units after migrations); wizard account-protection (existing
|
|
511
|
+
accounts default to keep-unchanged; suspicious secret refs challenged) ✅
|
|
512
|
+
- **v1.3** — `multi-clawd explain`: the whole setup in plain English —
|
|
513
|
+
accounts, pool decisions, every fallback rung annotated, live health with
|
|
514
|
+
reset times ✅
|
|
515
|
+
- **v1.4** — `multi-clawd login <account>`: the right Claude sign-in flow
|
|
516
|
+
for each account shape, verified afterwards (signed-in email shown, token
|
|
517
|
+
values never touched); ClawHub package published under
|
|
518
|
+
`@drakon-systems` ✅
|
|
519
|
+
- **Next** — standalone localhost proxy (OpenAI-compatible) so Hermes and
|
|
481
520
|
custom runtimes can share the pool; true per-session affinity; local
|
|
482
|
-
five-hour-window signal (turn counting)
|
|
483
|
-
|
|
521
|
+
five-hour-window signal (turn counting); per-account lock for the shim
|
|
522
|
+
persistence race
|
|
484
523
|
|
|
485
524
|
See [`DESIGN.md`](./DESIGN.md) for the architecture, the three obvious
|
|
486
525
|
approaches that *don't* work, and why.
|
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ const SHIM_PATH = fileURLToPath(new URL("./shim.js", import.meta.url));
|
|
|
216
216
|
export function healthStateFile(accountId) {
|
|
217
217
|
return join(homedir(), ".openclaw", "state", "multi-clawd", `${accountId}.json`);
|
|
218
218
|
}
|
|
219
|
-
function buildBackend(account, execMode) {
|
|
219
|
+
export function buildBackend(account, execMode) {
|
|
220
220
|
return {
|
|
221
221
|
id: account.id,
|
|
222
222
|
liveTest: {
|
|
@@ -247,7 +247,7 @@ function buildBackend(account, execMode) {
|
|
|
247
247
|
imagePathScope: "workspace",
|
|
248
248
|
sessionArg: "--session-id",
|
|
249
249
|
sessionMode: "always",
|
|
250
|
-
reseedFromRawTranscriptWhenUncompacted:
|
|
250
|
+
reseedFromRawTranscriptWhenUncompacted: true,
|
|
251
251
|
sessionIdFields: ["session_id", "sessionId", "conversation_id", "conversationId"],
|
|
252
252
|
systemPromptFileArg: "--append-system-prompt-file",
|
|
253
253
|
systemPromptMode: "append",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drakon-systems/multi-clawd",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Multi-account Claude Code failover for OpenClaw — register additional Claude (Max/Pro) logins as first-class CLI backends and keep the full skills/MCP harness across every account.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -69,5 +69,9 @@
|
|
|
69
69
|
"openclaw": "2026.7.1",
|
|
70
70
|
"typescript": "^5.9.0",
|
|
71
71
|
"vitest": "^4.1.10"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://github.com/Drakon-Systems-Ltd/multi-clawd#readme",
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/Drakon-Systems-Ltd/multi-clawd/issues"
|
|
72
76
|
}
|
|
73
77
|
}
|