@haven_ai/connect 0.8.0-alpha.0 → 0.9.0-alpha.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 +49 -24
- package/dist/cli.cjs +189 -37
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +189 -37
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +189 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -4
- package/dist/index.d.ts +52 -4
- package/dist/index.js +189 -37
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -161,8 +161,8 @@ minutes. Two rules follow:
|
|
|
161
161
|
stderr log on every probe, and records it in `TOMBSTONE.json` for
|
|
162
162
|
`--doctor` — with a copy in `~/.haven/tombstones/` (or `.tombstones/` inside
|
|
163
163
|
a custom credentials root), so the retirement stays visible after the
|
|
164
|
-
directory is deleted. It touches no key material and revokes nothing —
|
|
165
|
-
agent on the Haven agent page yourself. Delete the tombstone only once every
|
|
164
|
+
directory is deleted. It touches no key material and revokes nothing — use **Remove
|
|
165
|
+
agent…** (or **Stop budget**) on the Haven agent page yourself. Delete the tombstone only once every
|
|
166
166
|
long-lived host has been restarted.
|
|
167
167
|
|
|
168
168
|
**Pass a real DIRECTORY, not an agent id.** A named agent lives at its wiring
|
|
@@ -219,7 +219,7 @@ backend change) and **refuses to destroy the key material on every answer**:
|
|
|
219
219
|
|
|
220
220
|
| Probe | What it means | What `--unwire` does |
|
|
221
221
|
| --- | --- | --- |
|
|
222
|
-
| `ok` | The agent is still active: its key still spends. | Refuses; tells you to
|
|
222
|
+
| `ok` | The agent is still active: its key still spends. | Refuses; tells you to use **Remove agent…** on the Haven agent page (connect never revokes), then re-run. |
|
|
223
223
|
| `unauthorized` | The key no longer authenticates on normal routes (revoked, archived, paused, pending approval, rotated, or not a key the backend knows — it does not say which). | Refuses; says plainly that a stranded balance **may** exist and the connector **cannot check**; recover first (`haven_sweep_delegate`, or the agent page). |
|
|
224
224
|
| `network_error` / `bad_response` | Could not verify. | Refuses: unknown is not "safe to delete". Retry. |
|
|
225
225
|
| *(no stored API key + URL)* | Nothing the recovery routes would accept. | Proceeds, unprobed — the pre-#3123 shape. |
|
|
@@ -385,8 +385,8 @@ and the API key travels beside it in a header.
|
|
|
385
385
|
|
|
386
386
|
`superseded_agent_ids` lists the other agent directories on this machine. A
|
|
387
387
|
re-run mints a NEW agent, and without `--replace` retires nothing, so those
|
|
388
|
-
older agents still hold live API and signing keys —
|
|
389
|
-
agent page if you meant to replace them. Empty on a clean first run; an empty
|
|
388
|
+
older agents still hold live API and signing keys — use **Remove agent…** on the
|
|
389
|
+
Haven agent page for each if you meant to replace them. Empty on a clean first run; an empty
|
|
390
390
|
list here is not a guarantee, since a scan that cannot read the credential root
|
|
391
391
|
also yields one rather than failing a completed setup.
|
|
392
392
|
|
|
@@ -499,12 +499,24 @@ already-configured machine behaves as follows (characterized in
|
|
|
499
499
|
consumed setup when Connect resolves it (or, in a rare concurrent-run race,
|
|
500
500
|
at registration). The key pair minted for the attempt exists only in memory
|
|
501
501
|
and is discarded. Start a fresh connection from the Haven dashboard instead.
|
|
502
|
-
- **Running a fresh setup on a configured machine
|
|
503
|
-
credentials into its own directory under `~/.haven/agents/<
|
|
502
|
+
- **Running a fresh setup on a configured machine writes the new agent's
|
|
503
|
+
credentials into its own directory under `~/.haven/agents/<slug-or-id>/`,
|
|
504
504
|
alongside the previous agent's directory, which stays byte-identical.
|
|
505
|
-
Nothing is rotated, revoked, or deleted locally
|
|
505
|
+
Nothing is rotated, revoked, or deleted locally.**
|
|
506
|
+
- **A default setup names its pair from the agent's display name
|
|
507
|
+
([#3737](https://github.com/d-hinders/Haven-AI/issues/3737)) and never
|
|
508
|
+
collides.** Without `--name`, `--bare` or `--replace`, the connector derives
|
|
509
|
+
the slug itself (`proposeServerSlug`: slugified display name, `agent`
|
|
510
|
+
fallback, numeric suffix when taken) and wires `haven-<slug>` /
|
|
511
|
+
`haven-signer-<slug>` — de-collided against **every** directory under the
|
|
512
|
+
credential root (retired and key-removed ones included, so a slug freed by
|
|
513
|
+
`--unwire` is never reused), and marked `-dev` on a non-production backend
|
|
514
|
+
(Base Sepolia or any chain that is not Base mainnet 8453; an explicit
|
|
515
|
+
`--name` is used verbatim and never altered). Nothing is displaced, so
|
|
516
|
+
nothing is asked. `--bare` opts back into the unnamed pair.
|
|
506
517
|
- **A bare re-run over a live previous agent is a decision, not a default
|
|
507
|
-
([#2551](https://github.com/d-hinders/Haven-AI/issues/2551)).**
|
|
518
|
+
([#2551](https://github.com/d-hinders/Haven-AI/issues/2551)).** Only a run
|
|
519
|
+
that targets the bare pair — `--bare`, or `--replace` — can collide; before
|
|
508
520
|
minting a key or registering, Connect scans the credential root for a
|
|
509
521
|
bare-pair directory that still holds a usable key — the same reading
|
|
510
522
|
`--doctor` classifies as `wired` or `superseded`; `retired`, `orphaned`,
|
|
@@ -517,11 +529,13 @@ already-configured machine behaves as follows (characterized in
|
|
|
517
529
|
refuses with `wiring_collision` — nothing written, token still unused —
|
|
518
530
|
naming the superseded agent ids and the two flags that resolve it. The
|
|
519
531
|
refusal is written as a **relay instruction**: an agent running the
|
|
520
|
-
dashboard's command
|
|
521
|
-
|
|
522
|
-
|
|
532
|
+
dashboard's command must hand the choice to its user rather than add a
|
|
533
|
+
flag itself. The setup prompt then permits one re-run with the flag the
|
|
534
|
+
user picks (#3689), on top of `--json` and a `--runtime` retry.
|
|
523
535
|
- **`--replace`** is the unattended answer "yes, replace". `--name <slug>`
|
|
524
|
-
installs alongside.
|
|
536
|
+
installs alongside. `--bare` is the human opt-in to the unnamed pair and
|
|
537
|
+
refuses with `--name`. Passing `--replace --name` is a usage error — they
|
|
538
|
+
contradict.
|
|
525
539
|
- **Replacing re-points the bare pair, then retires the previous directory
|
|
526
540
|
locally.** Connect owns the `haven` and `haven-signer` entries (and the
|
|
527
541
|
managed Codex/Hermes equivalents) and re-points them at the new agent's
|
|
@@ -539,8 +553,9 @@ already-configured machine behaves as follows (characterized in
|
|
|
539
553
|
[Running several agents in one runtime](#running-several-agents-in-one-runtime).
|
|
540
554
|
- **The previous agent is not revoked by a re-run — with or without
|
|
541
555
|
`--replace`.** Local retirement is local: its authority remains whatever
|
|
542
|
-
its on-chain rules and the Haven agent page say.
|
|
543
|
-
|
|
556
|
+
its on-chain rules and the Haven agent page say. Use **Remove agent…** on
|
|
557
|
+
the Haven agent page for agents you no longer use (or the superseded-agents
|
|
558
|
+
revoke on the setup screen). Connect never calls revoke — that
|
|
544
559
|
route is owner-authenticated, and an agent credential revoking a sibling
|
|
545
560
|
agent would be an agent editing its own authority.
|
|
546
561
|
- **A re-run never overwrites an existing credential file.** A write that would
|
|
@@ -567,15 +582,17 @@ As above, `<channel>` is a placeholder like the rest of this line: take the
|
|
|
567
582
|
package from the setup response's `connector_package`
|
|
568
583
|
and add `--name` to the command the dashboard gave you.
|
|
569
584
|
|
|
570
|
-
| |
|
|
571
|
-
|
|
572
|
-
| MCP entries | `haven
|
|
573
|
-
| Credentials | `~/.haven/agents/<
|
|
585
|
+
| | Default (no `--name`) | `--name research` | `--bare` |
|
|
586
|
+
|---|---|---|---|
|
|
587
|
+
| MCP entries | `haven-<slug>`, `haven-signer-<slug>` (slug from the agent's display name, `-dev`-marked on a non-production backend) | `haven-research`, `haven-signer-research` | `haven`, `haven-signer` |
|
|
588
|
+
| Credentials | `~/.haven/agents/<slug>/` | `~/.haven/agents/research/` | `~/.haven/agents/<agent-id>/` |
|
|
574
589
|
|
|
575
590
|
A writer only ever touches the pair it owns, so adding a named agent cannot
|
|
576
|
-
disturb the bare pair or another named one.
|
|
577
|
-
to how the connector behaved before named pairs existed
|
|
578
|
-
wired needs changing
|
|
591
|
+
disturb the bare pair or another named one. **`--bare` wires the bare pair
|
|
592
|
+
byte-identically to how the connector behaved before named pairs existed**, so
|
|
593
|
+
nothing already wired needs changing — it is the one flag (besides
|
|
594
|
+
`--replace`) that reaches the unnamed pair, and it cannot be combined with
|
|
595
|
+
`--name`.
|
|
579
596
|
|
|
580
597
|
The slug is **1–32 lowercase letters, digits and single hyphens**, validated
|
|
581
598
|
before anything is written, and **immutable once wired** — it is the server name
|
|
@@ -615,6 +632,14 @@ npx -y @haven_ai/connect@<channel> --rekey-finish --api-key sk_agent_... \
|
|
|
615
632
|
--runtime claude-code [--name research]
|
|
616
633
|
```
|
|
617
634
|
|
|
635
|
+
**No `--name` needed when exactly one live agent is on the machine.** Since
|
|
636
|
+
[#3737](https://github.com/d-hinders/Haven-AI/issues/3737), `--rekey` without
|
|
637
|
+
`--name` selects the sole agent directory that still holds a stored API key —
|
|
638
|
+
tombstoned and key-removed directories left by `--unwire` do not count — and
|
|
639
|
+
the printed phase-two command carries that agent's exact `--name` when it has
|
|
640
|
+
one. With **several** live agents it refuses and lists them, so you must pass
|
|
641
|
+
`--name <slug>`; a bare agent needs no `--name`, exactly as before.
|
|
642
|
+
|
|
618
643
|
**Phase one prints the exact phase-two command — prefer it over the line above.**
|
|
619
644
|
Since [#2423](https://github.com/d-hinders/Haven-AI/issues/2423) the connector
|
|
620
645
|
builds that command from the npm dist-tag **it** was published under, so a build
|
|
@@ -689,8 +714,8 @@ terminal and refuses everywhere else, so a `superseded` directory now means
|
|
|
689
714
|
someone chose it — a `--replace` whose install failed, an older connector, or
|
|
690
715
|
a directory this scan could not classify. A superseded directory
|
|
691
716
|
whose key is still live is a FAILING check naming the agent id, with the
|
|
692
|
-
repair spelled out:
|
|
693
|
-
directory. An already-revoked one reports as informational; an unreachable
|
|
717
|
+
repair spelled out: use **Remove agent…** on the Haven agent page, then remove
|
|
718
|
+
the directory. An already-revoked one reports as informational; an unreachable
|
|
694
719
|
probe is a note, never a verdict. Connect never revokes or deletes
|
|
695
720
|
credentials itself — it reports, you decide. The setup completion output
|
|
696
721
|
names superseded agents the moment they are created, for the same reason.
|