@haven_ai/connect 0.9.0-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/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 offer
90
- * the owner a one-click revoke of what this setup superseded (#2561).
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
@@ -753,7 +782,7 @@ type WiringCollisionResolution = {
753
782
  action: 'abort';
754
783
  };
755
784
 
756
- declare const CONNECTOR_VERSION = "0.9.0-alpha.0";
785
+ declare const CONNECTOR_VERSION = "0.10.0-alpha.0";
757
786
  interface ConnectOptions {
758
787
  setupToken: string;
759
788
  apiBaseUrl: string;
@@ -1242,11 +1271,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
1242
1271
 
1243
1272
  declare const MCP_RUNTIME_MANIFEST: {
1244
1273
  readonly mcpPackage: "@haven_ai/mcp";
1245
- readonly mcpVersion: "0.9.0-alpha.0";
1274
+ readonly mcpVersion: "0.10.0-alpha.0";
1246
1275
  readonly sdkPackage: "@haven_ai/sdk";
1247
- readonly sdkVersion: "0.9.0-alpha.0";
1276
+ readonly sdkVersion: "0.10.0-alpha.0";
1248
1277
  readonly signerPackage: "@haven_ai/signer";
1249
- readonly signerVersion: "0.9.0-alpha.0";
1278
+ readonly signerVersion: "0.10.0-alpha.0";
1250
1279
  readonly minimumNodeVersion: "22.0.0";
1251
1280
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
1252
1281
  readonly requiredTools: readonly string[];
@@ -1262,4 +1291,4 @@ declare function mcpPackageSpec(): string;
1262
1291
  declare function sdkPackageSpec(): string;
1263
1292
  declare function signerPackageSpec(): string;
1264
1293
 
1265
- 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 offer
90
- * the owner a one-click revoke of what this setup superseded (#2561).
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
@@ -753,7 +782,7 @@ type WiringCollisionResolution = {
753
782
  action: 'abort';
754
783
  };
755
784
 
756
- declare const CONNECTOR_VERSION = "0.9.0-alpha.0";
785
+ declare const CONNECTOR_VERSION = "0.10.0-alpha.0";
757
786
  interface ConnectOptions {
758
787
  setupToken: string;
759
788
  apiBaseUrl: string;
@@ -1242,11 +1271,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
1242
1271
 
1243
1272
  declare const MCP_RUNTIME_MANIFEST: {
1244
1273
  readonly mcpPackage: "@haven_ai/mcp";
1245
- readonly mcpVersion: "0.9.0-alpha.0";
1274
+ readonly mcpVersion: "0.10.0-alpha.0";
1246
1275
  readonly sdkPackage: "@haven_ai/sdk";
1247
- readonly sdkVersion: "0.9.0-alpha.0";
1276
+ readonly sdkVersion: "0.10.0-alpha.0";
1248
1277
  readonly signerPackage: "@haven_ai/signer";
1249
- readonly signerVersion: "0.9.0-alpha.0";
1278
+ readonly signerVersion: "0.10.0-alpha.0";
1250
1279
  readonly minimumNodeVersion: "22.0.0";
1251
1280
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
1252
1281
  readonly requiredTools: readonly string[];
@@ -1262,4 +1291,4 @@ declare function mcpPackageSpec(): string;
1262
1291
  declare function sdkPackageSpec(): string;
1263
1292
  declare function signerPackageSpec(): string;
1264
1293
 
1265
- 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 };