@haven_ai/connect 0.3.0-alpha.0 → 0.5.0-alpha.1

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/dist/index.d.cts CHANGED
@@ -176,7 +176,14 @@ interface AgentIdentity {
176
176
  chain_id: number | null;
177
177
  execution_rail: 'legacy' | 'delegation' | string;
178
178
  }
179
- declare function createConnectApiClient(baseUrl: string, fetchImpl?: typeof fetch): ConnectApiClient;
179
+ /**
180
+ * @param clientIdentity #3303: `@haven_ai/connect/<version>`, sent as
181
+ * `X-Haven-Client` on every request so the backend can tell an outdated
182
+ * connector what to run. Passed in by the callers that own
183
+ * `CONNECTOR_VERSION` (`runtime.ts` imports this file, so it cannot be
184
+ * imported here).
185
+ */
186
+ declare function createConnectApiClient(baseUrl: string, fetchImpl?: typeof fetch, clientIdentity?: string): ConnectApiClient;
180
187
 
181
188
  interface LocalDelegateKey {
182
189
  privateKey: string;
@@ -736,7 +743,7 @@ type WiringCollisionResolution = {
736
743
  action: 'abort';
737
744
  };
738
745
 
739
- declare const CONNECTOR_VERSION = "0.3.0-alpha.0";
746
+ declare const CONNECTOR_VERSION = "0.5.0-alpha.1";
740
747
  interface ConnectOptions {
741
748
  setupToken: string;
742
749
  apiBaseUrl: string;
@@ -881,6 +888,45 @@ interface ConnectOutcome {
881
888
  */
882
889
  superseded_agents_retired_locally?: boolean;
883
890
  retired_agent_ids?: readonly string[];
891
+ /**
892
+ * #3259, additive within schema_version 1: present only on a replace run
893
+ * where a retired directory's surviving ledger record could NOT be written —
894
+ * agent id → errno code (or `mirror_write_failed`). The directory is still
895
+ * retired (tombstoned in place, key files removed) and counts in
896
+ * `retired_agent_ids`; only `--doctor`'s view after the directory is deleted
897
+ * is lost.
898
+ */
899
+ retirement_mirror_errors?: Readonly<Record<string, string>>;
900
+ /**
901
+ * #3122, additive within schema_version 1. Every OTHER credential directory
902
+ * on this machine that still held key material when this run began — named
903
+ * BEFORE the first credential write (the same list the pre-write heads-up
904
+ * prints), with the account each can spend from, so a `--json` caller
905
+ * learns of the condition without parsing prose. "Live" here means "holds
906
+ * a stored API key locally" — no network call is made to ask the backend
907
+ * whether the key still authenticates (that is the doctor's probe). Always
908
+ * present on a completed run, `[]` on a clean machine; like
909
+ * `superseded_agent_ids`, an empty list from a root that could not be read
910
+ * is not proof of a clean machine.
911
+ */
912
+ existing_agents_before_write?: ReadonlyArray<{
913
+ agent_id: string;
914
+ account_address: string | null;
915
+ }>;
916
+ /**
917
+ * #3122, additive. Present only when this run took an MCP server name over
918
+ * from another agent's local binding record (`mcp-server-binding.json` in
919
+ * that directory): the previous holder, the backend it pointed at, when it
920
+ * was bound, and whether the backend changed — the case the backend cannot
921
+ * answer and the one that silently repoints a saved session.
922
+ */
923
+ server_name_rebound_from?: {
924
+ server_name: string;
925
+ agent_id: string;
926
+ api_url: string;
927
+ bound_at: string;
928
+ backend_changed: boolean;
929
+ };
884
930
  /**
885
931
  * #2091, additive within schema_version 1: `message` is the redacted human
886
932
  * refusal (automation used to get code + next_action and nothing to act
@@ -990,9 +1036,16 @@ declare function completionOutcome(input: {
990
1036
  /** #2551: only a replace run sets these; see the outcome fields' doc comments. */
991
1037
  supersededAgentsRetiredLocally?: boolean;
992
1038
  retiredAgentIds?: readonly string[];
1039
+ /** #3259: only set when a retirement's ledger mirror failed. */
1040
+ retirementMirrorErrors?: Readonly<Record<string, string>>;
993
1041
  setupChallengeExpiresAt?: string;
994
1042
  approvalRequired: boolean;
995
1043
  approvalUrl?: string;
1044
+ existingAgentsBeforeWrite?: ReadonlyArray<{
1045
+ agent_id: string;
1046
+ account_address: string | null;
1047
+ }>;
1048
+ serverNameReboundFrom?: ConnectOutcome['server_name_rebound_from'];
996
1049
  }): ConnectOutcome;
997
1050
  /**
998
1051
  * The failure record for the `--json` contract.
@@ -1053,9 +1106,14 @@ interface ParsedCli {
1053
1106
  unwire?: {
1054
1107
  reason?: string;
1055
1108
  replacedBy?: string;
1109
+ destroyKeyMaterial?: boolean;
1056
1110
  };
1057
1111
  /** Optional positional value of --unwire <dir> (else --name / --credentials-dir resolve it). */
1058
1112
  unwireDir?: string;
1113
+ /** #3123: reclaim signer-runtime directories no credential directory references. */
1114
+ pruneSignerRuntimes?: {
1115
+ dryRun: boolean;
1116
+ };
1059
1117
  /**
1060
1118
  * #1700: replace an agent's signing key on this machine. Two phases, because
1061
1119
  * the dashboard sits between them — `start` generates the key and prints its
@@ -1136,11 +1194,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
1136
1194
 
1137
1195
  declare const MCP_RUNTIME_MANIFEST: {
1138
1196
  readonly mcpPackage: "@haven_ai/mcp";
1139
- readonly mcpVersion: "0.3.0-alpha.0";
1197
+ readonly mcpVersion: "0.5.0-alpha.1";
1140
1198
  readonly sdkPackage: "@haven_ai/sdk";
1141
- readonly sdkVersion: "0.3.0-alpha.0";
1199
+ readonly sdkVersion: "0.5.0-alpha.1";
1142
1200
  readonly signerPackage: "@haven_ai/signer";
1143
- readonly signerVersion: "0.3.0-alpha.0";
1201
+ readonly signerVersion: "0.5.0-alpha.1";
1144
1202
  readonly minimumNodeVersion: "22.0.0";
1145
1203
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
1146
1204
  readonly requiredTools: readonly string[];
package/dist/index.d.ts CHANGED
@@ -176,7 +176,14 @@ interface AgentIdentity {
176
176
  chain_id: number | null;
177
177
  execution_rail: 'legacy' | 'delegation' | string;
178
178
  }
179
- declare function createConnectApiClient(baseUrl: string, fetchImpl?: typeof fetch): ConnectApiClient;
179
+ /**
180
+ * @param clientIdentity #3303: `@haven_ai/connect/<version>`, sent as
181
+ * `X-Haven-Client` on every request so the backend can tell an outdated
182
+ * connector what to run. Passed in by the callers that own
183
+ * `CONNECTOR_VERSION` (`runtime.ts` imports this file, so it cannot be
184
+ * imported here).
185
+ */
186
+ declare function createConnectApiClient(baseUrl: string, fetchImpl?: typeof fetch, clientIdentity?: string): ConnectApiClient;
180
187
 
181
188
  interface LocalDelegateKey {
182
189
  privateKey: string;
@@ -736,7 +743,7 @@ type WiringCollisionResolution = {
736
743
  action: 'abort';
737
744
  };
738
745
 
739
- declare const CONNECTOR_VERSION = "0.3.0-alpha.0";
746
+ declare const CONNECTOR_VERSION = "0.5.0-alpha.1";
740
747
  interface ConnectOptions {
741
748
  setupToken: string;
742
749
  apiBaseUrl: string;
@@ -881,6 +888,45 @@ interface ConnectOutcome {
881
888
  */
882
889
  superseded_agents_retired_locally?: boolean;
883
890
  retired_agent_ids?: readonly string[];
891
+ /**
892
+ * #3259, additive within schema_version 1: present only on a replace run
893
+ * where a retired directory's surviving ledger record could NOT be written —
894
+ * agent id → errno code (or `mirror_write_failed`). The directory is still
895
+ * retired (tombstoned in place, key files removed) and counts in
896
+ * `retired_agent_ids`; only `--doctor`'s view after the directory is deleted
897
+ * is lost.
898
+ */
899
+ retirement_mirror_errors?: Readonly<Record<string, string>>;
900
+ /**
901
+ * #3122, additive within schema_version 1. Every OTHER credential directory
902
+ * on this machine that still held key material when this run began — named
903
+ * BEFORE the first credential write (the same list the pre-write heads-up
904
+ * prints), with the account each can spend from, so a `--json` caller
905
+ * learns of the condition without parsing prose. "Live" here means "holds
906
+ * a stored API key locally" — no network call is made to ask the backend
907
+ * whether the key still authenticates (that is the doctor's probe). Always
908
+ * present on a completed run, `[]` on a clean machine; like
909
+ * `superseded_agent_ids`, an empty list from a root that could not be read
910
+ * is not proof of a clean machine.
911
+ */
912
+ existing_agents_before_write?: ReadonlyArray<{
913
+ agent_id: string;
914
+ account_address: string | null;
915
+ }>;
916
+ /**
917
+ * #3122, additive. Present only when this run took an MCP server name over
918
+ * from another agent's local binding record (`mcp-server-binding.json` in
919
+ * that directory): the previous holder, the backend it pointed at, when it
920
+ * was bound, and whether the backend changed — the case the backend cannot
921
+ * answer and the one that silently repoints a saved session.
922
+ */
923
+ server_name_rebound_from?: {
924
+ server_name: string;
925
+ agent_id: string;
926
+ api_url: string;
927
+ bound_at: string;
928
+ backend_changed: boolean;
929
+ };
884
930
  /**
885
931
  * #2091, additive within schema_version 1: `message` is the redacted human
886
932
  * refusal (automation used to get code + next_action and nothing to act
@@ -990,9 +1036,16 @@ declare function completionOutcome(input: {
990
1036
  /** #2551: only a replace run sets these; see the outcome fields' doc comments. */
991
1037
  supersededAgentsRetiredLocally?: boolean;
992
1038
  retiredAgentIds?: readonly string[];
1039
+ /** #3259: only set when a retirement's ledger mirror failed. */
1040
+ retirementMirrorErrors?: Readonly<Record<string, string>>;
993
1041
  setupChallengeExpiresAt?: string;
994
1042
  approvalRequired: boolean;
995
1043
  approvalUrl?: string;
1044
+ existingAgentsBeforeWrite?: ReadonlyArray<{
1045
+ agent_id: string;
1046
+ account_address: string | null;
1047
+ }>;
1048
+ serverNameReboundFrom?: ConnectOutcome['server_name_rebound_from'];
996
1049
  }): ConnectOutcome;
997
1050
  /**
998
1051
  * The failure record for the `--json` contract.
@@ -1053,9 +1106,14 @@ interface ParsedCli {
1053
1106
  unwire?: {
1054
1107
  reason?: string;
1055
1108
  replacedBy?: string;
1109
+ destroyKeyMaterial?: boolean;
1056
1110
  };
1057
1111
  /** Optional positional value of --unwire <dir> (else --name / --credentials-dir resolve it). */
1058
1112
  unwireDir?: string;
1113
+ /** #3123: reclaim signer-runtime directories no credential directory references. */
1114
+ pruneSignerRuntimes?: {
1115
+ dryRun: boolean;
1116
+ };
1059
1117
  /**
1060
1118
  * #1700: replace an agent's signing key on this machine. Two phases, because
1061
1119
  * the dashboard sits between them — `start` generates the key and prints its
@@ -1136,11 +1194,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
1136
1194
 
1137
1195
  declare const MCP_RUNTIME_MANIFEST: {
1138
1196
  readonly mcpPackage: "@haven_ai/mcp";
1139
- readonly mcpVersion: "0.3.0-alpha.0";
1197
+ readonly mcpVersion: "0.5.0-alpha.1";
1140
1198
  readonly sdkPackage: "@haven_ai/sdk";
1141
- readonly sdkVersion: "0.3.0-alpha.0";
1199
+ readonly sdkVersion: "0.5.0-alpha.1";
1142
1200
  readonly signerPackage: "@haven_ai/signer";
1143
- readonly signerVersion: "0.3.0-alpha.0";
1201
+ readonly signerVersion: "0.5.0-alpha.1";
1144
1202
  readonly minimumNodeVersion: "22.0.0";
1145
1203
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
1146
1204
  readonly requiredTools: readonly string[];