@swirls/looms 0.13.1 → 0.14.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/CHANGELOG.md +12 -0
- package/dist/agent/agent-session.js +12 -11
- package/dist/agent/effects.d.ts +343 -266
- package/dist/agent/events.d.ts +70 -0
- package/dist/agent/events.js +2 -1
- package/dist/agent/module.d.ts +329 -0
- package/dist/agent/projections.d.ts +7 -0
- package/dist/agent/projections.js +2 -1
- package/dist/agent/scope.d.ts +70 -0
- package/dist/agent/signals.d.ts +63 -0
- package/dist/agent/signals.js +7 -4
- package/dist/agent/threads.js +8 -11
- package/dist/agent/types.d.ts +49 -0
- package/dist/agent/types.js +33 -0
- package/dist/ai-vercel/index.d.ts +1 -1
- package/dist/ai-vercel/index.js +1 -1
- package/dist/ai-vercel/messages.d.ts +19 -2
- package/dist/ai-vercel/messages.js +60 -2
- package/dist/ai-vercel/vercel-llm.d.ts +6 -0
- package/dist/ai-vercel/vercel-llm.js +9 -2
- package/dist/debugger/app/assets/{index-Dqg2e5oY.js → index-CtGiJU8b.js} +2 -2
- package/dist/debugger/app/assets/{routes-DMDW7tFG.js → routes-Bg0vNEOr.js} +2 -2
- package/dist/debugger/app/index.html +1 -1
- package/dist/runtime/wake-engine.js +32 -3
- package/package.json +1 -1
package/dist/agent/events.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ export declare const AgentMessageReceivedPayloadSchema: Schema.Struct<{
|
|
|
3
3
|
readonly message: Schema.Struct<{
|
|
4
4
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
5
5
|
readonly content: Schema.String;
|
|
6
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
7
|
+
readonly id: Schema.String;
|
|
8
|
+
readonly mediaType: Schema.String;
|
|
9
|
+
readonly name: Schema.optional<Schema.String>;
|
|
10
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
11
|
+
readonly url: Schema.optional<Schema.String>;
|
|
12
|
+
}>>>;
|
|
6
13
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
7
14
|
readonly name: Schema.optional<Schema.String>;
|
|
8
15
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -29,6 +36,13 @@ export declare const AgentMessageEventPayloadSchema: Schema.Struct<{
|
|
|
29
36
|
readonly message: Schema.Struct<{
|
|
30
37
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
31
38
|
readonly content: Schema.String;
|
|
39
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
40
|
+
readonly id: Schema.String;
|
|
41
|
+
readonly mediaType: Schema.String;
|
|
42
|
+
readonly name: Schema.optional<Schema.String>;
|
|
43
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
44
|
+
readonly url: Schema.optional<Schema.String>;
|
|
45
|
+
}>>>;
|
|
32
46
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
33
47
|
readonly name: Schema.optional<Schema.String>;
|
|
34
48
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -63,6 +77,13 @@ export declare const AgentSteeredPayloadSchema: Schema.Struct<{
|
|
|
63
77
|
readonly message: Schema.Struct<{
|
|
64
78
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
65
79
|
readonly content: Schema.String;
|
|
80
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
81
|
+
readonly id: Schema.String;
|
|
82
|
+
readonly mediaType: Schema.String;
|
|
83
|
+
readonly name: Schema.optional<Schema.String>;
|
|
84
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
85
|
+
readonly url: Schema.optional<Schema.String>;
|
|
86
|
+
}>>>;
|
|
66
87
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
67
88
|
readonly name: Schema.optional<Schema.String>;
|
|
68
89
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -78,6 +99,13 @@ export declare const AgentTurnStoppedPayloadSchema: Schema.Struct<{}>;
|
|
|
78
99
|
export declare const AgentSessionMessageSubmittedPayloadSchema: Schema.Struct<{
|
|
79
100
|
readonly messageId: Schema.String;
|
|
80
101
|
readonly text: Schema.String;
|
|
102
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
103
|
+
readonly id: Schema.String;
|
|
104
|
+
readonly mediaType: Schema.String;
|
|
105
|
+
readonly name: Schema.optional<Schema.String>;
|
|
106
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
107
|
+
readonly url: Schema.optional<Schema.String>;
|
|
108
|
+
}>>>;
|
|
81
109
|
readonly delivery: Schema.optional<Schema.Union<readonly [Schema.Literal<"steer">, Schema.Literal<"followUp">, Schema.Literal<"nextTurn">]>>;
|
|
82
110
|
readonly activeChildThreadId: Schema.optional<Schema.String>;
|
|
83
111
|
}>;
|
|
@@ -117,6 +145,13 @@ export declare const AgentContextCompactedPayloadSchema: Schema.Struct<{
|
|
|
117
145
|
readonly messages: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
118
146
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
119
147
|
readonly content: Schema.String;
|
|
148
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
149
|
+
readonly id: Schema.String;
|
|
150
|
+
readonly mediaType: Schema.String;
|
|
151
|
+
readonly name: Schema.optional<Schema.String>;
|
|
152
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
153
|
+
readonly url: Schema.optional<Schema.String>;
|
|
154
|
+
}>>>;
|
|
120
155
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
121
156
|
readonly name: Schema.optional<Schema.String>;
|
|
122
157
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -217,6 +252,13 @@ export declare const agentCatalog: import("@swirls/looms/core").EventCatalog<"ag
|
|
|
217
252
|
readonly message: Schema.Struct<{
|
|
218
253
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
219
254
|
readonly content: Schema.String;
|
|
255
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
256
|
+
readonly id: Schema.String;
|
|
257
|
+
readonly mediaType: Schema.String;
|
|
258
|
+
readonly name: Schema.optional<Schema.String>;
|
|
259
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
260
|
+
readonly url: Schema.optional<Schema.String>;
|
|
261
|
+
}>>>;
|
|
220
262
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
221
263
|
readonly name: Schema.optional<Schema.String>;
|
|
222
264
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -243,6 +285,13 @@ export declare const agentCatalog: import("@swirls/looms/core").EventCatalog<"ag
|
|
|
243
285
|
readonly message: Schema.Struct<{
|
|
244
286
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
245
287
|
readonly content: Schema.String;
|
|
288
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
289
|
+
readonly id: Schema.String;
|
|
290
|
+
readonly mediaType: Schema.String;
|
|
291
|
+
readonly name: Schema.optional<Schema.String>;
|
|
292
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
293
|
+
readonly url: Schema.optional<Schema.String>;
|
|
294
|
+
}>>>;
|
|
246
295
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
247
296
|
readonly name: Schema.optional<Schema.String>;
|
|
248
297
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -277,6 +326,13 @@ export declare const agentCatalog: import("@swirls/looms/core").EventCatalog<"ag
|
|
|
277
326
|
readonly message: Schema.Struct<{
|
|
278
327
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
279
328
|
readonly content: Schema.String;
|
|
329
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
330
|
+
readonly id: Schema.String;
|
|
331
|
+
readonly mediaType: Schema.String;
|
|
332
|
+
readonly name: Schema.optional<Schema.String>;
|
|
333
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
334
|
+
readonly url: Schema.optional<Schema.String>;
|
|
335
|
+
}>>>;
|
|
280
336
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
281
337
|
readonly name: Schema.optional<Schema.String>;
|
|
282
338
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
@@ -291,6 +347,13 @@ export declare const agentCatalog: import("@swirls/looms/core").EventCatalog<"ag
|
|
|
291
347
|
'session.message.submitted': Schema.Struct<{
|
|
292
348
|
readonly messageId: Schema.String;
|
|
293
349
|
readonly text: Schema.String;
|
|
350
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
351
|
+
readonly id: Schema.String;
|
|
352
|
+
readonly mediaType: Schema.String;
|
|
353
|
+
readonly name: Schema.optional<Schema.String>;
|
|
354
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
355
|
+
readonly url: Schema.optional<Schema.String>;
|
|
356
|
+
}>>>;
|
|
294
357
|
readonly delivery: Schema.optional<Schema.Union<readonly [Schema.Literal<"steer">, Schema.Literal<"followUp">, Schema.Literal<"nextTurn">]>>;
|
|
295
358
|
readonly activeChildThreadId: Schema.optional<Schema.String>;
|
|
296
359
|
}>;
|
|
@@ -410,6 +473,13 @@ export declare const agentCatalog: import("@swirls/looms/core").EventCatalog<"ag
|
|
|
410
473
|
readonly messages: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
411
474
|
readonly role: Schema.Union<readonly [Schema.Literal<"system">, Schema.Literal<"user">, Schema.Literal<"assistant">, Schema.Literal<"tool">]>;
|
|
412
475
|
readonly content: Schema.String;
|
|
476
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
477
|
+
readonly id: Schema.String;
|
|
478
|
+
readonly mediaType: Schema.String;
|
|
479
|
+
readonly name: Schema.optional<Schema.String>;
|
|
480
|
+
readonly size: Schema.optional<Schema.Finite>;
|
|
481
|
+
readonly url: Schema.optional<Schema.String>;
|
|
482
|
+
}>>>;
|
|
413
483
|
readonly toolCallId: Schema.optional<Schema.String>;
|
|
414
484
|
readonly name: Schema.optional<Schema.String>;
|
|
415
485
|
readonly toolCalls: Schema.optional<Schema.mutable<Schema.$Array<Schema.Struct<{
|
package/dist/agent/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Schema } from 'effect';
|
|
2
2
|
import { DEFAULT_DEFINITION_VERSION, defineEventCatalog, RuntimeEffectSchema } from '@swirls/looms/core';
|
|
3
|
-
import { MessageSchema, TokenUsageSchema, ToolCallSchema } from './types.js';
|
|
3
|
+
import { AttachmentSchema, MessageSchema, TokenUsageSchema, ToolCallSchema } from './types.js';
|
|
4
4
|
export const AgentMessageReceivedPayloadSchema = Schema.Struct({
|
|
5
5
|
message: MessageSchema,
|
|
6
6
|
});
|
|
@@ -47,6 +47,7 @@ export const AgentTurnStoppedPayloadSchema = Schema.Struct({});
|
|
|
47
47
|
export const AgentSessionMessageSubmittedPayloadSchema = Schema.Struct({
|
|
48
48
|
messageId: Schema.String,
|
|
49
49
|
text: Schema.String,
|
|
50
|
+
attachments: Schema.optional(Schema.Array(AttachmentSchema)),
|
|
50
51
|
delivery: Schema.optional(AgentSessionDeliverySchema),
|
|
51
52
|
activeChildThreadId: Schema.optional(Schema.String),
|
|
52
53
|
});
|