@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/cli.cjs
CHANGED
|
@@ -137,8 +137,10 @@ async function writeCredentialFiles(input) {
|
|
|
137
137
|
await restrictPermissions(directory, 448, input.warn);
|
|
138
138
|
const identityPath = path.join(directory, "identity.json");
|
|
139
139
|
const signerPath = path.join(directory, "signer.json");
|
|
140
|
+
const agentPath = path.join(directory, "agent.json");
|
|
140
141
|
await assertDoesNotExist(identityPath);
|
|
141
142
|
await assertDoesNotExist(signerPath);
|
|
143
|
+
await assertDoesNotExist(agentPath);
|
|
142
144
|
await writeOwnerOnlyJson(
|
|
143
145
|
signerPath,
|
|
144
146
|
{
|
|
@@ -173,7 +175,26 @@ async function writeCredentialFiles(input) {
|
|
|
173
175
|
await promises.rm(signerPath, { force: true }).catch(() => void 0);
|
|
174
176
|
throw err;
|
|
175
177
|
}
|
|
176
|
-
|
|
178
|
+
try {
|
|
179
|
+
await writeOwnerOnlyJson(
|
|
180
|
+
agentPath,
|
|
181
|
+
{
|
|
182
|
+
agent_id: input.agentId,
|
|
183
|
+
safe_address: input.safeAddress,
|
|
184
|
+
chain_id: input.chainId,
|
|
185
|
+
network: input.network,
|
|
186
|
+
agent_budget: input.agentBudget,
|
|
187
|
+
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."
|
|
188
|
+
},
|
|
189
|
+
input.warn
|
|
190
|
+
);
|
|
191
|
+
} catch (err) {
|
|
192
|
+
await promises.rm(signerPath, { force: true }).catch(() => void 0);
|
|
193
|
+
await promises.rm(identityPath, { force: true }).catch(() => void 0);
|
|
194
|
+
await promises.rm(agentPath, { force: true }).catch(() => void 0);
|
|
195
|
+
throw err;
|
|
196
|
+
}
|
|
197
|
+
return { directory, identityPath, signerPath, agentPath };
|
|
177
198
|
}
|
|
178
199
|
function defaultAgentDirectory(agentId, baseDir = path.join(os.homedir(), ".haven", "agents")) {
|
|
179
200
|
return path.resolve(defaultCredentialRoot(baseDir), safePathPart(agentId));
|
|
@@ -215,9 +236,9 @@ var MCP_RUNTIME_MANIFEST = {
|
|
|
215
236
|
mcpPackage: "@haven_ai/mcp",
|
|
216
237
|
mcpVersion: mcp.MCP_VERSION,
|
|
217
238
|
sdkPackage: "@haven_ai/sdk",
|
|
218
|
-
sdkVersion: "0.1.
|
|
239
|
+
sdkVersion: "0.1.16-alpha.0",
|
|
219
240
|
signerPackage: "@haven_ai/signer",
|
|
220
|
-
signerVersion: "0.1.
|
|
241
|
+
signerVersion: "0.1.16-alpha.0",
|
|
221
242
|
minimumNodeVersion: "20.0.0",
|
|
222
243
|
supportedClients: ["codex-cli", "codex-desktop", "claude-code"],
|
|
223
244
|
requiredTools: mcp.registeredToolNames()
|
|
@@ -1681,7 +1702,7 @@ function localRuntimePrepareErrorCode(err) {
|
|
|
1681
1702
|
}
|
|
1682
1703
|
|
|
1683
1704
|
// src/runtime.ts
|
|
1684
|
-
var CONNECTOR_VERSION = "0.1.
|
|
1705
|
+
var CONNECTOR_VERSION = "0.1.16-alpha.0";
|
|
1685
1706
|
async function runConnect(options, deps = {}) {
|
|
1686
1707
|
const connectorVersion = options.connectorVersion ?? CONNECTOR_VERSION;
|
|
1687
1708
|
const api = deps.api ?? createConnectApiClient(options.apiBaseUrl);
|
|
@@ -1751,6 +1772,7 @@ async function runConnect(options, deps = {}) {
|
|
|
1751
1772
|
});
|
|
1752
1773
|
log(`Stored Haven identity credential locally: ${credentialPaths.identityPath}`);
|
|
1753
1774
|
log(`Stored local signer credential locally: ${credentialPaths.signerPath}`);
|
|
1775
|
+
log(`Stored non-secret agent orientation locally: ${credentialPaths.agentPath}`);
|
|
1754
1776
|
if (setup.x402_binding_signer) {
|
|
1755
1777
|
log("Configured x402 binding signer for the local signer.");
|
|
1756
1778
|
} else {
|