@ai-setting/roy-agent-core 1.5.63 → 1.5.64
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/index.js +2 -2
- package/dist/env/prompt/index.js +1 -1
- package/dist/env/task/delegate/index.js +1 -1
- package/dist/env/task/index.js +2 -2
- package/dist/index.js +3 -3
- package/dist/shared/@ai-setting/{roy-agent-core-k4x06z7h.js → roy-agent-core-eq52jra7.js} +1 -1
- package/dist/shared/@ai-setting/{roy-agent-core-8am1xdvb.js → roy-agent-core-hfc3hzcj.js} +7 -3
- package/dist/shared/@ai-setting/{roy-agent-core-dfyzqcw5.js → roy-agent-core-z2fxjh6k.js} +1 -1
- package/package.json +1 -1
package/dist/env/index.js
CHANGED
|
@@ -43,9 +43,9 @@ import"../shared/@ai-setting/roy-agent-core-ecaptews.js";
|
|
|
43
43
|
import"../shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
44
44
|
import {
|
|
45
45
|
TaskComponent
|
|
46
|
-
} from "../shared/@ai-setting/roy-agent-core-
|
|
46
|
+
} from "../shared/@ai-setting/roy-agent-core-z2fxjh6k.js";
|
|
47
47
|
import"../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
48
|
-
import"../shared/@ai-setting/roy-agent-core-
|
|
48
|
+
import"../shared/@ai-setting/roy-agent-core-eq52jra7.js";
|
|
49
49
|
import"../shared/@ai-setting/roy-agent-core-cgq7btak.js";
|
|
50
50
|
import"../shared/@ai-setting/roy-agent-core-nx3c3ce2.js";
|
|
51
51
|
import {
|
package/dist/env/prompt/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PromptConfigSchema,
|
|
4
4
|
PromptPathSchema,
|
|
5
5
|
PromptRenderer
|
|
6
|
-
} from "../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../shared/@ai-setting/roy-agent-core-hfc3hzcj.js";
|
|
7
7
|
import"../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
8
8
|
import"../../shared/@ai-setting/roy-agent-core-qxhq8ven.js";
|
|
9
9
|
import"../../shared/@ai-setting/roy-agent-core-rgckng3p.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
BackgroundTaskManager,
|
|
4
4
|
createDelegateTool,
|
|
5
5
|
createStopTool
|
|
6
|
-
} from "../../../shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "../../../shared/@ai-setting/roy-agent-core-eq52jra7.js";
|
|
7
7
|
import"../../../shared/@ai-setting/roy-agent-core-nx3c3ce2.js";
|
|
8
8
|
import"../../../shared/@ai-setting/roy-agent-core-qxnbvgwe.js";
|
|
9
9
|
import"../../../shared/@ai-setting/roy-agent-core-92z6t4he.js";
|
package/dist/env/task/index.js
CHANGED
|
@@ -5,11 +5,11 @@ 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-z2fxjh6k.js";
|
|
9
9
|
import {
|
|
10
10
|
TaskEntityEventTypes
|
|
11
11
|
} from "../../shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
12
|
-
import"../../shared/@ai-setting/roy-agent-core-
|
|
12
|
+
import"../../shared/@ai-setting/roy-agent-core-eq52jra7.js";
|
|
13
13
|
import {
|
|
14
14
|
SQLiteTaskStore,
|
|
15
15
|
getDefaultTaskDbPath
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
PromptStore,
|
|
4
4
|
getBuiltInPrompt,
|
|
5
5
|
getBuiltInPromptNames
|
|
6
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
6
|
+
} from "./shared/@ai-setting/roy-agent-core-hfc3hzcj.js";
|
|
7
7
|
import {
|
|
8
8
|
LLMComponent,
|
|
9
9
|
LLMConfigSchema,
|
|
@@ -128,9 +128,9 @@ import {
|
|
|
128
128
|
} from "./shared/@ai-setting/roy-agent-core-e25xkv53.js";
|
|
129
129
|
import {
|
|
130
130
|
TaskComponent
|
|
131
|
-
} from "./shared/@ai-setting/roy-agent-core-
|
|
131
|
+
} from "./shared/@ai-setting/roy-agent-core-z2fxjh6k.js";
|
|
132
132
|
import"./shared/@ai-setting/roy-agent-core-8gxth0eh.js";
|
|
133
|
-
import"./shared/@ai-setting/roy-agent-core-
|
|
133
|
+
import"./shared/@ai-setting/roy-agent-core-eq52jra7.js";
|
|
134
134
|
import {
|
|
135
135
|
SQLiteTaskStore,
|
|
136
136
|
getDefaultTaskDbPath
|
|
@@ -209,7 +209,7 @@ var DelegateToolParameters = z.object({
|
|
|
209
209
|
subagent_type: z.string().describe("The type of specialized agent to use for this task").default("general"),
|
|
210
210
|
timeout: z.number().describe("Task timeout in milliseconds. Default: 1800000 (30 minutes). If set, task will be terminated after timeout.").optional(),
|
|
211
211
|
reason: z.string().describe("Brief reason for calling this tool (max 30 chars, e.g., 'Delegate refactor task')").optional(),
|
|
212
|
-
similar_task_ids: z.array(z.number()).max(3).
|
|
212
|
+
similar_task_ids: z.array(z.number()).max(3).describe("Similar task IDs (max 3) to reference for improving task execution. Search for similar tasks before calling this tool.")
|
|
213
213
|
});
|
|
214
214
|
var DEFAULT_TIMEOUT = 1800000;
|
|
215
215
|
var PROGRESS_INTERVAL = 120000;
|
|
@@ -130,6 +130,8 @@ var builtInPrompts = {
|
|
|
130
130
|
|
|
131
131
|
**\`delegate_task\`** — 这是你的**主要执行工具**。用于一切复杂、多步骤、需要读文件、运行命令、代码分析、搜索、实现功能等场景。**当不确定用哪个时,选 \`delegate_task\`。**
|
|
132
132
|
|
|
133
|
+
> **similar_task_ids 是必填参数**:每次调用 \`delegate_task\` 前,必须先使用 \`task_search\` 搜索与当前任务相似的历史任务,将找到的相似任务 ID 填入 \`similar_task_ids\` 参数(最多 3 个)。如果没有找到相似任务,传入空数组 \`similar_task_ids=[]\`。
|
|
134
|
+
|
|
133
135
|
**\`bash\`** — **仅限**以下**一次性简单操作**:
|
|
134
136
|
- 调用一行 \`roy-agent\` 命令(如 \`bun packages/cli/dist/bin/roy-agent.js tasks list\`)
|
|
135
137
|
- 执行一个简单的 shell 命令(如 \`ls\`、\`echo hello\`)
|
|
@@ -184,7 +186,8 @@ delegate_task(
|
|
|
184
186
|
prompt="详细说明。
|
|
185
187
|
|
|
186
188
|
重要:遵循任务作为一等公民原则 — 使用 \`task_create\` 创建任务,使用 \`task_update\` 跟踪进度,使用 \`task_operation_create\` 记录里程碑,并使用 \`task_complete\` 完成任务。",
|
|
187
|
-
subagent_type="roy"
|
|
189
|
+
subagent_type="roy",
|
|
190
|
+
similar_task_ids=[] // 必填:先使用 task_search 搜索相似任务,将找到的 ID 填入此处(最多 3 个)
|
|
188
191
|
)
|
|
189
192
|
\`\`\`
|
|
190
193
|
|
|
@@ -206,7 +209,8 @@ delegate_task(
|
|
|
206
209
|
prompt="详细说明。
|
|
207
210
|
|
|
208
211
|
重要:遵循任务作为一等公民原则 — 使用 \`task_create\` 创建任务,使用 \`task_update\` 跟踪进度,使用 \`task_operation_create\` 记录里程碑,并使用 \`task_complete\` 完成任务。",
|
|
209
|
-
subagent_type="strict-task-agent"
|
|
212
|
+
subagent_type="strict-task-agent",
|
|
213
|
+
similar_task_ids=[] // 必填:先使用 task_search 搜索相似任务,将找到的 ID 填入此处(最多 3 个)
|
|
210
214
|
)
|
|
211
215
|
\`\`\`
|
|
212
216
|
|
|
@@ -215,7 +219,7 @@ delegate_task(
|
|
|
215
219
|
1. **理解** — 用户到底想要什么?
|
|
216
220
|
2. **分类** — 如果需要任何超出简单对话的操作 → 委托。如果是问候/一次性回答 → 直接回复。
|
|
217
221
|
3. **选择智能体** — \`roy\`(默认)或 \`strict-task-agent\`(需要严格验证时)
|
|
218
|
-
4.
|
|
222
|
+
4. **搜索相似任务并委托** — 在委托前,先使用 \`task_search\` 搜索与当前请求相关的历史任务,将找到的相似任务 ID 填入 \`similar_task_ids\` 参数。在给子智能体的提示词中,始终包含简要指令,要求将工作视为任务一等公民:创建任务(\`task_create\`)、跟踪进度并完成。
|
|
219
223
|
5. **汇报结果** — 向用户总结结果
|
|
220
224
|
|
|
221
225
|
## 行为规则
|