@haven_ai/connect 0.1.22-alpha.0 → 0.1.23-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 +47 -7
- package/dist/cli.cjs +226 -62
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +7 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.js +225 -62
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +232 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -6
- package/dist/index.d.ts +62 -6
- package/dist/index.js +230 -55
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { CliIo, runCli } from './cli.cjs';
|
|
2
|
+
|
|
1
3
|
interface ConnectApiClient {
|
|
2
4
|
resolveSetup(input: ResolveSetupInput): Promise<ResolvedSetup>;
|
|
3
5
|
registerSetup(input: RegisterSetupInput): Promise<RegisterSetupResponse>;
|
|
@@ -133,6 +135,8 @@ interface RuntimeProfile {
|
|
|
133
135
|
label: string;
|
|
134
136
|
restartMode: RestartMode;
|
|
135
137
|
canWriteRuntimeConfig: boolean;
|
|
138
|
+
/** Precise, runtime-owned instruction for loading a freshly written MCP entry. */
|
|
139
|
+
activationInstruction: string;
|
|
136
140
|
}
|
|
137
141
|
declare function runtimeProfile(runtime: string | undefined, env?: NodeJS.ProcessEnv): RuntimeProfile;
|
|
138
142
|
declare function normalizeRuntime(runtime: string | undefined, env?: NodeJS.ProcessEnv): RuntimeId;
|
|
@@ -264,7 +268,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
|
|
|
264
268
|
restartRequired: boolean;
|
|
265
269
|
};
|
|
266
270
|
|
|
267
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
271
|
+
declare const CONNECTOR_VERSION = "0.1.23-alpha.0";
|
|
268
272
|
interface ConnectOptions {
|
|
269
273
|
setupToken: string;
|
|
270
274
|
apiBaseUrl: string;
|
|
@@ -276,6 +280,42 @@ interface ConnectOptions {
|
|
|
276
280
|
ackLocalTools?: boolean;
|
|
277
281
|
localMcp?: boolean;
|
|
278
282
|
}
|
|
283
|
+
/** The stable machine-readable result emitted by `haven-connect --json`. */
|
|
284
|
+
declare const CONNECT_OUTCOME_SCHEMA_VERSION: 1;
|
|
285
|
+
type ConnectOutcomeStatus = 'complete' | 'action_required' | 'failed';
|
|
286
|
+
interface ConnectOutcome {
|
|
287
|
+
schema_version: typeof CONNECT_OUTCOME_SCHEMA_VERSION;
|
|
288
|
+
outcome: ConnectOutcomeStatus;
|
|
289
|
+
runtime: string;
|
|
290
|
+
topology: string;
|
|
291
|
+
configuration: {
|
|
292
|
+
hosted_mcp: boolean;
|
|
293
|
+
local_signer: boolean;
|
|
294
|
+
local_mcp: boolean;
|
|
295
|
+
};
|
|
296
|
+
probe: {
|
|
297
|
+
result: string;
|
|
298
|
+
};
|
|
299
|
+
activation: {
|
|
300
|
+
restart_required: boolean;
|
|
301
|
+
instruction: string;
|
|
302
|
+
};
|
|
303
|
+
next_action: string;
|
|
304
|
+
approval: {
|
|
305
|
+
required: boolean;
|
|
306
|
+
expires_at: string | null;
|
|
307
|
+
};
|
|
308
|
+
verification: {
|
|
309
|
+
tools: readonly ['haven_get_agent', 'haven_get_allowances'];
|
|
310
|
+
instruction: string;
|
|
311
|
+
};
|
|
312
|
+
delegate_address?: string;
|
|
313
|
+
setup_challenge_expires_at?: string;
|
|
314
|
+
error?: {
|
|
315
|
+
code: string;
|
|
316
|
+
next_action: string;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
279
319
|
interface ConnectDeps {
|
|
280
320
|
api?: ConnectApiClient;
|
|
281
321
|
generateKey?: () => LocalDelegateKey;
|
|
@@ -284,6 +324,8 @@ interface ConnectDeps {
|
|
|
284
324
|
writeCredentials?: typeof writeCredentialFiles;
|
|
285
325
|
installRuntime?: typeof installRuntime;
|
|
286
326
|
log?: (message: string) => void;
|
|
327
|
+
/** JSON CLI mode must not expose owner-only credential file locations. */
|
|
328
|
+
redactPaths?: boolean;
|
|
287
329
|
/** Overridable so the Node-floor refusal is testable without spawning a Node. */
|
|
288
330
|
nodeVersion?: string;
|
|
289
331
|
}
|
|
@@ -292,12 +334,26 @@ interface ConnectResult {
|
|
|
292
334
|
agentId: string;
|
|
293
335
|
delegateAddress: string;
|
|
294
336
|
credentialPaths: StoredCredentialPaths;
|
|
337
|
+
/** Additive, secret-free completion contract shared by library callers and --json. */
|
|
338
|
+
outcome: ConnectOutcome;
|
|
295
339
|
}
|
|
296
340
|
declare function runConnect(options: ConnectOptions, deps?: ConnectDeps): Promise<ConnectResult>;
|
|
341
|
+
declare function completionOutcome(input: {
|
|
342
|
+
runtimeInstall: RuntimeInstallResult;
|
|
343
|
+
delegateAddress: string;
|
|
344
|
+
setupChallengeExpiresAt?: string;
|
|
345
|
+
approvalRequired: boolean;
|
|
346
|
+
}): ConnectOutcome;
|
|
347
|
+
/**
|
|
348
|
+
* A deliberately terse failure record: error messages can contain server or
|
|
349
|
+
* filesystem detail, while this public contract must remain safe to serialize.
|
|
350
|
+
*/
|
|
351
|
+
declare function failedConnectOutcome(runtimeHint: string | undefined, error: unknown): ConnectOutcome;
|
|
297
352
|
|
|
298
353
|
interface ParsedCli {
|
|
299
354
|
options: ConnectOptions;
|
|
300
355
|
help: boolean;
|
|
356
|
+
json: boolean;
|
|
301
357
|
}
|
|
302
358
|
declare function parseArgs(argv: string[], env?: NodeJS.ProcessEnv): ParsedCli;
|
|
303
359
|
declare function helpText(): string;
|
|
@@ -307,12 +363,12 @@ declare function shortAddress(address: string): string;
|
|
|
307
363
|
|
|
308
364
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
309
365
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
310
|
-
readonly mcpVersion: "0.1.
|
|
366
|
+
readonly mcpVersion: "0.1.23-alpha.0";
|
|
311
367
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
312
|
-
readonly sdkVersion: "0.1.
|
|
368
|
+
readonly sdkVersion: "0.1.23-alpha.0";
|
|
313
369
|
readonly signerPackage: "@haven_ai/signer";
|
|
314
|
-
readonly signerVersion: "0.1.
|
|
315
|
-
readonly minimumNodeVersion: "
|
|
370
|
+
readonly signerVersion: "0.1.23-alpha.0";
|
|
371
|
+
readonly minimumNodeVersion: "22.0.0";
|
|
316
372
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
317
373
|
readonly requiredTools: readonly string[];
|
|
318
374
|
};
|
|
@@ -320,4 +376,4 @@ declare function mcpPackageSpec(): string;
|
|
|
320
376
|
declare function sdkPackageSpec(): string;
|
|
321
377
|
declare function signerPackageSpec(): string;
|
|
322
378
|
|
|
323
|
-
export { CONNECTOR_VERSION, type ConnectApiClient, type ConnectDeps, type ConnectOptions, type ConnectResult, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type RegisterSetupInput, type RegisterSetupResponse, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, generateDelegateKey, helpText, installRuntime, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, redactSecrets, runConnect, runtimeInstallCapabilities, runtimeProfile, sdkPackageSpec, shortAddress, signerPackageSpec, writeCredentialFiles };
|
|
379
|
+
export { CONNECTOR_VERSION, CONNECT_OUTCOME_SCHEMA_VERSION, type ConnectApiClient, type ConnectDeps, type ConnectOptions, type ConnectOutcome, type ConnectOutcomeStatus, type ConnectResult, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type ParsedCli, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type RegisterSetupInput, type RegisterSetupResponse, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, completionOutcome, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, failedConnectOutcome, generateDelegateKey, helpText, installRuntime, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, redactSecrets, runConnect, runtimeInstallCapabilities, runtimeProfile, sdkPackageSpec, shortAddress, signerPackageSpec, writeCredentialFiles };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { CliIo, runCli } from './cli.js';
|
|
2
|
+
|
|
1
3
|
interface ConnectApiClient {
|
|
2
4
|
resolveSetup(input: ResolveSetupInput): Promise<ResolvedSetup>;
|
|
3
5
|
registerSetup(input: RegisterSetupInput): Promise<RegisterSetupResponse>;
|
|
@@ -133,6 +135,8 @@ interface RuntimeProfile {
|
|
|
133
135
|
label: string;
|
|
134
136
|
restartMode: RestartMode;
|
|
135
137
|
canWriteRuntimeConfig: boolean;
|
|
138
|
+
/** Precise, runtime-owned instruction for loading a freshly written MCP entry. */
|
|
139
|
+
activationInstruction: string;
|
|
136
140
|
}
|
|
137
141
|
declare function runtimeProfile(runtime: string | undefined, env?: NodeJS.ProcessEnv): RuntimeProfile;
|
|
138
142
|
declare function normalizeRuntime(runtime: string | undefined, env?: NodeJS.ProcessEnv): RuntimeId;
|
|
@@ -264,7 +268,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
|
|
|
264
268
|
restartRequired: boolean;
|
|
265
269
|
};
|
|
266
270
|
|
|
267
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
271
|
+
declare const CONNECTOR_VERSION = "0.1.23-alpha.0";
|
|
268
272
|
interface ConnectOptions {
|
|
269
273
|
setupToken: string;
|
|
270
274
|
apiBaseUrl: string;
|
|
@@ -276,6 +280,42 @@ interface ConnectOptions {
|
|
|
276
280
|
ackLocalTools?: boolean;
|
|
277
281
|
localMcp?: boolean;
|
|
278
282
|
}
|
|
283
|
+
/** The stable machine-readable result emitted by `haven-connect --json`. */
|
|
284
|
+
declare const CONNECT_OUTCOME_SCHEMA_VERSION: 1;
|
|
285
|
+
type ConnectOutcomeStatus = 'complete' | 'action_required' | 'failed';
|
|
286
|
+
interface ConnectOutcome {
|
|
287
|
+
schema_version: typeof CONNECT_OUTCOME_SCHEMA_VERSION;
|
|
288
|
+
outcome: ConnectOutcomeStatus;
|
|
289
|
+
runtime: string;
|
|
290
|
+
topology: string;
|
|
291
|
+
configuration: {
|
|
292
|
+
hosted_mcp: boolean;
|
|
293
|
+
local_signer: boolean;
|
|
294
|
+
local_mcp: boolean;
|
|
295
|
+
};
|
|
296
|
+
probe: {
|
|
297
|
+
result: string;
|
|
298
|
+
};
|
|
299
|
+
activation: {
|
|
300
|
+
restart_required: boolean;
|
|
301
|
+
instruction: string;
|
|
302
|
+
};
|
|
303
|
+
next_action: string;
|
|
304
|
+
approval: {
|
|
305
|
+
required: boolean;
|
|
306
|
+
expires_at: string | null;
|
|
307
|
+
};
|
|
308
|
+
verification: {
|
|
309
|
+
tools: readonly ['haven_get_agent', 'haven_get_allowances'];
|
|
310
|
+
instruction: string;
|
|
311
|
+
};
|
|
312
|
+
delegate_address?: string;
|
|
313
|
+
setup_challenge_expires_at?: string;
|
|
314
|
+
error?: {
|
|
315
|
+
code: string;
|
|
316
|
+
next_action: string;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
279
319
|
interface ConnectDeps {
|
|
280
320
|
api?: ConnectApiClient;
|
|
281
321
|
generateKey?: () => LocalDelegateKey;
|
|
@@ -284,6 +324,8 @@ interface ConnectDeps {
|
|
|
284
324
|
writeCredentials?: typeof writeCredentialFiles;
|
|
285
325
|
installRuntime?: typeof installRuntime;
|
|
286
326
|
log?: (message: string) => void;
|
|
327
|
+
/** JSON CLI mode must not expose owner-only credential file locations. */
|
|
328
|
+
redactPaths?: boolean;
|
|
287
329
|
/** Overridable so the Node-floor refusal is testable without spawning a Node. */
|
|
288
330
|
nodeVersion?: string;
|
|
289
331
|
}
|
|
@@ -292,12 +334,26 @@ interface ConnectResult {
|
|
|
292
334
|
agentId: string;
|
|
293
335
|
delegateAddress: string;
|
|
294
336
|
credentialPaths: StoredCredentialPaths;
|
|
337
|
+
/** Additive, secret-free completion contract shared by library callers and --json. */
|
|
338
|
+
outcome: ConnectOutcome;
|
|
295
339
|
}
|
|
296
340
|
declare function runConnect(options: ConnectOptions, deps?: ConnectDeps): Promise<ConnectResult>;
|
|
341
|
+
declare function completionOutcome(input: {
|
|
342
|
+
runtimeInstall: RuntimeInstallResult;
|
|
343
|
+
delegateAddress: string;
|
|
344
|
+
setupChallengeExpiresAt?: string;
|
|
345
|
+
approvalRequired: boolean;
|
|
346
|
+
}): ConnectOutcome;
|
|
347
|
+
/**
|
|
348
|
+
* A deliberately terse failure record: error messages can contain server or
|
|
349
|
+
* filesystem detail, while this public contract must remain safe to serialize.
|
|
350
|
+
*/
|
|
351
|
+
declare function failedConnectOutcome(runtimeHint: string | undefined, error: unknown): ConnectOutcome;
|
|
297
352
|
|
|
298
353
|
interface ParsedCli {
|
|
299
354
|
options: ConnectOptions;
|
|
300
355
|
help: boolean;
|
|
356
|
+
json: boolean;
|
|
301
357
|
}
|
|
302
358
|
declare function parseArgs(argv: string[], env?: NodeJS.ProcessEnv): ParsedCli;
|
|
303
359
|
declare function helpText(): string;
|
|
@@ -307,12 +363,12 @@ declare function shortAddress(address: string): string;
|
|
|
307
363
|
|
|
308
364
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
309
365
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
310
|
-
readonly mcpVersion: "0.1.
|
|
366
|
+
readonly mcpVersion: "0.1.23-alpha.0";
|
|
311
367
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
312
|
-
readonly sdkVersion: "0.1.
|
|
368
|
+
readonly sdkVersion: "0.1.23-alpha.0";
|
|
313
369
|
readonly signerPackage: "@haven_ai/signer";
|
|
314
|
-
readonly signerVersion: "0.1.
|
|
315
|
-
readonly minimumNodeVersion: "
|
|
370
|
+
readonly signerVersion: "0.1.23-alpha.0";
|
|
371
|
+
readonly minimumNodeVersion: "22.0.0";
|
|
316
372
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
317
373
|
readonly requiredTools: readonly string[];
|
|
318
374
|
};
|
|
@@ -320,4 +376,4 @@ declare function mcpPackageSpec(): string;
|
|
|
320
376
|
declare function sdkPackageSpec(): string;
|
|
321
377
|
declare function signerPackageSpec(): string;
|
|
322
378
|
|
|
323
|
-
export { CONNECTOR_VERSION, type ConnectApiClient, type ConnectDeps, type ConnectOptions, type ConnectResult, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type RegisterSetupInput, type RegisterSetupResponse, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, generateDelegateKey, helpText, installRuntime, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, redactSecrets, runConnect, runtimeInstallCapabilities, runtimeProfile, sdkPackageSpec, shortAddress, signerPackageSpec, writeCredentialFiles };
|
|
379
|
+
export { CONNECTOR_VERSION, CONNECT_OUTCOME_SCHEMA_VERSION, type ConnectApiClient, type ConnectDeps, type ConnectOptions, type ConnectOutcome, type ConnectOutcomeStatus, type ConnectResult, type LocalDelegateKey, MCP_RUNTIME_MANIFEST, type ParsedCli, type PrepareSignerRuntimeInput, type PreparedSignerRuntime, type RegisterSetupInput, type RegisterSetupResponse, type ResolveSetupInput, type ResolvedSetup, type RuntimeId, type RuntimeInstallInput, type RuntimeInstallResult, type RuntimeProfile, type StoredCredentialPaths, type UpdateInstallStatusInput, type WriteCredentialInput, completionOutcome, createConnectApiClient, defaultAgentDirectory, delegateKeyFromPrivateKey, failedConnectOutcome, generateDelegateKey, helpText, installRuntime, mcpPackageSpec, normalizeRuntime, parseArgs, prepareSignerRuntime, redactSecrets, runConnect, runtimeInstallCapabilities, runtimeProfile, sdkPackageSpec, shortAddress, signerPackageSpec, writeCredentialFiles };
|