@downcity/plugins 1.0.147 → 1.0.148
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/bin/asr/Plugin.js +8 -8
- package/bin/asr/Plugin.js.map +1 -1
- package/bin/auth/types/AuthPlugin.js +3 -3
- package/bin/auth/types/AuthPlugin.js.map +1 -1
- package/bin/chat/PROMPT.direct.d.ts +1 -1
- package/bin/chat/PROMPT.direct.d.ts.map +1 -1
- package/bin/chat/PROMPT.direct.js +1 -1
- package/bin/chat/PROMPT.direct.js.map +1 -1
- package/bin/chat/channels/feishu/PROMPT.direct.d.ts +1 -1
- package/bin/chat/channels/feishu/PROMPT.direct.d.ts.map +1 -1
- package/bin/chat/channels/feishu/PROMPT.direct.js +1 -1
- package/bin/chat/channels/feishu/PROMPT.direct.js.map +1 -1
- package/bin/chat/channels/qq/PROMPT.direct.d.ts +1 -1
- package/bin/chat/channels/qq/PROMPT.direct.d.ts.map +1 -1
- package/bin/chat/channels/qq/PROMPT.direct.js +1 -1
- package/bin/chat/channels/qq/PROMPT.direct.js.map +1 -1
- package/bin/chat/runtime/ChatAuthorizationRuntime.js +5 -5
- package/bin/chat/runtime/ChatAuthorizationRuntime.js.map +1 -1
- package/bin/chat/runtime/ChatPluginActionRegistry.js +61 -61
- package/bin/chat/runtime/ChatPluginActionRegistry.js.map +1 -1
- package/bin/contact/Action.js +48 -48
- package/bin/contact/Action.js.map +1 -1
- package/bin/contact/PROMPT.d.ts +1 -1
- package/bin/contact/PROMPT.d.ts.map +1 -1
- package/bin/contact/PROMPT.js +1 -1
- package/bin/contact/PROMPT.js.map +1 -1
- package/bin/image/ImagePlugin.js +21 -21
- package/bin/image/ImagePlugin.js.map +1 -1
- package/bin/memory/MemoryPlugin.js +50 -50
- package/bin/memory/MemoryPlugin.js.map +1 -1
- package/bin/skill/PROMPT.d.ts +1 -1
- package/bin/skill/PROMPT.d.ts.map +1 -1
- package/bin/skill/PROMPT.js +1 -1
- package/bin/skill/PROMPT.js.map +1 -1
- package/bin/skill/Plugin.js +23 -23
- package/bin/skill/Plugin.js.map +1 -1
- package/bin/task/Action.js +1 -1
- package/bin/task/Action.js.map +1 -1
- package/bin/task/PROMPT.d.ts +1 -1
- package/bin/task/PROMPT.d.ts.map +1 -1
- package/bin/task/PROMPT.js +1 -1
- package/bin/task/PROMPT.js.map +1 -1
- package/bin/task/runtime/Runner.js +2 -2
- package/bin/task/runtime/Runner.js.map +1 -1
- package/bin/task/runtime/TaskPluginActionRegistry.js +73 -73
- package/bin/task/runtime/TaskPluginActionRegistry.js.map +1 -1
- package/bin/task/runtime/TaskRunnerProgress.js +1 -1
- package/bin/task/runtime/TaskRunnerProgress.js.map +1 -1
- package/bin/task/runtime/TaskRunnerScript.js +3 -3
- package/bin/task/runtime/TaskRunnerScript.js.map +1 -1
- package/bin/tts/Plugin.js +7 -7
- package/bin/tts/Plugin.js.map +1 -1
- package/bin/web/PROMPT.d.ts +1 -1
- package/bin/web/PROMPT.d.ts.map +1 -1
- package/bin/web/PROMPT.js +1 -1
- package/bin/web/PROMPT.js.map +1 -1
- package/bin/web/Plugin.js +8 -8
- package/bin/web/Plugin.js.map +1 -1
- package/bin/workboard/Plugin.js +2 -2
- package/bin/workboard/Plugin.js.map +1 -1
- package/bin/workboard/runtime/Normalizer.js +1 -1
- package/bin/workboard/runtime/Normalizer.js.map +1 -1
- package/package.json +2 -2
- package/src/asr/Plugin.ts +8 -8
- package/src/auth/types/AuthPlugin.ts +3 -3
- package/src/chat/PROMPT.direct.ts +1 -1
- package/src/chat/PROMPT.direct.ts.txt +32 -32
- package/src/chat/channels/feishu/PROMPT.direct.ts +1 -1
- package/src/chat/channels/feishu/PROMPT.direct.ts.txt +2 -2
- package/src/chat/channels/qq/PROMPT.direct.ts +1 -1
- package/src/chat/channels/qq/PROMPT.direct.ts.txt +11 -9
- package/src/chat/runtime/ChatAuthorizationRuntime.ts +5 -5
- package/src/chat/runtime/ChatPluginActionRegistry.ts +61 -61
- package/src/contact/Action.ts +48 -48
- package/src/contact/PROMPT.ts +1 -1
- package/src/contact/PROMPT.ts.txt +22 -22
- package/src/image/ImagePlugin.ts +21 -21
- package/src/memory/MemoryPlugin.ts +50 -50
- package/src/skill/PROMPT.ts +1 -1
- package/src/skill/PROMPT.ts.txt +5 -6
- package/src/skill/Plugin.ts +23 -23
- package/src/task/Action.ts +1 -1
- package/src/task/PROMPT.ts +1 -1
- package/src/task/PROMPT.ts.txt +159 -159
- package/src/task/runtime/Runner.ts +2 -2
- package/src/task/runtime/TaskPluginActionRegistry.ts +73 -73
- package/src/task/runtime/TaskRunnerProgress.ts +1 -1
- package/src/task/runtime/TaskRunnerScript.ts +3 -3
- package/src/tts/Plugin.ts +7 -7
- package/src/web/PROMPT.ts +1 -1
- package/src/web/PROMPT.ts.txt +31 -31
- package/src/web/Plugin.ts +8 -8
- package/src/workboard/Plugin.ts +2 -2
- package/src/workboard/runtime/Normalizer.ts +1 -1
|
@@ -93,7 +93,7 @@ export function createTaskPluginActions(params: {
|
|
|
93
93
|
}): PluginActions {
|
|
94
94
|
return {
|
|
95
95
|
list: createAction({
|
|
96
|
-
description: "
|
|
96
|
+
description: "List task definitions, optionally filtered by status.",
|
|
97
97
|
input_schema: {
|
|
98
98
|
zod: TASK_LIST_SCHEMA,
|
|
99
99
|
json_schema: {
|
|
@@ -102,21 +102,21 @@ export function createTaskPluginActions(params: {
|
|
|
102
102
|
status: {
|
|
103
103
|
type: "string",
|
|
104
104
|
enum: ["enabled", "paused", "disabled"],
|
|
105
|
-
description: "
|
|
105
|
+
description: "Filter by task status.",
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
108
|
},
|
|
109
109
|
},
|
|
110
110
|
examples: [
|
|
111
|
-
{ title: "
|
|
112
|
-
{ title: "
|
|
111
|
+
{ title: "All tasks", payload: {} },
|
|
112
|
+
{ title: "Enabled only", payload: { status: "enabled" } },
|
|
113
113
|
],
|
|
114
114
|
command: {
|
|
115
|
-
description: "
|
|
115
|
+
description: "List tasks.",
|
|
116
116
|
configure(command: Command) {
|
|
117
117
|
command.option(
|
|
118
118
|
"--status <status>",
|
|
119
|
-
"
|
|
119
|
+
"Filter by status (enabled|paused|disabled).",
|
|
120
120
|
);
|
|
121
121
|
},
|
|
122
122
|
mapInput: mapTaskListCommandPayload,
|
|
@@ -129,61 +129,61 @@ export function createTaskPluginActions(params: {
|
|
|
129
129
|
},
|
|
130
130
|
}),
|
|
131
131
|
create: createAction({
|
|
132
|
-
description: "
|
|
132
|
+
description: "Create a task definition.",
|
|
133
133
|
input_schema: {
|
|
134
134
|
zod: TASK_CREATE_SCHEMA,
|
|
135
135
|
json_schema: {
|
|
136
136
|
type: "object",
|
|
137
137
|
required: ["title", "when", "description", "sessionId"],
|
|
138
138
|
properties: {
|
|
139
|
-
title: { type: "string", description: "
|
|
140
|
-
when: { type: "string", description: "
|
|
141
|
-
description: { type: "string", description: "
|
|
142
|
-
sessionId: { type: "string", description: "
|
|
143
|
-
kind: { type: "string", enum: ["agent", "script"], description: "
|
|
144
|
-
review: { type: "boolean", description: "
|
|
145
|
-
status: { type: "string", enum: ["enabled", "paused", "disabled"], description: "
|
|
146
|
-
body: { type: "string", description: "
|
|
147
|
-
overwrite: { type: "boolean", description: "
|
|
139
|
+
title: { type: "string", description: "Task name and unique semantic identifier." },
|
|
140
|
+
when: { type: "string", description: "Trigger condition (@manual | cron | time:ISO8601)." },
|
|
141
|
+
description: { type: "string", description: "Task description." },
|
|
142
|
+
sessionId: { type: "string", description: "Task execution sessionId." },
|
|
143
|
+
kind: { type: "string", enum: ["agent", "script"], description: "Execution kind." },
|
|
144
|
+
review: { type: "boolean", description: "Whether to enable multi-turn review." },
|
|
145
|
+
status: { type: "string", enum: ["enabled", "paused", "disabled"], description: "Task status." },
|
|
146
|
+
body: { type: "string", description: "Task body." },
|
|
147
|
+
overwrite: { type: "boolean", description: "Whether to overwrite an existing task.md." },
|
|
148
148
|
},
|
|
149
149
|
},
|
|
150
150
|
},
|
|
151
151
|
examples: [
|
|
152
152
|
{
|
|
153
|
-
title: "
|
|
153
|
+
title: "Create a manual task",
|
|
154
154
|
payload: {
|
|
155
155
|
title: "daily-report",
|
|
156
156
|
when: "@manual",
|
|
157
|
-
description: "
|
|
157
|
+
description: "Generate a daily report",
|
|
158
158
|
sessionId: "session-1",
|
|
159
159
|
status: "enabled",
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
],
|
|
163
163
|
command: {
|
|
164
|
-
description: "
|
|
164
|
+
description: "Create a task definition.",
|
|
165
165
|
configure(command: Command) {
|
|
166
166
|
command
|
|
167
|
-
.requiredOption("--title <title>", "
|
|
168
|
-
.requiredOption("--description <description>", "
|
|
169
|
-
.option("--when <when>", "
|
|
170
|
-
.option("--kind <kind>", "
|
|
171
|
-
.option("--review <review>", "
|
|
167
|
+
.requiredOption("--title <title>", "Task name and unique semantic identifier.")
|
|
168
|
+
.requiredOption("--description <description>", "Task description.")
|
|
169
|
+
.option("--when <when>", "Trigger condition (@manual | cron | time:ISO8601).", "@manual")
|
|
170
|
+
.option("--kind <kind>", "Execution kind (agent|script).", "agent")
|
|
171
|
+
.option("--review <review>", "Whether to enable multi-turn review (true|false).")
|
|
172
172
|
.option(
|
|
173
173
|
"--session-id <sessionId>",
|
|
174
|
-
"
|
|
174
|
+
"Task execution sessionId. If omitted, DC_SESSION_ID is used when available.",
|
|
175
175
|
)
|
|
176
176
|
.option(
|
|
177
177
|
"--status <status>",
|
|
178
|
-
"
|
|
178
|
+
"Status (enabled|paused|disabled, default enabled).",
|
|
179
179
|
)
|
|
180
180
|
.option(
|
|
181
181
|
"--activate",
|
|
182
|
-
"
|
|
182
|
+
"Enable immediately after creation (same as --status enabled).",
|
|
183
183
|
false,
|
|
184
184
|
)
|
|
185
|
-
.option("--body <body>", "
|
|
186
|
-
.option("--overwrite", "
|
|
185
|
+
.option("--body <body>", "Task body.")
|
|
186
|
+
.option("--overwrite", "Overwrite an existing task.md.", false);
|
|
187
187
|
},
|
|
188
188
|
mapInput: mapTaskCreateCommandPayload,
|
|
189
189
|
},
|
|
@@ -196,25 +196,25 @@ export function createTaskPluginActions(params: {
|
|
|
196
196
|
},
|
|
197
197
|
}),
|
|
198
198
|
run: createAction({
|
|
199
|
-
description: "
|
|
199
|
+
description: "Run a task manually.",
|
|
200
200
|
input_schema: {
|
|
201
201
|
zod: TASK_RUN_SCHEMA,
|
|
202
202
|
json_schema: {
|
|
203
203
|
type: "object",
|
|
204
204
|
required: ["title"],
|
|
205
205
|
properties: {
|
|
206
|
-
title: { type: "string", description: "
|
|
207
|
-
reason: { type: "string", description: "
|
|
206
|
+
title: { type: "string", description: "Task name." },
|
|
207
|
+
reason: { type: "string", description: "Reason for manual run." },
|
|
208
208
|
},
|
|
209
209
|
},
|
|
210
210
|
},
|
|
211
|
-
examples: [{ title: "
|
|
211
|
+
examples: [{ title: "Manual run", payload: { title: "daily-report" } }],
|
|
212
212
|
command: {
|
|
213
|
-
description: "
|
|
213
|
+
description: "Run a task manually.",
|
|
214
214
|
configure(command: Command) {
|
|
215
215
|
command
|
|
216
216
|
.argument("<title>")
|
|
217
|
-
.option("--reason <reason>", "
|
|
217
|
+
.option("--reason <reason>", "Reason for manual run.");
|
|
218
218
|
},
|
|
219
219
|
mapInput: mapTaskRunCommandPayload,
|
|
220
220
|
},
|
|
@@ -226,20 +226,20 @@ export function createTaskPluginActions(params: {
|
|
|
226
226
|
},
|
|
227
227
|
}),
|
|
228
228
|
delete: createAction({
|
|
229
|
-
description: "
|
|
229
|
+
description: "Delete a task definition and historical run directories.",
|
|
230
230
|
input_schema: {
|
|
231
231
|
zod: TASK_DELETE_SCHEMA,
|
|
232
232
|
json_schema: {
|
|
233
233
|
type: "object",
|
|
234
234
|
required: ["title"],
|
|
235
235
|
properties: {
|
|
236
|
-
title: { type: "string", description: "
|
|
236
|
+
title: { type: "string", description: "Task name." },
|
|
237
237
|
},
|
|
238
238
|
},
|
|
239
239
|
},
|
|
240
|
-
examples: [{ title: "
|
|
240
|
+
examples: [{ title: "Delete task", payload: { title: "daily-report" } }],
|
|
241
241
|
command: {
|
|
242
|
-
description: "
|
|
242
|
+
description: "Delete a task definition and historical run directories.",
|
|
243
243
|
configure(command: Command) {
|
|
244
244
|
command.argument("<title>");
|
|
245
245
|
},
|
|
@@ -254,53 +254,53 @@ export function createTaskPluginActions(params: {
|
|
|
254
254
|
},
|
|
255
255
|
}),
|
|
256
256
|
update: createAction({
|
|
257
|
-
description: "
|
|
257
|
+
description: "Update a task definition.",
|
|
258
258
|
input_schema: {
|
|
259
259
|
zod: TASK_UPDATE_SCHEMA,
|
|
260
260
|
json_schema: {
|
|
261
261
|
type: "object",
|
|
262
262
|
required: ["title"],
|
|
263
263
|
properties: {
|
|
264
|
-
title: { type: "string", description: "
|
|
265
|
-
titleNext: { type: "string", description: "
|
|
266
|
-
when: { type: "string", description: "
|
|
267
|
-
clearWhen: { type: "boolean", description: "
|
|
268
|
-
description: { type: "string", description: "
|
|
269
|
-
sessionId: { type: "string", description: "
|
|
264
|
+
title: { type: "string", description: "Current task name." },
|
|
265
|
+
titleNext: { type: "string", description: "New task name." },
|
|
266
|
+
when: { type: "string", description: "New trigger condition." },
|
|
267
|
+
clearWhen: { type: "boolean", description: "Whether to clear the trigger condition." },
|
|
268
|
+
description: { type: "string", description: "New description." },
|
|
269
|
+
sessionId: { type: "string", description: "New sessionId." },
|
|
270
270
|
kind: { type: "string", enum: ["agent", "script"] },
|
|
271
271
|
review: { type: "boolean" },
|
|
272
272
|
status: { type: "string", enum: ["enabled", "paused", "disabled"] },
|
|
273
|
-
body: { type: "string", description: "
|
|
274
|
-
clearBody: { type: "boolean", description: "
|
|
273
|
+
body: { type: "string", description: "New body." },
|
|
274
|
+
clearBody: { type: "boolean", description: "Whether to clear the body." },
|
|
275
275
|
},
|
|
276
276
|
},
|
|
277
277
|
},
|
|
278
278
|
examples: [
|
|
279
279
|
{
|
|
280
|
-
title: "
|
|
280
|
+
title: "Update trigger",
|
|
281
281
|
payload: { title: "daily-report", when: "cron:0 9 * * *" },
|
|
282
282
|
},
|
|
283
283
|
],
|
|
284
284
|
command: {
|
|
285
|
-
description: "
|
|
285
|
+
description: "Update a task definition.",
|
|
286
286
|
configure(command: Command) {
|
|
287
287
|
command
|
|
288
288
|
.argument("<title>")
|
|
289
|
-
.option("--title <title>", "
|
|
290
|
-
.option("--description <description>", "
|
|
291
|
-
.option("--when <when>", "
|
|
292
|
-
.option("--kind <kind>", "
|
|
293
|
-
.option("--review <review>", "
|
|
294
|
-
.option("--clear-when", "
|
|
295
|
-
.option("--session-id <sessionId>", "
|
|
296
|
-
.option("--status <status>", "
|
|
289
|
+
.option("--title <title>", "Task name while preserving the same semantics.")
|
|
290
|
+
.option("--description <description>", "Task description.")
|
|
291
|
+
.option("--when <when>", "Trigger condition (@manual | cron | time:ISO8601).")
|
|
292
|
+
.option("--kind <kind>", "Execution kind (agent|script).")
|
|
293
|
+
.option("--review <review>", "Whether to enable multi-turn review (true|false).")
|
|
294
|
+
.option("--clear-when", "Clear when and fall back to @manual.", false)
|
|
295
|
+
.option("--session-id <sessionId>", "Task execution sessionId.")
|
|
296
|
+
.option("--status <status>", "Status (enabled|paused|disabled).")
|
|
297
297
|
.option(
|
|
298
298
|
"--activate",
|
|
299
|
-
"
|
|
299
|
+
"Enable immediately after update (same as --status enabled).",
|
|
300
300
|
false,
|
|
301
301
|
)
|
|
302
|
-
.option("--body <body>", "
|
|
303
|
-
.option("--clear-body", "
|
|
302
|
+
.option("--body <body>", "Set task body.")
|
|
303
|
+
.option("--clear-body", "Clear task body.", false);
|
|
304
304
|
},
|
|
305
305
|
mapInput: mapTaskUpdateCommandPayload,
|
|
306
306
|
},
|
|
@@ -313,23 +313,23 @@ export function createTaskPluginActions(params: {
|
|
|
313
313
|
},
|
|
314
314
|
}),
|
|
315
315
|
status: createAction({
|
|
316
|
-
description: "
|
|
316
|
+
description: "Set task status (enabled|paused|disabled).",
|
|
317
317
|
input_schema: {
|
|
318
318
|
zod: TASK_STATUS_REQ_SCHEMA,
|
|
319
319
|
json_schema: {
|
|
320
320
|
type: "object",
|
|
321
321
|
required: ["title", "status"],
|
|
322
322
|
properties: {
|
|
323
|
-
title: { type: "string", description: "
|
|
323
|
+
title: { type: "string", description: "Task name." },
|
|
324
324
|
status: { type: "string", enum: ["enabled", "paused", "disabled"] },
|
|
325
325
|
},
|
|
326
326
|
},
|
|
327
327
|
},
|
|
328
328
|
examples: [
|
|
329
|
-
{ title: "
|
|
329
|
+
{ title: "Pause task", payload: { title: "daily-report", status: "paused" } },
|
|
330
330
|
],
|
|
331
331
|
command: {
|
|
332
|
-
description: "
|
|
332
|
+
description: "Set task status (enabled|paused|disabled).",
|
|
333
333
|
configure(command: Command) {
|
|
334
334
|
command.argument("<title>").argument("<status>");
|
|
335
335
|
},
|
|
@@ -344,18 +344,18 @@ export function createTaskPluginActions(params: {
|
|
|
344
344
|
},
|
|
345
345
|
}),
|
|
346
346
|
enable: createAction({
|
|
347
|
-
description: "
|
|
347
|
+
description: "Enable a task (status=enabled).",
|
|
348
348
|
input_schema: {
|
|
349
349
|
zod: z.object({ title: z.string() }),
|
|
350
350
|
json_schema: {
|
|
351
351
|
type: "object",
|
|
352
352
|
required: ["title"],
|
|
353
|
-
properties: { title: { type: "string", description: "
|
|
353
|
+
properties: { title: { type: "string", description: "Task name." } },
|
|
354
354
|
},
|
|
355
355
|
},
|
|
356
|
-
examples: [{ title: "
|
|
356
|
+
examples: [{ title: "Enable", payload: { title: "daily-report" } }],
|
|
357
357
|
command: {
|
|
358
|
-
description: "
|
|
358
|
+
description: "Enable a task (status=enabled).",
|
|
359
359
|
configure(command: Command) {
|
|
360
360
|
command.argument("<title>");
|
|
361
361
|
},
|
|
@@ -370,18 +370,18 @@ export function createTaskPluginActions(params: {
|
|
|
370
370
|
},
|
|
371
371
|
}),
|
|
372
372
|
disable: createAction({
|
|
373
|
-
description: "
|
|
373
|
+
description: "Disable a task (status=disabled).",
|
|
374
374
|
input_schema: {
|
|
375
375
|
zod: z.object({ title: z.string() }),
|
|
376
376
|
json_schema: {
|
|
377
377
|
type: "object",
|
|
378
378
|
required: ["title"],
|
|
379
|
-
properties: { title: { type: "string", description: "
|
|
379
|
+
properties: { title: { type: "string", description: "Task name." } },
|
|
380
380
|
},
|
|
381
381
|
},
|
|
382
|
-
examples: [{ title: "
|
|
382
|
+
examples: [{ title: "Disable", payload: { title: "daily-report" } }],
|
|
383
383
|
command: {
|
|
384
|
-
description: "
|
|
384
|
+
description: "Disable a task (status=disabled).",
|
|
385
385
|
configure(command: Command) {
|
|
386
386
|
command.argument("<title>");
|
|
387
387
|
},
|
|
@@ -60,7 +60,7 @@ export function createRunProgressWriter(params: {
|
|
|
60
60
|
let current: RunProgressSnapshot = {
|
|
61
61
|
status: "running",
|
|
62
62
|
phase: "preparing",
|
|
63
|
-
message: "
|
|
63
|
+
message: "Task has been awakened; preparing the execution environment.",
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
const persist = async (): Promise<void> => {
|
|
@@ -102,7 +102,7 @@ export async function runScriptTaskBranch(
|
|
|
102
102
|
await params.runProgress.update({
|
|
103
103
|
status: "running",
|
|
104
104
|
phase: "script_running",
|
|
105
|
-
message: "
|
|
105
|
+
message: "Executing script task.",
|
|
106
106
|
round: 1,
|
|
107
107
|
maxRounds: 1,
|
|
108
108
|
});
|
|
@@ -118,7 +118,7 @@ export async function runScriptTaskBranch(
|
|
|
118
118
|
await params.runProgress.update({
|
|
119
119
|
status: "running",
|
|
120
120
|
phase: "validating",
|
|
121
|
-
message: "
|
|
121
|
+
message: "Script execution completed; validating output and artifacts.",
|
|
122
122
|
round: 1,
|
|
123
123
|
maxRounds: 1,
|
|
124
124
|
});
|
|
@@ -141,7 +141,7 @@ export async function runScriptTaskBranch(
|
|
|
141
141
|
await params.runProgress.update({
|
|
142
142
|
status: "running",
|
|
143
143
|
phase: "validating",
|
|
144
|
-
message: "
|
|
144
|
+
message: "Output validation failed; preparing failure artifacts.",
|
|
145
145
|
round: 1,
|
|
146
146
|
maxRounds: 1,
|
|
147
147
|
});
|
package/src/tts/Plugin.ts
CHANGED
|
@@ -247,18 +247,18 @@ export class TtsPlugin extends BasePlugin {
|
|
|
247
247
|
type: "object",
|
|
248
248
|
required: ["text"],
|
|
249
249
|
properties: {
|
|
250
|
-
text: { type: "string", description: "
|
|
251
|
-
language: { type: "string", description: "
|
|
252
|
-
voice: { type: "string", description: "
|
|
253
|
-
format: { type: "string", description: "
|
|
254
|
-
speed: { type: "number", description: "
|
|
250
|
+
text: { type: "string", description: "Text to synthesize." },
|
|
251
|
+
language: { type: "string", description: "Language code, optional." },
|
|
252
|
+
voice: { type: "string", description: "Voice, optional." },
|
|
253
|
+
format: { type: "string", description: "Audio format, optional." },
|
|
254
|
+
speed: { type: "number", description: "Speech speed, optional." },
|
|
255
255
|
},
|
|
256
256
|
},
|
|
257
257
|
},
|
|
258
258
|
examples: [
|
|
259
|
-
{ title: "
|
|
259
|
+
{ title: "Default voice", payload: { text: "Hello, world" } },
|
|
260
260
|
{
|
|
261
|
-
title: "
|
|
261
|
+
title: "Specific voice",
|
|
262
262
|
payload: { text: "Welcome back", voice: "alloy", format: "mp3" },
|
|
263
263
|
},
|
|
264
264
|
],
|
package/src/web/PROMPT.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Source: src/web/PROMPT.ts.txt
|
|
7
|
-
const TEXT_MODULE_CONTENT = "# Web Plugin\n\
|
|
7
|
+
const TEXT_MODULE_CONTENT = "# Web Plugin\n\nThis plugin injects general web-access methodology. It does not choose a provider and does not guarantee that any specific web tool exists.\n\nIf web-related dependencies are needed, use the `web` plugin's `install` action to install capabilities such as `web-access`, `agent-browser`, or related skill/CLI dependencies. Installation only prepares capabilities; it does not mean the runtime must use a specific provider.\n\nWhen a task needs internet access, verification, webpage reading, webpage interaction, or browser use, choose the path based on the currently available tools, skills, and user goal.\n\n## General Principles\n\n- Goal-driven: think like a human. Define the success criteria first, then choose the starting point most likely to reach them directly.\n- Evidence at every step: each result is evidence. When a path stops making progress, switch methods instead of repeatedly retrying the wrong approach.\n- Prefer primary sources: search engines are for discovery. Conclusions should usually trace back to official sites, official platforms, original pages, official docs, or source code.\n- Stop when done: once the goal is reached, do not spend extra steps just to look more complete.\n- Capability self-check: do not assume that a web skill or tool exists. Prefer capabilities explicitly available in the current system/tool list or in already looked-up skills.\n\n## Tool Selection\n\n- To discover sources or map keyword context: prefer currently available search tools or web-access-style skills.\n- For a known URL where you need page text or a direct answer: prefer currently available fetch/read tools.\n- For a known URL where you need raw HTML, meta tags, JSON-LD, or similar structured content: prefer currently available HTTP/curl/shell capabilities.\n- For logged-in state, dynamic rendering, site navigation, complex interactions, or anti-bot pages: prefer currently available browser, Chrome, agent-browser, or computer-use capabilities.\n- Jina-style markdown preprocessing may help for article-like pages and save tokens, but do not blindly trust it for dashboards, product pages, or complex layouts.\n\n## Browser Strategy\n\n- Once in the browser layer, understand the page structure before choosing the next action.\n- Programmatic methods are faster but more likely to trigger anti-bot behavior. GUI interaction is slower but more deterministic. If programmatic access is blocked, fall back to GUI.\n- Prefer links generated by the page itself. Do not manually guess or trim internal URL parameters.\n- Operate only tabs you created. Do not disturb the user's existing tabs. Close tabs you created when the task is done.\n- When encountering a login wall, first decide whether it actually blocks the goal. Ask the user to log in only when the target cannot be reached otherwise.\n\n## Parallelism And Verification\n\n- Independent research targets may be split and run in parallel. Targets with dependencies should not be parallelized blindly.\n- Verification tasks should return to primary sources. Do not use multiple secondary reports to circularly confirm each other.\n\n## Relationship To Skills And Tools\n\n- If the current environment has a `web-access` skill, web search, scraping, and verification tasks may prefer its instructions.\n- If the current environment has `agent-browser`, browser, or Chrome capabilities, dynamic pages and logged-in tasks may prefer them.\n- If necessary web capability is missing, state that directly. Do not pretend you have accessed the web.\n\n## Available Action\n\n- `install`: prepare web-related skill/CLI dependencies.\n\nExample:\n\n```ts\nplugin_call({\n plugin: \"web\",\n action: \"install\",\n payload: {\n target: \"agent-browser\",\n scope: \"user\",\n },\n});\n```\n";
|
|
8
8
|
|
|
9
9
|
export default TEXT_MODULE_CONTENT;
|
package/src/web/PROMPT.ts.txt
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
# Web Plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This plugin injects general web-access methodology. It does not choose a provider and does not guarantee that any specific web tool exists.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
If web-related dependencies are needed, use the `web` plugin's `install` action to install capabilities such as `web-access`, `agent-browser`, or related skill/CLI dependencies. Installation only prepares capabilities; it does not mean the runtime must use a specific provider.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
When a task needs internet access, verification, webpage reading, webpage interaction, or browser use, choose the path based on the currently available tools, skills, and user goal.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## General Principles
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
11
|
+
- Goal-driven: think like a human. Define the success criteria first, then choose the starting point most likely to reach them directly.
|
|
12
|
+
- Evidence at every step: each result is evidence. When a path stops making progress, switch methods instead of repeatedly retrying the wrong approach.
|
|
13
|
+
- Prefer primary sources: search engines are for discovery. Conclusions should usually trace back to official sites, official platforms, original pages, official docs, or source code.
|
|
14
|
+
- Stop when done: once the goal is reached, do not spend extra steps just to look more complete.
|
|
15
|
+
- Capability self-check: do not assume that a web skill or tool exists. Prefer capabilities explicitly available in the current system/tool list or in already looked-up skills.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Tool Selection
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
19
|
+
- To discover sources or map keyword context: prefer currently available search tools or web-access-style skills.
|
|
20
|
+
- For a known URL where you need page text or a direct answer: prefer currently available fetch/read tools.
|
|
21
|
+
- For a known URL where you need raw HTML, meta tags, JSON-LD, or similar structured content: prefer currently available HTTP/curl/shell capabilities.
|
|
22
|
+
- For logged-in state, dynamic rendering, site navigation, complex interactions, or anti-bot pages: prefer currently available browser, Chrome, agent-browser, or computer-use capabilities.
|
|
23
|
+
- Jina-style markdown preprocessing may help for article-like pages and save tokens, but do not blindly trust it for dashboards, product pages, or complex layouts.
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Browser Strategy
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
27
|
+
- Once in the browser layer, understand the page structure before choosing the next action.
|
|
28
|
+
- Programmatic methods are faster but more likely to trigger anti-bot behavior. GUI interaction is slower but more deterministic. If programmatic access is blocked, fall back to GUI.
|
|
29
|
+
- Prefer links generated by the page itself. Do not manually guess or trim internal URL parameters.
|
|
30
|
+
- Operate only tabs you created. Do not disturb the user's existing tabs. Close tabs you created when the task is done.
|
|
31
|
+
- When encountering a login wall, first decide whether it actually blocks the goal. Ask the user to log in only when the target cannot be reached otherwise.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Parallelism And Verification
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
35
|
+
- Independent research targets may be split and run in parallel. Targets with dependencies should not be parallelized blindly.
|
|
36
|
+
- Verification tasks should return to primary sources. Do not use multiple secondary reports to circularly confirm each other.
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Relationship To Skills And Tools
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
40
|
+
- If the current environment has a `web-access` skill, web search, scraping, and verification tasks may prefer its instructions.
|
|
41
|
+
- If the current environment has `agent-browser`, browser, or Chrome capabilities, dynamic pages and logged-in tasks may prefer them.
|
|
42
|
+
- If necessary web capability is missing, state that directly. Do not pretend you have accessed the web.
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Available Action
|
|
45
45
|
|
|
46
|
-
- `install
|
|
46
|
+
- `install`: prepare web-related skill/CLI dependencies.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Example:
|
|
49
49
|
|
|
50
50
|
```ts
|
|
51
51
|
plugin_call({
|
package/src/web/Plugin.ts
CHANGED
|
@@ -93,7 +93,7 @@ export class WebPlugin extends BasePlugin {
|
|
|
93
93
|
*/
|
|
94
94
|
readonly setup = {
|
|
95
95
|
mode: "install" as const,
|
|
96
|
-
title: "
|
|
96
|
+
title: "Install web capabilities",
|
|
97
97
|
description:
|
|
98
98
|
"安装 web-access、agent-browser 等联网相关 skill / CLI 依赖;不改变 agent 的运行时默认选择。",
|
|
99
99
|
fields: [
|
|
@@ -139,7 +139,7 @@ export class WebPlugin extends BasePlugin {
|
|
|
139
139
|
*/
|
|
140
140
|
readonly actions = {
|
|
141
141
|
install: createAction({
|
|
142
|
-
description: "
|
|
142
|
+
description: "Install web-related skill / CLI dependencies (web-access, agent-browser).",
|
|
143
143
|
input_schema: {
|
|
144
144
|
zod: z.object({
|
|
145
145
|
target: z.enum(["web-access", "agent-browser", "all"]).optional(),
|
|
@@ -153,27 +153,27 @@ export class WebPlugin extends BasePlugin {
|
|
|
153
153
|
target: {
|
|
154
154
|
type: "string",
|
|
155
155
|
enum: ["web-access", "agent-browser", "all"],
|
|
156
|
-
description: "
|
|
156
|
+
description: "Web capability to install.",
|
|
157
157
|
},
|
|
158
158
|
scope: {
|
|
159
159
|
type: "string",
|
|
160
160
|
enum: ["user", "project"],
|
|
161
|
-
description: "
|
|
161
|
+
description: "Installation scope.",
|
|
162
162
|
},
|
|
163
|
-
yes: { type: "boolean", description: "
|
|
164
|
-
agent: { type: "string", description: "skill installer
|
|
163
|
+
yes: { type: "boolean", description: "Skip confirmation." },
|
|
164
|
+
agent: { type: "string", description: "Target agent for skill installer." },
|
|
165
165
|
},
|
|
166
166
|
},
|
|
167
167
|
},
|
|
168
168
|
examples: [
|
|
169
169
|
{
|
|
170
|
-
title: "
|
|
170
|
+
title: "Install all web capabilities for user",
|
|
171
171
|
payload: { target: "all", scope: "user" },
|
|
172
172
|
},
|
|
173
173
|
],
|
|
174
174
|
allowWhenDisabled: true,
|
|
175
175
|
command: {
|
|
176
|
-
description: "
|
|
176
|
+
description: "Install web-related skill / CLI dependencies.",
|
|
177
177
|
configure(command) {
|
|
178
178
|
command
|
|
179
179
|
.option("--target <target>", "web-access、agent-browser 或 all")
|
package/src/workboard/Plugin.ts
CHANGED
|
@@ -59,12 +59,12 @@ export class WorkboardPlugin extends BasePlugin {
|
|
|
59
59
|
*/
|
|
60
60
|
readonly actions: PluginActions = {
|
|
61
61
|
snapshot: createAction({
|
|
62
|
-
description: "
|
|
62
|
+
description: "Read the current structured runtime snapshot from the workboard.",
|
|
63
63
|
input_schema: {
|
|
64
64
|
zod: z.object({}).passthrough(),
|
|
65
65
|
json_schema: { type: "object", properties: {} },
|
|
66
66
|
},
|
|
67
|
-
examples: [{ title: "
|
|
67
|
+
examples: [{ title: "Read snapshot", payload: {} }],
|
|
68
68
|
execute: async ({ context }) => {
|
|
69
69
|
const response = await readWorkboardSnapshot(context);
|
|
70
70
|
return {
|