@haven_ai/connect 0.1.15-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/cli.js
CHANGED
|
@@ -131,8 +131,10 @@ async function writeCredentialFiles(input) {
|
|
|
131
131
|
await restrictPermissions(directory, 448, input.warn);
|
|
132
132
|
const identityPath = join(directory, "identity.json");
|
|
133
133
|
const signerPath = join(directory, "signer.json");
|
|
134
|
+
const agentPath = join(directory, "agent.json");
|
|
134
135
|
await assertDoesNotExist(identityPath);
|
|
135
136
|
await assertDoesNotExist(signerPath);
|
|
137
|
+
await assertDoesNotExist(agentPath);
|
|
136
138
|
await writeOwnerOnlyJson(
|
|
137
139
|
signerPath,
|
|
138
140
|
{
|
|
@@ -167,7 +169,26 @@ async function writeCredentialFiles(input) {
|
|
|
167
169
|
await rm(signerPath, { force: true }).catch(() => void 0);
|
|
168
170
|
throw err;
|
|
169
171
|
}
|
|
170
|
-
|
|
172
|
+
try {
|
|
173
|
+
await writeOwnerOnlyJson(
|
|
174
|
+
agentPath,
|
|
175
|
+
{
|
|
176
|
+
agent_id: input.agentId,
|
|
177
|
+
safe_address: input.safeAddress,
|
|
178
|
+
chain_id: input.chainId,
|
|
179
|
+
network: input.network,
|
|
180
|
+
agent_budget: input.agentBudget,
|
|
181
|
+
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."
|
|
182
|
+
},
|
|
183
|
+
input.warn
|
|
184
|
+
);
|
|
185
|
+
} catch (err) {
|
|
186
|
+
await rm(signerPath, { force: true }).catch(() => void 0);
|
|
187
|
+
await rm(identityPath, { force: true }).catch(() => void 0);
|
|
188
|
+
await rm(agentPath, { force: true }).catch(() => void 0);
|
|
189
|
+
throw err;
|
|
190
|
+
}
|
|
191
|
+
return { directory, identityPath, signerPath, agentPath };
|
|
171
192
|
}
|
|
172
193
|
function defaultAgentDirectory(agentId, baseDir = join(homedir(), ".haven", "agents")) {
|
|
173
194
|
return resolve(defaultCredentialRoot(baseDir), safePathPart(agentId));
|
|
@@ -209,9 +230,9 @@ var MCP_RUNTIME_MANIFEST = {
|
|
|
209
230
|
mcpPackage: "@haven_ai/mcp",
|
|
210
231
|
mcpVersion: MCP_VERSION,
|
|
211
232
|
sdkPackage: "@haven_ai/sdk",
|
|
212
|
-
sdkVersion: "0.1.
|
|
233
|
+
sdkVersion: "0.1.16-alpha.0",
|
|
213
234
|
signerPackage: "@haven_ai/signer",
|
|
214
|
-
signerVersion: "0.1.
|
|
235
|
+
signerVersion: "0.1.16-alpha.0",
|
|
215
236
|
minimumNodeVersion: "20.0.0",
|
|
216
237
|
supportedClients: ["codex-cli", "codex-desktop", "claude-code"],
|
|
217
238
|
requiredTools: registeredToolNames()
|
|
@@ -1675,7 +1696,7 @@ function localRuntimePrepareErrorCode(err) {
|
|
|
1675
1696
|
}
|
|
1676
1697
|
|
|
1677
1698
|
// src/runtime.ts
|
|
1678
|
-
var CONNECTOR_VERSION = "0.1.
|
|
1699
|
+
var CONNECTOR_VERSION = "0.1.16-alpha.0";
|
|
1679
1700
|
async function runConnect(options, deps = {}) {
|
|
1680
1701
|
const connectorVersion = options.connectorVersion ?? CONNECTOR_VERSION;
|
|
1681
1702
|
const api = deps.api ?? createConnectApiClient(options.apiBaseUrl);
|
|
@@ -1745,6 +1766,7 @@ async function runConnect(options, deps = {}) {
|
|
|
1745
1766
|
});
|
|
1746
1767
|
log(`Stored Haven identity credential locally: ${credentialPaths.identityPath}`);
|
|
1747
1768
|
log(`Stored local signer credential locally: ${credentialPaths.signerPath}`);
|
|
1769
|
+
log(`Stored non-secret agent orientation locally: ${credentialPaths.agentPath}`);
|
|
1748
1770
|
if (setup.x402_binding_signer) {
|
|
1749
1771
|
log("Configured x402 binding signer for the local signer.");
|
|
1750
1772
|
} else {
|