@haven_ai/connect 0.1.29-alpha.0 → 0.1.30-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 +92 -4
- package/dist/cli.cjs +2290 -1621
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2273 -1604
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +2293 -1620
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -4
- package/dist/index.d.ts +50 -4
- package/dist/index.js +2299 -1626
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -12,6 +12,11 @@ interface ConnectApiClient {
|
|
|
12
12
|
* never any secret material.
|
|
13
13
|
*/
|
|
14
14
|
getConnectorStatus(setupId: string, apiKey: string): Promise<ConnectorStatusResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* #1700: the agent behind an API key. Used by the re-key flow on both sides
|
|
17
|
+
* of the dashboard hand-off — see {@link AgentIdentity}.
|
|
18
|
+
*/
|
|
19
|
+
getAgentIdentity(apiKey: string): Promise<AgentIdentity>;
|
|
15
20
|
}
|
|
16
21
|
interface ConnectorStatusResponse {
|
|
17
22
|
status: string;
|
|
@@ -33,6 +38,18 @@ interface RegisterSetupInput extends ResolveSetupInput {
|
|
|
33
38
|
proofSignature: string;
|
|
34
39
|
apiKeyHash: string;
|
|
35
40
|
apiKeyPrefix: string;
|
|
41
|
+
/**
|
|
42
|
+
* #1878: the RESOLVED hosted MCP server name this agent is being wired as —
|
|
43
|
+
* `haven` for the bare pair, `haven-<slug>` for a named one. Sent so the
|
|
44
|
+
* dashboard can tell two agents in one harness apart; it is a display aid
|
|
45
|
+
* and Haven keys nothing off it.
|
|
46
|
+
*
|
|
47
|
+
* Always sent by a connector that supports it, bare pair included. Omitting
|
|
48
|
+
* it for the bare pair would make "absent" ambiguous between *this is the
|
|
49
|
+
* unnamed pair* and *an older connector said nothing*, and only the second
|
|
50
|
+
* of those may render as unknown.
|
|
51
|
+
*/
|
|
52
|
+
mcpServerName?: string;
|
|
36
53
|
connectorContext?: ConnectorContext;
|
|
37
54
|
installCapabilities?: {
|
|
38
55
|
canWriteRuntimeConfig?: boolean;
|
|
@@ -105,6 +122,25 @@ interface RegisterSetupResponse {
|
|
|
105
122
|
hosted_mcp_url: string;
|
|
106
123
|
next_action: string;
|
|
107
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* The agent identity behind an API key (#1700).
|
|
127
|
+
*
|
|
128
|
+
* Read from `GET /machine-payments/agent`, the same agent-authenticated
|
|
129
|
+
* endpoint the SDK's `getAgent()` uses. Re-key needs it twice and for two
|
|
130
|
+
* different questions: BEFORE, to refuse a legacy-rail account the way the
|
|
131
|
+
* backend would rather than let the owner discover it five signed steps later;
|
|
132
|
+
* and AFTER, to prove the API key the owner pasted really belongs to this
|
|
133
|
+
* agent and really names the key this machine just generated.
|
|
134
|
+
*/
|
|
135
|
+
interface AgentIdentity {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
status: string;
|
|
139
|
+
safe_address: string | null;
|
|
140
|
+
delegate_address: string | null;
|
|
141
|
+
chain_id: number | null;
|
|
142
|
+
execution_rail: 'legacy' | 'delegation' | string;
|
|
143
|
+
}
|
|
108
144
|
declare function createConnectApiClient(baseUrl: string, fetchImpl?: typeof fetch): ConnectApiClient;
|
|
109
145
|
|
|
110
146
|
interface LocalDelegateKey {
|
|
@@ -411,7 +447,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
|
|
|
411
447
|
restartRequired: boolean;
|
|
412
448
|
};
|
|
413
449
|
|
|
414
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
450
|
+
declare const CONNECTOR_VERSION = "0.1.30-alpha.0";
|
|
415
451
|
interface ConnectOptions {
|
|
416
452
|
setupToken: string;
|
|
417
453
|
apiBaseUrl: string;
|
|
@@ -564,6 +600,16 @@ interface ParsedCli {
|
|
|
564
600
|
reason?: string;
|
|
565
601
|
replacedBy?: string;
|
|
566
602
|
};
|
|
603
|
+
/**
|
|
604
|
+
* #1700: replace an agent's signing key on this machine. Two phases, because
|
|
605
|
+
* the dashboard sits between them — `start` generates the key and prints its
|
|
606
|
+
* address, `finish` writes the key the owner brings back. No setup token: the
|
|
607
|
+
* re-key API is owner-authenticated and this connector never calls it.
|
|
608
|
+
*/
|
|
609
|
+
rekey?: {
|
|
610
|
+
phase: 'start' | 'finish';
|
|
611
|
+
newApiKey?: string;
|
|
612
|
+
};
|
|
567
613
|
}
|
|
568
614
|
declare function parseArgs(argv: string[], env?: NodeJS.ProcessEnv): ParsedCli;
|
|
569
615
|
declare function helpText(): string;
|
|
@@ -651,11 +697,11 @@ declare function resolveRuntimeByInstalledClientPrompt(options?: ScanInstalledCl
|
|
|
651
697
|
|
|
652
698
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
653
699
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
654
|
-
readonly mcpVersion: "0.1.
|
|
700
|
+
readonly mcpVersion: "0.1.30-alpha.0";
|
|
655
701
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
656
|
-
readonly sdkVersion: "0.1.
|
|
702
|
+
readonly sdkVersion: "0.1.30-alpha.0";
|
|
657
703
|
readonly signerPackage: "@haven_ai/signer";
|
|
658
|
-
readonly signerVersion: "0.1.
|
|
704
|
+
readonly signerVersion: "0.1.30-alpha.0";
|
|
659
705
|
readonly minimumNodeVersion: "22.0.0";
|
|
660
706
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
661
707
|
readonly requiredTools: readonly string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ interface ConnectApiClient {
|
|
|
12
12
|
* never any secret material.
|
|
13
13
|
*/
|
|
14
14
|
getConnectorStatus(setupId: string, apiKey: string): Promise<ConnectorStatusResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* #1700: the agent behind an API key. Used by the re-key flow on both sides
|
|
17
|
+
* of the dashboard hand-off — see {@link AgentIdentity}.
|
|
18
|
+
*/
|
|
19
|
+
getAgentIdentity(apiKey: string): Promise<AgentIdentity>;
|
|
15
20
|
}
|
|
16
21
|
interface ConnectorStatusResponse {
|
|
17
22
|
status: string;
|
|
@@ -33,6 +38,18 @@ interface RegisterSetupInput extends ResolveSetupInput {
|
|
|
33
38
|
proofSignature: string;
|
|
34
39
|
apiKeyHash: string;
|
|
35
40
|
apiKeyPrefix: string;
|
|
41
|
+
/**
|
|
42
|
+
* #1878: the RESOLVED hosted MCP server name this agent is being wired as —
|
|
43
|
+
* `haven` for the bare pair, `haven-<slug>` for a named one. Sent so the
|
|
44
|
+
* dashboard can tell two agents in one harness apart; it is a display aid
|
|
45
|
+
* and Haven keys nothing off it.
|
|
46
|
+
*
|
|
47
|
+
* Always sent by a connector that supports it, bare pair included. Omitting
|
|
48
|
+
* it for the bare pair would make "absent" ambiguous between *this is the
|
|
49
|
+
* unnamed pair* and *an older connector said nothing*, and only the second
|
|
50
|
+
* of those may render as unknown.
|
|
51
|
+
*/
|
|
52
|
+
mcpServerName?: string;
|
|
36
53
|
connectorContext?: ConnectorContext;
|
|
37
54
|
installCapabilities?: {
|
|
38
55
|
canWriteRuntimeConfig?: boolean;
|
|
@@ -105,6 +122,25 @@ interface RegisterSetupResponse {
|
|
|
105
122
|
hosted_mcp_url: string;
|
|
106
123
|
next_action: string;
|
|
107
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* The agent identity behind an API key (#1700).
|
|
127
|
+
*
|
|
128
|
+
* Read from `GET /machine-payments/agent`, the same agent-authenticated
|
|
129
|
+
* endpoint the SDK's `getAgent()` uses. Re-key needs it twice and for two
|
|
130
|
+
* different questions: BEFORE, to refuse a legacy-rail account the way the
|
|
131
|
+
* backend would rather than let the owner discover it five signed steps later;
|
|
132
|
+
* and AFTER, to prove the API key the owner pasted really belongs to this
|
|
133
|
+
* agent and really names the key this machine just generated.
|
|
134
|
+
*/
|
|
135
|
+
interface AgentIdentity {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
status: string;
|
|
139
|
+
safe_address: string | null;
|
|
140
|
+
delegate_address: string | null;
|
|
141
|
+
chain_id: number | null;
|
|
142
|
+
execution_rail: 'legacy' | 'delegation' | string;
|
|
143
|
+
}
|
|
108
144
|
declare function createConnectApiClient(baseUrl: string, fetchImpl?: typeof fetch): ConnectApiClient;
|
|
109
145
|
|
|
110
146
|
interface LocalDelegateKey {
|
|
@@ -411,7 +447,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
|
|
|
411
447
|
restartRequired: boolean;
|
|
412
448
|
};
|
|
413
449
|
|
|
414
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
450
|
+
declare const CONNECTOR_VERSION = "0.1.30-alpha.0";
|
|
415
451
|
interface ConnectOptions {
|
|
416
452
|
setupToken: string;
|
|
417
453
|
apiBaseUrl: string;
|
|
@@ -564,6 +600,16 @@ interface ParsedCli {
|
|
|
564
600
|
reason?: string;
|
|
565
601
|
replacedBy?: string;
|
|
566
602
|
};
|
|
603
|
+
/**
|
|
604
|
+
* #1700: replace an agent's signing key on this machine. Two phases, because
|
|
605
|
+
* the dashboard sits between them — `start` generates the key and prints its
|
|
606
|
+
* address, `finish` writes the key the owner brings back. No setup token: the
|
|
607
|
+
* re-key API is owner-authenticated and this connector never calls it.
|
|
608
|
+
*/
|
|
609
|
+
rekey?: {
|
|
610
|
+
phase: 'start' | 'finish';
|
|
611
|
+
newApiKey?: string;
|
|
612
|
+
};
|
|
567
613
|
}
|
|
568
614
|
declare function parseArgs(argv: string[], env?: NodeJS.ProcessEnv): ParsedCli;
|
|
569
615
|
declare function helpText(): string;
|
|
@@ -651,11 +697,11 @@ declare function resolveRuntimeByInstalledClientPrompt(options?: ScanInstalledCl
|
|
|
651
697
|
|
|
652
698
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
653
699
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
654
|
-
readonly mcpVersion: "0.1.
|
|
700
|
+
readonly mcpVersion: "0.1.30-alpha.0";
|
|
655
701
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
656
|
-
readonly sdkVersion: "0.1.
|
|
702
|
+
readonly sdkVersion: "0.1.30-alpha.0";
|
|
657
703
|
readonly signerPackage: "@haven_ai/signer";
|
|
658
|
-
readonly signerVersion: "0.1.
|
|
704
|
+
readonly signerVersion: "0.1.30-alpha.0";
|
|
659
705
|
readonly minimumNodeVersion: "22.0.0";
|
|
660
706
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
661
707
|
readonly requiredTools: readonly string[];
|