* feat(forge): let providers declare their hosts, names, sign-in, and review decisions Prepare the forge contract for a second provider: - ForgeProvider lists the hosts it serves and names itself (label, changeRequestNoun); registering a provider that lists a host another registered provider lists throws, so each URL has at most one provider. ctx.forge.describe(forge) returns the family's ForgeDescription. - ForgeReadiness carries the sign-in command, which the panel's sign-in banner shows instead of building `gh auth login` for the github family. - ForgeReviewData lists the review decisions the host lets the reader record; the review dialog offers only those instead of hardcoding the GitHub rule that a pull request's author may only comment. - ForgeReviewThread.original may name a later commit the host carried the thread to while its lines stayed unchanged. - The changes view names the code host and its word for a change request from the entry's ForgeDescription instead of hardcoding GitHub and PR. The GitHub provider declares its configured hosts, GitHub, pull requests, `gh auth login --hostname <host>`, and reads viewerDidAuthor for the review decisions. Upgrade guide: forge-provider-hosts. * feat(forge-gitlab): read GitLab merge requests through the GitLab CLI Add the experimental forge-gitlab provider. It serves the configured GitLab hosts through glab: status batches over GraphQL, head-pinned patches from merge request diff versions, commit listings, merge bases, pipeline jobs, closing issues, and review threads mapped from REST discussions, including outdated threads' hunks. The forge bundle composes the provider, disabled by default. * feat(forge-gitlab): write GitLab reviews, retry pipelines, request reviews, and rebase The GitLab provider now writes through glab as well as reading: comments start discussions at positions derived from the head's diff version, pending replies and comments are draft notes that a review publishes with its summary and review state, and approving checks the head through GitLab's sha parameter. Review reads carry the signed-in user's rights from GraphQL, their draft notes as the pending review, and the decisions GitLab lets them record. Snapshots name the head pipeline as every job's rerun, offer rebase as the branch update, and follow GitLab's permissions for reruns and review requests. updateBranch's contract now states how a provider whose host takes no expected head checks it. * feat(forge): let forge providers register the commands that bind change requests forge-session no longer recognizes gh commands by itself. A provider now registers a declarative ForgeCommandRule through ctx.forgeSession.registerCommands: its executable, creation and reference subcommands, change request page path, JSON URL members, declared options, and a pure select that maps one parsed reference command to a URL or a read-only lookup. forge-github registers gh and forge-gitlab registers glab, which adds glab mr create, view, update, and checkout, including numbers with -R: a full project URL binds directly, and other repository forms resolve through glab mr view in the call's shell. forge-session keeps the shared parts: the literal shell tokenizer, option parsing, output reading, lookups, and the projection. The forgeChangeRequests state version derives from the recognized rules, so a changed rule set refolds every Session, including commands that ran before the provider loaded. Ending a registration keeps its rule recognized until restart, so unloading providers at shutdown does not rewrite every checkpoint. * refactor(forge-gitlab): publish the GitLab provider as @deepseek-ai/dsh-forge-gitlab New experimental packages omit the experimental prefix so that promotion keeps their npm name. Register the directory in EXPERIMENTAL_PACKAGE_NAME_EXCEPTIONS instead of growing the legacy prefixed list, and rename every dependency, configuration row, path mapping, and document that names the package. * fix(forge-gitlab): keep review writes, comment positions, and reads within GitLab's facts and the limits - After GitLab refuses a publication, read the drafts again: delete them only when all remain, since GitLab can publish them before it refuses the summary, and report the outcome as unknown otherwise. A rollback that leaves drafts reports how many may remain. - Place comments on files GitLab collapsed through the diff compared from their texts, and let a file's new path name it over another file's old path after chained renames. - Keep the final newline of raw file reads. - Apply maxOutputBytes to the complete review result, and report a read whose rights stop early or skip a discussion's later notes as truncated. - Serve a version over maxCachedVersionBytes without keeping it. - Resolve uploaded avatars GitLab names by their path on the host. - Schedule bounded reads through p-limit. * fix(forge-session): run lookups only for live command rules and keep the projection registered - Reference lookups use the rules of live registrations, so a disposed provider's rule still folds but starts no gh or glab process. - A failed re-registration registers the projection again with the earlier rules, so clients keep its view; an error is logged only when that fails too. - Document the startup re-registration, test that the checkpointed state version survives a real Loader start, shutdown, and restart, and record that starting without a provider removes the bindings only its commands made. - Describe the changes view's pending review and single comment without naming GitHub, which keeps its own rule in forge-github, and render registerCommands as code in the generated service reference. * fix(forge-bundle): name GitLab merge requests in the bundle description The bundle now follows GitLab merge requests as well as GitHub pull requests, so the description's first sentence in every locale names both kinds of change request. * feat(forge): bind the change requests that gh api and glab api requests name Models often read a merge request through `glab api` or a pull request through `gh api` instead of `glab mr view` or `gh pr view`, which left the change request unbound. A command rule now declares raw API request subcommands beside its reference subcommands, each group with its own options, since `-f` is a value of `gh api` and a flag of `gh pr checkout`. An API request binds, as referenced, only the change request its REST path names, such as `projects/group%2Fapp/merge_requests/7/changes` or `repos/octo/demo/pulls/7/files`; its output is not read, since one request can list many change requests. A path whose host the command names binds directly, and one without a host, or with the current repository's placeholders, resolves through the CLI's view command in the call's shell. The gh and glab rules move to version 2. * docs(forge): add forge-gitlab and the forge-session peers to the module graph Regenerate docs/module-graph for the renamed GitLab provider and the optional forge-session peer of both providers. * test(web): refresh the forge bundle description in the recommended plugin catalog The creation recommendation recording carries every recommended plugin's description; refresh it for the forge bundle description that now names GitLab merge requests and the glab sign-in. * chore(forge-gitlab): carry the 0.2.2-rc.3 release version and move upgrade guides to v0.2.2-rc.3
316 lines
17 KiB
TypeScript
316 lines
17 KiB
TypeScript
/** The delivered Web composition's Schedule rows, the optional bundles it ships switched off, and their display metadata. */
|
|
|
|
import { globSync, mkdtempSync, readFileSync, rmSync } from 'node:fs'
|
|
import { tmpdir } from 'node:os'
|
|
import { dirname, join, resolve } from 'node:path'
|
|
import { pathToFileURL } from 'node:url'
|
|
import { describe, expect, it, onTestFinished } from 'vitest'
|
|
import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader'
|
|
import { loadOverlayPatches } from '../packages/boot/app-boot/src/index.ts'
|
|
import { readPluginMeta } from '../packages/boot/app-boot/src/package-meta.ts'
|
|
import { bundlePatchPaths, composeEntries, initProfile, readProfileManifest } from '../packages/boot/app-boot/src/profile.ts'
|
|
import { OPTIONAL_BUNDLES, PROFILE_TEMPLATES } from '../packages/util/official-bundles/src/bundles.ts'
|
|
import { HIDDEN_BUNDLES } from '../packages/util/official-bundles/src/plugin-manager.ts'
|
|
import type { DshBundleManifest } from '../packages/util/package-manifest/src/types.ts'
|
|
import { createPluginProfile } from '../apps/desktop/src/project-manager.ts'
|
|
|
|
const root = resolve(import.meta.dirname, '..')
|
|
|
|
interface Manifest {
|
|
name: string
|
|
dsh?: { bundle?: DshBundleManifest }
|
|
}
|
|
|
|
const bundles = new Map(globSync('packages/*/*/package.json', { cwd: root }).map((path) => {
|
|
const manifest = JSON.parse(readFileSync(resolve(root, path), 'utf8')) as Manifest
|
|
return [manifest.name, { dir: dirname(resolve(root, path)), manifest }]
|
|
}))
|
|
|
|
function bundle(name: string): { dir: string; patches: ReturnType<typeof loadOverlayPatches> } {
|
|
const entry = bundles.get(name)
|
|
if (entry?.manifest.dsh?.bundle === undefined) throw new Error(`${name} is not a workspace bundle`)
|
|
return { dir: entry.dir, patches: bundlePatchPaths(entry.dir, entry.manifest.dsh.bundle).flatMap(path => loadOverlayPatches('test', path)) }
|
|
}
|
|
|
|
/** Optional bundles that compose a profile of their own; the plugin page hides them, the Host inventory still reports them. */
|
|
const STANDALONE_PROFILE_BUNDLES: readonly string[] = ['@deepseek-ai/dsh-cua-mcp']
|
|
|
|
const lightweight = [
|
|
'@deepseek-ai/dsh-experimental-session-search',
|
|
'@deepseek-ai/dsh-experimental-ralph-bundle',
|
|
'@deepseek-ai/dsh-experimental-terminal-bundle',
|
|
'@deepseek-ai/dsh-experimental-badge-skill-bundle',
|
|
'@deepseek-ai/dsh-experimental-session-titles-bundle',
|
|
]
|
|
|
|
function presetRows(entries: EntryOptions[], id: string): EntryOptions[] {
|
|
const preset = entries.find(entry => entry.id === id)
|
|
if (preset === undefined) throw new Error(`missing preset ${id}`)
|
|
return (preset.config as { plugins: EntryOptions[] }).plugins
|
|
}
|
|
|
|
function flattenRows(entries: EntryOptions[]): EntryOptions[] {
|
|
return entries.flatMap(entry => [entry, ...entry.group && Array.isArray(entry.config) ? flattenRows(entry.config as EntryOptions[]) : []])
|
|
}
|
|
|
|
function profileLayers(surface: 'web' | 'desktop'): ReturnType<typeof loadOverlayPatches>[] {
|
|
const directory = mkdtempSync(join(tmpdir(), 'dsh-bundle-compatibility-'))
|
|
onTestFinished(() => { rmSync(directory, { recursive: true, force: true }) })
|
|
if (surface === 'desktop') createPluginProfile(directory)
|
|
else initProfile(directory, PROFILE_TEMPLATES.web!.bundles)
|
|
const names = readProfileManifest('test', directory).dsh?.profile?.bundles
|
|
if (names === undefined) throw new Error(`${surface} profile has no bundle list`)
|
|
return names.map(name => bundle(name).patches)
|
|
}
|
|
|
|
describe.each(['web', 'desktop'] as const)('%s optional bundle overrides', (surface) => {
|
|
const selectedNames = ['@deepseek-ai/dsh-experimental-badge-skill-bundle', '@deepseek-ai/dsh-experimental-ralph-bundle']
|
|
|
|
it('keeps established selectors for later configuration and disabled overrides', () => {
|
|
const shipped = profileLayers(surface)
|
|
const config = { subagentProvider: 'spawn', maxRounds: 3 }
|
|
const warnings: string[] = []
|
|
const entries = composeEntries([...shipped, ...selectedNames.map(name => bundle(name).patches), [
|
|
{ id: 'skill-badge', disabled: true },
|
|
{ id: 'tool-ralph', config, disabled: true },
|
|
]], warning => warnings.push(warning))
|
|
expect(warnings).toEqual([])
|
|
expect(entries.find(row => row.id === 'skill-badge')).toMatchObject({ name: '@deepseek-ai/dsh-skill-badge', disabled: true })
|
|
expect(flattenRows(entries).find(row => row.id === 'tool-ralph'))
|
|
.toMatchObject({ name: '@deepseek-ai/dsh-tool-ralph', config, disabled: true })
|
|
expect(entries.find(row => row.id === 'optional-ralph')?.isolate).toEqual({ workflowEngine: true })
|
|
})
|
|
|
|
it('does not select absent bundles through enable-only row overrides', () => {
|
|
const warnings: string[] = []
|
|
const entries = composeEntries([...profileLayers(surface), [
|
|
{ id: 'skill-badge', disabled: false },
|
|
{ id: 'tool-ralph', disabled: false },
|
|
]], warning => warnings.push(warning))
|
|
expect(warnings).toHaveLength(2)
|
|
expect(warnings.some(warning => warning.includes('skill-badge'))).toBe(true)
|
|
expect(warnings.some(warning => warning.includes('tool-ralph'))).toBe(true)
|
|
expect(entries.some(row => row.id === 'skill-badge')).toBe(false)
|
|
expect(flattenRows(entries).some(row => row.id === 'tool-ralph')).toBe(false)
|
|
})
|
|
})
|
|
|
|
describe('optional bundles', () => {
|
|
it('admits Computer Use on macOS and native Windows Hosts', () => {
|
|
expect(bundles.get('@deepseek-ai/dsh-cua-bundle')?.manifest.dsh?.bundle?.platforms).toEqual(['darwin', 'win32'])
|
|
})
|
|
const shipped = ['@deepseek-ai/dsh-base', '@deepseek-ai/dsh-web-app'].map(name => bundle(name).patches)
|
|
|
|
it('ships at least one bundle switched off', () => {
|
|
expect(OPTIONAL_BUNDLES.length).toBeGreaterThan(0)
|
|
})
|
|
|
|
it('keeps the Inspector out of the default plugin list', () => {
|
|
expect(OPTIONAL_BUNDLES).not.toContain('@deepseek-ai/dsh-experimental-inspector')
|
|
})
|
|
|
|
it.each(['web', 'desktop'] as const)('requires explicit selection of Timeline on %s', (surface) => {
|
|
const name = '@deepseek-ai/dsh-timeline'
|
|
const layers = profileLayers(surface)
|
|
expect(OPTIONAL_BUNDLES).toContain(name)
|
|
expect(flattenRows(composeEntries(layers)).some(row => row.name === name)).toBe(false)
|
|
expect(flattenRows(composeEntries([...layers, bundle(name).patches])))
|
|
.toContainEqual(expect.objectContaining({ id: 'timeline-experimental', name }))
|
|
})
|
|
|
|
// A bundle that composes a profile of its own is never layered over a GUI profile; HIDDEN_BUNDLES keeps it off the plugin page.
|
|
const standalone = OPTIONAL_BUNDLES.filter(name => STANDALONE_PROFILE_BUNDLES.includes(name))
|
|
const layered = OPTIONAL_BUNDLES.filter(name => !standalone.includes(name))
|
|
|
|
it.each(standalone)('%s composes its own profile alone over the empty root and stays off the plugin page', (name) => {
|
|
const { patches } = bundle(name)
|
|
const warnings: string[] = []
|
|
const composed = composeEntries([patches], message => warnings.push(message))
|
|
expect(warnings).toEqual([])
|
|
const topLevelIds = composed.flatMap(entry => typeof entry.id === 'string' ? [entry.id] : [])
|
|
expect(topLevelIds.length).toBeGreaterThan(0)
|
|
expect(topLevelIds).toHaveLength(new Set(topLevelIds).size)
|
|
expect(HIDDEN_BUNDLES).toContain(name)
|
|
})
|
|
|
|
it.each(layered)('%s composes over the Web profile without a skipped patch', (name) => {
|
|
const { patches } = bundle(name)
|
|
const warnings: string[] = []
|
|
const composed = composeEntries([...shipped, patches], message => warnings.push(message))
|
|
expect(warnings).toEqual([])
|
|
// Inserted ids remain addressable in the composed profile tree.
|
|
const ids = new Set(flattenRows(composed).map(entry => entry.id))
|
|
for (const patch of patches) {
|
|
for (const row of patch.insert ?? []) {
|
|
expect(typeof row.id).toBe('string')
|
|
expect(ids.has(row.id)).toBe(true)
|
|
}
|
|
}
|
|
// One top-level row per id: a duplicate declaration leaves the Loader with the last one, silently
|
|
// replacing the layer that declared the id first.
|
|
const topLevelIds = composed.flatMap(entry => typeof entry.id === 'string' ? [entry.id] : [])
|
|
expect(topLevelIds).toHaveLength(new Set(topLevelIds).size)
|
|
// An id-targeted patch reaches a row another layer inserted: the id resolves to exactly one top-level
|
|
// row, and the override keeps the package the shipped layer declared on it.
|
|
const shippedComposed = composeEntries([...shipped])
|
|
for (const patch of patches) {
|
|
if (patch.insert !== undefined || typeof patch.id !== 'string') continue
|
|
const matches = composed.filter(entry => entry.id === patch.id)
|
|
expect(matches).toHaveLength(1)
|
|
expect(matches[0]?.name).toBe(shippedComposed.find(entry => entry.id === patch.id)?.name)
|
|
}
|
|
})
|
|
|
|
it('retains the standalone worktree bundle for explicit profiles', () => {
|
|
const name = '@deepseek-ai/dsh-experimental-tool-worktree'
|
|
expect(OPTIONAL_BUNDLES).toContain(name)
|
|
for (const template of Object.values(PROFILE_TEMPLATES)) expect(template.bundles).not.toContain(name)
|
|
const rows = composeEntries([...shipped, bundle(name).patches])
|
|
for (const moduleName of [name, '@deepseek-ai/dsh-experimental-worktree']) {
|
|
expect(composeEntries(shipped).some(row => row.name === moduleName)).toBe(false)
|
|
expect(rows.filter(row => row.name === moduleName && row.disabled !== true)).toHaveLength(1)
|
|
}
|
|
})
|
|
|
|
it('offers the forge panel and model worktree tool together over one worktree service', () => {
|
|
const name = '@deepseek-ai/dsh-experimental-forge-bundle'
|
|
expect(OPTIONAL_BUNDLES).toContain(name)
|
|
for (const template of Object.values(PROFILE_TEMPLATES)) expect(template.bundles).not.toContain(name)
|
|
const rows = flattenRows(composeEntries([...shipped, bundle(name).patches]))
|
|
for (const moduleName of [
|
|
'@deepseek-ai/dsh-experimental-forge',
|
|
'@deepseek-ai/dsh-experimental-forge-github',
|
|
'@deepseek-ai/dsh-forge-gitlab',
|
|
'@deepseek-ai/dsh-experimental-forge-session',
|
|
'@deepseek-ai/dsh-experimental-client-ui-forge',
|
|
'@deepseek-ai/dsh-experimental-tool-worktree',
|
|
]) {
|
|
expect(flattenRows(composeEntries(shipped)).some(row => row.name === moduleName)).toBe(false)
|
|
expect(rows.filter(row => row.name === moduleName && row.disabled !== true)).toHaveLength(1)
|
|
}
|
|
expect(composeEntries([...shipped, bundle(name).patches]).some(row => row.name === 'cordis:group' && row.id === 'optional-forge-panel')).toBe(false)
|
|
expect(rows.filter(row => row.name === '@deepseek-ai/dsh-experimental-worktree')).toHaveLength(1)
|
|
})
|
|
|
|
it('keeps the existing tool and panel row overrides addressable in the unified bundle', () => {
|
|
const config = { directory: '.agents/custom-worktrees' }
|
|
const warnings: string[] = []
|
|
const composed = composeEntries([...shipped, bundle('@deepseek-ai/dsh-experimental-forge-bundle').patches, [
|
|
{ id: 'worktree', config },
|
|
{ id: 'tool-worktree', disabled: true },
|
|
{ id: 'forge-panel', disabled: true },
|
|
]], message => warnings.push(message))
|
|
expect(warnings).toEqual([])
|
|
expect(composed.find(row => row.id === 'worktree')?.config).toEqual(config)
|
|
expect(composed.find(row => row.id === 'tool-worktree')?.disabled).toBe(true)
|
|
expect(composed.find(row => row.id === 'forge-panel')?.disabled).toBe(true)
|
|
})
|
|
|
|
it('ships all five lightweight bundles without selecting them in a default template', () => {
|
|
const defaults = Object.values(PROFILE_TEMPLATES).flatMap(template => template.bundles)
|
|
for (const name of lightweight) {
|
|
expect(OPTIONAL_BUNDLES).toContain(name)
|
|
expect(defaults).not.toContain(name)
|
|
}
|
|
})
|
|
|
|
it('composes every lightweight selection as Host rows without changing any preset', () => {
|
|
const baseline = composeEntries(shipped)
|
|
const layers = lightweight.map(name => bundle(name).patches)
|
|
for (let mask = 0; mask < 2 ** lightweight.length; mask += 1) {
|
|
const selected = layers.filter((_layer, index) => (mask & 2 ** index) !== 0)
|
|
const warnings: string[] = []
|
|
const composed = composeEntries([...shipped, ...selected], warning => warnings.push(warning))
|
|
expect(warnings).toEqual([])
|
|
for (const id of ['preset-standard', 'preset-cordis', 'preset-ptc', 'preset-minimal']) {
|
|
expect(presetRows(composed, id)).toEqual(presetRows(baseline, id))
|
|
}
|
|
const ids = flattenRows(composed).map(row => row.id)
|
|
expect(new Set(ids).size).toBe(ids.length)
|
|
}
|
|
})
|
|
|
|
it('contributes global tools from Host rows with independently isolated services', () => {
|
|
const composed = composeEntries([...shipped, ...lightweight.map(name => bundle(name).patches)])
|
|
const names = flattenRows(composed).map(row => row.name)
|
|
for (const name of [
|
|
'@deepseek-ai/dsh-tool-session-query',
|
|
'@deepseek-ai/dsh-tool-ralph', '@deepseek-ai/dsh-tool-terminal',
|
|
]) expect(names).toContain(name)
|
|
expect(composed.find(row => row.id === 'optional-ralph')?.isolate).toEqual({ workflowEngine: true })
|
|
expect(composed.find(row => row.id === 'optional-persistent-terminals')?.isolate).toEqual({ terminals: true })
|
|
const search = composed.find(row => row.id === 'optional-session-search')
|
|
expect(search?.isolate).toEqual({ sessionQuery: true })
|
|
expect(search?.config).toEqual([
|
|
{ id: 'optional-session-query-sqlite', name: '@deepseek-ai/dsh-session-query-sqlite', config: { path: ':memory:', openAt: 'first-search' } },
|
|
{ id: 'optional-tool-session-query', name: '@deepseek-ai/dsh-tool-session-query' },
|
|
])
|
|
expect(composed.find(row => row.id === 'session-query-sqlite')?.config).toEqual({ path: ':memory:', openAt: 'never' })
|
|
expect(composed.find(row => row.id === 'session-title-llm')?.disabled).toBe(true)
|
|
expect(composed.find(row => row.id === 'optional-session-title-all-prompts')?.name)
|
|
.toBe('@deepseek-ai/dsh-session-title-all-prompts-llm')
|
|
})
|
|
|
|
it('delivers the Schedule service and task page without a Host clock row', () => {
|
|
const composed = composeEntries(shipped)
|
|
// The delivered composition carries the Host Schedule service and its task
|
|
// page enabled; the clock stays preset-level, so no Host row declares it.
|
|
for (const row of [
|
|
{ id: 'schedule', name: '@deepseek-ai/dsh-schedule' },
|
|
{ id: 'ui-schedule', name: '@deepseek-ai/dsh-client-ui-schedule' },
|
|
]) {
|
|
expect(composed.filter(entry => entry.id === row.id && entry.name === row.name && entry.disabled !== true))
|
|
.toHaveLength(1)
|
|
}
|
|
expect(composed.some(entry => entry.id === 'time-context')).toBe(false)
|
|
})
|
|
|
|
it('keeps the clock and the reminder tools on the presets that declare them', () => {
|
|
const composed = composeEntries(shipped)
|
|
type PresetRow = { id?: string; name?: string; disabled?: boolean; config?: unknown }
|
|
const presetPlugins = (id: string): PresetRow[] => {
|
|
const row = composed.find(entry => entry.id === id)
|
|
if (row === undefined) throw new Error(`missing delivered preset row ${id}`)
|
|
const flat: PresetRow[] = []
|
|
// A `cordis:group` row nests its children in its own `config` array.
|
|
const walk = (rows: PresetRow[]): void => {
|
|
for (const entry of rows) {
|
|
flat.push(entry)
|
|
if (Array.isArray(entry.config)) walk(entry.config as PresetRow[])
|
|
}
|
|
}
|
|
walk((row.config as { plugins: PresetRow[] }).plugins)
|
|
return flat
|
|
}
|
|
for (const id of ['preset-standard', 'preset-cordis', 'preset-ptc']) {
|
|
const plugins = presetPlugins(id)
|
|
for (const plugin of [
|
|
{ id: 'time-context', name: '@deepseek-ai/dsh-time-context' },
|
|
{ id: 'tool-schedule', name: '@deepseek-ai/dsh-tool-schedule' },
|
|
]) {
|
|
const matches = plugins.filter(row => row.id === plugin.id && row.name === plugin.name)
|
|
expect(matches).toHaveLength(1)
|
|
expect(matches[0]?.disabled).not.toBe(true)
|
|
}
|
|
}
|
|
for (const id of ['preset-standard', 'preset-cordis', 'preset-ptc']) {
|
|
for (const rowId of ['tool-subagent', 'tool-subagent-fork']) {
|
|
expect(presetPlugins(id).find(plugin => plugin.id === rowId)?.config).not.toHaveProperty('toolFilter')
|
|
}
|
|
}
|
|
// `minimal` declares neither, so it composes no clock reading and no reminder tool.
|
|
expect(presetPlugins('preset-minimal').some(row => row.name === '@deepseek-ai/dsh-time-context'
|
|
|| row.name === '@deepseek-ai/dsh-tool-schedule')).toBe(false)
|
|
})
|
|
|
|
it.each(OPTIONAL_BUNDLES)('%s resolves a title, description, and icon in both shipped languages', (name) => {
|
|
const meta = readPluginMeta(name, pathToFileURL(`${bundle(name).dir}/package.json`).href)
|
|
expect(meta?.error).toBeUndefined()
|
|
for (const field of [meta?.title, meta?.description]) {
|
|
expect(typeof field).toBe('object')
|
|
for (const language of ['en', 'zh']) expect((field as Record<string, string>)[language]).toMatch(/\S/)
|
|
}
|
|
expect(meta?.icon).toMatch(/^data:image\//)
|
|
})
|
|
})
|