@looopy-ai/aws 2.0.9 → 2.0.10

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.
@@ -31,12 +31,19 @@ export class AgentCoreMemoryMessageStore {
31
31
  content: { text: message.content },
32
32
  },
33
33
  },
34
- {
35
- blob: {
36
- toolCallId: message.toolCallId,
37
- toolCalls: message.toolCalls,
38
- },
39
- },
34
+ message.role === 'assistant'
35
+ ? {
36
+ blob: {
37
+ toolCalls: message.toolCalls,
38
+ },
39
+ }
40
+ : message.role === 'tool'
41
+ ? {
42
+ blob: {
43
+ toolCallId: message.toolCallId,
44
+ },
45
+ }
46
+ : {},
40
47
  ],
41
48
  });
42
49
  await this.client.send(command);
@@ -119,10 +126,10 @@ export class AgentCoreMemoryMessageStore {
119
126
  message.content = payload.conversational.content?.text ?? '';
120
127
  }
121
128
  const blob = payload.blob;
122
- if (blob?.toolCallId) {
129
+ if (blob?.toolCallId && message.role === 'tool') {
123
130
  message.toolCallId = blob.toolCallId;
124
131
  }
125
- if (blob?.toolCalls) {
132
+ if (blob?.toolCalls && message.role === 'assistant') {
126
133
  message.toolCalls = blob.toolCalls;
127
134
  }
128
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@looopy-ai/aws",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "AWS storage and providers for Looopy AI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "@smithy/types": "^4.9.0",
53
53
  "hono": "^4.10.5",
54
54
  "pino-http": "^11.0.0",
55
- "@looopy-ai/core": "1.1.6"
55
+ "@looopy-ai/core": "1.2.0"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"