@quartal/hub-plugin 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +18 -3
- package/dist/mod.d.ts +683 -0
- package/dist/mod.js +742 -0
- package/package.json +38 -3
- package/schemas/channel-1.0.schema.json +341 -0
package/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quartal/hub-plugin",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "Quartal Hub's extension of Quartal Plugin: channel definitions, Hub sign-in and pages",
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Quartal Accounting Software Oy",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/quartal-accounting/quartal-messages.git",
|
|
10
|
+
"directory": "@quartal/hub-plugin"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/mod.d.ts",
|
|
16
|
+
"import": "./dist/mod.js"
|
|
17
|
+
},
|
|
18
|
+
"./channel-1.0.schema.json": "./schemas/channel-1.0.schema.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"schemas",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^24.0.0",
|
|
31
|
+
"tsdown": "^0.21.9",
|
|
32
|
+
"tsx": "^4.23.15",
|
|
33
|
+
"typescript": "^6.0.3"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
37
|
+
"test": "tsx --test \"src/**/*.test.ts\"",
|
|
38
|
+
"schema": "tsx scripts/writeSchema.ts",
|
|
39
|
+
"build": "tsdown"
|
|
40
|
+
}
|
|
6
41
|
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://hub.quartal.com/schemas/channel-1.0.schema.json",
|
|
4
|
+
"title": "Quartal Hub channel definition",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"title"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"title": {
|
|
14
|
+
"oneOf": [
|
|
15
|
+
{
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"fi": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"en": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"sv": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"description": "The name a channel made from the definition gets."
|
|
35
|
+
},
|
|
36
|
+
"description": {
|
|
37
|
+
"oneOf": [
|
|
38
|
+
{
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"fi": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"en": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"sv": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": false
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"kind": {
|
|
59
|
+
"enum": [
|
|
60
|
+
"multi-party",
|
|
61
|
+
"copilot"
|
|
62
|
+
],
|
|
63
|
+
"description": "multi-party (default): people and agents in Quartal's chat; copilot: one person and one agent per thread, open to AG-UI clients."
|
|
64
|
+
},
|
|
65
|
+
"icon": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "A Material Symbols icon name."
|
|
68
|
+
},
|
|
69
|
+
"color": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "A Bootstrap theme color name or a CSS color."
|
|
72
|
+
},
|
|
73
|
+
"avatar": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "A picture shown instead of the icon: a path in the plugin or a URL."
|
|
76
|
+
},
|
|
77
|
+
"statuses": {
|
|
78
|
+
"type": "array",
|
|
79
|
+
"description": "The thread statuses, in view order; the first is a new thread's.",
|
|
80
|
+
"items": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": [
|
|
83
|
+
"key",
|
|
84
|
+
"text",
|
|
85
|
+
"baseStatus"
|
|
86
|
+
],
|
|
87
|
+
"properties": {
|
|
88
|
+
"key": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[a-z0-9][a-z0-9_-]*$"
|
|
91
|
+
},
|
|
92
|
+
"text": {
|
|
93
|
+
"oneOf": [
|
|
94
|
+
{
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"fi": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"en": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"sv": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"additionalProperties": false
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"description": {
|
|
115
|
+
"oneOf": [
|
|
116
|
+
{
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"type": "object",
|
|
121
|
+
"properties": {
|
|
122
|
+
"fi": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"en": {
|
|
126
|
+
"type": "string"
|
|
127
|
+
},
|
|
128
|
+
"sv": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"baseStatus": {
|
|
137
|
+
"enum": [
|
|
138
|
+
"unread",
|
|
139
|
+
"in_progress",
|
|
140
|
+
"handled",
|
|
141
|
+
"archived",
|
|
142
|
+
"error",
|
|
143
|
+
"warning"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"icon": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"color": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": false
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"agents": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"required": [
|
|
161
|
+
"agent",
|
|
162
|
+
"triggers"
|
|
163
|
+
],
|
|
164
|
+
"properties": {
|
|
165
|
+
"agent": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*(/[a-z0-9][a-z0-9._-]*)?$",
|
|
168
|
+
"description": "<name> or <plugin id>/<name>"
|
|
169
|
+
},
|
|
170
|
+
"triggers": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"items": {
|
|
173
|
+
"enum": [
|
|
174
|
+
"manual",
|
|
175
|
+
"create_thread",
|
|
176
|
+
"company_message",
|
|
177
|
+
"advisor_message",
|
|
178
|
+
"assign",
|
|
179
|
+
"status_change",
|
|
180
|
+
"schedule"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"uniqueItems": true
|
|
184
|
+
},
|
|
185
|
+
"active": {
|
|
186
|
+
"type": "boolean"
|
|
187
|
+
},
|
|
188
|
+
"instructions": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"approve": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"minLength": 1
|
|
196
|
+
},
|
|
197
|
+
"uniqueItems": true,
|
|
198
|
+
"description": "Tools that run only after the person the agent answers approves the call."
|
|
199
|
+
},
|
|
200
|
+
"plugins": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"required": [
|
|
205
|
+
"id"
|
|
206
|
+
],
|
|
207
|
+
"properties": {
|
|
208
|
+
"id": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"minLength": 1
|
|
211
|
+
},
|
|
212
|
+
"tools": {
|
|
213
|
+
"type": "array",
|
|
214
|
+
"items": {
|
|
215
|
+
"type": "string"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"skills": {
|
|
219
|
+
"type": "array",
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"widgets": {
|
|
225
|
+
"type": "boolean"
|
|
226
|
+
},
|
|
227
|
+
"auth": {
|
|
228
|
+
"enum": [
|
|
229
|
+
"none",
|
|
230
|
+
"token"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"additionalProperties": false
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"hubTools": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"description": "The Hub's own tools for this agent, by tool or group: allow, ask (approval), off, or on (the tool's own level).",
|
|
240
|
+
"propertyNames": {
|
|
241
|
+
"enum": [
|
|
242
|
+
"thread",
|
|
243
|
+
"files",
|
|
244
|
+
"memory",
|
|
245
|
+
"plan",
|
|
246
|
+
"context",
|
|
247
|
+
"web",
|
|
248
|
+
"thread_set_status",
|
|
249
|
+
"ask_user",
|
|
250
|
+
"thread_assign",
|
|
251
|
+
"message_post",
|
|
252
|
+
"thread_create",
|
|
253
|
+
"thread_search",
|
|
254
|
+
"files_list",
|
|
255
|
+
"files_read",
|
|
256
|
+
"files_search",
|
|
257
|
+
"files_write",
|
|
258
|
+
"files_edit",
|
|
259
|
+
"files_move",
|
|
260
|
+
"files_copy",
|
|
261
|
+
"files_mkdir",
|
|
262
|
+
"files_delete",
|
|
263
|
+
"memory",
|
|
264
|
+
"plan",
|
|
265
|
+
"company_context",
|
|
266
|
+
"web_fetch"
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
"additionalProperties": {
|
|
270
|
+
"enum": [
|
|
271
|
+
"on",
|
|
272
|
+
"allow",
|
|
273
|
+
"ask",
|
|
274
|
+
"off"
|
|
275
|
+
]
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"schedules": {
|
|
279
|
+
"type": "array",
|
|
280
|
+
"description": "Time-based runs: at each time, the agent gets the message in each customer company the schedule names, acting for the company with its own agent token.",
|
|
281
|
+
"items": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"required": [
|
|
284
|
+
"id",
|
|
285
|
+
"cron",
|
|
286
|
+
"message"
|
|
287
|
+
],
|
|
288
|
+
"properties": {
|
|
289
|
+
"id": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"pattern": "^[a-z0-9][a-z0-9_-]*$"
|
|
292
|
+
},
|
|
293
|
+
"cron": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"description": "minute hour day-of-month month day-of-week, e.g. \"0 9 5 * *\"."
|
|
296
|
+
},
|
|
297
|
+
"timeZone": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"description": "IANA time zone (default Europe/Helsinki)."
|
|
300
|
+
},
|
|
301
|
+
"message": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"minLength": 1
|
|
304
|
+
},
|
|
305
|
+
"threadTitle": {
|
|
306
|
+
"type": "string"
|
|
307
|
+
},
|
|
308
|
+
"companies": {
|
|
309
|
+
"description": "The companies it runs for: \"all\" (default) for every customer the channel lists, or their directory ids.",
|
|
310
|
+
"oneOf": [
|
|
311
|
+
{
|
|
312
|
+
"const": "all"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"type": "array",
|
|
316
|
+
"items": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
319
|
+
},
|
|
320
|
+
"uniqueItems": true
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"target": {
|
|
325
|
+
"enum": [
|
|
326
|
+
"message",
|
|
327
|
+
"thread"
|
|
328
|
+
],
|
|
329
|
+
"description": "Where each run goes (default message): a new message in one thread per company, or a new thread each time."
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"additionalProperties": false
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"additionalProperties": false
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"additionalProperties": false
|
|
341
|
+
}
|