hiloop-sdk 0.8.3 → 0.8.5

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/client.js CHANGED
@@ -15,6 +15,10 @@ export class HiloopClient {
15
15
  this.initialized = false;
16
16
  this.initPromise = null;
17
17
  this.apiKey = options.apiKey;
18
+ if (options.apiKey.startsWith("hlp_prov_")) {
19
+ throw new Error("Provisioning keys (hlp_prov_*) cannot be used with HiloopClient. " +
20
+ "Use the agent API key returned by POST /v1/provision/agents instead.");
21
+ }
18
22
  this.baseUrl = (options.baseUrl ?? "https://api.hi-loop.com").replace(/\/$/, "");
19
23
  this.timeout = options.timeout ?? 30000;
20
24
  this.options = options;
package/dist/crypto.js CHANGED
@@ -141,10 +141,6 @@ export class CryptoContext {
141
141
  }
142
142
  /** Compute X25519 ECDH shared secret with the recipient (space) public key. */
143
143
  getSharedSecret() {
144
- if (!this.recipientPublicKeyB64) {
145
- throw new Error("Space public key not available. This usually means the space has no encryption keys yet — " +
146
- "ensure a human user has logged into the space at least once to generate keys.");
147
- }
148
144
  const sk = util.decodeBase64(this.secretKeyB64);
149
145
  const pk = util.decodeBase64(this.recipientPublicKeyB64);
150
146
  return util.encodeBase64(nacl.scalarMult(sk, pk));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hiloop-sdk",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "TypeScript SDK for Hiloop — zero-trust human-AI agent interaction platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",