@ai-setting/roy-agent-core 1.7.59 → 1.7.62
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/config/index.js +8 -8
- package/dist/env/agent/agent-component.js +41 -0
- package/dist/env/agent/index.js +18 -16
- package/dist/env/commands/index.js +8 -8
- package/dist/env/context/index.js +4 -4
- package/dist/env/debug/index.js +8 -8
- package/dist/env/error-reply.js +18 -0
- package/dist/env/event-source/cli-command-handler.d.ts +90 -0
- package/dist/env/event-source/cli-command-handler.js +17 -0
- package/dist/env/event-source/event-source-handlers.d.ts +1 -0
- package/dist/env/event-source/event-source-handlers.js +58 -0
- package/dist/env/event-source/event-store.js +18 -0
- package/dist/env/event-source/idempotency-key.js +20 -0
- package/dist/env/event-source/index.d.ts +3 -1
- package/dist/env/event-source/index.js +37 -22
- package/dist/env/event-source/types.d.ts +21 -1
- package/dist/env/hook/index.js +6 -6
- package/dist/env/index.js +54 -48
- package/dist/env/lark-mention-utils.js +9 -0
- package/dist/env/llm/index.js +9 -9
- package/dist/env/log-trace/index.d.ts +1 -1
- package/dist/env/log-trace/index.js +12 -8
- package/dist/env/log-trace/logger.d.ts +2 -0
- package/dist/env/log-trace/logger.js +39 -0
- package/dist/env/mcp/index.js +9 -9
- package/dist/env/mcp/tool/index.js +2 -2
- package/dist/env/memory/index.js +9 -9
- package/dist/env/memory/plugin/index.js +2 -2
- package/dist/env/plugin/index.js +9 -9
- package/dist/env/prompt/index.js +8 -8
- package/dist/env/session/index.js +11 -11
- package/dist/env/session/storage/index.js +5 -5
- package/dist/env/skill/index.js +8 -8
- package/dist/env/task/delegate/delegate-tool.js +42 -0
- package/dist/env/task/delegate/index.js +13 -11
- package/dist/env/task/index.js +17 -16
- package/dist/env/task/mcp/index.d.ts +16 -0
- package/dist/env/task/mcp/index.js +222 -0
- package/dist/env/task/mcp/task-mcp-server.d.ts +142 -0
- package/dist/env/task/plugins/index.d.ts +1 -0
- package/dist/env/task/plugins/index.js +47 -12
- package/dist/env/task/plugins/lark-card-patch-notifier.js +42 -0
- package/dist/env/task/storage/index.js +4 -4
- package/dist/env/task/storage/migrations/log-migration.d.ts +19 -0
- package/dist/env/task/storage/sqlite-task-store.d.ts +29 -0
- package/dist/env/task/task-component.d.ts +48 -3
- package/dist/env/task/tools/index.js +4 -4
- package/dist/env/task/tools/task-types.d.ts +60 -11
- package/dist/env/tool/built-in/index.js +4 -4
- package/dist/env/tool/index.js +12 -11
- package/dist/env/tool/types.js +1 -0
- package/dist/env/workflow/engine/index.js +13 -13
- package/dist/env/workflow/hooks/index.js +8 -8
- package/dist/env/workflow/index.js +23 -23
- package/dist/env/workflow/nodes/index.js +3 -3
- package/dist/env/workflow/plugins/index.js +9 -9
- package/dist/env/workflow/service/index.js +3 -3
- package/dist/env/workflow/storage/index.js +4 -4
- package/dist/env/workflow/tools/index.js +15 -15
- package/dist/env/workflow/tools/run-workflow.d.ts +30 -0
- package/dist/env/workflow/utils/index.js +5 -5
- package/dist/env/workflow/utils/session-recovery.d.ts +27 -0
- package/dist/index.js +91 -73
- package/dist/shared/@ai-setting/{roy-agent-core-ygn5tzt1.js → roy-agent-core-06jakebr.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-m68z3pw1.js → roy-agent-core-084zthqx.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-cyefe8z5.js → roy-agent-core-2hkyp51n.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-029r8kdw.js → roy-agent-core-2pma868e.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-c7w2h47a.js → roy-agent-core-2veqhrxa.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-t64nmayv.js → roy-agent-core-32ck9rqt.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-m97jn2ra.js → roy-agent-core-33hn1beg.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8p63s836.js → roy-agent-core-386wa4wy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-kq9pz2a7.js → roy-agent-core-48h4zh60.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-eanq305k.js → roy-agent-core-5bj0xfjk.js} +13 -27
- package/dist/shared/@ai-setting/{roy-agent-core-7q4wdze2.js → roy-agent-core-5mrynf9g.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rt115qfc.js → roy-agent-core-6awgfh3x.js} +14 -4
- package/dist/shared/@ai-setting/{roy-agent-core-9zhkdg6w.js → roy-agent-core-6wxww10t.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-baaa4wtp.js → roy-agent-core-79gyka2q.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-ytd5eztz.js → roy-agent-core-7tce05jt.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-x6c45yqd.js → roy-agent-core-99nwgj84.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-9nvyffxg.js +414 -0
- package/dist/shared/@ai-setting/{roy-agent-core-e1w17tht.js → roy-agent-core-9qgrc9dy.js} +158 -158
- package/dist/shared/@ai-setting/{roy-agent-core-2ctyjy62.js → roy-agent-core-a08dpf71.js} +17 -2
- package/dist/shared/@ai-setting/{roy-agent-core-e250355z.js → roy-agent-core-a6cz4d23.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-tze5596n.js → roy-agent-core-anb53t3v.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-caevk7xd.js → roy-agent-core-arx535cs.js} +30 -8
- package/dist/shared/@ai-setting/{roy-agent-core-vh0qzb24.js → roy-agent-core-as0dd70m.js} +36 -15
- package/dist/shared/@ai-setting/{roy-agent-core-w93z6a42.js → roy-agent-core-bpvz1dqr.js} +12 -12
- package/dist/shared/@ai-setting/{roy-agent-core-ck60j1q9.js → roy-agent-core-bxkjk7zx.js} +2 -1
- package/dist/shared/@ai-setting/{roy-agent-core-hs41gx9w.js → roy-agent-core-c4t4y18j.js} +5 -5
- package/dist/shared/@ai-setting/{roy-agent-core-t4x089js.js → roy-agent-core-c57278kx.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-em4hks9t.js → roy-agent-core-c8xvy6hj.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-991pk4ss.js → roy-agent-core-cqpd41gf.js} +18 -16
- package/dist/shared/@ai-setting/{roy-agent-core-psg6f1v6.js → roy-agent-core-cxpgd415.js} +6 -6
- package/dist/shared/@ai-setting/{roy-agent-core-vgdhxbx3.js → roy-agent-core-dfqhc9ey.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-6bradb0j.js → roy-agent-core-fqandv0a.js} +9 -107
- package/dist/shared/@ai-setting/{roy-agent-core-en2xqxs9.js → roy-agent-core-fr296a53.js} +39 -14
- package/dist/shared/@ai-setting/{roy-agent-core-rcgvmtms.js → roy-agent-core-gc6wcd7z.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-7nb23tdd.js → roy-agent-core-gjsvehfs.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-0kn3zt1t.js → roy-agent-core-gtdtzbs7.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-84rs0c8d.js → roy-agent-core-gz2jnaan.js} +7 -7
- package/dist/shared/@ai-setting/{roy-agent-core-0yn7a78e.js → roy-agent-core-h3fwjbhp.js} +14 -14
- package/dist/shared/@ai-setting/{roy-agent-core-4096f575.js → roy-agent-core-hczj1ryh.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-syyw58p9.js → roy-agent-core-hfyxv2kx.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-d75t8gea.js → roy-agent-core-hwkc0bg2.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-vath15kt.js → roy-agent-core-ja4sr63d.js} +6 -6
- package/dist/shared/@ai-setting/roy-agent-core-jagkferh.js +16 -0
- package/dist/shared/@ai-setting/roy-agent-core-jm136jzh.js +99 -0
- package/dist/shared/@ai-setting/{roy-agent-core-14bq77wr.js → roy-agent-core-jw63js86.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-89sxsrc7.js → roy-agent-core-kmvw6b4v.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-47s81t6g.js → roy-agent-core-kvq4a4p6.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-c36335nw.js → roy-agent-core-m3w3ytxt.js} +15 -3
- package/dist/shared/@ai-setting/{roy-agent-core-64f22h1g.js → roy-agent-core-m880qz3y.js} +7 -1
- package/dist/shared/@ai-setting/{roy-agent-core-2fk8c9ax.js → roy-agent-core-mbwaxqs0.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-jjhw9am6.js → roy-agent-core-mkpsz128.js} +4 -4
- package/dist/shared/@ai-setting/{roy-agent-core-20m8je6e.js → roy-agent-core-mrrv80jy.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6q5m1qk5.js → roy-agent-core-nmn853z0.js} +333 -1183
- package/dist/shared/@ai-setting/roy-agent-core-p37kh0kt.js +155 -0
- package/dist/shared/@ai-setting/{roy-agent-core-08njdcpj.js → roy-agent-core-p6a4v4fq.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-gksw1gjb.js → roy-agent-core-p8rf4z89.js} +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-pnj0zh25.js +0 -0
- package/dist/shared/@ai-setting/{roy-agent-core-q4gdfypk.js → roy-agent-core-prnry2mw.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-84xtww7d.js → roy-agent-core-qmqe8ds3.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-txwptxk1.js → roy-agent-core-sj4y3wdm.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-fbjd7bt6.js → roy-agent-core-th92f833.js} +64 -29
- package/dist/shared/@ai-setting/{roy-agent-core-yphwdm9x.js → roy-agent-core-v7mwj8eq.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-5f7myqnb.js → roy-agent-core-vvb4cyyy.js} +11 -5
- package/dist/shared/@ai-setting/{roy-agent-core-jjxdmedn.js → roy-agent-core-vwzan9v0.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-fw6k4w1h.js → roy-agent-core-w2ev3z5q.js} +12 -14
- package/dist/shared/@ai-setting/roy-agent-core-w2h6xt6k.js +473 -0
- package/dist/shared/@ai-setting/{roy-agent-core-n0p0hwgd.js → roy-agent-core-wzp4tbsn.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-ge87xbas.js → roy-agent-core-x1d6edkh.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8bngppw0.js → roy-agent-core-ye4bfzqg.js} +13 -13
- package/dist/shared/@ai-setting/{roy-agent-core-geh6j7bw.js → roy-agent-core-zjgckbdd.js} +2 -2
- package/dist/shared/@ai-setting/{roy-agent-core-hefarcp0.js → roy-agent-core-zy8vkbnk.js} +1 -1
- package/dist/test-utils/child-process-mock.js +23 -0
- package/dist/utils/temp-file-manager/index.js +2 -2
- package/package.json +76 -1
- /package/dist/shared/@ai-setting/{roy-agent-core-3ztzc83c.js → roy-agent-core-5enxfga2.js} +0 -0
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createStopTool
|
|
3
|
+
} from "../../../shared/@ai-setting/roy-agent-core-jm136jzh.js";
|
|
1
4
|
import {
|
|
2
5
|
BackgroundTaskEventTypes,
|
|
3
6
|
BackgroundTaskManager,
|
|
4
|
-
createDelegateTool
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-2ctyjy62.js";
|
|
7
|
+
createDelegateTool
|
|
8
|
+
} from "../../../shared/@ai-setting/roy-agent-core-fqandv0a.js";
|
|
9
|
+
import"../../../shared/@ai-setting/roy-agent-core-jw63js86.js";
|
|
10
|
+
import"../../../shared/@ai-setting/roy-agent-core-a08dpf71.js";
|
|
9
11
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
10
12
|
import"../../../shared/@ai-setting/roy-agent-core-6masakz4.js";
|
|
11
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
import"../../../shared/@ai-setting/roy-agent-core-06jakebr.js";
|
|
12
14
|
import"../../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
13
15
|
import"../../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
14
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
16
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
17
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
18
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-v7mwj8eq.js";
|
|
17
|
+
import"../../../shared/@ai-setting/roy-agent-core-33hn1beg.js";
|
|
18
|
+
import"../../../shared/@ai-setting/roy-agent-core-hfyxv2kx.js";
|
|
19
|
+
import"../../../shared/@ai-setting/roy-agent-core-386wa4wy.js";
|
|
20
|
+
import"../../../shared/@ai-setting/roy-agent-core-6awgfh3x.js";
|
|
19
21
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
20
22
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
21
23
|
export {
|
package/dist/env/task/index.js
CHANGED
|
@@ -5,34 +5,35 @@ import {
|
|
|
5
5
|
TaskPriorityEnum,
|
|
6
6
|
TaskStatusEnum,
|
|
7
7
|
TaskTypeEnum
|
|
8
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "../../shared/@ai-setting/roy-agent-core-cqpd41gf.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-amkqnyzy.js";
|
|
10
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
11
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
12
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
10
|
+
import"../../shared/@ai-setting/roy-agent-core-jm136jzh.js";
|
|
11
|
+
import"../../shared/@ai-setting/roy-agent-core-fqandv0a.js";
|
|
12
|
+
import"../../shared/@ai-setting/roy-agent-core-jw63js86.js";
|
|
13
|
+
import"../../shared/@ai-setting/roy-agent-core-5mrynf9g.js";
|
|
13
14
|
import {
|
|
14
15
|
TaskEntityEventTypes
|
|
15
16
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
16
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
17
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
17
|
+
import"../../shared/@ai-setting/roy-agent-core-as0dd70m.js";
|
|
18
|
+
import"../../shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
19
|
+
import"../../shared/@ai-setting/roy-agent-core-a08dpf71.js";
|
|
18
20
|
import {
|
|
19
21
|
SQLiteTaskStore,
|
|
20
22
|
getDefaultTaskDbPath
|
|
21
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
22
|
-
import"../../shared/@ai-setting/roy-agent-core-2ctyjy62.js";
|
|
23
|
+
} from "../../shared/@ai-setting/roy-agent-core-th92f833.js";
|
|
23
24
|
import"../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
24
25
|
import"../../shared/@ai-setting/roy-agent-core-6masakz4.js";
|
|
25
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
26
|
+
import"../../shared/@ai-setting/roy-agent-core-06jakebr.js";
|
|
26
27
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
27
28
|
import"../../shared/@ai-setting/roy-agent-core-c1v263jn.js";
|
|
28
29
|
import"../../shared/@ai-setting/roy-agent-core-7hh0brvs.js";
|
|
29
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
30
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
31
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
32
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
33
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
34
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
35
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
30
|
+
import"../../shared/@ai-setting/roy-agent-core-gtdtzbs7.js";
|
|
31
|
+
import"../../shared/@ai-setting/roy-agent-core-7tce05jt.js";
|
|
32
|
+
import"../../shared/@ai-setting/roy-agent-core-v7mwj8eq.js";
|
|
33
|
+
import"../../shared/@ai-setting/roy-agent-core-33hn1beg.js";
|
|
34
|
+
import"../../shared/@ai-setting/roy-agent-core-hfyxv2kx.js";
|
|
35
|
+
import"../../shared/@ai-setting/roy-agent-core-386wa4wy.js";
|
|
36
|
+
import"../../shared/@ai-setting/roy-agent-core-6awgfh3x.js";
|
|
36
37
|
import"../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
37
38
|
import"../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
38
39
|
export {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task MCP Server — public entry point.
|
|
3
|
+
*
|
|
4
|
+
* Task #4619 — 让「roy 拥有全部逻辑,插件只是薄的一层」在 MCP 侧成立。
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { createTaskMcpServer } from "@ai-setting/roy-agent-core/env/task/mcp";
|
|
8
|
+
* import { TaskStoreBackend, createSQLiteTaskPort } from "@ai-setting/roy-agent-core/env/task/backend";
|
|
9
|
+
*
|
|
10
|
+
* const server = createTaskMcpServer(new TaskStoreBackend(createSQLiteTaskPort()));
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* 宿主只负责「把字节接上」;工具清单、JSON Schema、task 语义、错误封装
|
|
14
|
+
* 全在 core。
|
|
15
|
+
*/
|
|
16
|
+
export { createTaskMcpServer, createTaskMcpToolDefinitions, negotiateTaskMcpProtocolVersion, toJsonSchemaDocument, TASK_MCP_TOOL_NAMES, TASK_MCP_SUPPORTED_PROTOCOL_VERSIONS, TASK_MCP_DEFAULT_PROTOCOL_VERSION, TASK_MCP_JSON_RPC_ERRORS, type TaskMcpToolName, type TaskMcpToolDefinition, type TaskMcpServerOptions, type TaskMcpServer, type TaskMcpRequest, type TaskMcpResponse, } from "./task-mcp-server";
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import {
|
|
2
|
+
completeTaskTool,
|
|
3
|
+
createTaskTool,
|
|
4
|
+
getTaskTool,
|
|
5
|
+
listTasksTool,
|
|
6
|
+
searchTasksTool,
|
|
7
|
+
treeTasksTool,
|
|
8
|
+
updateTaskTool
|
|
9
|
+
} from "../../../shared/@ai-setting/roy-agent-core-as0dd70m.js";
|
|
10
|
+
import {
|
|
11
|
+
createOperationTool,
|
|
12
|
+
listOperationsTool
|
|
13
|
+
} from "../../../shared/@ai-setting/roy-agent-core-rn57psp0.js";
|
|
14
|
+
import"../../../shared/@ai-setting/roy-agent-core-hfyxv2kx.js";
|
|
15
|
+
import"../../../shared/@ai-setting/roy-agent-core-386wa4wy.js";
|
|
16
|
+
import"../../../shared/@ai-setting/roy-agent-core-6awgfh3x.js";
|
|
17
|
+
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
18
|
+
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
19
|
+
|
|
20
|
+
// src/env/task/mcp/task-mcp-server.ts
|
|
21
|
+
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
22
|
+
var TASK_MCP_TOOL_NAMES = [
|
|
23
|
+
"task_create",
|
|
24
|
+
"task_tree",
|
|
25
|
+
"task_get",
|
|
26
|
+
"task_list",
|
|
27
|
+
"task_search",
|
|
28
|
+
"task_update",
|
|
29
|
+
"task_complete",
|
|
30
|
+
"task_operation_create",
|
|
31
|
+
"task_operation_list"
|
|
32
|
+
];
|
|
33
|
+
var TASK_MCP_JSON_RPC_ERRORS = Object.freeze({
|
|
34
|
+
PARSE_ERROR: -32700,
|
|
35
|
+
INVALID_REQUEST: -32600,
|
|
36
|
+
METHOD_NOT_FOUND: -32601,
|
|
37
|
+
INVALID_PARAMS: -32602,
|
|
38
|
+
INTERNAL_ERROR: -32603
|
|
39
|
+
});
|
|
40
|
+
var TASK_MCP_SUPPORTED_PROTOCOL_VERSIONS = Object.freeze([
|
|
41
|
+
"2025-11-25",
|
|
42
|
+
"2025-06-18",
|
|
43
|
+
"2025-03-26",
|
|
44
|
+
"2024-11-05",
|
|
45
|
+
"2024-10-07"
|
|
46
|
+
]);
|
|
47
|
+
var TASK_MCP_DEFAULT_PROTOCOL_VERSION = "2025-11-25";
|
|
48
|
+
var TASK_TOOL_FACTORIES = [
|
|
49
|
+
createTaskTool,
|
|
50
|
+
treeTasksTool,
|
|
51
|
+
getTaskTool,
|
|
52
|
+
listTasksTool,
|
|
53
|
+
searchTasksTool,
|
|
54
|
+
updateTaskTool,
|
|
55
|
+
completeTaskTool,
|
|
56
|
+
createOperationTool,
|
|
57
|
+
listOperationsTool
|
|
58
|
+
];
|
|
59
|
+
function toJsonSchemaDocument(parameters) {
|
|
60
|
+
const p = parameters;
|
|
61
|
+
if (!p)
|
|
62
|
+
return {};
|
|
63
|
+
const target = p.shape ? p : p._def?.schema ?? p;
|
|
64
|
+
try {
|
|
65
|
+
const doc = zodToJsonSchema(target, {
|
|
66
|
+
target: "jsonSchema7",
|
|
67
|
+
$refStrategy: "none",
|
|
68
|
+
effectStrategy: "input"
|
|
69
|
+
});
|
|
70
|
+
const { $schema: _ignored, ...rest } = doc;
|
|
71
|
+
return { type: "object", properties: {}, ...rest };
|
|
72
|
+
} catch {
|
|
73
|
+
return { type: "object", properties: {} };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function createTaskMcpToolDefinitions(backend) {
|
|
77
|
+
return TASK_TOOL_FACTORIES.map((factory) => {
|
|
78
|
+
const tool = factory(backend);
|
|
79
|
+
return {
|
|
80
|
+
name: tool.name,
|
|
81
|
+
description: tool.description,
|
|
82
|
+
inputSchema: toJsonSchemaDocument(tool.parameters)
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function negotiateTaskMcpProtocolVersion(requested) {
|
|
87
|
+
if (requested && TASK_MCP_SUPPORTED_PROTOCOL_VERSIONS.includes(requested)) {
|
|
88
|
+
return requested;
|
|
89
|
+
}
|
|
90
|
+
return TASK_MCP_DEFAULT_PROTOCOL_VERSION;
|
|
91
|
+
}
|
|
92
|
+
function toolErrorText(message) {
|
|
93
|
+
return {
|
|
94
|
+
content: [{ type: "text", text: message }],
|
|
95
|
+
isError: true
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function createTaskMcpServer(backend, options = {}) {
|
|
99
|
+
const name = options.name ?? "roy-task";
|
|
100
|
+
const version = options.version ?? "1.0.0";
|
|
101
|
+
const toolDefs = createTaskMcpToolDefinitions(backend);
|
|
102
|
+
const byName = new Map(toolDefs.map((d) => [d.name, d]));
|
|
103
|
+
const callTool = async (toolName, args) => {
|
|
104
|
+
const factory = TASK_TOOL_FACTORIES.find((f) => f(backend).name === toolName);
|
|
105
|
+
if (!factory) {
|
|
106
|
+
throw new Error(`unknown tool: ${toolName}`);
|
|
107
|
+
}
|
|
108
|
+
const tool = factory(backend);
|
|
109
|
+
const ctx = {
|
|
110
|
+
session_id: options.sessionId ?? "unknown",
|
|
111
|
+
workdir: options.workdir
|
|
112
|
+
};
|
|
113
|
+
const result = await tool.execute(args ?? {}, ctx);
|
|
114
|
+
const r = result;
|
|
115
|
+
if (r && r.success === false) {
|
|
116
|
+
throw new Error(r.error ?? `tool "${toolName}" failed`);
|
|
117
|
+
}
|
|
118
|
+
return r && "output" in r ? r.output : result;
|
|
119
|
+
};
|
|
120
|
+
const handleRequest = async (request) => {
|
|
121
|
+
const { id, method, params } = request;
|
|
122
|
+
if (id === undefined || id === null) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
switch (method) {
|
|
126
|
+
case "initialize": {
|
|
127
|
+
const requested = params?.protocolVersion;
|
|
128
|
+
return {
|
|
129
|
+
jsonrpc: "2.0",
|
|
130
|
+
id,
|
|
131
|
+
result: {
|
|
132
|
+
protocolVersion: negotiateTaskMcpProtocolVersion(typeof requested === "string" ? requested : undefined),
|
|
133
|
+
capabilities: { tools: {} },
|
|
134
|
+
serverInfo: { name, version }
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
case "server/discover": {
|
|
139
|
+
const meta = params?._meta;
|
|
140
|
+
const requested = meta?.["io.modelcontextprotocol/protocolVersion"];
|
|
141
|
+
return {
|
|
142
|
+
jsonrpc: "2.0",
|
|
143
|
+
id,
|
|
144
|
+
result: {
|
|
145
|
+
protocolVersion: negotiateTaskMcpProtocolVersion(typeof requested === "string" ? requested : undefined),
|
|
146
|
+
capabilities: { tools: {} },
|
|
147
|
+
serverInfo: { name, version }
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
case "ping":
|
|
152
|
+
return { jsonrpc: "2.0", id, result: {} };
|
|
153
|
+
case "tools/list":
|
|
154
|
+
return { jsonrpc: "2.0", id, result: { tools: toolDefs } };
|
|
155
|
+
case "tools/call": {
|
|
156
|
+
const toolName = params?.name;
|
|
157
|
+
const args = params?.arguments || {};
|
|
158
|
+
if (typeof toolName !== "string") {
|
|
159
|
+
return {
|
|
160
|
+
jsonrpc: "2.0",
|
|
161
|
+
id,
|
|
162
|
+
error: {
|
|
163
|
+
code: TASK_MCP_JSON_RPC_ERRORS.INVALID_PARAMS,
|
|
164
|
+
message: "tools/call requires a tool name"
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (!byName.has(toolName)) {
|
|
169
|
+
return {
|
|
170
|
+
jsonrpc: "2.0",
|
|
171
|
+
id,
|
|
172
|
+
error: {
|
|
173
|
+
code: TASK_MCP_JSON_RPC_ERRORS.INVALID_PARAMS,
|
|
174
|
+
message: `unknown tool: ${toolName}`
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
try {
|
|
179
|
+
const value = await callTool(toolName, args);
|
|
180
|
+
return {
|
|
181
|
+
jsonrpc: "2.0",
|
|
182
|
+
id,
|
|
183
|
+
result: {
|
|
184
|
+
content: [{ type: "text", text: JSON.stringify(value ?? null, null, 2) }]
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
} catch (err) {
|
|
188
|
+
const message = err instanceof Error ? err.message : `tool "${toolName}" failed: ${String(err)}`;
|
|
189
|
+
return {
|
|
190
|
+
jsonrpc: "2.0",
|
|
191
|
+
id,
|
|
192
|
+
result: toolErrorText(message)
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
default:
|
|
197
|
+
return {
|
|
198
|
+
jsonrpc: "2.0",
|
|
199
|
+
id,
|
|
200
|
+
error: {
|
|
201
|
+
code: TASK_MCP_JSON_RPC_ERRORS.METHOD_NOT_FOUND,
|
|
202
|
+
message: `method not found: ${method}`
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
return {
|
|
208
|
+
handleRequest,
|
|
209
|
+
listTools: () => toolDefs,
|
|
210
|
+
callTool
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export {
|
|
214
|
+
toJsonSchemaDocument,
|
|
215
|
+
negotiateTaskMcpProtocolVersion,
|
|
216
|
+
createTaskMcpToolDefinitions,
|
|
217
|
+
createTaskMcpServer,
|
|
218
|
+
TASK_MCP_TOOL_NAMES,
|
|
219
|
+
TASK_MCP_SUPPORTED_PROTOCOL_VERSIONS,
|
|
220
|
+
TASK_MCP_JSON_RPC_ERRORS,
|
|
221
|
+
TASK_MCP_DEFAULT_PROTOCOL_VERSION
|
|
222
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Task MCP Server — roy's task tools over MCP, reusable by any host.
|
|
3
|
+
*
|
|
4
|
+
* Task #4619 —「代码逻辑都在 roy-agent,插件只是薄的一层」的核心交付之一。
|
|
5
|
+
*
|
|
6
|
+
* ## 为什么 core 需要这个模块
|
|
7
|
+
*
|
|
8
|
+
* `roy-agent-core` 之前**只有 MCP client**(`packages/core/src/env/mcp/*`),
|
|
9
|
+
* 没有任何 server。结果每一个「MCP 说话」的宿主都得自己写一个 server,
|
|
10
|
+
* 而 server 之上还得自己实现一遍 task 语义 —— 于是出现了
|
|
11
|
+
* `roy-plugin-for-agent/claude/mcp/roy-task-mcp-server.mjs`(281 行)+
|
|
12
|
+
* `claude/mcp/bridge.mjs`(482 行裸 SQL)这套复刻。
|
|
13
|
+
*
|
|
14
|
+
* 本模块把「MCP 传输 + 工具装配」收进 core:
|
|
15
|
+
*
|
|
16
|
+
* ```
|
|
17
|
+
* 宿主(Claude Code / Codex / opencode / …)
|
|
18
|
+
* └─ 只做一件事:new TaskMcpServer(backend) 并把 stdin/stdout 接上
|
|
19
|
+
* └─ 工具定义、JSON Schema、语义、错误封装 ← 全在 core
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* 语义本身来自 `TaskBackend`(= `TaskStoreBackend`),工具描述与参数 schema
|
|
23
|
+
* 来自 core 自己的工具工厂(`createTaskTool` / `treeTasksTool` / …),
|
|
24
|
+
* **不是**手抄的副本。
|
|
25
|
+
*
|
|
26
|
+
* ## 依赖注入
|
|
27
|
+
*
|
|
28
|
+
* 宿主提供 `TaskBackend`(`@ai-setting/roy-agent-core/env/task/backend`):
|
|
29
|
+
*
|
|
30
|
+
* - 想读 roy 自己的库 → `createSQLiteTaskPort()` + `TaskStoreBackend`
|
|
31
|
+
* - 想用自己的库 → 实现 `TaskPersistencePort` + `TaskStoreBackend`
|
|
32
|
+
* - 已有 sidecar 词表 → `createRoySidecarTaskPort(store, vocabulary)`
|
|
33
|
+
*
|
|
34
|
+
* 三种都拿到**完全相同**的语义与工具面。
|
|
35
|
+
*/
|
|
36
|
+
import type { TaskBackend } from "../backend/types";
|
|
37
|
+
/** The task tools exposed over MCP. */
|
|
38
|
+
export declare const TASK_MCP_TOOL_NAMES: readonly ["task_create", "task_tree", "task_get", "task_list", "task_search", "task_update", "task_complete", "task_operation_create", "task_operation_list"];
|
|
39
|
+
export type TaskMcpToolName = (typeof TASK_MCP_TOOL_NAMES)[number];
|
|
40
|
+
/** An MCP tool definition (JSON Schema document — MCP requires JSON Schema). */
|
|
41
|
+
export interface TaskMcpToolDefinition {
|
|
42
|
+
name: string;
|
|
43
|
+
description: string;
|
|
44
|
+
inputSchema: Record<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
/** JSON-RPC error codes used by this server. */
|
|
47
|
+
export declare const TASK_MCP_JSON_RPC_ERRORS: Readonly<{
|
|
48
|
+
PARSE_ERROR: -32700;
|
|
49
|
+
INVALID_REQUEST: -32600;
|
|
50
|
+
METHOD_NOT_FOUND: -32601;
|
|
51
|
+
INVALID_PARAMS: -32602;
|
|
52
|
+
INTERNAL_ERROR: -32603;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* MCP protocol versions this server understands.
|
|
56
|
+
*
|
|
57
|
+
* ⚠️ Task #4622 — `2025-11-25` was **missing** here.
|
|
58
|
+
*
|
|
59
|
+
* Task #4619 moved this contract into core but copied the list without the
|
|
60
|
+
* newest entry. That regressed the handshake in two ways:
|
|
61
|
+
*
|
|
62
|
+
* 1. `@modelcontextprotocol/sdk@1.29.0` (this repo's own dependency)
|
|
63
|
+
* declares `LATEST_PROTOCOL_VERSION = '2025-11-25'` — a modern client
|
|
64
|
+
* asks for exactly that version.
|
|
65
|
+
* 2. The **already published** plugin (`@ai-setting/roy-task-plugin@0.6.1`)
|
|
66
|
+
* listed `2025-11-25` first and used it as its `DEFAULT_PROTOCOL_VERSION`.
|
|
67
|
+
*
|
|
68
|
+
* So core without it silently *downgraded* the negotiated version relative
|
|
69
|
+
* to the plugin release users already run. The list must stay a superset of
|
|
70
|
+
* the SDK's own list, newest first.
|
|
71
|
+
*/
|
|
72
|
+
export declare const TASK_MCP_SUPPORTED_PROTOCOL_VERSIONS: readonly string[];
|
|
73
|
+
export declare const TASK_MCP_DEFAULT_PROTOCOL_VERSION = "2025-11-25";
|
|
74
|
+
export interface TaskMcpServerOptions {
|
|
75
|
+
/** Server name reported in `initialize`. */
|
|
76
|
+
name?: string;
|
|
77
|
+
/** Server version reported in `initialize`. */
|
|
78
|
+
version?: string;
|
|
79
|
+
/** Session id stamped on created tasks / operations. */
|
|
80
|
+
sessionId?: string;
|
|
81
|
+
/** Working directory reported to tools that want one. */
|
|
82
|
+
workdir?: string;
|
|
83
|
+
}
|
|
84
|
+
/** A JSON-RPC request as it arrives on the wire. */
|
|
85
|
+
export interface TaskMcpRequest {
|
|
86
|
+
jsonrpc?: string;
|
|
87
|
+
id?: number | string | null;
|
|
88
|
+
method?: string;
|
|
89
|
+
params?: Record<string, unknown>;
|
|
90
|
+
}
|
|
91
|
+
/** A JSON-RPC response. `null` means "no response" (notification). */
|
|
92
|
+
export interface TaskMcpResponse {
|
|
93
|
+
jsonrpc: "2.0";
|
|
94
|
+
id: number | string | null;
|
|
95
|
+
result?: Record<string, unknown>;
|
|
96
|
+
error?: {
|
|
97
|
+
code: number;
|
|
98
|
+
message: string;
|
|
99
|
+
data?: unknown;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/** The server handle a host drives. */
|
|
103
|
+
export interface TaskMcpServer {
|
|
104
|
+
/**
|
|
105
|
+
* Handle one JSON-RPC request. Returns `null` for notifications.
|
|
106
|
+
*
|
|
107
|
+
* Async because tool execution is async — a host that speaks JSON-RPC over
|
|
108
|
+
* stdio awaits this before writing the response.
|
|
109
|
+
*/
|
|
110
|
+
handleRequest(request: TaskMcpRequest): Promise<TaskMcpResponse | null>;
|
|
111
|
+
/** The tool surface this server exposes. */
|
|
112
|
+
listTools(): TaskMcpToolDefinition[];
|
|
113
|
+
/** Invoke a tool by name (throws on unknown tool). */
|
|
114
|
+
callTool(name: string, args: Record<string, unknown>): Promise<unknown>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Convert a zod schema (v3) into a JSON Schema document.
|
|
118
|
+
*
|
|
119
|
+
* MCP requires a **JSON Schema document**, not a zod object. roy's
|
|
120
|
+
* `task_operation_create` / `task_operation_list` use `ZodEffects`
|
|
121
|
+
* (preprocess + transform), so the inner schema is unwrapped first.
|
|
122
|
+
*
|
|
123
|
+
* Fault-isolated: a conversion failure degrades to `{}` (the tool advertises
|
|
124
|
+
* no parameters) rather than breaking server startup.
|
|
125
|
+
*/
|
|
126
|
+
export declare function toJsonSchemaDocument(parameters: unknown): Record<string, unknown>;
|
|
127
|
+
/**
|
|
128
|
+
* Build the MCP tool definitions for a backend.
|
|
129
|
+
*
|
|
130
|
+
* The descriptions and parameter schemas come from **core's own tool
|
|
131
|
+
* factories** — a host never has to hand-write them.
|
|
132
|
+
*/
|
|
133
|
+
export declare function createTaskMcpToolDefinitions(backend: TaskBackend): TaskMcpToolDefinition[];
|
|
134
|
+
/** Negotiate a protocol version, falling back to our default. */
|
|
135
|
+
export declare function negotiateTaskMcpProtocolVersion(requested?: string): string;
|
|
136
|
+
/**
|
|
137
|
+
* Create a task MCP server bound to a `TaskBackend`.
|
|
138
|
+
*
|
|
139
|
+
* The returned handle is transport-agnostic: the host decides how bytes get
|
|
140
|
+
* in and out (stdio for Claude Code, an HTTP/SSE transport, a socket, …).
|
|
141
|
+
*/
|
|
142
|
+
export declare function createTaskMcpServer(backend: TaskBackend, options?: TaskMcpServerOptions): TaskMcpServer;
|
|
@@ -6,3 +6,4 @@ export { createAutoTaskPlugin, type AutoTaskPluginConfig, } from "./auto-task-pl
|
|
|
6
6
|
export { WORKFLOW_EXTRACTOR_PROMPT, formatExtractorInput, formatExtractorInputFromDescription, parseExtractorOutput, } from "./workflow-extractor-agent";
|
|
7
7
|
export { LarkCliTaskNotifyHook, createLarkCliTaskNotifyHook, type TaskNotifyConfig, NotifyType, } from "./lark-cli-task-notify-plugin";
|
|
8
8
|
export { PerTaskGroupChatPlugin, createPerTaskGroupChatPlugin, type PerTaskGroupConfig, } from "./per-task-group-chat-plugin";
|
|
9
|
+
export { LarkCardPatchNotifier, type LarkCardPatchNotifierOptions, buildTaskCard, buildWorkflowCard, renderProgressBar, renderMilestones, renderProcessSteps, renderTaskInfoLines, renderContextAsLines, renderWorkflowInfoLines, formatTimestampForDisplay, formatDateTimeForDisplay, formatDurationMs, sanitizeInlineText, humanizeValue, resolveTaskTitleForDisplay, buildChatAppLink, DEFAULT_APP_LINK_BASE, type CardStatus, type WorkflowCardStatus, type Milestone, type ProcessStep, type TaskMeta, type WorkflowMeta, type CardPayload, type StartTaskOptions, type UpdateTaskOptions, type FinishTaskOptions, type StartTaskResult, type StartWorkflowOptions, type UpdateWorkflowOptions, type FinishWorkflowOptions, } from "./lark-card-patch-notifier";
|
|
@@ -10,34 +10,69 @@ import {
|
|
|
10
10
|
formatExtractorInput,
|
|
11
11
|
formatExtractorInputFromDescription,
|
|
12
12
|
parseExtractorOutput
|
|
13
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
14
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
15
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
13
|
+
} from "../../../shared/@ai-setting/roy-agent-core-ye4bfzqg.js";
|
|
14
|
+
import"../../../shared/@ai-setting/roy-agent-core-a08dpf71.js";
|
|
15
|
+
import"../../../shared/@ai-setting/roy-agent-core-th92f833.js";
|
|
16
16
|
import"../../../shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
17
17
|
import"../../../shared/@ai-setting/roy-agent-core-6masakz4.js";
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
import {
|
|
19
|
+
DEFAULT_APP_LINK_BASE,
|
|
20
|
+
LarkCardPatchNotifier,
|
|
21
|
+
buildChatAppLink,
|
|
22
|
+
buildTaskCard,
|
|
23
|
+
buildWorkflowCard,
|
|
24
|
+
formatDateTimeForDisplay,
|
|
25
|
+
formatDurationMs,
|
|
26
|
+
formatTimestampForDisplay,
|
|
27
|
+
humanizeValue,
|
|
28
|
+
renderContextAsLines,
|
|
29
|
+
renderMilestones,
|
|
30
|
+
renderProcessSteps,
|
|
31
|
+
renderProgressBar,
|
|
32
|
+
renderTaskInfoLines,
|
|
33
|
+
renderWorkflowInfoLines,
|
|
34
|
+
resolveTaskTitleForDisplay,
|
|
35
|
+
sanitizeInlineText
|
|
36
|
+
} from "../../../shared/@ai-setting/roy-agent-core-m3w3ytxt.js";
|
|
37
|
+
import"../../../shared/@ai-setting/roy-agent-core-kmvw6b4v.js";
|
|
38
|
+
import"../../../shared/@ai-setting/roy-agent-core-p6a4v4fq.js";
|
|
21
39
|
import"../../../shared/@ai-setting/roy-agent-core-jrj30vq3.js";
|
|
22
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
40
|
+
import"../../../shared/@ai-setting/roy-agent-core-p8rf4z89.js";
|
|
23
41
|
import"../../../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
24
42
|
import"../../../shared/@ai-setting/roy-agent-core-az13yzmc.js";
|
|
25
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
26
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
27
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
28
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
43
|
+
import"../../../shared/@ai-setting/roy-agent-core-33hn1beg.js";
|
|
44
|
+
import"../../../shared/@ai-setting/roy-agent-core-hfyxv2kx.js";
|
|
45
|
+
import"../../../shared/@ai-setting/roy-agent-core-386wa4wy.js";
|
|
46
|
+
import"../../../shared/@ai-setting/roy-agent-core-6awgfh3x.js";
|
|
29
47
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
30
48
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
31
49
|
export {
|
|
50
|
+
sanitizeInlineText,
|
|
51
|
+
resolveTaskTitleForDisplay,
|
|
52
|
+
renderWorkflowInfoLines,
|
|
53
|
+
renderTaskInfoLines,
|
|
54
|
+
renderProgressBar,
|
|
55
|
+
renderProcessSteps,
|
|
56
|
+
renderMilestones,
|
|
57
|
+
renderContextAsLines,
|
|
32
58
|
parseExtractorOutput,
|
|
59
|
+
humanizeValue,
|
|
60
|
+
formatTimestampForDisplay,
|
|
33
61
|
formatExtractorInputFromDescription,
|
|
34
62
|
formatExtractorInput,
|
|
63
|
+
formatDurationMs,
|
|
64
|
+
formatDateTimeForDisplay,
|
|
35
65
|
createPerTaskGroupChatPlugin,
|
|
36
66
|
createLarkCliTaskNotifyHook,
|
|
37
67
|
createAutoTaskPlugin,
|
|
68
|
+
buildWorkflowCard,
|
|
69
|
+
buildTaskCard,
|
|
70
|
+
buildChatAppLink,
|
|
38
71
|
WORKFLOW_EXTRACTOR_PROMPT,
|
|
39
72
|
TaskTagPlugin,
|
|
40
73
|
PerTaskGroupChatPlugin,
|
|
41
74
|
NotifyType,
|
|
42
|
-
LarkCliTaskNotifyHook
|
|
75
|
+
LarkCliTaskNotifyHook,
|
|
76
|
+
LarkCardPatchNotifier,
|
|
77
|
+
DEFAULT_APP_LINK_BASE
|
|
43
78
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_APP_LINK_BASE,
|
|
3
|
+
LarkCardPatchNotifier,
|
|
4
|
+
buildChatAppLink,
|
|
5
|
+
buildTaskCard,
|
|
6
|
+
buildWorkflowCard,
|
|
7
|
+
formatDateTimeForDisplay,
|
|
8
|
+
formatDurationMs,
|
|
9
|
+
formatTimestampForDisplay,
|
|
10
|
+
humanizeValue,
|
|
11
|
+
renderContextAsLines,
|
|
12
|
+
renderMilestones,
|
|
13
|
+
renderProcessSteps,
|
|
14
|
+
renderProgressBar,
|
|
15
|
+
renderTaskInfoLines,
|
|
16
|
+
renderWorkflowInfoLines,
|
|
17
|
+
resolveTaskTitleForDisplay,
|
|
18
|
+
sanitizeInlineText
|
|
19
|
+
} from "../../../shared/@ai-setting/roy-agent-core-m3w3ytxt.js";
|
|
20
|
+
import"../../../shared/@ai-setting/roy-agent-core-386wa4wy.js";
|
|
21
|
+
import"../../../shared/@ai-setting/roy-agent-core-6awgfh3x.js";
|
|
22
|
+
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
23
|
+
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
24
|
+
export {
|
|
25
|
+
sanitizeInlineText,
|
|
26
|
+
resolveTaskTitleForDisplay,
|
|
27
|
+
renderWorkflowInfoLines,
|
|
28
|
+
renderTaskInfoLines,
|
|
29
|
+
renderProgressBar,
|
|
30
|
+
renderProcessSteps,
|
|
31
|
+
renderMilestones,
|
|
32
|
+
renderContextAsLines,
|
|
33
|
+
humanizeValue,
|
|
34
|
+
formatTimestampForDisplay,
|
|
35
|
+
formatDurationMs,
|
|
36
|
+
formatDateTimeForDisplay,
|
|
37
|
+
buildWorkflowCard,
|
|
38
|
+
buildTaskCard,
|
|
39
|
+
buildChatAppLink,
|
|
40
|
+
LarkCardPatchNotifier,
|
|
41
|
+
DEFAULT_APP_LINK_BASE
|
|
42
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
1
|
+
import"../../../shared/@ai-setting/roy-agent-core-5mrynf9g.js";
|
|
2
2
|
import {
|
|
3
3
|
SQLiteTaskStore,
|
|
4
4
|
getDefaultDataDir,
|
|
5
5
|
getDefaultTaskDbPath
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
7
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
8
|
-
import"../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-th92f833.js";
|
|
7
|
+
import"../../../shared/@ai-setting/roy-agent-core-386wa4wy.js";
|
|
8
|
+
import"../../../shared/@ai-setting/roy-agent-core-6awgfh3x.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-jnszp0jq.js";
|
|
10
10
|
import"../../../shared/@ai-setting/roy-agent-core-fs0mn2jk.js";
|
|
11
11
|
export {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Migration logging helper.
|
|
3
|
+
*
|
|
4
|
+
* Task #4619 — the task migrations used to print with `console.log`, which
|
|
5
|
+
* is **stdout**.
|
|
6
|
+
*
|
|
7
|
+
* That is fatal for a stdio MCP server: the MCP stdio transport is
|
|
8
|
+
* newline-delimited JSON-RPC on stdout, and one stray non-JSON line makes
|
|
9
|
+
* the client drop the server (Claude Code reports
|
|
10
|
+
* `mcp_servers: [{"name":"plugin:roy-task:roy-task","status":"failed"}]`).
|
|
11
|
+
*
|
|
12
|
+
* Measured: the plugin's MCP server emitted **24 of 26 stdout lines** that
|
|
13
|
+
* were not JSON — 5 migration banners plus core's `[INFO]` trace lines.
|
|
14
|
+
*
|
|
15
|
+
* So migration output goes to **stderr**, always. It is diagnostics, not
|
|
16
|
+
* protocol.
|
|
17
|
+
*/
|
|
18
|
+
/** Print one migration diagnostic to stderr (never stdout). */
|
|
19
|
+
export declare function logMigration(message: string): void;
|