@moltzap/protocol 2026.505.1 → 2026.505.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/app/methods/apps.d.ts +30 -103
- package/dist/app/methods/apps.d.ts.map +1 -1
- package/dist/app/methods/apps.js +9 -72
- package/dist/app/methods/apps.js.map +1 -1
- package/dist/rpc-groups.d.ts +92 -10
- package/dist/rpc-groups.d.ts.map +1 -1
- package/dist/rpc-groups.js +39 -9
- package/dist/rpc-groups.js.map +1 -1
- package/dist/rpc-registry.d.ts +29 -241
- package/dist/rpc-registry.d.ts.map +1 -1
- package/dist/rpc-registry.js +2 -9
- package/dist/rpc-registry.js.map +1 -1
- package/dist/schema/apps.d.ts +0 -26
- package/dist/schema/apps.d.ts.map +1 -1
- package/dist/schema/apps.js +1 -19
- package/dist/schema/apps.js.map +1 -1
- package/dist/schema/index.d.ts +0 -1
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +0 -1
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/notifications.d.ts +133 -106
- package/dist/schema/notifications.d.ts.map +1 -1
- package/dist/schema/notifications.js +55 -39
- package/dist/schema/notifications.js.map +1 -1
- package/dist/testing/conformance/boundary.d.ts.map +1 -1
- package/dist/testing/conformance/boundary.js +21 -74
- package/dist/testing/conformance/boundary.js.map +1 -1
- package/dist/testing/conformance/client/adversity.d.ts.map +1 -1
- package/dist/testing/conformance/client/adversity.js +5 -2
- package/dist/testing/conformance/client/adversity.js.map +1 -1
- package/dist/testing/conformance/client/boundary.d.ts.map +1 -1
- package/dist/testing/conformance/client/boundary.js +5 -2
- package/dist/testing/conformance/client/boundary.js.map +1 -1
- package/dist/testing/conformance/client/delivery.d.ts.map +1 -1
- package/dist/testing/conformance/client/delivery.js +7 -2
- package/dist/testing/conformance/client/delivery.js.map +1 -1
- package/dist/testing/conformance/delivery.d.ts +9 -14
- package/dist/testing/conformance/delivery.d.ts.map +1 -1
- package/dist/testing/conformance/delivery.js +32 -198
- package/dist/testing/conformance/delivery.js.map +1 -1
- package/dist/testing/conformance/dispatcher-concurrency.js +5 -5
- package/dist/testing/conformance/dispatcher-concurrency.js.map +1 -1
- package/dist/testing/conformance/suite.js +18 -29
- package/dist/testing/conformance/suite.js.map +1 -1
- package/dist/testing/models/dispatch.d.ts.map +1 -1
- package/dist/testing/models/dispatch.js +12 -9
- package/dist/testing/models/dispatch.js.map +1 -1
- package/dist/types.d.ts +2 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/validators.d.ts +20 -34
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +6 -11
- package/dist/validators.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/schema/delivery.d.ts +0 -22
- package/dist/schema/delivery.d.ts.map +0 -1
- package/dist/schema/delivery.js +0 -13
- package/dist/schema/delivery.js.map +0 -1
package/dist/schema/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
|
package/dist/schema/index.js
CHANGED
|
@@ -11,7 +11,6 @@ export * from "./messages.js";
|
|
|
11
11
|
export * from "./logical-clock.js";
|
|
12
12
|
export * from "./invites.js";
|
|
13
13
|
export * from "./presence.js";
|
|
14
|
-
export * from "./delivery.js";
|
|
15
14
|
export * from "./json-rpc.js";
|
|
16
15
|
export * from "./frames.js";
|
|
17
16
|
export * from "./errors.js";
|
package/dist/schema/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,6EAA6E;AAC7E,sEAAsE;AACtE,mEAAmE;AACnE,iEAAiE;AACjE,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,6EAA6E;AAC7E,sEAAsE;AACtE,mEAAmE;AACnE,iEAAiE;AACjE,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,OAAO,EACP,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Static } from "@sinclair/typebox";
|
|
2
|
+
import { type RawDecodedNotification, type UnknownDecodedNotification } from "../rpc-groups.js";
|
|
2
3
|
export declare const MessageReceivedNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
3
4
|
message: import("@sinclair/typebox").TObject<{
|
|
4
5
|
id: import("@sinclair/typebox").TString & {
|
|
@@ -34,17 +35,6 @@ export declare const MessageReceivedNotificationSchema: import("@sinclair/typebo
|
|
|
34
35
|
createdAt: import("@sinclair/typebox").TString;
|
|
35
36
|
}>;
|
|
36
37
|
}>;
|
|
37
|
-
export declare const MessageDeliveredNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
38
|
-
messageId: import("@sinclair/typebox").TString & {
|
|
39
|
-
static: import("../brands.js").BrandedString<"MessageId">;
|
|
40
|
-
};
|
|
41
|
-
conversationId: import("@sinclair/typebox").TString & {
|
|
42
|
-
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
43
|
-
};
|
|
44
|
-
agentId: import("@sinclair/typebox").TString & {
|
|
45
|
-
static: import("../brands.js").BrandedString<"AgentId">;
|
|
46
|
-
};
|
|
47
|
-
}>;
|
|
48
38
|
export declare const ConversationCreatedNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
49
39
|
conversation: import("@sinclair/typebox").TObject<{
|
|
50
40
|
id: import("@sinclair/typebox").TString & {
|
|
@@ -139,16 +129,16 @@ export declare const PresenceChangedNotificationSchema: import("@sinclair/typebo
|
|
|
139
129
|
};
|
|
140
130
|
}>;
|
|
141
131
|
export declare const AppParticipantAdmittedNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
142
|
-
|
|
143
|
-
static: import("../brands.js").BrandedString<"
|
|
132
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
133
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
144
134
|
};
|
|
145
135
|
agentId: import("@sinclair/typebox").TString & {
|
|
146
136
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
147
137
|
};
|
|
148
138
|
}>;
|
|
149
139
|
export declare const AppParticipantRejectedNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
150
|
-
|
|
151
|
-
static: import("../brands.js").BrandedString<"
|
|
140
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
141
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
152
142
|
};
|
|
153
143
|
agentId: import("@sinclair/typebox").TString & {
|
|
154
144
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
@@ -162,29 +152,42 @@ export declare const AppParticipantRejectedNotificationSchema: import("@sinclair
|
|
|
162
152
|
static: "NotInContacts" | "AgentNotFound" | "AgentNoOwner" | "UserInvalid" | "UserValidationFailed" | "ContactCheckFailed";
|
|
163
153
|
};
|
|
164
154
|
}>;
|
|
165
|
-
export declare const
|
|
166
|
-
|
|
167
|
-
static: import("../brands.js").BrandedString<"
|
|
155
|
+
export declare const TaskReadyNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
156
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
157
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
168
158
|
};
|
|
169
159
|
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
170
160
|
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
171
161
|
}>;
|
|
172
162
|
}>;
|
|
173
|
-
export declare const
|
|
174
|
-
|
|
175
|
-
static: import("../brands.js").BrandedString<"
|
|
163
|
+
export declare const TaskFailedNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
164
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
165
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
176
166
|
};
|
|
177
167
|
}>;
|
|
178
|
-
export declare const
|
|
179
|
-
|
|
180
|
-
static: import("../brands.js").BrandedString<"
|
|
168
|
+
export declare const TaskClosedNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
169
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
170
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
181
171
|
};
|
|
182
|
-
|
|
183
|
-
static: import("../brands.js").BrandedString<"
|
|
172
|
+
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
173
|
+
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
174
|
+
}>;
|
|
175
|
+
closedBy: import("@sinclair/typebox").TObject<{
|
|
176
|
+
agentId: import("@sinclair/typebox").TString & {
|
|
177
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
178
|
+
};
|
|
179
|
+
ownerId: import("@sinclair/typebox").TString;
|
|
180
|
+
}>;
|
|
181
|
+
}>;
|
|
182
|
+
export declare const TaskAdmissionCompleteNotificationSchema: import("@sinclair/typebox").TObject<{
|
|
183
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
184
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
184
185
|
};
|
|
186
|
+
admittedAgentIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString & {
|
|
187
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
188
|
+
}>;
|
|
185
189
|
}>;
|
|
186
190
|
export type MessageReceivedNotification = Static<typeof MessageReceivedNotificationSchema>;
|
|
187
|
-
export type MessageDeliveredNotification = Static<typeof MessageDeliveredNotificationSchema>;
|
|
188
191
|
export type ConversationCreatedNotification = Static<typeof ConversationCreatedNotificationSchema>;
|
|
189
192
|
export type ConversationUpdatedNotification = Static<typeof ConversationUpdatedNotificationSchema>;
|
|
190
193
|
export type ConversationArchivedNotification = Static<typeof ConversationArchivedNotificationSchema>;
|
|
@@ -194,9 +197,10 @@ export type ContactAcceptedNotification = Static<typeof ContactAcceptedNotificat
|
|
|
194
197
|
export type PresenceChangedNotification = Static<typeof PresenceChangedNotificationSchema>;
|
|
195
198
|
export type AppParticipantAdmittedNotification = Static<typeof AppParticipantAdmittedNotificationSchema>;
|
|
196
199
|
export type AppParticipantRejectedNotification = Static<typeof AppParticipantRejectedNotificationSchema>;
|
|
197
|
-
export type
|
|
198
|
-
export type
|
|
199
|
-
export type
|
|
200
|
+
export type TaskReadyNotification = Static<typeof TaskReadyNotificationSchema>;
|
|
201
|
+
export type TaskFailedNotification = Static<typeof TaskFailedNotificationSchema>;
|
|
202
|
+
export type TaskClosedNotification = Static<typeof TaskClosedNotificationSchema>;
|
|
203
|
+
export type TaskAdmissionCompleteNotification = Static<typeof TaskAdmissionCompleteNotificationSchema>;
|
|
200
204
|
export declare const MessageReceivedNotificationDefinition: import("../notification.js").NotificationDefinition<"messages/received", import("@sinclair/typebox").TObject<{
|
|
201
205
|
message: import("@sinclair/typebox").TObject<{
|
|
202
206
|
id: import("@sinclair/typebox").TString & {
|
|
@@ -232,17 +236,6 @@ export declare const MessageReceivedNotificationDefinition: import("../notificat
|
|
|
232
236
|
createdAt: import("@sinclair/typebox").TString;
|
|
233
237
|
}>;
|
|
234
238
|
}>>;
|
|
235
|
-
export declare const MessageDeliveredNotificationDefinition: import("../notification.js").NotificationDefinition<"messages/delivered", import("@sinclair/typebox").TObject<{
|
|
236
|
-
messageId: import("@sinclair/typebox").TString & {
|
|
237
|
-
static: import("../brands.js").BrandedString<"MessageId">;
|
|
238
|
-
};
|
|
239
|
-
conversationId: import("@sinclair/typebox").TString & {
|
|
240
|
-
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
241
|
-
};
|
|
242
|
-
agentId: import("@sinclair/typebox").TString & {
|
|
243
|
-
static: import("../brands.js").BrandedString<"AgentId">;
|
|
244
|
-
};
|
|
245
|
-
}>>;
|
|
246
239
|
export declare const ConversationCreatedNotificationDefinition: import("../notification.js").NotificationDefinition<"conversations/created", import("@sinclair/typebox").TObject<{
|
|
247
240
|
conversation: import("@sinclair/typebox").TObject<{
|
|
248
241
|
id: import("@sinclair/typebox").TString & {
|
|
@@ -337,16 +330,16 @@ export declare const PresenceChangedNotificationDefinition: import("../notificat
|
|
|
337
330
|
};
|
|
338
331
|
}>>;
|
|
339
332
|
export declare const AppParticipantAdmittedNotificationDefinition: import("../notification.js").NotificationDefinition<"app/participantAdmitted", import("@sinclair/typebox").TObject<{
|
|
340
|
-
|
|
341
|
-
static: import("../brands.js").BrandedString<"
|
|
333
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
334
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
342
335
|
};
|
|
343
336
|
agentId: import("@sinclair/typebox").TString & {
|
|
344
337
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
345
338
|
};
|
|
346
339
|
}>>;
|
|
347
340
|
export declare const AppParticipantRejectedNotificationDefinition: import("../notification.js").NotificationDefinition<"app/participantRejected", import("@sinclair/typebox").TObject<{
|
|
348
|
-
|
|
349
|
-
static: import("../brands.js").BrandedString<"
|
|
341
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
342
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
350
343
|
};
|
|
351
344
|
agentId: import("@sinclair/typebox").TString & {
|
|
352
345
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
@@ -360,26 +353,40 @@ export declare const AppParticipantRejectedNotificationDefinition: import("../no
|
|
|
360
353
|
static: "NotInContacts" | "AgentNotFound" | "AgentNoOwner" | "UserInvalid" | "UserValidationFailed" | "ContactCheckFailed";
|
|
361
354
|
};
|
|
362
355
|
}>>;
|
|
363
|
-
export declare const
|
|
364
|
-
|
|
365
|
-
static: import("../brands.js").BrandedString<"
|
|
356
|
+
export declare const TaskReadyNotificationDefinition: import("../notification.js").NotificationDefinition<"task/ready", import("@sinclair/typebox").TObject<{
|
|
357
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
358
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
366
359
|
};
|
|
367
360
|
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
368
361
|
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
369
362
|
}>;
|
|
370
363
|
}>>;
|
|
371
|
-
export declare const
|
|
372
|
-
|
|
373
|
-
static: import("../brands.js").BrandedString<"
|
|
364
|
+
export declare const TaskFailedNotificationDefinition: import("../notification.js").NotificationDefinition<"task/failed", import("@sinclair/typebox").TObject<{
|
|
365
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
366
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
374
367
|
};
|
|
375
368
|
}>>;
|
|
376
|
-
export declare const
|
|
377
|
-
|
|
378
|
-
static: import("../brands.js").BrandedString<"
|
|
369
|
+
export declare const TaskClosedNotificationDefinition: import("../notification.js").NotificationDefinition<"task/closed", import("@sinclair/typebox").TObject<{
|
|
370
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
371
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
379
372
|
};
|
|
380
|
-
|
|
381
|
-
static: import("../brands.js").BrandedString<"
|
|
373
|
+
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
374
|
+
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
375
|
+
}>;
|
|
376
|
+
closedBy: import("@sinclair/typebox").TObject<{
|
|
377
|
+
agentId: import("@sinclair/typebox").TString & {
|
|
378
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
379
|
+
};
|
|
380
|
+
ownerId: import("@sinclair/typebox").TString;
|
|
381
|
+
}>;
|
|
382
|
+
}>>;
|
|
383
|
+
export declare const TaskAdmissionCompleteNotificationDefinition: import("../notification.js").NotificationDefinition<"task/admissionComplete", import("@sinclair/typebox").TObject<{
|
|
384
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
385
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
382
386
|
};
|
|
387
|
+
admittedAgentIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString & {
|
|
388
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
389
|
+
}>;
|
|
383
390
|
}>>;
|
|
384
391
|
export declare const notificationDefinitions: readonly [import("../notification.js").NotificationDefinition<"messages/received", import("@sinclair/typebox").TObject<{
|
|
385
392
|
message: import("@sinclair/typebox").TObject<{
|
|
@@ -415,16 +422,6 @@ export declare const notificationDefinitions: readonly [import("../notification.
|
|
|
415
422
|
patchedBy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
416
423
|
createdAt: import("@sinclair/typebox").TString;
|
|
417
424
|
}>;
|
|
418
|
-
}>>, import("../notification.js").NotificationDefinition<"messages/delivered", import("@sinclair/typebox").TObject<{
|
|
419
|
-
messageId: import("@sinclair/typebox").TString & {
|
|
420
|
-
static: import("../brands.js").BrandedString<"MessageId">;
|
|
421
|
-
};
|
|
422
|
-
conversationId: import("@sinclair/typebox").TString & {
|
|
423
|
-
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
424
|
-
};
|
|
425
|
-
agentId: import("@sinclair/typebox").TString & {
|
|
426
|
-
static: import("../brands.js").BrandedString<"AgentId">;
|
|
427
|
-
};
|
|
428
425
|
}>>, import("../notification.js").NotificationDefinition<"conversations/created", import("@sinclair/typebox").TObject<{
|
|
429
426
|
conversation: import("@sinclair/typebox").TObject<{
|
|
430
427
|
id: import("@sinclair/typebox").TString & {
|
|
@@ -512,15 +509,15 @@ export declare const notificationDefinitions: readonly [import("../notification.
|
|
|
512
509
|
static: "online" | "offline" | "away";
|
|
513
510
|
};
|
|
514
511
|
}>>, import("../notification.js").NotificationDefinition<"app/participantAdmitted", import("@sinclair/typebox").TObject<{
|
|
515
|
-
|
|
516
|
-
static: import("../brands.js").BrandedString<"
|
|
512
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
513
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
517
514
|
};
|
|
518
515
|
agentId: import("@sinclair/typebox").TString & {
|
|
519
516
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
520
517
|
};
|
|
521
518
|
}>>, import("../notification.js").NotificationDefinition<"app/participantRejected", import("@sinclair/typebox").TObject<{
|
|
522
|
-
|
|
523
|
-
static: import("../brands.js").BrandedString<"
|
|
519
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
520
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
524
521
|
};
|
|
525
522
|
agentId: import("@sinclair/typebox").TString & {
|
|
526
523
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
@@ -533,24 +530,37 @@ export declare const notificationDefinitions: readonly [import("../notification.
|
|
|
533
530
|
rejectionCode: import("@sinclair/typebox").TString & {
|
|
534
531
|
static: "NotInContacts" | "AgentNotFound" | "AgentNoOwner" | "UserInvalid" | "UserValidationFailed" | "ContactCheckFailed";
|
|
535
532
|
};
|
|
536
|
-
}>>, import("../notification.js").NotificationDefinition<"
|
|
537
|
-
|
|
538
|
-
static: import("../brands.js").BrandedString<"
|
|
533
|
+
}>>, import("../notification.js").NotificationDefinition<"task/ready", import("@sinclair/typebox").TObject<{
|
|
534
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
535
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
539
536
|
};
|
|
540
537
|
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
541
538
|
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
542
539
|
}>;
|
|
543
|
-
}>>, import("../notification.js").NotificationDefinition<"
|
|
544
|
-
|
|
545
|
-
static: import("../brands.js").BrandedString<"
|
|
540
|
+
}>>, import("../notification.js").NotificationDefinition<"task/failed", import("@sinclair/typebox").TObject<{
|
|
541
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
542
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
546
543
|
};
|
|
547
|
-
}>>, import("../notification.js").NotificationDefinition<"
|
|
548
|
-
|
|
549
|
-
static: import("../brands.js").BrandedString<"
|
|
544
|
+
}>>, import("../notification.js").NotificationDefinition<"task/closed", import("@sinclair/typebox").TObject<{
|
|
545
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
546
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
550
547
|
};
|
|
551
|
-
|
|
552
|
-
static: import("../brands.js").BrandedString<"
|
|
548
|
+
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
549
|
+
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
550
|
+
}>;
|
|
551
|
+
closedBy: import("@sinclair/typebox").TObject<{
|
|
552
|
+
agentId: import("@sinclair/typebox").TString & {
|
|
553
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
554
|
+
};
|
|
555
|
+
ownerId: import("@sinclair/typebox").TString;
|
|
556
|
+
}>;
|
|
557
|
+
}>>, import("../notification.js").NotificationDefinition<"task/admissionComplete", import("@sinclair/typebox").TObject<{
|
|
558
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
559
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
553
560
|
};
|
|
561
|
+
admittedAgentIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString & {
|
|
562
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
563
|
+
}>;
|
|
554
564
|
}>>];
|
|
555
565
|
export declare const notificationGroup: import("../rpc-groups.js").NotificationDescriptorGroup<"notification", readonly [import("../notification.js").NotificationDefinition<"messages/received", import("@sinclair/typebox").TObject<{
|
|
556
566
|
message: import("@sinclair/typebox").TObject<{
|
|
@@ -586,16 +596,6 @@ export declare const notificationGroup: import("../rpc-groups.js").NotificationD
|
|
|
586
596
|
patchedBy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
587
597
|
createdAt: import("@sinclair/typebox").TString;
|
|
588
598
|
}>;
|
|
589
|
-
}>>, import("../notification.js").NotificationDefinition<"messages/delivered", import("@sinclair/typebox").TObject<{
|
|
590
|
-
messageId: import("@sinclair/typebox").TString & {
|
|
591
|
-
static: import("../brands.js").BrandedString<"MessageId">;
|
|
592
|
-
};
|
|
593
|
-
conversationId: import("@sinclair/typebox").TString & {
|
|
594
|
-
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
595
|
-
};
|
|
596
|
-
agentId: import("@sinclair/typebox").TString & {
|
|
597
|
-
static: import("../brands.js").BrandedString<"AgentId">;
|
|
598
|
-
};
|
|
599
599
|
}>>, import("../notification.js").NotificationDefinition<"conversations/created", import("@sinclair/typebox").TObject<{
|
|
600
600
|
conversation: import("@sinclair/typebox").TObject<{
|
|
601
601
|
id: import("@sinclair/typebox").TString & {
|
|
@@ -683,15 +683,15 @@ export declare const notificationGroup: import("../rpc-groups.js").NotificationD
|
|
|
683
683
|
static: "online" | "offline" | "away";
|
|
684
684
|
};
|
|
685
685
|
}>>, import("../notification.js").NotificationDefinition<"app/participantAdmitted", import("@sinclair/typebox").TObject<{
|
|
686
|
-
|
|
687
|
-
static: import("../brands.js").BrandedString<"
|
|
686
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
687
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
688
688
|
};
|
|
689
689
|
agentId: import("@sinclair/typebox").TString & {
|
|
690
690
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
691
691
|
};
|
|
692
692
|
}>>, import("../notification.js").NotificationDefinition<"app/participantRejected", import("@sinclair/typebox").TObject<{
|
|
693
|
-
|
|
694
|
-
static: import("../brands.js").BrandedString<"
|
|
693
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
694
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
695
695
|
};
|
|
696
696
|
agentId: import("@sinclair/typebox").TString & {
|
|
697
697
|
static: import("../brands.js").BrandedString<"AgentId">;
|
|
@@ -704,25 +704,52 @@ export declare const notificationGroup: import("../rpc-groups.js").NotificationD
|
|
|
704
704
|
rejectionCode: import("@sinclair/typebox").TString & {
|
|
705
705
|
static: "NotInContacts" | "AgentNotFound" | "AgentNoOwner" | "UserInvalid" | "UserValidationFailed" | "ContactCheckFailed";
|
|
706
706
|
};
|
|
707
|
-
}>>, import("../notification.js").NotificationDefinition<"
|
|
708
|
-
|
|
709
|
-
static: import("../brands.js").BrandedString<"
|
|
707
|
+
}>>, import("../notification.js").NotificationDefinition<"task/ready", import("@sinclair/typebox").TObject<{
|
|
708
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
709
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
710
710
|
};
|
|
711
711
|
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
712
712
|
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
713
713
|
}>;
|
|
714
|
-
}>>, import("../notification.js").NotificationDefinition<"
|
|
715
|
-
|
|
716
|
-
static: import("../brands.js").BrandedString<"
|
|
714
|
+
}>>, import("../notification.js").NotificationDefinition<"task/failed", import("@sinclair/typebox").TObject<{
|
|
715
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
716
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
717
717
|
};
|
|
718
|
-
}>>, import("../notification.js").NotificationDefinition<"
|
|
719
|
-
|
|
720
|
-
static: import("../brands.js").BrandedString<"
|
|
718
|
+
}>>, import("../notification.js").NotificationDefinition<"task/closed", import("@sinclair/typebox").TObject<{
|
|
719
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
720
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
721
721
|
};
|
|
722
|
-
|
|
723
|
-
static: import("../brands.js").BrandedString<"
|
|
722
|
+
conversations: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TString & {
|
|
723
|
+
static: import("../brands.js").BrandedString<"ConversationId">;
|
|
724
|
+
}>;
|
|
725
|
+
closedBy: import("@sinclair/typebox").TObject<{
|
|
726
|
+
agentId: import("@sinclair/typebox").TString & {
|
|
727
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
728
|
+
};
|
|
729
|
+
ownerId: import("@sinclair/typebox").TString;
|
|
730
|
+
}>;
|
|
731
|
+
}>>, import("../notification.js").NotificationDefinition<"task/admissionComplete", import("@sinclair/typebox").TObject<{
|
|
732
|
+
taskId: import("@sinclair/typebox").TString & {
|
|
733
|
+
static: import("../brands.js").BrandedString<"TaskId">;
|
|
724
734
|
};
|
|
735
|
+
admittedAgentIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString & {
|
|
736
|
+
static: import("../brands.js").BrandedString<"AgentId">;
|
|
737
|
+
}>;
|
|
725
738
|
}>>]>;
|
|
726
739
|
export type AnyNotificationDefinition = (typeof notificationDefinitions)[number];
|
|
727
740
|
export type NotificationMethodName = AnyNotificationDefinition["name"];
|
|
741
|
+
/**
|
|
742
|
+
* Discriminated union emitted by the client wire decoder for any
|
|
743
|
+
* inbound notification frame: a known method (descriptor attached,
|
|
744
|
+
* `params: unknown` until validated) or an unknown method (no
|
|
745
|
+
* descriptor). The consumer-facing union for `subscribers.dispatch`,
|
|
746
|
+
* the `notificationsBufferRef` queue, and `MoltZapService.handleNotification`
|
|
747
|
+
* — production typed handlers narrow this into `DecodedNotification<D>`
|
|
748
|
+
* via the typed-bridge lift (`validateNotificationParams`).
|
|
749
|
+
*
|
|
750
|
+
* Specialized over the closed `AnyNotificationDefinition` union so the
|
|
751
|
+
* Raw branch distributes per descriptor; the discriminator is the
|
|
752
|
+
* `definition` field (present + typed for known, absent on unknown).
|
|
753
|
+
*/
|
|
754
|
+
export type DecodedNotificationFrame = RawDecodedNotification<AnyNotificationDefinition> | UnknownDecodedNotification;
|
|
728
755
|
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/schema/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../src/schema/notifications.ts"],"names":[],"mappings":"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"}
|
|
@@ -2,16 +2,15 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
import { MessageSchema } from "./messages.js";
|
|
3
3
|
import { ConversationSchema } from "./conversations.js";
|
|
4
4
|
import { ContactSchema } from "./contacts.js";
|
|
5
|
-
import { ConversationId,
|
|
5
|
+
import { ConversationId, AgentId, TaskId } from "./primitives.js";
|
|
6
6
|
import { PresenceStatusEnum } from "./presence.js";
|
|
7
|
-
import { AppSessionId } from "./apps.js";
|
|
8
7
|
import { stringEnum, DateTimeString } from "../helpers.js";
|
|
9
8
|
import { jsonRpcMethod } from "./json-rpc.js";
|
|
10
9
|
import { defineNotification } from "../notification.js";
|
|
11
|
-
import { defineNotificationGroup } from "../rpc-groups.js";
|
|
10
|
+
import { defineNotificationGroup, } from "../rpc-groups.js";
|
|
11
|
+
import { LifecycleAgentSchema } from "../app/methods/apps.js";
|
|
12
12
|
const notificationNames = {
|
|
13
13
|
MessageReceived: jsonRpcMethod("messages/received"),
|
|
14
|
-
MessageDelivered: jsonRpcMethod("messages/delivered"),
|
|
15
14
|
ConversationCreated: jsonRpcMethod("conversations/created"),
|
|
16
15
|
ConversationUpdated: jsonRpcMethod("conversations/updated"),
|
|
17
16
|
ConversationArchived: jsonRpcMethod("conversations/archived"),
|
|
@@ -21,16 +20,12 @@ const notificationNames = {
|
|
|
21
20
|
PresenceChanged: jsonRpcMethod("presence/changed"),
|
|
22
21
|
AppParticipantAdmitted: jsonRpcMethod("app/participantAdmitted"),
|
|
23
22
|
AppParticipantRejected: jsonRpcMethod("app/participantRejected"),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
TaskReady: jsonRpcMethod("task/ready"),
|
|
24
|
+
TaskFailed: jsonRpcMethod("task/failed"),
|
|
25
|
+
TaskClosed: jsonRpcMethod("task/closed"),
|
|
26
|
+
TaskAdmissionComplete: jsonRpcMethod("task/admissionComplete"),
|
|
27
27
|
};
|
|
28
28
|
export const MessageReceivedNotificationSchema = Type.Object({ message: MessageSchema }, { additionalProperties: false });
|
|
29
|
-
export const MessageDeliveredNotificationSchema = Type.Object({
|
|
30
|
-
messageId: MessageId,
|
|
31
|
-
conversationId: ConversationId,
|
|
32
|
-
agentId: AgentId,
|
|
33
|
-
}, { additionalProperties: false });
|
|
34
29
|
export const ConversationCreatedNotificationSchema = Type.Object({ conversation: ConversationSchema }, { additionalProperties: false });
|
|
35
30
|
export const ConversationUpdatedNotificationSchema = Type.Object({ conversation: ConversationSchema }, { additionalProperties: false });
|
|
36
31
|
export const ConversationArchivedNotificationSchema = Type.Object({
|
|
@@ -48,13 +43,17 @@ export const PresenceChangedNotificationSchema = Type.Object({
|
|
|
48
43
|
agentId: AgentId,
|
|
49
44
|
status: PresenceStatusEnum,
|
|
50
45
|
}, { additionalProperties: false });
|
|
51
|
-
// App notifications
|
|
46
|
+
// App-admission notifications. Field name `taskId` (not `sessionId`) since
|
|
47
|
+
// Phase 7 dropped the `app_sessions` schema and renamed `AppSessionId →
|
|
48
|
+
// TaskId`. The notification names keep the `app/` prefix because admission
|
|
49
|
+
// is an app-framework concern; the lifecycle notifications below use the
|
|
50
|
+
// `task/` prefix per plan §2.9.
|
|
52
51
|
export const AppParticipantAdmittedNotificationSchema = Type.Object({
|
|
53
|
-
|
|
52
|
+
taskId: TaskId,
|
|
54
53
|
agentId: AgentId,
|
|
55
54
|
}, { additionalProperties: false });
|
|
56
55
|
export const AppParticipantRejectedNotificationSchema = Type.Object({
|
|
57
|
-
|
|
56
|
+
taskId: TaskId,
|
|
58
57
|
agentId: AgentId,
|
|
59
58
|
reason: Type.String(),
|
|
60
59
|
stage: stringEnum(["user", "identity"]),
|
|
@@ -68,25 +67,38 @@ export const AppParticipantRejectedNotificationSchema = Type.Object({
|
|
|
68
67
|
"ContactCheckFailed",
|
|
69
68
|
]),
|
|
70
69
|
}, { additionalProperties: false });
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
// Task lifecycle notifications (renamed from app/sessionX in Phase 7 per
|
|
71
|
+
// plan §2.9). Same wire payload as the prior app/sessionReady and
|
|
72
|
+
// app/sessionFailed; task/closed augments the prior app/sessionClosed
|
|
73
|
+
// payload with `conversations` and the closer's `ownerId`.
|
|
74
|
+
export const TaskReadyNotificationSchema = Type.Object({
|
|
75
|
+
taskId: TaskId,
|
|
73
76
|
conversations: Type.Record(Type.String(), ConversationId),
|
|
74
77
|
}, { additionalProperties: false });
|
|
75
|
-
export const
|
|
76
|
-
|
|
78
|
+
export const TaskFailedNotificationSchema = Type.Object({
|
|
79
|
+
taskId: TaskId,
|
|
77
80
|
}, { additionalProperties: false });
|
|
78
|
-
export const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
export const TaskClosedNotificationSchema = Type.Object({
|
|
82
|
+
taskId: TaskId,
|
|
83
|
+
conversations: Type.Record(Type.String(), ConversationId),
|
|
84
|
+
// `closedBy` reuses the hook-context shape so the closer payload
|
|
85
|
+
// stays in lockstep across the wire (this notification + the
|
|
86
|
+
// surviving `apps/onClose` hook context).
|
|
87
|
+
closedBy: LifecycleAgentSchema,
|
|
88
|
+
}, { additionalProperties: false });
|
|
89
|
+
// Server → TM notification per plan §2.9. Fires after admission completes,
|
|
90
|
+
// before `task/ready` reaches the participants. Carries the agent ids the
|
|
91
|
+
// server admitted so the TM can begin its setup phase with full membership
|
|
92
|
+
// already known. In Phase 7 the TM endpoint may be unregistered; in that
|
|
93
|
+
// case the notification is dropped.
|
|
94
|
+
export const TaskAdmissionCompleteNotificationSchema = Type.Object({
|
|
95
|
+
taskId: TaskId,
|
|
96
|
+
admittedAgentIds: Type.Array(AgentId),
|
|
81
97
|
}, { additionalProperties: false });
|
|
82
98
|
export const MessageReceivedNotificationDefinition = defineNotification({
|
|
83
99
|
name: notificationNames.MessageReceived,
|
|
84
100
|
params: MessageReceivedNotificationSchema,
|
|
85
101
|
});
|
|
86
|
-
export const MessageDeliveredNotificationDefinition = defineNotification({
|
|
87
|
-
name: notificationNames.MessageDelivered,
|
|
88
|
-
params: MessageDeliveredNotificationSchema,
|
|
89
|
-
});
|
|
90
102
|
export const ConversationCreatedNotificationDefinition = defineNotification({
|
|
91
103
|
name: notificationNames.ConversationCreated,
|
|
92
104
|
params: ConversationCreatedNotificationSchema,
|
|
@@ -123,21 +135,24 @@ export const AppParticipantRejectedNotificationDefinition = defineNotification({
|
|
|
123
135
|
name: notificationNames.AppParticipantRejected,
|
|
124
136
|
params: AppParticipantRejectedNotificationSchema,
|
|
125
137
|
});
|
|
126
|
-
export const
|
|
127
|
-
name: notificationNames.
|
|
128
|
-
params:
|
|
138
|
+
export const TaskReadyNotificationDefinition = defineNotification({
|
|
139
|
+
name: notificationNames.TaskReady,
|
|
140
|
+
params: TaskReadyNotificationSchema,
|
|
141
|
+
});
|
|
142
|
+
export const TaskFailedNotificationDefinition = defineNotification({
|
|
143
|
+
name: notificationNames.TaskFailed,
|
|
144
|
+
params: TaskFailedNotificationSchema,
|
|
129
145
|
});
|
|
130
|
-
export const
|
|
131
|
-
name: notificationNames.
|
|
132
|
-
params:
|
|
146
|
+
export const TaskClosedNotificationDefinition = defineNotification({
|
|
147
|
+
name: notificationNames.TaskClosed,
|
|
148
|
+
params: TaskClosedNotificationSchema,
|
|
133
149
|
});
|
|
134
|
-
export const
|
|
135
|
-
name: notificationNames.
|
|
136
|
-
params:
|
|
150
|
+
export const TaskAdmissionCompleteNotificationDefinition = defineNotification({
|
|
151
|
+
name: notificationNames.TaskAdmissionComplete,
|
|
152
|
+
params: TaskAdmissionCompleteNotificationSchema,
|
|
137
153
|
});
|
|
138
154
|
export const notificationDefinitions = [
|
|
139
155
|
MessageReceivedNotificationDefinition,
|
|
140
|
-
MessageDeliveredNotificationDefinition,
|
|
141
156
|
ConversationCreatedNotificationDefinition,
|
|
142
157
|
ConversationUpdatedNotificationDefinition,
|
|
143
158
|
ConversationArchivedNotificationDefinition,
|
|
@@ -147,9 +162,10 @@ export const notificationDefinitions = [
|
|
|
147
162
|
PresenceChangedNotificationDefinition,
|
|
148
163
|
AppParticipantAdmittedNotificationDefinition,
|
|
149
164
|
AppParticipantRejectedNotificationDefinition,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
165
|
+
TaskReadyNotificationDefinition,
|
|
166
|
+
TaskFailedNotificationDefinition,
|
|
167
|
+
TaskClosedNotificationDefinition,
|
|
168
|
+
TaskAdmissionCompleteNotificationDefinition,
|
|
153
169
|
];
|
|
154
170
|
export const notificationGroup = defineNotificationGroup("notification", notificationDefinitions);
|
|
155
171
|
//# sourceMappingURL=notifications.js.map
|