Merge remote-tracking branch 'github/master' into feat/agent-event-payload
This commit is contained in:
@@ -8,7 +8,7 @@ import type { Context } from 'cordis'
|
||||
import z from 'schemastery'
|
||||
import { GoalId } from '@deepseek-ai/dsh-goal'
|
||||
import type { GoalRef, GoalView } from '@deepseek-ai/dsh-goal'
|
||||
import { createUserMessage, HarnessError } from '@deepseek-ai/dsh-llm'
|
||||
import { boundContextSummary, createUserMessage, HarnessError } from '@deepseek-ai/dsh-llm'
|
||||
import { defineTool } from '@deepseek-ai/dsh-tools'
|
||||
import type { GenericCallView } from '@deepseek-ai/dsh-tools'
|
||||
import type {} from '@deepseek-ai/dsh-system-prompt'
|
||||
@@ -315,7 +315,12 @@ export function apply(ctx: Context, config: Config): void {
|
||||
content: args.action === 'complete'
|
||||
? renderWrapupContext(goal.objective)
|
||||
: renderWrapupContext(goal.objective, args.blocked_reason as string),
|
||||
source: { kind: 'plugin', plugin: 'tool-goal' },
|
||||
source: {
|
||||
kind: 'plugin',
|
||||
plugin: 'tool-goal',
|
||||
form: 'notice',
|
||||
summary: boundContextSummary(`${args.action as string}: ${goal.objective}`),
|
||||
},
|
||||
}))
|
||||
}
|
||||
return Promise.resolve(goalValue(goal))
|
||||
|
||||
@@ -374,7 +374,12 @@ describe('goal tool state transitions', () => {
|
||||
expect(complete.concludesTurn).toBeUndefined()
|
||||
const contexts = complete.additionalContexts ?? []
|
||||
expect(contexts).toHaveLength(1)
|
||||
expect(contexts[0]?.source).toEqual({ kind: 'plugin', plugin: 'tool-goal' })
|
||||
expect(contexts[0]?.source).toEqual({
|
||||
kind: 'plugin',
|
||||
plugin: 'tool-goal',
|
||||
form: 'notice',
|
||||
summary: 'complete: pause cleanly',
|
||||
})
|
||||
const block = contexts[0]?.content[0]
|
||||
if (block?.type !== 'text') throw new Error('expected one text wrap-up block')
|
||||
expect(block.text).toContain('<goal_complete>')
|
||||
|
||||
Reference in New Issue
Block a user