dooers-agents-client 0.8.0 → 0.9.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/main.cjs CHANGED
@@ -49,6 +49,7 @@ function toThread(w) {
49
49
  owner: toUser(w.owner),
50
50
  users: w.users.map((u) => toUser(u)),
51
51
  title: w.title,
52
+ metadata: w.metadata ?? null,
52
53
  createdAt: w.created_at,
53
54
  updatedAt: w.updated_at,
54
55
  lastEventAt: w.last_event_at
@@ -588,7 +589,7 @@ var AgentClient = class {
588
589
  clientEventId
589
590
  });
590
591
  const promise = this.createPendingPromise(clientEventId);
591
- this.send("event.create", {
592
+ const payload = {
592
593
  thread_id: params.threadId,
593
594
  client_event_id: clientEventId,
594
595
  event: {
@@ -596,7 +597,11 @@ var AgentClient = class {
596
597
  actor: "user",
597
598
  content
598
599
  }
599
- });
600
+ };
601
+ if (params.metadata) {
602
+ payload.metadata = params.metadata;
603
+ }
604
+ this.send("event.create", payload);
600
605
  return promise;
601
606
  }
602
607
  sendFormResponse(params) {