@fish-under-sea/dsh-agent-teams-fish 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +8 -7
- package/README.md +8 -7
- package/compatibility.json +90 -82
- package/cordis.patch.yml +5 -0
- package/lib/capabilities.js +6 -1
- package/lib/client/AgentTeamToggle.js +54 -0
- package/lib/client/index.js +10 -0
- package/lib/client/locales.js +8 -0
- package/lib/client/slot-declarations.js +1 -0
- package/lib/client.js +127 -15
- package/lib/client.js.map +1 -1
- package/lib/git-artifact-stamp.json +2 -2
- package/lib/harness-compat.js +123 -5
- package/lib/index.js +73 -0
- package/lib/mailbox.js +3 -5
- package/lib/members.js +7 -1
- package/lib/tools.js +17 -14
- package/lib/types/capabilities.d.ts +2 -0
- package/lib/types/client/AgentTeamToggle.d.ts +18 -0
- package/lib/types/client/locales.d.ts +8 -0
- package/lib/types/client/slot-declarations.d.ts +17 -0
- package/lib/types/harness-compat.d.ts +4 -0
- package/lib/types/tools.d.ts +6 -0
- package/package.json +55 -51
- package/src/capabilities.ts +6 -1
- package/src/client/AgentTeamToggle.module.css +52 -0
- package/src/client/AgentTeamToggle.tsx +85 -0
- package/src/client/index.tsx +12 -0
- package/src/client/locales.ts +8 -0
- package/src/client/slot-declarations.ts +26 -0
- package/src/harness-compat.ts +156 -5
- package/src/index.ts +77 -0
- package/src/mailbox.ts +3 -5
- package/src/members.ts +10 -1
- package/src/tools.ts +27 -15
package/src/index.ts
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
import type { Context } from '@deepseek-ai/cordis'
|
|
23
23
|
import z from '@deepseek-ai/schemastery'
|
|
24
24
|
import { createUserMessage } from '@deepseek-ai/dsh-llm'
|
|
25
|
+
import type { Agent } from '@deepseek-ai/dsh-agent'
|
|
25
26
|
// Declaration merges make ctx.subagents and ctx.systemPrompt visible.
|
|
26
27
|
import type {} from '@deepseek-ai/dsh-subagent'
|
|
27
28
|
import type {} from '@deepseek-ai/dsh-system-prompt'
|
|
@@ -53,6 +54,21 @@ const WEB_SERVER_KEYS = ['webServer', 'httpServer'] as const
|
|
|
53
54
|
/** Workspace registry service key candidates, newest first. */
|
|
54
55
|
const WORKSPACE_KEYS = ['workspaceRegistry', 'workspace'] as const
|
|
55
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Native 0.2.1-rc.3+ team-mode service (row id `agent-team`). It owns the
|
|
59
|
+
* durable per-Session `agentTeam` projection the model menu reads. Fish does
|
|
60
|
+
* not use its task tools or UI (those rows are disabled; Fish owns both), only
|
|
61
|
+
* the saved on/off switch, so the model-menu toggle can drive Fish AgentTeams.
|
|
62
|
+
*/
|
|
63
|
+
interface NativeTeamModeService {
|
|
64
|
+
isEnabled(agent: Agent): boolean
|
|
65
|
+
setEnabled(agent: Agent, enabled: boolean, signal?: AbortSignal): Promise<void>
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function nativeTeamMode(ctx: Context): NativeTeamModeService | undefined {
|
|
69
|
+
return (ctx as unknown as { agentTeams?: NativeTeamModeService }).agentTeams
|
|
70
|
+
}
|
|
71
|
+
|
|
56
72
|
export const name = 'agent-teams'
|
|
57
73
|
export const inject = ['tools', 'llm', 'subagents', 'systemPrompt', 'agents']
|
|
58
74
|
|
|
@@ -266,6 +282,8 @@ export async function resolveArtwork(
|
|
|
266
282
|
}
|
|
267
283
|
|
|
268
284
|
export function apply(ctx: Context, config: Config): void {
|
|
285
|
+
/** True when a native team-mode service is present and the switch is on. */
|
|
286
|
+
const teamEnabled = (agent: Agent): boolean => nativeTeamMode(ctx)?.isEnabled(agent) ?? true
|
|
269
287
|
const resolved: ToolsConfig = {
|
|
270
288
|
stateDir: config.stateDir ?? '.agent-teams',
|
|
271
289
|
memberProvider: config.memberProvider ?? 'spawn',
|
|
@@ -276,6 +294,7 @@ export function apply(ctx: Context, config: Config): void {
|
|
|
276
294
|
memberMaxDepth: config.memberMaxDepth ?? 0,
|
|
277
295
|
maxMembers: config.maxMembers ?? 8,
|
|
278
296
|
profiles: config.profiles ?? {},
|
|
297
|
+
isTeamEnabled: teamEnabled,
|
|
279
298
|
// Owner configuration is validated once, at mount: an empty or malformed
|
|
280
299
|
// policy must never reach a member creation path.
|
|
281
300
|
toolPolicies: parseToolPolicies(config.toolPolicies),
|
|
@@ -297,6 +316,7 @@ export function apply(ctx: Context, config: Config): void {
|
|
|
297
316
|
stateDir: resolved.stateDir,
|
|
298
317
|
isPendingMember: agentTeamsRuntime.isPendingMember,
|
|
299
318
|
order: config.promptSectionOrder,
|
|
319
|
+
isTeamEnabled: teamEnabled,
|
|
300
320
|
// Keep the bounded profile directory available without extra tool calls.
|
|
301
321
|
// installTeamCapabilities snapshots this once; no business state rewrites it.
|
|
302
322
|
captainPrompt: () => usageSectionText(TEAM_TOOL_NAMES.join(', '), formatProfilesForPrompt(config.profiles)),
|
|
@@ -445,6 +465,63 @@ export function apply(ctx: Context, config: Config): void {
|
|
|
445
465
|
},
|
|
446
466
|
}), 'agent-teams: model policy route')
|
|
447
467
|
|
|
468
|
+
// 模型菜单「启用AgentTeam」开关。官方任务工具与官方团队 UI 行已在 bundle
|
|
469
|
+
// 层停用;原生服务只负责保存每个 Session 的持久开关,这里让开关直接控制
|
|
470
|
+
// Fish AgentTeams(关闭时工具与提示词都不参与本会话)。
|
|
471
|
+
ctx.effect(() => webServer.register({
|
|
472
|
+
kind: 'exact',
|
|
473
|
+
path: '/plugins/dsh-agent-teams/mode',
|
|
474
|
+
handler: async (req, res) => {
|
|
475
|
+
const url = new URL(req.url ?? '/', 'http://x')
|
|
476
|
+
const service = nativeTeamMode(ctx)
|
|
477
|
+
const respond = (status: number, body: unknown): void => {
|
|
478
|
+
res.writeHead(status, { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store' })
|
|
479
|
+
res.end(JSON.stringify(body))
|
|
480
|
+
}
|
|
481
|
+
if (service === undefined) {
|
|
482
|
+
respond(503, { error: 'native team-mode service is not mounted' })
|
|
483
|
+
return
|
|
484
|
+
}
|
|
485
|
+
const lookup = (sessionId: string): Agent | undefined =>
|
|
486
|
+
ctx.agents.get(sessionId as import('@deepseek-ai/dsh-session').SessionId)
|
|
487
|
+
if (req.method === 'GET') {
|
|
488
|
+
const sessionId = url.searchParams.get('session')?.trim() ?? ''
|
|
489
|
+
if (sessionId === '') { respond(400, { error: 'session is required' }); return }
|
|
490
|
+
const agent = lookup(sessionId)
|
|
491
|
+
if (agent === undefined) { respond(409, { error: 'session is not attached' }); return }
|
|
492
|
+
respond(200, { enabled: service.isEnabled(agent) })
|
|
493
|
+
return
|
|
494
|
+
}
|
|
495
|
+
if (req.method !== 'POST') {
|
|
496
|
+
res.writeHead(405, { allow: 'GET, POST', 'cache-control': 'no-store' })
|
|
497
|
+
res.end()
|
|
498
|
+
return
|
|
499
|
+
}
|
|
500
|
+
let payload: Record<string, unknown>
|
|
501
|
+
try {
|
|
502
|
+
payload = await readJsonRequest(req)
|
|
503
|
+
} catch (error: unknown) {
|
|
504
|
+
respond(error instanceof RequestBodyError ? error.status : 400, { error: error instanceof Error ? error.message : 'invalid request body' })
|
|
505
|
+
return
|
|
506
|
+
}
|
|
507
|
+
const sessionId = typeof payload['sessionId'] === 'string' ? payload['sessionId'].trim() : ''
|
|
508
|
+
const enabled = payload['enabled']
|
|
509
|
+
if (sessionId === '' || typeof enabled !== 'boolean') {
|
|
510
|
+
respond(400, { error: 'sessionId and enabled are required' })
|
|
511
|
+
return
|
|
512
|
+
}
|
|
513
|
+
const agent = lookup(sessionId)
|
|
514
|
+
if (agent === undefined) { respond(409, { error: 'session is not attached' }); return }
|
|
515
|
+
try {
|
|
516
|
+
await service.setEnabled(agent, enabled)
|
|
517
|
+
respond(200, { ok: true, enabled })
|
|
518
|
+
} catch (error: unknown) {
|
|
519
|
+
ctx.logger.warn(`agent-teams: mode switch failed: ${String(error)}`)
|
|
520
|
+
respond(409, { error: error instanceof Error ? error.message : 'failed to switch AgentTeam mode' })
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
}), 'agent-teams: mode route')
|
|
524
|
+
|
|
448
525
|
ctx.effect(() => webServer.register({
|
|
449
526
|
kind: 'exact',
|
|
450
527
|
path: '/plugins/dsh-agent-teams/plan',
|
package/src/mailbox.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Context } from '@deepseek-ai/cordis'
|
|
|
3
3
|
import { join } from 'node:path'
|
|
4
4
|
import { acknowledgeMailbox, CAPTAIN_KEY, discardMailboxMessages, findTeamByCaptain, readMailbox, readUnreadMailbox, readTeam, sanitizeKey, withTeamLock } from './state.ts'
|
|
5
5
|
import type { TeamMessage, TeamState } from './types.ts'
|
|
6
|
-
import { sessionOwnEvents } from './harness-compat.ts'
|
|
6
|
+
import { sessionOwnEvents, successfulSubagentSettlement } from './harness-compat.ts'
|
|
7
7
|
import { leadIdentityOfAsync, sessionLeadsTeamAsync } from './lineage.ts'
|
|
8
8
|
|
|
9
9
|
const PREFIX = 'AgentTeams inbox receipt: '
|
|
@@ -80,8 +80,7 @@ export function installMailboxAdmission(ctx: Context, stateDir: string): void {
|
|
|
80
80
|
// result. Keep abnormal endings and missing reports as fallback signals.
|
|
81
81
|
const successfulSettlements = new Set(decision.messages.flatMap(input => {
|
|
82
82
|
const source = input.source
|
|
83
|
-
return source
|
|
84
|
-
&& source.summary === `Background subagent ${source.senderSessionId} finished and will do no further work unless you send it more.`
|
|
83
|
+
return successfulSubagentSettlement(source)
|
|
85
84
|
? [source.senderSessionId as string] : []
|
|
86
85
|
}))
|
|
87
86
|
const redundantSettlements = new Set<string>()
|
|
@@ -155,8 +154,7 @@ export function installMailboxAdmission(ctx: Context, stateDir: string): void {
|
|
|
155
154
|
}
|
|
156
155
|
const admitted = []
|
|
157
156
|
for (const { input, receipt, batch } of inputs) {
|
|
158
|
-
if (input.source
|
|
159
|
-
&& input.source.summary === `Background subagent ${input.source.senderSessionId} finished and will do no further work unless you send it more.`) continue
|
|
157
|
+
if (successfulSubagentSettlement(input.source) && redundantSettlements.has(input.source.senderSessionId)) continue
|
|
160
158
|
if (receipt === undefined || batch === undefined || batch.failed === true) { admitted.push(input); continue }
|
|
161
159
|
const messages = []
|
|
162
160
|
for (const id of receipt.ids) {
|
package/src/members.ts
CHANGED
|
@@ -1058,8 +1058,17 @@ export async function spawnMember(
|
|
|
1058
1058
|
// mirror what startContinuable would reject, with an actionable error.
|
|
1059
1059
|
const provider = ctx.subagents.getProvider(config.provider)
|
|
1060
1060
|
if (provider === undefined) {
|
|
1061
|
+
// 0.2.2-rc.3 removed the public `list()`; the private registry still holds
|
|
1062
|
+
// the names, so read those when present and fall back to the old API.
|
|
1063
|
+
const boundary = ctx.subagents as unknown as {
|
|
1064
|
+
list?: () => readonly string[]
|
|
1065
|
+
providers?: Map<string, unknown>
|
|
1066
|
+
}
|
|
1067
|
+
const available = typeof boundary.list === 'function'
|
|
1068
|
+
? boundary.list()
|
|
1069
|
+
: [...(boundary.providers?.keys?.() ?? [])]
|
|
1061
1070
|
throw new Error(
|
|
1062
|
-
`agent-teams: no subagent provider "${config.provider}" is registered (available: ${
|
|
1071
|
+
`agent-teams: no subagent provider "${config.provider}" is registered (available: ${available.join(', ') || 'none'}) — `
|
|
1063
1072
|
+ 'check that the subagent provider row (e.g. subagent-spawn) is mounted in the composition',
|
|
1064
1073
|
)
|
|
1065
1074
|
}
|
package/src/tools.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { createUserMessage } from '@deepseek-ai/dsh-llm'
|
|
|
16
16
|
import type { SessionId } from '@deepseek-ai/dsh-session'
|
|
17
17
|
import type { JsonValue } from '@deepseek-ai/dsh-util-values'
|
|
18
18
|
import { defineTool } from '@deepseek-ai/dsh-tools'
|
|
19
|
-
import type { ToolRunContext } from '@deepseek-ai/dsh-tools'
|
|
19
|
+
import type { ToolDefinition, ToolRunContext } from '@deepseek-ai/dsh-tools'
|
|
20
20
|
import { join } from 'node:path'
|
|
21
21
|
import { appendTeamEvent, captainSessionOf } from './events.ts'
|
|
22
22
|
import {
|
|
@@ -116,6 +116,12 @@ export interface ToolsConfig {
|
|
|
116
116
|
profiles: Record<string, import('./profiles.ts').TeamProfileConfig>
|
|
117
117
|
/** Owner-declared reusable member tool policies, keyed by policy id (#59). */
|
|
118
118
|
toolPolicies: Record<string, MemberToolPolicy>
|
|
119
|
+
/**
|
|
120
|
+
* Per-agent gate: the session's model-menu 「启用AgentTeam」 switch must be on
|
|
121
|
+
* for AgentTeams tools and prompt to participate. Omitted keeps the legacy
|
|
122
|
+
* always-on behavior for hosts without the native team-mode service.
|
|
123
|
+
*/
|
|
124
|
+
isTeamEnabled?: (agent: Agent) => boolean
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
/** Browser/UI mutations allowed while a plan is waiting for approval. */
|
|
@@ -671,6 +677,12 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
671
677
|
installMailboxAdmission(ctx, config.stateDir)
|
|
672
678
|
const scheduler = installTeamScheduler(ctx, { stateDir: config.stateDir, executionPrompt: config.executionPrompt, dispatch: dispatchMember })
|
|
673
679
|
|
|
680
|
+
/** Step-time admission shared by every `agent_teams_*` tool. */
|
|
681
|
+
const teamEnabled = (agent: Agent | undefined): boolean =>
|
|
682
|
+
agent === undefined ? false : (config.isTeamEnabled?.(agent) ?? true)
|
|
683
|
+
const registerTool = (definition: ToolDefinition): (() => void) =>
|
|
684
|
+
ctx.tools.register(definition, { when: ({ agent }) => teamEnabled(agent) })
|
|
685
|
+
|
|
674
686
|
async function dispatchMember(captain: Agent, teamId: string, memberName: string, text: string, signal: AbortSignal, mode: 'queue' | 'steer', attemptId?: string): Promise<boolean> {
|
|
675
687
|
const root = stateRootOf(workspaceOf(captain), config)
|
|
676
688
|
// Record why a member never started. The scheduler treats a failed dispatch as
|
|
@@ -941,7 +953,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
941
953
|
|
|
942
954
|
|
|
943
955
|
|
|
944
|
-
|
|
956
|
+
registerTool(defineTool({
|
|
945
957
|
name: 'agent_teams_create',
|
|
946
958
|
description: 'Create a team. Use approval=required for a two-phase plan: members and tasks remain unspawned/unclaimed until the user reviews the Web plan and explicitly approves it. Optional profiles expand their configured roster; seed profiles also expand template tasks, while captain profiles leave the graph for the Captain to design. approval=automatic preserves the legacy immediate-execution path.',
|
|
947
959
|
parameters: {
|
|
@@ -1153,7 +1165,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1153
1165
|
},
|
|
1154
1166
|
}))
|
|
1155
1167
|
|
|
1156
|
-
|
|
1168
|
+
registerTool(defineTool({
|
|
1157
1169
|
name: 'agent_teams_edit_plan',
|
|
1158
1170
|
description: 'Atomically revise an AgentTeams plan. While staged, edit tasks and roster without starting work. While running, only update_task is allowed, and only for pending tasks with no prior attempt: correct dependencies, assignees or descriptions before they start; newly ready work is scheduled after commit. Never edit active/finished attempts. Submit dependent edits in order. Never modify .agent-teams files directly.',
|
|
1159
1171
|
parameters: {
|
|
@@ -1277,7 +1289,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1277
1289
|
},
|
|
1278
1290
|
}))
|
|
1279
1291
|
|
|
1280
|
-
|
|
1292
|
+
registerTool(defineTool({
|
|
1281
1293
|
name: 'agent_teams_approve',
|
|
1282
1294
|
description: 'Approve and start a staged team plan. Call this only in response to an explicit user approval in a new user turn; never call it during the turn that created or edited the plan. The Web Approve & Run button uses the same runtime directly.',
|
|
1283
1295
|
parameters: {
|
|
@@ -1309,7 +1321,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1309
1321
|
},
|
|
1310
1322
|
}))
|
|
1311
1323
|
|
|
1312
|
-
|
|
1324
|
+
registerTool(defineTool({
|
|
1313
1325
|
name: 'agent_teams_add_member',
|
|
1314
1326
|
description: 'Add a member to the team roster. Planning and idle roster rows do not call a model. After approval, the member session starts with its first ready task or explicit message and remains durable for later work.',
|
|
1315
1327
|
parameters: {
|
|
@@ -1413,7 +1425,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1413
1425
|
},
|
|
1414
1426
|
}))
|
|
1415
1427
|
|
|
1416
|
-
|
|
1428
|
+
registerTool(defineTool({
|
|
1417
1429
|
name: 'agent_teams_remove_member',
|
|
1418
1430
|
description: 'Remove a member safely: revoke its current attempts, return all unfinished owned tasks to the shared pending pool, interrupt its live turn, and mark it removed.',
|
|
1419
1431
|
parameters: {
|
|
@@ -1472,7 +1484,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1472
1484
|
},
|
|
1473
1485
|
}))
|
|
1474
1486
|
|
|
1475
|
-
|
|
1487
|
+
registerTool(defineTool({
|
|
1476
1488
|
name: 'agent_teams_create_task',
|
|
1477
1489
|
description: 'Create a task in your team\'s task list. Use kind=work (default) for research, repository audits and general tasks. kind=review is only a quality gate for an existing implementation/repair task via reviewedTaskId. Every call must include a non-empty subject, including verification and review tasks. Tasks can depend on other tasks (dependencies): a task is only claimable once every dependency is completed. Optionally assign it to a member, who still claims it before working.',
|
|
1478
1490
|
parameters: {
|
|
@@ -1630,7 +1642,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1630
1642
|
},
|
|
1631
1643
|
}))
|
|
1632
1644
|
|
|
1633
|
-
|
|
1645
|
+
registerTool(defineTool({
|
|
1634
1646
|
name: 'agent_teams_reassign_task',
|
|
1635
1647
|
description: 'Atomically retry, reassign, or let the captain take over one ready unfinished/failed task. The old attempt is revoked before its member is interrupted, so late updates cannot overwrite the new owner. Use assignee="captain" only when you will finish that task in this turn; a captain can own only one unfinished takeover at a time, and an unfinished takeover returns to the member pool when the captain becomes idle.',
|
|
1636
1648
|
parameters: {
|
|
@@ -1761,7 +1773,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1761
1773
|
},
|
|
1762
1774
|
}))
|
|
1763
1775
|
|
|
1764
|
-
|
|
1776
|
+
registerTool(defineTool({
|
|
1765
1777
|
name: 'agent_teams_claim_task',
|
|
1766
1778
|
description: 'Members claim their own ready task or read their existing attempt_id. Captains must use reassign_task to assign and wake a member; claim_task does not dispatch work. A member cannot own a second unfinished task. The returned attempt_id is required for updates and becomes stale after retry/reassignment.',
|
|
1767
1779
|
parameters: {
|
|
@@ -1868,7 +1880,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
1868
1880
|
},
|
|
1869
1881
|
}))
|
|
1870
1882
|
|
|
1871
|
-
|
|
1883
|
+
registerTool(defineTool({
|
|
1872
1884
|
name: 'agent_teams_update_task',
|
|
1873
1885
|
description: 'Update a task status/output. Members must supply the current attempt_id returned by claim_task; stale attempts are rejected after takeover/reassignment. Terminal results are immutable, but owners and the captain can append acceptanceResults/commandsRun/evidence_note as attributed supplemental evidence, without reclaiming or changing the verdict. A captain must use reassign_task(assignee="captain") before updating active member-owned work.',
|
|
1874
1886
|
parameters: {
|
|
@@ -2094,7 +2106,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
2094
2106
|
},
|
|
2095
2107
|
}))
|
|
2096
2108
|
|
|
2097
|
-
|
|
2109
|
+
registerTool(defineTool({
|
|
2098
2110
|
name: 'agent_teams_amend_task',
|
|
2099
2111
|
description: 'Captain-only controlled contract amendment for one non-terminal quality task: replace a wrong objective/acceptance/verify/inScope/outOfScope when the original contract makes honest completion impossible (for example a verify command that cannot pass, or an inScope that forbids the file the objective names). The amendment is appended to the task\'s revisions ledger with previous values and the reason, and is rejected once a review/requirements task has passed judgment on this task. Members cannot amend contracts; the implementer re-reads the amended contract before its next quality gate. Lists are full replacements, not deltas.',
|
|
2100
2112
|
parameters: {
|
|
@@ -2175,7 +2187,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
2175
2187
|
},
|
|
2176
2188
|
}))
|
|
2177
2189
|
|
|
2178
|
-
|
|
2190
|
+
registerTool(defineTool({
|
|
2179
2191
|
name: 'agent_teams_send_message',
|
|
2180
2192
|
description: 'Send coordination or current-task guidance directly to the captain or a teammate. A running recipient receives it at the next model step; an idle recipient wakes. Messages are durably retained until read. Use task creation/reassignment for a new unit of work, not repeated status nudges.',
|
|
2181
2193
|
parameters: {
|
|
@@ -2310,7 +2322,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
2310
2322
|
},
|
|
2311
2323
|
}))
|
|
2312
2324
|
|
|
2313
|
-
|
|
2325
|
+
registerTool(defineTool({
|
|
2314
2326
|
name: 'agent_teams_status',
|
|
2315
2327
|
description: 'Team snapshot: members with live activity and tasks with status/assignee/dependencies/output. Captains also see every team mailbox; members see only their own inbox. Use after mailbox progress deliveries or for an explicit status request. After dispatch, end your turn while members work; do not repeatedly poll.',
|
|
2316
2328
|
parameters: {},
|
|
@@ -2457,7 +2469,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
2457
2469
|
},
|
|
2458
2470
|
}))
|
|
2459
2471
|
|
|
2460
|
-
|
|
2472
|
+
registerTool(defineTool({
|
|
2461
2473
|
name: 'agent_teams_resume',
|
|
2462
2474
|
description: 'Explicitly resume a halted team. Requires a non-empty reason. Does not recreate cancelled tasks; only still-pending work is scheduled.',
|
|
2463
2475
|
parameters: {
|
|
@@ -2509,7 +2521,7 @@ export function registerAgentTeamsTools(ctx: Context, config: ToolsConfig): Agen
|
|
|
2509
2521
|
},
|
|
2510
2522
|
}))
|
|
2511
2523
|
|
|
2512
|
-
|
|
2524
|
+
registerTool(defineTool({
|
|
2513
2525
|
name: 'agent_teams_delete',
|
|
2514
2526
|
description: 'End and archive your team: interrupts members and moves the current tasks and mailboxes out of active state for later inspection. Use when the work is done or explicitly abandoned. A same-name archive replaces its previous generation.',
|
|
2515
2527
|
parameters: {},
|