fix(agent-team): resolve task owner names before commits
This commit is contained in:
1 parent
eddb6a8862
commit
e29671eedb
11 files changed
+204
-48
No files matched your search
@@ -15,8 +15,8 @@
|
||||
en: 6ff748d66293c367
|
||||
zh: b9f8a7183a27e7a1
|
||||
/subagents/durable-enumeration:
|
||||
en: 30c3607a969696ce
|
||||
zh: e6359cdf22b1e235
|
||||
en: 4e4c6df6d8ae3425
|
||||
zh: b421f32101ab6eda
|
||||
/subagents/results-and-backend-handles:
|
||||
en: 69ea5bed7d9fb64a
|
||||
zh: b187a822b813e80a
|
||||
|
||||
@@ -230,7 +230,7 @@ type SubagentInterruptAuthority =
|
||||
|
||||
## Durable enumeration
|
||||
|
||||
`listChildren` reads the parent-owned catalog of all local children and parent-delivery external children. Caller-delivery external executions leave membership and result collection to their caller; local workflow children remain discoverable after completion. External entries carry `mode: 'external'` and cannot open a child Session or accept follow-ups. Catalog entries record membership at creation without execution status. `list_agents` exposes direct continuable children with `running` or `inactive` activity; see the [control tool](../../packages/subagent/tool-subagent-control/README.md#list_agents).
|
||||
`listChildren` reads the parent-owned catalog of all local and external children, including caller-delivery work. Caller delivery leaves result collection to the caller; catalog membership remains discoverable after completion. External entries carry `mode: 'external'` and cannot open a child Session or accept follow-ups. Catalog entries record membership at creation without execution status. `list_agents` exposes the root and its full descendant tree, including external leaves and diagnostics for unreadable children; see the [control tool](../../packages/subagent/tool-subagent-control/README.md#list_agents).
|
||||
|
||||
## Results and backend handles
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ type SubagentInterruptAuthority =
|
||||
|
||||
## 持久枚举
|
||||
|
||||
`listChildren` 读取父级拥有的目录,其中包含所有本地子级及 parent 投递的外部子级。caller 投递的外部执行由调用方负责成员关系与结果收集;本地工作流子级在完成后仍可被发现。外部条目携带 `mode: 'external'`,不能打开子 Session 或接受后续消息。目录在创建时记录成员关系,不携带执行状态。`list_agents` 展示可继续的直接子级,其活跃状态为 `running` 或 `inactive`;参见[控制工具](../../packages/subagent/tool-subagent-control/README.zh.md#list_agents)。
|
||||
`listChildren` 读取父级拥有的目录,其中包含所有本地和外部子级,包括 caller 投递的任务。caller 投递由调用方收集结果;目录成员关系在完成后仍可被发现。外部条目携带 `mode: 'external'`,不能打开子 Session 或接受后续消息。目录在创建时记录成员关系,不携带执行状态。`list_agents` 展示根及其完整后代树,包括外部叶子和不可读子级的诊断;参见[控制工具](../../packages/subagent/tool-subagent-control/README.zh.md#list_agents)。
|
||||
|
||||
## 结果与后端句柄
|
||||
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
en: f4c91b124496d1a6
|
||||
zh: a2149d32e11d634a
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/use-this-package/what-success-and-failure-look-like:
|
||||
en: bf1eb0e693610f5b
|
||||
zh: 2b29e5cf63623909
|
||||
en: 9e858d8be4882773
|
||||
zh: 19e2dd0d6df9bf41
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/understand-the-implementation:
|
||||
en: 3952eb1d9de1f988
|
||||
zh: 789d51b88f41b710
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/understand-the-implementation/design-philosophy:
|
||||
en: 9b3218d9dd0019e4
|
||||
zh: cefbcdbdb91648ab
|
||||
en: 2aa99a2834a0b47e
|
||||
zh: dc4f2b031c73168f
|
||||
/deepseek-ai-dsh-experimental-tool-agent-team/understand-the-implementation/source-map:
|
||||
en: 29ff96b23b25b13e
|
||||
zh: 7d2cdf9be86d1ed4
|
||||
|
||||
@@ -56,7 +56,7 @@ Task `owner` arguments and `ownerName` results use full agent paths. The root ma
|
||||
|
||||
### What success and failure look like
|
||||
|
||||
Task tools return compact JSON task views or pages. Stale revisions, unauthorized actions, and unready tasks return errors.
|
||||
Task tools return compact JSON task views or pages. Stale revisions, unauthorized actions, and unready tasks return errors. Updates resolve result-owner names before mutation; a name lookup failure leaves the task unchanged, and a committed result needs no further name lookup.
|
||||
|
||||
-----
|
||||
|
||||
@@ -77,6 +77,8 @@ The adapter is built on four commitments:
|
||||
- **Declared results, compact JSON.** Every tool declares its complete result schema and renders that value as compact JSON, so the compiler checks `execute` against what the model is promised and no result spends tokens on indentation.
|
||||
- **The domain owns authority.** Tools delegate to `ctx.agentTeams`, which enforces Lead authority and revision checks; the adapter adds no weaker path.
|
||||
|
||||
Task listing applies status, readiness, and unowned filters before resolving names. Without an exact owner-name filter, only the requested page needs name resolution; an exact owner-name filter resolves the remaining candidates before pagination.
|
||||
|
||||
The [subagent teammates Agent Note](../../../.agents/notes/implemented/architecture/2026-10-15-agent-teams-as-subagents.md) owns the model-facing and scoping decisions.
|
||||
|
||||
### Source map
|
||||
|
||||
@@ -56,7 +56,7 @@ kind: "package-reference"
|
||||
|
||||
### 成功与失败的表现
|
||||
|
||||
任务工具返回紧凑的 JSON 任务视图或分页。过期修订、未授权操作和未就绪任务返回错误。
|
||||
任务工具返回紧凑的 JSON 任务视图或分页。过期修订、未授权操作和未就绪任务返回错误。更新会在修改前解析结果中的负责人名称;名称查询失败时任务保持不变,已提交结果无需再查询名称。
|
||||
|
||||
-----
|
||||
|
||||
@@ -77,6 +77,8 @@ kind: "package-reference"
|
||||
- **声明式结果,紧凑 JSON。** 每个工具都声明完整结果 schema,并把该值渲染为紧凑 JSON,因此编译器会对照向模型承诺的结果检查 `execute`,任何结果都不会在缩进上消耗 token。
|
||||
- **领域掌握裁决权。** 工具委托给 `ctx.agentTeams`,后者强制执行 Lead 权限与 revision 校验;适配器不添加更弱的路径。
|
||||
|
||||
任务列表先按状态、就绪情况和未分配条件筛选,再解析名称。没有精确负责人名称筛选时,只解析请求页中的名称;按精确负责人名称筛选时,在分页前解析剩余候选任务的负责人名称。
|
||||
|
||||
[subagent teammate Agent Note](../../../.agents/notes/implemented/architecture/2026-10-15-agent-teams-as-subagents.zh.md)负责模型侧与 scoping 决策。
|
||||
|
||||
### 源码地图
|
||||
|
||||
@@ -76,12 +76,14 @@ function jsonOutput<const S extends ValueSchemaSpec>(schema: S): {
|
||||
|
||||
type NamedTaskView = Omit<TeamTaskView, 'ownerId'> & { readonly ownerName?: string }
|
||||
|
||||
/** Project task owners from live activations or parent catalogs. */
|
||||
async function namedTasks(ctx: Context, caller: Agent, tasks: readonly TeamTaskView[], signal: AbortSignal): Promise<NamedTaskView[]> {
|
||||
/** Read immutable owner names before a mutation or for the requested result rows. */
|
||||
async function taskOwnerNames(
|
||||
ctx: Context, caller: Agent, owners: readonly (SessionId | undefined)[], signal: AbortSignal,
|
||||
): Promise<ReadonlyMap<SessionId, string>> {
|
||||
const root = ctx.subagents.rootOf(caller)
|
||||
const names = new Map<SessionId, string>([[root.id, 'lead']])
|
||||
const missing = new Set<SessionId>()
|
||||
for (const { ownerId } of tasks) {
|
||||
for (const ownerId of owners) {
|
||||
if (ownerId === undefined || names.has(ownerId)) continue
|
||||
const agent = ctx.agents.get(ownerId)
|
||||
if (agent === undefined) missing.add(ownerId)
|
||||
@@ -92,10 +94,15 @@ async function namedTasks(ctx: Context, caller: Agent, tasks: readonly TeamTaskV
|
||||
names.set(entry.id, `lead/${entry.path}`)
|
||||
}
|
||||
}
|
||||
return tasks.map(({ ownerId, ...view }) => ({
|
||||
return names
|
||||
}
|
||||
|
||||
/** Format a task without querying mutable services after its commit. */
|
||||
function namedTask({ ownerId, ...view }: TeamTaskView, names: ReadonlyMap<SessionId, string>): NamedTaskView {
|
||||
return {
|
||||
...view,
|
||||
...ownerId === undefined ? {} : { ownerName: names.get(ownerId) ?? `legacy:${ownerId}` },
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
/** Recover the exact caller guaranteed by Agent-scoped tool discovery. */
|
||||
@@ -155,7 +162,7 @@ function install(agent: Agent, ctx: Context): () => void {
|
||||
...args.blocked_by === undefined ? {} : { blockedBy: args.blocked_by.map(TeamTaskId) },
|
||||
...args.write_scopes === undefined ? {} : { writeScopes: args.write_scopes },
|
||||
}, exec.signal)
|
||||
return (await namedTasks(ctx, caller, [task], exec.signal))[0] as NamedTaskView
|
||||
return namedTask(task, new Map())
|
||||
},
|
||||
})))
|
||||
|
||||
@@ -175,20 +182,23 @@ function install(agent: Agent, ctx: Context): () => void {
|
||||
},
|
||||
output: jsonOutput(TASK_LIST_VALUE_SCHEMA),
|
||||
async execute(args, exec) {
|
||||
const status = args.status
|
||||
const caller = callingAgent(exec.agent, 'team_task_list')
|
||||
const filtered = (await namedTasks(ctx, caller, ctx.agentTeams.listTasks(caller), exec.signal)).filter(task =>
|
||||
(status === undefined || task.status === status)
|
||||
&& (args.owner === undefined || (args.owner === 'unowned' ? task.ownerName === undefined : task.ownerName === args.owner))
|
||||
&& (args.ready === undefined || task.ready === args.ready))
|
||||
const cursor = args.cursor ?? 0
|
||||
const limit = args.limit ?? 50
|
||||
if (!Number.isSafeInteger(cursor) || cursor < 0) throw new Error('cursor must be a non-negative safe integer')
|
||||
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100) throw new Error('limit must be an integer from 1 through 100')
|
||||
return Promise.resolve({
|
||||
tasks: filtered.slice(cursor, cursor + limit),
|
||||
const caller = callingAgent(exec.agent, 'team_task_list')
|
||||
let filtered = ctx.agentTeams.listTasks(caller).filter(task =>
|
||||
(args.status === undefined || task.status === args.status)
|
||||
&& (args.owner !== 'unowned' || task.ownerId === undefined)
|
||||
&& (args.ready === undefined || task.ready === args.ready))
|
||||
const filterOwner = args.owner !== undefined && args.owner !== 'unowned'
|
||||
const candidates = filterOwner ? filtered : filtered.slice(cursor, cursor + limit)
|
||||
const names = await taskOwnerNames(ctx, caller, candidates.map(task => task.ownerId), exec.signal)
|
||||
if (filterOwner) filtered = filtered.filter(task => namedTask(task, names).ownerName === args.owner)
|
||||
return {
|
||||
tasks: filtered.slice(cursor, cursor + limit).map(task => namedTask(task, names)),
|
||||
...(cursor + limit < filtered.length ? { nextCursor: cursor + limit } : {}),
|
||||
})
|
||||
}
|
||||
},
|
||||
})))
|
||||
|
||||
@@ -202,7 +212,8 @@ function install(agent: Agent, ctx: Context): () => void {
|
||||
async execute(args, exec) {
|
||||
const caller = callingAgent(exec.agent, 'team_task_get')
|
||||
const task = ctx.agentTeams.getTask(caller, TeamTaskId(args.task_id))
|
||||
return (await namedTasks(ctx, caller, [task], exec.signal))[0] as NamedTaskView
|
||||
const names = await taskOwnerNames(ctx, caller, [task.ownerId], exec.signal)
|
||||
return namedTask(task, names)
|
||||
},
|
||||
})))
|
||||
|
||||
@@ -227,10 +238,17 @@ function install(agent: Agent, ctx: Context): () => void {
|
||||
output: jsonOutput(TASK_VIEW_SCHEMA),
|
||||
async execute(args, exec) {
|
||||
const caller = callingAgent(exec.agent, 'team_task_update')
|
||||
const taskId = TeamTaskId(args.task_id)
|
||||
const current = ctx.agentTeams.getTask(caller, taskId)
|
||||
const owner = args.owner === undefined ? undefined
|
||||
: await ctx.subagents.resolveName(caller, args.owner, exec.signal)
|
||||
const keepsOwner = !['claim', 'release', 'reopen', 'reassign'].includes(args.action)
|
||||
// Names are immutable; the service still checks the revision and authority after these reads.
|
||||
const names = await taskOwnerNames(ctx, caller, [
|
||||
caller.id, owner, keepsOwner ? current.ownerId : undefined,
|
||||
], exec.signal)
|
||||
const task = await ctx.agentTeams.updateTask(caller, {
|
||||
taskId: TeamTaskId(args.task_id),
|
||||
taskId,
|
||||
expectedRevision: args.expected_revision,
|
||||
action: args.action,
|
||||
...args.subject === undefined ? {} : { subject: args.subject },
|
||||
@@ -239,7 +257,7 @@ function install(agent: Agent, ctx: Context): () => void {
|
||||
...args.write_scopes === undefined ? {} : { writeScopes: args.write_scopes },
|
||||
...owner === undefined ? {} : { owner },
|
||||
}, exec.signal)
|
||||
return (await namedTasks(ctx, caller, [task], exec.signal))[0] as NamedTaskView
|
||||
return namedTask(task, names)
|
||||
},
|
||||
})))
|
||||
} catch (error: unknown) {
|
||||
|
||||
@@ -76,7 +76,7 @@ async function setup(script: ConstructorParameters<typeof MockAdapter>[0]) {
|
||||
const storageRoot = mkdtempSync(join(tmpdir(), 'dsh-tool-team-'))
|
||||
roots.push(storageRoot)
|
||||
await ctx.plugin(JsonlSessionPersistence, { root: storageRoot })
|
||||
await ctx.plugin(TestSessionQuery)
|
||||
const queryFiber = await ctx.plugin(TestSessionQuery)
|
||||
await ctx.plugin(AgentLoop, { agents: [] })
|
||||
await ctx.plugin(SubagentService)
|
||||
await ctx.plugin(ToolSubagentControl)
|
||||
@@ -87,7 +87,7 @@ async function setup(script: ConstructorParameters<typeof MockAdapter>[0]) {
|
||||
const adapter = new MockAdapter(script)
|
||||
ctx.llm.registerAdapter(['mock'], adapter)
|
||||
const lead = await ctx.agentLoop.create(SessionId('tool-team-lead'), { provider: 'mock', model: 'mock' })
|
||||
return { ctx, lead, fiber, adapter }
|
||||
return { ctx, lead, fiber, adapter, queryFiber }
|
||||
}
|
||||
|
||||
function execute(
|
||||
@@ -171,6 +171,26 @@ async function interrupt(ctx: Context, lead: Agent, target: SessionId): Promise<
|
||||
await ctx.subagents.drainChildren(lead, [target])
|
||||
}
|
||||
|
||||
/** Assign a task to a child whose name must be read from its durable catalog. */
|
||||
async function taskWithSettledOwner(ctx: Context, lead: Agent) {
|
||||
const activation = await ctx.subagents.startActivation({
|
||||
name: 'worker', provider: 'spawn', label: 'Review',
|
||||
request: { parent: lead, prompt: [{ type: 'text', text: 'Review the change' }] },
|
||||
signal: SIGNAL, delivery: 'caller',
|
||||
})
|
||||
try {
|
||||
await activation.result
|
||||
} finally {
|
||||
await activation.dispose()
|
||||
}
|
||||
expect(ctx.agents.get(activation.childId)).toBeUndefined()
|
||||
const created = await ctx.agentTeams.createTask(lead, { subject: 'Review', description: 'Review the change' })
|
||||
const task = await ctx.agentTeams.updateTask(lead, {
|
||||
taskId: created.id, expectedRevision: created.revision, action: 'reassign', owner: activation.childId,
|
||||
})
|
||||
return { task, ownerName: activation.name }
|
||||
}
|
||||
|
||||
describe('dsh-tool-team', () => {
|
||||
it.each([true, false])('cancels reassignment without appending when discovery observes cancellation: %s', async (observesCancellation) => {
|
||||
const { ctx, lead } = await setup(['hang'])
|
||||
@@ -510,6 +530,113 @@ describe('dsh-tool-team', () => {
|
||||
})).isError).toBe(true)
|
||||
})
|
||||
|
||||
it('leaves a task unchanged when its owner name cannot be read before an edit', async () => {
|
||||
const { ctx, lead, queryFiber } = await setup([textResponse('done')])
|
||||
const { task } = await taskWithSettledOwner(ctx, lead)
|
||||
await queryFiber.dispose()
|
||||
|
||||
const result = await execute(ctx, lead, 'team_task_update', {
|
||||
task_id: task.id, expected_revision: task.revision, action: 'edit', subject: 'Edited',
|
||||
})
|
||||
expect(result.isError).toBe(true)
|
||||
expect(text(result)).toContain('listing subagents requires the sessionQuery service')
|
||||
expect(ctx.agentTeams.getTask(lead, task.id)).toEqual(task)
|
||||
await using stored = await ctx.sessionPersistence.open(lead.id, 'read')
|
||||
expect((await stored.read()).events.filter(event => event.type === 'team/task')).toHaveLength(2)
|
||||
})
|
||||
|
||||
it('returns the committed task when Session queries unload during the commit', async () => {
|
||||
const { ctx, lead, queryFiber } = await setup([textResponse('done')])
|
||||
const { task, ownerName } = await taskWithSettledOwner(ctx, lead)
|
||||
const flush = ctx.sessions.flush.bind(ctx.sessions)
|
||||
vi.spyOn(ctx.sessions, 'flush').mockImplementationOnce(async (session) => {
|
||||
const flushed = await flush(session)
|
||||
await queryFiber.dispose()
|
||||
return flushed
|
||||
})
|
||||
|
||||
const result = await execute(ctx, lead, 'team_task_update', {
|
||||
task_id: task.id, expected_revision: task.revision, action: 'edit', subject: 'Edited',
|
||||
})
|
||||
expect(result.isError).toBe(false)
|
||||
expect(JSON.parse(text(result))).toMatchObject({ subject: 'Edited', revision: task.revision + 1, ownerName })
|
||||
expect(ctx.agentTeams.getTask(lead, task.id)).toMatchObject({ subject: 'Edited', revision: task.revision + 1 })
|
||||
})
|
||||
|
||||
it('rejects an edit if another writer changes the task while its owner name is being read', async () => {
|
||||
const { ctx, lead } = await setup([textResponse('done')])
|
||||
const { task } = await taskWithSettledOwner(ctx, lead)
|
||||
const entered = Promise.withResolvers<undefined>()
|
||||
const release = Promise.withResolvers<undefined>()
|
||||
const discover = ctx.subagents.listDescendants.bind(ctx.subagents)
|
||||
vi.spyOn(ctx.subagents, 'listDescendants').mockImplementationOnce(async (...args) => {
|
||||
const entries = await discover(...args)
|
||||
entered.resolve(undefined)
|
||||
await release.promise
|
||||
return entries
|
||||
})
|
||||
const result = execute(ctx, lead, 'team_task_update', {
|
||||
task_id: task.id, expected_revision: task.revision, action: 'edit', subject: 'Delayed edit',
|
||||
})
|
||||
try {
|
||||
await entered.promise
|
||||
expect(ctx.agentTeams.getTask(lead, task.id)).toEqual(task)
|
||||
await ctx.agentTeams.updateTask(lead, {
|
||||
taskId: task.id, expectedRevision: task.revision, action: 'edit', subject: 'Concurrent edit',
|
||||
})
|
||||
} finally {
|
||||
release.resolve(undefined)
|
||||
}
|
||||
expect((await result).isError).toBe(true)
|
||||
expect(text(await result)).toContain('stale team task')
|
||||
expect(ctx.agentTeams.getTask(lead, task.id)).toMatchObject({
|
||||
subject: 'Concurrent edit', revision: task.revision + 1,
|
||||
})
|
||||
})
|
||||
|
||||
it('reads owner names only for rows surviving filters and pagination', async () => {
|
||||
const { ctx, lead } = await setup([textResponse('done')])
|
||||
const unowned = await ctx.agentTeams.createTask(lead, { subject: 'First', description: 'Unowned' })
|
||||
const { task, ownerName } = await taskWithSettledOwner(ctx, lead)
|
||||
const observe = vi.spyOn(ctx.sessionQuery, 'observeSession')
|
||||
for (const filter of [{ owner: 'unowned' }, { status: 'pending' }, { ready: true }, { limit: 1 }]) {
|
||||
const result = await execute(ctx, lead, 'team_task_list', filter)
|
||||
expect(result.isError).toBe(false)
|
||||
expect(JSON.parse(text(result)).tasks).toMatchObject([{ id: unowned.id }])
|
||||
expect(observe).not.toHaveBeenCalled()
|
||||
}
|
||||
for (const filter of [{ cursor: 2 }, { status: 'completed' }]) {
|
||||
expect(JSON.parse(text(await execute(ctx, lead, 'team_task_list', filter)))).toEqual({ tasks: [] })
|
||||
expect(observe).not.toHaveBeenCalled()
|
||||
}
|
||||
for (const filter of [{ cursor: -1 }, { limit: 101 }]) {
|
||||
expect((await execute(ctx, lead, 'team_task_list', filter)).isError).toBe(true)
|
||||
expect(observe).not.toHaveBeenCalled()
|
||||
}
|
||||
expect(JSON.parse(text(await execute(ctx, lead, 'team_task_list', { owner: ownerName, limit: 1 }))))
|
||||
.toMatchObject({ tasks: [{ id: task.id, ownerName }] })
|
||||
expect(JSON.parse(text(await execute(ctx, lead, 'team_task_list', { owner: ownerName, cursor: 1 }))))
|
||||
.toEqual({ tasks: [] })
|
||||
expect(JSON.parse(text(await execute(ctx, lead, 'team_task_list', { owner: 'lead/absent' }))))
|
||||
.toEqual({ tasks: [] })
|
||||
})
|
||||
|
||||
it.each(['release', 'reassign', 'reopen'] as const)('does not read the old owner for %s', async (action) => {
|
||||
const { ctx, lead, queryFiber } = await setup([textResponse('done')])
|
||||
const { task } = await taskWithSettledOwner(ctx, lead)
|
||||
const current = action === 'reopen'
|
||||
? await ctx.agentTeams.updateTask(lead, { taskId: task.id, expectedRevision: task.revision, action: 'complete' })
|
||||
: task
|
||||
await queryFiber.dispose()
|
||||
const result = await execute(ctx, lead, 'team_task_update', {
|
||||
task_id: task.id, expected_revision: current.revision, action,
|
||||
...action === 'reassign' ? { owner: 'lead' } : {},
|
||||
})
|
||||
expect(result.isError).toBe(false)
|
||||
if (action === 'reassign') expect(JSON.parse(text(result))).toMatchObject({ ownerName: 'lead' })
|
||||
else expect(JSON.parse(text(result))).not.toHaveProperty('ownerName')
|
||||
})
|
||||
|
||||
it('retains an uncataloged historical task owner as a legacy id', async () => {
|
||||
const { ctx, lead } = await setup([])
|
||||
const task = await ctx.agentTeams.createTask(lead, { subject: 'Review', description: 'Read old ownership' })
|
||||
|
||||
@@ -722,12 +722,14 @@ function verifyTeamTaskInbox(logs: readonly SessionLog[]): void {
|
||||
|| event.type === 'agent/inbox/spliced' && event.data.inserted.length > 0)).toBe(false)
|
||||
}
|
||||
const results = [...root, ...child].flatMap(event => event.type === 'tool/result' ? [event.data.message] : [])
|
||||
expect(results).toHaveLength(7)
|
||||
expect(results).toHaveLength(8)
|
||||
expect(results.every(result => result.isError === false)).toBe(true)
|
||||
expect(results.find(result => result.toolCallId === 'wait-past-change')?.content)
|
||||
.toEqual([{ type: 'text', text: '{"timedOut":true}' }])
|
||||
expect(results.find(result => result.toolCallId === 'wait-current-change')?.content)
|
||||
.toEqual([{ type: 'text', text: '{"timedOut":false}' }])
|
||||
expect(results.find(result => result.toolCallId === 'read-unowned')?.content)
|
||||
.toEqual([{ type: 'text', text: '{"tasks":[]}' }])
|
||||
}
|
||||
|
||||
/** Preserve successful native, program, direct-child, and workflow execution in one flow. */
|
||||
|
||||
@@ -3,31 +3,31 @@
|
||||
{"type":"sandbox/mode","data":{"mode":"danger-full-access","source":"delegation"}}
|
||||
{"type":"approval/policy","data":{"policy":"never","source":"delegation"}}
|
||||
{"type":"permission/preset","data":{"preset":"danger-full-access"}}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE."},{"type":"text","text":"Your name is \"lead/agent-1\". Your parent agent name is \"lead\". Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. Use send_message({ name: \"lead\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."}],"source":{"kind":"user"},"role":"user","id":"{{message:14}}"}]}}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"inserted":[{"content":[{"type":"text","text":"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE."},{"type":"text","text":"Your name is \"lead/agent-1\". Your parent agent name is \"lead\". Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. Use send_message({ name: \"lead\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."}],"source":{"kind":"user"},"role":"user","id":"{{message:16}}"}]}}
|
||||
{"type":"turn/start","data":{"turn":1}}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-turn","start":0,"removedCount":1,"inserted":[]}}
|
||||
{"type":"step/start","data":{"turn":1,"step":1}}
|
||||
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:15}}"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE."},{"type":"text","text":"Your name is \"lead/agent-1\". Your parent agent name is \"lead\". Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. Use send_message({ name: \"lead\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."}],"source":{"kind":"user"},"role":"user","id":"{{message:14}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nDelegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it.\n\nYour name is \"lead/agent-1\". You are a teammate in the Team led by \"lead\"."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"tool:subagent_fork:depth","text":"Delegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."},{"name":"team:identity","text":"Your name is \"lead/agent-1\". You are a teammate in the Team led by \"lead\"."}]},"role":"user","id":"{{message:16}}"},"surfaceOp":"append"}
|
||||
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:17}}"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE."},{"type":"text","text":"Your name is \"lead/agent-1\". Your parent agent name is \"lead\". Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. Use send_message({ name: \"lead\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."}],"source":{"kind":"user"},"role":"user","id":"{{message:16}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nDelegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it.\n\nYour name is \"lead/agent-1\". You are a teammate in the Team led by \"lead\"."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"tool:subagent_fork:depth","text":"Delegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."},{"name":"team:identity","text":"Your name is \"lead/agent-1\". You are a teammate in the Team led by \"lead\"."}]},"role":"user","id":"{{message:18}}"},"surfaceOp":"append"}
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}
|
||||
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
|
||||
{"type":"session/title","data":{"title":"Create a shared task titled","messageSeqs":[9],"source":{"kind":"fallback"}}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"create-task","name":"team_task_create","arguments":"{\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:17}}"},"stream":[{"type":"chunk","time":1792379633314,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792379633314,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"create-task","name":"team_task_create","arguments":"{\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\"}"}}},{"type":"chunk","time":1792379633314,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"create-task","name":"team_task_create","arguments":"{\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:19}}"},"stream":[{"type":"chunk","time":1792379633314,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792379633314,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"create-task","name":"team_task_create","arguments":"{\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\"}"}}},{"type":"chunk","time":1792379633314,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"create-task","name":"team_task_create","arguments":"{\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\"}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"create-task"},"toolCallId":"create-task","content":[{"type":"text","text":"{\"id\":\"task-1\",\"revision\":1,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"pending\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":true,\"writeScopeWarnings\":[]}"}],"isError":false,"id":"{{message:18}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"create-task"},"toolCallId":"create-task","content":[{"type":"text","text":"{\"id\":\"task-1\",\"revision\":1,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"pending\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":true,\"writeScopeWarnings\":[]}"}],"isError":false,"id":"{{message:20}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":1}}
|
||||
{"type":"step/start","data":{"turn":1,"step":2}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"claim-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":1,\"action\":\"claim\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:19}}"},"stream":[{"type":"chunk","time":1792379633344,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792379633344,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"claim-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":1,\"action\":\"claim\"}"}}},{"type":"chunk","time":1792379633344,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"claim-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":1,\"action\":\"claim\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:21}}"},"stream":[{"type":"chunk","time":1792379633344,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792379633344,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"claim-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":1,\"action\":\"claim\"}"}}},{"type":"chunk","time":1792379633344,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"claim-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":1,\"action\":\"claim\"}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"claim-task"},"toolCallId":"claim-task","content":[{"type":"text","text":"{\"id\":\"task-1\",\"revision\":2,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"in_progress\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":false,\"writeScopeWarnings\":[],\"ownerName\":\"lead/agent-1\"}"}],"isError":false,"id":"{{message:20}}"}},"sourceEventSeqs":[20],"surfaceOp":"append"}
|
||||
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"claim-task"},"toolCallId":"claim-task","content":[{"type":"text","text":"{\"id\":\"task-1\",\"revision\":2,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"in_progress\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":false,\"writeScopeWarnings\":[],\"ownerName\":\"lead/agent-1\"}"}],"isError":false,"id":"{{message:22}}"}},"sourceEventSeqs":[20],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":2}}
|
||||
{"type":"step/start","data":{"turn":1,"step":3}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"complete-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":2,\"action\":\"complete\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:21}}"},"stream":[{"type":"chunk","time":1792379633370,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792379633370,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"complete-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":2,\"action\":\"complete\"}"}}},{"type":"chunk","time":1792379633370,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"complete-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":2,\"action\":\"complete\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:23}}"},"stream":[{"type":"chunk","time":1792379633370,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792379633370,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"complete-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":2,\"action\":\"complete\"}"}}},{"type":"chunk","time":1792379633370,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":3,"callId":"complete-task","name":"team_task_update","arguments":"{\"task_id\":\"task-1\",\"expected_revision\":2,\"action\":\"complete\"}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":3,"message":{"role":"tool","source":{"kind":"tool","callId":"complete-task"},"toolCallId":"complete-task","content":[{"type":"text","text":"{\"id\":\"task-1\",\"revision\":3,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"completed\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":false,\"writeScopeWarnings\":[],\"ownerName\":\"lead/agent-1\"}"}],"isError":false,"id":"{{message:22}}"}},"sourceEventSeqs":[25],"surfaceOp":"append"}
|
||||
{"type":"tool/result","data":{"turn":1,"step":3,"message":{"role":"tool","source":{"kind":"tool","callId":"complete-task"},"toolCallId":"complete-task","content":[{"type":"text","text":"{\"id\":\"task-1\",\"revision\":3,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"completed\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":false,\"writeScopeWarnings\":[],\"ownerName\":\"lead/agent-1\"}"}],"isError":false,"id":"{{message:24}}"}},"sourceEventSeqs":[25],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":3}}
|
||||
{"type":"step/start","data":{"turn":1,"step":4}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":4,"message":{"role":"assistant","content":[{"type":"text","text":"TASK_DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:23}}"},"stream":[{"type":"chunk","time":1792379633404,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"chunk","time":1792379633405,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"TASK_DONE"}}},{"type":"chunk","time":1792379633405,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":4,"message":{"role":"assistant","content":[{"type":"text","text":"TASK_DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:25}}"},"stream":[{"type":"chunk","time":1792379633404,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"chunk","time":1792379633405,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"TASK_DONE"}}},{"type":"chunk","time":1792379633405,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":4}}
|
||||
{"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}}
|
||||
@@ -12,26 +12,26 @@
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}
|
||||
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
|
||||
{"type":"session/title","data":{"title":"Start one subagent to create,","messageSeqs":[8],"source":{"kind":"fallback"}}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"run-worker","name":"subagent","arguments":"{\"description\":\"Memory task worker\",\"prompt\":\"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"stream":[{"type":"chunk","time":1792389087972,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792389087972,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"run-worker","name":"subagent","arguments":"{\"description\":\"Memory task worker\",\"prompt\":\"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE.\"}"}}},{"type":"chunk","time":1792389087972,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"run-worker","name":"subagent","arguments":"{\"description\":\"Memory task worker\",\"prompt\":\"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"stream":[{"type":"chunk","time":1792479507631,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792479507631,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"run-worker","name":"subagent","arguments":"{\"description\":\"Memory task worker\",\"prompt\":\"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE.\"}"}}},{"type":"chunk","time":1792479507632,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"run-worker","name":"subagent","arguments":"{\"description\":\"Memory task worker\",\"prompt\":\"Create a shared task titled Check memory wake, claim it, complete it, then reply TASK_DONE.\"}"}}
|
||||
{"type":"subagent/catalog","data":{"version":0,"childId":"{{session:2}}","childCreatedAt":1792389087980,"mode":"continuable","label":"Memory task worker","name":"agent-1"}}
|
||||
{"type":"subagent/catalog","data":{"version":0,"childId":"{{session:2}}","childCreatedAt":1792479507639,"mode":"continuable","label":"Memory task worker","name":"agent-1"}}
|
||||
{"type":"team/task","data":{"version":2,"teamId":"{{session:1}}","task":{"id":"task-1","revision":1,"subject":"Check memory wake","description":"Complete this task while the root is waiting.","status":"pending","blockedBy":[],"writeScopes":[]}}}
|
||||
{"type":"team/task","data":{"version":2,"teamId":"{{session:1}}","task":{"id":"task-1","revision":2,"subject":"Check memory wake","description":"Complete this task while the root is waiting.","status":"in_progress","blockedBy":[],"writeScopes":[],"ownerId":"{{session:2}}"}}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"run-worker"},"toolCallId":"run-worker","content":[{"type":"text","text":"started subagent lead/agent-1"}],"isError":false,"id":"{{message:5}}"}},"sourceEventSeqs":[14],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":1}}
|
||||
{"type":"step/start","data":{"turn":1,"step":2}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"wait-past-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"stream":[{"type":"chunk","time":1792389088065,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792389088065,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"wait-past-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}}},{"type":"chunk","time":1792389088065,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"wait-past-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"stream":[{"type":"chunk","time":1792479507723,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792479507723,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"wait-past-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}}},{"type":"chunk","time":1792479507723,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"wait-past-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"wait-past-change"},"toolCallId":"wait-past-change","content":[{"type":"text","text":"{\"timedOut\":true}"}],"isError":false,"id":"{{message:7}}"}},"sourceEventSeqs":[22],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":2}}
|
||||
{"type":"step/start","data":{"turn":1,"step":3}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"wait-current-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"stream":[{"type":"chunk","time":1792389098084,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792389098084,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"wait-current-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}}},{"type":"chunk","time":1792389098084,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"wait-current-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"stream":[{"type":"chunk","time":1792479517771,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792479517771,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"wait-current-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}}},{"type":"chunk","time":1792479517771,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":3,"callId":"wait-current-change","name":"wait_agent","arguments":"{\"timeout_ms\":10000}"}}
|
||||
{"type":"team/task","data":{"version":2,"teamId":"{{session:1}}","task":{"id":"task-1","revision":3,"subject":"Check memory wake","description":"Complete this task while the root is waiting.","status":"completed","ownerId":"{{session:2}}","blockedBy":[],"writeScopes":[]}}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":3,"message":{"role":"tool","source":{"kind":"tool","callId":"wait-current-change"},"toolCallId":"wait-current-change","content":[{"type":"text","text":"{\"timedOut\":false}"}],"isError":false,"id":"{{message:9}}"}},"sourceEventSeqs":[27],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":3}}
|
||||
{"type":"step/start","data":{"turn":1,"step":4}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":4,"message":{"role":"assistant","content":[{"type":"tool-call","id":"read-board","name":"team_task_list","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:10}}"},"stream":[{"type":"chunk","time":1792389098119,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792389098119,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"read-board","name":"team_task_list","arguments":"{}"}}},{"type":"chunk","time":1792389098119,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":4,"message":{"role":"assistant","content":[{"type":"tool-call","id":"read-board","name":"team_task_list","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:10}}"},"stream":[{"type":"chunk","time":1792479517810,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792479517810,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"read-board","name":"team_task_list","arguments":"{}"}}},{"type":"chunk","time":1792479517810,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":4,"callId":"read-board","name":"team_task_list","arguments":"{}"}}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent lead/agent-1 finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"TASK_DONE"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent lead/agent-1 finished and will do no further work unless you send it more.","senderSessionId":"{{session:2}}"},"role":"user","id":"{{message:11}}"}]}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":4,"message":{"role":"tool","source":{"kind":"tool","callId":"read-board"},"toolCallId":"read-board","content":[{"type":"text","text":"{\"tasks\":[{\"id\":\"task-1\",\"revision\":3,\"subject\":\"Check memory wake\",\"description\":\"Complete this task while the root is waiting.\",\"status\":\"completed\",\"blockedBy\":[],\"writeScopes\":[],\"ready\":false,\"writeScopeWarnings\":[],\"ownerName\":\"lead/agent-1\"}]}"}],"isError":false,"id":"{{message:12}}"}},"sourceEventSeqs":[33],"surfaceOp":"append"}
|
||||
@@ -39,6 +39,11 @@
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}}
|
||||
{"type":"step/start","data":{"turn":1,"step":5}}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Background subagent lead/agent-1 finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"TASK_DONE"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent lead/agent-1 finished and will do no further work unless you send it more.","senderSessionId":"{{session:2}}"},"role":"user","id":"{{message:11}}"},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":5,"message":{"role":"assistant","content":[{"type":"text","text":"TASK_BOARD_OK"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:13}}"},"stream":[{"type":"chunk","time":1792389098156,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"chunk","time":1792389098156,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"TASK_BOARD_OK"}}},{"type":"chunk","time":1792389098156,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":5,"message":{"role":"assistant","content":[{"type":"tool-call","id":"read-unowned","name":"team_task_list","arguments":"{\"owner\":\"unowned\",\"limit\":1}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:13}}"},"stream":[{"type":"chunk","time":1792479517884,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792479517884,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"read-unowned","name":"team_task_list","arguments":"{\"owner\":\"unowned\",\"limit\":1}"}}},{"type":"chunk","time":1792479517884,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":5,"callId":"read-unowned","name":"team_task_list","arguments":"{\"owner\":\"unowned\",\"limit\":1}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":5,"message":{"role":"tool","source":{"kind":"tool","callId":"read-unowned"},"toolCallId":"read-unowned","content":[{"type":"text","text":"{\"tasks\":[]}"}],"isError":false,"id":"{{message:14}}"}},"sourceEventSeqs":[41],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":5}}
|
||||
{"type":"step/start","data":{"turn":1,"step":6}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":6,"message":{"role":"assistant","content":[{"type":"text","text":"TASK_BOARD_OK"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:15}}"},"stream":[{"type":"chunk","time":1792479517925,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"chunk","time":1792479517925,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"TASK_BOARD_OK"}}},{"type":"chunk","time":1792479517925,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":1,"step":6}}
|
||||
{"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}}
|
||||
Reference in new issue
Block a user