driver.ts 773 B

123456789101112131415161718192021
  1. #!/usr/bin/env node
  2. /** Test driver that sends two turns through one Headless Loader composition. */
  3. import { resolveConfigPath } from '@deepseek-ai/dsh-app-boot'
  4. import { runFixtureTurn } from '@deepseek-ai/dsh-loader-smoke'
  5. import { bootProductionProfile } from '../../../../test-support/loader-smoke/tests/fixtures/production-profile.ts'
  6. const configPath = process.argv[2]
  7. if (configPath === undefined) throw new Error('time-context driver requires a config path')
  8. const ctx = await bootProductionProfile({
  9. binName: 'time-context-e2e',
  10. profile: 'headless',
  11. overlayPaths: [resolveConfigPath(configPath, undefined)],
  12. })
  13. try {
  14. await runFixtureTurn(ctx, { task: 'first' })
  15. await runFixtureTurn(ctx, { task: 'second' })
  16. } finally {
  17. await ctx.fiber.dispose()
  18. }