Some checks failed
CI / windows node 24 / wine blocking (push) Has been skipped
CI / node 22.19 (push) Has been skipped
CI / node 26 (push) Has been skipped
CI / python 3.10 / keyless SDK (push) Has been skipped
CI / python runtime / release-shaped Linux x64 (push) Has been skipped
CI / wine apt cache (push) Successful in 7s
CI / serial / linux (push) Has been skipped
Deploy documentation / build (push) Failing after 1m25s
Deploy documentation / deploy (push) Has been skipped
Landlock Run / Matrix (push) Successful in 5s
Release (vendor) / Pack npm tarballs (push) Failing after 2m47s
Release (dsh) / Pack npm tarballs (push) Failing after 1m56s
Sandbox / sandbox e2e (landlock, ubuntu-24.04) (push) Failing after 1m57s
Sandbox / sandbox e2e (bwrap, ubuntu-latest) (push) Failing after 1m19s
Release (vendor) / Publish to npm (push) Has been skipped
Release (dsh) / Publish to npm (push) Has been skipped
CI / serial / windows (self-hosted standby) (push) Has been cancelled
CI / larger-runner-benchmark (16, linux, dsh-ubuntu-24-04-16core, typecheck) (push) Has been cancelled
Landlock Run / darwin (no platform package — degradation proof) (push) Has been cancelled
Landlock Run / ${{ matrix.platform }} (push) Has been cancelled
CI / node 24 / static (push) Has been cancelled
CI / node 24 / coverage (push) Has been cancelled
CI / node 24 / snapshots and artifacts (push) Has been cancelled
CI / windows node 24 / native complete (push) Has been cancelled
CI / serial / linux (self-hosted standby) (push) Has been cancelled
CI / serial / macos (push) Has been cancelled
CI / larger-runner-benchmark (16, windows, dsh-windows-2025-16core, production-site) (push) Has been cancelled
CI / larger-runner-benchmark (32, linux, dsh-ubuntu-24-04-32core, typecheck) (push) Has been cancelled
CI / larger-runner-benchmark (32, windows, dsh-windows-2025-32core, production-site) (push) Has been cancelled
CI / larger-runner-benchmark (4, linux, dsh-ubuntu-24-04-4core, typecheck) (push) Has been cancelled
CI / larger-runner-benchmark (4, windows, dsh-windows-2025-4core, production-site) (push) Has been cancelled
CI / larger-runner-benchmark (64, linux, dsh-ubuntu-24-04-64core, typecheck) (push) Has been cancelled
CI / larger-runner-benchmark (64, windows, dsh-windows-2025-64core, production-site) (push) Has been cancelled
CI / larger-runner-benchmark (8, windows, dsh-windows-2025-8core, production-site) (push) Has been cancelled
CI / larger-runner-benchmark (96, linux, dsh-ubuntu-24-04-96core, typecheck) (push) Has been cancelled
CI / larger-runner-benchmark (96, windows, dsh-windows-2025-96core, production-site) (push) Has been cancelled
CI / consolidated-runner-benchmark (16, linux, dsh-ubuntu-24-04-16core, 16) (push) Has been cancelled
CI / consolidated-runner-benchmark (16, windows, dsh-windows-2025-16core, 2) (push) Has been cancelled
CI / consolidated-runner-benchmark (32, linux, dsh-ubuntu-24-04-32core, 32) (push) Has been cancelled
CI / consolidated-runner-benchmark (32, windows, dsh-windows-2025-32core, 2) (push) Has been cancelled
CI / consolidated-runner-benchmark (4, linux, dsh-ubuntu-24-04-4core, 4) (push) Has been cancelled
CI / consolidated-runner-benchmark (4, windows, dsh-windows-2025-4core, 2) (push) Has been cancelled
CI / consolidated-runner-benchmark (64, linux, dsh-ubuntu-24-04-64core, 32) (push) Has been cancelled
CI / consolidated-runner-benchmark (64, windows, dsh-windows-2025-64core, 2) (push) Has been cancelled
CI / consolidated-runner-benchmark (8, linux, dsh-ubuntu-24-04-8core, 8) (push) Has been cancelled
CI / consolidated-runner-benchmark (8, windows, dsh-windows-2025-8core, 2) (push) Has been cancelled
CI / consolidated-runner-benchmark (96, linux, dsh-ubuntu-24-04-96core, 32) (push) Has been cancelled
CI / consolidated-runner-benchmark (96, windows, dsh-windows-2025-96core, 2) (push) Has been cancelled
CI / all checks passed (push) Has been cancelled
Sandbox / sandbox e2e (seatbelt, macos-latest) (push) Has been cancelled
CI / larger-runner-benchmark (8, linux, dsh-ubuntu-24-04-8core, typecheck) (push) Has been cancelled
Sandbox / sandbox e2e (landlock, ubuntu-24.04-arm) (push) Has been cancelled
E2E (real DeepSeek API) / e2e (push) Failing after 1m24s
- new economy and maximum agent presets with three-role pipeline skill - new packages/extensions/tool-lab (home-lab ComfyUI/Docling/Whishper tools) - new packages/subagent/subagent-cursor provider - openrouter balance UI with on-demand refresh - session projection context-seed boundary fold - regenerate docs catalogs; keep local searxng benchmark scripts
86 lines
4.0 KiB
TypeScript
86 lines
4.0 KiB
TypeScript
/**
|
|
* The bundle's substance is its patch file: the `dsh.bundle.patch` manifest
|
|
* field must name a real, parseable patch list.
|
|
*/
|
|
|
|
import { existsSync, readFileSync } from 'node:fs'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { resolve } from 'node:path'
|
|
import { describe, expect, it } from 'vitest'
|
|
import * as yaml from 'js-yaml'
|
|
import { entryListSchema } from '@deepseek-ai/cordis-plugin-include'
|
|
import { evaluate } from '@deepseek-ai/cordis-plugin-loader'
|
|
|
|
describe('dsh-base bundle', () => {
|
|
it('declares a parseable patch list through the dsh.bundle.patch manifest field', () => {
|
|
const root = fileURLToPath(new URL('..', import.meta.url))
|
|
const manifest = JSON.parse(
|
|
readFileSync(resolve(root, 'package.json'), 'utf8'),
|
|
) as {
|
|
dependencies?: Record<string, string>
|
|
dsh?: { bundle?: { patch?: string } }
|
|
}
|
|
expect(manifest.dsh?.bundle?.patch).toBe('./cordis.patch.yml')
|
|
const parsed = yaml.load(
|
|
readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8'),
|
|
{ schema: entryListSchema },
|
|
)
|
|
expect(Array.isArray(parsed)).toBe(true)
|
|
// The base layer is one insert list over the empty profile root.
|
|
const rows = (parsed as { insert?: { id?: string; config?: Record<string, unknown> }[] }[]).flatMap(
|
|
patch => patch.insert ?? [],
|
|
)
|
|
expect(rows.length).toBeGreaterThan(50)
|
|
expect(rows.some(row => row.id === 'agent-loop')).toBe(true)
|
|
expect(rows.find(row => row.id === 'session-telemetry-otel')?.config?.['mode']).toEqual({
|
|
__jsExpr: "process.env.DSH_TELEMETRY_MODE || 'DISABLED'",
|
|
})
|
|
// The base layer mounts each external product agent exactly once, so a
|
|
// Profile enables one by removing `disabled` from its Agent Preset tool
|
|
// row rather than mounting a duplicate provider. Loading a provider starts
|
|
// no product process; a run still needs that product's own CLI on PATH.
|
|
for (const [id, dependency] of [
|
|
['subagent-codex', '@deepseek-ai/dsh-subagent-codex'],
|
|
['subagent-claude-code', '@deepseek-ai/dsh-subagent-claude-code'],
|
|
['subagent-cursor', '@deepseek-ai/dsh-subagent-cursor'],
|
|
] as const) {
|
|
expect(rows.filter(row => row.id === id)).toHaveLength(1)
|
|
expect(manifest.dependencies).toHaveProperty(dependency)
|
|
}
|
|
})
|
|
|
|
it('gates each shell stack by platform with a symmetric disabled expression', () => {
|
|
const root = fileURLToPath(new URL('..', import.meta.url))
|
|
const parsed = yaml.load(
|
|
readFileSync(resolve(root, 'cordis.patch.yml'), 'utf8'),
|
|
{ schema: entryListSchema },
|
|
)
|
|
if (!Array.isArray(parsed)) throw new TypeError('base patch must parse to a patch list')
|
|
const rows = parsed.flatMap((patch): Record<string, unknown>[] =>
|
|
typeof patch === 'object' && patch !== null
|
|
? (patch as { insert?: Record<string, unknown>[] }).insert ?? []
|
|
: [],
|
|
)
|
|
// Symmetric gating: each stack's executor and tool rows carry the same
|
|
// platform fact, inverted between the bash and pwsh twins, so exactly one
|
|
// shell stack mounts per host. Evaluate with a platform-scoped context
|
|
// (the `with` scope shadows the global `process`) so both outcomes pin on
|
|
// every host.
|
|
for (const [id, win32, linux] of [
|
|
['bash-sandbox', true, false],
|
|
['tool-bash', true, false],
|
|
['pwsh-sandbox', false, true],
|
|
['tool-pwsh', false, true],
|
|
] as const) {
|
|
const row = rows.find(candidate => candidate.id === id)
|
|
if (row === undefined) throw new Error(`base patch must mount ${id}`)
|
|
const expression = (row.disabled as { __jsExpr?: string } | undefined)?.__jsExpr
|
|
if (expression === undefined) throw new Error(`${id} must gate on a !!js disabled expression`)
|
|
expect(Boolean(evaluate({ process: { platform: 'win32' } }, expression)), `${id} on win32`).toBe(win32)
|
|
expect(Boolean(evaluate({ process: { platform: 'linux' } }, expression)), `${id} on linux`).toBe(linux)
|
|
}
|
|
// The platform layer folded into these rows: no separate patch file ships.
|
|
expect(existsSync(resolve(root, 'windows.cordis.patch.yml'))).toBe(false)
|
|
})
|
|
})
|