devchain-cli 0.2.2 → 0.3.1
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 +2 -0
- package/dist/drizzle/0018_whole_zodiak.sql +43 -0
- package/dist/drizzle/0019_flat_avengers.sql +3 -0
- package/dist/drizzle/0020_statuses_mcp_hidden.sql +1 -0
- package/dist/drizzle/meta/0018_snapshot.json +2920 -0
- package/dist/drizzle/meta/0019_snapshot.json +2943 -0
- package/dist/drizzle/meta/0020_snapshot.json +2951 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/server/app.module.js +11 -1
- package/dist/server/app.module.js.map +1 -1
- package/dist/server/common/config/env.config.d.ts +1 -0
- package/dist/server/common/config/env.config.js +4 -0
- package/dist/server/common/config/env.config.js.map +1 -1
- package/dist/server/common/filters/http-exception.filter.js +24 -1
- package/dist/server/common/filters/http-exception.filter.js.map +1 -1
- package/dist/server/common/logging/logger.js +4 -3
- package/dist/server/common/logging/logger.js.map +1 -1
- package/dist/server/main.js +0 -3
- package/dist/server/main.js.map +1 -1
- package/dist/server/modules/agents/agents.module.js +2 -1
- package/dist/server/modules/agents/agents.module.js.map +1 -1
- package/dist/server/modules/agents/controllers/agents.controller.d.ts +17 -2
- package/dist/server/modules/agents/controllers/agents.controller.js +84 -3
- package/dist/server/modules/agents/controllers/agents.controller.js.map +1 -1
- package/dist/server/modules/chat/dtos/chat.dto.d.ts +18 -18
- package/dist/server/modules/chat/services/invite-template.util.js +1 -1
- package/dist/server/modules/chat/services/invite-template.util.js.map +1 -1
- package/dist/server/modules/events/catalog/index.d.ts +40 -0
- package/dist/server/modules/events/catalog/index.js +2 -0
- package/dist/server/modules/events/catalog/index.js.map +1 -1
- package/dist/server/modules/events/catalog/terminal.watcher.triggered.d.ts +45 -0
- package/dist/server/modules/events/catalog/terminal.watcher.triggered.js +22 -0
- package/dist/server/modules/events/catalog/terminal.watcher.triggered.js.map +1 -0
- package/dist/server/modules/events/subscribers/chat-message-delivery.subscriber.d.ts +1 -0
- package/dist/server/modules/events/subscribers/chat-message-delivery.subscriber.js +30 -12
- package/dist/server/modules/events/subscribers/chat-message-delivery.subscriber.js.map +1 -1
- package/dist/server/modules/mcp/constants.js +5 -1
- package/dist/server/modules/mcp/constants.js.map +1 -1
- package/dist/server/modules/mcp/controllers/mcp-http.controller.js +78 -77
- package/dist/server/modules/mcp/controllers/mcp-http.controller.js.map +1 -1
- package/dist/server/modules/mcp/controllers/mcp-sdk.controller.js +78 -77
- package/dist/server/modules/mcp/controllers/mcp-sdk.controller.js.map +1 -1
- package/dist/server/modules/mcp/dtos/mcp.dto.d.ts +125 -97
- package/dist/server/modules/mcp/dtos/mcp.dto.js +23 -26
- package/dist/server/modules/mcp/dtos/mcp.dto.js.map +1 -1
- package/dist/server/modules/mcp/services/instructions-resolver.d.ts +3 -0
- package/dist/server/modules/mcp/services/instructions-resolver.js +83 -2
- package/dist/server/modules/mcp/services/instructions-resolver.js.map +1 -1
- package/dist/server/modules/mcp/services/mcp.service.d.ts +3 -2
- package/dist/server/modules/mcp/services/mcp.service.js +549 -263
- package/dist/server/modules/mcp/services/mcp.service.js.map +1 -1
- package/dist/server/modules/projects/controllers/projects.controller.d.ts +41 -0
- package/dist/server/modules/projects/projects.module.js +2 -1
- package/dist/server/modules/projects/projects.module.js.map +1 -1
- package/dist/server/modules/projects/services/projects.service.d.ts +46 -1
- package/dist/server/modules/projects/services/projects.service.js +243 -18
- package/dist/server/modules/projects/services/projects.service.js.map +1 -1
- package/dist/server/modules/prompts/controllers/prompts.controller.d.ts +1 -1
- package/dist/server/modules/prompts/controllers/prompts.controller.js +26 -4
- package/dist/server/modules/prompts/controllers/prompts.controller.js.map +1 -1
- package/dist/server/modules/sessions/utils/template-renderer.js +1 -0
- package/dist/server/modules/sessions/utils/template-renderer.js.map +1 -1
- package/dist/server/modules/statuses/controllers/statuses.controller.js +2 -0
- package/dist/server/modules/statuses/controllers/statuses.controller.js.map +1 -1
- package/dist/server/modules/storage/db/schema.d.ts +613 -0
- package/dist/server/modules/storage/db/schema.js +50 -1
- package/dist/server/modules/storage/db/schema.js.map +1 -1
- package/dist/server/modules/storage/interfaces/storage.interface.d.ts +40 -2
- package/dist/server/modules/storage/interfaces/storage.interface.js.map +1 -1
- package/dist/server/modules/storage/local/local-storage.service.d.ts +18 -3
- package/dist/server/modules/storage/local/local-storage.service.js +407 -11
- package/dist/server/modules/storage/local/local-storage.service.js.map +1 -1
- package/dist/server/modules/storage/models/domain.models.d.ts +59 -1
- package/dist/server/modules/subscribers/actions/action.interface.d.ts +67 -0
- package/dist/server/modules/subscribers/actions/action.interface.js +3 -0
- package/dist/server/modules/subscribers/actions/action.interface.js.map +1 -0
- package/dist/server/modules/subscribers/actions/actions.registry.d.ts +7 -0
- package/dist/server/modules/subscribers/actions/actions.registry.js +37 -0
- package/dist/server/modules/subscribers/actions/actions.registry.js.map +1 -0
- package/dist/server/modules/subscribers/actions/restart-agent.action.d.ts +8 -0
- package/dist/server/modules/subscribers/actions/restart-agent.action.js +119 -0
- package/dist/server/modules/subscribers/actions/restart-agent.action.js.map +1 -0
- package/dist/server/modules/subscribers/actions/send-message.action.d.ts +2 -0
- package/dist/server/modules/subscribers/actions/send-message.action.js +83 -0
- package/dist/server/modules/subscribers/actions/send-message.action.js.map +1 -0
- package/dist/server/modules/subscribers/controllers/actions.controller.d.ts +6 -0
- package/dist/server/modules/subscribers/controllers/actions.controller.js +51 -0
- package/dist/server/modules/subscribers/controllers/actions.controller.js.map +1 -0
- package/dist/server/modules/subscribers/controllers/subscribers.controller.d.ts +17 -0
- package/dist/server/modules/subscribers/controllers/subscribers.controller.js +178 -0
- package/dist/server/modules/subscribers/controllers/subscribers.controller.js.map +1 -0
- package/dist/server/modules/subscribers/dtos/subscriber.dto.d.ts +251 -0
- package/dist/server/modules/subscribers/dtos/subscriber.dto.js +68 -0
- package/dist/server/modules/subscribers/dtos/subscriber.dto.js.map +1 -0
- package/dist/server/modules/subscribers/events/event-fields-catalog.d.ts +19 -0
- package/dist/server/modules/subscribers/events/event-fields-catalog.js +98 -0
- package/dist/server/modules/subscribers/events/event-fields-catalog.js.map +1 -0
- package/dist/server/modules/subscribers/services/automation-scheduler.service.d.ts +49 -0
- package/dist/server/modules/subscribers/services/automation-scheduler.service.js +300 -0
- package/dist/server/modules/subscribers/services/automation-scheduler.service.js.map +1 -0
- package/dist/server/modules/subscribers/services/subscriber-executor.service.d.ts +77 -0
- package/dist/server/modules/subscribers/services/subscriber-executor.service.js +576 -0
- package/dist/server/modules/subscribers/services/subscriber-executor.service.js.map +1 -0
- package/dist/server/modules/subscribers/services/subscribers.service.d.ts +14 -0
- package/dist/server/modules/subscribers/services/subscribers.service.js +70 -0
- package/dist/server/modules/subscribers/services/subscribers.service.js.map +1 -0
- package/dist/server/modules/subscribers/subscribers.module.d.ts +2 -0
- package/dist/server/modules/subscribers/subscribers.module.js +36 -0
- package/dist/server/modules/subscribers/subscribers.module.js.map +1 -0
- package/dist/server/modules/terminal/services/tmux.service.js +9 -6
- package/dist/server/modules/terminal/services/tmux.service.js.map +1 -1
- package/dist/server/modules/watchers/controllers/watchers.controller.d.ts +16 -0
- package/dist/server/modules/watchers/controllers/watchers.controller.js +180 -0
- package/dist/server/modules/watchers/controllers/watchers.controller.js.map +1 -0
- package/dist/server/modules/watchers/dtos/watcher.dto.d.ts +206 -0
- package/dist/server/modules/watchers/dtos/watcher.dto.js +54 -0
- package/dist/server/modules/watchers/dtos/watcher.dto.js.map +1 -0
- package/dist/server/modules/watchers/services/watcher-runner.service.d.ts +68 -0
- package/dist/server/modules/watchers/services/watcher-runner.service.js +477 -0
- package/dist/server/modules/watchers/services/watcher-runner.service.js.map +1 -0
- package/dist/server/modules/watchers/services/watchers.service.d.ts +29 -0
- package/dist/server/modules/watchers/services/watchers.service.js +98 -0
- package/dist/server/modules/watchers/services/watchers.service.js.map +1 -0
- package/dist/server/modules/watchers/watchers.module.d.ts +2 -0
- package/dist/server/modules/watchers/watchers.module.js +34 -0
- package/dist/server/modules/watchers/watchers.module.js.map +1 -0
- package/dist/server/templates/claude-codex-advanced.json +377 -0
- package/dist/server/templates/claude-opus.json +29 -25
- package/dist/server/templates/simple-codex.json +29 -25
- package/dist/server/test-setup-node.d.ts +1 -0
- package/dist/server/test-setup-node.js +8 -0
- package/dist/server/test-setup-node.js.map +1 -0
- package/dist/server/test-setup.js +2 -0
- package/dist/server/test-setup.js.map +1 -1
- package/dist/server/tsconfig.tsbuildinfo +1 -1
- package/dist/server/ui/assets/index-C9GXCjnF.js +700 -0
- package/dist/server/ui/assets/index-o0FbZg-1.css +32 -0
- package/dist/server/ui/index.html +2 -2
- package/dist/templates/claude-codex-advanced.json +377 -0
- package/dist/templates/claude-opus.json +29 -25
- package/dist/templates/simple-codex.json +29 -25
- package/package.json +41 -27
- package/dist/server/templates/codex-claude.json +0 -178
- package/dist/server/ui/assets/index-CbYIbCQV.css +0 -32
- package/dist/server/ui/assets/index-sfYpjMjv.js +0 -641
- package/dist/templates/codex-claude.json +0 -178
|
@@ -64,6 +64,46 @@ export declare const eventCatalog: {
|
|
|
64
64
|
sessionId: string;
|
|
65
65
|
sessionName: string;
|
|
66
66
|
}>;
|
|
67
|
+
readonly "terminal.watcher.triggered": z.ZodObject<{
|
|
68
|
+
watcherId: z.ZodString;
|
|
69
|
+
watcherName: z.ZodString;
|
|
70
|
+
customEventName: z.ZodString;
|
|
71
|
+
sessionId: z.ZodString;
|
|
72
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
73
|
+
agentName: z.ZodNullable<z.ZodString>;
|
|
74
|
+
projectId: z.ZodString;
|
|
75
|
+
viewportSnippet: z.ZodString;
|
|
76
|
+
viewportHash: z.ZodString;
|
|
77
|
+
matchedPattern: z.ZodOptional<z.ZodString>;
|
|
78
|
+
triggerCount: z.ZodNumber;
|
|
79
|
+
triggeredAt: z.ZodString;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
projectId: string;
|
|
82
|
+
agentId: string | null;
|
|
83
|
+
sessionId: string;
|
|
84
|
+
agentName: string | null;
|
|
85
|
+
watcherId: string;
|
|
86
|
+
watcherName: string;
|
|
87
|
+
customEventName: string;
|
|
88
|
+
viewportSnippet: string;
|
|
89
|
+
viewportHash: string;
|
|
90
|
+
triggerCount: number;
|
|
91
|
+
triggeredAt: string;
|
|
92
|
+
matchedPattern?: string | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
projectId: string;
|
|
95
|
+
agentId: string | null;
|
|
96
|
+
sessionId: string;
|
|
97
|
+
agentName: string | null;
|
|
98
|
+
watcherId: string;
|
|
99
|
+
watcherName: string;
|
|
100
|
+
customEventName: string;
|
|
101
|
+
viewportSnippet: string;
|
|
102
|
+
viewportHash: string;
|
|
103
|
+
triggerCount: number;
|
|
104
|
+
triggeredAt: string;
|
|
105
|
+
matchedPattern?: string | undefined;
|
|
106
|
+
}>;
|
|
67
107
|
};
|
|
68
108
|
export type EventName = keyof typeof eventCatalog;
|
|
69
109
|
export type EventSchema<TName extends EventName> = (typeof eventCatalog)[TName];
|
|
@@ -5,11 +5,13 @@ const epic_assigned_1 = require("./epic.assigned");
|
|
|
5
5
|
const session_started_1 = require("./session.started");
|
|
6
6
|
const session_stopped_1 = require("./session.stopped");
|
|
7
7
|
const session_crashed_1 = require("./session.crashed");
|
|
8
|
+
const terminal_watcher_triggered_1 = require("./terminal.watcher.triggered");
|
|
8
9
|
exports.eventCatalog = {
|
|
9
10
|
[epic_assigned_1.epicAssignedEvent.name]: epic_assigned_1.epicAssignedEvent.schema,
|
|
10
11
|
[session_started_1.sessionStartedEvent.name]: session_started_1.sessionStartedEvent.schema,
|
|
11
12
|
[session_stopped_1.sessionStoppedEvent.name]: session_stopped_1.sessionStoppedEvent.schema,
|
|
12
13
|
[session_crashed_1.sessionCrashedEvent.name]: session_crashed_1.sessionCrashedEvent.schema,
|
|
14
|
+
[terminal_watcher_triggered_1.terminalWatcherTriggeredEvent.name]: terminal_watcher_triggered_1.terminalWatcherTriggeredEvent.schema,
|
|
13
15
|
};
|
|
14
16
|
exports.eventNames = Object.keys(exports.eventCatalog);
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/events/catalog/index.ts"],"names":[],"mappings":";;;AACA,mDAAoD;AACpD,uDAAwD;AACxD,uDAAwD;AACxD,uDAAwD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/events/catalog/index.ts"],"names":[],"mappings":";;;AACA,mDAAoD;AACpD,uDAAwD;AACxD,uDAAwD;AACxD,uDAAwD;AACxD,6EAA6E;AAEhE,QAAA,YAAY,GAAG;IAC1B,CAAC,iCAAiB,CAAC,IAAI,CAAC,EAAE,iCAAiB,CAAC,MAAM;IAClD,CAAC,qCAAmB,CAAC,IAAI,CAAC,EAAE,qCAAmB,CAAC,MAAM;IACtD,CAAC,qCAAmB,CAAC,IAAI,CAAC,EAAE,qCAAmB,CAAC,MAAM;IACtD,CAAC,qCAAmB,CAAC,IAAI,CAAC,EAAE,qCAAmB,CAAC,MAAM;IACtD,CAAC,0DAA6B,CAAC,IAAI,CAAC,EAAE,0DAA6B,CAAC,MAAM;CAClE,CAAC;AAKE,QAAA,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAY,CAAgB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const terminalWatcherTriggeredEvent: {
|
|
3
|
+
readonly name: "terminal.watcher.triggered";
|
|
4
|
+
readonly schema: z.ZodObject<{
|
|
5
|
+
watcherId: z.ZodString;
|
|
6
|
+
watcherName: z.ZodString;
|
|
7
|
+
customEventName: z.ZodString;
|
|
8
|
+
sessionId: z.ZodString;
|
|
9
|
+
agentId: z.ZodNullable<z.ZodString>;
|
|
10
|
+
agentName: z.ZodNullable<z.ZodString>;
|
|
11
|
+
projectId: z.ZodString;
|
|
12
|
+
viewportSnippet: z.ZodString;
|
|
13
|
+
viewportHash: z.ZodString;
|
|
14
|
+
matchedPattern: z.ZodOptional<z.ZodString>;
|
|
15
|
+
triggerCount: z.ZodNumber;
|
|
16
|
+
triggeredAt: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
projectId: string;
|
|
19
|
+
agentId: string | null;
|
|
20
|
+
sessionId: string;
|
|
21
|
+
agentName: string | null;
|
|
22
|
+
watcherId: string;
|
|
23
|
+
watcherName: string;
|
|
24
|
+
customEventName: string;
|
|
25
|
+
viewportSnippet: string;
|
|
26
|
+
viewportHash: string;
|
|
27
|
+
triggerCount: number;
|
|
28
|
+
triggeredAt: string;
|
|
29
|
+
matchedPattern?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
projectId: string;
|
|
32
|
+
agentId: string | null;
|
|
33
|
+
sessionId: string;
|
|
34
|
+
agentName: string | null;
|
|
35
|
+
watcherId: string;
|
|
36
|
+
watcherName: string;
|
|
37
|
+
customEventName: string;
|
|
38
|
+
viewportSnippet: string;
|
|
39
|
+
viewportHash: string;
|
|
40
|
+
triggerCount: number;
|
|
41
|
+
triggeredAt: string;
|
|
42
|
+
matchedPattern?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
export type TerminalWatcherTriggeredEventPayload = z.infer<typeof terminalWatcherTriggeredEvent.schema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.terminalWatcherTriggeredEvent = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.terminalWatcherTriggeredEvent = {
|
|
6
|
+
name: 'terminal.watcher.triggered',
|
|
7
|
+
schema: zod_1.z.object({
|
|
8
|
+
watcherId: zod_1.z.string().min(1),
|
|
9
|
+
watcherName: zod_1.z.string().min(1),
|
|
10
|
+
customEventName: zod_1.z.string().min(1),
|
|
11
|
+
sessionId: zod_1.z.string().min(1),
|
|
12
|
+
agentId: zod_1.z.string().nullable(),
|
|
13
|
+
agentName: zod_1.z.string().nullable(),
|
|
14
|
+
projectId: zod_1.z.string().min(1),
|
|
15
|
+
viewportSnippet: zod_1.z.string().max(500),
|
|
16
|
+
viewportHash: zod_1.z.string().min(1),
|
|
17
|
+
matchedPattern: zod_1.z.string().optional(),
|
|
18
|
+
triggerCount: zod_1.z.number().int().min(1),
|
|
19
|
+
triggeredAt: zod_1.z.string().min(1),
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=terminal.watcher.triggered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.watcher.triggered.js","sourceRoot":"","sources":["../../../../src/modules/events/catalog/terminal.watcher.triggered.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAMX,QAAA,6BAA6B,GAAG;IAC3C,IAAI,EAAE,4BAA4B;IAClC,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;QAEf,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAGlC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAG5B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;QACpC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAG/B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAGrC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACrC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;KAC/B,CAAC;CACM,CAAC"}
|
|
@@ -18,6 +18,7 @@ export declare class ChatMessageDeliverySubscriber {
|
|
|
18
18
|
private readonly chatService;
|
|
19
19
|
private readonly storage;
|
|
20
20
|
private readonly logger;
|
|
21
|
+
private readonly autoLaunchSessions;
|
|
21
22
|
constructor(sessionsService: SessionsService, chatService: ChatService, storage: StorageService);
|
|
22
23
|
handleChatMessageCreated(payload: ChatMessageCreatedPayload): Promise<void>;
|
|
23
24
|
}
|
|
@@ -25,6 +25,7 @@ let ChatMessageDeliverySubscriber = ChatMessageDeliverySubscriber_1 = class Chat
|
|
|
25
25
|
this.chatService = chatService;
|
|
26
26
|
this.storage = storage;
|
|
27
27
|
this.logger = new common_1.Logger(ChatMessageDeliverySubscriber_1.name);
|
|
28
|
+
this.autoLaunchSessions = process.env.NODE_ENV !== 'test';
|
|
28
29
|
}
|
|
29
30
|
async handleChatMessageCreated(payload) {
|
|
30
31
|
const { threadId, message } = payload;
|
|
@@ -32,11 +33,7 @@ let ChatMessageDeliverySubscriber = ChatMessageDeliverySubscriber_1 = class Chat
|
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
35
|
if (message.authorType === 'system') {
|
|
35
|
-
|
|
36
|
-
if (!containsToolCalls) {
|
|
37
|
-
this.logger.debug({ threadId, messageId: message.id }, 'System message without tool calls; skipping injection');
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
36
|
+
return;
|
|
40
37
|
}
|
|
41
38
|
try {
|
|
42
39
|
const thread = await this.chatService.getThread(threadId);
|
|
@@ -48,15 +45,36 @@ let ChatMessageDeliverySubscriber = ChatMessageDeliverySubscriber_1 = class Chat
|
|
|
48
45
|
return;
|
|
49
46
|
}
|
|
50
47
|
const activeSessions = await this.sessionsService.listActiveSessions();
|
|
48
|
+
const sessionByAgentId = new Map(activeSessions.map((s) => [s.agentId, s]));
|
|
51
49
|
for (const agentId of recipients) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
try {
|
|
51
|
+
let session = sessionByAgentId.get(agentId);
|
|
52
|
+
if (!session && this.autoLaunchSessions) {
|
|
53
|
+
try {
|
|
54
|
+
const launched = await this.sessionsService.launchSession({
|
|
55
|
+
projectId: thread.projectId,
|
|
56
|
+
agentId,
|
|
57
|
+
});
|
|
58
|
+
session = launched;
|
|
59
|
+
sessionByAgentId.set(agentId, launched);
|
|
60
|
+
this.logger.debug({ threadId, agentId, sessionId: launched.id, messageId: message.id }, 'Launched session to deliver chat message');
|
|
61
|
+
}
|
|
62
|
+
catch (launchError) {
|
|
63
|
+
this.logger.debug({ threadId, agentId, messageId: message.id, error: launchError }, 'Failed to auto-launch session for chat message delivery');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (!session) {
|
|
67
|
+
this.logger.debug({ threadId, agentId, messageId: message.id }, 'Agent has no active session; skipping injection');
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const agent = await this.storage.getAgent(agentId);
|
|
71
|
+
const injectionText = `\n[CHAT] From: User • Thread: ${threadId}\n${message.content}\n[ACK] tools/call { name: "devchain_chat_ack", arguments: { thread_id: "${threadId}", message_id: "${message.id}", agent_name: "${agent.name}" } }\n`;
|
|
72
|
+
await this.sessionsService.injectTextIntoSession(session.id, injectionText);
|
|
73
|
+
this.logger.debug({ threadId, agentId, sessionId: session.id, messageId: message.id }, 'Injected chat message into session');
|
|
74
|
+
}
|
|
75
|
+
catch (deliverError) {
|
|
76
|
+
this.logger.debug({ threadId, agentId, messageId: message.id, error: deliverError }, 'Failed to deliver chat message to agent session');
|
|
56
77
|
}
|
|
57
|
-
const injectionText = `\n[CHAT] From: User • Thread: ${threadId}\n${message.content}\n[ACK] tools/call { name: "devchain_chat_ack", arguments: { thread_id: "${threadId}", message_id: "${message.id}", agent_id: "${agentId}" } }\n`;
|
|
58
|
-
await this.sessionsService.injectTextIntoSession(session.id, injectionText);
|
|
59
|
-
this.logger.debug({ threadId, agentId, sessionId: session.id, messageId: message.id }, 'Injected chat message into session');
|
|
60
78
|
}
|
|
61
79
|
}
|
|
62
80
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message-delivery.subscriber.js","sourceRoot":"","sources":["../../../../src/modules/events/subscribers/chat-message-delivery.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwE;AACxE,yDAAgD;AAChD,+EAA2E;AAC3E,mEAA+D;AAC/D,kFAAkG;AAwB3F,IAAM,6BAA6B,qCAAnC,MAAM,6BAA6B;
|
|
1
|
+
{"version":3,"file":"chat-message-delivery.subscriber.js","sourceRoot":"","sources":["../../../../src/modules/events/subscribers/chat-message-delivery.subscriber.ts"],"names":[],"mappings":"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"}
|
|
@@ -11,7 +11,11 @@ exports.DOCUMENT_TOOL_NAMES = [
|
|
|
11
11
|
'devchain_create_document',
|
|
12
12
|
'devchain_update_document',
|
|
13
13
|
];
|
|
14
|
-
exports.CHAT_TOOL_NAMES = [
|
|
14
|
+
exports.CHAT_TOOL_NAMES = [
|
|
15
|
+
'devchain_chat_ack',
|
|
16
|
+
'devchain_chat_read_history',
|
|
17
|
+
'devchain_chat_list_members',
|
|
18
|
+
];
|
|
15
19
|
exports.RECORDS_TOOL_NAMES = [
|
|
16
20
|
'devchain_create_record',
|
|
17
21
|
'devchain_update_record',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/modules/mcp/constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/modules/mcp/constants.ts"],"names":[],"mappings":";;;AA0BA,8CAaC;AAvCY,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC/B,QAAA,kBAAkB,GAAG,KAAK,CAAC;AAC3B,QAAA,qBAAqB,GAAG,KAAK,CAAC;AAE9B,QAAA,mBAAmB,GAAG;IACjC,yBAAyB;IACzB,uBAAuB;IACvB,0BAA0B;IAC1B,0BAA0B;CAC3B,CAAC;AAGW,QAAA,eAAe,GAAG;IAC7B,mBAAmB;IACnB,4BAA4B;IAC5B,4BAA4B;CAC7B,CAAC;AACW,QAAA,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,wBAAwB;IACxB,qBAAqB;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;CACvB,CAAC;AAEF,SAAgB,iBAAiB,CAA6B,KAAU;IACtE,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,IAAI,CAAC,8BAAsB,EAAE,CAAC;QAC5B,2BAAmB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,CAAC,0BAAkB,EAAE,CAAC;QACxB,uBAAe,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,CAAC,6BAAqB,EAAE,CAAC;QAC3B,0BAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -147,16 +147,24 @@ let McpHttpController = class McpHttpController {
|
|
|
147
147
|
}
|
|
148
148
|
listTools() {
|
|
149
149
|
const tools = [
|
|
150
|
+
{
|
|
151
|
+
name: 'devchain_list_sessions',
|
|
152
|
+
description: 'List active sessions for discovery. This is the bootstrap tool that requires no sessionId - use it to discover valid session IDs for other MCP calls.',
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
properties: {},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
150
158
|
{
|
|
151
159
|
name: 'devchain_list_documents',
|
|
152
|
-
description: 'List all documents for the
|
|
160
|
+
description: 'List all documents for the project resolved from the session.',
|
|
153
161
|
inputSchema: {
|
|
154
162
|
type: 'object',
|
|
155
|
-
required: ['
|
|
163
|
+
required: ['sessionId'],
|
|
156
164
|
properties: {
|
|
157
|
-
|
|
165
|
+
sessionId: {
|
|
158
166
|
type: 'string',
|
|
159
|
-
description: '
|
|
167
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
160
168
|
},
|
|
161
169
|
tags: {
|
|
162
170
|
type: 'array',
|
|
@@ -174,10 +182,12 @@ let McpHttpController = class McpHttpController {
|
|
|
174
182
|
description: 'Start an activity for an agent; posts a system start message and begins a running timer (DM by default).',
|
|
175
183
|
inputSchema: {
|
|
176
184
|
type: 'object',
|
|
177
|
-
required: ['
|
|
185
|
+
required: ['sessionId', 'title'],
|
|
178
186
|
properties: {
|
|
179
|
-
|
|
180
|
-
|
|
187
|
+
sessionId: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
190
|
+
},
|
|
181
191
|
title: { type: 'string', description: 'Activity title (<=256 chars)' },
|
|
182
192
|
threadId: { type: 'string', description: 'Target thread UUID (optional)' },
|
|
183
193
|
announce: { type: 'boolean', description: 'Whether to post the start system message' },
|
|
@@ -189,10 +199,12 @@ let McpHttpController = class McpHttpController {
|
|
|
189
199
|
description: 'Finish the latest running activity for an agent; optionally posts a finish system message.',
|
|
190
200
|
inputSchema: {
|
|
191
201
|
type: 'object',
|
|
192
|
-
required: ['
|
|
202
|
+
required: ['sessionId'],
|
|
193
203
|
properties: {
|
|
194
|
-
|
|
195
|
-
|
|
204
|
+
sessionId: {
|
|
205
|
+
type: 'string',
|
|
206
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
207
|
+
},
|
|
196
208
|
threadId: { type: 'string', description: 'Target thread UUID (optional)' },
|
|
197
209
|
message: { type: 'string', description: 'Optional finish message (<=1000 chars)' },
|
|
198
210
|
status: {
|
|
@@ -230,14 +242,14 @@ let McpHttpController = class McpHttpController {
|
|
|
230
242
|
},
|
|
231
243
|
{
|
|
232
244
|
name: 'devchain_create_document',
|
|
233
|
-
description: 'Create a new markdown document in the project
|
|
245
|
+
description: 'Create a new markdown document in the project resolved from the session',
|
|
234
246
|
inputSchema: {
|
|
235
247
|
type: 'object',
|
|
236
|
-
required: ['
|
|
248
|
+
required: ['sessionId', 'title', 'contentMd'],
|
|
237
249
|
properties: {
|
|
238
|
-
|
|
250
|
+
sessionId: {
|
|
239
251
|
type: 'string',
|
|
240
|
-
description: '
|
|
252
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
241
253
|
},
|
|
242
254
|
title: { type: 'string', description: 'Document title' },
|
|
243
255
|
contentMd: { type: 'string', description: 'Markdown content' },
|
|
@@ -264,16 +276,15 @@ let McpHttpController = class McpHttpController {
|
|
|
264
276
|
},
|
|
265
277
|
{
|
|
266
278
|
name: 'devchain_list_prompts',
|
|
267
|
-
description: 'List prompts for the project resolved from the
|
|
279
|
+
description: 'List prompts for the project resolved from the session',
|
|
268
280
|
inputSchema: {
|
|
269
281
|
type: 'object',
|
|
270
|
-
required: ['
|
|
282
|
+
required: ['sessionId'],
|
|
271
283
|
properties: {
|
|
272
|
-
|
|
284
|
+
sessionId: {
|
|
273
285
|
type: 'string',
|
|
274
|
-
description: '
|
|
286
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
275
287
|
},
|
|
276
|
-
projectId: { type: 'string', description: '[deprecated] Filter by project ID' },
|
|
277
288
|
tags: { type: 'array', items: { type: 'string' }, description: 'Filter by tags' },
|
|
278
289
|
q: { type: 'string', description: 'Search query' },
|
|
279
290
|
},
|
|
@@ -281,34 +292,30 @@ let McpHttpController = class McpHttpController {
|
|
|
281
292
|
},
|
|
282
293
|
{
|
|
283
294
|
name: 'devchain_get_prompt',
|
|
284
|
-
description: 'Get a specific prompt by ID or by (name +
|
|
295
|
+
description: 'Get a specific prompt by ID or by (name + sessionId)',
|
|
285
296
|
inputSchema: {
|
|
286
297
|
type: 'object',
|
|
287
298
|
properties: {
|
|
288
299
|
id: { type: 'string', description: 'Prompt UUID' },
|
|
289
300
|
name: { type: 'string', description: 'Prompt name/title' },
|
|
290
301
|
version: { type: 'number', description: 'Specific version number' },
|
|
291
|
-
|
|
302
|
+
sessionId: {
|
|
292
303
|
type: 'string',
|
|
293
|
-
description: '
|
|
294
|
-
},
|
|
295
|
-
projectId: {
|
|
296
|
-
type: 'string',
|
|
297
|
-
description: '[deprecated] Project ID for scoped prompts',
|
|
304
|
+
description: 'Session ID (full UUID or 8+ char prefix) required when querying by name',
|
|
298
305
|
},
|
|
299
306
|
},
|
|
300
307
|
},
|
|
301
308
|
},
|
|
302
309
|
{
|
|
303
310
|
name: 'devchain_list_agents',
|
|
304
|
-
description: 'List agents for the project resolved from the
|
|
311
|
+
description: 'List agents for the project resolved from the session',
|
|
305
312
|
inputSchema: {
|
|
306
313
|
type: 'object',
|
|
307
|
-
required: ['
|
|
314
|
+
required: ['sessionId'],
|
|
308
315
|
properties: {
|
|
309
|
-
|
|
316
|
+
sessionId: {
|
|
310
317
|
type: 'string',
|
|
311
|
-
description: '
|
|
318
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
312
319
|
},
|
|
313
320
|
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
314
321
|
offset: { type: 'number', description: 'Pagination offset (default: 0)' },
|
|
@@ -321,14 +328,14 @@ let McpHttpController = class McpHttpController {
|
|
|
321
328
|
},
|
|
322
329
|
{
|
|
323
330
|
name: 'devchain_get_agent_by_name',
|
|
324
|
-
description: 'Fetch a single agent by name for the project resolved from the
|
|
331
|
+
description: 'Fetch a single agent by name for the project resolved from the session',
|
|
325
332
|
inputSchema: {
|
|
326
333
|
type: 'object',
|
|
327
|
-
required: ['
|
|
334
|
+
required: ['sessionId', 'name'],
|
|
328
335
|
properties: {
|
|
329
|
-
|
|
336
|
+
sessionId: {
|
|
330
337
|
type: 'string',
|
|
331
|
-
description: '
|
|
338
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
332
339
|
},
|
|
333
340
|
name: {
|
|
334
341
|
type: 'string',
|
|
@@ -339,28 +346,28 @@ let McpHttpController = class McpHttpController {
|
|
|
339
346
|
},
|
|
340
347
|
{
|
|
341
348
|
name: 'devchain_list_statuses',
|
|
342
|
-
description: 'List project statuses resolved from the
|
|
349
|
+
description: 'List project statuses resolved from the session',
|
|
343
350
|
inputSchema: {
|
|
344
351
|
type: 'object',
|
|
345
|
-
required: ['
|
|
352
|
+
required: ['sessionId'],
|
|
346
353
|
properties: {
|
|
347
|
-
|
|
354
|
+
sessionId: {
|
|
348
355
|
type: 'string',
|
|
349
|
-
description: '
|
|
356
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
350
357
|
},
|
|
351
358
|
},
|
|
352
359
|
},
|
|
353
360
|
},
|
|
354
361
|
{
|
|
355
362
|
name: 'devchain_list_epics',
|
|
356
|
-
description: 'List epics for the project resolved from the
|
|
363
|
+
description: 'List epics for the project resolved from the session with optional filters',
|
|
357
364
|
inputSchema: {
|
|
358
365
|
type: 'object',
|
|
359
|
-
required: ['
|
|
366
|
+
required: ['sessionId'],
|
|
360
367
|
properties: {
|
|
361
|
-
|
|
368
|
+
sessionId: {
|
|
362
369
|
type: 'string',
|
|
363
|
-
description: '
|
|
370
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
364
371
|
},
|
|
365
372
|
statusName: {
|
|
366
373
|
type: 'string',
|
|
@@ -377,14 +384,14 @@ let McpHttpController = class McpHttpController {
|
|
|
377
384
|
},
|
|
378
385
|
{
|
|
379
386
|
name: 'devchain_list_assigned_epics_tasks',
|
|
380
|
-
description: 'List epics assigned to the specified agent within the project resolved from the
|
|
387
|
+
description: 'List epics assigned to the specified agent within the project resolved from the session',
|
|
381
388
|
inputSchema: {
|
|
382
389
|
type: 'object',
|
|
383
|
-
required: ['
|
|
390
|
+
required: ['sessionId', 'agentName'],
|
|
384
391
|
properties: {
|
|
385
|
-
|
|
392
|
+
sessionId: {
|
|
386
393
|
type: 'string',
|
|
387
|
-
description: '
|
|
394
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
388
395
|
},
|
|
389
396
|
agentName: { type: 'string', description: 'Agent name to match (case-insensitive)' },
|
|
390
397
|
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
@@ -394,14 +401,14 @@ let McpHttpController = class McpHttpController {
|
|
|
394
401
|
},
|
|
395
402
|
{
|
|
396
403
|
name: 'devchain_create_epic',
|
|
397
|
-
description: 'Create a new epic within the project resolved from the
|
|
404
|
+
description: 'Create a new epic within the project resolved from the session',
|
|
398
405
|
inputSchema: {
|
|
399
406
|
type: 'object',
|
|
400
|
-
required: ['
|
|
407
|
+
required: ['sessionId', 'title'],
|
|
401
408
|
properties: {
|
|
402
|
-
|
|
409
|
+
sessionId: {
|
|
403
410
|
type: 'string',
|
|
404
|
-
description: '
|
|
411
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
405
412
|
},
|
|
406
413
|
title: { type: 'string', description: 'Epic title' },
|
|
407
414
|
description: { type: 'string', description: 'Optional epic description' },
|
|
@@ -430,11 +437,11 @@ let McpHttpController = class McpHttpController {
|
|
|
430
437
|
description: 'Fetch a single epic, including comments and related hierarchy details',
|
|
431
438
|
inputSchema: {
|
|
432
439
|
type: 'object',
|
|
433
|
-
required: ['
|
|
440
|
+
required: ['sessionId', 'id'],
|
|
434
441
|
properties: {
|
|
435
|
-
|
|
442
|
+
sessionId: {
|
|
436
443
|
type: 'string',
|
|
437
|
-
description: '
|
|
444
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
438
445
|
},
|
|
439
446
|
id: { type: 'string', description: 'Epic UUID' },
|
|
440
447
|
},
|
|
@@ -442,17 +449,16 @@ let McpHttpController = class McpHttpController {
|
|
|
442
449
|
},
|
|
443
450
|
{
|
|
444
451
|
name: 'devchain_add_epic_comment',
|
|
445
|
-
description: 'Add a comment to the specified epic within the project resolved from the
|
|
452
|
+
description: 'Add a comment to the specified epic within the project resolved from the session. Author is derived from session agent.',
|
|
446
453
|
inputSchema: {
|
|
447
454
|
type: 'object',
|
|
448
|
-
required: ['
|
|
455
|
+
required: ['sessionId', 'epicId', 'content'],
|
|
449
456
|
properties: {
|
|
450
|
-
|
|
457
|
+
sessionId: {
|
|
451
458
|
type: 'string',
|
|
452
|
-
description: '
|
|
459
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
453
460
|
},
|
|
454
461
|
epicId: { type: 'string', description: 'Epic UUID' },
|
|
455
|
-
authorName: { type: 'string', description: 'Name of the comment author' },
|
|
456
462
|
content: { type: 'string', description: 'Comment body content' },
|
|
457
463
|
},
|
|
458
464
|
},
|
|
@@ -462,11 +468,11 @@ let McpHttpController = class McpHttpController {
|
|
|
462
468
|
description: 'Update an epic with flexible field updates including status (by name), assignment (by agent name or clear), parent hierarchy, and tags. Uses optimistic locking via version.',
|
|
463
469
|
inputSchema: {
|
|
464
470
|
type: 'object',
|
|
465
|
-
required: ['
|
|
471
|
+
required: ['sessionId', 'id', 'version'],
|
|
466
472
|
properties: {
|
|
467
|
-
|
|
473
|
+
sessionId: {
|
|
468
474
|
type: 'string',
|
|
469
|
-
description: '
|
|
475
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
470
476
|
},
|
|
471
477
|
id: { type: 'string', description: 'Epic UUID' },
|
|
472
478
|
version: { type: 'number', description: 'Current version for optimistic locking' },
|
|
@@ -610,18 +616,18 @@ let McpHttpController = class McpHttpController {
|
|
|
610
616
|
},
|
|
611
617
|
{
|
|
612
618
|
name: 'devchain_send_message',
|
|
613
|
-
description: 'Send a chat message. Provide threadId to reply in a thread, or recipientAgentNames to create a new agent-initiated group
|
|
619
|
+
description: 'Send a chat message. Sender is derived from session agent. Provide threadId to reply in a thread, or recipientAgentNames to create a new agent-initiated group.',
|
|
614
620
|
inputSchema: {
|
|
615
621
|
type: 'object',
|
|
616
|
-
required: ['
|
|
622
|
+
required: ['sessionId', 'message'],
|
|
617
623
|
properties: {
|
|
618
|
-
|
|
624
|
+
sessionId: {
|
|
619
625
|
type: 'string',
|
|
620
|
-
description: '
|
|
626
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
621
627
|
},
|
|
622
628
|
threadId: {
|
|
623
629
|
type: 'string',
|
|
624
|
-
description: 'Existing thread UUID. When provided
|
|
630
|
+
description: 'Existing thread UUID. When provided, recipients may be omitted to fan-out to thread members.',
|
|
625
631
|
},
|
|
626
632
|
recipientAgentNames: {
|
|
627
633
|
type: 'array',
|
|
@@ -631,17 +637,9 @@ let McpHttpController = class McpHttpController {
|
|
|
631
637
|
recipient: {
|
|
632
638
|
type: 'string',
|
|
633
639
|
enum: ['user', 'agents'],
|
|
634
|
-
description: 'Set to "user" to DM the user without a threadId
|
|
640
|
+
description: 'Set to "user" to DM the user without a threadId.',
|
|
635
641
|
},
|
|
636
642
|
message: { type: 'string', description: 'Message content to deliver.' },
|
|
637
|
-
senderName: {
|
|
638
|
-
type: 'string',
|
|
639
|
-
description: "Agent's name authoring the message (case-insensitive). When provided, message is authored as that agent.",
|
|
640
|
-
},
|
|
641
|
-
agentName: {
|
|
642
|
-
type: 'string',
|
|
643
|
-
description: 'Alias for senderName used with { recipient: "user" } to identify the sending agent.',
|
|
644
|
-
},
|
|
645
643
|
},
|
|
646
644
|
},
|
|
647
645
|
},
|
|
@@ -650,11 +648,14 @@ let McpHttpController = class McpHttpController {
|
|
|
650
648
|
description: 'Mark a chat message as read for an agent and emit a message.read event.',
|
|
651
649
|
inputSchema: {
|
|
652
650
|
type: 'object',
|
|
653
|
-
required: ['
|
|
651
|
+
required: ['sessionId', 'thread_id', 'message_id'],
|
|
654
652
|
properties: {
|
|
653
|
+
sessionId: {
|
|
654
|
+
type: 'string',
|
|
655
|
+
description: 'Session ID (full UUID or 8+ char prefix)',
|
|
656
|
+
},
|
|
655
657
|
thread_id: { type: 'string', description: 'Chat thread UUID.' },
|
|
656
658
|
message_id: { type: 'string', description: 'Chat message UUID to acknowledge.' },
|
|
657
|
-
agent_name: { type: 'string', description: 'Agent name acknowledging the message.' },
|
|
658
659
|
},
|
|
659
660
|
},
|
|
660
661
|
},
|