Merge origin/master into xjt/incremental-proofreading-275-apply

This commit is contained in:
xjt
2026-08-09 12:17:59 +08:00
47 changed files with 1433 additions and 202 deletions

View File

@@ -1,9 +1,19 @@
// Generated by dsh-plugin-prepare. Do not edit.
const manifest = {"name":"headless-repository-fixture","skills":["dsh-plugin-assets/skills/0"]}
// Value mirror: Cordis const enum FiberState.ACTIVE; keep aligned with dsh-repository-plugin source.ts.
const FIBER_ACTIVE = 2
export const name = "headless-repository-fixture"
export const inject = ["loader","skills"]
async function mount(ctx, plugin, label, config) {
const fiber = ctx.plugin(plugin, config)
await fiber
if (fiber.state !== FIBER_ACTIVE) {
const missing = Object.keys(fiber.inject).filter(service => fiber.ctx.get(service) === undefined)
throw new Error(`${label} did not activate (waiting for services: ${missing.join(', ') || 'unknown'})`)
}
}
export async function apply(ctx) {
const runtime = ctx.loader.builtins["dsh-repository-plugin"]
if (runtime === undefined) throw new Error("missing Cordis builtin dsh-repository-plugin")
await ctx.plugin(runtime, { baseUrl: import.meta.url, manifest })
await mount(ctx, runtime, 'repository Plugin runtime', { baseUrl: import.meta.url, manifest })
}

View File

@@ -6,7 +6,12 @@ import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { LOADER_SMOKE_TEST_TIMEOUT_MS, runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke'
import { PREPARED_ENTRY_FILENAME, prepareDshPlugin } from '@deepseek-ai/dsh-repository-plugin'
import {
PREPARED_ENTRY_FILENAME,
REPOSITORY_PLUGIN_PREPARE_COMMAND,
REPOSITORY_PLUGIN_PACKAGE_NAME,
prepareDshPlugin,
} from '@deepseek-ai/dsh-repository-plugin'
import type { SessionEvent } from '@deepseek-ai/dsh-session'
const binScript = fileURLToPath(new URL('./fixtures/headless-driver.ts', import.meta.url))
@@ -72,6 +77,8 @@ describe('headless-agent keyless smoke', () => {
await writeFile(join(plugin, 'package.json'), `${JSON.stringify({
name: 'headless-repository-fixture',
version: '0.0.0',
scripts: { prepack: REPOSITORY_PLUGIN_PREPARE_COMMAND },
devDependencies: { [REPOSITORY_PLUGIN_PACKAGE_NAME]: '0.0.1' },
dsh: { skills: ['../skills'] },
}, undefined, 2)}\n`)
await prepareDshPlugin(plugin)