hiloop-sdk 0.5.1 → 0.5.3

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.d.ts CHANGED
@@ -280,6 +280,7 @@ export declare class HiloopClient {
280
280
  listConvSessionTimeline(sessionId: string, opts?: {
281
281
  limit?: number;
282
282
  before?: string;
283
+ after?: string;
283
284
  }): Promise<{
284
285
  items: Record<string, unknown>[];
285
286
  }>;
@@ -824,6 +825,15 @@ export declare class HiloopClient {
824
825
  failInvocation(invocationId: string, opts?: {
825
826
  error?: string;
826
827
  }): Promise<Record<string, unknown>>;
828
+ /** Configure webhook URL and optional bearer token for this agent. */
829
+ configureWebhook(opts: {
830
+ webhookUrl: string;
831
+ authToken?: string;
832
+ }): Promise<{
833
+ webhookUrl: string;
834
+ hasSecret: boolean;
835
+ hasAuthToken: boolean;
836
+ }>;
827
837
  static generateKeyPair(): KeyPair;
828
838
  /** Encrypt plaintext with AES-256-GCM for session messages. */
829
839
  static encryptAes(plaintext: string, keyBase64: string): Promise<string>;
package/dist/client.js CHANGED
@@ -576,6 +576,8 @@ export class HiloopClient {
576
576
  params.limit = String(opts.limit);
577
577
  if (opts?.before !== undefined)
578
578
  params.before = opts.before;
579
+ if (opts?.after !== undefined)
580
+ params.after = opts.after;
579
581
  const result = await this.request("GET", `/agent/sessions/${sessionId}/timeline`, { params });
580
582
  // Decrypt timeline items (session messages + interaction fields)
581
583
  if (Array.isArray(result.items)) {
@@ -1219,6 +1221,12 @@ export class HiloopClient {
1219
1221
  }
1220
1222
  return this.request("POST", `/agent/commands/invocations/${invocationId}/fail`, { body });
1221
1223
  }
1224
+ /** Configure webhook URL and optional bearer token for this agent. */
1225
+ async configureWebhook(opts) {
1226
+ return this.request("PUT", "/agent/webhooks/config", {
1227
+ body: { webhookUrl: opts.webhookUrl, webhookAuthToken: opts.authToken },
1228
+ });
1229
+ }
1222
1230
  // -- Crypto -----------------------------------------------------------------
1223
1231
  static generateKeyPair() {
1224
1232
  return generateKeyPair();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hiloop-sdk",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "TypeScript SDK for Hiloop — zero-trust human-AI agent interaction platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",