@ai-setting/roy-agent-core 1.7.65 → 1.7.67
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/env/agent/agent-component.d.ts +56 -3
- package/dist/env/agent/agent-component.js +2 -2
- package/dist/env/agent/index.js +2 -2
- package/dist/env/agent/types.d.ts +28 -0
- package/dist/env/environment.d.ts +13 -0
- package/dist/env/event-source/command-card-action.d.ts +105 -0
- package/dist/env/event-source/command-cards.d.ts +72 -0
- package/dist/env/event-source/command-registry.d.ts +181 -0
- package/dist/env/event-source/command-types.d.ts +8 -0
- package/dist/env/event-source/event-source-handlers.d.ts +66 -0
- package/dist/env/event-source/event-source-handlers.js +7 -4
- package/dist/env/event-source/fallback-model-command.d.ts +80 -0
- package/dist/env/event-source/index.d.ts +7 -0
- package/dist/env/event-source/index.js +48 -7
- package/dist/env/event-source/timer-handler.d.ts +93 -1
- package/dist/env/index.js +15 -14
- package/dist/env/llm/index.js +1 -1
- package/dist/env/prompt/index.js +3 -2
- package/dist/env/prompt/prompts-index.d.ts +3 -8
- package/dist/env/task/delegate/delegate-tool.d.ts +58 -2
- package/dist/env/task/delegate/delegate-tool.js +5 -2
- package/dist/env/task/delegate/index.js +3 -2
- package/dist/env/task/index.js +9 -8
- package/dist/env/task/mcp/index.js +3 -2
- package/dist/env/task/plugins/__e2e__/laya-completion-e2e.d.ts +16 -0
- package/dist/env/task/plugins/index.js +4 -3
- package/dist/env/task/plugins/laya-completion-plugin.d.ts +133 -0
- package/dist/env/task/plugins/laya-port.d.ts +23 -0
- package/dist/env/task/storage/index.js +2 -2
- package/dist/env/task/storage/migrations/003_add_process_description.d.ts +1 -1
- package/dist/env/task/storage/migrations/log-migration.d.ts +49 -3
- package/dist/env/task/task-component.d.ts +43 -0
- package/dist/env/task/tools/completion-copy.d.ts +27 -0
- package/dist/env/task/tools/index.js +2 -1
- package/dist/env/task/tools/operation/create-tool.d.ts +1 -1
- package/dist/env/task/tools/operation/index.js +1 -1
- package/dist/env/task/tools/operation/operation-types.d.ts +10 -8
- package/dist/env/task/types.d.ts +3 -3
- package/dist/env/tool/built-in/index.js +2 -2
- package/dist/env/tool/built-in/query-background-process-tool.d.ts +10 -0
- package/dist/env/tool/index.js +3 -3
- package/dist/env/tool/types.d.ts +6 -0
- package/dist/index.js +60 -19
- package/dist/shared/@ai-setting/{roy-agent-core-rjzdj0xb.js → roy-agent-core-02j24hrg.js} +2 -0
- package/dist/shared/@ai-setting/{roy-agent-core-hmdcz3g9.js → roy-agent-core-1k83dq3a.js} +16 -6
- package/dist/shared/@ai-setting/{roy-agent-core-e42v9bcq.js → roy-agent-core-1kxf910n.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-amkqnyzy.js → roy-agent-core-58804s3j.js} +10 -0
- package/dist/shared/@ai-setting/roy-agent-core-6m4bw8jy.js +6 -0
- package/dist/shared/@ai-setting/roy-agent-core-8zas6w5q.js +1083 -0
- package/dist/shared/@ai-setting/{roy-agent-core-9bs6xrav.js → roy-agent-core-abqhkbn3.js} +6 -3
- package/dist/shared/@ai-setting/{roy-agent-core-f6c0nadn.js → roy-agent-core-b7jbqfsy.js} +25 -11
- package/dist/shared/@ai-setting/{roy-agent-core-hjejpcg5.js → roy-agent-core-dnjm17sa.js} +51 -9
- package/dist/shared/@ai-setting/{roy-agent-core-t0ktaevq.js → roy-agent-core-h5vmff8w.js} +60 -4
- package/dist/shared/@ai-setting/{roy-agent-core-xhrrgfdy.js → roy-agent-core-hfr6bzts.js} +168 -52
- package/dist/shared/@ai-setting/{roy-agent-core-18am1h07.js → roy-agent-core-k4ps1hxp.js} +1085 -46
- package/dist/shared/@ai-setting/{roy-agent-core-jz8dsypm.js → roy-agent-core-kpg25s2q.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-6masakz4.js → roy-agent-core-ma35jyd9.js} +19 -8
- package/dist/shared/@ai-setting/{roy-agent-core-gxzxq1sf.js → roy-agent-core-ntq0gz7q.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-rn57psp0.js → roy-agent-core-p5cz9m8v.js} +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-w07ymg29.js → roy-agent-core-wksgtqf9.js} +1 -1
- package/package.json +1 -1
- package/dist/shared/@ai-setting/roy-agent-core-6z412atw.js +0 -654
- /package/dist/shared/@ai-setting/{roy-agent-core-5enxfga2.js → roy-agent-core-b4x6x4k2.js} +0 -0
- /package/dist/shared/@ai-setting/{roy-agent-core-es467wsz.js → roy-agent-core-dt104qa1.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ModelLimitsSchema,
|
|
6
6
|
ProviderCapabilitiesSchema,
|
|
7
7
|
ProviderConfigSchema
|
|
8
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
8
|
+
} from "./shared/@ai-setting/roy-agent-core-02j24hrg.js";
|
|
9
9
|
import"./shared/@ai-setting/roy-agent-core-wjmwwc4a.js";
|
|
10
10
|
import"./shared/@ai-setting/roy-agent-core-pnj0zh25.js";
|
|
11
11
|
import {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
grepTool,
|
|
18
18
|
readFileTool,
|
|
19
19
|
writeFileTool
|
|
20
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
20
|
+
} from "./shared/@ai-setting/roy-agent-core-kpg25s2q.js";
|
|
21
21
|
import {
|
|
22
22
|
getUnderstandImageLLMProvider,
|
|
23
23
|
resetUnderstandImageLLMProvider,
|
|
@@ -31,7 +31,7 @@ import"./shared/@ai-setting/roy-agent-core-adg9ghbt.js";
|
|
|
31
31
|
import {
|
|
32
32
|
PromptComponent,
|
|
33
33
|
PromptStore
|
|
34
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
34
|
+
} from "./shared/@ai-setting/roy-agent-core-wksgtqf9.js";
|
|
35
35
|
import {
|
|
36
36
|
MemoryComponent
|
|
37
37
|
} from "./shared/@ai-setting/roy-agent-core-nwbfepba.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
SkillComponent
|
|
53
53
|
} from "./shared/@ai-setting/roy-agent-core-5pr4zp88.js";
|
|
54
54
|
import"./shared/@ai-setting/roy-agent-core-psvxt4c9.js";
|
|
55
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
55
|
+
import"./shared/@ai-setting/roy-agent-core-b4x6x4k2.js";
|
|
56
56
|
import {
|
|
57
57
|
closeDatabase
|
|
58
58
|
} from "./shared/@ai-setting/roy-agent-core-r5wt1h3c.js";
|
|
@@ -61,33 +61,53 @@ import {
|
|
|
61
61
|
BaseEnvironment,
|
|
62
62
|
generateDescendingId,
|
|
63
63
|
generateId
|
|
64
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
64
|
+
} from "./shared/@ai-setting/roy-agent-core-8zas6w5q.js";
|
|
65
65
|
import {
|
|
66
66
|
TaskComponent
|
|
67
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
68
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
67
|
+
} from "./shared/@ai-setting/roy-agent-core-1k83dq3a.js";
|
|
68
|
+
import"./shared/@ai-setting/roy-agent-core-58804s3j.js";
|
|
69
69
|
import"./shared/@ai-setting/roy-agent-core-jm136jzh.js";
|
|
70
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
70
|
+
import"./shared/@ai-setting/roy-agent-core-dnjm17sa.js";
|
|
71
71
|
import"./shared/@ai-setting/roy-agent-core-fttgm52a.js";
|
|
72
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
72
|
+
import"./shared/@ai-setting/roy-agent-core-ntq0gz7q.js";
|
|
73
73
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
74
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
75
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
74
|
+
import"./shared/@ai-setting/roy-agent-core-h5vmff8w.js";
|
|
75
|
+
import"./shared/@ai-setting/roy-agent-core-p5cz9m8v.js";
|
|
76
76
|
import {
|
|
77
77
|
EventSourceComponent
|
|
78
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
78
|
+
} from "./shared/@ai-setting/roy-agent-core-1kxf910n.js";
|
|
79
79
|
import {
|
|
80
80
|
BountyIMInstance,
|
|
81
|
+
COMMAND_PREFIX,
|
|
82
|
+
CommandRegistry,
|
|
83
|
+
DEFAULT_CONFIG_PATH,
|
|
84
|
+
FALLBACK_MODEL_ACTIONS,
|
|
85
|
+
FALLBACK_MODEL_ACTION_NS,
|
|
81
86
|
TimerInstance,
|
|
82
87
|
bountyIMHandler,
|
|
83
88
|
buildDefaultBountyIMSystemPrompt,
|
|
84
89
|
builtInHandlers,
|
|
90
|
+
extractCommandInvocation,
|
|
85
91
|
extractMetadata,
|
|
92
|
+
fallbackModelCommand,
|
|
86
93
|
getBuiltInHandler,
|
|
94
|
+
getGlobalCommandRegistry,
|
|
95
|
+
handleCommandCardAction,
|
|
96
|
+
handleCommandMessage,
|
|
97
|
+
isCommandCardAction,
|
|
98
|
+
isCommandMessage,
|
|
99
|
+
isFallbackModelCard,
|
|
87
100
|
larkCliHandler,
|
|
101
|
+
listCommand,
|
|
102
|
+
readFallbackModelList,
|
|
103
|
+
readRawFallbackModelArray,
|
|
104
|
+
renderFallbackModelCard,
|
|
105
|
+
renderTextCard,
|
|
88
106
|
resolveBountyIMSystemPrompt,
|
|
89
|
-
timerHandler
|
|
90
|
-
|
|
107
|
+
timerHandler,
|
|
108
|
+
translateCardActionToCommand,
|
|
109
|
+
writeFallbackModelList
|
|
110
|
+
} from "./shared/@ai-setting/roy-agent-core-k4ps1hxp.js";
|
|
91
111
|
import {
|
|
92
112
|
BUILT_IN_EVENT_SOURCE_TYPES,
|
|
93
113
|
BUILT_IN_EVENT_SOURCE_TYPE_LIST,
|
|
@@ -112,7 +132,7 @@ import {
|
|
|
112
132
|
import {
|
|
113
133
|
TaskTagPlugin,
|
|
114
134
|
createAutoTaskPlugin
|
|
115
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
135
|
+
} from "./shared/@ai-setting/roy-agent-core-b7jbqfsy.js";
|
|
116
136
|
import {
|
|
117
137
|
EventStoreImpl,
|
|
118
138
|
getSharedEventStore,
|
|
@@ -122,15 +142,16 @@ import {
|
|
|
122
142
|
import {
|
|
123
143
|
SQLiteTaskStore,
|
|
124
144
|
getDefaultTaskDbPath
|
|
125
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
145
|
+
} from "./shared/@ai-setting/roy-agent-core-abqhkbn3.js";
|
|
126
146
|
import {
|
|
127
147
|
TaskHookPoints
|
|
128
148
|
} from "./shared/@ai-setting/roy-agent-core-1pg0fepg.js";
|
|
129
149
|
import {
|
|
130
150
|
getBuiltInPrompt,
|
|
131
151
|
getBuiltInPromptNames
|
|
132
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
152
|
+
} from "./shared/@ai-setting/roy-agent-core-ma35jyd9.js";
|
|
133
153
|
import"./shared/@ai-setting/roy-agent-core-tr3ep81v.js";
|
|
154
|
+
import"./shared/@ai-setting/roy-agent-core-6m4bw8jy.js";
|
|
134
155
|
import"./shared/@ai-setting/roy-agent-core-0ys85x46.js";
|
|
135
156
|
import"./shared/@ai-setting/roy-agent-core-zk2jg0v7.js";
|
|
136
157
|
import {
|
|
@@ -179,12 +200,12 @@ import"./shared/@ai-setting/roy-agent-core-jagkferh.js";
|
|
|
179
200
|
import {
|
|
180
201
|
AgentComponent,
|
|
181
202
|
AgentComponentConfigSchema
|
|
182
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
203
|
+
} from "./shared/@ai-setting/roy-agent-core-hfr6bzts.js";
|
|
183
204
|
import {
|
|
184
205
|
ToolComponent,
|
|
185
206
|
ToolRegistry,
|
|
186
207
|
ToolValidator
|
|
187
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
208
|
+
} from "./shared/@ai-setting/roy-agent-core-dt104qa1.js";
|
|
188
209
|
import"./shared/@ai-setting/roy-agent-core-jvv2h3d6.js";
|
|
189
210
|
import {
|
|
190
211
|
AgentRegistry
|
|
@@ -530,9 +551,11 @@ init_workflow_hil();
|
|
|
530
551
|
init_node_registry_helper();
|
|
531
552
|
export {
|
|
532
553
|
writeFileTool,
|
|
554
|
+
writeFallbackModelList,
|
|
533
555
|
wrapFunction,
|
|
534
556
|
validateEventSourceConfig,
|
|
535
557
|
understandImageTool,
|
|
558
|
+
translateCardActionToCommand,
|
|
536
559
|
toolInvokeParamFilter,
|
|
537
560
|
toolExecResultFilter,
|
|
538
561
|
toolExecParamFilter,
|
|
@@ -548,9 +571,13 @@ export {
|
|
|
548
571
|
resetTracerProvider,
|
|
549
572
|
resetTraceFullModeCache,
|
|
550
573
|
resetSharedEventStore,
|
|
574
|
+
renderTextCard,
|
|
575
|
+
renderFallbackModelCard,
|
|
551
576
|
registerDecoratorNodeType,
|
|
552
577
|
recordSessionMessagesParamFilter,
|
|
578
|
+
readRawFallbackModelArray,
|
|
553
579
|
readFileTool,
|
|
580
|
+
readFallbackModelList,
|
|
554
581
|
propagation,
|
|
555
582
|
parseModelString,
|
|
556
583
|
parseImageInput,
|
|
@@ -558,6 +585,7 @@ export {
|
|
|
558
585
|
messagesParamFilter,
|
|
559
586
|
llmInvokeResultFilter,
|
|
560
587
|
llmInvokeParamFilter,
|
|
588
|
+
listCommand,
|
|
561
589
|
larkCliHandler,
|
|
562
590
|
isValidEventSourceType,
|
|
563
591
|
isTraceFullMode,
|
|
@@ -566,9 +594,14 @@ export {
|
|
|
566
594
|
isOpencodeProvider,
|
|
567
595
|
isOpencodeEndpoint,
|
|
568
596
|
isMediaType,
|
|
597
|
+
isFallbackModelCard,
|
|
598
|
+
isCommandMessage,
|
|
599
|
+
isCommandCardAction,
|
|
569
600
|
isBuiltInEventSourceType,
|
|
570
601
|
invokeNonStream,
|
|
571
602
|
invoke,
|
|
603
|
+
handleCommandMessage,
|
|
604
|
+
handleCommandCardAction,
|
|
572
605
|
grepTool,
|
|
573
606
|
globalHookManager,
|
|
574
607
|
globTool,
|
|
@@ -580,6 +613,7 @@ export {
|
|
|
580
613
|
getLogLevels,
|
|
581
614
|
getLogLevel,
|
|
582
615
|
getLogDir,
|
|
616
|
+
getGlobalCommandRegistry,
|
|
583
617
|
getErrorCode,
|
|
584
618
|
getDefaultTaskDbPath,
|
|
585
619
|
getDefaultConfigForType,
|
|
@@ -590,7 +624,9 @@ export {
|
|
|
590
624
|
getAllBuiltInTools,
|
|
591
625
|
generateId,
|
|
592
626
|
generateDescendingId,
|
|
627
|
+
fallbackModelCommand,
|
|
593
628
|
extractMetadata,
|
|
629
|
+
extractCommandInvocation,
|
|
594
630
|
envQueryParamFilter,
|
|
595
631
|
embedResultFilter,
|
|
596
632
|
embedParamFilter,
|
|
@@ -657,16 +693,21 @@ export {
|
|
|
657
693
|
LLMConfigSchema,
|
|
658
694
|
LLMComponent,
|
|
659
695
|
HookManager,
|
|
696
|
+
FALLBACK_MODEL_ACTION_NS,
|
|
697
|
+
FALLBACK_MODEL_ACTIONS,
|
|
660
698
|
EventStoreImpl,
|
|
661
699
|
EventSourceInitHooks,
|
|
662
700
|
EventSourceComponent,
|
|
663
701
|
ErrorCodes,
|
|
664
702
|
Edge,
|
|
665
703
|
DebugComponent,
|
|
704
|
+
DEFAULT_CONFIG_PATH,
|
|
666
705
|
ContextError,
|
|
667
706
|
ConfigComponent,
|
|
668
707
|
ComponentError,
|
|
669
708
|
CommandsComponent,
|
|
709
|
+
CommandRegistry,
|
|
710
|
+
COMMAND_PREFIX,
|
|
670
711
|
CLI_SESSION_CHAT_ID_PREFIX,
|
|
671
712
|
CLI_COMMAND_ES_TYPE,
|
|
672
713
|
BountyIMInstance,
|
|
@@ -721,6 +721,7 @@ class LLMComponent extends BaseComponent {
|
|
|
721
721
|
"llm.defaultModel",
|
|
722
722
|
"llm.defaultProvider",
|
|
723
723
|
"llm.fallbackModel",
|
|
724
|
+
"llm.fallbackModels",
|
|
724
725
|
"llm.fallbackProvider",
|
|
725
726
|
"llm.temperature",
|
|
726
727
|
"llm.maxTokens",
|
|
@@ -792,6 +793,7 @@ class LLMComponent extends BaseComponent {
|
|
|
792
793
|
"llm.defaultModel",
|
|
793
794
|
"llm.defaultProvider",
|
|
794
795
|
"llm.fallbackModel",
|
|
796
|
+
"llm.fallbackModels",
|
|
795
797
|
"llm.fallbackProvider",
|
|
796
798
|
"llm.temperature",
|
|
797
799
|
"llm.maxTokens",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createQueryBackgroundProcessTool
|
|
3
|
-
} from "./roy-agent-core-
|
|
3
|
+
} from "./roy-agent-core-58804s3j.js";
|
|
4
4
|
import {
|
|
5
5
|
createStopTool
|
|
6
6
|
} from "./roy-agent-core-jm136jzh.js";
|
|
7
7
|
import {
|
|
8
8
|
BackgroundTaskManager,
|
|
9
9
|
createDelegateTool
|
|
10
|
-
} from "./roy-agent-core-
|
|
10
|
+
} from "./roy-agent-core-dnjm17sa.js";
|
|
11
11
|
import {
|
|
12
12
|
TaskEntityEventTypes
|
|
13
13
|
} from "./roy-agent-core-8gxth0eh.js";
|
|
@@ -22,18 +22,18 @@ import {
|
|
|
22
22
|
searchTasksTool,
|
|
23
23
|
treeTasksTool,
|
|
24
24
|
updateTaskTool
|
|
25
|
-
} from "./roy-agent-core-
|
|
25
|
+
} from "./roy-agent-core-h5vmff8w.js";
|
|
26
26
|
import {
|
|
27
27
|
createOperationTool,
|
|
28
28
|
deleteOperationTool,
|
|
29
29
|
getOperationTool,
|
|
30
30
|
listOperationsTool,
|
|
31
31
|
updateOperationTool
|
|
32
|
-
} from "./roy-agent-core-
|
|
32
|
+
} from "./roy-agent-core-p5cz9m8v.js";
|
|
33
33
|
import {
|
|
34
34
|
SQLiteTaskStore,
|
|
35
35
|
getDefaultTaskDbPath
|
|
36
|
-
} from "./roy-agent-core-
|
|
36
|
+
} from "./roy-agent-core-abqhkbn3.js";
|
|
37
37
|
import {
|
|
38
38
|
TaskHookPoints
|
|
39
39
|
} from "./roy-agent-core-1pg0fepg.js";
|
|
@@ -198,6 +198,8 @@ class TaskComponent extends BaseComponent {
|
|
|
198
198
|
config;
|
|
199
199
|
toolComponent;
|
|
200
200
|
backgroundTaskManager;
|
|
201
|
+
skipAbortRunningTasksOnDispose = false;
|
|
202
|
+
waitForRunningTasksOnDispose = false;
|
|
201
203
|
configComponent;
|
|
202
204
|
tagService;
|
|
203
205
|
plugins = new Map;
|
|
@@ -227,6 +229,8 @@ class TaskComponent extends BaseComponent {
|
|
|
227
229
|
throw new Error("ConfigComponent is required for TaskComponent initialization");
|
|
228
230
|
}
|
|
229
231
|
this.configComponent = options.configComponent;
|
|
232
|
+
this.skipAbortRunningTasksOnDispose = options.skipAbortRunningTasksOnDispose === true;
|
|
233
|
+
this.waitForRunningTasksOnDispose = options.waitForRunningTasksOnDispose === true;
|
|
230
234
|
await this.registerConfig(options);
|
|
231
235
|
this.setStatus("running");
|
|
232
236
|
logger2.info("[TaskComponent] Initialized");
|
|
@@ -350,7 +354,10 @@ class TaskComponent extends BaseComponent {
|
|
|
350
354
|
}
|
|
351
355
|
}
|
|
352
356
|
if (this.backgroundTaskManager) {
|
|
353
|
-
this.backgroundTaskManager.dispose(
|
|
357
|
+
await this.backgroundTaskManager.dispose(this.skipAbortRunningTasksOnDispose ? {
|
|
358
|
+
skipAbortRunningTasks: true,
|
|
359
|
+
waitForRunningTasks: this.waitForRunningTasksOnDispose
|
|
360
|
+
} : undefined);
|
|
354
361
|
this.backgroundTaskManager = undefined;
|
|
355
362
|
}
|
|
356
363
|
if (this.store) {
|
|
@@ -539,6 +546,9 @@ class TaskComponent extends BaseComponent {
|
|
|
539
546
|
}
|
|
540
547
|
return task;
|
|
541
548
|
}
|
|
549
|
+
async updateTaskContext(id, context) {
|
|
550
|
+
return this.store.updateTask(id, { context });
|
|
551
|
+
}
|
|
542
552
|
async createOperation(options) {
|
|
543
553
|
const createCtx = {
|
|
544
554
|
options: { ...options }
|
|
@@ -128,6 +128,16 @@ function createQueryBackgroundProcessTool(manager = null) {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
const output = task ? backgroundTaskToOutput(task) : notFoundOutput(bgProcessId);
|
|
131
|
+
if (output.alive) {
|
|
132
|
+
try {
|
|
133
|
+
const activity = await manager.getSubSessionActivity?.(bgProcessId);
|
|
134
|
+
if (activity) {
|
|
135
|
+
output.lastUpdatedAt = Math.max(output.lastUpdatedAt, activity.updatedAt);
|
|
136
|
+
output.messageCount = activity.messageCount;
|
|
137
|
+
output.subSessionUpdatedAt = activity.updatedAt;
|
|
138
|
+
}
|
|
139
|
+
} catch {}
|
|
140
|
+
}
|
|
131
141
|
return {
|
|
132
142
|
success: true,
|
|
133
143
|
output: JSON.stringify(output, null, 2),
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// src/env/task/tools/completion-copy.ts
|
|
2
|
+
var TASK_COMPLETE_ITEM_BY_ITEM = "按子项逐条验收";
|
|
3
|
+
var TASK_COMPLETION_HINT_ANCHOR = "TASK_COMPLETION_HINT";
|
|
4
|
+
var TASK_COMPLETE_VERIFY_DUTY = "核实义务";
|
|
5
|
+
|
|
6
|
+
export { TASK_COMPLETE_ITEM_BY_ITEM, TASK_COMPLETION_HINT_ANCHOR, TASK_COMPLETE_VERIFY_DUTY };
|