@haven_ai/connect 0.10.0-alpha.0 → 0.12.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
@@ -503,7 +516,9 @@ need its full public identifier can inspect the owner-only, non-secret
503
516
  `identity.json` or `signer.json` for diagnostics because they contain secrets.
504
517
 
505
518
  For Hermes, Connect stores the hosted-MCP API key in the matching owner-only
506
- `.env` file and keeps only `Bearer ${MCP_HAVEN_API_KEY}` in `config.yaml`.
519
+ `.env` file and keeps only `Bearer ${<the pair's env key>}` in `config.yaml`:
520
+ `MCP_HAVEN_<SLUG>_API_KEY` for a named pair (the default since #3737), or
521
+ `MCP_HAVEN_API_KEY` for the bare pair (`--bare` or `--replace` without `--name`).
507
522
  Hermes requires its Python MCP SDK support to be installed. If Haven tools do
508
523
  not appear after restart, run `pip install mcp` in the Hermes environment, then
509
524
  restart Hermes and check `hermes mcp list`.
@@ -554,8 +569,8 @@ already-configured machine behaves as follows (characterized in
554
569
  - **A default setup names its pair from the agent's display name
555
570
  ([#3737](https://github.com/d-hinders/Haven-AI/issues/3737)) and never
556
571
  collides.** Without `--name`, `--bare` or `--replace`, the connector derives
557
- the slug itself (`proposeServerSlug`: slugified display name, `agent`
558
- 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>` /
559
574
  `haven-signer-<slug>` — de-collided against **every** directory under the
560
575
  credential root (retired and key-removed ones included, so a slug freed by
561
576
  `--unwire` is never reused), and marked `-dev` on a non-production backend
@@ -602,8 +617,8 @@ already-configured machine behaves as follows (characterized in
602
617
  - **The previous agent is not revoked by a re-run — with or without
603
618
  `--replace`.** Local retirement is local: its authority remains whatever
604
619
  its on-chain rules and the Haven agent page say. Use **Remove agent…** on
605
- the Haven agent page for agents you no longer use (or the superseded-agents
606
- 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
607
622
  route is owner-authenticated, and an agent credential revoking a sibling
608
623
  agent would be an agent editing its own authority.
609
624
  - **A re-run never overwrites an existing credential file.** A write that would
@@ -645,7 +660,8 @@ nothing already wired needs changing — it is the one flag (besides
645
660
  The slug is **1–32 lowercase letters, digits and single hyphens**, validated
646
661
  before anything is written, and **immutable once wired** — it is the server name
647
662
  and tool prefix every host depends on. `haven`, `signer` and `signer-*` are
648
- 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.
649
665
 
650
666
  > A current connector reports the resolved server name (`haven`, or
651
667
  > `haven-<slug>`) to Haven at registration, and the dashboard shows it on each
@@ -653,7 +669,8 @@ refused, because their derived names would collide with another pair's.
653
669
  > browser ([#1878](https://github.com/d-hinders/Haven-AI/issues/1878)). It is a
654
670
  > label, not authority — nothing keys off it.
655
671
  >
656
- > 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
657
674
  > genuinely does not know, and guessing would name the wrong pair for anyone who
658
675
  > used `--name`. They keep working exactly as they are; `--doctor` on the machine
659
676
  > still maps them, and reconnecting records the name.
@@ -736,9 +753,9 @@ a skew that is not there. Use the channel your dashboard hands out.
736
753
  Without the flag the doctor checks the runtime the setup recorded in the
737
754
  agent directory's `last-connect-outcome.json` (#3120), and the `runtime_config`
738
755
  verdict says which runtime it resolved and from which file; when no
739
- record names one, the `runtime_config` check FAILS with "Runtime is unknown —
740
- the runtime config was NOT checked" and the exit code is 1 — never a pass on a
741
- 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
742
759
  rewrites is named on the command line rather than inherited from a record on
743
760
  disk: a flagless `--repair` is refused before anything runs.
744
761
 
@@ -768,7 +785,9 @@ probe is a note, never a verdict. Connect never revokes or deletes
768
785
  credentials itself — it reports, you decide. The setup completion output
769
786
  names the other agent directories the moment the new agent is created, for
770
787
  the same reason.
771
- 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
772
791
  a sync tool that rewrites timestamps can make doctor examine the wrong
773
792
  directory as current — before revoking anything, confirm the agent id
774
793
  against the Haven agent page, which is the authority on which agent is
@@ -782,9 +801,10 @@ the STORED credentials. It never touches keys and never needs a new token.
782
801
  from ONE agent's stored credentials. With more than one agent credential
783
802
  directory under `~/.haven/agents` — or when `--doctor` was itself given
784
803
  `--credentials-dir` — every repair line the doctor prints names the agent it is
785
- about with `--credentials-dir <dir>`, and a `--repair` without
804
+ about with `--credentials-dir <dir>`, and a `--repair` without `--name` or
786
805
  `--credentials-dir` is refused — nothing is changed — with one exact command
787
- 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
788
808
  "retired — not a repair target" and never offered. Without that, "the newest directory" was a
789
809
  guess, and it re-wired a different agent than the one the doctor described.
790
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.10.0-alpha.0",
279
+ sdkVersion: "0.12.0-alpha.0",
280
280
  signerPackage: "@haven_ai/signer",
281
- signerVersion: "0.10.0-alpha.0",
281
+ signerVersion: "0.12.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.10.0-alpha.0";
4706
+ CONNECTOR_VERSION = "0.12.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}`;