@quartal/hub-plugin 0.3.0 → 0.4.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/README.md +19 -19
- package/dist/mod.d.ts +20 -0
- package/dist/mod.js +23 -1
- package/package.json +1 -1
- package/schemas/channel-1.0.schema.json +354 -341
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# @quartal/hub-plugin
|
|
2
|
-
|
|
3
|
-
Quartal Hub's extension of [Quartal Plugin](https://plugin.quartal.com/): what makes a plugin a
|
|
4
|
-
Hub plugin.
|
|
5
|
-
|
|
6
|
-
- **The channel definition** — `com.quartal.hub/channel.json` in a plugin (an Agent Plugins
|
|
7
|
-
extension directory): the channel's name and look, its thread statuses and its agents with their
|
|
8
|
-
triggers, instructions and plugins. Types (`ChannelDefinition`), the JSON Schema
|
|
9
|
-
(`@quartal/hub-plugin/channel-1.0.schema.json`, regenerate with `pnpm schema`) and the checks
|
|
10
|
-
(`parseChannelDefinition`).
|
|
11
|
-
- **The Hub settings of a plugin** — `hubPluginSettings('hub' | 'app', …)`: sign-in with Quartal
|
|
12
|
-
Hub, and what the plugin's web site serves (`site` in `qrtl.config.json`).
|
|
13
|
-
- **A new channel plugin** — `channelPluginFiles(…)`: the definition, the default agent, the Hub
|
|
14
|
-
settings, the channel's own page (`templates/channel-page/`, written into
|
|
15
|
-
`src/channelPageTemplate.generated.ts` by `pnpm template`) and a README, written over a plugin
|
|
16
|
-
project. The page: [docs/channel-pages.md](../../docs/channel-pages.md).
|
|
17
|
-
|
|
18
|
-
How channels use it: [docs/channel-definitions.md](../../docs/channel-definitions.md). The package
|
|
19
|
-
is private to this workspace for now and exports its TypeScript source.
|
|
1
|
+
# @quartal/hub-plugin
|
|
2
|
+
|
|
3
|
+
Quartal Hub's extension of [Quartal Plugin](https://plugin.quartal.com/): what makes a plugin a
|
|
4
|
+
Hub plugin.
|
|
5
|
+
|
|
6
|
+
- **The channel definition** — `com.quartal.hub/channel.json` in a plugin (an Agent Plugins
|
|
7
|
+
extension directory): the channel's name and look, its thread statuses and its agents with their
|
|
8
|
+
triggers, instructions and plugins. Types (`ChannelDefinition`), the JSON Schema
|
|
9
|
+
(`@quartal/hub-plugin/channel-1.0.schema.json`, regenerate with `pnpm schema`) and the checks
|
|
10
|
+
(`parseChannelDefinition`).
|
|
11
|
+
- **The Hub settings of a plugin** — `hubPluginSettings('hub' | 'app', …)`: sign-in with Quartal
|
|
12
|
+
Hub, and what the plugin's web site serves (`site` in `qrtl.config.json`).
|
|
13
|
+
- **A new channel plugin** — `channelPluginFiles(…)`: the definition, the default agent, the Hub
|
|
14
|
+
settings, the channel's own page (`templates/channel-page/`, written into
|
|
15
|
+
`src/channelPageTemplate.generated.ts` by `pnpm template`) and a README, written over a plugin
|
|
16
|
+
project. The page: [docs/channel-pages.md](../../docs/channel-pages.md).
|
|
17
|
+
|
|
18
|
+
How channels use it: [docs/channel-definitions.md](../../docs/channel-definitions.md). The package
|
|
19
|
+
is private to this workspace for now and exports its TypeScript source.
|
package/dist/mod.d.ts
CHANGED
|
@@ -163,6 +163,13 @@ interface ChannelStatusDefinition {
|
|
|
163
163
|
icon?: string;
|
|
164
164
|
/** A Bootstrap theme color name or a CSS color; the base status' color when unset. */
|
|
165
165
|
color?: string;
|
|
166
|
+
/** Not a column of the Kanban view (e.g. an archived status); its threads are still in the other views. */
|
|
167
|
+
hidden?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* The keys of the statuses a thread may move to from this one: the arrows of the channel's
|
|
170
|
+
* workflow picture. Unset: no arrows are drawn from it.
|
|
171
|
+
*/
|
|
172
|
+
next?: string[];
|
|
166
173
|
}
|
|
167
174
|
/**
|
|
168
175
|
* How an agent calls a plugin.
|
|
@@ -403,6 +410,19 @@ declare const channelDefinitionSchema: {
|
|
|
403
410
|
readonly color: {
|
|
404
411
|
readonly type: "string";
|
|
405
412
|
};
|
|
413
|
+
readonly hidden: {
|
|
414
|
+
readonly type: "boolean";
|
|
415
|
+
readonly description: "Not a column of the Kanban view; its threads are still in the other views.";
|
|
416
|
+
};
|
|
417
|
+
readonly next: {
|
|
418
|
+
readonly type: "array";
|
|
419
|
+
readonly description: "The keys of the statuses a thread may move to from this one (the arrows of the workflow picture).";
|
|
420
|
+
readonly items: {
|
|
421
|
+
readonly type: "string";
|
|
422
|
+
readonly pattern: "^[a-z0-9][a-z0-9_-]*$";
|
|
423
|
+
};
|
|
424
|
+
readonly uniqueItems: true;
|
|
425
|
+
};
|
|
406
426
|
};
|
|
407
427
|
readonly additionalProperties: false;
|
|
408
428
|
};
|
package/dist/mod.js
CHANGED
|
@@ -204,7 +204,20 @@ const channelDefinitionSchema = {
|
|
|
204
204
|
description: localizedText,
|
|
205
205
|
baseStatus: { enum: [...CHANNEL_BASE_STATUSES] },
|
|
206
206
|
icon: { type: "string" },
|
|
207
|
-
color: { type: "string" }
|
|
207
|
+
color: { type: "string" },
|
|
208
|
+
hidden: {
|
|
209
|
+
type: "boolean",
|
|
210
|
+
description: "Not a column of the Kanban view; its threads are still in the other views."
|
|
211
|
+
},
|
|
212
|
+
next: {
|
|
213
|
+
type: "array",
|
|
214
|
+
description: "The keys of the statuses a thread may move to from this one (the arrows of the workflow picture).",
|
|
215
|
+
items: {
|
|
216
|
+
type: "string",
|
|
217
|
+
pattern: "^[a-z0-9][a-z0-9_-]*$"
|
|
218
|
+
},
|
|
219
|
+
uniqueItems: true
|
|
220
|
+
}
|
|
208
221
|
},
|
|
209
222
|
additionalProperties: false
|
|
210
223
|
}
|
|
@@ -664,8 +677,17 @@ function parseChannelDefinition(input, ownPluginId) {
|
|
|
664
677
|
if (icon !== void 0) status.icon = icon;
|
|
665
678
|
const color = optionalString(item.color, `${path}.color`);
|
|
666
679
|
if (color !== void 0) status.color = color;
|
|
680
|
+
if (item.hidden !== void 0) {
|
|
681
|
+
if (typeof item.hidden !== "boolean") errors.push(`${path}.hidden: true or false.`);
|
|
682
|
+
else if (item.hidden) status.hidden = true;
|
|
683
|
+
}
|
|
684
|
+
if (item.next !== void 0) if (!Array.isArray(item.next) || item.next.some((k) => typeof k !== "string" || !STATUS_KEY.test(k))) errors.push(`${path}.next: an array of status keys.`);
|
|
685
|
+
else status.next = [...new Set(item.next)];
|
|
667
686
|
definition.statuses.push(status);
|
|
668
687
|
});
|
|
688
|
+
definition.statuses.forEach((status, i) => {
|
|
689
|
+
for (const k of status.next ?? []) if (!keys.has(k)) errors.push(`statuses[${i}].next: no status "${k}".`);
|
|
690
|
+
});
|
|
669
691
|
if (raw.agents !== void 0 && !Array.isArray(raw.agents)) errors.push("agents: an array.");
|
|
670
692
|
const refs = /* @__PURE__ */ new Set();
|
|
671
693
|
(Array.isArray(raw.agents) ? raw.agents : []).forEach((item, i) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quartal/hub-plugin",
|
|
3
3
|
"description": "Quartal Hub's extension of Quartal Plugin: channel definitions, Hub sign-in and pages",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Quartal Accounting Software Oy",
|
|
7
7
|
"repository": {
|
|
@@ -1,341 +1,354 @@
|
|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
"
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
"
|
|
258
|
-
"
|
|
259
|
-
"
|
|
260
|
-
"
|
|
261
|
-
"
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
"
|
|
286
|
-
"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
+
"hidden": {
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"description": "Not a column of the Kanban view; its threads are still in the other views."
|
|
155
|
+
},
|
|
156
|
+
"next": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"description": "The keys of the statuses a thread may move to from this one (the arrows of the workflow picture).",
|
|
159
|
+
"items": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"pattern": "^[a-z0-9][a-z0-9_-]*$"
|
|
162
|
+
},
|
|
163
|
+
"uniqueItems": true
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"additionalProperties": false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"agents": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"required": [
|
|
174
|
+
"agent",
|
|
175
|
+
"triggers"
|
|
176
|
+
],
|
|
177
|
+
"properties": {
|
|
178
|
+
"agent": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*(/[a-z0-9][a-z0-9._-]*)?$",
|
|
181
|
+
"description": "<name> or <plugin id>/<name>"
|
|
182
|
+
},
|
|
183
|
+
"triggers": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"items": {
|
|
186
|
+
"enum": [
|
|
187
|
+
"manual",
|
|
188
|
+
"create_thread",
|
|
189
|
+
"company_message",
|
|
190
|
+
"advisor_message",
|
|
191
|
+
"assign",
|
|
192
|
+
"status_change",
|
|
193
|
+
"schedule"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"uniqueItems": true
|
|
197
|
+
},
|
|
198
|
+
"active": {
|
|
199
|
+
"type": "boolean"
|
|
200
|
+
},
|
|
201
|
+
"instructions": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"approve": {
|
|
205
|
+
"type": "array",
|
|
206
|
+
"items": {
|
|
207
|
+
"type": "string",
|
|
208
|
+
"minLength": 1
|
|
209
|
+
},
|
|
210
|
+
"uniqueItems": true,
|
|
211
|
+
"description": "Tools that run only after the person the agent answers approves the call."
|
|
212
|
+
},
|
|
213
|
+
"plugins": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"required": [
|
|
218
|
+
"id"
|
|
219
|
+
],
|
|
220
|
+
"properties": {
|
|
221
|
+
"id": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"minLength": 1
|
|
224
|
+
},
|
|
225
|
+
"tools": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"items": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"skills": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"widgets": {
|
|
238
|
+
"type": "boolean"
|
|
239
|
+
},
|
|
240
|
+
"auth": {
|
|
241
|
+
"enum": [
|
|
242
|
+
"none",
|
|
243
|
+
"token"
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"additionalProperties": false
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"hubTools": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"description": "The Hub's own tools for this agent, by tool or group: allow, ask (approval), off, or on (the tool's own level).",
|
|
253
|
+
"propertyNames": {
|
|
254
|
+
"enum": [
|
|
255
|
+
"thread",
|
|
256
|
+
"files",
|
|
257
|
+
"memory",
|
|
258
|
+
"plan",
|
|
259
|
+
"context",
|
|
260
|
+
"web",
|
|
261
|
+
"thread_set_status",
|
|
262
|
+
"ask_user",
|
|
263
|
+
"thread_assign",
|
|
264
|
+
"message_post",
|
|
265
|
+
"thread_create",
|
|
266
|
+
"thread_search",
|
|
267
|
+
"files_list",
|
|
268
|
+
"files_read",
|
|
269
|
+
"files_search",
|
|
270
|
+
"files_write",
|
|
271
|
+
"files_edit",
|
|
272
|
+
"files_move",
|
|
273
|
+
"files_copy",
|
|
274
|
+
"files_mkdir",
|
|
275
|
+
"files_delete",
|
|
276
|
+
"memory",
|
|
277
|
+
"plan",
|
|
278
|
+
"company_context",
|
|
279
|
+
"web_fetch"
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
"additionalProperties": {
|
|
283
|
+
"enum": [
|
|
284
|
+
"on",
|
|
285
|
+
"allow",
|
|
286
|
+
"ask",
|
|
287
|
+
"off"
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"schedules": {
|
|
292
|
+
"type": "array",
|
|
293
|
+
"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.",
|
|
294
|
+
"items": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"required": [
|
|
297
|
+
"id",
|
|
298
|
+
"cron",
|
|
299
|
+
"message"
|
|
300
|
+
],
|
|
301
|
+
"properties": {
|
|
302
|
+
"id": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"pattern": "^[a-z0-9][a-z0-9_-]*$"
|
|
305
|
+
},
|
|
306
|
+
"cron": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"description": "minute hour day-of-month month day-of-week, e.g. \"0 9 5 * *\"."
|
|
309
|
+
},
|
|
310
|
+
"timeZone": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"description": "IANA time zone (default Europe/Helsinki)."
|
|
313
|
+
},
|
|
314
|
+
"message": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"minLength": 1
|
|
317
|
+
},
|
|
318
|
+
"threadTitle": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
},
|
|
321
|
+
"companies": {
|
|
322
|
+
"description": "The companies it runs for: \"all\" (default) for every customer the channel lists, or their directory ids.",
|
|
323
|
+
"oneOf": [
|
|
324
|
+
{
|
|
325
|
+
"const": "all"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"type": "array",
|
|
329
|
+
"items": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
332
|
+
},
|
|
333
|
+
"uniqueItems": true
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
},
|
|
337
|
+
"target": {
|
|
338
|
+
"enum": [
|
|
339
|
+
"message",
|
|
340
|
+
"thread"
|
|
341
|
+
],
|
|
342
|
+
"description": "Where each run goes (default message): a new message in one thread per company, or a new thread each time."
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"additionalProperties": false
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"additionalProperties": false
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"additionalProperties": false
|
|
354
|
+
}
|