@haven_ai/connect 0.8.1-alpha.0 → 0.10.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 +117 -43
- package/dist/cli.cjs +2147 -1716
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2147 -1716
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +2149 -1716
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +84 -7
- package/dist/index.d.ts +84 -7
- package/dist/index.js +2148 -1717
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -17,6 +17,21 @@ interface ConnectApiClient {
|
|
|
17
17
|
* of the dashboard hand-off — see {@link AgentIdentity}.
|
|
18
18
|
*/
|
|
19
19
|
getAgentIdentity(apiKey: string): Promise<AgentIdentity>;
|
|
20
|
+
/**
|
|
21
|
+
* #3772: tell Haven which agents this run's `--replace` retired locally, so
|
|
22
|
+
* their own reads can warn a still-running session. Authenticated with the
|
|
23
|
+
* NEW agent's key. `null` when the backend predates the route (404); any
|
|
24
|
+
* other failure throws for the caller to log. Warning-only on the backend:
|
|
25
|
+
* nothing is paused or revoked.
|
|
26
|
+
*/
|
|
27
|
+
reportRetiredAgents?(input: ReportRetiredAgentsInput): Promise<{
|
|
28
|
+
recordedAgentIds: string[];
|
|
29
|
+
} | null>;
|
|
30
|
+
}
|
|
31
|
+
interface ReportRetiredAgentsInput {
|
|
32
|
+
setupId: string;
|
|
33
|
+
apiKey: string;
|
|
34
|
+
retiredAgentIds: readonly string[];
|
|
20
35
|
}
|
|
21
36
|
interface ConnectorStatusResponse {
|
|
22
37
|
status: string;
|
|
@@ -86,8 +101,9 @@ interface UpdateInstallStatusInput {
|
|
|
86
101
|
errorCode?: string | null;
|
|
87
102
|
environmentLabel?: string;
|
|
88
103
|
/**
|
|
89
|
-
* The other agent directories this machine holds, so the DASHBOARD can
|
|
90
|
-
* the owner
|
|
104
|
+
* The other agent directories this machine holds, so the DASHBOARD can list
|
|
105
|
+
* them for the owner (#2561). Every other directory, not a replace set: the
|
|
106
|
+
* dashboard calls none of them replaced and offers no revoke (#3830).
|
|
91
107
|
*
|
|
92
108
|
* A tri-state, and the middle case is why it is not a plain array:
|
|
93
109
|
*
|
|
@@ -237,6 +253,19 @@ interface PreflightCredentialStorageInput {
|
|
|
237
253
|
}
|
|
238
254
|
declare function preflightCredentialStorage(input?: PreflightCredentialStorageInput): Promise<string>;
|
|
239
255
|
declare function writeCredentialFiles(input: WriteCredentialInput): Promise<StoredCredentialPaths>;
|
|
256
|
+
interface ResolveAgentDirectoryOptions {
|
|
257
|
+
/** The credential ROOT to scan. Default: ~/.haven/agents. */
|
|
258
|
+
root?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Retired (tombstoned) directories may claim a slug. Only --unwire wants
|
|
261
|
+
* this: it must reach a retired agent to release its name. Selection for
|
|
262
|
+
* --doctor/--repair/--rekey never matches a tombstoned directory.
|
|
263
|
+
*/
|
|
264
|
+
allowRetired?: boolean;
|
|
265
|
+
}
|
|
266
|
+
/** Does THIS directory record the pair for `slug`? Shared agree-check for `--name` + `--credentials-dir`. */
|
|
267
|
+
declare function assertDirectoryRecordsSlug(directory: string, slug: string): Promise<void>;
|
|
268
|
+
declare function resolveAgentDirectoryBySlug(slug: string, opts?: ResolveAgentDirectoryOptions): Promise<string>;
|
|
240
269
|
declare function defaultAgentDirectory(agentId: string, baseDir?: string): string;
|
|
241
270
|
/**
|
|
242
271
|
* Where the terminal `ConnectOutcome` is parked so a caller that lost the
|
|
@@ -652,6 +681,14 @@ interface InstalledClientCandidate {
|
|
|
652
681
|
* whether that file exists today.
|
|
653
682
|
*/
|
|
654
683
|
configPath: string | null;
|
|
684
|
+
/**
|
|
685
|
+
* The file the config-file evidence was found in, when this candidate
|
|
686
|
+
* carries that tier. Usually the same file `configPath` names — except for
|
|
687
|
+
* Claude Code, whose evidence lives in `~/.claude.json` while `configPath`
|
|
688
|
+
* stays `null` (the connector would configure it through its own CLI, not
|
|
689
|
+
* by writing a file it owns).
|
|
690
|
+
*/
|
|
691
|
+
evidencePath?: string | null;
|
|
655
692
|
evidence: 'config-file' | 'client-directory';
|
|
656
693
|
}
|
|
657
694
|
interface ScanInstalledClientsOptions {
|
|
@@ -661,6 +698,8 @@ interface ScanInstalledClientsOptions {
|
|
|
661
698
|
env?: NodeJS.ProcessEnv;
|
|
662
699
|
/** Injectable so the scan is testable without a populated home directory. */
|
|
663
700
|
exists?: (path: string) => Promise<boolean>;
|
|
701
|
+
/** Injectable so the `mcpServers` evidence check is testable without a real file. */
|
|
702
|
+
readFile?: (path: string) => Promise<string>;
|
|
664
703
|
}
|
|
665
704
|
declare function scanInstalledClients(options?: ScanInstalledClientsOptions): Promise<InstalledClientCandidate[]>;
|
|
666
705
|
/**
|
|
@@ -743,7 +782,7 @@ type WiringCollisionResolution = {
|
|
|
743
782
|
action: 'abort';
|
|
744
783
|
};
|
|
745
784
|
|
|
746
|
-
declare const CONNECTOR_VERSION = "0.
|
|
785
|
+
declare const CONNECTOR_VERSION = "0.10.0-alpha.0";
|
|
747
786
|
interface ConnectOptions {
|
|
748
787
|
setupToken: string;
|
|
749
788
|
apiBaseUrl: string;
|
|
@@ -767,6 +806,19 @@ interface ConnectOptions {
|
|
|
767
806
|
environmentLabel?: string;
|
|
768
807
|
/** #1696: wiring slug for a named MCP pair + slug-keyed credential dir. */
|
|
769
808
|
serverName?: string;
|
|
809
|
+
/**
|
|
810
|
+
* #3737: derive the wiring slug from the agent's display name and install
|
|
811
|
+
* a NAMED pair (`haven-<slug>` / `haven-signer-<slug>`) instead of the bare
|
|
812
|
+
* one. The CLI passes this by default so that adding an agent never
|
|
813
|
+
* targets the bare pair and therefore never has to ask replace-vs-
|
|
814
|
+
* alongside; the LIBRARY keeps today's bare behaviour when neither
|
|
815
|
+
* `serverName` nor this option is set, so existing programmatic callers
|
|
816
|
+
* are unchanged. An explicit `serverName` always wins over derivation.
|
|
817
|
+
* The derived slug de-collides against EVERY directory name under the
|
|
818
|
+
* credential root, marks non-production backends with a `-dev` suffix
|
|
819
|
+
* (owner decision 4), and is refused nothing — it never displaces anyone.
|
|
820
|
+
*/
|
|
821
|
+
deriveServerName?: boolean;
|
|
770
822
|
/**
|
|
771
823
|
* #2551: when the bare pair on this machine is already wired to a different
|
|
772
824
|
* agent with a live key, replace it — re-point `haven` / `haven-signer` at
|
|
@@ -927,6 +979,16 @@ interface ConnectOutcome {
|
|
|
927
979
|
bound_at: string;
|
|
928
980
|
backend_changed: boolean;
|
|
929
981
|
};
|
|
982
|
+
/**
|
|
983
|
+
* #3737, additive within schema_version 1: the hosted MCP server name this
|
|
984
|
+
* run actually wired — `haven-<slug>` for a named run (derived or
|
|
985
|
+
* explicit), bare `haven` for a `--bare` / `--replace` run. The mirror of
|
|
986
|
+
* what `mcpServerName` reported to the backend at register and what the
|
|
987
|
+
* completion text names, carried structurally so a `--json` caller can
|
|
988
|
+
* verify `hermes mcp test <name>` without parsing prose. Always present on
|
|
989
|
+
* a completed run; absent on `failedConnectOutcome`, which wired nothing.
|
|
990
|
+
*/
|
|
991
|
+
server_name?: string;
|
|
930
992
|
/**
|
|
931
993
|
* #2091, additive within schema_version 1: `message` is the redacted human
|
|
932
994
|
* refusal (automation used to get code + next_action and nothing to act
|
|
@@ -992,6 +1054,14 @@ interface ConnectDeps {
|
|
|
992
1054
|
isStdoutTty?: boolean;
|
|
993
1055
|
/** Overridable so the #1719 installed-client prompt is testable without readline. */
|
|
994
1056
|
promptRuntime?: () => Promise<RuntimeId>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Overridable so the DEFAULT prompt thunk is observable: the call site in
|
|
1059
|
+
* `runtimeSelectionPrompt` must pass the hint scan's `env` to it (#3732) —
|
|
1060
|
+
* the prompt rung and the `--json` refusal describe ONE machine, so they
|
|
1061
|
+
* must look at the same environment. Takes the full scan options, env
|
|
1062
|
+
* included; defaults to `resolveRuntimeByInstalledClientPrompt`.
|
|
1063
|
+
*/
|
|
1064
|
+
promptRuntimeByInstalledClient?: typeof resolveRuntimeByInstalledClientPrompt;
|
|
995
1065
|
/**
|
|
996
1066
|
* Overridable so the #2551 replace-vs-alongside prompt is testable without
|
|
997
1067
|
* readline. Reached only through the same `interactive` + TTY gate as
|
|
@@ -1032,6 +1102,8 @@ declare function completionOutcome(input: {
|
|
|
1032
1102
|
runtimeInstall: RuntimeInstallResult;
|
|
1033
1103
|
delegateAddress: string;
|
|
1034
1104
|
hostedMcpUrl?: string;
|
|
1105
|
+
/** #3737: the resolved wiring slug; absent means the bare pair. */
|
|
1106
|
+
serverName?: string;
|
|
1035
1107
|
supersededAgentIds?: readonly string[];
|
|
1036
1108
|
/** #2551: only a replace run sets these; see the outcome fields' doc comments. */
|
|
1037
1109
|
supersededAgentsRetiredLocally?: boolean;
|
|
@@ -1046,6 +1118,11 @@ declare function completionOutcome(input: {
|
|
|
1046
1118
|
account_address: string | null;
|
|
1047
1119
|
}>;
|
|
1048
1120
|
serverNameReboundFrom?: ConnectOutcome['server_name_rebound_from'];
|
|
1121
|
+
/** #3772: set only when this run re-pointed wiring another agent held. */
|
|
1122
|
+
staleSession?: {
|
|
1123
|
+
agentIds: readonly string[];
|
|
1124
|
+
otherBackendAgentId?: string;
|
|
1125
|
+
};
|
|
1049
1126
|
}): ConnectOutcome;
|
|
1050
1127
|
/**
|
|
1051
1128
|
* The failure record for the `--json` contract.
|
|
@@ -1194,11 +1271,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
|
|
|
1194
1271
|
|
|
1195
1272
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
1196
1273
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
1197
|
-
readonly mcpVersion: "0.
|
|
1274
|
+
readonly mcpVersion: "0.10.0-alpha.0";
|
|
1198
1275
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
1199
|
-
readonly sdkVersion: "0.
|
|
1276
|
+
readonly sdkVersion: "0.10.0-alpha.0";
|
|
1200
1277
|
readonly signerPackage: "@haven_ai/signer";
|
|
1201
|
-
readonly signerVersion: "0.
|
|
1278
|
+
readonly signerVersion: "0.10.0-alpha.0";
|
|
1202
1279
|
readonly minimumNodeVersion: "22.0.0";
|
|
1203
1280
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
1204
1281
|
readonly requiredTools: readonly string[];
|
|
@@ -1214,4 +1291,4 @@ declare function mcpPackageSpec(): string;
|
|
|
1214
1291
|
declare function sdkPackageSpec(): string;
|
|
1215
1292
|
declare function signerPackageSpec(): string;
|
|
1216
1293
|
|
|
1217
|
-
export { CONNECTOR_VERSION, CONNECT_OUTCOME_FILENAME, CONNECT_OUTCOME_SCHEMA_VERSION, type ConnectApiClient, type ConnectDeps, ConnectError, type ConnectOptions, type ConnectOutcome, type ConnectOutcomeStatus, type ConnectResult, type InstalledClientCandidate, type InstalledClientHint, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type ParsedCli, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type PromptIo, RUNTIME_FLAG_VALUES, type RegisterSetupInput, type RegisterSetupResponse, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type RuntimeResolutionOptions, type RuntimeSelection, type ScanInstalledClientsOptions, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, completionOutcome, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, failedConnectOutcome, failureOutcomeFor, generateDelegateKey, helpText, installRuntime, installedClientHint, isConnectError, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, promptForInstalledClient, redactSecrets, resolveRuntimeByInstalledClientPrompt, resolveRuntimeSelection, runConnect, runtimeInstallCapabilities, runtimeProfile, scanInstalledClients, sdkPackageSpec, shortAddress, signerPackageSpec, writeConnectOutcomeRecord, writeCredentialFiles };
|
|
1294
|
+
export { CONNECTOR_VERSION, CONNECT_OUTCOME_FILENAME, CONNECT_OUTCOME_SCHEMA_VERSION, type ConnectApiClient, type ConnectDeps, ConnectError, type ConnectOptions, type ConnectOutcome, type ConnectOutcomeStatus, type ConnectResult, type InstalledClientCandidate, type InstalledClientHint, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type ParsedCli, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type PromptIo, RUNTIME_FLAG_VALUES, type RegisterSetupInput, type RegisterSetupResponse, type ResolveAgentDirectoryOptions, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type RuntimeResolutionOptions, type RuntimeSelection, type ScanInstalledClientsOptions, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, assertDirectoryRecordsSlug, completionOutcome, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, failedConnectOutcome, failureOutcomeFor, generateDelegateKey, helpText, installRuntime, installedClientHint, isConnectError, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, promptForInstalledClient, redactSecrets, resolveAgentDirectoryBySlug, resolveRuntimeByInstalledClientPrompt, resolveRuntimeSelection, runConnect, runtimeInstallCapabilities, runtimeProfile, scanInstalledClients, sdkPackageSpec, shortAddress, signerPackageSpec, writeConnectOutcomeRecord, writeCredentialFiles };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,21 @@ interface ConnectApiClient {
|
|
|
17
17
|
* of the dashboard hand-off — see {@link AgentIdentity}.
|
|
18
18
|
*/
|
|
19
19
|
getAgentIdentity(apiKey: string): Promise<AgentIdentity>;
|
|
20
|
+
/**
|
|
21
|
+
* #3772: tell Haven which agents this run's `--replace` retired locally, so
|
|
22
|
+
* their own reads can warn a still-running session. Authenticated with the
|
|
23
|
+
* NEW agent's key. `null` when the backend predates the route (404); any
|
|
24
|
+
* other failure throws for the caller to log. Warning-only on the backend:
|
|
25
|
+
* nothing is paused or revoked.
|
|
26
|
+
*/
|
|
27
|
+
reportRetiredAgents?(input: ReportRetiredAgentsInput): Promise<{
|
|
28
|
+
recordedAgentIds: string[];
|
|
29
|
+
} | null>;
|
|
30
|
+
}
|
|
31
|
+
interface ReportRetiredAgentsInput {
|
|
32
|
+
setupId: string;
|
|
33
|
+
apiKey: string;
|
|
34
|
+
retiredAgentIds: readonly string[];
|
|
20
35
|
}
|
|
21
36
|
interface ConnectorStatusResponse {
|
|
22
37
|
status: string;
|
|
@@ -86,8 +101,9 @@ interface UpdateInstallStatusInput {
|
|
|
86
101
|
errorCode?: string | null;
|
|
87
102
|
environmentLabel?: string;
|
|
88
103
|
/**
|
|
89
|
-
* The other agent directories this machine holds, so the DASHBOARD can
|
|
90
|
-
* the owner
|
|
104
|
+
* The other agent directories this machine holds, so the DASHBOARD can list
|
|
105
|
+
* them for the owner (#2561). Every other directory, not a replace set: the
|
|
106
|
+
* dashboard calls none of them replaced and offers no revoke (#3830).
|
|
91
107
|
*
|
|
92
108
|
* A tri-state, and the middle case is why it is not a plain array:
|
|
93
109
|
*
|
|
@@ -237,6 +253,19 @@ interface PreflightCredentialStorageInput {
|
|
|
237
253
|
}
|
|
238
254
|
declare function preflightCredentialStorage(input?: PreflightCredentialStorageInput): Promise<string>;
|
|
239
255
|
declare function writeCredentialFiles(input: WriteCredentialInput): Promise<StoredCredentialPaths>;
|
|
256
|
+
interface ResolveAgentDirectoryOptions {
|
|
257
|
+
/** The credential ROOT to scan. Default: ~/.haven/agents. */
|
|
258
|
+
root?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Retired (tombstoned) directories may claim a slug. Only --unwire wants
|
|
261
|
+
* this: it must reach a retired agent to release its name. Selection for
|
|
262
|
+
* --doctor/--repair/--rekey never matches a tombstoned directory.
|
|
263
|
+
*/
|
|
264
|
+
allowRetired?: boolean;
|
|
265
|
+
}
|
|
266
|
+
/** Does THIS directory record the pair for `slug`? Shared agree-check for `--name` + `--credentials-dir`. */
|
|
267
|
+
declare function assertDirectoryRecordsSlug(directory: string, slug: string): Promise<void>;
|
|
268
|
+
declare function resolveAgentDirectoryBySlug(slug: string, opts?: ResolveAgentDirectoryOptions): Promise<string>;
|
|
240
269
|
declare function defaultAgentDirectory(agentId: string, baseDir?: string): string;
|
|
241
270
|
/**
|
|
242
271
|
* Where the terminal `ConnectOutcome` is parked so a caller that lost the
|
|
@@ -652,6 +681,14 @@ interface InstalledClientCandidate {
|
|
|
652
681
|
* whether that file exists today.
|
|
653
682
|
*/
|
|
654
683
|
configPath: string | null;
|
|
684
|
+
/**
|
|
685
|
+
* The file the config-file evidence was found in, when this candidate
|
|
686
|
+
* carries that tier. Usually the same file `configPath` names — except for
|
|
687
|
+
* Claude Code, whose evidence lives in `~/.claude.json` while `configPath`
|
|
688
|
+
* stays `null` (the connector would configure it through its own CLI, not
|
|
689
|
+
* by writing a file it owns).
|
|
690
|
+
*/
|
|
691
|
+
evidencePath?: string | null;
|
|
655
692
|
evidence: 'config-file' | 'client-directory';
|
|
656
693
|
}
|
|
657
694
|
interface ScanInstalledClientsOptions {
|
|
@@ -661,6 +698,8 @@ interface ScanInstalledClientsOptions {
|
|
|
661
698
|
env?: NodeJS.ProcessEnv;
|
|
662
699
|
/** Injectable so the scan is testable without a populated home directory. */
|
|
663
700
|
exists?: (path: string) => Promise<boolean>;
|
|
701
|
+
/** Injectable so the `mcpServers` evidence check is testable without a real file. */
|
|
702
|
+
readFile?: (path: string) => Promise<string>;
|
|
664
703
|
}
|
|
665
704
|
declare function scanInstalledClients(options?: ScanInstalledClientsOptions): Promise<InstalledClientCandidate[]>;
|
|
666
705
|
/**
|
|
@@ -743,7 +782,7 @@ type WiringCollisionResolution = {
|
|
|
743
782
|
action: 'abort';
|
|
744
783
|
};
|
|
745
784
|
|
|
746
|
-
declare const CONNECTOR_VERSION = "0.
|
|
785
|
+
declare const CONNECTOR_VERSION = "0.10.0-alpha.0";
|
|
747
786
|
interface ConnectOptions {
|
|
748
787
|
setupToken: string;
|
|
749
788
|
apiBaseUrl: string;
|
|
@@ -767,6 +806,19 @@ interface ConnectOptions {
|
|
|
767
806
|
environmentLabel?: string;
|
|
768
807
|
/** #1696: wiring slug for a named MCP pair + slug-keyed credential dir. */
|
|
769
808
|
serverName?: string;
|
|
809
|
+
/**
|
|
810
|
+
* #3737: derive the wiring slug from the agent's display name and install
|
|
811
|
+
* a NAMED pair (`haven-<slug>` / `haven-signer-<slug>`) instead of the bare
|
|
812
|
+
* one. The CLI passes this by default so that adding an agent never
|
|
813
|
+
* targets the bare pair and therefore never has to ask replace-vs-
|
|
814
|
+
* alongside; the LIBRARY keeps today's bare behaviour when neither
|
|
815
|
+
* `serverName` nor this option is set, so existing programmatic callers
|
|
816
|
+
* are unchanged. An explicit `serverName` always wins over derivation.
|
|
817
|
+
* The derived slug de-collides against EVERY directory name under the
|
|
818
|
+
* credential root, marks non-production backends with a `-dev` suffix
|
|
819
|
+
* (owner decision 4), and is refused nothing — it never displaces anyone.
|
|
820
|
+
*/
|
|
821
|
+
deriveServerName?: boolean;
|
|
770
822
|
/**
|
|
771
823
|
* #2551: when the bare pair on this machine is already wired to a different
|
|
772
824
|
* agent with a live key, replace it — re-point `haven` / `haven-signer` at
|
|
@@ -927,6 +979,16 @@ interface ConnectOutcome {
|
|
|
927
979
|
bound_at: string;
|
|
928
980
|
backend_changed: boolean;
|
|
929
981
|
};
|
|
982
|
+
/**
|
|
983
|
+
* #3737, additive within schema_version 1: the hosted MCP server name this
|
|
984
|
+
* run actually wired — `haven-<slug>` for a named run (derived or
|
|
985
|
+
* explicit), bare `haven` for a `--bare` / `--replace` run. The mirror of
|
|
986
|
+
* what `mcpServerName` reported to the backend at register and what the
|
|
987
|
+
* completion text names, carried structurally so a `--json` caller can
|
|
988
|
+
* verify `hermes mcp test <name>` without parsing prose. Always present on
|
|
989
|
+
* a completed run; absent on `failedConnectOutcome`, which wired nothing.
|
|
990
|
+
*/
|
|
991
|
+
server_name?: string;
|
|
930
992
|
/**
|
|
931
993
|
* #2091, additive within schema_version 1: `message` is the redacted human
|
|
932
994
|
* refusal (automation used to get code + next_action and nothing to act
|
|
@@ -992,6 +1054,14 @@ interface ConnectDeps {
|
|
|
992
1054
|
isStdoutTty?: boolean;
|
|
993
1055
|
/** Overridable so the #1719 installed-client prompt is testable without readline. */
|
|
994
1056
|
promptRuntime?: () => Promise<RuntimeId>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Overridable so the DEFAULT prompt thunk is observable: the call site in
|
|
1059
|
+
* `runtimeSelectionPrompt` must pass the hint scan's `env` to it (#3732) —
|
|
1060
|
+
* the prompt rung and the `--json` refusal describe ONE machine, so they
|
|
1061
|
+
* must look at the same environment. Takes the full scan options, env
|
|
1062
|
+
* included; defaults to `resolveRuntimeByInstalledClientPrompt`.
|
|
1063
|
+
*/
|
|
1064
|
+
promptRuntimeByInstalledClient?: typeof resolveRuntimeByInstalledClientPrompt;
|
|
995
1065
|
/**
|
|
996
1066
|
* Overridable so the #2551 replace-vs-alongside prompt is testable without
|
|
997
1067
|
* readline. Reached only through the same `interactive` + TTY gate as
|
|
@@ -1032,6 +1102,8 @@ declare function completionOutcome(input: {
|
|
|
1032
1102
|
runtimeInstall: RuntimeInstallResult;
|
|
1033
1103
|
delegateAddress: string;
|
|
1034
1104
|
hostedMcpUrl?: string;
|
|
1105
|
+
/** #3737: the resolved wiring slug; absent means the bare pair. */
|
|
1106
|
+
serverName?: string;
|
|
1035
1107
|
supersededAgentIds?: readonly string[];
|
|
1036
1108
|
/** #2551: only a replace run sets these; see the outcome fields' doc comments. */
|
|
1037
1109
|
supersededAgentsRetiredLocally?: boolean;
|
|
@@ -1046,6 +1118,11 @@ declare function completionOutcome(input: {
|
|
|
1046
1118
|
account_address: string | null;
|
|
1047
1119
|
}>;
|
|
1048
1120
|
serverNameReboundFrom?: ConnectOutcome['server_name_rebound_from'];
|
|
1121
|
+
/** #3772: set only when this run re-pointed wiring another agent held. */
|
|
1122
|
+
staleSession?: {
|
|
1123
|
+
agentIds: readonly string[];
|
|
1124
|
+
otherBackendAgentId?: string;
|
|
1125
|
+
};
|
|
1049
1126
|
}): ConnectOutcome;
|
|
1050
1127
|
/**
|
|
1051
1128
|
* The failure record for the `--json` contract.
|
|
@@ -1194,11 +1271,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
|
|
|
1194
1271
|
|
|
1195
1272
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
1196
1273
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
1197
|
-
readonly mcpVersion: "0.
|
|
1274
|
+
readonly mcpVersion: "0.10.0-alpha.0";
|
|
1198
1275
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
1199
|
-
readonly sdkVersion: "0.
|
|
1276
|
+
readonly sdkVersion: "0.10.0-alpha.0";
|
|
1200
1277
|
readonly signerPackage: "@haven_ai/signer";
|
|
1201
|
-
readonly signerVersion: "0.
|
|
1278
|
+
readonly signerVersion: "0.10.0-alpha.0";
|
|
1202
1279
|
readonly minimumNodeVersion: "22.0.0";
|
|
1203
1280
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
1204
1281
|
readonly requiredTools: readonly string[];
|
|
@@ -1214,4 +1291,4 @@ declare function mcpPackageSpec(): string;
|
|
|
1214
1291
|
declare function sdkPackageSpec(): string;
|
|
1215
1292
|
declare function signerPackageSpec(): string;
|
|
1216
1293
|
|
|
1217
|
-
export { CONNECTOR_VERSION, CONNECT_OUTCOME_FILENAME, CONNECT_OUTCOME_SCHEMA_VERSION, type ConnectApiClient, type ConnectDeps, ConnectError, type ConnectOptions, type ConnectOutcome, type ConnectOutcomeStatus, type ConnectResult, type InstalledClientCandidate, type InstalledClientHint, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type ParsedCli, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type PromptIo, RUNTIME_FLAG_VALUES, type RegisterSetupInput, type RegisterSetupResponse, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type RuntimeResolutionOptions, type RuntimeSelection, type ScanInstalledClientsOptions, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, completionOutcome, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, failedConnectOutcome, failureOutcomeFor, generateDelegateKey, helpText, installRuntime, installedClientHint, isConnectError, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, promptForInstalledClient, redactSecrets, resolveRuntimeByInstalledClientPrompt, resolveRuntimeSelection, runConnect, runtimeInstallCapabilities, runtimeProfile, scanInstalledClients, sdkPackageSpec, shortAddress, signerPackageSpec, writeConnectOutcomeRecord, writeCredentialFiles };
|
|
1294
|
+
export { CONNECTOR_VERSION, CONNECT_OUTCOME_FILENAME, CONNECT_OUTCOME_SCHEMA_VERSION, type ConnectApiClient, type ConnectDeps, ConnectError, type ConnectOptions, type ConnectOutcome, type ConnectOutcomeStatus, type ConnectResult, type InstalledClientCandidate, type InstalledClientHint, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type ParsedCli, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type PromptIo, RUNTIME_FLAG_VALUES, type RegisterSetupInput, type RegisterSetupResponse, type ResolveAgentDirectoryOptions, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type RuntimeResolutionOptions, type RuntimeSelection, type ScanInstalledClientsOptions, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, assertDirectoryRecordsSlug, completionOutcome, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, failedConnectOutcome, failureOutcomeFor, generateDelegateKey, helpText, installRuntime, installedClientHint, isConnectError, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, promptForInstalledClient, redactSecrets, resolveAgentDirectoryBySlug, resolveRuntimeByInstalledClientPrompt, resolveRuntimeSelection, runConnect, runtimeInstallCapabilities, runtimeProfile, scanInstalledClients, sdkPackageSpec, shortAddress, signerPackageSpec, writeConnectOutcomeRecord, writeCredentialFiles };
|