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