@haven_ai/connect 0.11.0-alpha.0 → 0.13.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 CHANGED
@@ -3,9 +3,16 @@
3
3
  Connect Agent 2 local connector.
4
4
 
5
5
  This command runs in the user's agent environment. It generates the agent
6
- signing key and API key locally, stores them locally, and sends Haven only the
7
- public signing address, proof signature, and API-key hash. Haven never receives
8
- the private key or plaintext API key.
6
+ signing key and API key locally, stores them locally, and sends Haven the
7
+ public signing address, a proof signature, and the API key's hash and display
8
+ prefix. The same registration request also carries the one-time setup token
9
+ and its challenge id, non-secret labels (runtime, connector version, MCP server
10
+ name, run mode, connector context) and the install capabilities (whether the
11
+ connector can write the runtime config, and whether a restart is required).
12
+ Every request through its API client (setup resolve and register, status
13
+ reports, the agent identity read) names the connector and its version in an
14
+ `X-Haven-Client` header (#3303); the read-only hosted probes behind `--doctor`,
15
+ `--unwire` and the post-install check send none. Haven never receives the private key or plaintext API key.
9
16
 
10
17
  ## Are you an AI agent whose user has no Haven account yet?
11
18
 
@@ -36,8 +43,13 @@ installs a signer that skews against it — the signer refuses to sign an
36
43
 
37
44
  The connector writes owner-only credential files outside the project by default:
38
45
 
39
- - `~/.haven/agents/<agent-id>/identity.json` contains the Haven API key.
40
- - `~/.haven/agents/<agent-id>/signer.json` contains the local signer key.
46
+ - `~/.haven/agents/<slug>/identity.json` contains the Haven API key.
47
+ - `~/.haven/agents/<slug>/signer.json` contains the local signer key.
48
+
49
+ `<slug>` is the agent's MCP pair name: derived from its display name by
50
+ default (#3737), or what you pass as `--name`. A `--bare` or `--replace` setup
51
+ without `--name` uses `~/.haven/agents/<agent-id>/` instead (see
52
+ [Running several agents in one runtime](#running-several-agents-in-one-runtime)).
41
53
 
42
54
  The API key identifies the agent. It cannot spend by itself. Payments still need
43
55
  the locally held signer key and the user-approved on-chain Haven wallet rules.
@@ -121,6 +133,7 @@ also select its OWN directory with `--doctor --name <slug>` or
121
133
  | `superseded` | It holds credentials, but no config entry points at it. Reported, never silently skipped — its API key may still spend. |
122
134
  | `retired` | Tombstoned (see below); key material removed. |
123
135
  | `orphaned` | No usable identity and no tombstone. |
136
+ | `parked` | Holds only the `rekey-pending.json` of an unfinished `--rekey` (#1915): loose key material, no agent. |
124
137
 
125
138
  The exit code is non-zero if **any** wired agent fails **any** check
126
139
  (`level: failed` — see the next section; an advisory does not count) — not
@@ -556,8 +569,8 @@ already-configured machine behaves as follows (characterized in
556
569
  - **A default setup names its pair from the agent's display name
557
570
  ([#3737](https://github.com/d-hinders/Haven-AI/issues/3737)) and never
558
571
  collides.** Without `--name`, `--bare` or `--replace`, the connector derives
559
- the slug itself (`proposeServerSlug`: slugified display name, `agent`
560
- fallback, numeric suffix when taken) and wires `haven-<slug>` /
572
+ the slug itself (`deriveServerSlug`, over `proposeServerSlug`: slugified
573
+ display name, `agent` fallback, numeric suffix when taken) and wires `haven-<slug>` /
561
574
  `haven-signer-<slug>` — de-collided against **every** directory under the
562
575
  credential root (retired and key-removed ones included, so a slug freed by
563
576
  `--unwire` is never reused), and marked `-dev` on a non-production backend
@@ -604,8 +617,8 @@ already-configured machine behaves as follows (characterized in
604
617
  - **The previous agent is not revoked by a re-run — with or without
605
618
  `--replace`.** Local retirement is local: its authority remains whatever
606
619
  its on-chain rules and the Haven agent page say. Use **Remove agent…** on
607
- the Haven agent page for agents you no longer use (or the superseded-agents
608
- revoke on the setup screen). Connect never calls revoke — that
620
+ the Haven agent page for agents you no longer use; the setup screen lists
621
+ the other agents but offers no revoke (#3830). Connect never calls revoke — that
609
622
  route is owner-authenticated, and an agent credential revoking a sibling
610
623
  agent would be an agent editing its own authority.
611
624
  - **A re-run never overwrites an existing credential file.** A write that would
@@ -647,7 +660,8 @@ nothing already wired needs changing — it is the one flag (besides
647
660
  The slug is **1–32 lowercase letters, digits and single hyphens**, validated
648
661
  before anything is written, and **immutable once wired** — it is the server name
649
662
  and tool prefix every host depends on. `haven`, `signer` and `signer-*` are
650
- refused, because their derived names would collide with another pair's.
663
+ refused, because their derived names would collide with another pair's;
664
+ `haven-signer` is refused too.
651
665
 
652
666
  > A current connector reports the resolved server name (`haven`, or
653
667
  > `haven-<slug>`) to Haven at registration, and the dashboard shows it on each
@@ -655,7 +669,8 @@ refused, because their derived names would collide with another pair's.
655
669
  > browser ([#1878](https://github.com/d-hinders/Haven-AI/issues/1878)). It is a
656
670
  > label, not authority — nothing keys off it.
657
671
  >
658
- > Agents connected before that shipped read **"MCP name not recorded"**: Haven
672
+ > Agents connected before that shipped show **not recorded** in the *MCP server
673
+ > name* row of their Settings tab: Haven
659
674
  > genuinely does not know, and guessing would name the wrong pair for anyone who
660
675
  > used `--name`. They keep working exactly as they are; `--doctor` on the machine
661
676
  > still maps them, and reconnecting records the name.
@@ -738,9 +753,9 @@ a skew that is not there. Use the channel your dashboard hands out.
738
753
  Without the flag the doctor checks the runtime the setup recorded in the
739
754
  agent directory's `last-connect-outcome.json` (#3120), and the `runtime_config`
740
755
  verdict says which runtime it resolved and from which file; when no
741
- record names one, the `runtime_config` check FAILS with "Runtime is unknown —
742
- the runtime config was NOT checked" and the exit code is 1 — never a pass on a
743
- config it did not open. `--repair` rewrites that config, so the runtime it
756
+ record names one, the `runtime_config` check FAILS ("Runtime is unknown — no
757
+ runtime flag was given …", then "The runtime config was NOT checked.") and the
758
+ exit code is 1 — never a pass on a config it did not open. `--repair` rewrites that config, so the runtime it
744
759
  rewrites is named on the command line rather than inherited from a record on
745
760
  disk: a flagless `--repair` is refused before anything runs.
746
761
 
@@ -770,7 +785,9 @@ probe is a note, never a verdict. Connect never revokes or deletes
770
785
  credentials itself — it reports, you decide. The setup completion output
771
786
  names the other agent directories the moment the new agent is created, for
772
787
  the same reason.
773
- One honest limit: "newest" is decided by file mtime, so a restored backup or
788
+ One honest limit: when neither `--name` nor `--credentials-dir` picks the
789
+ agent, the doctor describes the newest wired directory by file mtime, so a
790
+ restored backup or
774
791
  a sync tool that rewrites timestamps can make doctor examine the wrong
775
792
  directory as current — before revoking anything, confirm the agent id
776
793
  against the Haven agent page, which is the authority on which agent is
@@ -784,9 +801,10 @@ the STORED credentials. It never touches keys and never needs a new token.
784
801
  from ONE agent's stored credentials. With more than one agent credential
785
802
  directory under `~/.haven/agents` — or when `--doctor` was itself given
786
803
  `--credentials-dir` — every repair line the doctor prints names the agent it is
787
- about with `--credentials-dir <dir>`, and a `--repair` without
804
+ about with `--credentials-dir <dir>`, and a `--repair` without `--name` or
788
805
  `--credentials-dir` is refused — nothing is changed — with one exact command
789
- per live agent (its agent id beside it); a retired directory is listed as
806
+ per live agent (its agent id and the pair it owns beside it: `--name <slug>`
807
+ for a named pair, `--credentials-dir <dir>` for the bare one, #3799); a retired directory is listed as
790
808
  "retired — not a repair target" and never offered. Without that, "the newest directory" was a
791
809
  guess, and it re-wired a different agent than the one the doctor described.
792
810
  Every "update your signer" hint Haven emits names the flagless
package/dist/cli.cjs CHANGED
@@ -276,9 +276,9 @@ var init_runtime_manifest = __esm({
276
276
  mcpPackage: "@haven_ai/mcp",
277
277
  mcpVersion: mcp.MCP_VERSION,
278
278
  sdkPackage: "@haven_ai/sdk",
279
- sdkVersion: "0.11.0-alpha.0",
279
+ sdkVersion: "0.13.0-alpha.0",
280
280
  signerPackage: "@haven_ai/signer",
281
- signerVersion: "0.11.0-alpha.0",
281
+ signerVersion: "0.13.0-alpha.0",
282
282
  // Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
283
283
  // while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
284
284
  // so the guard that was supposed to enforce the floor waved Node v23 through
@@ -4703,7 +4703,7 @@ var init_runtime = __esm({
4703
4703
  init_tombstone();
4704
4704
  init_local_mcp_runtime();
4705
4705
  init_runtime_manifest();
4706
- CONNECTOR_VERSION = "0.11.0-alpha.0";
4706
+ CONNECTOR_VERSION = "0.13.0-alpha.0";
4707
4707
  PRODUCTION_CHAIN_ID = 8453;
4708
4708
  UUID_SHAPE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
4709
4709
  CONNECTOR_CLIENT_IDENTITY = `@haven_ai/connect/${CONNECTOR_VERSION}`;