Remove the Echo agent

This commit is contained in:
Tianyi Cui
2026-07-20 20:16:41 +08:00
parent 2191d45ece
commit 44ad2ef073
64 changed files with 230 additions and 483 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env node
/** Test driver that sends two turns through one Headless Loader composition. */
import { boot, resolveConfigPath } from '@deepseek-ai/dsh-app-boot'
import { runOneShot } from '@deepseek-ai/dsh-cli-demo/src/cli.ts'
const configPath = process.argv[2]
if (configPath === undefined) throw new Error('time-context driver requires a config path')
const ctx = await boot('time-context-e2e', resolveConfigPath(configPath, undefined))
try {
await runOneShot(ctx, { task: 'first' })
await runOneShot(ctx, { task: 'second' })
} finally {
await ctx.fiber.dispose()
}

View File

@@ -0,0 +1,22 @@
import type { Context } from 'cordis'
import { LlmAdapter, type StreamChunk } from '@deepseek-ai/dsh-llm'
/** Deterministic one-step adapter for the time-context Loader fixture. */
class TimeContextMockAdapter extends LlmAdapter {
async * stream(): AsyncIterable<StreamChunk> {
const text = 'time context sampled'
yield { type: 'block-start', index: 0, blockType: 'text' }
yield { type: 'text-delta', index: 0, text }
yield { type: 'block-end', index: 0, block: { type: 'text', text } }
yield { type: 'usage', usage: { inputTokens: 1, outputTokens: 1 } }
yield { type: 'finish', reason: { kind: 'stop' } }
}
}
export const name = 'time-context-mock-llm'
export const inject = ['llm']
/** Register the test-only `time-context-mock` adapter. */
export function apply(ctx: Context): void {
ctx.llm.registerAdapter(['time-context-mock'], new TimeContextMockAdapter())
}

View File

@@ -0,0 +1,18 @@
# Test-only composition: keep time-context opt-in while exercising its real Loader/app path.
- id: time-context-mock-llm
name: './time-context-mock-llm.ts'
- id: bash
name: '@deepseek-ai/dsh-bash-local'
- id: time-context
name: '@deepseek-ai/dsh-time-context'
- id: cli-agent
name: '@deepseek-ai/dsh-cli-demo'
config:
provider: time-context-mock
model: time-context-mock
persona: 'Test the time-context plugin.'
persistenceRoot: './.sessions'
workspaceContext: false