dsh-bot-team 1.1.0 → 1.3.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 +194 -0
- package/README.md +206 -156
- package/client.js +3706 -746
- package/cordis.patch.yml +2 -2
- package/host/agents.js +469 -289
- package/host/background-interactions.js +213 -0
- package/host/conversations.js +45 -0
- package/host/discussion-flow.js +179 -0
- package/host/discussion-runner.js +491 -0
- package/host/domain.js +551 -69
- package/host/engine.js +621 -166
- package/host/execution.js +192 -121
- package/host/native-activity.js +225 -0
- package/host/native-session.js +144 -0
- package/host/pdf.js +43 -6
- package/host/prompt.js +253 -9
- package/host/routes.js +31 -1
- package/host/service.js +751 -127
- package/host/session-export.js +22 -0
- package/host/session-visibility.js +147 -0
- package/host/storage-layout.js +109 -0
- package/host/tools.js +314 -85
- package/host/update-check.js +351 -0
- package/host/util.js +3 -2
- package/host/workspace.js +36 -2
- package/index.js +1 -1
- package/package.json +14 -6
package/host/routes.js
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Host ↔ Client transport: authenticated exact Fetch routes under the `/api`
|
|
3
3
|
* fence (M0-verified). Reads use GET, writes POST JSON, live updates SSE.
|
|
4
4
|
*
|
|
5
|
-
* GET /api/bot-team.bootstrap — bots / groups / members / model catalog
|
|
5
|
+
* GET /api/bot-team.bootstrap — bots / groups / members / model catalog / update snapshot
|
|
6
|
+
* GET/POST /api/bot-team.update — read snapshot / await a manual update check
|
|
6
7
|
* GET /api/bot-team.messages — timeline page (?groupId=&afterSeq=&beforeSeq=&limit=)
|
|
7
8
|
* GET /api/bot-team.events — SSE frames for one group
|
|
8
9
|
* GET /api/bot-team.message-execution — recorded execution for one Bot reply
|
|
10
|
+
* GET /api/bot-team.session-history — complete read-only Bot Session history
|
|
9
11
|
* POST /api/bot-team.action — { action, payload } (groups, direct chats,
|
|
10
12
|
* folders, members, messages, tasks …)
|
|
11
13
|
* GET /api/bot-team.file — persona file read (?botId=&kind=bot, legacy soul|agent)
|
|
@@ -16,8 +18,12 @@
|
|
|
16
18
|
*/
|
|
17
19
|
export const ROUTES = {
|
|
18
20
|
bootstrap: '/api/bot-team.bootstrap',
|
|
21
|
+
update: '/api/bot-team.update',
|
|
19
22
|
messages: '/api/bot-team.messages',
|
|
23
|
+
conversations: '/api/bot-team.conversations',
|
|
20
24
|
execution: '/api/bot-team.message-execution',
|
|
25
|
+
sessionHistory: '/api/bot-team.session-history',
|
|
26
|
+
sessionExport: '/api/bot-team.session-export',
|
|
21
27
|
events: '/api/bot-team.events',
|
|
22
28
|
action: '/api/bot-team.action',
|
|
23
29
|
health: '/api/bot-team.health',
|
|
@@ -37,18 +43,42 @@ export function registerRoutes(ctx, service) {
|
|
|
37
43
|
requestBody: 'buffered',
|
|
38
44
|
fetch: () => service.handleBootstrap(),
|
|
39
45
|
});
|
|
46
|
+
register({
|
|
47
|
+
path: ROUTES.update,
|
|
48
|
+
methods: ['GET', 'POST'],
|
|
49
|
+
requestBody: 'buffered',
|
|
50
|
+
fetch: (request) => service.handleUpdateHttp(request),
|
|
51
|
+
});
|
|
40
52
|
register({
|
|
41
53
|
path: ROUTES.messages,
|
|
42
54
|
methods: ['GET'],
|
|
43
55
|
requestBody: 'buffered',
|
|
44
56
|
fetch: (request) => service.handleMessages(request),
|
|
45
57
|
});
|
|
58
|
+
register({
|
|
59
|
+
path: ROUTES.conversations,
|
|
60
|
+
methods: ['GET'],
|
|
61
|
+
requestBody: 'buffered',
|
|
62
|
+
fetch: (request) => service.handleConversations(request),
|
|
63
|
+
});
|
|
46
64
|
register({
|
|
47
65
|
path: ROUTES.execution,
|
|
48
66
|
methods: ['GET'],
|
|
49
67
|
requestBody: 'buffered',
|
|
50
68
|
fetch: (request) => service.handleMessageExecution(request),
|
|
51
69
|
});
|
|
70
|
+
register({
|
|
71
|
+
path: ROUTES.sessionHistory,
|
|
72
|
+
methods: ['GET'],
|
|
73
|
+
requestBody: 'buffered',
|
|
74
|
+
fetch: (request) => service.handleSessionHistory(request),
|
|
75
|
+
});
|
|
76
|
+
register({
|
|
77
|
+
path: ROUTES.sessionExport,
|
|
78
|
+
methods: ['GET'],
|
|
79
|
+
requestBody: 'buffered',
|
|
80
|
+
fetch: (request) => service.handleSessionExport(request),
|
|
81
|
+
});
|
|
52
82
|
register({
|
|
53
83
|
path: ROUTES.events,
|
|
54
84
|
methods: ['GET'],
|