code-mode-keyless-smoke.e2e.ts 1.2 KB

123456789101112131415161718192021222324252627
  1. import { fileURLToPath } from 'node:url'
  2. import { describe, expect, it } from 'vitest'
  3. import { LOADER_SMOKE_TEST_TIMEOUT_MS, runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke'
  4. /**
  5. * Keyless Loader-path smoke for the Code Mode overlay: boot the real include
  6. * tree through stdio-agent and `code-mode.cordis.yml`, then close stdin without
  7. * a prompt and assert the banner. No model or `run_code` turn runs.
  8. */
  9. const binScript = fileURLToPath(new URL('../../../packages/examples/stdio-demo/src/bin.ts', import.meta.url))
  10. const configPath = fileURLToPath(new URL('../code-mode.cordis.yml', import.meta.url))
  11. const tsconfigPath = fileURLToPath(new URL('../../../tsconfig.json', import.meta.url))
  12. describe('code-mode overlay keyless smoke (real code-mode.cordis.yml via the Loader)', () => {
  13. it('boots the Code Mode plugin tree, prints its banner, and exits cleanly on EOF', async () => {
  14. const { stdout } = await runLoaderSmoke({
  15. label: 'code-mode overlay',
  16. tempDirPrefix: 'code-mode-smoke-',
  17. binScript,
  18. configPath,
  19. tsconfigPath,
  20. env: { DEEPSEEK_API_KEY: 'keyless-smoke-no-call' },
  21. })
  22. expect(stdout).toContain('code-mode agent ready.')
  23. }, LOADER_SMOKE_TEST_TIMEOUT_MS)
  24. })