@haven_ai/connect 0.1.14-alpha.0 → 0.1.16-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/cli.cjs +26 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +26 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +26 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -96,6 +96,8 @@ interface StoredCredentialPaths {
|
|
|
96
96
|
directory: string;
|
|
97
97
|
identityPath: string;
|
|
98
98
|
signerPath: string;
|
|
99
|
+
/** Non-secret orientation file (identity + configured budget, no keys). */
|
|
100
|
+
agentPath: string;
|
|
99
101
|
}
|
|
100
102
|
interface WriteCredentialInput {
|
|
101
103
|
baseDir?: string;
|
|
@@ -254,7 +256,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
|
|
|
254
256
|
restartRequired: boolean;
|
|
255
257
|
};
|
|
256
258
|
|
|
257
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
259
|
+
declare const CONNECTOR_VERSION = "0.1.16-alpha.0";
|
|
258
260
|
interface ConnectOptions {
|
|
259
261
|
setupToken: string;
|
|
260
262
|
apiBaseUrl: string;
|
|
@@ -295,11 +297,11 @@ declare function shortAddress(address: string): string;
|
|
|
295
297
|
|
|
296
298
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
297
299
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
298
|
-
readonly mcpVersion: "0.1.
|
|
300
|
+
readonly mcpVersion: "0.1.16-alpha.0";
|
|
299
301
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
300
|
-
readonly sdkVersion: "0.1.
|
|
302
|
+
readonly sdkVersion: "0.1.16-alpha.0";
|
|
301
303
|
readonly signerPackage: "@haven_ai/signer";
|
|
302
|
-
readonly signerVersion: "0.1.
|
|
304
|
+
readonly signerVersion: "0.1.16-alpha.0";
|
|
303
305
|
readonly minimumNodeVersion: "20.0.0";
|
|
304
306
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
305
307
|
readonly requiredTools: readonly string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -96,6 +96,8 @@ interface StoredCredentialPaths {
|
|
|
96
96
|
directory: string;
|
|
97
97
|
identityPath: string;
|
|
98
98
|
signerPath: string;
|
|
99
|
+
/** Non-secret orientation file (identity + configured budget, no keys). */
|
|
100
|
+
agentPath: string;
|
|
99
101
|
}
|
|
100
102
|
interface WriteCredentialInput {
|
|
101
103
|
baseDir?: string;
|
|
@@ -254,7 +256,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
|
|
|
254
256
|
restartRequired: boolean;
|
|
255
257
|
};
|
|
256
258
|
|
|
257
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
259
|
+
declare const CONNECTOR_VERSION = "0.1.16-alpha.0";
|
|
258
260
|
interface ConnectOptions {
|
|
259
261
|
setupToken: string;
|
|
260
262
|
apiBaseUrl: string;
|
|
@@ -295,11 +297,11 @@ declare function shortAddress(address: string): string;
|
|
|
295
297
|
|
|
296
298
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
297
299
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
298
|
-
readonly mcpVersion: "0.1.
|
|
300
|
+
readonly mcpVersion: "0.1.16-alpha.0";
|
|
299
301
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
300
|
-
readonly sdkVersion: "0.1.
|
|
302
|
+
readonly sdkVersion: "0.1.16-alpha.0";
|
|
301
303
|
readonly signerPackage: "@haven_ai/signer";
|
|
302
|
-
readonly signerVersion: "0.1.
|
|
304
|
+
readonly signerVersion: "0.1.16-alpha.0";
|
|
303
305
|
readonly minimumNodeVersion: "20.0.0";
|
|
304
306
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
305
307
|
readonly requiredTools: readonly string[];
|
package/dist/index.js
CHANGED
|
@@ -130,8 +130,10 @@ async function writeCredentialFiles(input) {
|
|
|
130
130
|
await restrictPermissions(directory, 448, input.warn);
|
|
131
131
|
const identityPath = join(directory, "identity.json");
|
|
132
132
|
const signerPath = join(directory, "signer.json");
|
|
133
|
+
const agentPath = join(directory, "agent.json");
|
|
133
134
|
await assertDoesNotExist(identityPath);
|
|
134
135
|
await assertDoesNotExist(signerPath);
|
|
136
|
+
await assertDoesNotExist(agentPath);
|
|
135
137
|
await writeOwnerOnlyJson(
|
|
136
138
|
signerPath,
|
|
137
139
|
{
|
|
@@ -166,7 +168,26 @@ async function writeCredentialFiles(input) {
|
|
|
166
168
|
await rm(signerPath, { force: true }).catch(() => void 0);
|
|
167
169
|
throw err;
|
|
168
170
|
}
|
|
169
|
-
|
|
171
|
+
try {
|
|
172
|
+
await writeOwnerOnlyJson(
|
|
173
|
+
agentPath,
|
|
174
|
+
{
|
|
175
|
+
agent_id: input.agentId,
|
|
176
|
+
safe_address: input.safeAddress,
|
|
177
|
+
chain_id: input.chainId,
|
|
178
|
+
network: input.network,
|
|
179
|
+
agent_budget: input.agentBudget,
|
|
180
|
+
note: "Non-secret orientation for the agent: identity + configured budget. Contains no API key or signing key. For the live remaining budget, call haven_get_allowances."
|
|
181
|
+
},
|
|
182
|
+
input.warn
|
|
183
|
+
);
|
|
184
|
+
} catch (err) {
|
|
185
|
+
await rm(signerPath, { force: true }).catch(() => void 0);
|
|
186
|
+
await rm(identityPath, { force: true }).catch(() => void 0);
|
|
187
|
+
await rm(agentPath, { force: true }).catch(() => void 0);
|
|
188
|
+
throw err;
|
|
189
|
+
}
|
|
190
|
+
return { directory, identityPath, signerPath, agentPath };
|
|
170
191
|
}
|
|
171
192
|
function defaultAgentDirectory(agentId, baseDir = join(homedir(), ".haven", "agents")) {
|
|
172
193
|
return resolve(defaultCredentialRoot(baseDir), safePathPart(agentId));
|
|
@@ -208,9 +229,9 @@ var MCP_RUNTIME_MANIFEST = {
|
|
|
208
229
|
mcpPackage: "@haven_ai/mcp",
|
|
209
230
|
mcpVersion: MCP_VERSION,
|
|
210
231
|
sdkPackage: "@haven_ai/sdk",
|
|
211
|
-
sdkVersion: "0.1.
|
|
232
|
+
sdkVersion: "0.1.16-alpha.0",
|
|
212
233
|
signerPackage: "@haven_ai/signer",
|
|
213
|
-
signerVersion: "0.1.
|
|
234
|
+
signerVersion: "0.1.16-alpha.0",
|
|
214
235
|
minimumNodeVersion: "20.0.0",
|
|
215
236
|
supportedClients: ["codex-cli", "codex-desktop", "claude-code"],
|
|
216
237
|
requiredTools: registeredToolNames()
|
|
@@ -1674,7 +1695,7 @@ function localRuntimePrepareErrorCode(err) {
|
|
|
1674
1695
|
}
|
|
1675
1696
|
|
|
1676
1697
|
// src/runtime.ts
|
|
1677
|
-
var CONNECTOR_VERSION = "0.1.
|
|
1698
|
+
var CONNECTOR_VERSION = "0.1.16-alpha.0";
|
|
1678
1699
|
async function runConnect(options, deps = {}) {
|
|
1679
1700
|
const connectorVersion = options.connectorVersion ?? CONNECTOR_VERSION;
|
|
1680
1701
|
const api = deps.api ?? createConnectApiClient(options.apiBaseUrl);
|
|
@@ -1744,6 +1765,7 @@ async function runConnect(options, deps = {}) {
|
|
|
1744
1765
|
});
|
|
1745
1766
|
log(`Stored Haven identity credential locally: ${credentialPaths.identityPath}`);
|
|
1746
1767
|
log(`Stored local signer credential locally: ${credentialPaths.signerPath}`);
|
|
1768
|
+
log(`Stored non-secret agent orientation locally: ${credentialPaths.agentPath}`);
|
|
1747
1769
|
if (setup.x402_binding_signer) {
|
|
1748
1770
|
log("Configured x402 binding signer for the local signer.");
|
|
1749
1771
|
} else {
|