diff --git a/apps/cli/package.json b/apps/cli/package.json index ee2c381c38..54aaf4de0d 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh", "description": "dsh CLI: profile launch, plugin management, and configuration inspection", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/apps/cli/tests/built-bin.e2e.ts b/apps/cli/tests/built-bin.e2e.ts index 1c8765d268..acb6e4ab37 100644 --- a/apps/cli/tests/built-bin.e2e.ts +++ b/apps/cli/tests/built-bin.e2e.ts @@ -13,9 +13,8 @@ import { } from '@agentclientprotocol/sdk' import { withFileLock, writeFileAtomic } from '@deepseek-ai/dsh-atomic-write' import { startMockLlmServer } from '@deepseek-ai/dsh-llm-mock-server' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { execa } from 'execa' -import * as yaml from 'js-yaml' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { testProfileResolution } from './profiles/headless/tests/profile-resolution.ts' @@ -1259,7 +1258,7 @@ describe.skipIf(!existsSync(dshBin))('dsh BUILT bin (node lib/bin.js, no tsx)', ) expect(code).toBe(0) expect(stderr).toBe('') - const rows = yaml.load(stdout, { schema: entryListSchema }) as Array<{ id?: string; name?: string }> + const rows = parseEntryYaml(stdout) as Array<{ id?: string; name?: string }> expect(rows.map(row => [row.id, row.name])).toEqual([ ['sdk-app-startup', '@deepseek-ai/dsh-sdk-app'], ['sdk-jsonrpc-server', '@deepseek-ai/dsh-sdk-jsonrpc-server'], diff --git a/apps/cli/tests/dump-config-schema.expected.e2e.ts b/apps/cli/tests/dump-config-schema.expected.e2e.ts index d481c9bd2a..b6472adabb 100644 --- a/apps/cli/tests/dump-config-schema.expected.e2e.ts +++ b/apps/cli/tests/dump-config-schema.expected.e2e.ts @@ -3,8 +3,7 @@ import { existsSync, mkdtempSync, realpathSync } from 'node:fs' import { copyFile, mkdir, readFile, rm, writeFile } from 'node:fs/promises' import { Ajv2020 } from 'ajv/dist/2020.js' -import * as yaml from 'js-yaml' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import type { ConfigSchemaDump } from '@deepseek-ai/dsh-app-boot' import { tmpdir } from 'node:os' import { join } from 'node:path' @@ -162,7 +161,7 @@ describe.skipIf(!builtArtifactsExist)('dsh --dump-config-schema assembled output const composed = await dump(fixture, [], '--dump-config') const validator = new Ajv2020({ strict: false, validateFormats: false }) const validate = validator.compile(document) - expect(validate(yaml.load(composed.stdout, { schema: entryListSchema })), JSON.stringify(validate.errors)).toBe(true) + expect(validate(parseEntryYaml(composed.stdout)), JSON.stringify(validate.errors)).toBe(true) expect(validate([{ name: `${packageName}/namespace`, config: { attempts: 'wrong' } }])).toBe(false) const patch = validator.compile({ $schema: document.$schema, $defs: document.$defs, $ref: '#/$defs/patchList' }) expect(patch([{ id: 'schema-class', config: { enabled: 'wrong' } }])).toBe(false) diff --git a/apps/cli/tests/lazy-search-startup.compat.spec.ts b/apps/cli/tests/lazy-search-startup.compat.spec.ts index dfb92dc340..ed1efb0a16 100644 --- a/apps/cli/tests/lazy-search-startup.compat.spec.ts +++ b/apps/cli/tests/lazy-search-startup.compat.spec.ts @@ -15,7 +15,7 @@ import { mkdtemp, readFile, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, resolve } from 'node:path' import { fileURLToPath } from 'node:url' -import yaml from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { describe, expect, it } from 'vitest' const repoRoot = fileURLToPath(new URL('../../../', import.meta.url)) @@ -37,12 +37,6 @@ interface PatchEntry extends ConfigRow { insert?: ConfigRow[] } -const jsExprType = new yaml.Type('tag:yaml.org,2002:js', { - kind: 'scalar', - construct: value => String(value), -}) -const configSchema = yaml.JSON_SCHEMA.extend(jsExprType) - /** Boot the built Web CLI, wait for its settled URL, then dispose through SIGTERM. */ function runBuiltWeb(cwd: string): Promise<{ stdout: string; stderr: string; code: number }> { return new Promise((resolveRun, rejectRun) => { @@ -103,9 +97,9 @@ describe.skipIf(!requireBuiltArtifacts)('built CLI lazy-search startup', () => { it('boots and disposes the shipped composition with full-text search off by default', async () => { expect(existsSync(builtBin), `missing built CLI ${resolve(builtBin)}; run pnpm build`).toBe(true) expect(existsSync(webDist), `missing Web dist ${resolve(webDist)}; run pnpm run build:web`).toBe(true) - const baseRows = (yaml.load(await readFile(baseConfigPath, 'utf8'), { schema: configSchema }) as PatchEntry[]) + const baseRows = (parseEntryYaml(await readFile(baseConfigPath, 'utf8')) as PatchEntry[]) .flatMap(entry => entry.insert ?? [entry]) - const webRows = (yaml.load(await readFile(webConfigPath, 'utf8'), { schema: configSchema }) as PatchEntry[]) + const webRows = (parseEntryYaml(await readFile(webConfigPath, 'utf8')) as PatchEntry[]) .flatMap(entry => entry.insert ?? [entry]) const baseRow = baseRows.find(row => row.id === 'session-query-sqlite') const webRow = webRows.find(row => row.id === 'session-query-sqlite') diff --git a/apps/cli/tests/profiles/headless/tests/fixtures/subagent-settlement-fence.ts b/apps/cli/tests/profiles/headless/tests/fixtures/subagent-settlement-fence.ts index c2c8a87885..22c632247b 100644 --- a/apps/cli/tests/profiles/headless/tests/fixtures/subagent-settlement-fence.ts +++ b/apps/cli/tests/profiles/headless/tests/fixtures/subagent-settlement-fence.ts @@ -3,7 +3,7 @@ * @module subagent-settlement-fence */ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import type {} from '@deepseek-ai/dsh-agent-loop' import type {} from '@deepseek-ai/dsh-subagent' @@ -24,12 +24,12 @@ export function apply(ctx: Context): void { let hasDelivered = false ctx.effect(() => { - const disposeInbox = ctx.root.on('agent/inbox/inserted', ({ agent, message }) => { + const disposeInbox = ctx[Context.root].on('agent/inbox/inserted', ({ agent, message }) => { if (agent.session.header.parentSession !== undefined || message.source.kind !== 'subagent-settled') return hasDelivered = true delivered.resolve(undefined) }) - const disposeStep = ctx.root.on('agent/pre-step', async ({ agent, turn, step }, next) => { + const disposeStep = ctx[Context.root].on('agent/pre-step', async ({ agent, turn, step }, next) => { if (agent.session.header.parentSession === undefined && turn === 1 && step === 2 && !hasDelivered) { await delivered.promise } diff --git a/apps/cli/tests/profiles/official-installer-packed.e2e.ts b/apps/cli/tests/profiles/official-installer-packed.e2e.ts index e9039e8a5a..699f8deb7c 100644 --- a/apps/cli/tests/profiles/official-installer-packed.e2e.ts +++ b/apps/cli/tests/profiles/official-installer-packed.e2e.ts @@ -5,8 +5,8 @@ import { join } from 'node:path' import { createInterface } from 'node:readline' import { fileURLToPath } from 'node:url' import { execa } from 'execa' -import yaml from 'js-yaml' import { expect, it, onTestFinished } from 'vitest' +import { stringifyEntryYaml } from '@deepseek-ai/cordis-plugin-include' import type { BundleInfo, ChangeResult } from '@deepseek-ai/dsh-plugin-manager' import { getDshRuntimeVersion } from '../../../../packages/boot/app-boot/src/plugin-compatibility.ts' import { generateOfficialBundleCatalog } from '../../../../scripts/gen-official-bundle-catalog.ts' @@ -118,7 +118,7 @@ it.skipIf(!built)('installs the exported registry\'s local closure and switches const observer = join(temporary, 'official-installer-observer.mjs') await writeFile(observer, await readFile(new URL('./fixtures/official-installer-observer.mjs', import.meta.url), 'utf8')) const patch = join(temporary, 'official-installer.patch.yml') - await writeFile(patch, yaml.dump([{ insert: [{ id: 'official-installer-observer', name: observer, + await writeFile(patch, stringifyEntryYaml([{ insert: [{ id: 'official-installer-observer', name: observer, config: { registry: registry.url, profile, diff --git a/apps/cli/tests/profiles/webhook-packed.e2e.ts b/apps/cli/tests/profiles/webhook-packed.e2e.ts index 3844ceb22b..ac0214a76d 100644 --- a/apps/cli/tests/profiles/webhook-packed.e2e.ts +++ b/apps/cli/tests/profiles/webhook-packed.e2e.ts @@ -7,6 +7,7 @@ import { fileURLToPath } from 'node:url' import { execa } from 'execa' import yaml from 'js-yaml' import { expect, it } from 'vitest' +import { stringifyEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { assertInstalledTree, createPackedInstallation } from './packed-installation.ts' const root = fileURLToPath(new URL('../../../..', import.meta.url)) @@ -64,7 +65,7 @@ export function apply(ctx) { } `) const patch = join(temporary, 'test.patch.yml') - await writeFile(patch, yaml.dump([ + await writeFile(patch, stringifyEntryYaml([ { id: 'session-telemetry-otel', disabled: true }, { id: 'github-webhook-ingress', insert: [{ id: 'observe-packed-ingress', name: observer }] }, ])) diff --git a/apps/cli/tests/windows-shell.spec.ts b/apps/cli/tests/windows-shell.spec.ts index c10f7c869a..858080ef42 100644 --- a/apps/cli/tests/windows-shell.spec.ts +++ b/apps/cli/tests/windows-shell.spec.ts @@ -15,8 +15,7 @@ import { mkdtempSync, rmSync, readFileSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { fileURLToPath } from 'node:url' -import yaml from 'js-yaml' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { evaluate } from '@deepseek-ai/cordis-plugin-loader' import { bundlePatchPaths, composeEntries, initProfile, loadProfile, PROFILES_DIR } from '@deepseek-ai/dsh-app-boot' @@ -104,7 +103,7 @@ describe('shipped agent presets gate both shell tools by platform', () => { const webBundle = fileURLToPath(new URL('../../../packages/bundle/web-app/', import.meta.url)) const webManifest = JSON.parse(readFileSync(join(webBundle, 'package.json'), 'utf8')) as { dsh: { bundle: { patch: string[] } } } const presetRows = composeEntries([bundlePatchPaths(webBundle, webManifest.dsh.bundle).flatMap(file => - yaml.load(readFileSync(file, 'utf8'), { schema: entryListSchema }) as import('@deepseek-ai/cordis-plugin-include').PatchOptions[])]) + parseEntryYaml(readFileSync(file, 'utf8')) as import('@deepseek-ai/cordis-plugin-include').PatchOptions[])]) const definitions = presetRows.filter(row => row.name === '@deepseek-ai/dsh-agent-preset').map(row => row.config as import('@deepseek-ai/dsh-agent-preset-registry').PresetDefinition) diff --git a/apps/desktop-host/package.json b/apps/desktop-host/package.json index 07943dc431..e895fce147 100644 --- a/apps/desktop-host/package.json +++ b/apps/desktop-host/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-desktop-host", "description": "Private Node-mode host process for the Electron desktop application", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "private": true, "license": "MIT", "type": "module", diff --git a/apps/desktop-publisher/package.json b/apps/desktop-publisher/package.json index c9b8a21db2..7fb48698ae 100644 --- a/apps/desktop-publisher/package.json +++ b/apps/desktop-publisher/package.json @@ -1,6 +1,6 @@ { "name": "@deepseek-ai/dsh-desktop-publisher", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "description": "Private Desktop release metadata, rollout and website publisher", "private": true, "type": "module", diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 6be1ff8a3f..dbec79d559 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-desktop", "description": "Electron desktop shell for a bundled dsh runtime and external plugins", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "private": true, "license": "MIT", "author": { diff --git a/apps/plugin-market-generator/package.json b/apps/plugin-market-generator/package.json index c2b3aa4e62..9db5493c5f 100644 --- a/apps/plugin-market-generator/package.json +++ b/apps/plugin-market-generator/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-market-generator", "description": "Reference generator of plugin market index files from a list of npm packages and Git repositories", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "private": true, "type": "module", "scripts": { diff --git a/apps/web/package.json b/apps/web/package.json index 50e3497c0a..4c5a5c3c5e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-web-frontend", "description": "Web application entry: vite build over the @deepseek-ai/dsh-client-web shell library; dist/ served by apps/cli's dsh web", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/apps/web/tests/client-ui-stats-panel.e2e.ts b/apps/web/tests/client-ui-stats-panel.e2e.ts index 0117069dd8..a331a223d1 100644 --- a/apps/web/tests/client-ui-stats-panel.e2e.ts +++ b/apps/web/tests/client-ui-stats-panel.e2e.ts @@ -7,8 +7,7 @@ import { readFileSync } from 'node:fs' import type { Browser, Page } from 'playwright' import { chromium } from 'playwright' import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest' -import * as yaml from 'js-yaml' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { brandString } from '@deepseek-ai/dsh-brand' import { createAssistantMessage, createMessage, createUserMessage, type ToolCallId, @@ -32,7 +31,7 @@ const MODE = webSnapshotMode() /** Overlay layer entries, for the composition guard below. */ function profileEntries(path: string): unknown[] { - const parsed = yaml.load(readFileSync(path, 'utf8'), { schema: entryListSchema }) + const parsed = parseEntryYaml(readFileSync(path, 'utf8')) if (!Array.isArray(parsed)) throw new Error(`profile layer at ${path} must be a list`) return parsed } diff --git a/apps/web/tests/cua-optin.e2e.ts b/apps/web/tests/cua-optin.e2e.ts index 416c4fc618..23aaff1174 100644 --- a/apps/web/tests/cua-optin.e2e.ts +++ b/apps/web/tests/cua-optin.e2e.ts @@ -8,7 +8,7 @@ import { readProfileManifest } from '@deepseek-ai/dsh-app-boot' import type { SessionId } from '@deepseek-ai/dsh-session' import type {} from '@deepseek-ai/dsh-ptc-runtime' import type {} from '@deepseek-ai/dsh-agent-preset-registry' -import { load } from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { expect, it, vi } from 'vitest' import { captureStableAria, compareOrRefreshGolden, launchWebScaffold, webSnapshotMode, type WebScaffold } from './scaffold.ts' import { connectFreshWorkspaceZh, ZH_BROWSER_LOCALE } from './support.ts' @@ -155,9 +155,9 @@ it.skipIf(process.platform !== 'darwin').each([ expect(scaffold.ctx.settings.describe().find(row => row.ns === 'ui-settings')?.value).toMatchObject({ enabled: codingTools }) expect(saved).not.toContain('executionMode:') if (selectedDefault === undefined) { - expect(load(saved)).not.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'agent-preset-registry' })])) + expect(parseEntryYaml(saved)).not.toEqual(expect.arrayContaining([expect.objectContaining({ id: 'agent-preset-registry' })])) } else { - expect(load(saved)).toEqual(expect.arrayContaining([ + expect(parseEntryYaml(saved)).toEqual(expect.arrayContaining([ expect.objectContaining({ id: 'agent-preset-registry', config: { default: 'standard', selectedDefault } }), ])) } @@ -263,7 +263,7 @@ it.skipIf(process.platform !== 'darwin').each([ expect(scaffold.ctx.tools.schemas(ptcAgent).some(tool => tool.name === 'cua')).toBe(true) expect((await runtime.run(runtime.resolve({ program, bindings: [], stateOwner: owner }))).value).toBe(3) const confirmedSettings = await readFile(settingsPath, 'utf8') - expect(load(confirmedSettings)).toEqual(expect.arrayContaining([ + expect(parseEntryYaml(confirmedSettings)).toEqual(expect.arrayContaining([ expect.objectContaining({ id: 'agent-preset-registry', config: { default: 'standard', selectedDefault: 'ptc' } }), ])) await toggle.click() diff --git a/apps/web/tests/default-product-isolation.e2e.ts b/apps/web/tests/default-product-isolation.e2e.ts index 7829cc2b45..7a2f836d54 100644 --- a/apps/web/tests/default-product-isolation.e2e.ts +++ b/apps/web/tests/default-product-isolation.e2e.ts @@ -83,7 +83,8 @@ it('activates the actual default Client registry without experimental packages', // Capture the first real root and immediately restore the registry method. prototype.plugin = function (...args: Parameters) { prototype.plugin = plugin - observation.ctx = this.ctx.root + // This init script runs in the page, where the test's `Context` import is unavailable. + observation.ctx = this.ctx[Symbol.for('cordis.root') as typeof Context.root] return plugin.apply(this, args) } try { diff --git a/apps/web/tests/scaffold.ts b/apps/web/tests/scaffold.ts index 854be934b1..736ba7c228 100644 --- a/apps/web/tests/scaffold.ts +++ b/apps/web/tests/scaffold.ts @@ -33,8 +33,7 @@ import { expect } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { DSH_LAUNCH_ENVIRONMENT_KEY, type LaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment' import Loader from '@deepseek-ai/cordis-plugin-loader' -import { entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' -import yaml from 'js-yaml' +import { stringifyEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import { captureExpectedWorkspaceSnapshot, captureWorkspaceSnapshot, @@ -808,7 +807,7 @@ export async function launchWebScaffold(options: LaunchOptions = {}): Promise { ? { ...plugin, config: { refreshIntervalMs: 0 } } : plugin) const path = join(dir, 'time-context-every-step.patch.yml') - await writeFile(path, dump([ + await writeFile(path, stringifyEntryYaml([ { id: 'preset-standard', config: { ...config, plugins } }, - ], { schema: entryListSchema, noRefs: true, lineWidth: -1 })) + ], { lineWidth: -1 })) return path } diff --git a/apps/web/tests/session-log-upload.e2e.ts b/apps/web/tests/session-log-upload.e2e.ts index 09a3c4444c..8b26c3c5f9 100644 --- a/apps/web/tests/session-log-upload.e2e.ts +++ b/apps/web/tests/session-log-upload.e2e.ts @@ -3,8 +3,8 @@ import { mkdtemp, rm, writeFile, readFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import { chromium } from 'playwright' -import yaml from 'js-yaml' import { expect, it, onTestFinished } from 'vitest' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { credentialRef } from '@deepseek-ai/dsh-credentials' import { startMockLlmServer } from '@deepseek-ai/dsh-llm-mock-server' import { launchWebScaffold, webSnapshotMode } from './scaffold.ts' @@ -44,7 +44,7 @@ it.skipIf(webSnapshotMode() === 'record')('persists the upload switch and omits await toggle.click() await expect.poll(() => toggle.getAttribute('aria-checked')).toBe(String(enabled)) await expect.poll(async () => { - const patches = yaml.load(await readFile(join(scaffold.harnessHome, 'profiles/scaffold/cordis.patch.yml'), 'utf8')) as { id: string; config?: { enabled?: boolean } }[] + const patches = parseEntryYaml(await readFile(join(scaffold.harnessHome, 'profiles/scaffold/cordis.patch.yml'), 'utf8')) as { id: string; config?: { enabled?: boolean } }[] return patches.find(patch => patch.id === 'session-log-deepseek')?.config?.enabled ?? true }).toBe(enabled) await page.keyboard.press('Escape') diff --git a/apps/web/tests/settings-import.e2e.ts b/apps/web/tests/settings-import.e2e.ts index 44a14f0ac0..8b26362942 100644 --- a/apps/web/tests/settings-import.e2e.ts +++ b/apps/web/tests/settings-import.e2e.ts @@ -5,8 +5,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { chromium } from 'playwright' import { expect, it } from 'vitest' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' -import yaml from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { WELCOME_NOTICE_VERSION, launchWebScaffold, watchConsole } from './scaffold.ts' import { ZH_BROWSER_LOCALE } from './support.ts' @@ -24,7 +23,7 @@ it('imports settings.yaml into the profile once and applies the imported values' const patchPath = join(harnessHome, 'profiles', 'scaffold', 'cordis.patch.yml') type Row = { id?: string; config?: Record } const config = (id: string): Record | undefined => - (yaml.load(readFileSync(patchPath, 'utf8'), { schema: entryListSchema }) as Row[]).find(row => row.id === id)?.config + (parseEntryYaml(readFileSync(patchPath, 'utf8')) as Row[]).find(row => row.id === id)?.config await expect.poll(() => config('ui-theme')?.['fontSize'], { timeout: 10_000 }).toBe(16) expect(config('ui-settings')?.['enabled']).toBe(false) expect(config('ui-settings-general')?.['welcomeNoticeVersion']).toBe(WELCOME_NOTICE_VERSION) diff --git a/docs/cordis-api/context.i18n.yaml b/docs/cordis-api/context.i18n.yaml index 0a43065531..6ac1c40a6d 100644 --- a/docs/cordis-api/context.i18n.yaml +++ b/docs/cordis-api/context.i18n.yaml @@ -9,17 +9,14 @@ en: fc6fd9ae25b8e9e5 zh: 1a2407d299404ace /context/ctx-extend-meta: - en: 2c407cb9589b001f - zh: 70dc8650250cd4c5 + en: 18c7f34127f5c5fc + zh: fa37a391e9c49f24 /context/ctx-isolate-name-label: - en: ab77052c3bf31e2b - zh: 686ca829ea5b8170 + en: 4b61ce02474b983b + zh: 5ab2948ddcff2687 /context/ctx-intercept-name-config: - en: 1bd1e349f5c8687d - zh: 7634b27d2c9bade4 -/context/ctx-root: - en: eb89a7f0d2bc1753 - zh: 263219126a310d3b + en: 7efc60c71ddc4a6e + zh: 58dd647c41c10897 /context/ctx-baseurl: en: 29c28e7558cea0ad zh: 9b591e449c1bfd72 @@ -38,21 +35,24 @@ /context/static-members: en: ceb197529207a8ed zh: 7d444c03f8be0f0d +/context/static-members/context-root: + en: 7616dd841e4f04cb + zh: 2f1a3bdb9ed1f6f7 /context/static-members/context-effect: - en: 19f4aaef44a7e8eb - zh: 2179cf28a7ee3f6a + en: 6c3b77ace7d4fda3 + zh: 470c685819275d5f /context/static-members/context-filter: - en: e8ca384b9a1ea98b - zh: 82189892bf0afcb0 + en: 1c97248eeabea2d0 + zh: 08eadac6a0871429 /context/static-members/context-isolate: - en: b8673b719837ce51 - zh: 83892f9f96c3ac28 + en: 6c490ac1293b0315 + zh: 51d371b38de7773a /context/static-members/context-intercept: - en: f3ebe6568cc9a863 - zh: bb51ab61a4e47d33 + en: d3f44b89b641a11b + zh: b88177e0a59ef9a5 /context/static-members/context-is-value: - en: 7425e0ee4bc1ada7 - zh: 93dee27133ded9e0 + en: 0ef94fa412edfe17 + zh: 30b64cd2fbb2d12e /context/service-store-and-mixins: en: 9f7ca8a6a0f80512 zh: 05e8cbc30e5709fc diff --git a/docs/cordis-api/context.md b/docs/cordis-api/context.md index 453f607768..514e2afc0f 100644 --- a/docs/cordis-api/context.md +++ b/docs/cordis-api/context.md @@ -34,7 +34,7 @@ The child prototypally inherits every property of this context; own properties o **Returns** a child context inheriting from this one. -[Source](../../vendor/cordis/src/context.ts#L99) +[Source](../../vendor/cordis/src/context.ts#L101) ### ctx.isolate(name, label?) @@ -46,6 +46,9 @@ The child prototypally inherits every property of this context; own properties o * resolve against the new label instead of the parent's, so a different * implementation can be provided without affecting the parent scope. * Passing the same `label` to two `isolate()` calls joins their scopes. + * The returned context and plugins started below it never fall back to the + * enclosing plugin's injected `name`, even when `label` equals the parent's + * label; until a provider in the new scope supplies `name`, reading it throws. * * @param name — the service name to isolate. * @param label — scope label to join; defaults to a fresh unique symbol. @@ -56,55 +59,45 @@ isolate(name: string, label?: symbol) Create a child context with an independent service scope for `name`. -Below the returned context, reads and writes of the service `name` resolve against the new label instead of the parent's, so a different implementation can be provided without affecting the parent scope. Passing the same `label` to two `isolate()` calls joins their scopes. +Below the returned context, reads and writes of the service `name` resolve against the new label instead of the parent's, so a different implementation can be provided without affecting the parent scope. Passing the same `label` to two `isolate()` calls joins their scopes. The returned context and plugins started below it never fall back to the enclosing plugin's injected `name`, even when `label` equals the parent's label; until a provider in the new scope supplies `name`, reading it throws. - `name` — the service name to isolate. - `label` — scope label to join; defaults to a fresh unique symbol. **Returns** a child context whose `name` service resolves in the new scope. -[Source](../../vendor/cordis/src/context.ts#L121) +[Source](../../vendor/cordis/src/context.ts#L126) ### ctx.intercept(name, config) ```ts cordis-catalog /** - * Add service-specific intercept config for plugins started below this + * Add service-specific intercept metadata for plugins started below this * context. * * Plugins loaded under the returned context see `config` merged into the - * service's resolved config (ancestor entries first; see - * `Service[symbols.resolveConfig]`). The parent context is not affected. + * service's resolved intercept metadata (injected metadata first, then + * ancestor intercepts; see `Service[symbols.resolveIntercept]`). The parent + * context is not affected. * - * @param name — the service name whose config to intercept. - * @param config — the intercept config to merge for that service. + * @param name — the service name whose metadata to intercept. + * @param config — the intercept metadata to merge for that service. * @returns a child context carrying the additional intercept entry. */ -intercept(name: K, config: Context[K] extends { [symbols.config]: infer T } ? T : never): this +intercept(name: K, config: Context[K] extends { [symbols.metadata]: infer T } ? T : never): this intercept(name: string, config: any): this ``` -Add service-specific intercept config for plugins started below this context. +Add service-specific intercept metadata for plugins started below this context. -Plugins loaded under the returned context see `config` merged into the service's resolved config (ancestor entries first; see `Service[symbols.resolveConfig]`). The parent context is not affected. +Plugins loaded under the returned context see `config` merged into the service's resolved intercept metadata (injected metadata first, then ancestor intercepts; see `Service[symbols.resolveIntercept]`). The parent context is not affected. -- `name` — the service name whose config to intercept. -- `config` — the intercept config to merge for that service. +- `name` — the service name whose metadata to intercept. +- `config` — the intercept metadata to merge for that service. **Returns** a child context carrying the additional intercept entry. -[Source](../../vendor/cordis/src/context.ts#L139) - -### ctx.root - -```ts cordis-catalog -/** The root context of the application (every child context shares it). @experimental */ -root: this -``` - -The root context of the application (every child context shares it). @experimental - -[Source](../../vendor/cordis/src/context.ts#L22) +[Source](../../vendor/cordis/src/context.ts#L145) ### ctx.baseUrl @@ -163,6 +156,17 @@ The plugin registry. Its methods are mixed onto `ctx` (`ctx.plugin`, `ctx.inject ## Static members +### Context.root + +```ts cordis-catalog +/** Symbol key of the root context: `ctx[Context.root]` is the application's root context, shared by every child context. */ +static readonly root: unique symbol +``` + +Symbol key of the root context: `ctx[Context.root]` is the application's root context, shared by every child context. + +[Source](../../vendor/cordis/src/context.ts#L44) + ### Context.effect ```ts cordis-catalog @@ -172,7 +176,7 @@ static readonly effect: unique symbol Symbol key under which a disposer exposes its EffectMeta diagnostics tree. -[Source](../../vendor/cordis/src/context.ts#L44) +[Source](../../vendor/cordis/src/context.ts#L46) ### Context.filter @@ -183,29 +187,29 @@ static readonly filter: unique symbol Symbol key for a context's listener filter, consulted on every event dispatch. -[Source](../../vendor/cordis/src/context.ts#L46) +[Source](../../vendor/cordis/src/context.ts#L48) ### Context.isolate ```ts cordis-catalog -/** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */ +/** Symbol key of the isolation map: `ctx[Context.isolate]` maps each service name to its scope label. */ static readonly isolate: unique symbol ``` -Symbol key of the isolation map (see the `Context[symbols.isolate]` property). +Symbol key of the isolation map: `ctx[Context.isolate]` maps each service name to its scope label. -[Source](../../vendor/cordis/src/context.ts#L48) +[Source](../../vendor/cordis/src/context.ts#L50) ### Context.intercept ```ts cordis-catalog -/** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */ +/** Symbol key of the intercept map: `ctx[Context.intercept]` maps each service name to its intercept metadata. */ static readonly intercept: unique symbol ``` -Symbol key of the intercept map (see the `Context[symbols.intercept]` property). +Symbol key of the intercept map: `ctx[Context.intercept]` maps each service name to its intercept metadata. -[Source](../../vendor/cordis/src/context.ts#L50) +[Source](../../vendor/cordis/src/context.ts#L52) ### Context.is(value) @@ -230,7 +234,7 @@ Works across realms and across multiple copies of cordis, because the brand is k **Returns** `true` if `value` is a Cordis context, narrowing its type. -[Source](../../vendor/cordis/src/context.ts#L61) +[Source](../../vendor/cordis/src/context.ts#L63) ## Service store and mixins diff --git a/docs/cordis-api/context.zh.md b/docs/cordis-api/context.zh.md index a5c7e36b4b..b5ff13c4eb 100644 --- a/docs/cordis-api/context.zh.md +++ b/docs/cordis-api/context.zh.md @@ -36,7 +36,7 @@ extend(meta = {}): this **返回**继承自当前上下文的子上下文。 -[源码](../../vendor/cordis/src/context.ts#L99) +[源码](../../vendor/cordis/src/context.ts#L101) ### ctx.isolate(name, label?) @@ -48,6 +48,9 @@ extend(meta = {}): this * resolve against the new label instead of the parent's, so a different * implementation can be provided without affecting the parent scope. * Passing the same `label` to two `isolate()` calls joins their scopes. + * The returned context and plugins started below it never fall back to the + * enclosing plugin's injected `name`, even when `label` equals the parent's + * label; until a provider in the new scope supplies `name`, reading it throws. * * @param name — the service name to isolate. * @param label — scope label to join; defaults to a fresh unique symbol. @@ -58,55 +61,45 @@ isolate(name: string, label?: symbol) 创建一个子上下文,使 `name` 拥有独立的服务作用域。 -在返回的上下文之下,对服务 `name` 的读写会根据新标签解析,而不再根据父上下文的标签解析,因此可以提供不同的实现而不影响父作用域。将同一个 `label` 传给两次 `isolate()` 调用,可使二者加入同一作用域。 +在返回的上下文之下,对服务 `name` 的读写会根据新标签解析,而不再根据父上下文的标签解析,因此可以提供不同的实现而不影响父作用域。将同一个 `label` 传给两次 `isolate()` 调用,可使二者加入同一作用域。返回的上下文及在其下启动的插件都不会回退到外层插件注入的 `name`,即使 `label` 与父上下文的标签相同也是如此;在新作用域中有提供者提供 `name` 之前,读取它会抛出错误。 - `name`:要隔离的服务名称。 - `label`:要加入的作用域标签;默认为一个新建的唯一 symbol。 **返回**一个子上下文,其 `name` 服务在新作用域中解析。 -[源码](../../vendor/cordis/src/context.ts#L121) +[源码](../../vendor/cordis/src/context.ts#L126) ### ctx.intercept(name, config) ```ts cordis-catalog /** - * Add service-specific intercept config for plugins started below this + * Add service-specific intercept metadata for plugins started below this * context. * * Plugins loaded under the returned context see `config` merged into the - * service's resolved config (ancestor entries first; see - * `Service[symbols.resolveConfig]`). The parent context is not affected. + * service's resolved intercept metadata (injected metadata first, then + * ancestor intercepts; see `Service[symbols.resolveIntercept]`). The parent + * context is not affected. * - * @param name — the service name whose config to intercept. - * @param config — the intercept config to merge for that service. + * @param name — the service name whose metadata to intercept. + * @param config — the intercept metadata to merge for that service. * @returns a child context carrying the additional intercept entry. */ -intercept(name: K, config: Context[K] extends { [symbols.config]: infer T } ? T : never): this +intercept(name: K, config: Context[K] extends { [symbols.metadata]: infer T } ? T : never): this intercept(name: string, config: any): this ``` -为在此上下文之下启动的插件添加服务专属的拦截配置。 +为在此上下文之下启动的插件添加服务专属的拦截元数据。 -在返回的上下文下加载的插件会看到 `config` 已合并到服务解析后的配置中(祖先条目在前;见 `Service[symbols.resolveConfig]`)。父上下文不受影响。 +在返回的上下文下加载的插件会看到 `config` 已合并到服务解析后的拦截元数据中(注入的元数据在前,其后是祖先上下文的拦截;见 `Service[symbols.resolveIntercept]`)。父上下文不受影响。 -- `name`:要拦截其配置的服务名称。 -- `config`:要为该服务合并的拦截配置。 +- `name`:要拦截其元数据的服务名称。 +- `config`:要为该服务合并的拦截元数据。 **返回**一个携带额外拦截条目的子上下文。 -[源码](../../vendor/cordis/src/context.ts#L139) - -### ctx.root - -```ts cordis-catalog -/** The root context of the application (every child context shares it). @experimental */ -root: this -``` - -应用的根上下文,所有子上下文均共享它。@experimental - -[源码](../../vendor/cordis/src/context.ts#L22) +[源码](../../vendor/cordis/src/context.ts#L145) ### ctx.baseUrl @@ -165,6 +158,17 @@ registry: RegistryService ## 静态成员 +### Context.root + +```ts cordis-catalog +/** Symbol key of the root context: `ctx[Context.root]` is the application's root context, shared by every child context. */ +static readonly root: unique symbol +``` + +根上下文的 symbol 键:`ctx[Context.root]` 是应用的根上下文,所有子上下文共享它。 + +[源码](../../vendor/cordis/src/context.ts#L44) + ### Context.effect ```ts cordis-catalog @@ -174,7 +178,7 @@ static readonly effect: unique symbol 资源释放函数用于公开其 EffectMeta 诊断树的 symbol 键。 -[源码](../../vendor/cordis/src/context.ts#L44) +[源码](../../vendor/cordis/src/context.ts#L46) ### Context.filter @@ -185,29 +189,29 @@ static readonly filter: unique symbol 上下文监听器过滤器的 symbol 键,每次分派事件时都会查询该过滤器。 -[源码](../../vendor/cordis/src/context.ts#L46) +[源码](../../vendor/cordis/src/context.ts#L48) ### Context.isolate ```ts cordis-catalog -/** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */ +/** Symbol key of the isolation map: `ctx[Context.isolate]` maps each service name to its scope label. */ static readonly isolate: unique symbol ``` -隔离映射的 symbol 键(见 `Context[symbols.isolate]` 属性)。 +隔离映射的 symbol 键:`ctx[Context.isolate]` 将每个服务名称映射到其作用域标签。 -[源码](../../vendor/cordis/src/context.ts#L48) +[源码](../../vendor/cordis/src/context.ts#L50) ### Context.intercept ```ts cordis-catalog -/** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */ +/** Symbol key of the intercept map: `ctx[Context.intercept]` maps each service name to its intercept metadata. */ static readonly intercept: unique symbol ``` -拦截映射的 symbol 键(见 `Context[symbols.intercept]` 属性)。 +拦截映射的 symbol 键:`ctx[Context.intercept]` 将每个服务名称映射到其拦截元数据。 -[源码](../../vendor/cordis/src/context.ts#L50) +[源码](../../vendor/cordis/src/context.ts#L52) ### Context.is(value) @@ -232,7 +236,7 @@ static is(value: any): value is Context **返回** `true` 时,`value` 是 Cordis 上下文,并会收窄其类型。 -[源码](../../vendor/cordis/src/context.ts#L61) +[源码](../../vendor/cordis/src/context.ts#L63) ## 服务存储与混入 diff --git a/docs/cordis-api/fiber.i18n.yaml b/docs/cordis-api/fiber.i18n.yaml index aeba613660..61c4a795fc 100644 --- a/docs/cordis-api/fiber.i18n.yaml +++ b/docs/cordis-api/fiber.i18n.yaml @@ -9,80 +9,80 @@ en: b5b3510f4b6dd13a zh: a0c70471b6d779b5 /fiber/ctx-effect-execute-label: - en: 38bab93cf931eec1 - zh: 50fed09622da4926 + en: c3c64f4a17982e02 + zh: 556d9d0892554636 /fiber/ctx-fiber: en: a10e38bf26b4ecfe zh: 7c91817984c95c99 /fiber/the-fiber-class: - en: 31ca1205552db9ef - zh: 5fa2e5b9a7396576 + en: 0995b41083780a7f + zh: c1d6edd8c955ce73 /fiber/the-fiber-class/fiber-uid: - en: 2f0eb3658bb8497e - zh: 65d3c17ca8bd4f95 + en: 97907b9b47f628e3 + zh: afc3fd8bcf51fb06 /fiber/the-fiber-class/fiber-ctx: - en: 1b527d85759324f9 - zh: 54aa40db2705b95c + en: 8393cd12c6f87ea4 + zh: 788ec6d0567eafee /fiber/the-fiber-class/fiber-config: - en: 73b05dc38761b681 - zh: d663668f3e8fd33f + en: d24f74b8de157f3c + zh: f66c1ebcc87795ac /fiber/the-fiber-class/fiber-state: - en: eda419fecddc4dc8 - zh: 1a1b90f405cf3cbc + en: 024ffba980d93975 + zh: 4aad0bca3d30329a /fiber/the-fiber-class/fiber-dispose: - en: 43f4ad79a728a492 - zh: 71b216695d0afb22 + en: d73833a8055509c9 + zh: 1f3be8f3f4233f97 /fiber/the-fiber-class/fiber-committed: - en: 0485c9d782bf90da - zh: 74304cd05e9c0796 + en: 3bc72a323e4d548f + zh: 1c78f016d1a4f352 /fiber/the-fiber-class/fiber-provisions: - en: 1cf8235d0ca54124 - zh: 3d2e39064853165f + en: dc529104da1e8423 + zh: 021c26945c90996f /fiber/the-fiber-class/fiber-inertia: - en: 2a3b1d3bc37bf986 - zh: 83bd257ee685d38b + en: 19d756b6040508e1 + zh: ad3ad8e3d97207f9 /fiber/the-fiber-class/fiber-name: - en: cdc0677ce1d83361 - zh: a58305521a0626de + en: 0e3641a74c588380 + zh: eacf740caf8f4680 /fiber/the-fiber-class/fiber-assertactive: - en: 0c3e8008ff2d69e2 - zh: 7b454626d3e3a3b6 + en: 0f848c17287d271e + zh: 3fbe6481321dacc9 /fiber/the-fiber-class/fiber-effect-execute-label: - en: 0e905aa798ce3830 - zh: bbd0b0c537097d37 + en: 20310a727bc5dce8 + zh: 08296354bc91b457 /fiber/the-fiber-class/fiber-geteffects: - en: 729a1000bda8ee36 - zh: 5bfc19df3addab80 + en: 758fea501aa3ca1a + zh: a726b56da80bdbc7 /fiber/the-fiber-class/fiber-rawconfig: - en: 80d4007e42bd8b47 - zh: 14c11dc09c6402ce + en: 06d5cba285f2ea40 + zh: f5dea5faaefb1386 /fiber/the-fiber-class/fiber-effectiveconfig: - en: 8e9fcdcf458c8bde - zh: 36d21cafbf4f0198 + en: 15bd2af0334d92c0 + zh: 660b3421904532e6 /fiber/the-fiber-class/fiber-resolveconfig-config: - en: f8a9ca27b288bd4c - zh: 03ce360b5200fbdb + en: 4bffc7a79cad2f90 + zh: 243a9ff94e7c9a39 /fiber/the-fiber-class/fiber-await: - en: 3f228c1861466386 - zh: 43b3f3acfc3d314b + en: dce389b292d469e7 + zh: 634fa390a1f4555c /fiber/the-fiber-class/fiber-restart: - en: 152116f669f52e95 - zh: 11d3cd941ce32d88 + en: 7be06221fd6f0a12 + zh: a2416eb6c313f8ce /fiber/the-fiber-class/fiber-update-config-nosave: - en: a4f711258eb70e47 - zh: fff4d880d820de10 + en: d3b17d7ab1a3135e + zh: ba9167a3b8426036 /fiber/effect: - en: 007d5b214e8a8610 - zh: d74c26fbb1b8aeb6 + en: bf5ff8b45417829e + zh: 17b384d7375575ef /fiber/disposable: - en: 56e4218392fa7234 - zh: 8fea671180cacf6f + en: b405f69de650c34d + zh: 5dd7995aaccb5d87 /fiber/effectmeta: - en: 849aa91b8e67809f - zh: 4b31d7e2acd2a008 + en: cf8a5328f613b1d6 + zh: a4f37a82c132f0ed /fiber/cordiserror: - en: d276771958d3c05f - zh: 0141656ade938d55 + en: a32c8ed4338f6f7c + zh: 573e2a686eecf1f0 /fiber/validationerror: en: 178782124cc15210 zh: 2b226f43f48af555 diff --git a/docs/cordis-api/fiber.md b/docs/cordis-api/fiber.md index 3bfc3a00e9..e144dd53bd 100644 --- a/docs/cordis-api/fiber.md +++ b/docs/cordis-api/fiber.md @@ -34,7 +34,7 @@ Register a cleanup-aware effect on this fiber. **Returns** a disposer that tears the effect down and settles once done. -[Source](../../vendor/cordis/src/fiber.ts#L421) +[Source](../../vendor/cordis/src/fiber.ts#L443) ### ctx.fiber @@ -53,7 +53,7 @@ Runtime instance of one plugin application. A fiber tracks dependency state, raw and effective config, lifecycle effects, and cleanup for the plugin context returned by `ctx.plugin()`. -[Source](../../vendor/cordis/src/fiber.ts#L184) +[Source](../../vendor/cordis/src/fiber.ts#L214) ### fiber.uid @@ -64,7 +64,7 @@ public uid: number | null Unique id within the registry; 0 for the root fiber, `null` once disposed. -[Source](../../vendor/cordis/src/fiber.ts#L186) +[Source](../../vendor/cordis/src/fiber.ts#L216) ### fiber.ctx @@ -75,7 +75,7 @@ public readonly ctx: Context The context this fiber's plugin runs in (extends the parent context). -[Source](../../vendor/cordis/src/fiber.ts#L188) +[Source](../../vendor/cordis/src/fiber.ts#L218) ### fiber.config @@ -86,7 +86,7 @@ public config: any Raw plugin input retained for the next activation. -[Source](../../vendor/cordis/src/fiber.ts#L190) +[Source](../../vendor/cordis/src/fiber.ts#L220) ### fiber.state @@ -97,7 +97,7 @@ public state Current lifecycle state; transitions emit `internal/status`. -[Source](../../vendor/cordis/src/fiber.ts#L192) +[Source](../../vendor/cordis/src/fiber.ts#L222) ### fiber.dispose @@ -108,7 +108,7 @@ public readonly dispose: () => Promise Dispose this fiber: unload the plugin, then settle once cleanup finished. -[Source](../../vendor/cordis/src/fiber.ts#L194) +[Source](../../vendor/cordis/src/fiber.ts#L224) ### fiber.committed @@ -119,7 +119,7 @@ public committed: Readonly> | undefined Required implementations retained through dependent teardown. -[Source](../../vendor/cordis/src/fiber.ts#L196) +[Source](../../vendor/cordis/src/fiber.ts#L226) ### fiber.provisions @@ -130,7 +130,7 @@ public readonly provisions: Set Service implementations owned by this fiber, including isolated provisions. -[Source](../../vendor/cordis/src/fiber.ts#L198) +[Source](../../vendor/cordis/src/fiber.ts#L228) ### fiber.inertia @@ -141,7 +141,7 @@ public inertia: Promise | undefined The in-flight load/unload transition, if one is currently running. -[Source](../../vendor/cordis/src/fiber.ts#L200) +[Source](../../vendor/cordis/src/fiber.ts#L230) ### fiber.name @@ -152,7 +152,7 @@ get name() The plugin's display name, inherited from the nearest named ancestor, else `'root'`. -[Source](../../vendor/cordis/src/fiber.ts#L342) +[Source](../../vendor/cordis/src/fiber.ts#L364) ### fiber.assertActive() @@ -170,7 +170,7 @@ Throw if the fiber has already been disposed. **Returns** nothing when the fiber is still active. -[Source](../../vendor/cordis/src/fiber.ts#L357) +[Source](../../vendor/cordis/src/fiber.ts#L379) ### fiber.effect(execute, label?) @@ -201,7 +201,7 @@ Register a cleanup-aware effect on this fiber. **Returns** a disposer that tears the effect down and settles once done. -[Source](../../vendor/cordis/src/fiber.ts#L421) +[Source](../../vendor/cordis/src/fiber.ts#L443) ### fiber.getEffects() @@ -218,7 +218,7 @@ Return metadata for currently registered effects. **Returns** one `EffectMeta` tree per labeled live effect. -[Source](../../vendor/cordis/src/fiber.ts#L574) +[Source](../../vendor/cordis/src/fiber.ts#L596) ### fiber.rawConfig @@ -229,7 +229,7 @@ get rawConfig(): unknown Raw input retained for the next activation, without evaluating expressions or validating it. -[Source](../../vendor/cordis/src/fiber.ts#L649) +[Source](../../vendor/cordis/src/fiber.ts#L671) ### fiber.effectiveConfig @@ -244,7 +244,7 @@ get effectiveConfig(): unknown The object passed to plugin activation or the latest successful update that retained the instance. Candidate resolution does not publish it; volatile updates retain its references. Undefined before activation and readable after unload; callers requiring a live instance check `state`. -[Source](../../vendor/cordis/src/fiber.ts#L664) +[Source](../../vendor/cordis/src/fiber.ts#L686) ### fiber.resolveConfig(config) @@ -266,7 +266,7 @@ Evaluate and validate a candidate using this fiber's `internal/config` hooks and **Returns** The candidate's resolved config, retaining the schema's result identity. -[Source](../../vendor/cordis/src/fiber.ts#L676) +[Source](../../vendor/cordis/src/fiber.ts#L698) ### fiber.await() @@ -284,7 +284,7 @@ Wait for current lifecycle work and rethrow startup errors. **Returns** this fiber, once it has settled into a stable state. -[Source](../../vendor/cordis/src/fiber.ts#L754) +[Source](../../vendor/cordis/src/fiber.ts#L776) ### fiber.restart() @@ -302,7 +302,7 @@ Dispose and immediately reload this plugin with its current config. **Returns** a promise resolving once the reload settled. -[Source](../../vendor/cordis/src/fiber.ts#L768) +[Source](../../vendor/cordis/src/fiber.ts#L790) ### fiber.update(config, noSave?) @@ -324,7 +324,7 @@ Resolve a candidate, retain its raw config and apply it through the update water **Returns** The awaited update/restart result, or undefined when a synchronous listener handles it. -[Source](../../vendor/cordis/src/fiber.ts#L783) +[Source](../../vendor/cordis/src/fiber.ts#L805) ## Effect @@ -345,7 +345,7 @@ type Effect = | AsyncEffect ``` -[Source](../../vendor/cordis/src/fiber.ts#L83) +[Source](../../vendor/cordis/src/fiber.ts#L113) ## Disposable @@ -363,7 +363,7 @@ Disposers run in reverse registration order when the owning fiber unloads; they type Disposable = () => T ``` -[Source](../../vendor/cordis/src/fiber.ts#L74) +[Source](../../vendor/cordis/src/fiber.ts#L104) ## EffectMeta @@ -379,7 +379,7 @@ interface EffectMeta { } ``` -[Source](../../vendor/cordis/src/fiber.ts#L96) +[Source](../../vendor/cordis/src/fiber.ts#L126) ## CordisError @@ -405,7 +405,7 @@ namespace CordisError { } ``` -[Source](../../vendor/cordis/src/fiber.ts#L157) +[Source](../../vendor/cordis/src/fiber.ts#L187) ## ValidationError @@ -421,7 +421,31 @@ class ValidationError extends TypeError { * * @param issues — the standard-schema issues, one message line each. */ - constructor(issues: readonly StandardSchemaV1.Issue[]) + constructor(public issues: readonly StandardSchemaV1.Issue[]) + + /** + * Test whether a value is a config `ValidationError`, including one from another copy of Cordis. + * + * @param error — the value to test. + * @returns `true` if `error` carries the global validation-error brand. + */ + static is(error: unknown): error is ValidationError + + /** + * Convert an issue path to plain property keys. + * + * @param path — the standard-schema issue path; segments may be `{ key }` objects. + * @returns the property keys, or an empty array when the issue has no path. + */ + static normalizePath(path: StandardSchemaV1.Issue['path'] = []) + + /** + * Format an issue path as a dotted string. + * + * @param path — the standard-schema issue path. + * @returns the keys joined with `.`. + */ + static formatPath(path: StandardSchemaV1.Issue['path']) } ``` diff --git a/docs/cordis-api/fiber.zh.md b/docs/cordis-api/fiber.zh.md index 88d253452d..5dc9f12a28 100644 --- a/docs/cordis-api/fiber.zh.md +++ b/docs/cordis-api/fiber.zh.md @@ -36,7 +36,7 @@ effect(execute: () => Effect, label?: string): AsyncDisposable> **返回**一个用于撤销该作用的清理函数,并在清理完成后结算。 -[源码](../../vendor/cordis/src/fiber.ts#L421) +[源码](../../vendor/cordis/src/fiber.ts#L443) ### ctx.fiber @@ -55,7 +55,7 @@ fiber: Fiber fiber 会跟踪 `ctx.plugin()` 返回的插件上下文所对应的依赖状态、原始配置与有效配置、生命周期作用和清理操作。 -[源码](../../vendor/cordis/src/fiber.ts#L184) +[源码](../../vendor/cordis/src/fiber.ts#L214) ### fiber.uid @@ -66,7 +66,7 @@ public uid: number | null 在注册表中的唯一 id;根 fiber 的 id 为 0,dispose 后为 `null`。 -[源码](../../vendor/cordis/src/fiber.ts#L186) +[源码](../../vendor/cordis/src/fiber.ts#L216) ### fiber.ctx @@ -77,7 +77,7 @@ public readonly ctx: Context 此 fiber 的插件运行所在的上下文(扩展自父上下文)。 -[源码](../../vendor/cordis/src/fiber.ts#L188) +[源码](../../vendor/cordis/src/fiber.ts#L218) ### fiber.config @@ -88,7 +88,7 @@ public config: any 为下次激活保留的原始插件输入。 -[源码](../../vendor/cordis/src/fiber.ts#L190) +[源码](../../vendor/cordis/src/fiber.ts#L220) ### fiber.state @@ -99,7 +99,7 @@ public state 当前生命周期状态;状态转换会发出 `internal/status`。 -[源码](../../vendor/cordis/src/fiber.ts#L192) +[源码](../../vendor/cordis/src/fiber.ts#L222) ### fiber.dispose @@ -110,7 +110,7 @@ public readonly dispose: () => Promise dispose 此 fiber:卸载插件,并在清理完成后结算。 -[源码](../../vendor/cordis/src/fiber.ts#L194) +[源码](../../vendor/cordis/src/fiber.ts#L224) ### fiber.committed @@ -121,7 +121,7 @@ public committed: Readonly> | undefined 在依赖方清理完成前保留的所需服务实现。 -[源码](../../vendor/cordis/src/fiber.ts#L196) +[源码](../../vendor/cordis/src/fiber.ts#L226) ### fiber.provisions @@ -132,7 +132,7 @@ public readonly provisions: Set 此 fiber 拥有的服务实现,包括隔离域中的服务。 -[源码](../../vendor/cordis/src/fiber.ts#L198) +[源码](../../vendor/cordis/src/fiber.ts#L228) ### fiber.inertia @@ -143,7 +143,7 @@ public inertia: Promise | undefined 当前正在进行的加载或卸载转换;如果没有此类转换,则为 undefined。 -[源码](../../vendor/cordis/src/fiber.ts#L200) +[源码](../../vendor/cordis/src/fiber.ts#L230) ### fiber.name @@ -154,7 +154,7 @@ get name() 插件的显示名称,继承自最近的具名祖先;如果不存在,则为 `'root'`。 -[源码](../../vendor/cordis/src/fiber.ts#L342) +[源码](../../vendor/cordis/src/fiber.ts#L364) ### fiber.assertActive() @@ -172,7 +172,7 @@ assertActive() **返回**:fiber 仍处于活动状态时不返回任何内容。 -[源码](../../vendor/cordis/src/fiber.ts#L357) +[源码](../../vendor/cordis/src/fiber.ts#L379) ### fiber.effect(execute, label?) @@ -203,7 +203,7 @@ effect(execute: () => Effect, label?: string): AsyncDisposable> **返回**一个用于撤销该作用的清理函数,并在清理完成后结算。 -[源码](../../vendor/cordis/src/fiber.ts#L421) +[源码](../../vendor/cordis/src/fiber.ts#L443) ### fiber.getEffects() @@ -220,7 +220,7 @@ getEffects() **返回**:每个带标签的活动作用对应一棵 `EffectMeta` 树。 -[源码](../../vendor/cordis/src/fiber.ts#L574) +[源码](../../vendor/cordis/src/fiber.ts#L596) ### fiber.rawConfig @@ -232,7 +232,7 @@ get rawConfig(): unknown 保留供下次激活使用的原始输入,不执行表达式求值或验证。 -[源码](../../vendor/cordis/src/fiber.ts#L649) +[源码](../../vendor/cordis/src/fiber.ts#L671) ### fiber.effectiveConfig @@ -247,7 +247,7 @@ get effectiveConfig(): unknown 传给插件激活过程或最近一次成功保留实例的更新的对象。候选配置求值不发布结果;volatile 更新保留其中的引用。激活前为 undefined,卸载后仍可读取;需要运行中实例的调用方还应检查 `state`。 -[源码](../../vendor/cordis/src/fiber.ts#L664) +[源码](../../vendor/cordis/src/fiber.ts#L686) ### fiber.resolveConfig(config) @@ -270,7 +270,7 @@ resolveConfig(config: unknown): unknown **返回**候选配置的解析结果,保留 schema 返回对象的身份。 -[源码](../../vendor/cordis/src/fiber.ts#L676) +[源码](../../vendor/cordis/src/fiber.ts#L698) ### fiber.await() @@ -288,7 +288,7 @@ async await() **返回**:进入稳定状态后的此 fiber。 -[源码](../../vendor/cordis/src/fiber.ts#L754) +[源码](../../vendor/cordis/src/fiber.ts#L776) ### fiber.restart() @@ -306,7 +306,7 @@ dispose 此插件,并立即使用其当前配置重新加载。 **返回**一个在重新加载完成后兑现的 promise。 -[源码](../../vendor/cordis/src/fiber.ts#L768) +[源码](../../vendor/cordis/src/fiber.ts#L790) ### fiber.update(config, noSave?) @@ -328,7 +328,7 @@ update(config: any, noSave = false): Awaitable **返回** 可等待的更新或重启结果;同步监听器处理更新时为 undefined。 -[源码](../../vendor/cordis/src/fiber.ts#L783) +[源码](../../vendor/cordis/src/fiber.ts#L805) ## Effect @@ -349,7 +349,7 @@ type Effect = | AsyncEffect ``` -[源码](../../vendor/cordis/src/fiber.ts#L83) +[源码](../../vendor/cordis/src/fiber.ts#L113) ## Disposable @@ -367,7 +367,7 @@ type Effect = type Disposable = () => T ``` -[源码](../../vendor/cordis/src/fiber.ts#L74) +[源码](../../vendor/cordis/src/fiber.ts#L104) ## EffectMeta @@ -383,7 +383,7 @@ interface EffectMeta { } ``` -[源码](../../vendor/cordis/src/fiber.ts#L96) +[源码](../../vendor/cordis/src/fiber.ts#L126) ## CordisError @@ -409,7 +409,7 @@ namespace CordisError { } ``` -[源码](../../vendor/cordis/src/fiber.ts#L157) +[源码](../../vendor/cordis/src/fiber.ts#L187) ## ValidationError @@ -425,7 +425,31 @@ class ValidationError extends TypeError { * * @param issues — the standard-schema issues, one message line each. */ - constructor(issues: readonly StandardSchemaV1.Issue[]) + constructor(public issues: readonly StandardSchemaV1.Issue[]) + + /** + * Test whether a value is a config `ValidationError`, including one from another copy of Cordis. + * + * @param error — the value to test. + * @returns `true` if `error` carries the global validation-error brand. + */ + static is(error: unknown): error is ValidationError + + /** + * Convert an issue path to plain property keys. + * + * @param path — the standard-schema issue path; segments may be `{ key }` objects. + * @returns the property keys, or an empty array when the issue has no path. + */ + static normalizePath(path: StandardSchemaV1.Issue['path'] = []) + + /** + * Format an issue path as a dotted string. + * + * @param path — the standard-schema issue path. + * @returns the keys joined with `.`. + */ + static formatPath(path: StandardSchemaV1.Issue['path']) } ``` diff --git a/docs/cordis-api/inherited.md b/docs/cordis-api/inherited.md index c414eaedd5..25a2177024 100644 --- a/docs/cordis-api/inherited.md +++ b/docs/cordis-api/inherited.md @@ -15,7 +15,7 @@ This file is GENERATED from source (`scripts/gen-cordis-catalog.ts`) and verifie - `ctx.effect` — Register a disposable side effect tied to the fiber. ([`vendor/cordis/src/fiber.ts:9`](../../vendor/cordis/src/fiber.ts)) - `ctx.get / ctx.set / ctx.provide / ctx.accessor / ctx.mixin` — Low-level service-store access and binding. ([`vendor/cordis/src/reflect.ts:7`](../../vendor/cordis/src/reflect.ts)) - `ctx.extend / ctx.isolate / ctx.intercept` — Derive a child context (scoped services / isolation / interception). ([`vendor/cordis/src/context.ts:42`](../../vendor/cordis/src/context.ts)) -- `ctx.root / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger` — Ambient handles onto the running context graph. ([`vendor/cordis/src/context.ts:16`](../../vendor/cordis/src/context.ts)) +- `ctx[Context.root] / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger` — Ambient handles onto the running context graph. ([`vendor/cordis/src/context.ts:16`](../../vendor/cordis/src/context.ts)) - `ctx.timer (+ interval / timeout / throttle / debounce)` — Disposable timer helpers. The `timer` key is provided at runtime; the four supported helpers are mixed onto ctx directly (declared via Pick). ([`vendor/timer/src/index.ts:4`](../../vendor/timer/src/index.ts)) - `ctx.loader` — The config Loader that booted the app (present under the loader). ([`vendor/loader/src/index.ts:30`](../../vendor/loader/src/index.ts)) diff --git a/docs/cordis-api/service.i18n.yaml b/docs/cordis-api/service.i18n.yaml index f1c4076c35..66de719bd9 100644 --- a/docs/cordis-api/service.i18n.yaml +++ b/docs/cordis-api/service.i18n.yaml @@ -6,32 +6,35 @@ en: d2c0c5bce430d1be zh: 124ab2656ea6d044 /service: - en: a163fe605c4a8045 - zh: 060a6f4ce086c5c2 + en: 7a6f25d41ad5192b + zh: 2792165d3c31015e /service/service-name: - en: 32a75e66b17c0b79 - zh: 0a5ff9fc45b3bea0 + en: 1bd1a435be60580f + zh: cb8b96113cac2ed8 /service/static-members: en: ceb197529207a8ed zh: 7d444c03f8be0f0d /service/static-members/service-init: - en: ade1a1c4543fac8c - zh: b7a4b616ee930b5b + en: a0740625ccc443b1 + zh: 1efa474f255783ee /service/static-members/service-check: - en: 111351ada5972a9a - zh: 1537da7793a6a02c -/service/static-members/service-config: - en: 93d8ff69722f9b46 - zh: 9ba1532d164c2231 + en: 699de9371410a4c0 + zh: 32343701e1c3fb5a /service/static-members/service-invoke: - en: 6d87f35f8cf52b05 - zh: 278dbce6025b2834 + en: 24ec894223f0958f + zh: 81b7615fc897f318 +/service/static-members/service-metadata: + en: 735840e221643d61 + zh: 1c2ce2f18786e0c6 /service/static-members/service-extend: - en: 5b78b68d8de8cef9 - zh: 6df27f37da11a104 + en: fa797364cccc8cc3 + zh: 8fa77ae99efee25e /service/static-members/service-tracker: - en: 52071ebded7ec026 - zh: 4647fa3f989b5deb -/service/static-members/service-resolveconfig: - en: ad62f59468d1a765 - zh: 4a31b52f61e1af6e + en: f59cdcca1f9b972a + zh: b50793b1114cff35 +/service/static-members/service-mergeintercept: + en: af31055b96f4834f + zh: 27b22f17ba6329c0 +/service/static-members/service-resolveintercept: + en: 72a73af9a6c877db + zh: 41cf10059ebf51ee diff --git a/docs/cordis-api/service.md b/docs/cordis-api/service.md index d4b0f06da1..0c1bb25449 100644 --- a/docs/cordis-api/service.md +++ b/docs/cordis-api/service.md @@ -9,7 +9,7 @@ Base class for services that expose a named API on `ctx`. Subclasses call `super(ctx, name)` from their constructor. The service is registered immediately and is automatically removed with the owning fiber. -[Source](../../vendor/cordis/src/service.ts#L11) +[Source](../../vendor/cordis/src/service.ts#L12) ### service.name @@ -20,7 +20,7 @@ public name!: string The service name this instance is registered under. -[Source](../../vendor/cordis/src/service.ts#L30) +[Source](../../vendor/cordis/src/service.ts#L33) ## Static members @@ -33,7 +33,7 @@ static readonly init: unique symbol Symbol key of an instance method run after construction (class plugins). -[Source](../../vendor/cordis/src/service.ts#L13) +[Source](../../vendor/cordis/src/service.ts#L14) ### Service.check @@ -44,18 +44,7 @@ static readonly check: unique symbol Symbol key of the availability predicate passed to `ctx.provide()`. -[Source](../../vendor/cordis/src/service.ts#L15) - -### Service.config - -```ts cordis-catalog -/** Symbol key of the phantom intercept-config type parameter. */ -static readonly config: unique symbol -``` - -Symbol key of the phantom intercept-config type parameter. - -[Source](../../vendor/cordis/src/service.ts#L17) +[Source](../../vendor/cordis/src/service.ts#L16) ### Service.invoke @@ -66,7 +55,18 @@ static readonly invoke: unique symbol Symbol key of the call body making a service callable (e.g. `ctx.logger()`). -[Source](../../vendor/cordis/src/service.ts#L19) +[Source](../../vendor/cordis/src/service.ts#L18) + +### Service.metadata + +```ts cordis-catalog +/** Symbol key of the phantom intercept-metadata type parameter. */ +static readonly metadata: unique symbol +``` + +Symbol key of the phantom intercept-metadata type parameter. + +[Source](../../vendor/cordis/src/service.ts#L20) ### Service.extend @@ -77,7 +77,7 @@ static readonly extend: unique symbol Symbol key of the helper deriving an extended service instance. -[Source](../../vendor/cordis/src/service.ts#L21) +[Source](../../vendor/cordis/src/service.ts#L22) ### Service.tracker @@ -88,15 +88,26 @@ static readonly tracker: unique symbol Symbol key of the tracker metadata used for context tracing. -[Source](../../vendor/cordis/src/service.ts#L23) +[Source](../../vendor/cordis/src/service.ts#L24) -### Service.resolveConfig +### Service.mergeIntercept ```ts cordis-catalog -/** Symbol key of the intercept-config resolution helper below. */ -static readonly resolveConfig: unique symbol +/** Symbol key of the intercept-metadata merge hook below. */ +static readonly mergeIntercept: unique symbol ``` -Symbol key of the intercept-config resolution helper below. +Symbol key of the intercept-metadata merge hook below. -[Source](../../vendor/cordis/src/service.ts#L25) +[Source](../../vendor/cordis/src/service.ts#L26) + +### Service.resolveIntercept + +```ts cordis-catalog +/** Symbol key of the intercept-metadata resolution helper below. */ +static readonly resolveIntercept: unique symbol +``` + +Symbol key of the intercept-metadata resolution helper below. + +[Source](../../vendor/cordis/src/service.ts#L28) diff --git a/docs/cordis-api/service.zh.md b/docs/cordis-api/service.zh.md index ec0b443a0e..630f8bb7fb 100644 --- a/docs/cordis-api/service.zh.md +++ b/docs/cordis-api/service.zh.md @@ -11,7 +11,7 @@ 子类在构造函数中调用 `super(ctx, name)`。服务会立即注册,并随所属 fiber 自动移除。 -[源码](../../vendor/cordis/src/service.ts#L11) +[源码](../../vendor/cordis/src/service.ts#L12) ### service.name @@ -22,7 +22,7 @@ public name!: string 此实例注册时使用的服务名称。 -[源码](../../vendor/cordis/src/service.ts#L30) +[源码](../../vendor/cordis/src/service.ts#L33) ## 静态成员 @@ -35,7 +35,7 @@ static readonly init: unique symbol 构造完成后运行的实例方法所使用的符号键(类插件)。 -[源码](../../vendor/cordis/src/service.ts#L13) +[源码](../../vendor/cordis/src/service.ts#L14) ### Service.check @@ -46,18 +46,7 @@ static readonly check: unique symbol 传给 `ctx.provide()` 的可用性谓词所使用的符号键。 -[源码](../../vendor/cordis/src/service.ts#L15) - -### Service.config - -```ts cordis-catalog -/** Symbol key of the phantom intercept-config type parameter. */ -static readonly config: unique symbol -``` - -虚设拦截配置类型参数所使用的符号键。 - -[源码](../../vendor/cordis/src/service.ts#L17) +[源码](../../vendor/cordis/src/service.ts#L16) ### Service.invoke @@ -68,7 +57,18 @@ static readonly invoke: unique symbol 使服务可被调用的调用体所使用的符号键(例如 `ctx.logger()`)。 -[源码](../../vendor/cordis/src/service.ts#L19) +[源码](../../vendor/cordis/src/service.ts#L18) + +### Service.metadata + +```ts cordis-catalog +/** Symbol key of the phantom intercept-metadata type parameter. */ +static readonly metadata: unique symbol +``` + +虚设拦截元数据类型参数所使用的符号键。 + +[源码](../../vendor/cordis/src/service.ts#L20) ### Service.extend @@ -79,7 +79,7 @@ static readonly extend: unique symbol 用于派生扩展服务实例的辅助方法所使用的符号键。 -[源码](../../vendor/cordis/src/service.ts#L21) +[源码](../../vendor/cordis/src/service.ts#L22) ### Service.tracker @@ -90,15 +90,26 @@ static readonly tracker: unique symbol 上下文追踪所用跟踪器元数据的符号键。 -[源码](../../vendor/cordis/src/service.ts#L23) +[源码](../../vendor/cordis/src/service.ts#L24) -### Service.resolveConfig +### Service.mergeIntercept ```ts cordis-catalog -/** Symbol key of the intercept-config resolution helper below. */ -static readonly resolveConfig: unique symbol +/** Symbol key of the intercept-metadata merge hook below. */ +static readonly mergeIntercept: unique symbol ``` -下述拦截配置解析辅助方法所使用的符号键。 +下述拦截元数据合并钩子所使用的符号键。 -[源码](../../vendor/cordis/src/service.ts#L25) +[源码](../../vendor/cordis/src/service.ts#L26) + +### Service.resolveIntercept + +```ts cordis-catalog +/** Symbol key of the intercept-metadata resolution helper below. */ +static readonly resolveIntercept: unique symbol +``` + +下述拦截元数据解析辅助方法所使用的符号键。 + +[源码](../../vendor/cordis/src/service.ts#L28) diff --git a/docs/event-producer-consumer.md b/docs/event-producer-consumer.md index 16bb7b3165..7dfebc32a9 100644 --- a/docs/event-producer-consumer.md +++ b/docs/event-producer-consumer.md @@ -28,7 +28,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t | `api-session/error` | `emit` | [`packages/api/session-controller/src/types.ts:712`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `api-session/removed` | `emit` | [`packages/api/session-controller/src/types.ts:691`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `api-session/status` | `emit` | [`packages/api/session-controller/src/types.ts:698`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | -| `app-boot/config-reload` | `emit` | [`packages/boot/app-boot/src/index.ts:57`](../packages/boot/app-boot/src/index.ts) | [`app-boot`](../packages/boot/app-boot) (`emit`) | [`settings`](../packages/settings/settings) | +| `app-boot/config-reload` | `emit` | [`packages/boot/app-boot/src/index.ts:56`](../packages/boot/app-boot/src/index.ts) | [`app-boot`](../packages/boot/app-boot) (`emit`) | [`settings`](../packages/settings/settings) | | `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:87`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes`, `server` | | `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | - | | `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` | diff --git a/docs/event-producer-consumer.zh.md b/docs/event-producer-consumer.zh.md index 25396f8713..2e854a66dd 100644 --- a/docs/event-producer-consumer.zh.md +++ b/docs/event-producer-consumer.zh.md @@ -30,7 +30,7 @@ | `api-session/error` | `emit` | [`packages/api/session-controller/src/types.ts:712`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `api-session/removed` | `emit` | [`packages/api/session-controller/src/types.ts:691`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | | `api-session/status` | `emit` | [`packages/api/session-controller/src/types.ts:698`](../packages/api/session-controller/src/types.ts) | `session-controller` (`emit`) | `remotes` | -| `app-boot/config-reload` | `emit` | [`packages/boot/app-boot/src/index.ts:57`](../packages/boot/app-boot/src/index.ts) | [`app-boot`](../packages/boot/app-boot) (`emit`) | [`settings`](../packages/settings/settings) | +| `app-boot/config-reload` | `emit` | [`packages/boot/app-boot/src/index.ts:56`](../packages/boot/app-boot/src/index.ts) | [`app-boot`](../packages/boot/app-boot) (`emit`) | [`settings`](../packages/settings/settings) | | `approval/request` | `waterfall` | [`packages/interaction/user-approval/src/types.ts:87`](../packages/interaction/user-approval/src/types.ts) | [`user-approval`](../packages/interaction/user-approval) (`waterfall`) | [`acp`](../packages/acp/acp), `remotes`, `server` | | `authorization/settled` | `emit` | [`packages/credentials/authorization/src/index.ts:57`](../packages/credentials/authorization/src/index.ts) | [`authorization`](../packages/credentials/authorization) (`events.dispatch`) | - | | `commands/change` | `emit` | [`packages/interaction/commands/src/types.ts:89`](../packages/interaction/commands/src/types.ts) | [`commands`](../packages/interaction/commands) (`events.dispatch`) | `remotes` | diff --git a/docs/rescope.i18n.yaml b/docs/rescope.i18n.yaml index 3eb63034c4..4bff27f2c4 100644 --- a/docs/rescope.i18n.yaml +++ b/docs/rescope.i18n.yaml @@ -6,8 +6,8 @@ en: c8aa4d3384ea1306 zh: 5aa030587d5b634d /vendored-package-rescope/name-mapping: - en: 50a68b9b3724eff8 - zh: 9facad930deeb014 + en: 8d86dcb4f884fb2e + zh: 4886ccf670df1b01 /vendored-package-rescope/what-the-rename-does-not-touch: en: 9bb7d09f8cccf695 zh: 2a8f3f60ae5116f3 diff --git a/docs/rescope.md b/docs/rescope.md index c3ec1d0682..c9d4ceb00a 100644 --- a/docs/rescope.md +++ b/docs/rescope.md @@ -8,7 +8,7 @@ The Cordis framework and its foundation libraries are vendored under [`vendor/`] | Directory | Upstream name | Published name | Upstream version | Role | |---|---|---|---|---| -| `vendor/cordis/` | `cordis` | `@deepseek-ai/cordis` | 4.0.0-rc.11 | Framework core: `Context`, `Service`, `Fiber`, events | +| `vendor/cordis/` | `cordis` | `@deepseek-ai/cordis` | 4.0.0-rc.12 | Framework core: `Context`, `Service`, `Fiber`, events | | `vendor/cosmokit/` | `cosmokit` | `@deepseek-ai/cosmokit` | 1.8.1 | Shared utilities the framework and Schemastery build on | | `vendor/schemastery/` | `schemastery` | `@deepseek-ai/schemastery` | 3.18.0 | Config schemas (`Schema`) behind every plugin's `Config` | | `vendor/loader/` | `@cordisjs/plugin-loader` | `@deepseek-ai/cordis-plugin-loader` | 1.0.0-rc.8 | `cordis.yml` loading, plugin resolution, repository cache | diff --git a/docs/rescope.zh.md b/docs/rescope.zh.md index a02d152204..220e6feebc 100644 --- a/docs/rescope.zh.md +++ b/docs/rescope.zh.md @@ -8,7 +8,7 @@ Cordis 框架及其基础库以源码形式 vendored 在 [`vendor/`](../vendor/R | 目录 | 上游名 | 发布名 | 上游版本 | 角色 | |---|---|---|---|---| -| `vendor/cordis/` | `cordis` | `@deepseek-ai/cordis` | 4.0.0-rc.11 | 框架核心:`Context`、`Service`、`Fiber`、事件 | +| `vendor/cordis/` | `cordis` | `@deepseek-ai/cordis` | 4.0.0-rc.12 | 框架核心:`Context`、`Service`、`Fiber`、事件 | | `vendor/cosmokit/` | `cosmokit` | `@deepseek-ai/cosmokit` | 1.8.1 | 框架与 Schemastery 共用的基础工具 | | `vendor/schemastery/` | `schemastery` | `@deepseek-ai/schemastery` | 3.18.0 | 配置 schema(`Schema`),每个插件的 `Config` 都基于它 | | `vendor/loader/` | `@cordisjs/plugin-loader` | `@deepseek-ai/cordis-plugin-loader` | 1.0.0-rc.8 | `cordis.yml` 装载、插件解析、repository 缓存 | diff --git a/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.i18n.yaml b/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.i18n.yaml new file mode 100644 index 0000000000..7c04c1b516 --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.i18n.yaml @@ -0,0 +1,16 @@ +# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading +# section, a hash of its English and Chinese blocks outside code blocks and generated regions. +# After editing either side, bring the other along and re-record with: +# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.md +/: + en: 4de1e21e06e1c67a + zh: f3195026d93e8127 +/ctx-context-root-replaces-ctx-root-and-service-intercept-metadata-is-renamed: + en: 3ecaed868843b9fe + zh: 827999ad27256e8e +/ctx-context-root-replaces-ctx-root-and-service-intercept-metadata-is-renamed/change: + en: 84337d9923efc3c6 + zh: e294b792081c7989 +/ctx-context-root-replaces-ctx-root-and-service-intercept-metadata-is-renamed/migration: + en: adec35b8052efcd3 + zh: 56c53d6089761976 diff --git a/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.md b/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.md new file mode 100644 index 0000000000..ce6af127ae --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.md @@ -0,0 +1,31 @@ +--- +kind: upgrade-guide +description: "Cordis 4.0.0-rc.12 replaces ctx.root with ctx[Context.root] and renames the service intercept-metadata API." +--- + +# `ctx[Context.root]` replaces `ctx.root`, and service intercept metadata is renamed + +English | [中文](guide.zh.md) + +## Change + +`@deepseek-ai/cordis` now carries upstream Cordis 4.0.0-rc.12. Third-party plugins and services written against the previous release are affected: + +- `ctx.root` no longer exists. The root context is `ctx[Context.root]`; `Context.root` is a symbol exported on the `Context` class. Inside a plugin, reading `ctx.root` throws `cannot get property "root" without inject`. +- `Service.config` becomes `Service.metadata`. A service declares its intercept type with `declare [Service.metadata]: T`. +- `[Service.resolveConfig](base?, head?)` becomes `[Service.resolveIntercept]()`, which takes no arguments. +- The global symbol `Symbol.for('cordis.metadata')` now keys `Service.metadata`. The method metadata that decorators such as `@Inject()` store moved to `symbols.decorator` (`Symbol.for('cordis.decorator')`). +- A service's `Config.merge` hook is no longer called. Override `[Service.mergeIntercept](...values)` instead; it receives the values in increasing precedence. +- Metadata a plugin declares in object-form `inject` now has the lowest precedence. Intercepts added with `ctx.intercept()` override it; previously the injected value overrode them. +- A context created with `ctx.isolate(name)` no longer falls back to the enclosing plugin's injected `name`. Plugins started under it, and reads after its own provision is withdrawn, throw `cannot get property "" without inject`. +- A failed `ctx.parallel()` throws an `AggregateError` whose message names the event, and a fiber disposed while it was not active, such as a failed one, now settles to `FiberState.DISPOSED`. + +## Migration + +1. Replace every `ctx.root` with `ctx[Context.root]`, importing `Context` as a value from `@deepseek-ai/cordis`. Plain JavaScript without the import can read `ctx[Symbol.for('cordis.root')]`. +2. In service classes, rename `declare [Service.config]` to `declare [Service.metadata]` and calls of `[Service.resolveConfig]()` to `[Service.resolveIntercept]()`. Replace `base` and `head` arguments by declaring the base value in `inject` and adding the override with `ctx.intercept()`. +3. Where code reads or writes decorator method metadata through `symbols.metadata` or `Symbol.for('cordis.metadata')`, use `symbols.decorator` instead. +4. Move a `Config.merge` implementation to a `[Service.mergeIntercept](...values)` method on the service class. +5. Where a plugin relied on its `inject` metadata overriding an ancestor `ctx.intercept()`, set the value with `ctx.intercept()` at the plugin's context instead. +6. Where code under `ctx.isolate(name)` needs the enclosing plugin's service, provide that service inside the isolated context or start the code from a context that is not isolated. +7. Run your TypeScript build: references to `ctx.root`, `Service.config` and `Service.resolveConfig` fail to compile. Start the plugin and confirm that services resolve and logs keep their names. diff --git a/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.zh.md b/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.zh.md new file mode 100644 index 0000000000..de78a1c51a --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.2/cordis-root-and-intercept-metadata/guide.zh.md @@ -0,0 +1,31 @@ +--- +kind: upgrade-guide +description: "Cordis 4.0.0-rc.12 用 ctx[Context.root] 取代 ctx.root,并重命名服务拦截元数据 API。" +--- + +# `ctx[Context.root]` 取代 `ctx.root`,服务拦截元数据 API 重命名 + +[English](guide.md) | 中文 + +## 变更 + +`@deepseek-ai/cordis` 现在包含上游 Cordis 4.0.0-rc.12。针对上一版本编写的第三方插件和服务会受到以下影响: + +- `ctx.root` 不再存在。根上下文改为 `ctx[Context.root]`;`Context.root` 是 `Context` 类上导出的 symbol。在插件内读取 `ctx.root` 会抛出 `cannot get property "root" without inject`。 +- `Service.config` 改为 `Service.metadata`。服务用 `declare [Service.metadata]: T` 声明其拦截类型。 +- `[Service.resolveConfig](base?, head?)` 改为不带参数的 `[Service.resolveIntercept]()`。 +- 全局 symbol `Symbol.for('cordis.metadata')` 现在对应 `Service.metadata`。`@Inject()` 等装饰器存储的方法元数据改用 `symbols.decorator`(`Symbol.for('cordis.decorator')`)。 +- 服务的 `Config.merge` 钩子不再被调用。改为重写 `[Service.mergeIntercept](...values)`;它按优先级从低到高接收各个值。 +- 插件在对象形式的 `inject` 中声明的元数据现在优先级最低,用 `ctx.intercept()` 添加的拦截会覆盖它;此前是注入的值覆盖拦截。 +- 用 `ctx.isolate(name)` 创建的上下文不再回退到外层插件注入的 `name`。在其下启动的插件,以及在其自身提供撤回后的读取,都会抛出 `cannot get property "" without inject`。 +- `ctx.parallel()` 失败时抛出的 `AggregateError` 的消息会注明事件名;在非活动状态下被销毁的 fiber(例如失败的 fiber)现在会进入 `FiberState.DISPOSED`。 + +## 迁移 + +1. 将所有 `ctx.root` 替换为 `ctx[Context.root]`,并从 `@deepseek-ai/cordis` 以值的形式导入 `Context`。无法导入的纯 JavaScript 可以读取 `ctx[Symbol.for('cordis.root')]`。 +2. 在服务类中,将 `declare [Service.config]` 改为 `declare [Service.metadata]`,将对 `[Service.resolveConfig]()` 的调用改为 `[Service.resolveIntercept]()`。原来的 `base` 参数改为在 `inject` 中声明,`head` 参数改为用 `ctx.intercept()` 添加。 +3. 如果代码通过 `symbols.metadata` 或 `Symbol.for('cordis.metadata')` 读写装饰器的方法元数据,改用 `symbols.decorator`。 +4. 将 `Config.merge` 的实现移到服务类的 `[Service.mergeIntercept](...values)` 方法中。 +5. 如果插件依赖其 `inject` 元数据覆盖祖先的 `ctx.intercept()`,改为在该插件的上下文上用 `ctx.intercept()` 设置该值。 +6. 如果 `ctx.isolate(name)` 之下的代码需要外层插件的服务,在隔离的上下文中提供该服务,或从未隔离的上下文启动这段代码。 +7. 运行 TypeScript 构建:引用 `ctx.root`、`Service.config` 和 `Service.resolveConfig` 的代码会编译失败。启动插件,确认服务可以解析,日志名称保持不变。 diff --git a/docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.i18n.yaml b/docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.i18n.yaml similarity index 87% rename from docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.i18n.yaml rename to docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.i18n.yaml index e83171514a..929426347b 100644 --- a/docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.i18n.yaml +++ b/docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.i18n.yaml @@ -1,13 +1,13 @@ # Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading # section, a hash of its English and Chinese blocks outside code blocks and generated regions. # After editing either side, bring the other along and re-record with: -# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.md +# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.md /: en: a63d2d172b0f3536 zh: e5c370889a1b4e7b /resolve-the-file-policy-for-deepseekfilestore: - en: a27c476b947fc36b - zh: e5da712c4f097bfd + en: d51f1bd3ffe80469 + zh: 5c507e956ded97d7 /resolve-the-file-policy-for-deepseekfilestore/change: en: ec9035d819d611a0 zh: ab2b7518ee3a15d8 diff --git a/docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.md b/docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.md similarity index 100% rename from docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.md rename to docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.md diff --git a/docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.zh.md b/docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.zh.md similarity index 100% rename from docs/upgrade-guide/v0.2.2-rc.2/deepseek-file-policy/guide.zh.md rename to docs/upgrade-guide/v0.2.2-rc.3/deepseek-file-policy/guide.zh.md diff --git a/package.json b/package.json index feaeee261a..cce2a50477 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@deepseek-ai/dsh-root", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "license": "MIT", "private": true, "type": "module", diff --git a/packages/acp/acp/package.json b/packages/acp/acp/package.json index c38b8c70a0..12f4ffa0da 100644 --- a/packages/acp/acp/package.json +++ b/packages/acp/acp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-acp", "description": "Automation-only Agent Client Protocol server for driving DeepSeek Harness agents over JSON-RPC stdio", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/gateway/package.json b/packages/api/gateway/package.json index 500b8b3b56..c1fdd4e6f5 100644 --- a/packages/api/gateway/package.json +++ b/packages/api/gateway/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-gateway", "description": "Typert Remote Host dispatcher and Client API endpoint", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/gateway/tests/browser-credentials.ts b/packages/api/gateway/tests/browser-credentials.ts index 111d9c5599..41662a7972 100644 --- a/packages/api/gateway/tests/browser-credentials.ts +++ b/packages/api/gateway/tests/browser-credentials.ts @@ -1,4 +1,4 @@ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import type { IncomingMessage, ServerResponse } from 'node:http' import * as Token from '@deepseek-ai/dsh-host-authentication-token' import { BrowserAuth } from '@deepseek-ai/dsh-host-authentication-token/src/browser-auth.ts' @@ -30,7 +30,7 @@ export async function browserCookie(ctx: Context): Promise { const existing = browserCookies.get(ctx) if (existing !== undefined) return existing await ctx.plugin(Token, { cookieMaxAgeDays: 30 }).await() - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) const target = new URL(auth.authenticatedUrl(`http://127.0.0.1:${String(ctx.webServer.port)}`)) let setCookie: string | undefined const request = { diff --git a/packages/api/gateway/tests/gateway.host.spec.ts b/packages/api/gateway/tests/gateway.host.spec.ts index 2e3e541faa..add5d57864 100644 --- a/packages/api/gateway/tests/gateway.host.spec.ts +++ b/packages/api/gateway/tests/gateway.host.spec.ts @@ -191,7 +191,7 @@ async function serveRoute(ctx: Context, route: WebRoute): Promise<{ readonly ori /** Exchange the token plugin's launch URL for the separate HTTP fixture's origin. */ async function browserCookie(ctx: Context, origin: string): Promise { await ctx.plugin(Token, { cookieMaxAgeDays: 30 }).await() - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) const target = new URL(auth.authenticatedUrl(origin)) let setCookie: string | undefined const request = { diff --git a/packages/api/gateway/tests/operator-connect.host.spec.ts b/packages/api/gateway/tests/operator-connect.host.spec.ts index e06b30e916..26f474200d 100644 --- a/packages/api/gateway/tests/operator-connect.host.spec.ts +++ b/packages/api/gateway/tests/operator-connect.host.spec.ts @@ -479,7 +479,7 @@ async function boot(): Promise { } async function exchange(host: Host, mode: 'html' | 'none' | 'answer'): Promise { - const auth = await BrowserAuth.create(host.ctx.root, host.ctx.credentials, 30) + const auth = await BrowserAuth.create(host.ctx[Context.root], host.ctx.credentials, 30) const target = new URL(auth.authenticatedUrl(`${host.origin}${mode === 'html' ? '/' : '/connect'}`)) if (mode !== 'html') target.searchParams.set('interactions', mode) const response = await fetch(target, { redirect: 'manual', headers: { accept: mode === 'html' ? 'text/html' : 'application/json' } }) diff --git a/packages/api/gateway/tests/peer.ts b/packages/api/gateway/tests/peer.ts index 2571e791d5..ae59067b02 100644 --- a/packages/api/gateway/tests/peer.ts +++ b/packages/api/gateway/tests/peer.ts @@ -1,5 +1,5 @@ /** Owner Peers for Gateway specs: every in-process call names its Peer explicitly. */ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import { Peer } from '@deepseek-ai/dsh-client-connection' import type { PeerScope, Principal } from '@deepseek-ai/dsh-typert-protocol' @@ -11,10 +11,10 @@ const owners = new WeakMap() * @returns the tree's shared owner Peer. */ export function ownerPeer(ctx: Context): PeerScope { - let peer = owners.get(ctx.root) + let peer = owners.get(ctx[Context.root]) if (peer === undefined) { - peer = new Peer(ctx.root, { principal: { kind: 'owner' } }) - owners.set(ctx.root, peer) + peer = new Peer(ctx[Context.root], { principal: { kind: 'owner' } }) + owners.set(ctx[Context.root], peer) } return peer } @@ -26,5 +26,5 @@ export function ownerPeer(ctx: Context): PeerScope { * @returns an independent Peer. */ export function peerFor(ctx: Context, principal: Principal): PeerScope { - return new Peer(ctx.root, { principal }) + return new Peer(ctx[Context.root], { principal }) } diff --git a/packages/api/job-controller/package.json b/packages/api/job-controller/package.json index 2126ff9461..f2829232b1 100644 --- a/packages/api/job-controller/package.json +++ b/packages/api/job-controller/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-job-controller", "description": "Job Remote observation stream and the reference-counted client job-output service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/remote-access/package.json b/packages/api/remote-access/package.json index 25dd274c9c..e4d0d8e34f 100644 --- a/packages/api/remote-access/package.json +++ b/packages/api/remote-access/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-remote-access", "description": "Method-level Remote access control for non-owner Peers and the per-Peer access snapshot", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/remotes/package.json b/packages/api/remotes/package.json index e024d0c8b1..9ff3b1d910 100644 --- a/packages/api/remotes/package.json +++ b/packages/api/remotes/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-remotes", "description": "Remote BFF assembly for application-selected Host capabilities", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/session-controller/package.json b/packages/api/session-controller/package.json index 9061f1be29..ad5a3333a8 100644 --- a/packages/api/session-controller/package.json +++ b/packages/api/session-controller/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-session-controller", "description": "Session Remote commands, cold reads, and live control transport", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/session-controller/tests/transport.host.spec.ts b/packages/api/session-controller/tests/transport.host.spec.ts index 1389fb78d5..af297f86c0 100644 --- a/packages/api/session-controller/tests/transport.host.spec.ts +++ b/packages/api/session-controller/tests/transport.host.spec.ts @@ -86,7 +86,7 @@ function controllers( history: HistoryController web: WebController } { - roots.add(ctx.root) + roots.add(ctx[Context.root]) installSessionReadTestServices(ctx) const history = new HistoryController(ctx) return { history, web: new WebController(ctx, history, promote) } diff --git a/packages/api/settings-controller/package.json b/packages/api/settings-controller/package.json index e4a5820703..a3d0d6fef5 100644 --- a/packages/api/settings-controller/package.json +++ b/packages/api/settings-controller/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-settings-controller", "description": "Remote owner for the configuration surfaces over the settings-domain seams", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/terminal-controller/package.json b/packages/api/terminal-controller/package.json index fc4e67729d..5c71a8c692 100644 --- a/packages/api/terminal-controller/package.json +++ b/packages/api/terminal-controller/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-terminal-controller", "description": "Session-owned interactive terminals with shell discovery, screen recovery and typed Remote control", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/workspace-controller/package.json b/packages/api/workspace-controller/package.json index 0495643474..3ae77620c0 100644 --- a/packages/api/workspace-controller/package.json +++ b/packages/api/workspace-controller/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-workspace-controller", "description": "Workspace Remote commands and reconnect-safe state transport", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/api/workspace-files/package.json b/packages/api/workspace-files/package.json index cce39a9671..10e44df9a6 100644 --- a/packages/api/workspace-files/package.json +++ b/packages/api/workspace-files/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-api-workspace-files", "description": "Workspace file service and Client resource provider: bounded reads, directory listing, and live metadata over the workspaceFiles Remote namespace", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/attachment/attachment-local/package.json b/packages/attachment/attachment-local/package.json index 7bf2b317ad..2a3bce792a 100644 --- a/packages/attachment/attachment-local/package.json +++ b/packages/attachment/attachment-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-attachment-local", "description": "Private content-addressed DSH_HOME attachment storage", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/attachment/attachment/package.json b/packages/attachment/attachment/package.json index 7a17fd1b15..dd802f99dc 100644 --- a/packages/attachment/attachment/package.json +++ b/packages/attachment/attachment/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-attachment", "description": "Durable immutable attachment storage seam for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/boot/app-boot/package.json b/packages/boot/app-boot/package.json index 04e1220030..7ecb6608e9 100644 --- a/packages/boot/app-boot/package.json +++ b/packages/boot/app-boot/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-app-boot", "description": "Shared boot glue for the app bins: .env loading, fail-loud Loader guards, snapshot-aware config resolution, and the Loader boot sequence", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -40,7 +40,6 @@ "@deepseek-ai/dsh-package-manifest": "workspace:*", "@eslint-community/regexpp": "^4.12.2", "ajv": "^8.20.0", - "js-yaml": "^4.3.2", "node-addon-require-builtin": "^0.1.9", "resolve.exports": "^2.0.3", "semver": "^7.8.5", @@ -63,7 +62,6 @@ "@deepseek-ai/dsh-launch-environment": "workspace:*", "@deepseek-ai/dsh-home-paths": "workspace:*", "@deepseek-ai/dsh-system-prompt": "workspace:*", - "@types/js-yaml": "^4.0.9", "@types/semver": "^7.8.0", "@deepseek-ai/cordis": "workspace:~" } diff --git a/packages/boot/app-boot/src/compatibility-preflight.ts b/packages/boot/app-boot/src/compatibility-preflight.ts index ae10be63e1..c8aeedf2ad 100644 --- a/packages/boot/app-boot/src/compatibility-preflight.ts +++ b/packages/boot/app-boot/src/compatibility-preflight.ts @@ -5,8 +5,7 @@ import { dirname, extname, isAbsolute, join } from 'node:path' import { fileURLToPath, pathToFileURL } from 'node:url' import type { Context } from '@deepseek-ai/cordis' import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader' -import { applyEntryPatches, entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' -import { load } from 'js-yaml' +import { applyEntryPatches, parseEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import { resolvePluginResource } from './package-meta.ts' import { barePackageName } from './profile-resolution/resolver.ts' import type {} from './profile-resolution/service.ts' @@ -151,7 +150,7 @@ function preflight( includes.add(filename) try { let data: unknown - try { data = load(readFileSync(filename, 'utf8'), { schema: entryListSchema }) } + try { data = parseEntryYaml(readFileSync(filename, 'utf8')) } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT' || config.initial === undefined) return undefined data = config.initial diff --git a/packages/boot/app-boot/src/config-schema/collect.ts b/packages/boot/app-boot/src/config-schema/collect.ts index 4bd1e7a40b..0eed38de5c 100644 --- a/packages/boot/app-boot/src/config-schema/collect.ts +++ b/packages/boot/app-boot/src/config-schema/collect.ts @@ -3,10 +3,9 @@ import { readFile, realpath } from 'node:fs/promises' import { extname, join } from 'node:path' import { fileURLToPath, pathToFileURL } from 'node:url' -import * as yaml from 'js-yaml' import Loader, { EntryGroup, ModuleLoader, isJsExpr, type EntryOptions } from '@deepseek-ai/cordis-plugin-loader' import Group from '@deepseek-ai/cordis-plugin-group' -import Include, { applyEntryPatches, entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' +import Include, { applyEntryPatches, entryYamlErrorPosition, parseEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import type { Profile, RuntimeResolution } from '../profile.ts' import { installRuntimeInterception } from '../profile-resolution/resolver.ts' import { buildConfigSchemaDocument } from './document.ts' @@ -148,10 +147,11 @@ export async function collectConfigSchemas( } if (content !== undefined) { try { - source = extension === '.json' ? JSON.parse(content) : yaml.load(content, { schema: entryListSchema }) + source = extension === '.json' ? JSON.parse(content) : parseEntryYaml(content) } catch (error) { // Parser messages can quote configuration values; retain only the file and location. - const at = error instanceof yaml.YAMLException ? ` at line ${error.mark.line + 1}, column ${error.mark.column + 1}` : '' + const position = entryYamlErrorPosition(error) + const at = position === undefined ? '' : ` at line ${position.line}, column ${position.column}` throw new Error(`invalid ${extension === '.json' ? 'JSON' : 'YAML'} include ${filename}${at}`) } } diff --git a/packages/boot/app-boot/src/index.ts b/packages/boot/app-boot/src/index.ts index dd888fb7b0..13b3ff792c 100644 --- a/packages/boot/app-boot/src/index.ts +++ b/packages/boot/app-boot/src/index.ts @@ -12,10 +12,9 @@ import { inspect, parseEnv } from 'node:util' import { captureStartupComposition, type StartupCompositionDiagnostic } from './startup-diagnostics.ts' export type { StartupCompositionDiagnostic, StartupPluginState, StartupServiceState } from './startup-diagnostics.ts' import { basename, dirname, isAbsolute, resolve } from 'node:path' -import * as yaml from 'js-yaml' import { Context, type Fiber, type FiberState } from '@deepseek-ai/cordis' import Loader, { type Entry, type EntryGroup, type EntryOptions } from '@deepseek-ai/cordis-plugin-loader' -import Include, { applyEntryPatches, entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' +import Include, { applyEntryPatches, parseEntryYaml, stringifyEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import Group from '@deepseek-ai/cordis-plugin-group' import { dshHomePath, dshPath, resolveDshHome } from '@deepseek-ai/dsh-home-paths' import { createLaunchEnvironmentSnapshot, type LaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment' @@ -280,13 +279,6 @@ export function loadLayeredEnv( const bootstrapIncludes = new WeakMap() -// The include's YAML dialect (`!!js` scalars become expression nodes the -// Loader interpolates against each entry's injection-ready context), imported -// from the include itself so patch parsing and config dumping can never drift -// from what the include mounts. User patch layers share it so they may -// reference `process.env`. -const userPatchesSchema = entryListSchema - /** What a caller of {@link recomposeProfile} already did and requires. */ export interface ProfileRecompositionOptions { /** Explicit enablement targets whose existing failures also reject the recomposition. */ @@ -595,7 +587,7 @@ function parsePatchList( ): PatchOptions[] { let parsed: unknown try { - parsed = yaml.load(content, { schema: userPatchesSchema }) + parsed = parseEntryYaml(content) } catch (error) { throw new Error(`${binName}: failed to parse ${label} ${file}: ${String(error)}`) } @@ -664,7 +656,7 @@ export function renderConfigDump( } let parsed: unknown try { - parsed = yaml.load(content, { schema: entryListSchema }) + parsed = parseEntryYaml(content) } catch (error) { throw new Error(`${binName}: failed to parse config ${absoluteConfigPath}: ${String(error)}`) } @@ -725,7 +717,7 @@ function groupedDump( const flush = (): void => { if (currentLabel === undefined || group.length === 0) return lines.push(`# == ${currentLabel}`) - lines.push(yaml.dump(group, { schema: entryListSchema, noRefs: true }).trimEnd()) + lines.push(stringifyEntryYaml(group).trimEnd()) group = [] } for (let index = 0; index < composed.length; index += 1) { diff --git a/packages/boot/app-boot/tests/app-boot.spec.ts b/packages/boot/app-boot/tests/app-boot.spec.ts index aae624dd5e..e46864210f 100644 --- a/packages/boot/app-boot/tests/app-boot.spec.ts +++ b/packages/boot/app-boot/tests/app-boot.spec.ts @@ -1108,7 +1108,7 @@ describe('boot', () => { writeFileSync(join(dir, 'exiting.mjs'), [ 'export const name = "exiting"', 'export function apply(ctx) {', - ' void ctx.root.fiber.dispose()', + ' void ctx[Symbol.for("cordis.root")].fiber.dispose()', '}', '', ].join('\n')) diff --git a/packages/boot/app-boot/tests/compatibility-preflight.spec.ts b/packages/boot/app-boot/tests/compatibility-preflight.spec.ts index e753fa5b4d..0fcf850d56 100644 --- a/packages/boot/app-boot/tests/compatibility-preflight.spec.ts +++ b/packages/boot/app-boot/tests/compatibility-preflight.spec.ts @@ -4,9 +4,8 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { pathToFileURL } from 'node:url' import { Context } from '@deepseek-ai/cordis' -import { entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader' -import { load } from 'js-yaml' import { describe, expect, it, onTestFinished, vi } from 'vitest' import { PROFILE_COMPATIBILITY_FILENAME, PluginPackages, boot, getDshRuntimeVersion, @@ -358,7 +357,7 @@ it('reuses the documented literal Include dialect when reading included entries' f.plugin('allowed-plugin') const list = join(f.dir, 'nested.cordis.yml') writeFileSync(list, '- id: nested\n name: allowed-plugin\n') - expect(load(readFileSync(list, 'utf8'), { schema: entryListSchema })).toEqual([{ id: 'nested', name: 'allowed-plugin' }]) + expect(parseEntryYaml(readFileSync(list, 'utf8'))).toEqual([{ id: 'nested', name: 'allowed-plugin' }]) // The launcher mounts an Include with a file URL, which a Windows path cannot stand in for: `C:` reads as a scheme. expect(await f.run([{ insert: [{ id: 'outer', name: 'cordis:include', config: { path: pathToFileURL(list).href } }] }])) .toEqual(['import:allowed-plugin', 'apply:allowed-plugin']) diff --git a/packages/boot/app-boot/tests/config-dump.spec.ts b/packages/boot/app-boot/tests/config-dump.spec.ts index 6703df20e0..8a56d57e34 100644 --- a/packages/boot/app-boot/tests/config-dump.spec.ts +++ b/packages/boot/app-boot/tests/config-dump.spec.ts @@ -12,8 +12,7 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { pathToFileURL } from 'node:url' import { afterAll, describe, expect, it, vi } from 'vitest' -import * as yaml from 'js-yaml' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { loadOverlayPatches, renderConfigDump } from '../src/index.ts' const NAME = 'dsh-test-bin' @@ -73,7 +72,7 @@ describe('renderConfigDump', () => { ], () => {}) // Comments do not break loadability: the dump parses as one document // equal to what boot() would mount. - const parsed = yaml.load(dump, { schema: entryListSchema }) as { + const parsed = parseEntryYaml(dump) as { id: string config?: Record }[] @@ -140,7 +139,7 @@ describe('renderConfigDump', () => { { label: 'b.yml', patches: [{ id: 'child', config: { v: 2 } }] }, ], line => void warnings.push(line)) expect(warnings).toEqual([`${NAME}: [b.yml] patch: entry "child" not found`]) - const parsed = yaml.load(dump, { schema: entryListSchema }) as { + const parsed = parseEntryYaml(dump) as { config?: { config?: { v?: number } }[] }[] expect(parsed[0]?.config?.[0]?.config?.v).toBe(1) @@ -169,7 +168,7 @@ describe('renderConfigDump', () => { line => void warnings.push(line), ) expect(warnings).toEqual([`${NAME}: [overlay.yml] patch: entry "only-on-another-surface" not found`]) - const parsed = yaml.load(dump, { schema: entryListSchema }) as { config?: { value?: string } }[] + const parsed = parseEntryYaml(dump) as { config?: { value?: string } }[] expect(parsed[0]?.config?.value).toBe('patched') }) diff --git a/packages/boot/app-boot/tests/config-reload.spec.ts b/packages/boot/app-boot/tests/config-reload.spec.ts index f96ddd36c6..c0d10e30db 100644 --- a/packages/boot/app-boot/tests/config-reload.spec.ts +++ b/packages/boot/app-boot/tests/config-reload.spec.ts @@ -293,7 +293,7 @@ describe('shipped builtins', () => { // implementation is stored under that symbol, so the root realm cannot // resolve the service and a second composition mounting the same rows // cannot collide with this one. - const rootKey = ctx.root[Context.isolate].demoRealmSvc + const rootKey = ctx[Context.root][Context.isolate].demoRealmSvc expect(rootKey).toBeDefined() expect(ctx.reflect.store[rootKey!]).toBeUndefined() } finally { diff --git a/packages/boot/app-boot/tests/schemastery-json-schema.spec.ts b/packages/boot/app-boot/tests/schemastery-json-schema.spec.ts index acbe7c5432..84d79c954d 100644 --- a/packages/boot/app-boot/tests/schemastery-json-schema.spec.ts +++ b/packages/boot/app-boot/tests/schemastery-json-schema.spec.ts @@ -343,7 +343,7 @@ describe('Schemastery input projection', () => { expect(accepts(result, { children: [{ children: [] }] })).toBe(true) expect(result.limitations.join(' ')).toContain('recursive default') expect(result.definitions.testRecursive0).not.toHaveProperty('anyOf') - expect(accepts(result, { __jsExpr: 'ctx.root' })).toBe(true) + expect(accepts(result, { __jsExpr: 'ctx[Symbol.for("cordis.root")]' })).toBe(true) expect(accepts(result, { children: [{ __jsExpr: 'ctx.child' }] })).toBe(true) expect(accepts(result, { children: [3] })).toBe(false) expect(JSON.stringify(result)).not.toContain('"uid"') diff --git a/packages/boot/cmdline/package.json b/packages/boot/cmdline/package.json index e40c96b5ad..c4a451065e 100644 --- a/packages/boot/cmdline/package.json +++ b/packages/boot/cmdline/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cmdline", "description": "Immutable command-line handoff from a dsh launcher to any app plugin that injects cmdlineArgs", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/boot/config-editor/package.json b/packages/boot/config-editor/package.json index 6f1273f1a2..58cc98c3f5 100644 --- a/packages/boot/config-editor/package.json +++ b/packages/boot/config-editor/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-config-editor", "description": "Persist plugin configuration through profile patches and Loader reconciliation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -40,15 +40,13 @@ }, "dependencies": { "@deepseek-ai/dsh-atomic-write": "workspace:*", - "yaml": "^2.8.1", - "js-yaml": "^4.3.2" + "yaml": "^2.8.1" }, "devDependencies": { "@deepseek-ai/cordis": "workspace:~", "@deepseek-ai/cordis-plugin-loader": "workspace:~", "@deepseek-ai/dsh-hmr": "workspace:*", "@deepseek-ai/cordis-plugin-include": "workspace:~", - "@types/js-yaml": "^4.0.9", "@deepseek-ai/dsh-app-boot": "workspace:*" }, "peerDependenciesMeta": { diff --git a/packages/boot/config-editor/src/index.ts b/packages/boot/config-editor/src/index.ts index 8fe686e478..f7c377bbac 100644 --- a/packages/boot/config-editor/src/index.ts +++ b/packages/boot/config-editor/src/index.ts @@ -3,8 +3,7 @@ import { readFile } from 'node:fs/promises' import { join } from 'node:path' import { isDeepStrictEqual } from 'node:util' import { Context, FiberState, Service } from '@deepseek-ai/cordis' -import { entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' -import yaml from 'js-yaml' +import { parseEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import type { Entry, EntryOptions } from '@deepseek-ai/cordis-plugin-loader' import type {} from '@deepseek-ai/dsh-hmr' import { composeEntries, loadProfileDirectory, readProfilePatches, reconcileProfilePatches } from '@deepseek-ai/dsh-app-boot' @@ -93,7 +92,7 @@ export class ConfigEditor extends Service { await withFileLock(join(this.ownerContext.profileContext.dir, 'package.json'), async () => { if (!this.entries().includes(entry) || entry.fiber === undefined) throw new Error('Configuration entry is no longer available') const beforePatches = readProfilePatches('dsh', this.ownerContext.profileContext) - await reconcileProfilePatches(this.ownerContext.root, beforePatches, 'dsh') + await reconcileProfilePatches(this.ownerContext[Context.root], beforePatches, 'dsh') if (!this.entries().includes(entry)) throw new Error('Configuration entry changed during reload') const current = structuredClone((entry.options.config ?? {}) as Record) const inherited = this.inherited(entry, loadProfileDirectory('dsh', this.ownerContext.profileContext.dir, this.ownerContext.profileContext.installAnchor)) @@ -133,17 +132,17 @@ export class ConfigEditor extends Service { } }) const profile = this.ownerContext.profileContext const loaded = loadProfileDirectory('dsh', profile.dir, profile.installAnchor) - const patches = readProfilePatches('dsh', profile, { ...loaded, patches: yaml.load(String(document), { schema: entryListSchema }) as PatchOptions[] }) + const patches = readProfilePatches('dsh', profile, { ...loaded, patches: parseEntryYaml(String(document)) as PatchOptions[] }) const effective = flatten(composeEntries([patches])).find(row => row.id === entry.options.id) if (!isDeepStrictEqual(effective?.config ?? {}, next)) { throw new Error(`Configuration for "${entry.options.id}" is overridden by a home patch or command-line overlay`) } await writeFileAtomic(path, String(document), { mode: 0o600 }) try { - await reconcileProfilePatches(this.ownerContext.root, patches, 'dsh', [entry.options.id]) + await reconcileProfilePatches(this.ownerContext[Context.root], patches, 'dsh', [entry.options.id]) } catch (error) { await writeFileAtomic(path, before, { mode: 0o600 }) - await reconcileProfilePatches(this.ownerContext.root, beforePatches, 'dsh') + await reconcileProfilePatches(this.ownerContext[Context.root], beforePatches, 'dsh') throw error } }) diff --git a/packages/boot/hmr/package.json b/packages/boot/hmr/package.json index 1b82bb68ad..7e7fcfb0d9 100644 --- a/packages/boot/hmr/package.json +++ b/packages/boot/hmr/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-hmr", "description": "Coordinated module and profile configuration hot reload", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/boot/hmr/src/index.ts b/packages/boot/hmr/src/index.ts index 8c5c97070a..112732ca77 100644 --- a/packages/boot/hmr/src/index.ts +++ b/packages/boot/hmr/src/index.ts @@ -971,7 +971,7 @@ class Hmr extends Service { return job !== undefined && namespaceOf(job) === undefined })) }, undefined) - const result = await recomposeProfile(this.ownerContext.root, patches, 'dsh', { requiredIds, running }) + const result = await recomposeProfile(this.ownerContext[Context.root], patches, 'dsh', { requiredIds, running }) const restartReason = compared === undefined || unavailable ? 'module-comparison' : result.restartReason return { warnings: result.warnings, pending, ...restartReason === undefined ? {} : { restartReason } } } finally { diff --git a/packages/boot/hmr/tests/package-reload.spec.ts b/packages/boot/hmr/tests/package-reload.spec.ts index f70e85e72c..cb084b3deb 100644 --- a/packages/boot/hmr/tests/package-reload.spec.ts +++ b/packages/boot/hmr/tests/package-reload.spec.ts @@ -348,7 +348,7 @@ it('reports a stopped entry that no recomposition started again by its fiber sta f.ctx.registry.delete(plugin) await Promise.all(fibers.map(fiber => fiber.await())) // Applying the same patches leaves the unchanged Include's rows alone. - const warnings = await f.ctx.hmr.runExclusive(() => reconcileProfilePatches(f.ctx.root, readProfilePatches('test', f.profile), 'test')) + const warnings = await f.ctx.hmr.runExclusive(() => reconcileProfilePatches(f.ctx[Context.root], readProfilePatches('test', f.profile), 'test')) expect(warnings).toEqual([expect.stringMatching(/^addon \(addon\): fiber state 4/u)]) }) diff --git a/packages/boot/plugin-manager/package.json b/packages/boot/plugin-manager/package.json index 5986709e13..f0b0a173da 100644 --- a/packages/boot/plugin-manager/package.json +++ b/packages/boot/plugin-manager/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-manager", "description": "Current-profile plugin and bundle management shared by dsh CLI, Web and agent tools", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/boot/plugin-market/package.json b/packages/boot/plugin-market/package.json index e02249a482..e380f61670 100644 --- a/packages/boot/plugin-market/package.json +++ b/packages/boot/plugin-market/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-market", "description": "Configured plugin market indexes for the Web Discover page and the plugin_market agent tool", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/browser-use/browser-use/package.json b/packages/browser-use/browser-use/package.json index 26c0428067..5bd0e3aac1 100644 --- a/packages/browser-use/browser-use/package.json +++ b/packages/browser-use/browser-use/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-browser-use", "description": "Exclusive named browser-use provider registration", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/acp-app/package.json b/packages/bundle/acp-app/package.json index 53c165c2d6..dc0d57971c 100644 --- a/packages/bundle/acp-app/package.json +++ b/packages/bundle/acp-app/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-acp-app", "description": "The dsh ACP profile bundle: automation-only JSON-RPC stdio and process lifecycle over dsh-base", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/acp-app/tests/acp-app.spec.ts b/packages/bundle/acp-app/tests/acp-app.spec.ts index 925c4e8044..2c176bd770 100644 --- a/packages/bundle/acp-app/tests/acp-app.spec.ts +++ b/packages/bundle/acp-app/tests/acp-app.spec.ts @@ -3,9 +3,8 @@ import { readFileSync } from 'node:fs' import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' -import * as yaml from 'js-yaml' import { describe, expect, it } from 'vitest' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' describe('dsh-acp-app bundle', () => { it('declares startup-gated ACP serving without overriding base HMR policy', () => { @@ -16,10 +15,7 @@ describe('dsh-acp-app bundle', () => { } expect(manifest.dsh?.bundle?.patch).toBe('./cordis.patch.yml') expect(manifest.dependencies).toHaveProperty('@deepseek-ai/dsh-acp') - const patches = yaml.load( - readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8'), - { schema: entryListSchema }, - ) as Array<{ + const patches = parseEntryYaml(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) as Array<{ id?: string disabled?: boolean insert?: Array<{ config?: { model?: string; provider?: string }; id?: string; inject?: string[]; name?: string }> diff --git a/packages/bundle/base/package.json b/packages/bundle/base/package.json index 538c61162c..044e4044a7 100644 --- a/packages/bundle/base/package.json +++ b/packages/bundle/base/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-base", "description": "The shared dsh core as a profile bundle: the first patch layer of base-backed profiles, inserting core rows over the empty profile root", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/base/tests/base.spec.ts b/packages/bundle/base/tests/base.spec.ts index 4a9d5b5c54..fdd22df18c 100644 --- a/packages/bundle/base/tests/base.spec.ts +++ b/packages/bundle/base/tests/base.spec.ts @@ -7,8 +7,7 @@ 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 { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { evaluate } from '@deepseek-ai/cordis-plugin-loader' describe('dsh-base bundle', () => { @@ -21,10 +20,7 @@ describe('dsh-base bundle', () => { 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 }, - ) + const parsed = parseEntryYaml(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) 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; disabled?: boolean }[] }[]).flatMap( @@ -57,10 +53,7 @@ describe('dsh-base bundle', () => { 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 }, - ) + const parsed = parseEntryYaml(readFileSync(resolve(root, 'cordis.patch.yml'), 'utf8')) if (!Array.isArray(parsed)) throw new TypeError('base patch must parse to a patch list') const rows = parsed.flatMap((patch): Record[] => typeof patch === 'object' && patch !== null diff --git a/packages/bundle/headless/package.json b/packages/bundle/headless/package.json index cf7db74b0a..83ee783a78 100644 --- a/packages/bundle/headless/package.json +++ b/packages/bundle/headless/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-headless", "description": "The dsh one-shot bundle: a direct core Agent/Session runner over dsh-base with no Host, HTTP, or browser layer", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/sdk-app/package.json b/packages/bundle/sdk-app/package.json index 100c596286..9a46020873 100644 --- a/packages/bundle/sdk-app/package.json +++ b/packages/bundle/sdk-app/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sdk-app", "description": "The dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-base", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/sdk-app/tests/sdk-app.spec.ts b/packages/bundle/sdk-app/tests/sdk-app.spec.ts index 6ab9bd10ff..286f6f0cbf 100644 --- a/packages/bundle/sdk-app/tests/sdk-app.spec.ts +++ b/packages/bundle/sdk-app/tests/sdk-app.spec.ts @@ -3,9 +3,8 @@ import { readFileSync } from 'node:fs' import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' -import * as yaml from 'js-yaml' import { describe, expect, it } from 'vitest' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' describe('dsh-sdk-app bundle', () => { it('enables plugin management while keeping JSON-RPC dependencies stable until restart', () => { @@ -16,10 +15,7 @@ describe('dsh-sdk-app bundle', () => { } expect(manifest.dsh?.bundle?.patch).toBe('./cordis.patch.yml') expect(manifest.dependencies).toHaveProperty('@deepseek-ai/dsh-sdk-jsonrpc-server') - const patches = yaml.load( - readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8'), - { schema: entryListSchema }, - ) as Array<{ id?: string; disabled?: boolean; insert?: Array<{ id?: string; inject?: string[]; name?: string }> }> + const patches = parseEntryYaml(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) as Array<{ id?: string; disabled?: boolean; insert?: Array<{ id?: string; inject?: string[]; name?: string }> }> expect(patches.find(patch => patch.id === 'hmr')).toMatchObject({ disabled: true }) expect(patches.find(patch => patch.id === 'tool-plugin-manager')).toMatchObject({ disabled: false }) expect(patches.find(patch => patch.id === 'session-title-llm')).toMatchObject({ disabled: true }) diff --git a/packages/bundle/sdk-minimal/package.json b/packages/bundle/sdk-minimal/package.json index 6d40c3ed62..cfbe112af6 100644 --- a/packages/bundle/sdk-minimal/package.json +++ b/packages/bundle/sdk-minimal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sdk-minimal", "description": "The standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessions", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/sdk-minimal/tests/sdk-minimal.spec.ts b/packages/bundle/sdk-minimal/tests/sdk-minimal.spec.ts index 2a96ffc076..3357798d2e 100644 --- a/packages/bundle/sdk-minimal/tests/sdk-minimal.spec.ts +++ b/packages/bundle/sdk-minimal/tests/sdk-minimal.spec.ts @@ -3,9 +3,8 @@ import { readFileSync } from 'node:fs' import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' -import * as yaml from 'js-yaml' import { describe, expect, it } from 'vitest' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' function packageName(specifier: string): string { return specifier.startsWith('@') ? specifier.split('/').slice(0, 2).join('/') : specifier.split('/')[0]! @@ -19,10 +18,7 @@ describe('dsh-sdk-minimal bundle', () => { dsh?: { bundle?: { patch?: string } } } expect(manifest.dsh?.bundle?.patch).toBe('./cordis.patch.yml') - const patches = yaml.load( - readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8'), - { schema: entryListSchema }, - ) as Array<{ insert?: Array<{ id?: string; inject?: string[]; name?: string; config?: Record; disabled?: unknown }> }> + const patches = parseEntryYaml(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) as Array<{ insert?: Array<{ id?: string; inject?: string[]; name?: string; config?: Record; disabled?: unknown }> }> expect(patches).toHaveLength(1) const rows = patches[0]?.insert ?? [] expect(rows.map(row => [row.id, row.name])).toEqual([ diff --git a/packages/bundle/web-app/package.json b/packages/bundle/web-app/package.json index 718332702c..30a41a9842 100644 --- a/packages/bundle/web-app/package.json +++ b/packages/bundle/web-app/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-web-app", "description": "The dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, bash runtime variables, URL line)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/bundle/web-app/src/index.ts b/packages/bundle/web-app/src/index.ts index beffa83b13..6b903d52d4 100644 --- a/packages/bundle/web-app/src/index.ts +++ b/packages/bundle/web-app/src/index.ts @@ -15,7 +15,7 @@ import { spawn, type ChildProcess } from 'node:child_process' import { createRequire } from 'node:module' import { dirname, join } from 'node:path' -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { auditStartupEntries } from '@deepseek-ai/dsh-app-boot' import type {} from '@deepseek-ai/dsh-client-connection' @@ -233,10 +233,10 @@ export function apply(ctx: Context, config: Config): void { await opening }, 'web-app: startup handoff') const announceReady = (): void => { - if (lifetime.signal.aborted || ctx.get('webServer') === undefined || ANNOUNCED_ROOTS.has(ctx.root)) return + if (lifetime.signal.aborted || ctx.get('webServer') === undefined || ANNOUNCED_ROOTS.has(ctx[Context.root])) return const entries: WebEntryUrl[] = [] ctx.emit(ctx.webServer, 'webserver/entry-url', appRootUrl(), entries) - ANNOUNCED_ROOTS.add(ctx.root) + ANNOUNCED_ROOTS.add(ctx[Context.root]) if (config.printUrl) { for (const entry of entries) console.log(`${entry.label}: ${entry.url}`) } @@ -255,7 +255,7 @@ export function apply(ctx: Context, config: Config): void { else { void settled.then(async () => { if (lifetime.signal.aborted) return - await auditStartupEntries(ctx.root, 'dsh web', () => {}) + await auditStartupEntries(ctx[Context.root], 'dsh web', () => {}) announceReady() }).catch(() => { // The Loader/startup audit owns failure diagnostics; failed startup remains unpublished. diff --git a/packages/bundle/web-app/tests/browser-open.host.spec.ts b/packages/bundle/web-app/tests/browser-open.host.spec.ts index 261c0d0da8..9abb879991 100644 --- a/packages/bundle/web-app/tests/browser-open.host.spec.ts +++ b/packages/bundle/web-app/tests/browser-open.host.spec.ts @@ -72,7 +72,7 @@ it('opens its tokenized URL only after the complete authenticated page is reacha }) await ctx.loader.create({ name: 'cordis:include', config: { path: pathToFileURL(config).href } }) await ctx.loader.await() - await auditStartupEntries(ctx.root, 'browser-open fixture', () => {}) + await auditStartupEntries(ctx[Context.root], 'browser-open fixture', () => {}) const entries: WebEntryUrl[] = [] ctx.emit(ctx.webServer, 'webserver/entry-url', ctx.webServer.getOrigin(), entries) expect(entries).toHaveLength(1) diff --git a/packages/client/connection/package.json b/packages/client/connection/package.json index 2e14b65a0f..e2ed451824 100644 --- a/packages/client/connection/package.json +++ b/packages/client/connection/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-connection", "description": "Authenticated RPC transport and generation lifecycle", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/connection/tests/node-half.host.spec.ts b/packages/client/connection/tests/node-half.host.spec.ts index c3a4a368af..7101523c97 100644 --- a/packages/client/connection/tests/node-half.host.spec.ts +++ b/packages/client/connection/tests/node-half.host.spec.ts @@ -160,7 +160,7 @@ async function mounted( /** Read the test root's token implementation without a production URL service. */ async function loginUrl(ctx: Context, base: string): Promise { - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) return new URL(auth.authenticatedUrl(base)) } @@ -287,7 +287,7 @@ describe('connection node half', () => { try { await fiber.await() const connection = ctx.get('connection') as HostConnectionHandle - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) const exchange = fakeResponse() auth.authorizeIndex(fakeRequest({ host: 'localhost' }, auth.authenticatedUrl('http://localhost/')), exchange.response) const cookie = exchange.state.headers?.['set-cookie']?.split(';', 1)[0] diff --git a/packages/client/file-upload/package.json b/packages/client/file-upload/package.json index 9a5a3d4705..334699b005 100644 --- a/packages/client/file-upload/package.json +++ b/packages/client/file-upload/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-file-upload", "description": "Agent-scoped browser file upload, streaming intake, and staged receipt service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/hmr/package.json b/packages/client/hmr/package.json index c98f742a6f..47a546bdc8 100644 --- a/packages/client/hmr/package.json +++ b/packages/client/hmr/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-hmr", "description": "Web client graph synchronization and rebuilt-bundle reload transport", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/locale/package.json b/packages/client/locale/package.json index a23c2cb4b7..0ad2c188b6 100644 --- a/packages/client/locale/package.json +++ b/packages/client/locale/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-locale", "description": "Locale plugin: Host-backed preference, extensible language catalog, browser fallback, and typed built-in dictionaries", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/modules/package.json b/packages/client/modules/package.json index 3fffefd17f..218305021b 100644 --- a/packages/client/modules/package.json +++ b/packages/client/modules/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-modules", "description": "Client module system, dual-face: node half composes the __DSH_BOOT__ entry graph (incremental dsh.client scan, bundle route, index tap, webPlugins service); browser half is the lazy-CJS module table the vendored cordis Loader consumes as its internal seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/product-analytics/package.json b/packages/client/product-analytics/package.json index 5812390c64..58a5603022 100644 --- a/packages/client/product-analytics/package.json +++ b/packages/client/product-analytics/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-product-analytics", "description": "Desktop product event collection and authenticated Host reporting", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/resources/package.json b/packages/client/resources/package.json index 612bbc8e27..b3d5e9e5a4 100644 --- a/packages/client/resources/package.json +++ b/packages/client/resources/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-resources", "description": "Unified client resource model: protocol-registered providers turn URL addresses into live values, consumed through the useResource global standard hook", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/script-realm-iframe/package.json b/packages/client/script-realm-iframe/package.json index cb155a28ae..8bfec83f43 100644 --- a/packages/client/script-realm-iframe/package.json +++ b/packages/client/script-realm-iframe/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-script-realm-iframe", "description": "Optional iframe ScriptRealm provider", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/script-realm/package.json b/packages/client/script-realm/package.json index 9a57f9bcce..561093cc04 100644 --- a/packages/client/script-realm/package.json +++ b/packages/client/script-realm/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-script-realm", "description": "Direct-reference script environments and Cordis-owned provider registration", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/shortcuts/package.json b/packages/client/shortcuts/package.json index a4a00cb906..199a5cf8e3 100644 --- a/packages/client/shortcuts/package.json +++ b/packages/client/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-shortcuts", "description": "Application keyboard command registry and physical-key routing", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/store/package.json b/packages/client/store/package.json index 70f0e515ee..e9a1629bb5 100644 --- a/packages/client/store/package.json +++ b/packages/client/store/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-store", "description": "React-free observable and snapshot-store contracts with the shared Zustand/Immer engine", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-account-notifications/package.json b/packages/client/ui-account-notifications/package.json index b505223976..7c939258bb 100644 --- a/packages/client/ui-account-notifications/package.json +++ b/packages/client/ui-account-notifications/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-account-notifications", "description": "Display account notifications and refresh localized content", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-agent-preset/package.json b/packages/client/ui-agent-preset/package.json index a96df9a698..5b7bda05d5 100644 --- a/packages/client/ui-agent-preset/package.json +++ b/packages/client/ui-agent-preset/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-agent-preset", "description": "Agent-preset surfaces: the default for later sessions, this session's seat, and the composition editor", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-agent-team/package.json b/packages/client/ui-agent-team/package.json index a6dec0971b..b85d87be28 100644 --- a/packages/client/ui-agent-team/package.json +++ b/packages/client/ui-agent-team/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-agent-team", "description": "Web shared task board for a subagent tree", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-approval/package.json b/packages/client/ui-approval/package.json index 364ec07e77..dcdce855e6 100644 --- a/packages/client/ui-approval/package.json +++ b/packages/client/ui-approval/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-approval", "description": "Approval composer takeover over the scoped Remote Event waterfall", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-attachment/package.json b/packages/client/ui-attachment/package.json index 8169eb1f26..8472f30067 100644 --- a/packages/client/ui-attachment/package.json +++ b/packages/client/ui-attachment/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-attachment", "description": "Dynamic attachment presentation plugin for conversation input, message-image, and trajectory image slots", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-brand-official/package.json b/packages/client/ui-brand-official/package.json index 2ec4de313f..78d687b0f4 100644 --- a/packages/client/ui-brand-official/package.json +++ b/packages/client/ui-brand-official/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-brand-official", "description": "Official DeepSeek Harness brand artwork and click-triggered home background", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-chat/README.i18n.yaml b/packages/client/ui-chat/README.i18n.yaml index 28af833f22..a986f761c4 100644 --- a/packages/client/ui-chat/README.i18n.yaml +++ b/packages/client/ui-chat/README.i18n.yaml @@ -24,8 +24,8 @@ en: 30878be703edac57 zh: 16b84188c8660850 /deepseek-ai-dsh-client-ui-chat/inherited-history-divider: - en: b8b735733697ffdf - zh: 9c735d3798b89d4d + en: a191f90e9a64f6fe + zh: 8e91b8660f9baa18 /deepseek-ai-dsh-client-ui-chat/turn-token-usage: en: d363057b5c0b2571 zh: 0f6fe864d9673576 diff --git a/packages/client/ui-chat/README.md b/packages/client/ui-chat/README.md index 8d6a921724..70921859ae 100644 --- a/packages/client/ui-chat/README.md +++ b/packages/client/ui-chat/README.md @@ -79,7 +79,7 @@ Chat adapts Markdown targets at `MarkdownDelegateProvider.getTriggerProps`. The ## Inherited history divider -A forked Session, such as a fork subagent or a branched conversation, shows a divider labelled “Inherited history above” at its latest inherited `session/end-seed` marker, between the copied history and the Session's own messages. A cut inside a Turn keeps the divider outside that Turn's process folding. The divider appears once the history page that holds the marker is loaded, so a long inherited history may show it only after scrolling up. Sessions without inherited history show no divider. +A forked Session, such as a fork subagent or a branched conversation, shows a divider labelled “Inherited history above” at its latest inherited `session/end-seed` marker, between the copied history and the Session's own messages. The caption starts with the branch glyph that the branch action uses. A cut inside a Turn keeps the divider outside that Turn's process folding. The divider appears once the history page that holds the marker is loaded, so a long inherited history may show it only after scrolling up. Sessions without inherited history show no divider. ----- diff --git a/packages/client/ui-chat/README.zh.md b/packages/client/ui-chat/README.zh.md index bd57e895a5..d50ba90f91 100644 --- a/packages/client/ui-chat/README.zh.md +++ b/packages/client/ui-chat/README.zh.md @@ -79,7 +79,7 @@ Chat 在 `MarkdownDelegateProvider.getTriggerProps` 接入处适配 Markdown 目 ## 继承历史分隔线 -分叉产生的会话(例如 fork 子智能体或分支出的对话)在最后一个继承的 `session/end-seed` 标记处显示一条标注“以上为继承的历史消息”的分隔线,把复制来的历史与该会话自己的消息分开。切点位于某个 Turn 内部时,分隔线留在该 Turn 的过程折叠之外。分隔线在包含标记的历史页加载后才出现,因此继承历史较长时,可能要向上滚动才能看到。没有继承历史的会话不显示分隔线。 +分叉产生的会话(例如 fork 子智能体或分支出的对话)在最后一个继承的 `session/end-seed` 标记处显示一条标注“以上为继承的历史消息”的分隔线,把复制来的历史与该会话自己的消息分开。标注以“在新对话中分支”操作所用的分支图标开头。切点位于某个 Turn 内部时,分隔线留在该 Turn 的过程折叠之外。分隔线在包含标记的历史页加载后才出现,因此继承历史较长时,可能要向上滚动才能看到。没有继承历史的会话不显示分隔线。 ----- diff --git a/packages/client/ui-chat/package.json b/packages/client/ui-chat/package.json index 99b09c1836..709a5a28f8 100644 --- a/packages/client/ui-chat/package.json +++ b/packages/client/ui-chat/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-chat", "description": "Chat Conversation target, node definitions, renderers, and details surface", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-chat/src/client/chat/MessageItem.module.css b/packages/client/ui-chat/src/client/chat/MessageItem.module.css index 7bb1349e59..02a83126a7 100644 --- a/packages/client/ui-chat/src/client/chat/MessageItem.module.css +++ b/packages/client/ui-chat/src/client/chat/MessageItem.module.css @@ -44,11 +44,31 @@ border-top: 0.5px solid var(--dsw-alias-border-l2); } +/* Glyph and label share one caption and its tertiary ink. The 6px gap matches + a flow row's glyph-to-label gap; without the flow row's 16px leading box the + label starts 20px in rather than 22px. */ +.inheritedHistoryCaption { + flex: 0 1 auto; + display: flex; + align-items: center; + gap: 6px; + min-width: 0; + color: var(--dsw-alias-label-tertiary); +} + +/* The 14px flow-row glyph edge shared with DisclosureRow's leading icon: the + CSS edge overrides the svg's own width/height so the glyph follows the font + delta. */ +.inheritedHistoryIcon { + flex: none; + width: calc(14px + var(--dsh-content-font-delta, 0px)); + height: calc(14px + var(--dsh-content-font-delta, 0px)); +} + .inheritedHistoryLabel { flex: 0 1 auto; min-width: 0; overflow: hidden; - color: var(--dsw-alias-label-tertiary); font-size: var(--dsh-content-font-size-secondary, 13px); line-height: calc(24px + var(--dsh-content-font-delta, 0px)); text-overflow: ellipsis; diff --git a/packages/client/ui-chat/src/client/chat/MessageItem.tsx b/packages/client/ui-chat/src/client/chat/MessageItem.tsx index 8c637e6e6c..d946cc620b 100644 --- a/packages/client/ui-chat/src/client/chat/MessageItem.tsx +++ b/packages/client/ui-chat/src/client/chat/MessageItem.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react' import type { PendingSubmission } from '@deepseek-ai/dsh-api-session-controller/client' import type { PropsRenderFactories, PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots' import type { UserTextFacts } from '@deepseek-ai/dsh-client-ui-conversation/client' -import { JsonBlock, StateDot, TextShimmer } from '@deepseek-ai/dsh-client-ui-primitives' +import { IconBranchOutlineRegular, JsonBlock, StateDot, TextShimmer } from '@deepseek-ai/dsh-client-ui-primitives' import type { ChatNodeOwnerProps, ChatNodeViewProps, ChatViewSlotProps, UserContentAttachment, UserContentData, UserContentInput, } from '../contract/slots.ts' @@ -384,7 +384,10 @@ export const InheritedHistoryNodeView = memo(function InheritedHistoryNodeView({ return (
- {t('message.inheritedHistory')} + + + {t('message.inheritedHistory')} +
) diff --git a/packages/client/ui-chat/tests/chat-font-axis-styles.client.spec.ts b/packages/client/ui-chat/tests/chat-font-axis-styles.client.spec.ts index aeba01b380..b2cb704e53 100644 --- a/packages/client/ui-chat/tests/chat-font-axis-styles.client.spec.ts +++ b/packages/client/ui-chat/tests/chat-font-axis-styles.client.spec.ts @@ -76,6 +76,13 @@ describe('chat flow font-size axis', () => { ])) }) + it('the inherited-history caption glyph scales with its label', () => { + expect(declarationsFrom(read('MessageItem.module.css'), '.inheritedHistoryIcon')).toEqual(expect.arrayContaining([ + 'width: calc(14px + var(--dsh-content-font-delta, 0px))', + 'height: calc(14px + var(--dsh-content-font-delta, 0px))', + ])) + }) + it('expanded bodies indent by 22px + delta so content stays under the shifted title start', () => { // The DisclosureRow title starts at leading (16 + delta) + gap 6; a fixed // 22px indent would misalign at every non-default size. diff --git a/packages/client/ui-chat/tests/chat-view.client.spec.tsx b/packages/client/ui-chat/tests/chat-view.client.spec.tsx index c7cee3bded..311679176c 100644 --- a/packages/client/ui-chat/tests/chat-view.client.spec.tsx +++ b/packages/client/ui-chat/tests/chat-view.client.spec.tsx @@ -3723,6 +3723,7 @@ describe('ChatView', () => { const own = view.getByText('own question') expect(inherited.compareDocumentPosition(separator) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() expect(separator.compareDocumentPosition(own) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy() + expect(separator.querySelector('[data-icon="dsw-icon-branch-outline-regular"]')).not.toBeNull() }) it('disables fork when the indexed Turn has a later steering Node', () => { diff --git a/packages/client/ui-commands/package.json b/packages/client/ui-commands/package.json index 43c65f0f1c..c6a7f5fbab 100644 --- a/packages/client/ui-commands/package.json +++ b/packages/client/ui-commands/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-commands", "description": "Client command surface: global directory cache, '/' source, three command UI kinds, popupSelect registry", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-context-menu/package.json b/packages/client/ui-context-menu/package.json index c839e300f8..e9c383ed59 100644 --- a/packages/client/ui-context-menu/package.json +++ b/packages/client/ui-context-menu/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-context-menu", "description": "Typed, plugin-extensible context menus with captured targets and shared Web presentation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-conversation/package.json b/packages/client/ui-conversation/package.json index 3b9b445457..abfcd2fdab 100644 --- a/packages/client/ui-conversation/package.json +++ b/packages/client/ui-conversation/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-conversation", "description": "Target-neutral Conversation assembly, shell, composer, queue, and view navigation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-deliverables/package.json b/packages/client/ui-deliverables/package.json index b0c436ab89..920370bfd9 100644 --- a/packages/client/ui-deliverables/package.json +++ b/packages/client/ui-deliverables/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-deliverables", "description": "Changed-files card with per-file comparison tabs, delivery cards, and clickable final-response file references for Web", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-directory-picker-browse/package.json b/packages/client/ui-directory-picker-browse/package.json index 4fe0384054..6f96eb509a 100644 --- a/packages/client/ui-directory-picker-browse/package.json +++ b/packages/client/ui-directory-picker-browse/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-directory-picker-browse", "description": "In-app directory browsing surface: the workspace directory-flow owner rendering the host's listing and creation primitives", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-directory-picker-native/package.json b/packages/client/ui-directory-picker-native/package.json index 4ad554e0b3..f6f9f38155 100644 --- a/packages/client/ui-directory-picker-native/package.json +++ b/packages/client/ui-directory-picker-native/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-directory-picker-native", "description": "Native directory-picker surface: the renderless workspace directory-flow occupant driving the local Desktop or Host OS chooser", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-dockkit/package.json b/packages/client/ui-dockkit/package.json index c96df661ab..e10328ea59 100644 --- a/packages/client/ui-dockkit/package.json +++ b/packages/client/ui-dockkit/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-dockkit", "description": "Docking layout kit: split-tree engine with invertible operations, and the React components that render and drive it (zero cordis)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-entry-customization/package.json b/packages/client/ui-entry-customization/package.json index 0ad5b24943..6c45065d94 100644 --- a/packages/client/ui-entry-customization/package.json +++ b/packages/client/ui-entry-customization/package.json @@ -1,6 +1,6 @@ { "name": "@deepseek-ai/dsh-client-ui-entry-customization", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "description": "Customize plugin entries in the left sidebar, conversation views, and right sidebar, and quickly create new plugins.", "publishConfig": { "access": "public" }, "repository": { diff --git a/packages/client/ui-file-actions/package.json b/packages/client/ui-file-actions/package.json index 8a3ebaa169..782be3b360 100644 --- a/packages/client/ui-file-actions/package.json +++ b/packages/client/ui-file-actions/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-file-actions", "description": "Original-file saving and image clipboard actions for Web and Desktop", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-file-drag/package.json b/packages/client/ui-file-drag/package.json index 9002817731..dd40cd514c 100644 --- a/packages/client/ui-file-drag/package.json +++ b/packages/client/ui-file-drag/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-file-drag", "description": "Application-owned file drag transfers and localized failure feedback", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-goal/package.json b/packages/client/ui-goal/package.json index b885b3d35b..5ba99c090a 100644 --- a/packages/client/ui-goal/package.json +++ b/packages/client/ui-goal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-goal", "description": "Session goal surface: GoalBar docked above the composer, read from the goal session projection", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-input-trigger/package.json b/packages/client/ui-input-trigger/package.json index 0a1bd70788..2d3be558da 100644 --- a/packages/client/ui-input-trigger/package.json +++ b/packages/client/ui-input-trigger/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-input-trigger", "description": "Input trigger pipeline: '/' and '@' detection, candidate menu, pick routing to registered sources", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-jobs/package.json b/packages/client/ui-jobs/package.json index ea2e14706b..299c2c4765 100644 --- a/packages/client/ui-jobs/package.json +++ b/packages/client/ui-jobs/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-jobs", "description": "Session-header background-job list with on-demand streaming record panels", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "type": "module", "main": "lib/index.js", "types": "lib/types/index.d.ts", diff --git a/packages/client/ui-layout/package.json b/packages/client/ui-layout/package.json index d00ca63a52..f8b6b164d1 100644 --- a/packages/client/ui-layout/package.json +++ b/packages/client/ui-layout/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-layout", "description": "Shell plugin: three-column AppFrame with drag handles, ctx.layout viewing-state service (navigation + panels)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-message-feedback/package.json b/packages/client/ui-message-feedback/package.json index 9963c064fa..ff314be7e8 100644 --- a/packages/client/ui-message-feedback/package.json +++ b/packages/client/ui-message-feedback/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-message-feedback", "description": "The Web feedback surface: per-message Like/Dislike in the assistant-message action strip and the feedback dialog behind both ratings and /feedback, backed by the messageFeedback and sessionFeedback Host Remotes", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-model-selection/package.json b/packages/client/ui-model-selection/package.json index 861f360564..c594db3c56 100644 --- a/packages/client/ui-model-selection/package.json +++ b/packages/client/ui-model-selection/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-model-selection", "description": "Model selection over the shared model catalog, Session projection, and session.selectModel", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-open-in-app/package.json b/packages/client/ui-open-in-app/package.json index 40974b3f24..fdba0c3dc6 100644 --- a/packages/client/ui-open-in-app/package.json +++ b/packages/client/ui-open-in-app/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-open-in-app", "description": "Session application submenus and native opening controls for directories and previewed files", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-permission-presets/package.json b/packages/client/ui-permission-presets/package.json index 7a0cc0b15a..c5ccedd9fa 100644 --- a/packages/client/ui-permission-presets/package.json +++ b/packages/client/ui-permission-presets/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-permission-presets", "description": "Permission surfaces: a new-session default in General settings and a current-session /permission popup over the permissions projection", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-plan/package.json b/packages/client/ui-plan/package.json index 0c94f46c61..01b3d34b07 100644 --- a/packages/client/ui-plan/package.json +++ b/packages/client/ui-plan/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-plan", "description": "Plan mode controls, persistent transcript plan cards, and sidebar Markdown previews", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-plugin-manager/package.json b/packages/client/ui-plugin-manager/package.json index f0c4414dba..35bd4f6de4 100644 --- a/packages/client/ui-plugin-manager/package.json +++ b/packages/client/ui-plugin-manager/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-plugin-manager", "description": "Plugin management for the dsh web client: the sidebar Plugins panel installs, enables, disables, retries, and composes installed plugin packages", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-plugin-market/package.json b/packages/client/ui-plugin-market/package.json index 14c8e68dc4..71955e765e 100644 --- a/packages/client/ui-plugin-market/package.json +++ b/packages/client/ui-plugin-market/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-plugin-market", "description": "Discover tab of the dsh web Plugins page: browse configured plugin market indexes and install their bundles", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-primitives/package.json b/packages/client/ui-primitives/package.json index 8135385a77..6702ddf30d 100644 --- a/packages/client/ui-primitives/package.json +++ b/packages/client/ui-primitives/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-primitives", "description": "Pure React atoms for the dsh web UI: controls, icons, markdown, and JSON inspectors (zero cordis)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-reference/package.json b/packages/client/ui-reference/package.json index 57ba4eba16..021ad6a6b1 100644 --- a/packages/client/ui-reference/package.json +++ b/packages/client/ui-reference/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-reference", "description": "Unified Web @file and @session reference source", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-renderer/package.json b/packages/client/ui-renderer/package.json index e386a6d22b..5a8141a20c 100644 --- a/packages/client/ui-renderer/package.json +++ b/packages/client/ui-renderer/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-renderer", "description": "Browser UI renderer: React slot bindings, ctx.uiRenderer, and the assembled application root", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-schedule/package.json b/packages/client/ui-schedule/package.json index 24fd4062d7..b19e22e9b1 100644 --- a/packages/client/ui-schedule/package.json +++ b/packages/client/ui-schedule/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-schedule", "description": "Host task management page and Session reminder catalog", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "type": "module", "main": "lib/index.js", "types": "lib/types/index.d.ts", diff --git a/packages/client/ui-secret-mask/package.json b/packages/client/ui-secret-mask/package.json index e58278b6a8..606be83257 100644 --- a/packages/client/ui-secret-mask/package.json +++ b/packages/client/ui-secret-mask/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-secret-mask", "description": "Web display masking for recognized credentials in sent user text", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-session-status/package.json b/packages/client/ui-session-status/package.json index f6856b6ebc..b4129e6cc6 100644 --- a/packages/client/ui-session-status/package.json +++ b/packages/client/ui-session-status/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-session-status", "description": "Client Session status table over Host reading records: running state, the effective pending interaction, and read or unread reminders shared by clients of one Host", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-session/package.json b/packages/client/ui-session/package.json index 8aa051aca0..f46ab40d1a 100644 --- a/packages/client/ui-session/package.json +++ b/packages/client/ui-session/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-session", "description": "Session Controller adapter for React and session-scoped slots", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-account/package.json b/packages/client/ui-settings-account/package.json index 16bdf0111f..8d291514cf 100644 --- a/packages/client/ui-settings-account/package.json +++ b/packages/client/ui-settings-account/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-account", "description": "Manage DeepSeek login and open Platform billing pages", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-agent-loop/package.json b/packages/client/ui-settings-agent-loop/package.json index bf9b907b2d..54bc09612b 100644 --- a/packages/client/ui-settings-agent-loop/package.json +++ b/packages/client/ui-settings-agent-loop/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-agent-loop", "description": "Settings page of the agent loop on the dsh web client's Plugins page: the parallel tool-call cap of the agent-loop namespace", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-general/package.json b/packages/client/ui-settings-general/package.json index 0a7750b051..4de7e1fe21 100644 --- a/packages/client/ui-settings-general/package.json +++ b/packages/client/ui-settings-general/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-general", "description": "Settings ownerless-copy and product onboarding plugin: the General section, shell trigger/header chrome content, settings dictionaries, and the versioned welcome notice", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-models/package.json b/packages/client/ui-settings-models/package.json index 1ad5c125e0..854dc5b9dd 100644 --- a/packages/client/ui-settings-models/package.json +++ b/packages/client/ui-settings-models/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-models", "description": "Models settings and shared product-onboarding dialogs over existing settings and credential joins", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-plugin-inventory/package.json b/packages/client/ui-settings-plugin-inventory/package.json index 49d237bf9e..6b412c7b7d 100644 --- a/packages/client/ui-settings-plugin-inventory/package.json +++ b/packages/client/ui-settings-plugin-inventory/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-plugin-inventory", "description": "Read-only Cordis Loader inventory tab in Web Plugins settings", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-plugins/package.json b/packages/client/ui-settings-plugins/package.json index 6e646fc07f..f7835e7130 100644 --- a/packages/client/ui-settings-plugins/package.json +++ b/packages/client/ui-settings-plugins/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-plugins", "description": "Built-in plugins settings section for the dsh web client: the Settings navigation entry and the tab chrome feature-owned tabs register into", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-session-log/package.json b/packages/client/ui-settings-session-log/package.json index 3ffdcf5953..78417f8302 100644 --- a/packages/client/ui-settings-session-log/package.json +++ b/packages/client/ui-settings-session-log/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-session-log", "description": "General settings control for Session-log upload with DeepSeek API requests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-shell/package.json b/packages/client/ui-settings-shell/package.json index 5aea5a0ad6..46b445f25d 100644 --- a/packages/client/ui-settings-shell/package.json +++ b/packages/client/ui-settings-shell/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-shell", "description": "Settings page of the shell executor on the dsh web client's Plugins page: the command timeout and the per-stream output cap of the shell namespace", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-subagent/package.json b/packages/client/ui-settings-subagent/package.json index 8bc89487d0..9301a8d78d 100644 --- a/packages/client/ui-settings-subagent/package.json +++ b/packages/client/ui-settings-subagent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-subagent", "description": "Settings page of Subagent delegation on the dsh web client's Plugins page: recursion depth, parallel capacity, and the models agents may choose for subagents", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings-web-search/package.json b/packages/client/ui-settings-web-search/package.json index 5371a10782..ba071d8e74 100644 --- a/packages/client/ui-settings-web-search/package.json +++ b/packages/client/ui-settings-web-search/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings-web-search", "description": "Settings page for web search and fetch on the dsh web client's Plugins page: the Search and Fetch provider menus, the DeepSeek Search API result count, DeepSeek Search and Fetch API billing, and legacy Messages search settings", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-settings/package.json b/packages/client/ui-settings/package.json index 06ba6ab951..5d1fedef28 100644 --- a/packages/client/ui-settings/package.json +++ b/packages/client/ui-settings/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-settings", "description": "Settings domain base plugin: shared configuration forms and the canonical settings slot-type contract", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-shortcuts/package.json b/packages/client/ui-shortcuts/package.json index 39bbe94ce4..df64c2572c 100644 --- a/packages/client/ui-shortcuts/package.json +++ b/packages/client/ui-shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-shortcuts", "description": "Keyboard shortcut reference, recording, and local preference editing", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-sidebar-browser/package.json b/packages/client/ui-sidebar-browser/package.json index 1f006bfda3..1f979114e7 100644 --- a/packages/client/ui-sidebar-browser/package.json +++ b/packages/client/ui-sidebar-browser/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-sidebar-browser", "description": "Sandboxed Web browser tabs for the right Sidebar", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-sidebar-documentpreview/package.json b/packages/client/ui-sidebar-documentpreview/package.json index 030414f29a..55595b694e 100644 --- a/packages/client/ui-sidebar-documentpreview/package.json +++ b/packages/client/ui-sidebar-documentpreview/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-sidebar-documentpreview", "description": "Extensible Sidebar previews for Office documents, spreadsheets, Markdown, code, images, PDF, HTML, and plain text", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-sidebar-files/package.json b/packages/client/ui-sidebar-files/package.json index 28a0d8fe27..a7f47451b2 100644 --- a/packages/client/ui-sidebar-files/package.json +++ b/packages/client/ui-sidebar-files/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-sidebar-files", "description": "The workspace files page and one workspace directory tree per pane beside docked and floating file previews, listed lazily over the workspaceFiles Remote namespace", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-sidebar-right/package.json b/packages/client/ui-sidebar-right/package.json index 0de2aa4a47..ca043901ea 100644 --- a/packages/client/ui-sidebar-right/package.json +++ b/packages/client/ui-sidebar-right/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-sidebar-right", "description": "Right Sidebar: the docking surface's session-bound state, its panel and header expand control, and the navigation service over it", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-sidebar-terminal/package.json b/packages/client/ui-sidebar-terminal/package.json index 8fbb67c504..6eb85efb7b 100644 --- a/packages/client/ui-sidebar-terminal/package.json +++ b/packages/client/ui-sidebar-terminal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-sidebar-terminal", "description": "Interactive shell tabs for the right Sidebar", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-sidebar/package.json b/packages/client/ui-sidebar/package.json index 536d17c8e6..6b213729d3 100644 --- a/packages/client/ui-sidebar/package.json +++ b/packages/client/ui-sidebar/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-sidebar", "description": "Sidebar plugin: session multi-level tree, search, grouping, state dots", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-skill/package.json b/packages/client/ui-skill/package.json index 1e5de0a3fe..02b0f178c3 100644 --- a/packages/client/ui-skill/package.json +++ b/packages/client/ui-skill/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-skill", "description": "Web skill references and the dedicated skill tool row", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-slots/package.json b/packages/client/ui-slots/package.json index 5a88f2967b..dfa9ccaac6 100644 --- a/packages/client/ui-slots/package.json +++ b/packages/client/ui-slots/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-slots", "description": "Slot registry pure core: typed ordinary Slots and reusable Component Factories, derived props, Store seats, and renderer installation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-subagent/package.json b/packages/client/ui-subagent/package.json index 8f17675697..f6b08201bc 100644 --- a/packages/client/ui-subagent/package.json +++ b/packages/client/ui-subagent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-subagent", "description": "Subagent conversation catalog, continuation routing UI, and '@' reference source", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-theme/package.json b/packages/client/ui-theme/package.json index 3124ac013b..399f4cb444 100644 --- a/packages/client/ui-theme/package.json +++ b/packages/client/ui-theme/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-theme", "description": "Theme plugin: Host bootstrap for the pre-plugin palette; ThemeRuntime for light/dark/system state and icon replacements; --dsw-* token styles and Appearance settings row", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-tool/package.json b/packages/client/ui-tool/package.json index d7562ce805..0628fb3e47 100644 --- a/packages/client/ui-tool/package.json +++ b/packages/client/ui-tool/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-tool", "description": "Client Tool call-tree renderer and keyed per-tool presentation slot", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css b/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css index 6f521dc8b3..38da2a3869 100644 --- a/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css +++ b/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css @@ -125,10 +125,11 @@ /* Same glyph-scaling rule as DisclosureRow's leading: the CSS edge overrides the svg attributes so the 14px business glyph follows the font-size delta. - TODO: this bash header duplicates the DisclosureRow structure (and this is - the fourth copy of the glyph rule, with DisclosureRow, MessageItem - .compactionLeading, and MessageIconActions); migrating the bash row onto - the shared DisclosureRow would collapse them to one. */ + TODO: this bash header duplicates the DisclosureRow structure, and the glyph + rule is also copied in DisclosureRow, MessageItem .compactionLeading and + .inheritedHistoryIcon, ChatGroupSeat, SkillRow, and MessageIconActions (at + 15px); migrating the bash row onto the shared DisclosureRow removes this + copy. */ .leading svg:not([data-state]) { width: calc(14px + var(--dsh-content-font-delta, 0px)); height: calc(14px + var(--dsh-content-font-delta, 0px)); diff --git a/packages/client/ui-trajectory/package.json b/packages/client/ui-trajectory/package.json index 5f9aa40796..27deabafc0 100644 --- a/packages/client/ui-trajectory/package.json +++ b/packages/client/ui-trajectory/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-trajectory", "description": "Trajectory event ledger and timing overview with live tool-result inspection", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-user-questions/package.json b/packages/client/ui-user-questions/package.json index a0d3b61aa0..bb1b5755a2 100644 --- a/packages/client/ui-user-questions/package.json +++ b/packages/client/ui-user-questions/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-user-questions", "description": "Web ask_user_question composer takeover and plan-review presentation UI", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-workflow-run/package.json b/packages/client/ui-workflow-run/package.json index 3ed8a3bfbd..1a04151138 100644 --- a/packages/client/ui-workflow-run/package.json +++ b/packages/client/ui-workflow-run/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-workflow-run", "description": "Durable workflow-run Conversation Node and nested member disclosure for dsh web", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/ui-workspace/package.json b/packages/client/ui-workspace/package.json index a44bbf3985..a2d05e27b6 100644 --- a/packages/client/ui-workspace/package.json +++ b/packages/client/ui-workspace/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-workspace", "description": "Workspace picker plugin: one WorkspacePicker registered into the sidebar and empty-state workspace slots", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/client/web/package.json b/packages/client/web/package.json index 2c8cd50469..317d39d597 100644 --- a/packages/client/web/package.json +++ b/packages/client/web/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-web", "description": "Web boot kernel: static module table, Cordis loader, framework-free boot page, and UI-renderer handoff", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/compaction/command-compact/package.json b/packages/compaction/command-compact/package.json index cf84c4dbf9..345bb5b041 100644 --- a/packages/compaction/command-compact/package.json +++ b/packages/compaction/command-compact/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-command-compact", "description": "Human-facing slash command for explicit session compaction", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/compaction/compaction-basic/package.json b/packages/compaction/compaction-basic/package.json index 9aec2bef16..e4487674b9 100644 --- a/packages/compaction/compaction-basic/package.json +++ b/packages/compaction/compaction-basic/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-compaction-basic", "description": "Token-meter-driven compaction policy and LLM summarization backend for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/compaction/compaction-image-offload/package.json b/packages/compaction/compaction-image-offload/package.json index 001e799c73..dd9efa8340 100644 --- a/packages/compaction/compaction-image-offload/package.json +++ b/packages/compaction/compaction-image-offload/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-compaction-image-offload", "description": "Durable image offload for image-capable routes: replace over-budget request images with placeholders and retry", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/compaction/compaction-tool-result-pruner/package.json b/packages/compaction/compaction-tool-result-pruner/package.json index bdddb9f7be..1d1857aa79 100644 --- a/packages/compaction/compaction-tool-result-pruner/package.json +++ b/packages/compaction/compaction-tool-result-pruner/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-compaction-tool-result-pruner", "description": "Replay-safe model-free head/middle/tail pruning for tool-result surface nodes", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/compaction/compaction/package.json b/packages/compaction/compaction/package.json index ce5b3dbf1d..52437fbb5f 100644 --- a/packages/compaction/compaction/package.json +++ b/packages/compaction/compaction/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-compaction", "description": "Abstract compaction service seam (ctx.compaction) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/computer-use/computer-use/package.json b/packages/computer-use/computer-use/package.json index 000923c7b1..58d85e428b 100644 --- a/packages/computer-use/computer-use/package.json +++ b/packages/computer-use/computer-use/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-computer-use", "description": "Exclusive named computer-use provider registration", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/agent-instructions/package.json b/packages/context/agent-instructions/package.json index 19b2ea451e..3716038104 100644 --- a/packages/context/agent-instructions/package.json +++ b/packages/context/agent-instructions/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-instructions", "description": "Workspace context loader for AGENTS.md/CLAUDE.md instruction files", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/file-reference-local/package.json b/packages/context/file-reference-local/package.json index 96c326d58b..4fd080e5f4 100644 --- a/packages/context/file-reference-local/package.json +++ b/packages/context/file-reference-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-file-reference-local", "description": "Local-filesystem ctx.fileReferences provider with bounded fuzzy indexes", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/file-reference/package.json b/packages/context/file-reference/package.json index bb6feaf609..229ce4d973 100644 --- a/packages/context/file-reference/package.json +++ b/packages/context/file-reference/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-file-reference", "description": "File-reference discovery contract and shared @file grammar", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/harness-dev-context/package.json b/packages/context/harness-dev-context/package.json index 7a39cd3f83..58f99b5368 100644 --- a/packages/context/harness-dev-context/package.json +++ b/packages/context/harness-dev-context/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-harness-dev-context", "description": "Model context naming the DeepSeek Harness checkout and Web GUI URL without letting either change the system prompt", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/session-reference/package.json b/packages/context/session-reference/package.json index 4439ad0257..1a50da4496 100644 --- a/packages/context/session-reference/package.json +++ b/packages/context/session-reference/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-reference", "description": "Cross-session snapshot references and durable untrusted model context (ctx.sessionReferenceResolver)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/time-context/package.json b/packages/context/time-context/package.json index bbf1026aaa..fa293f7daf 100644 --- a/packages/context/time-context/package.json +++ b/packages/context/time-context/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-time-context", "description": "Durable per-step context with the current time and elapsed time", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/context/tmux-context/package.json b/packages/context/tmux-context/package.json index e8907af314..5cfa133d0c 100644 --- a/packages/context/tmux-context/package.json +++ b/packages/context/tmux-context/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tmux-context", "description": "Opt-in durable per-step context with this agent's tmux pane and window location", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/agent-default-model/package.json b/packages/core/agent-default-model/package.json index 1fda95a4d6..3eece66c58 100644 --- a/packages/core/agent-default-model/package.json +++ b/packages/core/agent-default-model/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-default-model", "description": "Default model selection shared by Agent entry points", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/agent-loop/package.json b/packages/core/agent-loop/package.json index 2098fb375b..5a6e0449d3 100644 --- a/packages/core/agent-loop/package.json +++ b/packages/core/agent-loop/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-loop", "description": "The concrete agent loop plugin for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/agent-tool-presentation/package.json b/packages/core/agent-tool-presentation/package.json index 1a3a294954..b299394d51 100644 --- a/packages/core/agent-tool-presentation/package.json +++ b/packages/core/agent-tool-presentation/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-tool-presentation", "description": "Deprecated tool presentation selector; use dsh-tool-executor-native or dsh-tool-executor-ptc directly", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/agent/package.json b/packages/core/agent/package.json index 9540b7fe34..63c8d0ec70 100644 --- a/packages/core/agent/package.json +++ b/packages/core/agent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent", "description": "Agent interface, registry, initiator scope, and event vocabulary for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/scope/package.json b/packages/core/scope/package.json index dd91932508..ef1d34bebf 100644 --- a/packages/core/scope/package.json +++ b/packages/core/scope/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-scope", "description": "Scoped-context registration primitive (scope tags, scope-filtered event dispatch) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/session/package.json b/packages/core/session/package.json index fa4b8e831a..3ea982ea51 100644 --- a/packages/core/session/package.json +++ b/packages/core/session/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session", "description": "Event-sourced session store for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/system-prompt/package.json b/packages/core/system-prompt/package.json index e6e9b0a2c5..f091384369 100644 --- a/packages/core/system-prompt/package.json +++ b/packages/core/system-prompt/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-system-prompt", "description": "System prompt assembly registry for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/tool-executor-native/package.json b/packages/core/tool-executor-native/package.json index 5719c424ee..079a74bb23 100644 --- a/packages/core/tool-executor-native/package.json +++ b/packages/core/tool-executor-native/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-executor-native", "description": "Native tool execution plugin", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/tool-executor-ptc/package.json b/packages/core/tool-executor-ptc/package.json index fe663d7ae0..e177399c7b 100644 --- a/packages/core/tool-executor-ptc/package.json +++ b/packages/core/tool-executor-ptc/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-executor-ptc", "description": "PTC program execution, tool bindings, and generated SDK prompts", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/core/tools/package.json b/packages/core/tools/package.json index cd7a4aaa56..eb49a6feb7 100644 --- a/packages/core/tools/package.json +++ b/packages/core/tools/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tools", "description": "Tool registry and execution pipeline for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/credentials/authorization/package.json b/packages/credentials/authorization/package.json index 1d9e87d0be..3e6ed00884 100644 --- a/packages/credentials/authorization/package.json +++ b/packages/credentials/authorization/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-authorization", "description": "Authorization seam (ctx.authorization): plugin-owned flows that obtain a credential through a conversation with the human", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/credentials/credentials-local/package.json b/packages/credentials/credentials-local/package.json index c435b250b3..8eb20c8986 100644 --- a/packages/credentials/credentials-local/package.json +++ b/packages/credentials/credentials-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-credentials-local", "description": "File-backed credentials provider ($DSH_HOME/.env under the live process environment) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/credentials/credentials/package.json b/packages/credentials/credentials/package.json index bbf70265ee..bc8a560eda 100644 --- a/packages/credentials/credentials/package.json +++ b/packages/credentials/credentials/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-credentials", "description": "Abstract credential seam (ctx.credentials): settings carry references to secrets, providers own the values", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/credentials/deepseek-account/package.json b/packages/credentials/deepseek-account/package.json index 581ff90497..02d744405a 100644 --- a/packages/credentials/deepseek-account/package.json +++ b/packages/credentials/deepseek-account/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-deepseek-account", "description": "Sign in to DeepSeek and manage account credentials and notifications", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/deliverables/deliverable-file-references/package.json b/packages/deliverables/deliverable-file-references/package.json index 16ea62e88d..04e74b3406 100644 --- a/packages/deliverables/deliverable-file-references/package.json +++ b/packages/deliverables/deliverable-file-references/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-deliverable-file-references", "description": "Shared model guidance for file links and deliverables across DeepSeek Harness hosts", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/deliverables/tool-present/package.json b/packages/deliverables/tool-present/package.json index bd050f1150..66cd8ee3b6 100644 --- a/packages/deliverables/tool-present/package.json +++ b/packages/deliverables/tool-present/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-present", "description": "Explicit workspace file delivery declarations for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/deliverables/workspace-changes/package.json b/packages/deliverables/workspace-changes/package.json index a48b0a268e..bafea4b213 100644 --- a/packages/deliverables/workspace-changes/package.json +++ b/packages/deliverables/workspace-changes/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-workspace-changes", "description": "Per-turn workspace file changes recorded from git working-tree snapshots and whole-file captures, with per-file comparisons, for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/document/office-kit/package.json b/packages/document/office-kit/package.json index 031c28116d..53125887dd 100644 --- a/packages/document/office-kit/package.json +++ b/packages/document/office-kit/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-office-kit", "description": "Shared Office rendering, conversion, and recalculation with bounded queues and caching", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/document/tool-office/package.json b/packages/document/tool-office/package.json index 87afb991bb..c96b52e147 100644 --- a/packages/document/tool-office/package.json +++ b/packages/document/tool-office/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-office", "description": "Model-facing Office tools for rendering, converting, and recalculating documents", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/action-cards/package.json b/packages/experimental/action-cards/package.json index 24d0cf2809..b4af5ff0d5 100644 --- a/packages/experimental/action-cards/package.json +++ b/packages/experimental/action-cards/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-action-cards", "description": "Optional action cards below answers: one shared proposal tool, card state, user actions and status notices", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/api-speech-to-text/package.json b/packages/experimental/api-speech-to-text/package.json index 7c2e0186af..3b500bdc0f 100644 --- a/packages/experimental/api-speech-to-text/package.json +++ b/packages/experimental/api-speech-to-text/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-api-speech-to-text", "description": "Authenticated experimental speech transcription for browser clients", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/auto-review/package.json b/packages/experimental/auto-review/package.json index d107f78cf9..96d2d57fbc 100644 --- a/packages/experimental/auto-review/package.json +++ b/packages/experimental/auto-review/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-auto-review", "description": "Per-tool LLM authorization review for the DeepSeek Harness Auto permission preset", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "repository": { "type": "git", diff --git a/packages/experimental/auto-review/src/index.ts b/packages/experimental/auto-review/src/index.ts index 29df7771f0..3513c23f66 100644 --- a/packages/experimental/auto-review/src/index.ts +++ b/packages/experimental/auto-review/src/index.ts @@ -16,7 +16,7 @@ declare module '@deepseek-ai/dsh-llm/types' { import type {} from '@deepseek-ai/dsh-tool-executor-ptc/types' import type {} from '@deepseek-ai/dsh-working-directory' -import { FiberState, type Context } from '@deepseek-ai/cordis' +import { Context, FiberState } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' import type {} from '@deepseek-ai/dsh-agent-instructions' import { @@ -788,7 +788,7 @@ export function apply(ctx: Context): void { accepting = false try { // Root unload begins before child cleanup; only live plugin removal changes Session policy. - if (ctx.root.fiber.state === FiberState.ACTIVE) { + if (ctx[Context.root].fiber.state === FiberState.ACTIVE) { for (const session of ctx.sessions.list()) { if (permissionPresets.current(session) !== AUTO_PRESET) continue permissionPresets.set(session, 'danger-full-access') diff --git a/packages/experimental/auto-review/tests/auto-review.spec.ts b/packages/experimental/auto-review/tests/auto-review.spec.ts index ec2998c53f..d465b72b04 100644 --- a/packages/experimental/auto-review/tests/auto-review.spec.ts +++ b/packages/experimental/auto-review/tests/auto-review.spec.ts @@ -1471,7 +1471,7 @@ describe('cancellation and integration teardown', () => { await auto.restart() - expect(ctx.root.fiber.state).toBe(FiberState.ACTIVE) + expect(ctx[Context.root].fiber.state).toBe(FiberState.ACTIVE) expect(ctx.permissionPresets.current(session)).toBe('danger-full-access') expect(ctx.permissionPresets.names).toContain(AUTO_PRESET) expect(session.snapshotEvents().filter(event => event.type === 'approval/policy').at(-1)?.data) @@ -1532,7 +1532,7 @@ describe('cancellation and integration teardown', () => { const disposal = ctx.fiber.dispose().then(() => { disposed = true }) try { await cancelled.promise - expect(ctx.root.fiber.state).toBe(FiberState.UNLOADING) + expect(ctx[Context.root].fiber.state).toBe(FiberState.UNLOADING) expect(disposed).toBe(false) expect(sessions.list()).toContain(session) expect(events).toEqual(beforeShutdown) diff --git a/packages/experimental/badge-skill-bundle/package.json b/packages/experimental/badge-skill-bundle/package.json index 7ffd9b7304..7d68e9f9d4 100644 --- a/packages/experimental/badge-skill-bundle/package.json +++ b/packages/experimental/badge-skill-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-badge-skill-bundle", "description": "Let agents add a “powered by dsh” badge to documents, pull requests, and other outputs.", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/browser-use-chrome-devtools-mcp/package.json b/packages/experimental/browser-use-chrome-devtools-mcp/package.json index c3e7ac3d7b..8b13883d93 100644 --- a/packages/experimental/browser-use-chrome-devtools-mcp/package.json +++ b/packages/experimental/browser-use-chrome-devtools-mcp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp", "description": "Experimental per-Session Chromium browser tools through chrome-devtools-mcp", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/browser-use-playwright-mcp/package.json b/packages/experimental/browser-use-playwright-mcp/package.json index 156be7b8b2..6e3603d34e 100644 --- a/packages/experimental/browser-use-playwright-mcp/package.json +++ b/packages/experimental/browser-use-playwright-mcp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-browser-use-playwright-mcp", "description": "Experimental per-Session Chromium browser tools through @playwright/mcp", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/browser-use-runtime/package.json b/packages/experimental/browser-use-runtime/package.json index 7c08921ec7..c908a74026 100644 --- a/packages/experimental/browser-use-runtime/package.json +++ b/packages/experimental/browser-use-runtime/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-browser-use-runtime", "description": "Session-owned browser resource lifecycles and MCP integration for experimental providers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/browser-use-stagehand-native/package.json b/packages/experimental/browser-use-stagehand-native/package.json index 959cd932d1..9430dae165 100644 --- a/packages/experimental/browser-use-stagehand-native/package.json +++ b/packages/experimental/browser-use-stagehand-native/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-browser-use-stagehand-native", "description": "Experimental Stagehand browser tools with separately configured native models", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/claude-code-mods/package.json b/packages/experimental/claude-code-mods/package.json index a4db21abb9..d2e5fc9137 100644 --- a/packages/experimental/claude-code-mods/package.json +++ b/packages/experimental/claude-code-mods/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-claude-code-mods", "description": "Experimental bridge: load Claude Code mods (hooks modules) and run their hook chains on DeepSeek Harness extension points", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-action-cards/package.json b/packages/experimental/client-ui-action-cards/package.json index 669219124d..59c10eaf69 100644 --- a/packages/experimental/client-ui-action-cards/package.json +++ b/packages/experimental/client-ui-action-cards/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-claude-code-mods/package.json b/packages/experimental/client-ui-claude-code-mods/package.json index 9121201b9d..1de467b3ac 100644 --- a/packages/experimental/client-ui-claude-code-mods/package.json +++ b/packages/experimental/client-ui-claude-code-mods/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-client-ui-claude-code-mods", "description": "Web band above the prompt for Claude Code mods: draws each session's mod tree and sends button presses back to the bridge", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-cot-translation/package.json b/packages/experimental/client-ui-cot-translation/package.json index df83babdf7..f4ac0ae2f1 100644 --- a/packages/experimental/client-ui-cot-translation/package.json +++ b/packages/experimental/client-ui-cot-translation/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-client-ui-cot-translation", "description": "Optional machine translation of expanded reasoning, preserving original Session text", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-creation-recommendations/package.json b/packages/experimental/client-ui-creation-recommendations/package.json index b770582cd6..57988cdbef 100644 --- a/packages/experimental/client-ui-creation-recommendations/package.json +++ b/packages/experimental/client-ui-creation-recommendations/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-forge/package.json b/packages/experimental/client-ui-forge/package.json index dd396ed78c..45f9245e81 100644 --- a/packages/experimental/client-ui-forge/package.json +++ b/packages/experimental/client-ui-forge/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-client-ui-forge", "description": "Sidebar panel for a Session's change requests, with a worktree option for new Sessions and its Host Remote", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-plugin-recommendations/package.json b/packages/experimental/client-ui-plugin-recommendations/package.json index 4e60f147ac..2e33edbe06 100644 --- a/packages/experimental/client-ui-plugin-recommendations/package.json +++ b/packages/experimental/client-ui-plugin-recommendations/package.json @@ -1,5 +1,5 @@ { - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-stats/package.json b/packages/experimental/client-ui-stats/package.json index 46c26e58e9..c8e87d25ba 100644 --- a/packages/experimental/client-ui-stats/package.json +++ b/packages/experimental/client-ui-stats/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-client-ui-stats", "description": "Per-turn and per-step context, timing, cache, and tool-cost table contributed as an experimental conversation View", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/client-ui-voice-input/package.json b/packages/experimental/client-ui-voice-input/package.json index 0e08de22eb..829cf096ac 100644 --- a/packages/experimental/client-ui-voice-input/package.json +++ b/packages/experimental/client-ui-voice-input/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-client-ui-voice-input", "description": "Record speech and insert editable text into the conversation draft", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/computer-use-cua-driver-mcp/package.json b/packages/experimental/computer-use-cua-driver-mcp/package.json index be3a18dfd3..1a93cf342e 100644 --- a/packages/experimental/computer-use-cua-driver-mcp/package.json +++ b/packages/experimental/computer-use-cua-driver-mcp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-computer-use-cua-driver-mcp", "description": "Experimental computer use through an installed Cua Driver MCP executable", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/computer-use-cua-driver-native/package.json b/packages/experimental/computer-use-cua-driver-native/package.json index 3340f7eb42..b8bd87b194 100644 --- a/packages/experimental/computer-use-cua-driver-native/package.json +++ b/packages/experimental/computer-use-cua-driver-native/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-computer-use-cua-driver-native", "description": "Experimental computer-use provider embedding the Cua Driver native npm SDK", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/cot-translation-bundle/package.json b/packages/experimental/cot-translation-bundle/package.json index 892621d2c6..c67de56cc5 100644 --- a/packages/experimental/cot-translation-bundle/package.json +++ b/packages/experimental/cot-translation-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-cot-translation-bundle", "description": "Experimental machine translation of expanded reasoning", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/creation-recommendations/package.json b/packages/experimental/creation-recommendations/package.json index 3e691dd836..f1a14b3ce8 100644 --- a/packages/experimental/creation-recommendations/package.json +++ b/packages/experimental/creation-recommendations/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-creation-recommendations", "description": "Create persistent removable interface plugins from explicit conversation needs", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/cua-bundle/package.json b/packages/experimental/cua-bundle/package.json index 6e36649e28..f06cfba110 100644 --- a/packages/experimental/cua-bundle/package.json +++ b/packages/experimental/cua-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cua-bundle", "description": "Optional Computer Use for macOS and Windows", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" @@ -55,7 +55,6 @@ "devDependencies": { "@deepseek-ai/cordis": "workspace:~", "@deepseek-ai/cordis-plugin-include": "workspace:~", - "js-yaml": "^4.2.0", "@deepseek-ai/cordis-plugin-loader": "workspace:~" }, "optionalDependencies": { diff --git a/packages/experimental/cua-bundle/tests/platform.spec.ts b/packages/experimental/cua-bundle/tests/platform.spec.ts index c1a65a4a8b..c5cc30d3c4 100644 --- a/packages/experimental/cua-bundle/tests/platform.spec.ts +++ b/packages/experimental/cua-bundle/tests/platform.spec.ts @@ -2,14 +2,11 @@ import { readFile } from 'node:fs/promises' import { Context } from '@deepseek-ai/cordis' import Loader, { interpolate, type EntryOptions } from '@deepseek-ai/cordis-plugin-loader' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' -import { load } from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { expect, it, vi } from 'vitest' it.each(['darwin', 'win32', 'linux'])('loads the exported patch directly on %s and selects its native provider', async (platform) => { - const patch = load(await readFile(new URL('../cordis.patch.yml', import.meta.url), 'utf8'), { - schema: entryListSchema, - }) as { insert: EntryOptions[] }[] + const patch = parseEntryYaml(await readFile(new URL('../cordis.patch.yml', import.meta.url), 'utf8')) as { insert: EntryOptions[] }[] for (const id of ['cua-macos', 'cua-windows']) { expect(patch[0]!.insert.find(row => row.id === id)?.name).toBe(`@deepseek-ai/dsh-${id}`) } diff --git a/packages/experimental/cua-macos/package.json b/packages/experimental/cua-macos/package.json index 140e89e247..8310d91b4a 100644 --- a/packages/experimental/cua-macos/package.json +++ b/packages/experimental/cua-macos/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cua-macos", "description": "macOS native provider for shared Computer Use application and window objects", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/cua-mcp/package.json b/packages/experimental/cua-mcp/package.json index 58392af693..ba53813116 100644 --- a/packages/experimental/cua-mcp/package.json +++ b/packages/experimental/cua-mcp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cua-mcp", "description": "Computer Use as an MCP stdio server: a dsh profile bundle that exposes cua_run_code to external agent harnesses", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" @@ -88,7 +88,6 @@ "@deepseek-ai/dsh-attachment": "workspace:*", "@deepseek-ai/dsh-fs-local": "workspace:*", "@deepseek-ai/dsh-ptc-runtime-node": "workspace:*", - "@modelcontextprotocol/client": "2.2.0", - "js-yaml": "^4.3.2" + "@modelcontextprotocol/client": "2.2.0" } } diff --git a/packages/experimental/cua-mcp/tests/bundle.spec.ts b/packages/experimental/cua-mcp/tests/bundle.spec.ts index 56e1b71a24..30a80d6163 100644 --- a/packages/experimental/cua-mcp/tests/bundle.spec.ts +++ b/packages/experimental/cua-mcp/tests/bundle.spec.ts @@ -2,10 +2,9 @@ import { readFileSync, readdirSync } from 'node:fs' import { resolve } from 'node:path' import { fileURLToPath } from 'node:url' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader' import { interpolate } from '@deepseek-ai/cordis-plugin-loader' -import { load } from 'js-yaml' import { describe, expect, it } from 'vitest' const root = fileURLToPath(new URL('..', import.meta.url)) @@ -21,7 +20,7 @@ interface Manifest { } const manifest = JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')) as Manifest -const patches = load(readFileSync(resolve(root, manifest.dsh.bundle.patch), 'utf8'), { schema: entryListSchema }) as Array< +const patches = parseEntryYaml(readFileSync(resolve(root, manifest.dsh.bundle.patch), 'utf8')) as Array< { id?: string; disabled?: unknown; insert?: EntryOptions[] } > const inserted = patches.flatMap(patch => patch.insert ?? []) diff --git a/packages/experimental/cua-windows/package.json b/packages/experimental/cua-windows/package.json index 96dd525ef6..7d768630de 100644 --- a/packages/experimental/cua-windows/package.json +++ b/packages/experimental/cua-windows/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cua-windows", "description": "Windows C# computer use through shared application and window objects", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/cua/package.json b/packages/experimental/cua/package.json index 3f12c4940e..efab9ed850 100644 --- a/packages/experimental/cua/package.json +++ b/packages/experimental/cua/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cua", "description": "Shared Computer Use application objects, authorization, and logged tool execution", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/deepseek-chat-import/package.json b/packages/experimental/deepseek-chat-import/package.json index cc49899674..c5543f35ef 100644 --- a/packages/experimental/deepseek-chat-import/package.json +++ b/packages/experimental/deepseek-chat-import/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-deepseek-chat-import", "description": "Import DeepSeek chat exports as stored Sessions in a chosen Workspace", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/forge-bundle/package.json b/packages/experimental/forge-bundle/package.json index 4cbccccacd..19b60889a6 100644 --- a/packages/experimental/forge-bundle/package.json +++ b/packages/experimental/forge-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-forge-bundle", "description": "Experimental change request panel and worktree option for Sessions in Git repositories", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/forge-github/package.json b/packages/experimental/forge-github/package.json index d8130712da..eec179fe00 100644 --- a/packages/experimental/forge-github/package.json +++ b/packages/experimental/forge-github/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-forge-github", "description": "GitHub provider for the experimental forge registry, read through the GitHub CLI on the host", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/forge-session/package.json b/packages/experimental/forge-session/package.json index d94f0730f8..fbe06b9fa7 100644 --- a/packages/experimental/forge-session/package.json +++ b/packages/experimental/forge-session/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-forge-session", "description": "Binds change requests to the Session that created, pushed, or tracked them", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/forge/package.json b/packages/experimental/forge/package.json index c3e95bc447..25626932a1 100644 --- a/packages/experimental/forge/package.json +++ b/packages/experimental/forge/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-forge", "description": "Provider-neutral change request registry with shared status polling", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/hook-protocol/package.json b/packages/experimental/hook-protocol/package.json index c7df2bdb6a..c968daf560 100644 --- a/packages/experimental/hook-protocol/package.json +++ b/packages/experimental/hook-protocol/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-hook-protocol", "description": "Shared Claude Code / Codex hook wire protocol: matcher engine, stdin/exit-code/stdout codec, multi-hook merge, and hook/* session events", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/hooks-claude-code/package.json b/packages/experimental/hooks-claude-code/package.json index f248db17d0..0d2e89b65d 100644 --- a/packages/experimental/hooks-claude-code/package.json +++ b/packages/experimental/hooks-claude-code/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-hooks-claude-code", "description": "Bridge plugin: run a Claude Code hooks.json / settings hook config on the DeepSeek Harness interception seams", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/hooks-codex/package.json b/packages/experimental/hooks-codex/package.json index 55a852022f..95931bc6f6 100644 --- a/packages/experimental/hooks-codex/package.json +++ b/packages/experimental/hooks-codex/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-hooks-codex", "description": "Bridge plugin: run a Codex hooks.json hook config on the DeepSeek Harness interception seams", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/inspector-profile/package.json b/packages/experimental/inspector-profile/package.json index b94811c917..ae5dd2ac1b 100644 --- a/packages/experimental/inspector-profile/package.json +++ b/packages/experimental/inspector-profile/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-inspector-profile", "description": "Optional Web bundle for raw Session logs and Chat node inspection", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" @@ -51,7 +51,6 @@ }, "devDependencies": { "@deepseek-ai/cordis": "workspace:~", - "@deepseek-ai/cordis-plugin-include": "workspace:~", - "js-yaml": "^4.3.2" + "@deepseek-ai/cordis-plugin-include": "workspace:~" } } diff --git a/packages/experimental/inspector-profile/tests/profile.spec.ts b/packages/experimental/inspector-profile/tests/profile.spec.ts index 7fcfa5813b..4992f2fb1c 100644 --- a/packages/experimental/inspector-profile/tests/profile.spec.ts +++ b/packages/experimental/inspector-profile/tests/profile.spec.ts @@ -2,8 +2,7 @@ import { readFileSync } from 'node:fs' import { describe, expect, it } from 'vitest' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' -import * as yaml from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' describe('Inspector profile bundle', () => { it('publishes one layer containing both inspectors and the Statistics view', () => { @@ -19,9 +18,7 @@ describe('Inspector profile bundle', () => { '@deepseek-ai/dsh-experimental-inspector': 'workspace:*', '@deepseek-ai/dsh-experimental-session-inspector': 'workspace:*', }) - expect(yaml.load(readFileSync(new URL(`../${manifest.dsh.bundle.patch}`, import.meta.url), 'utf8'), { - schema: entryListSchema, - })).toEqual([{ insert: [ + expect(parseEntryYaml(readFileSync(new URL(`../${manifest.dsh.bundle.patch}`, import.meta.url), 'utf8'))).toEqual([{ insert: [ { id: 'experimental-inspector', name: '@deepseek-ai/dsh-experimental-inspector', disabled: false, config: { captureFetch: true }, diff --git a/packages/experimental/inspector/package.json b/packages/experimental/inspector/package.json index be3e4211fc..4507190067 100644 --- a/packages/experimental/inspector/package.json +++ b/packages/experimental/inspector/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-inspector", "description": "Experimental cross-realm CDP hub for Host debugging and Client Runtime inspection", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/inspector/src/shared/cordis/observer.ts b/packages/experimental/inspector/src/shared/cordis/observer.ts index 00793a3739..b220e5543b 100644 --- a/packages/experimental/inspector/src/shared/cordis/observer.ts +++ b/packages/experimental/inspector/src/shared/cordis/observer.ts @@ -1,6 +1,6 @@ /** Lifecycle-driven Cordis tree publication shared by Host and Client plugin faces. */ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import type { CordisTreeSnapshot } from './snapshot.ts' import { CordisTreeCollector, type CordisTreeLimits } from './collector.ts' @@ -19,7 +19,7 @@ export function observeCordisTree( listener: CordisTreeSnapshotListener, limits: CordisTreeLimits, ): () => void { - const collector = new CordisTreeCollector(ctx.root, limits) + const collector = new CordisTreeCollector(ctx[Context.root], limits) let scheduled = false let closed = false const publish = (): void => { diff --git a/packages/experimental/inspector/tests/client-browser.e2e.ts b/packages/experimental/inspector/tests/client-browser.e2e.ts index b7350afba8..f2ef373256 100644 --- a/packages/experimental/inspector/tests/client-browser.e2e.ts +++ b/packages/experimental/inspector/tests/client-browser.e2e.ts @@ -319,8 +319,9 @@ const root = { inject() { return { dispose() {} }; }, provide(name, value) { this[name] = value; return () => { delete this[name]; }; }, }; -root.root = root; -const cordis = { Context: { is(value) { return value?.__inspectorContext === true; } } }; +const rootKey = Symbol.for('cordis.root'); +root[rootKey] = root; +const cordis = { Context: { root: rootKey, is(value) { return value?.__inspectorContext === true; } } }; const plugin = registration.factory(specifier => { if (specifier === '@deepseek-ai/cordis') return cordis; throw new Error('Unexpected Client bundle dependency ' + specifier); diff --git a/packages/experimental/liveshare-protocol/package.json b/packages/experimental/liveshare-protocol/package.json index 288133dad0..0e2fa6b04b 100644 --- a/packages/experimental/liveshare-protocol/package.json +++ b/packages/experimental/liveshare-protocol/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-liveshare-protocol", "description": "Liveshare wire frames and the identity contract shared by the owner bundle and the Relay", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "repository": { "type": "git", "url": "git+https://github.com/deepseek-ai/deepseek-harness.git", diff --git a/packages/experimental/liveshare/package.json b/packages/experimental/liveshare/package.json index cccfc1296e..6a54cb1dd0 100644 --- a/packages/experimental/liveshare/package.json +++ b/packages/experimental/liveshare/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-liveshare", "description": "Opt-in LiveShare host bundle: share a Session through a separate Relay at the view or bounded-write tier, with forking and attachment uploads as independent switches", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "repository": { "type": "git", diff --git a/packages/experimental/personalized-recommendations/package.json b/packages/experimental/personalized-recommendations/package.json index e3c79237b4..a98907ac2d 100644 --- a/packages/experimental/personalized-recommendations/package.json +++ b/packages/experimental/personalized-recommendations/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-personalized-recommendations", "description": "Personalized pages and built-in plugin recommendations offered as cards below answers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" @@ -50,7 +50,6 @@ "devDependencies": { "@deepseek-ai/cordis": "workspace:~", "@deepseek-ai/cordis-plugin-include": "workspace:~", - "js-yaml": "^4.3.2", "@deepseek-ai/cordis-plugin-timer": "workspace:~", "@deepseek-ai/dsh-agent": "workspace:*", "@deepseek-ai/dsh-api-remote-access": "workspace:*", diff --git a/packages/experimental/personalized-recommendations/tests/bundle.spec.ts b/packages/experimental/personalized-recommendations/tests/bundle.spec.ts index 7856031d47..e3e9d5d588 100644 --- a/packages/experimental/personalized-recommendations/tests/bundle.spec.ts +++ b/packages/experimental/personalized-recommendations/tests/bundle.spec.ts @@ -4,9 +4,8 @@ import { mkdtemp, mkdir, readFile, rm, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import { expect, it, onTestFinished } from 'vitest' -import * as yaml from 'js-yaml' import type { Context } from '@deepseek-ai/cordis' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import Timer from '@deepseek-ai/cordis-plugin-timer' import { boot, initProfile, loadProfileDirectory, readProfilePatches, type ProfileContext } from '@deepseek-ai/dsh-app-boot' import Hmr from '@deepseek-ai/dsh-hmr' @@ -32,9 +31,7 @@ const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta. dependencies: Record dsh: { bundle: { patch: string } } } -const patch = yaml.load(readFileSync(new URL(`../${manifest.dsh.bundle.patch}`, import.meta.url), 'utf8'), { - schema: entryListSchema, -}) as { insert: Row[] }[] +const patch = parseEntryYaml(readFileSync(new URL(`../${manifest.dsh.bundle.patch}`, import.meta.url), 'utf8')) as { insert: Row[] }[] const rows = patch[0]?.insert ?? [] /** A browser row's Host entry is an empty `apply`; its contribution loads in the Client. */ @@ -133,7 +130,7 @@ it('addresses every row through its own id and switches the shared card service await toggle('action-cards', false) expect(ctx.get('actionCards')).toBeUndefined() expect(await skills()).toEqual([]) - expect(yaml.load(await readFile(profile.patchPath, 'utf8'))).toEqual([ + expect(parseEntryYaml(await readFile(profile.patchPath, 'utf8'))).toEqual([ { id: 'creation-recommendations', disabled: true }, { id: 'action-cards', disabled: true }, ]) await toggle('action-cards', true) @@ -144,5 +141,5 @@ it('addresses every row through its own id and switches the shared card service expect(await skills()).toEqual(['personalized-pages']) await toggle('plugin-recommendations', true) expect(await skills()).toEqual(['official-plugins', 'personalized-pages']) - expect(yaml.load(await readFile(profile.patchPath, 'utf8'))).toEqual([]) + expect(parseEntryYaml(await readFile(profile.patchPath, 'utf8'))).toEqual([]) }, 30_000) diff --git a/packages/experimental/plugin-market-bundle/package.json b/packages/experimental/plugin-market-bundle/package.json index cad518a046..1e026c5c12 100644 --- a/packages/experimental/plugin-market-bundle/package.json +++ b/packages/experimental/plugin-market-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-plugin-market-bundle", "description": "Experimental custom plugin indexes: a Discover tab that browses and installs bundles from plugin indexes", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/plugin-recommendations/package.json b/packages/experimental/plugin-recommendations/package.json index d0c159c0e0..64b2bffa21 100644 --- a/packages/experimental/plugin-recommendations/package.json +++ b/packages/experimental/plugin-recommendations/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-recommendations", "description": "Official plugin suggestions with explicit user activation and persistent conversation decisions", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/ralph-bundle/package.json b/packages/experimental/ralph-bundle/package.json index 4de992df12..70e5aa483e 100644 --- a/packages/experimental/ralph-bundle/package.json +++ b/packages/experimental/ralph-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-ralph-bundle", "description": "Run explicitly requested repeated work with fresh agents.", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/session-inspector/package.json b/packages/experimental/session-inspector/package.json index a20789f42b..a2c0c49c41 100644 --- a/packages/experimental/session-inspector/package.json +++ b/packages/experimental/session-inspector/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-session-inspector", "description": "Experimental virtualized Session log and live Chat group/node inspectors", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/session-search/package.json b/packages/experimental/session-search/package.json index 47b929f75e..38654033b0 100644 --- a/packages/experimental/session-search/package.json +++ b/packages/experimental/session-search/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-session-search", "description": "Give agents tools to search and read earlier sessions from the current workspace.", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/session-title-all-prompts-llm/package.json b/packages/experimental/session-title-all-prompts-llm/package.json index e00158d78d..f522cf1897 100644 --- a/packages/experimental/session-title-all-prompts-llm/package.json +++ b/packages/experimental/session-title-all-prompts-llm/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-title-all-prompts-llm", "description": "All-user-messages LLM provider plugin for DeepSeek Harness session titles", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/session-titles-bundle/package.json b/packages/experimental/session-titles-bundle/package.json index ee7f959bd0..1352006c12 100644 --- a/packages/experimental/session-titles-bundle/package.json +++ b/packages/experimental/session-titles-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-session-titles-bundle", "description": "Refresh session titles as new human prompts arrive.", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/skill-badge/package.json b/packages/experimental/skill-badge/package.json index e8268453ac..eec25e91e0 100644 --- a/packages/experimental/skill-badge/package.json +++ b/packages/experimental/skill-badge/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-skill-badge", "description": "Bundled dsh badge skill provider for DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/speech-to-text-sensevoice/package.json b/packages/experimental/speech-to-text-sensevoice/package.json index 9620fc5b7e..c86fa19084 100644 --- a/packages/experimental/speech-to-text-sensevoice/package.json +++ b/packages/experimental/speech-to-text-sensevoice/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-speech-to-text-sensevoice", "description": "Local SenseVoice ONNX transcription with a managed sherpa-onnx process", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/speech-to-text/package.json b/packages/experimental/speech-to-text/package.json index f2f7643a2a..722be07be3 100644 --- a/packages/experimental/speech-to-text/package.json +++ b/packages/experimental/speech-to-text/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-speech-to-text", "description": "Experimental speech recognition with independently selectable providers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/subagent-oar/package.json b/packages/experimental/subagent-oar/package.json index e818e22e7e..870fb770c0 100644 --- a/packages/experimental/subagent-oar/package.json +++ b/packages/experimental/subagent-oar/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-subagent-oar", "description": "Experimental one-shot subagents through OAR runtimes", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/terminal-bundle/package.json b/packages/experimental/terminal-bundle/package.json index f678e3d23c..d56c5f3c2a 100644 --- a/packages/experimental/terminal-bundle/package.json +++ b/packages/experimental/terminal-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-terminal-bundle", "description": "Let the agent run long-lived commands in terminals you can watch in the sidebar.", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/terminal-panel/package.json b/packages/experimental/terminal-panel/package.json index 98e383a7a5..7b5b1e4369 100644 --- a/packages/experimental/terminal-panel/package.json +++ b/packages/experimental/terminal-panel/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-terminal-panel", "description": "Persistent Agent terminals shown in the Web sidebar, plus read-only access to the user's terminals", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/timeline/package.json b/packages/experimental/timeline/package.json index 5257f36042..f042125710 100644 --- a/packages/experimental/timeline/package.json +++ b/packages/experimental/timeline/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-timeline", "description": "Replace Todo in long-running sessions with task trees, a live progress bar, and timed reports", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "type": "module", "license": "MIT", diff --git a/packages/experimental/tool-ralph/package.json b/packages/experimental/tool-ralph/package.json index 22b68dee09..2371d213fe 100644 --- a/packages/experimental/tool-ralph/package.json +++ b/packages/experimental/tool-ralph/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-ralph", "description": "Model-facing fresh-agent Ralph loop over the workflow and subagent seams", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/tool-session-query/package.json b/packages/experimental/tool-session-query/package.json index c70555894a..921be6fc5b 100644 --- a/packages/experimental/tool-session-query/package.json +++ b/packages/experimental/tool-session-query/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-session-query", "description": "Workspace-authorized model-facing session history search, trace, and event read tools", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/tool-subagent-oar/package.json b/packages/experimental/tool-subagent-oar/package.json index c78dd7e1da..b6e08adead 100644 --- a/packages/experimental/tool-subagent-oar/package.json +++ b/packages/experimental/tool-subagent-oar/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-tool-subagent-oar", "description": "Delegate standalone tasks to configured external subagent providers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/tool-terminal/package.json b/packages/experimental/tool-terminal/package.json index 4a4a310798..0a0900b3fc 100644 --- a/packages/experimental/tool-terminal/package.json +++ b/packages/experimental/tool-terminal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-terminal", "description": "Six model-facing persistent PTY tools with owner isolation and generic background-job integration", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/tool-worktree/package.json b/packages/experimental/tool-worktree/package.json index bba3a0cbdb..4068efb45d 100644 --- a/packages/experimental/tool-worktree/package.json +++ b/packages/experimental/tool-worktree/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-tool-worktree", "description": "Model tool that creates and enters a new Git worktree", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/translator/package.json b/packages/experimental/translator/package.json index 37c84e0221..a8b5ac641f 100644 --- a/packages/experimental/translator/package.json +++ b/packages/experimental/translator/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-translator", "description": "Machine translation with reusable Session results", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/voice-input-bundle/package.json b/packages/experimental/voice-input-bundle/package.json index 50e7b96ebe..b9860f5dde 100644 --- a/packages/experimental/voice-input-bundle/package.json +++ b/packages/experimental/voice-input-bundle/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-voice-input-bundle", "description": "Experimental voice input with local SenseVoice; downloads its runtime on first use", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "icon": "./icon.svg", "publishConfig": { "access": "public" diff --git a/packages/experimental/webhook-github/package.json b/packages/experimental/webhook-github/package.json index 670ff23df6..b8d7b93503 100644 --- a/packages/experimental/webhook-github/package.json +++ b/packages/experimental/webhook-github/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-webhook-github", "description": "Signed GitHub HTTP webhook adapter for the DeepSeek Harness webhook runtime", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/webhook/package.json b/packages/experimental/webhook/package.json index 16f9efaa4d..7b4433030e 100644 --- a/packages/experimental/webhook/package.json +++ b/packages/experimental/webhook/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-webhook", "description": "Fire-and-forget webhook rule runtime that creates Workspace-backed DeepSeek Harness Sessions", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/webworker-packer/package.json b/packages/experimental/webworker-packer/package.json index 96250d296b..e99dd70733 100644 --- a/packages/experimental/webworker-packer/package.json +++ b/packages/experimental/webworker-packer/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-webworker-packer", "description": "Build-time packer for the browser runtime's base VFS image and ordered data-overlay archives", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -43,12 +43,10 @@ "@deepseek-ai/dsh-session-format": "workspace:*", "@deepseek-ai/dsh-session-format-catalog": "workspace:*", "@deepseek-ai/dsh-session-format-v3-to-v4": "workspace:*", - "js-yaml": "^4.3.2", "picomatch": "^4.0.7" }, "devDependencies": { "@deepseek-ai/cordis": "workspace:~", - "@types/js-yaml": "^4.0.9", "@types/picomatch": "^4.0.3" }, "peerDependencies": { diff --git a/packages/experimental/webworker-packer/src/pack.ts b/packages/experimental/webworker-packer/src/pack.ts index f92270d584..2f16d5e611 100644 --- a/packages/experimental/webworker-packer/src/pack.ts +++ b/packages/experimental/webworker-packer/src/pack.ts @@ -28,8 +28,7 @@ import { type ImageLazyArchive, type ImageManifest, } from '@deepseek-ai/dsh-experimental-webworker-runtime' import picomatch from 'picomatch' -import yaml from 'js-yaml' -import { entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml, stringifyEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import { PROFILE_PATCH_FILENAME } from '@deepseek-ai/dsh-app-boot' import { WRAPPER_CONTRACT, type ImageFiles, type TransformOutcome } from './transform-image.ts' import { EXCLUDE, EXCLUDE_WORKSPACE, IMAGE_ENTRY_SEEDS, PAGE_ASSETS } from './rules.ts' @@ -207,7 +206,7 @@ function treeRosterOf(root: string): string[] { continue } if (!entry.name.endsWith('.yml') && !entry.name.endsWith('.yaml')) continue - collectModuleNames(yaml.load(readFileSync(absolute, 'utf8'), { schema: entryListSchema }), names) + collectModuleNames(parseEntryYaml(readFileSync(absolute, 'utf8')), names) } } walk(root) @@ -697,7 +696,7 @@ export function packVfsImage(options: PackOptions): PackResult { files[`node_modules/${installation.name}/package.json`] = readFileSync(installation.manifest) } if (options.homePatch !== undefined && options.homePatch.length > 0) { - files[HOME_PATCH_PATH] = encoder.encode(yaml.dump(options.homePatch, { schema: entryListSchema, noRefs: true })) + files[HOME_PATCH_PATH] = encoder.encode(stringifyEntryYaml(options.homePatch)) } for (const tree of configTrees) collectTree(tree.directory, files, tree.mount, relativePath => !excluded(relativePath)) diff --git a/packages/experimental/webworker-packer/tests/profile-image.spec.ts b/packages/experimental/webworker-packer/tests/profile-image.spec.ts index 6249b8a2c1..48c7be1d92 100644 --- a/packages/experimental/webworker-packer/tests/profile-image.spec.ts +++ b/packages/experimental/webworker-packer/tests/profile-image.spec.ts @@ -10,8 +10,7 @@ import { join } from 'node:path' import { fileURLToPath } from 'node:url' import { describe, expect, it, type TestContext } from 'vitest' import { OPTIONAL_BUNDLES, PROFILE_TEMPLATES } from '@deepseek-ai/dsh-official-bundles' -import yaml from 'js-yaml' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { HOME_PATCH_PATH, MANIFEST_PATH, packVfsImage } from '../src/pack.ts' import { installationManifest, platformHomePatch, profileRoster } from '../src/repository.ts' @@ -93,7 +92,7 @@ describe('image layout', () => { expect(HOME_PATCH_PATH).toBe('home/cordis.patch.yml') const text = new TextDecoder().decode(result.files[HOME_PATCH_PATH]) expect(text).toContain("!!js dshHomePath('sessions')") - expect(yaml.load(text, { schema: entryListSchema })).toEqual(homePatch) + expect(parseEntryYaml(text)).toEqual(homePatch) }) it('refuses an installation that is also a roster package', (test) => { diff --git a/packages/experimental/webworker-runtime/package.json b/packages/experimental/webworker-runtime/package.json index ad0a242ece..ed43ed7103 100644 --- a/packages/experimental/webworker-runtime/package.json +++ b/packages/experimental/webworker-runtime/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-webworker-runtime", "description": "Browser-only harness runtime: in-memory VFS, module transform and loader, postMessage tunnel, and the dedicated Web Worker assembly, with the Node-compatibility layer that lets the host tree run unchanged", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/experimental/worktree/package.json b/packages/experimental/worktree/package.json index 921d2be276..72ae3a97d4 100644 --- a/packages/experimental/worktree/package.json +++ b/packages/experimental/worktree/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-experimental-worktree", "description": "Creates a named Git worktree and changes the calling Session working directory", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/extensions/cordis-client-runner/package.json b/packages/extensions/cordis-client-runner/package.json index b08ef67ef9..210cbd73ee 100644 --- a/packages/extensions/cordis-client-runner/package.json +++ b/packages/extensions/cordis-client-runner/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cordis-client-runner", "description": "Browser half of dynamic dual-half plugin packages: event subscription, closure evaluation, guard facade, and loader entries", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/extensions/cordis-client-runner/src/client/api-catalog.ts b/packages/extensions/cordis-client-runner/src/client/api-catalog.ts index e65086328c..159ff226f0 100644 --- a/packages/extensions/cordis-client-runner/src/client/api-catalog.ts +++ b/packages/extensions/cordis-client-runner/src/client/api-catalog.ts @@ -1113,7 +1113,7 @@ export const INHERITED_CTX_API: readonly InheritedApiEntry[] = [ { name: 'ctx.effect', summary: 'Register a disposable side effect tied to the fiber.' }, { name: 'ctx.get / ctx.set / ctx.provide / ctx.accessor / ctx.mixin', summary: 'Low-level service-store access and binding.' }, { name: 'ctx.extend / ctx.isolate / ctx.intercept', summary: 'Derive a child context (scoped services / isolation / interception).' }, - { name: 'ctx.root / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger', summary: 'Ambient handles onto the running context graph.' }, + { name: 'ctx[Context.root] / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger', summary: 'Ambient handles onto the running context graph.' }, { name: 'ctx.timer (+ interval / timeout / throttle / debounce)', summary: 'Disposable timer helpers. The `timer` key is provided at runtime; the four supported helpers are mixed onto ctx directly (declared via Pick).' }, { name: 'ctx.loader', summary: 'The config Loader that booted the app (present under the loader).' }, ] diff --git a/packages/extensions/cordis-host-runner/package.json b/packages/extensions/cordis-host-runner/package.json index 5f7bbfa6df..d0529a170b 100644 --- a/packages/extensions/cordis-host-runner/package.json +++ b/packages/extensions/cordis-host-runner/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-cordis-host-runner", "description": "Dynamic package definition registry, host-half sandbox lifecycle, and invoke handler table for model-mounted dual-half packages", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/extensions/cordis-host-runner/tests/sandbox-context.spec.ts b/packages/extensions/cordis-host-runner/tests/sandbox-context.spec.ts index a6393512c1..c1347676a4 100644 --- a/packages/extensions/cordis-host-runner/tests/sandbox-context.spec.ts +++ b/packages/extensions/cordis-host-runner/tests/sandbox-context.spec.ts @@ -63,6 +63,21 @@ describe('sandbox context façade — escape surface is closed', () => { expect(harness.ctx.tools.get('smuggled')).toBeUndefined() }) + it('withholds the ctx[Context.root] symbol key, so the root bypass registers nothing', async () => { + const harness = await setup() + const message = await runTouching(harness, ` + ctx[Symbol.for('cordis.root')].tools.register({ + name: 'smuggled_via_root_key', + description: 'raw, unguarded', + parameters: { type: 'object', properties: {} }, + ${CONTENT_OUTPUT_CODE} + async execute() { return [] }, + }) + `) + expect(message).toContain("reading 'tools'") + expect(harness.ctx.tools.get('smuggled_via_root_key')).toBeUndefined() + }) + it('rejects assignment to the façade rather than silently dropping it', async () => { const harness = await setup() await expect(mount(harness, 'return { name: \'writer\', apply(ctx) { ctx.stash = 1 } }')) @@ -71,7 +86,7 @@ describe('sandbox context façade — escape surface is closed', () => { it('denies a service whose method returns a Context (the .ctx escape), registering nothing', async () => { // A cordis Service instance carries `.ctx` (a real Context), so - // `ctx.systemPrompt.ctx.root.tools.register(…)` would escape the façade; service-return + // `ctx.systemPrompt.ctx[Context.root].tools.register(…)` would escape the façade; service-return // guards reject that Context before the registration lands. const harness = await setup() const message = await (async (): Promise => { @@ -81,7 +96,7 @@ describe('sandbox context façade — escape surface is closed', () => { name: 'svc-ctx-escape', inject: ['systemPrompt', 'tools'], apply(ctx) { - ctx.systemPrompt.ctx.root.tools.register({ + ctx.systemPrompt.ctx[Symbol.for('cordis.root')].tools.register({ name: 'smuggled_via_service', description: 'raw, unguarded', parameters: { type: 'object', properties: {} }, diff --git a/packages/extensions/tool-cordis/package.json b/packages/extensions/tool-cordis/package.json index 9dcac1c8d8..add38265ea 100644 --- a/packages/extensions/tool-cordis/package.json +++ b/packages/extensions/tool-cordis/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-cordis", "description": "Read-only runtime API inspection for Harness plugin development", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/extensions/tool-cordis/src/api-catalog.ts b/packages/extensions/tool-cordis/src/api-catalog.ts index d73f14710a..a3a0efba7c 100644 --- a/packages/extensions/tool-cordis/src/api-catalog.ts +++ b/packages/extensions/tool-cordis/src/api-catalog.ts @@ -11068,7 +11068,7 @@ export const INHERITED_CTX_API: readonly InheritedApiEntry[] = [ { name: 'ctx.effect', summary: 'Register a disposable side effect tied to the fiber.' }, { name: 'ctx.get / ctx.set / ctx.provide / ctx.accessor / ctx.mixin', summary: 'Low-level service-store access and binding.' }, { name: 'ctx.extend / ctx.isolate / ctx.intercept', summary: 'Derive a child context (scoped services / isolation / interception).' }, - { name: 'ctx.root / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger', summary: 'Ambient handles onto the running context graph.' }, + { name: 'ctx[Context.root] / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger', summary: 'Ambient handles onto the running context graph.' }, { name: 'ctx.timer (+ interval / timeout / throttle / debounce)', summary: 'Disposable timer helpers. The `timer` key is provided at runtime; the four supported helpers are mixed onto ctx directly (declared via Pick).' }, { name: 'ctx.loader', summary: 'The config Loader that booted the app (present under the loader).' }, ] diff --git a/packages/extensions/ui-cordis/package.json b/packages/extensions/ui-cordis/package.json index ff0273b985..77bff7a3cd 100644 --- a/packages/extensions/ui-cordis/package.json +++ b/packages/extensions/ui-cordis/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-ui-cordis", "description": "Cordis dynamic-plugin definition card: the keyed cordis_define tool row with its run/stop switch", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/feedback/command-feedback/package.json b/packages/feedback/command-feedback/package.json index 1d9a543fc2..0cd223edd6 100644 --- a/packages/feedback/command-feedback/package.json +++ b/packages/feedback/command-feedback/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-command-feedback", "description": "Log-only session feedback: the record event, the sessionFeedback Host Remote, and the human-facing slash command", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/feedback/message-feedback/package.json b/packages/feedback/message-feedback/package.json index 58d461d148..96e0b1b053 100644 --- a/packages/feedback/message-feedback/package.json +++ b/packages/feedback/message-feedback/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-message-feedback", "description": "Canonical Session-log ratings and notes for finalized assistant messages", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/fs-local/package.json b/packages/fs/fs-local/package.json index 31f79c67a2..d80f53ba24 100644 --- a/packages/fs/fs-local/package.json +++ b/packages/fs/fs-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-fs-local", "description": "Local-filesystem implementation of the DeepSeek Harness filesystem seam (ctx.fs)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/fs-observation-policy/package.json b/packages/fs/fs-observation-policy/package.json index 6a428ad906..7d0d3869a5 100644 --- a/packages/fs/fs-observation-policy/package.json +++ b/packages/fs/fs-observation-policy/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-fs-observation-policy", "description": "File-context policy plugin for the DeepSeek Harness — observed-state, read-before-edit, and version-guarded write/edit added over the ctx.fs provider seam through the fs/* event gate (no service API)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/fs-patch/package.json b/packages/fs/fs-patch/package.json index e08c3f528c..00fe9ec653 100644 --- a/packages/fs/fs-patch/package.json +++ b/packages/fs/fs-patch/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-fs-patch", "description": "Pure Codex-style patch parser and LF text updater with structured match failures", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/fs-sandbox/package.json b/packages/fs/fs-sandbox/package.json index b51c8c83a4..98c67cc094 100644 --- a/packages/fs/fs-sandbox/package.json +++ b/packages/fs/fs-sandbox/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-fs-sandbox", "description": "Sandbox-enforcing implementation of the DeepSeek Harness filesystem seam: fences write/edit by the per-call sandbox mode (read-only denies mutation, workspace-write contains it to the workspace + temp roots) while reads pass through", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/fs/package.json b/packages/fs/fs/package.json index 13d14d69f3..82150a5f00 100644 --- a/packages/fs/fs/package.json +++ b/packages/fs/fs/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-fs", "description": "Abstract filesystem capability seam (ctx.fs) for the DeepSeek Harness — vocabulary types, the FileSystem service (text IO + optional version-guarded atomic mutations), and the fs/* policy event vocabulary", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/tool-fs-search/package.json b/packages/fs/tool-fs-search/package.json index 1235088ff2..2d7316f287 100644 --- a/packages/fs/tool-fs-search/package.json +++ b/packages/fs/tool-fs-search/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-fs-search", "description": "Model-facing filesystem discovery tools (glob, grep) backed by the packaged ripgrep binary (@vscode/ripgrep)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/tool-fs/package.json b/packages/fs/tool-fs/package.json index 0042844092..d2273cd228 100644 --- a/packages/fs/tool-fs/package.json +++ b/packages/fs/tool-fs/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-fs", "description": "Model-facing filesystem tools (read, write, edit) over the DeepSeek Harness filesystem seam (ctx.fs)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/fs/tool-str-replace-editor/package.json b/packages/fs/tool-str-replace-editor/package.json index 6990e6372c..ae3d36b3c8 100644 --- a/packages/fs/tool-str-replace-editor/package.json +++ b/packages/fs/tool-str-replace-editor/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-str-replace-editor", "description": "Model-facing view, create, literal replace, and line insert tool over the Harness filesystem service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/goal/command-goal/package.json b/packages/goal/command-goal/package.json index 61c5d9e111..bc72833acb 100644 --- a/packages/goal/command-goal/package.json +++ b/packages/goal/command-goal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-command-goal", "description": "Human-facing slash command for persisted same-session goals", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/goal/goal-round-driver/package.json b/packages/goal/goal-round-driver/package.json index 4f4ed88472..40b5b3b4ab 100644 --- a/packages/goal/goal-round-driver/package.json +++ b/packages/goal/goal-round-driver/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-goal-round-driver", "description": "Race-fenced same-session goal-round driver", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/goal/goal/package.json b/packages/goal/goal/package.json index 95569fc42a..0d00759fe4 100644 --- a/packages/goal/goal/package.json +++ b/packages/goal/goal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-goal", "description": "Event-sourced same-session goal state and lifecycle service for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/goal/tool-goal/package.json b/packages/goal/tool-goal/package.json index f958e197b8..a2c0ec058b 100644 --- a/packages/goal/tool-goal/package.json +++ b/packages/goal/tool-goal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-goal", "description": "Model-facing same-session goal tools with execution-time authority checks", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/guard/repeat-tool-reminder/package.json b/packages/guard/repeat-tool-reminder/package.json index 8bca35671a..db0f6a6070 100644 --- a/packages/guard/repeat-tool-reminder/package.json +++ b/packages/guard/repeat-tool-reminder/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-repeat-tool-reminder", "description": "Repeat-tool-call guard plugin: advisory reminders when an agent loops on identical tool calls", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/guard/timeout-policy/package.json b/packages/guard/timeout-policy/package.json index 6c4cd888d0..bf0471b6ff 100644 --- a/packages/guard/timeout-policy/package.json +++ b/packages/guard/timeout-policy/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-call-timeout-policy", "description": "Tool-call timeout policy: a tools/execute wrapper that arms a per-tool deadline on exec.signal and returns TOOL_TIMEOUT when it wins", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/authentication-desktop/package.json b/packages/host/authentication-desktop/package.json index a44c3d404e..95e91c9457 100644 --- a/packages/host/authentication-desktop/package.json +++ b/packages/host/authentication-desktop/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-authentication-desktop", "description": "Desktop private-channel authentication provider", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, "repository": { "type": "git", diff --git a/packages/host/authentication-token/package.json b/packages/host/authentication-token/package.json index 317fcf8671..e6f7a36f5b 100644 --- a/packages/host/authentication-token/package.json +++ b/packages/host/authentication-token/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-authentication-token", "description": "Default token authentication provider and HTTP cookie exchange", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, "repository": { "type": "git", diff --git a/packages/host/authentication-token/src/index.ts b/packages/host/authentication-token/src/index.ts index 11749347a0..9f9ab61f89 100644 --- a/packages/host/authentication-token/src/index.ts +++ b/packages/host/authentication-token/src/index.ts @@ -1,5 +1,5 @@ /** Default token authentication, HTTP exchanges, and entry URL contribution. */ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import type {} from '@deepseek-ai/dsh-credentials' import { CONNECT_PATH } from '@deepseek-ai/dsh-client-connection' @@ -29,7 +29,7 @@ export const Config: z = z.object({ * @param config - validated browser and API cookie lifetime. */ export async function apply(ctx: Context, config: Config): Promise { - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, config.cookieMaxAgeDays) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, config.cookieMaxAgeDays) const peer = ctx.connection.createPeer({ principal: { kind: 'owner' } }) const apiPeers = new Map() ctx.connection.authentication.register({ diff --git a/packages/host/authentication-token/tests/loader.host.spec.ts b/packages/host/authentication-token/tests/loader.host.spec.ts index ab21675040..e4b45e1de3 100644 --- a/packages/host/authentication-token/tests/loader.host.spec.ts +++ b/packages/host/authentication-token/tests/loader.host.spec.ts @@ -41,7 +41,7 @@ it('serves token exchanges through WebServer and keeps token-owned Peers outside await ctx.loader.create({ name: 'cordis:include', config: { path: pathToFileURL(path).href } }) await ctx.loader.await() const origin = `http://127.0.0.1:${ctx.webServer.port}` - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) const login = new URL(auth.authenticatedUrl(origin)) expect(login.searchParams.get('token')).toMatch(/^[A-Za-z0-9_-]{43}$/) const exchanged = await fetch(login, { redirect: 'manual' }) @@ -110,7 +110,7 @@ it('serves token exchanges through WebServer and keeps token-owned Peers outside expect(admission.peer.signal.aborted).toBe(true) expect(ctx.connection.admit({ headers })).toEqual({ rejection: 401 }) await ctx.plugin(Token, { cookieMaxAgeDays: 30 }).await() - const reloaded = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const reloaded = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) const restarted = new URL(reloaded.authenticatedUrl(origin)) expect(restarted.searchParams.get('token')).toBe(originalToken) const resumed = ctx.connection.authentication.authenticate({ headers }) diff --git a/packages/host/authentication-token/tests/plugin.host.spec.ts b/packages/host/authentication-token/tests/plugin.host.spec.ts index 14d5f85f28..64491314ce 100644 --- a/packages/host/authentication-token/tests/plugin.host.spec.ts +++ b/packages/host/authentication-token/tests/plugin.host.spec.ts @@ -59,7 +59,7 @@ async function mounted(secure = false, before?: (ctx: Context) => void) { }, }) await fiber.await() - const auth = await BrowserAuth.create(ctx.root, ctx.credentials, 30) + const auth = await BrowserAuth.create(ctx[Context.root], ctx.credentials, 30) return { ctx, fiber, providers, routes, createPeer, auth } } function response() { diff --git a/packages/host/directory-picker-auto/package.json b/packages/host/directory-picker-auto/package.json index 0bed0469c4..e461c7e5bd 100644 --- a/packages/host/directory-picker-auto/package.json +++ b/packages/host/directory-picker-auto/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-directory-picker-auto", "description": "Adaptive chooser of the directory-picker seam: resolves the host situation at boot and mounts the native or browse backend for the DeepSeek Harness web GUI host", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/directory-picker-browse/package.json b/packages/host/directory-picker-browse/package.json index 5c0c9ec451..f6fbc3462d 100644 --- a/packages/host/directory-picker-browse/package.json +++ b/packages/host/directory-picker-browse/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-directory-picker-browse", "description": "In-app browsing backend of the directory-picker seam (listing/creation primitives over the host filesystem)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/directory-picker-native/package.json b/packages/host/directory-picker-native/package.json index 3faa98c47b..987f9d4e95 100644 --- a/packages/host/directory-picker-native/package.json +++ b/packages/host/directory-picker-native/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-directory-picker-native", "description": "Native-OS-chooser backend of the directory-picker seam for the DeepSeek Harness web GUI host", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/directory-picker/package.json b/packages/host/directory-picker/package.json index d262f2c83a..637d629116 100644 --- a/packages/host/directory-picker/package.json +++ b/packages/host/directory-picker/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-directory-picker", "description": "Abstract workspace-directory picking seam (ctx.directoryPicker) for the DeepSeek Harness web GUI host", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/frontend-static/package.json b/packages/host/frontend-static/package.json index 000a5bfda1..b2b8c21e76 100644 --- a/packages/host/frontend-static/package.json +++ b/packages/host/frontend-static/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-frontend-static", "description": "SPA dist server for the Web shell: owns the webserver fallback seat, serving explicit index entries and static assets with traversal rejection and 404 misses", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/frontend-static/tests/frontend-static.spec.ts b/packages/host/frontend-static/tests/frontend-static.spec.ts index 3f09e701eb..984ec235b3 100644 --- a/packages/host/frontend-static/tests/frontend-static.spec.ts +++ b/packages/host/frontend-static/tests/frontend-static.spec.ts @@ -135,7 +135,7 @@ describe('real Loader composition', () => { expect(unloaded).toEqual([]) const server = loaded.webServer const port = server.port - const auth = await BrowserAuth.create(loaded.root, loaded.credentials, 30) + const auth = await BrowserAuth.create(loaded[Context.root], loaded.credentials, 30) const launchUrl = new URL(auth.authenticatedUrl(`http://127.0.0.1:${String(port)}`)) const exchange = await fetch(launchUrl, { redirect: 'manual' }) expect(exchange.status).toBe(303) diff --git a/packages/host/open-in-app/package.json b/packages/host/open-in-app/package.json index 29ce84dcd0..ae7014940b 100644 --- a/packages/host/open-in-app/package.json +++ b/packages/host/open-in-app/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-open-in-app", "description": "Host half of open-in-app: resolved application catalog, icons, and the launch endpoint as three webServer routes", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/plugin-inventory/package.json b/packages/host/plugin-inventory/package.json index 8ee263466a..3f3b8db2b5 100644 --- a/packages/host/plugin-inventory/package.json +++ b/packages/host/plugin-inventory/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-plugin-inventory", "description": "Read-only Remote projection of current Cordis Loader plugin state", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/product-telemetry-otel/package.json b/packages/host/product-telemetry-otel/package.json index c6fa32f0d2..92b3f44bd8 100644 --- a/packages/host/product-telemetry-otel/package.json +++ b/packages/host/product-telemetry-otel/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-product-telemetry-otel", "description": "Explicit product usage events exported through OpenTelemetry HTTP logs", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/host/webserver/package.json b/packages/host/webserver/package.json index 5492971caa..3060c74ab3 100644 --- a/packages/host/webserver/package.json +++ b/packages/host/webserver/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-host-webserver", "description": "Web route-registration plugin: HTTP and upgrade routes, per-Peer index transform taps, and static dist fallback", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/identity/anonymous-user-id/package.json b/packages/identity/anonymous-user-id/package.json index 940a2861d3..c5ce2fda07 100644 --- a/packages/identity/anonymous-user-id/package.json +++ b/packages/identity/anonymous-user-id/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-anonymous-user-id", "description": "Shared anonymous user identity for DeepSeek Harness telemetry and feedback correlation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/interaction/commands/package.json b/packages/interaction/commands/package.json index 075a9d09c5..a004115add 100644 --- a/packages/interaction/commands/package.json +++ b/packages/interaction/commands/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-commands", "description": "Plugin-owned human command registry for DeepSeek Harness UIs", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/interaction/permission-presets/package.json b/packages/interaction/permission-presets/package.json index b2c5faf6d0..1a42825b05 100644 --- a/packages/interaction/permission-presets/package.json +++ b/packages/interaction/permission-presets/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-permission-presets", "description": "User-facing permission presets (ctx.permissionPresets) for the DeepSeek Harness: one product-level Permissions select bundling the sandbox-mode and approval-policy knobs, written through to their own session events", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/interaction/tool-ask-user/package.json b/packages/interaction/tool-ask-user/package.json index b58794fef8..dcdb546409 100644 --- a/packages/interaction/tool-ask-user/package.json +++ b/packages/interaction/tool-ask-user/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-ask-user", "description": "Model-facing ask_user_question tool over the ctx.userQuestions seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/interaction/user-approval/package.json b/packages/interaction/user-approval/package.json index a8e8202424..c6e5b5ee13 100644 --- a/packages/interaction/user-approval/package.json +++ b/packages/interaction/user-approval/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-user-approval", "description": "User-approval seam (ctx.approval) for the DeepSeek Harness: one-shot permission decisions dispatched to composed answerers over the approval/request waterfall, fail-closed by default", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/interaction/user-questions/package.json b/packages/interaction/user-questions/package.json index 94365b5494..63bd547a31 100644 --- a/packages/interaction/user-questions/package.json +++ b/packages/interaction/user-questions/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-user-questions", "description": "Abstract user-questions seam (ctx.userQuestions) for asking the human during agent runs", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/jobs/jobs-local/package.json b/packages/jobs/jobs-local/package.json index d7ec997974..d40993b0ab 100644 --- a/packages/jobs/jobs-local/package.json +++ b/packages/jobs/jobs-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-jobs-local", "description": "Process-local implementation of the DeepSeek Harness background job registry seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/jobs/jobs/package.json b/packages/jobs/jobs/package.json index c802446815..e04f63dfd8 100644 --- a/packages/jobs/jobs/package.json +++ b/packages/jobs/jobs/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-jobs", "description": "Background job registry (ctx.jobs) for the DeepSeek Harness — shared ids, owner isolation, polling, cancellation, and completion listeners for long-running tool work", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/jobs/tool-jobs/package.json b/packages/jobs/tool-jobs/package.json index f0fd6484c5..3aeea4bd44 100644 --- a/packages/jobs/tool-jobs/package.json +++ b/packages/jobs/tool-jobs/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-jobs", "description": "Model-facing background job control tools (job_output, job_list, job_kill) over the ctx.jobs registry", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/deepseek-llm-api-extensions/package.json b/packages/llm/deepseek-llm-api-extensions/package.json index 3e18535cbc..b131883b46 100644 --- a/packages/llm/deepseek-llm-api-extensions/package.json +++ b/packages/llm/deepseek-llm-api-extensions/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-deepseek-llm-api-extensions", "description": "Additive request-field registry for the official DeepSeek LLM API adapter", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/llm-deepseek-account/package.json b/packages/llm/llm-deepseek-account/package.json index f61d60e84e..ac049e8ff1 100644 --- a/packages/llm/llm-deepseek-account/package.json +++ b/packages/llm/llm-deepseek-account/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-deepseek-account", "description": "DeepSeek account provider authentication and discovery", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/llm-deepseek-api-key/package.json b/packages/llm/llm-deepseek-api-key/package.json index 659bd18c95..e93842548c 100644 --- a/packages/llm/llm-deepseek-api-key/package.json +++ b/packages/llm/llm-deepseek-api-key/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-deepseek-api-key", "description": "DeepSeek api-key provider authentication and discovery", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/llm-deepseek/package.json b/packages/llm/llm-deepseek/package.json index ca145eb85f..274f8bce2f 100644 --- a/packages/llm/llm-deepseek/package.json +++ b/packages/llm/llm-deepseek/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-deepseek", "description": "DeepSeek Messages adapter", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/llm-pi-ai/package.json b/packages/llm/llm-pi-ai/package.json index 6986d695f0..c4e9d3a510 100644 --- a/packages/llm/llm-pi-ai/package.json +++ b/packages/llm/llm-pi-ai/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-pi-ai", "description": "pi-ai-backed DeepSeek adapter for the DeepSeek Harness LLM seam (design-verification twin of dsh-llm-deepseek)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/llm-retry/package.json b/packages/llm/llm-retry/package.json index 4f1a6c69cf..427a7e977a 100644 --- a/packages/llm/llm-retry/package.json +++ b/packages/llm/llm-retry/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-retry", "description": "Provider-routed LLM request retry policy for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/llm/package.json b/packages/llm/llm/package.json index e693a62ea1..2b03c1a86a 100644 --- a/packages/llm/llm/package.json +++ b/packages/llm/llm/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm", "description": "Provider-neutral LLM service interface for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/plugin-package-inventory-deepseek/package.json b/packages/llm/plugin-package-inventory-deepseek/package.json index f2a5b3f684..3b50709c69 100644 --- a/packages/llm/plugin-package-inventory-deepseek/package.json +++ b/packages/llm/plugin-package-inventory-deepseek/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-package-inventory-deepseek", "description": "Active Loader-backed plugin package inventory for official DeepSeek LLM API requests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/llm/token-meter/package.json b/packages/llm/token-meter/package.json index d4c8747883..b5e0f0f81b 100644 --- a/packages/llm/token-meter/package.json +++ b/packages/llm/token-meter/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-token-meter", "description": "Replay-aware token measurement service (ctx.tokenMeter) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/lsp/lsp-stdio/package.json b/packages/lsp/lsp-stdio/package.json index 82abe3e868..d85b258ec7 100644 --- a/packages/lsp/lsp-stdio/package.json +++ b/packages/lsp/lsp-stdio/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-lsp-stdio", "description": "Generic stdio language-server provider for the DeepSeek Harness LSP capability seam (ctx.lsp) — spawns configured servers, translates JSON-RPC, and serves transient-open goToDefinition/findReferences/goToImplementation/hover queries in the host filesystem namespace", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/lsp/lsp/package.json b/packages/lsp/lsp/package.json index e8f0f3ed46..629cdc0860 100644 --- a/packages/lsp/lsp/package.json +++ b/packages/lsp/lsp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-lsp", "description": "Abstract LSP capability seam (ctx.lsp) for the DeepSeek Harness — language-server provider registry keyed by branded id and extension mapping, order-independent per-query selection, normalized definition/references/implementation/hover requests and results, and the LspError taxonomy", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/lsp/tool-lsp/package.json b/packages/lsp/tool-lsp/package.json index 2252c54293..f2f30bdccd 100644 --- a/packages/lsp/tool-lsp/package.json +++ b/packages/lsp/tool-lsp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-lsp", "description": "Model-facing lsp tool over the DeepSeek Harness LSP capability seam (ctx.lsp) \u2014 one read-only tool with goToDefinition/findReferences/goToImplementation/hover operations, one-based UTF-16 cursor coordinates, bounded location rendering, and hover normalization", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/mcp/mcp-client/package.json b/packages/mcp/mcp-client/package.json index fe51c61246..2e3e18de24 100644 --- a/packages/mcp/mcp-client/package.json +++ b/packages/mcp/mcp-client/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-mcp-client", "description": "MCP client bridge: connects to MCP servers and registers their tools on ctx.tools", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/mcp/mcp-client/src/index.ts b/packages/mcp/mcp-client/src/index.ts index a742954e05..48d1e23ad5 100644 --- a/packages/mcp/mcp-client/src/index.ts +++ b/packages/mcp/mcp-client/src/index.ts @@ -13,7 +13,7 @@ * @module @deepseek-ai/dsh-mcp-client */ -import type { Context, Fiber } from '@deepseek-ai/cordis' +import { Context, type Fiber } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { scopeOf } from '@deepseek-ai/dsh-scope' import { MAX_TIMER_DELAY_MS } from '@deepseek-ai/dsh-timeout' @@ -212,7 +212,7 @@ export async function apply(ctx: Context, config: Config): Promise { // Fiber and survives its reloads and final disposal. let status!: ReturnType ctx.effect(() => { - const owner = scopeOf(ctx) ?? ctx.root + const owner = scopeOf(ctx) ?? ctx[Context.root] let names = activeServerNames.get(owner) if (!names) { names = new Set() diff --git a/packages/mcp/mcp-manager/package.json b/packages/mcp/mcp-manager/package.json index 2e73c2eda9..5b03abcc10 100644 --- a/packages/mcp/mcp-manager/package.json +++ b/packages/mcp/mcp-manager/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-mcp-manager", "description": "MCP server manager: a settings-driven fleet of mcp-client instances with runtime status, restart, and probe", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/mcp/mcp-resources/package.json b/packages/mcp/mcp-resources/package.json index b2b5677dbf..588e0d28b6 100644 --- a/packages/mcp/mcp-resources/package.json +++ b/packages/mcp/mcp-resources/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-mcp-resources", "description": "Scoped MCP resource discovery and reading through shared model tools", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/plan/plan-mode/package.json b/packages/plan/plan-mode/package.json index 2d2d90b0ff..8a35f9babc 100644 --- a/packages/plan/plan-mode/package.json +++ b/packages/plan/plan-mode/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plan-mode", "description": "Logged per-agent plan mode with deployment guidance, a direct slash command, and a user-reviewed exit", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/preset/agent-preset-registry/package.json b/packages/preset/agent-preset-registry/package.json index eb711ca66f..5e295a86d8 100644 --- a/packages/preset/agent-preset-registry/package.json +++ b/packages/preset/agent-preset-registry/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-preset-registry", "description": "Declarative Agent preset registry and profile-backed editing", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -69,8 +69,7 @@ "dependencies": { "@deepseek-ai/dsh-app-boot": "workspace:*", "@deepseek-ai/schemastery": "workspace:~", - "zod": "4.6.6", - "js-yaml": "^4.3.2" + "zod": "4.6.6" }, "devDependencies": { "@deepseek-ai/dsh-brand": "workspace:*", @@ -99,7 +98,6 @@ "@deepseek-ai/dsh-sandbox-policy": "workspace:*", "@deepseek-ai/dsh-user-approval": "workspace:*", "@deepseek-ai/dsh-agent-preset": "workspace:*", - "@deepseek-ai/dsh-working-directory": "workspace:*", - "@types/js-yaml": "^4.0.9" + "@deepseek-ai/dsh-working-directory": "workspace:*" } } diff --git a/packages/preset/agent-preset-registry/src/index.ts b/packages/preset/agent-preset-registry/src/index.ts index 5205a58228..0bee8749e1 100644 --- a/packages/preset/agent-preset-registry/src/index.ts +++ b/packages/preset/agent-preset-registry/src/index.ts @@ -4,8 +4,7 @@ import { Context, Service } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { Remote, RemoteError, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol' import { bindScopeParent, createScope, scopeOf, scopeParentOf, type Scope, type ScopeKey, type ScopeParentBinding } from '@deepseek-ai/dsh-scope' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' -import { dump } from 'js-yaml' +import { stringifyEntryYaml } from '@deepseek-ai/cordis-plugin-include' import type { Agent } from '@deepseek-ai/dsh-agent' import type { Session } from '@deepseek-ai/dsh-session' // Type-only: the optional `settings` service this registry keeps off the generated pages. @@ -239,7 +238,7 @@ export class AgentPresetRegistry extends TypertRemoteService { } const { id, name, description, plugins } = record.config // The Loader's own dialect, so `!!js` conditions read as declared rather than as expression objects. - const content = dump(plugins, { schema: entryListSchema, noRefs: true, lineWidth: -1 }) + const content = stringifyEntryYaml(plugins, { lineWidth: -1 }) return Promise.resolve({ agentPreset: id, content, ...(name === undefined ? {} : { name }), ...(description === undefined ? {} : { description }), }) diff --git a/packages/preset/agent-preset-registry/src/mount.ts b/packages/preset/agent-preset-registry/src/mount.ts index 32c36a5e39..cffcad03b9 100644 --- a/packages/preset/agent-preset-registry/src/mount.ts +++ b/packages/preset/agent-preset-registry/src/mount.ts @@ -68,7 +68,7 @@ function withinFiber(fiber: Fiber, root: Fiber): boolean { */ export function leakedServices(ctx: Context, mount: Fiber): string[] { const store = ctx.reflect.store - const rootIsolate = ctx.root[Context.isolate] + const rootIsolate = ctx[Context.root][Context.isolate] const leaked: string[] = [] for (const key of Object.getOwnPropertySymbols(store)) { const impl = store[key] diff --git a/packages/preset/agent-preset/package.json b/packages/preset/agent-preset/package.json index 7d9d431ddf..8b6f671158 100644 --- a/packages/preset/agent-preset/package.json +++ b/packages/preset/agent-preset/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-preset", "description": "Declare an Agent capability composition in Cordis YAML", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -49,8 +49,6 @@ "@deepseek-ai/dsh-plugin-detail": "workspace:*", "@deepseek-ai/dsh-skill": "workspace:*", "@deepseek-ai/dsh-skill-filesystem": "workspace:*", - "@deepseek-ai/schemastery": "workspace:~", - "@types/js-yaml": "^4.0.9", - "js-yaml": "^4.3.2" + "@deepseek-ai/schemastery": "workspace:~" } } diff --git a/packages/preset/agent-preset/tests/skills.spec.ts b/packages/preset/agent-preset/tests/skills.spec.ts index f7ce7f866d..72148cda41 100644 --- a/packages/preset/agent-preset/tests/skills.spec.ts +++ b/packages/preset/agent-preset/tests/skills.spec.ts @@ -9,8 +9,7 @@ import { tmpdir } from 'node:os' import { dirname, join, resolve, sep } from 'node:path' import { Context } from '@deepseek-ai/cordis' import { fileURLToPath } from 'node:url' -import * as yaml from 'js-yaml' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { codePointLength } from '@deepseek-ai/dsh-compaction-tool-result-pruner' import { detailImage, languageChain, localFiles, readPackageDocument } from '@deepseek-ai/dsh-plugin-detail' import SkillRegistry, { renderSkillContent } from '@deepseek-ai/dsh-skill' @@ -89,7 +88,7 @@ describe('the shipped dsh-doc skill', () => { for (const name of readdirSync(templates)) { const dir = join(templates, name) const manifest = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8')) as { dsh: { bundle: { patch: string } } } - const patch = yaml.load(readFileSync(join(dir, manifest.dsh.bundle.patch), 'utf8'), { schema: entryListSchema }) + const patch = parseEntryYaml(readFileSync(join(dir, manifest.dsh.bundle.patch), 'utf8')) expect(Array.isArray(patch)).toBe(true) for (const file of readdirSync(dir).filter(entry => entry.endsWith('.js'))) { execFileSync(process.execPath, ['--check', join(dir, file)]) diff --git a/packages/preset/persona/package.json b/packages/preset/persona/package.json index e29ed33d4b..0de12bfeeb 100644 --- a/packages/preset/persona/package.json +++ b/packages/preset/persona/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-persona", "description": "Composition-authored deployment persona section for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/ptc-runtime/ptc-runtime-node/package.json b/packages/ptc-runtime/ptc-runtime-node/package.json index f98230d254..899ee8b0e1 100644 --- a/packages/ptc-runtime/ptc-runtime-node/package.json +++ b/packages/ptc-runtime/ptc-runtime-node/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-ptc-runtime-node", "description": "Node PTC execution with async function, REPL, scoped REPL and VM Script evaluators and optional retained state", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/ptc-runtime/ptc-runtime/package.json b/packages/ptc-runtime/ptc-runtime/package.json index 60db26aa1c..b6b903c96d 100644 --- a/packages/ptc-runtime/ptc-runtime/package.json +++ b/packages/ptc-runtime/ptc-runtime/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-ptc-runtime", "description": "Abstract PTC execution seam (ctx.ptcRuntime) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sandbox/sandbox-local/package.json b/packages/sandbox/sandbox-local/package.json index 8692829fbb..9ea5c3f016 100644 --- a/packages/sandbox/sandbox-local/package.json +++ b/packages/sandbox/sandbox-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sandbox-local", "description": "Local process-sandbox backends for the DeepSeek Harness sandbox seam: bwrap, the npm-distributed landlock-run launcher, macOS Seatbelt, or the Windows ACL restricted-token runner — functionally probed, fail-closed", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sandbox/sandbox-policy/package.json b/packages/sandbox/sandbox-policy/package.json index 073d80a709..0ad56295be 100644 --- a/packages/sandbox/sandbox-policy/package.json +++ b/packages/sandbox/sandbox-policy/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sandbox-policy", "description": "Per-call sandbox policy resolver and current model context: deployment fallbacks plus each session's mode and workspace root, shared by every enforcing capability family", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sandbox/sandbox-windows-acl/package.json b/packages/sandbox/sandbox-windows-acl/package.json index afe947b92d..04f9a24018 100644 --- a/packages/sandbox/sandbox-windows-acl/package.json +++ b/packages/sandbox/sandbox-windows-acl/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sandbox-windows-acl", "description": "Windows ACL write-restriction sandbox backend (restricted-token spawn with capability-SID write allowlist) for the DeepSeek Harness sandbox seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sandbox/sandbox/package.json b/packages/sandbox/sandbox/package.json index d7930e4097..3da3c6e7d7 100644 --- a/packages/sandbox/sandbox/package.json +++ b/packages/sandbox/sandbox/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sandbox", "description": "Abstract process-sandbox seam (ctx.sandbox) for the DeepSeek Harness: same-world confinement vocabulary and the SandboxProvider contract", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/schedule/schedule/package.json b/packages/schedule/schedule/package.json index 830caccbe5..d102040df1 100644 --- a/packages/schedule/schedule/package.json +++ b/packages/schedule/schedule/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-schedule", "description": "Host-wide durable reminders with shared management and delivery to existing or new Sessions", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/schedule/tool-schedule/package.json b/packages/schedule/tool-schedule/package.json index 8cdb588c75..73cb9f5f68 100644 --- a/packages/schedule/tool-schedule/package.json +++ b/packages/schedule/tool-schedule/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-schedule", "description": "Model-facing scheduled task tools (schedule_create, schedule_list, schedule_view, schedule_edit) over the Host ctx.schedule service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sdk/client/package.json b/packages/sdk/client/package.json index 6babc58c1e..d1edc99617 100644 --- a/packages/sdk/client/package.json +++ b/packages/sdk/client/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sdk-client", "description": "TypeScript client SDK for driving a DeepSeek Harness runtime subprocess over stdio JSON-RPC: the DeepSeekHarness high-level turns API and the lower-level HarnessClient", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sdk/protocol/package.json b/packages/sdk/protocol/package.json index 2cb56ea246..e79f016f28 100644 --- a/packages/sdk/protocol/package.json +++ b/packages/sdk/protocol/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sdk-protocol", "description": "Shared wire protocol for the DeepSeek Harness SDK runtime: the newline-delimited JSON-RPC stdio transport and the named request, result, and notification types spoken between the runtime server and SDK clients", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sdk/server/package.json b/packages/sdk/server/package.json index c73bd98219..21575b1eae 100644 --- a/packages/sdk/server/package.json +++ b/packages/sdk/server/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sdk-jsonrpc-server", "description": "Stdio JSON-RPC server plugin for out-of-process DeepSeek Harness SDK clients", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/sdk/server/src/index.ts b/packages/sdk/server/src/index.ts index 3fa3759550..974c2a122d 100644 --- a/packages/sdk/server/src/index.ts +++ b/packages/sdk/server/src/index.ts @@ -9,7 +9,7 @@ * @module @deepseek-ai/dsh-sdk-jsonrpc-server */ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import type { Readable, Writable } from 'node:stream' import Schema from '@deepseek-ai/schemastery' import { JsonRpcLineTransport } from '@deepseek-ai/dsh-sdk-protocol' @@ -47,7 +47,7 @@ export function apply(ctx: Context, config: JsonRpcConfig): void { const resolvedConfig = config as JsonRpcConfig & { maxTokensAsSuccess: boolean } // Protocol shutdown owns the complete runtime process, so it must await the // root lifecycle (including persistence) before exiting. - const rootFiber = ctx.root.fiber + const rootFiber = ctx[Context.root].fiber /* v8 ignore next -- production stdio wiring; tests always inject the runtime hooks */ const input = config.input ?? process.stdin /* v8 ignore next -- production stdio wiring; tests always inject the runtime hooks */ diff --git a/packages/session-query/session-log-export/package.json b/packages/session-query/session-log-export/package.json index d85dc6a845..66558bc370 100644 --- a/packages/session-query/session-log-export/package.json +++ b/packages/session-query/session-log-export/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-log-export", "description": "Web Session-log ZIP export and Session Markdown copy", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session-query/session-query-sqlite/package.json b/packages/session-query/session-query-sqlite/package.json index be35ad1095..dcf21fa559 100644 --- a/packages/session-query/session-query-sqlite/package.json +++ b/packages/session-query/session-query-sqlite/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-query-sqlite", "description": "Concrete ctx.sessionQuery backend with SQLite FTS5 search", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session-query/session-query/package.json b/packages/session-query/session-query/package.json index e867db1fd1..fbd651796b 100644 --- a/packages/session-query/session-query/package.json +++ b/packages/session-query/session-query/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-query", "description": "Combined session query service contract with concrete reads, traces, and filters", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/message-quotes/package.json b/packages/session/message-quotes/package.json index dd0d853ff4..a408698379 100644 --- a/packages/session/message-quotes/package.json +++ b/packages/session/message-quotes/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-message-quotes", "description": "Selected-text quotation and Markdown blockquote presentation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-checkpoint-policy/package.json b/packages/session/session-checkpoint-policy/package.json index f9f016d5bc..94daa77c0a 100644 --- a/packages/session/session-checkpoint-policy/package.json +++ b/packages/session/session-checkpoint-policy/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-checkpoint-policy", "description": "Semantic session durability checkpoints before model requests and tool side effects", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-format-catalog/package.json b/packages/session/session-format-catalog/package.json index 66e9fb9b73..9a6109fbf0 100644 --- a/packages/session/session-format-catalog/package.json +++ b/packages/session/session-format-catalog/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-format-catalog", "description": "Build-static first-party Session format codec and migration catalog", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-format-v0-to-v1/package.json b/packages/session/session-format-v0-to-v1/package.json index c6d23027eb..cdbd02c37b 100644 --- a/packages/session/session-format-v0-to-v1/package.json +++ b/packages/session/session-format-v0-to-v1/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-format-v0-to-v1", "description": "Frozen released-v0 Session codec and identity migration to v1", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-format-v1-to-v2/package.json b/packages/session/session-format-v1-to-v2/package.json index 1e4fcc7e4f..413d7caf07 100644 --- a/packages/session/session-format-v1-to-v2/package.json +++ b/packages/session/session-format-v1-to-v2/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-format-v1-to-v2", "description": "Frozen released-v1 Session codec and assistant-stream migration to v2", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-format-v2-to-v3/package.json b/packages/session/session-format-v2-to-v3/package.json index 6941c52f7c..65d8284d22 100644 --- a/packages/session/session-format-v2-to-v3/package.json +++ b/packages/session/session-format-v2-to-v3/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-format-v2-to-v3", "description": "Streaming system-prompt, canonical-envelope and PTC migration into V3", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-format-v3-to-v4/package.json b/packages/session/session-format-v3-to-v4/package.json index 774e3d816e..24189d7261 100644 --- a/packages/session/session-format-v3-to-v4/package.json +++ b/packages/session/session-format-v3-to-v4/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-format-v3-to-v4", "description": "Streaming tool-role migration and delivery validation from Session V3 to V4", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-format/package.json b/packages/session/session-format/package.json index 0e47189d5f..6347387d49 100644 --- a/packages/session/session-format/package.json +++ b/packages/session/session-format/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-format", "description": "Streaming adjacent Session format migration machinery", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-log-deepseek/package.json b/packages/session/session-log-deepseek/package.json index 3e17396de4..99fcfa48d1 100644 --- a/packages/session/session-log-deepseek/package.json +++ b/packages/session/session-log-deepseek/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-log-deepseek", "description": "Incremental lossless session-log request extension for the official DeepSeek LLM API", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-persistence-jsonl/package.json b/packages/session/session-persistence-jsonl/package.json index ae8703a8ca..a72d59bd1d 100644 --- a/packages/session/session-persistence-jsonl/package.json +++ b/packages/session/session-persistence-jsonl/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-persistence-jsonl", "description": "JSONL durable session persistence backend for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-persistence/package.json b/packages/session/session-persistence/package.json index 131600a5d6..72b13915af 100644 --- a/packages/session/session-persistence/package.json +++ b/packages/session/session-persistence/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-persistence", "description": "Abstract durable session persistence seam (ctx.sessionPersistence) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-projection-cache/package.json b/packages/session/session-projection-cache/package.json index eab855a225..163282d153 100644 --- a/packages/session/session-projection-cache/package.json +++ b/packages/session/session-projection-cache/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-projection-cache", "description": "Persisted projection cache (ctx.sessionProjectionCache): durable per-session checkpoint records on the session_projcache storage domain (per-record layout), throttled write-behind, and the cached listing read", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-projection/package.json b/packages/session/session-projection/package.json index b63c2ce654..114a9beb6a 100644 --- a/packages/session/session-projection/package.json +++ b/packages/session/session-projection/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-projection", "description": "Session-projection seam: the merge-extensible projection type table, the provider contract, and the ctx.sessionProjections registry serving whole current values of log-derived per-session state", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-stats/package.json b/packages/session/session-stats/package.json index 4e32d252d5..002423028e 100644 --- a/packages/session/session-stats/package.json +++ b/packages/session/session-stats/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-stats", "description": "Whole-log conversation counts and wall times projection (sessionStats) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-telemetry-otel/package.json b/packages/session/session-telemetry-otel/package.json index 247a43e47f..2a4f597037 100644 --- a/packages/session/session-telemetry-otel/package.json +++ b/packages/session/session-telemetry-otel/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-telemetry-otel", "description": "Feedback-authorized Session logs over byte-bounded OpenTelemetry HTTP requests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-telemetry/package.json b/packages/session/session-telemetry/package.json index 0daa3c1972..566bea8713 100644 --- a/packages/session/session-telemetry/package.json +++ b/packages/session/session-telemetry/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-telemetry", "description": "SessionTelemetryBackend seam for the DeepSeek Harness: session-event capture, projection, redaction, and handoff to a reporting backend", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-title-first-prompt-llm/package.json b/packages/session/session-title-first-prompt-llm/package.json index 3894286b4f..9cf4757885 100644 --- a/packages/session/session-title-first-prompt-llm/package.json +++ b/packages/session/session-title-first-prompt-llm/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-title-first-prompt-llm", "description": "First-message LLM provider plugin for DeepSeek Harness session titles", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-title-llm/package.json b/packages/session/session-title-llm/package.json index acaab7392d..b21d4a2862 100644 --- a/packages/session/session-title-llm/package.json +++ b/packages/session/session-title-llm/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-title-llm", "description": "Shared LLM generation policy for DeepSeek Harness session-title providers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-title/package.json b/packages/session/session-title/package.json index 46ad9ea249..ca020bcc1d 100644 --- a/packages/session/session-title/package.json +++ b/packages/session/session-title/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-title", "description": "Log-backed session title service and provider registry for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/session-turn-outline/package.json b/packages/session/session-turn-outline/package.json index f9646f05f3..68c9229920 100644 --- a/packages/session/session-turn-outline/package.json +++ b/packages/session/session-turn-outline/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-turn-outline", "description": "Whole-log turn outline projection (turnOutline) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/tool-working-directory/package.json b/packages/session/tool-working-directory/package.json index 045a7d2e7d..0009b77fe8 100644 --- a/packages/session/tool-working-directory/package.json +++ b/packages/session/tool-working-directory/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-working-directory", "description": "Read and change the active Session working directory", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/session/working-directory/package.json b/packages/session/working-directory/package.json index 97344e8a62..017cf1de89 100644 --- a/packages/session/working-directory/package.json +++ b/packages/session/working-directory/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-working-directory", "description": "Session working directories with durable changes and model context", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/settings/settings/package.json b/packages/settings/settings/package.json index 2cd2387fb9..eb4c30040d 100644 --- a/packages/settings/settings/package.json +++ b/packages/settings/settings/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-settings", "description": "Abstract user-settings seam (ctx.settings) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/settings/settings/src/index.ts b/packages/settings/settings/src/index.ts index 5e9a9cd59d..1fbcacce58 100644 --- a/packages/settings/settings/src/index.ts +++ b/packages/settings/settings/src/index.ts @@ -232,7 +232,7 @@ export class SettingsForms extends Service { const ctx = ownerContext ctx.effect(() => () => { this.closed = true }) ctx.on('app-boot/config-reload', () => { this.invalidate() }) - void ctx.root.loader.await().then(() => this.importLegacyDocument()).catch((error: unknown) => { ctx.logger.error(error) }) + void ctx[Context.root].loader.await().then(() => this.importLegacyDocument()).catch((error: unknown) => { ctx.logger.error(error) }) } /** Move the sections of the removed `settings.yaml` into the active profile once the Loader has settled every entry. diff --git a/packages/settings/settings/tests/profile-composition.ts b/packages/settings/settings/tests/profile-composition.ts index b0ba588749..fceb74a585 100644 --- a/packages/settings/settings/tests/profile-composition.ts +++ b/packages/settings/settings/tests/profile-composition.ts @@ -1,9 +1,8 @@ /** Mount source modules through a real profile, patch file, and reload coordinator. */ import { mkdir, readFile, writeFile } from 'node:fs/promises' import { join } from 'node:path' -import yaml from 'js-yaml' import type { Context } from '@deepseek-ai/cordis' -import { entryListSchema } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml, stringifyEntryYaml } from '@deepseek-ai/cordis-plugin-include' import type { EntryOptions } from '@deepseek-ai/cordis-plugin-loader' import Timer from '@deepseek-ai/cordis-plugin-timer' import { initProfile, mountRootInclude, readProfilePatches, type ProfileContext } from '@deepseek-ai/dsh-app-boot' @@ -19,9 +18,9 @@ export async function profileComposition(ctx: Context, home: string, baseFile: s await mkdir(bundle, { recursive: true }) await writeFile(join(home, 'package.json'), '{"name":"test-installation"}\n') await writeFile(join(bundle, 'package.json'), JSON.stringify({ name: 'test-profile-bundle', version: '1.0.0', dsh: { bundle: { patch: 'cordis.patch.yml' } } })) - const rows = yaml.load(await readFile(baseFile, 'utf8'), { schema: entryListSchema }) as EntryOptions[] + const rows = parseEntryYaml(await readFile(baseFile, 'utf8')) as EntryOptions[] for (const row of rows) row.id ??= row.name.replace('@deepseek-ai/dsh-', '') - await writeFile(join(bundle, 'cordis.patch.yml'), yaml.dump([{ insert: rows }], { schema: entryListSchema })) + await writeFile(join(bundle, 'cordis.patch.yml'), stringifyEntryYaml([{ insert: rows }])) await writeFile(join(dir, 'cordis.yml'), '[]\n') const profile: ProfileContext = { name: 'test', startedBundles: ['test-profile-bundle'], dir, patchPath: join(dir, 'cordis.patch.yml'), diff --git a/packages/shell/bash-local/package.json b/packages/shell/bash-local/package.json index 234ac92820..cfc9200efb 100644 --- a/packages/shell/bash-local/package.json +++ b/packages/shell/bash-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-bash-local", "description": "Local-subprocess implementation of the DeepSeek Harness bash executor seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/bash-sandbox/package.json b/packages/shell/bash-sandbox/package.json index b35fbff2e9..f3ce3ee1f3 100644 --- a/packages/shell/bash-sandbox/package.json +++ b/packages/shell/bash-sandbox/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-bash-sandbox", "description": "Sandbox-consuming implementation of the DeepSeek Harness bash executor seam (confines every command via ctx.sandbox, reports denial/enforcement result facts)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/pwsh-local/package.json b/packages/shell/pwsh-local/package.json index a407ac6a3e..15961cf3e1 100644 --- a/packages/shell/pwsh-local/package.json +++ b/packages/shell/pwsh-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-pwsh-local", "description": "Local PowerShell implementation of the DeepSeek Harness bash executor seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/pwsh-sandbox/package.json b/packages/shell/pwsh-sandbox/package.json index 8157ed9115..9be54a7ec6 100644 --- a/packages/shell/pwsh-sandbox/package.json +++ b/packages/shell/pwsh-sandbox/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-pwsh-sandbox", "description": "Sandbox-consuming implementation of the DeepSeek Harness PowerShell executor seam (confines every command via ctx.sandbox, reports denial/enforcement result facts)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/shell-env/package.json b/packages/shell/shell-env/package.json index 1f11ee3138..7743a6d5e0 100644 --- a/packages/shell/shell-env/package.json +++ b/packages/shell/shell-env/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-shell-env", "description": "Tool-independent managed DSH_* shell environment registry", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/shell/package.json b/packages/shell/shell/package.json index 257a507ed3..4d3086fb70 100644 --- a/packages/shell/shell/package.json +++ b/packages/shell/shell/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-shell", "description": "Abstract bash executor seam (ctx.shell) for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/tool-bash-persistent/package.json b/packages/shell/tool-bash-persistent/package.json index 9f5a221c1a..b8dac64de7 100644 --- a/packages/shell/tool-bash-persistent/package.json +++ b/packages/shell/tool-bash-persistent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-bash-persistent", "description": "Model-facing owner-scoped persistent Bash tool backed by the Harness PTY service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/tool-bash/package.json b/packages/shell/tool-bash/package.json index d7fe257778..c7dec25519 100644 --- a/packages/shell/tool-bash/package.json +++ b/packages/shell/tool-bash/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-bash", "description": "Model-facing bash tool with optional generic background-job and sandbox-escalation support", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/tool-pwsh-persistent/package.json b/packages/shell/tool-pwsh-persistent/package.json index 61682ff5a3..f1ba9360aa 100644 --- a/packages/shell/tool-pwsh-persistent/package.json +++ b/packages/shell/tool-pwsh-persistent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-pwsh-persistent", "description": "Model-facing owner-scoped persistent PowerShell tool backed by the Harness PTY service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/shell/tool-pwsh/package.json b/packages/shell/tool-pwsh/package.json index 33d4703711..70738a2372 100644 --- a/packages/shell/tool-pwsh/package.json +++ b/packages/shell/tool-pwsh/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-pwsh", "description": "Model-facing pwsh tool over the bash executor seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/skill/skill-filesystem/package.json b/packages/skill/skill-filesystem/package.json index 98b60d3f90..5d7aabac02 100644 --- a/packages/skill/skill-filesystem/package.json +++ b/packages/skill/skill-filesystem/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-skill-filesystem", "description": "Local filesystem skill provider for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/skill/skill-office/package.json b/packages/skill/skill-office/package.json index dd1790d794..071f551aa3 100644 --- a/packages/skill/skill-office/package.json +++ b/packages/skill/skill-office/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-skill-office", "description": "Bundled Word, PowerPoint, and Excel workflows and Office operation guidance", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/skill/skill/package.json b/packages/skill/skill/package.json index ca7c51dbca..4de29e7a0e 100644 --- a/packages/skill/skill/package.json +++ b/packages/skill/skill/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-skill", "description": "Agent skill provider registry for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/skill/tool-skill/package.json b/packages/skill/tool-skill/package.json index f0ba221809..f817569800 100644 --- a/packages/skill/tool-skill/package.json +++ b/packages/skill/tool-skill/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-skill", "description": "Model-facing skill loading tool for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/skill/tool-workspace-dependencies/package.json b/packages/skill/tool-workspace-dependencies/package.json index 5ca17d4a90..696360fc03 100644 --- a/packages/skill/tool-workspace-dependencies/package.json +++ b/packages/skill/tool-workspace-dependencies/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-workspace-dependencies", "description": "The load_workspace_dependencies tool: absolute paths into a bundled Python, Node.js, and pnpm payload", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/spill/spill-local/package.json b/packages/spill/spill-local/package.json index 9a179d6cce..67e1ebe0ff 100644 --- a/packages/spill/spill-local/package.json +++ b/packages/spill/spill-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-spill-local", "description": "Local-filesystem implementation of the DeepSeek Harness spill storage seam (private session-scoped files)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/spill/spill-policy/package.json b/packages/spill/spill-policy/package.json index 2c085a9092..2fa9f5aede 100644 --- a/packages/spill/spill-policy/package.json +++ b/packages/spill/spill-policy/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-spill-policy", "description": "Token-budgeted tool-result retention with recoverable text and image paths", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/spill/spill/package.json b/packages/spill/spill/package.json index 8d3fe6c42b..c302cebc34 100644 --- a/packages/spill/spill/package.json +++ b/packages/spill/spill/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-spill", "description": "Abstract spill storage seam (ctx.spillStore) for the DeepSeek Harness — save oversized tool text and return a retrieval locator", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/ssh/fs-ssh/package.json b/packages/ssh/fs-ssh/package.json index 53498fb14f..82c857fef5 100644 --- a/packages/ssh/fs-ssh/package.json +++ b/packages/ssh/fs-ssh/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-fs-ssh", "description": "Filesystem provider over the shared POSIX SSH helper", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/ssh/sandbox-ssh/package.json b/packages/ssh/sandbox-ssh/package.json index 9536e59c9f..17057f8e1d 100644 --- a/packages/ssh/sandbox-ssh/package.json +++ b/packages/ssh/sandbox-ssh/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-sandbox-ssh", "description": "Remote POSIX sandbox argv provider over the shared SSH helper", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/ssh/ssh-helper-runtime/package.json b/packages/ssh/ssh-helper-runtime/package.json index c7cc896be8..29a1af6939 100644 --- a/packages/ssh/ssh-helper-runtime/package.json +++ b/packages/ssh/ssh-helper-runtime/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-ssh-helper-runtime", "description": "Private executable carrier for the POSIX SSH helper and managed workers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "private": true, "type": "module", "main": "lib/index.js", diff --git a/packages/ssh/ssh/package.json b/packages/ssh/ssh/package.json index 64661584c7..9c61f4497d 100644 --- a/packages/ssh/ssh/package.json +++ b/packages/ssh/ssh/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-ssh", "description": "Shared OpenSSH connection and versioned POSIX remote helper", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/ssh/subprocess-ssh/package.json b/packages/ssh/subprocess-ssh/package.json index 3e6c6aa817..e227e04eb8 100644 --- a/packages/ssh/subprocess-ssh/package.json +++ b/packages/ssh/subprocess-ssh/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subprocess-ssh", "description": "Subprocess and terminal provider over the shared POSIX SSH helper", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/storage/storage-domain/package.json b/packages/storage/storage-domain/package.json index 326b973da3..26fb3edc7b 100644 --- a/packages/storage/storage-domain/package.json +++ b/packages/storage/storage-domain/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-storage-domain", "description": "Domain data form (ctx.storage.domain): schema-validated, event-emitting KV domains over storage backends for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/storage/storage-json/package.json b/packages/storage/storage-json/package.json index f2c7384bd1..48a43ec88e 100644 --- a/packages/storage/storage-json/package.json +++ b/packages/storage/storage-json/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-storage-json", "description": "JSON file KV storage backend for the DeepSeek Harness storage hub", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/storage/storage-sqlite/package.json b/packages/storage/storage-sqlite/package.json index e5e11224b8..c62872e52a 100644 --- a/packages/storage/storage-sqlite/package.json +++ b/packages/storage/storage-sqlite/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-storage-sqlite", "description": "SQLite storage backend (kv facet) for the DeepSeek Harness storage hub", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/storage/storage/package.json b/packages/storage/storage/package.json index fe0fed22cf..c1f41a6ddb 100644 --- a/packages/storage/storage/package.json +++ b/packages/storage/storage/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-storage", "description": "Storage hub (ctx.storage): named backend registry plus mounted data-form facilities for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/subagent-acp/package.json b/packages/subagent/subagent-acp/package.json index 90a0b1faac..782a7ddf59 100644 --- a/packages/subagent/subagent-acp/package.json +++ b/packages/subagent/subagent-acp/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent-acp", "description": "Out-of-process ACP subagent backend: drives a child agent in a spawned subprocess over the Agent Client Protocol", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/subagent-claude-code/package.json b/packages/subagent/subagent-claude-code/package.json index b94188adec..a71b9dcd51 100644 --- a/packages/subagent/subagent-claude-code/package.json +++ b/packages/subagent/subagent-claude-code/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent-claude-code", "description": "One-shot Claude Code subagent provider over the official Agent SDK", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -58,6 +58,7 @@ }, "devDependencies": { "@deepseek-ai/cordis": "workspace:~", + "@deepseek-ai/cordis-plugin-include": "workspace:~", "@deepseek-ai/dsh-agent": "workspace:*", "@deepseek-ai/dsh-app-boot": "workspace:*", "@deepseek-ai/dsh-llm": "workspace:*", diff --git a/packages/subagent/subagent-claude-code/tests/subagent-claude-code.spec.ts b/packages/subagent/subagent-claude-code/tests/subagent-claude-code.spec.ts index 53af128a5d..8e7d384d9b 100644 --- a/packages/subagent/subagent-claude-code/tests/subagent-claude-code.spec.ts +++ b/packages/subagent/subagent-claude-code/tests/subagent-claude-code.spec.ts @@ -15,7 +15,7 @@ import type { } from '@anthropic-ai/claude-agent-sdk' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' -import * as yaml from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { afterEach, beforeEach, @@ -392,7 +392,7 @@ describe('task admission and package contracts', () => { ) } - const parsed = yaml.load(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) + const parsed = parseEntryYaml(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) expect(parsed).toEqual([{ insert: [ { id: 'subagent-claude-code', name: '@deepseek-ai/dsh-subagent-claude-code' }, { id: 'tool-subagent-claude-code', name: '@deepseek-ai/dsh-tool-subagent', config: { diff --git a/packages/subagent/subagent-codex/package.json b/packages/subagent/subagent-codex/package.json index ec7dbb511c..da28189df0 100644 --- a/packages/subagent/subagent-codex/package.json +++ b/packages/subagent/subagent-codex/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent-codex", "description": "One-shot Codex subagent provider over the official app-server protocol", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -56,6 +56,7 @@ }, "devDependencies": { "@deepseek-ai/cordis": "workspace:~", + "@deepseek-ai/cordis-plugin-include": "workspace:~", "@deepseek-ai/cordis-plugin-loader": "workspace:~", "@deepseek-ai/dsh-agent": "workspace:*", "@deepseek-ai/dsh-app-boot": "workspace:*", diff --git a/packages/subagent/subagent-codex/tests/subagent-codex.spec.ts b/packages/subagent/subagent-codex/tests/subagent-codex.spec.ts index 4e267275f5..7dbb71fb64 100644 --- a/packages/subagent/subagent-codex/tests/subagent-codex.spec.ts +++ b/packages/subagent/subagent-codex/tests/subagent-codex.spec.ts @@ -7,7 +7,7 @@ import { PassThrough } from 'node:stream' import { fileURLToPath } from 'node:url' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' -import * as yaml from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' import { describe, expect, it, vi } from 'vitest' import type { Agent } from '@deepseek-ai/dsh-agent' import type { ContentBlock } from '@deepseek-ai/dsh-llm' @@ -405,7 +405,7 @@ describe('task admission and package contracts', () => { ) } - const parsed = yaml.load(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) + const parsed = parseEntryYaml(readFileSync(resolve(root, manifest.dsh!.bundle!.patch!), 'utf8')) expect(parsed).toEqual([{ insert: [ { id: 'subagent-codex', name: '@deepseek-ai/dsh-subagent-codex' }, { id: 'tool-subagent-codex', name: '@deepseek-ai/dsh-tool-subagent', config: { diff --git a/packages/subagent/subagent-dsh-sdk/package.json b/packages/subagent/subagent-dsh-sdk/package.json index b4315fb7bf..09e02a2f85 100644 --- a/packages/subagent/subagent-dsh-sdk/package.json +++ b/packages/subagent/subagent-dsh-sdk/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent-dsh-sdk", "description": "Out-of-process SDK subagent backend: drives a child DeepSeek Harness runtime subprocess over stdio JSON-RPC through the TypeScript SDK client", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/subagent-fork-in-process/package.json b/packages/subagent/subagent-fork-in-process/package.json index 2fe43ada40..b465660b01 100644 --- a/packages/subagent/subagent-fork-in-process/package.json +++ b/packages/subagent/subagent-fork-in-process/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent-fork-in-process", "description": "In-process fork subagent backend: runs a child agent seeded with a prefix of the parent's log", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/subagent-spawn-in-process/package.json b/packages/subagent/subagent-spawn-in-process/package.json index 27bcac9976..4d9d31a7d2 100644 --- a/packages/subagent/subagent-spawn-in-process/package.json +++ b/packages/subagent/subagent-spawn-in-process/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent-spawn-in-process", "description": "In-process spawn subagent backend: runs a fresh child agent on ctx.agents", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/subagent/package.json b/packages/subagent/subagent/package.json index cbb192d1be..2a39a6486f 100644 --- a/packages/subagent/subagent/package.json +++ b/packages/subagent/subagent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subagent", "description": "Abstract subagent seam (ctx.subagents): named-provider registry for delegating to child agents", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/tool-subagent-control/package.json b/packages/subagent/tool-subagent-control/package.json index 6bb5be6d8c..d5aaeebdb1 100644 --- a/packages/subagent/tool-subagent-control/package.json +++ b/packages/subagent/tool-subagent-control/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-subagent-control", "description": "Shared messaging, interruption, and child discovery tools for subagents", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subagent/tool-subagent/package.json b/packages/subagent/tool-subagent/package.json index 1e7ff3cc51..a943f4822b 100644 --- a/packages/subagent/tool-subagent/package.json +++ b/packages/subagent/tool-subagent/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-subagent", "description": "Model-facing subagent delegation tool over the ctx.subagents seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subprocess/subprocess-local/package.json b/packages/subprocess/subprocess-local/package.json index ed28472c72..07e54bb626 100644 --- a/packages/subprocess/subprocess-local/package.json +++ b/packages/subprocess/subprocess-local/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subprocess-local", "description": "Local-subprocess implementation of the DeepSeek Harness subprocess seam", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subprocess/subprocess/package.json b/packages/subprocess/subprocess/package.json index 2b42715a67..deebabfe9d 100644 --- a/packages/subprocess/subprocess/package.json +++ b/packages/subprocess/subprocess/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-subprocess", "description": "Subprocess seam (ctx.subprocess) for the DeepSeek Harness \u2014 managed process groups, bounded spill-backed output, and escalated kills behind one abstract service", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/subprocess/win32-process/package.json b/packages/subprocess/win32-process/package.json index 24968330fe..54e85044d3 100644 --- a/packages/subprocess/win32-process/package.json +++ b/packages/subprocess/win32-process/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-win32-process", "description": "Shared low-level Win32 process, stdio, and Job Object primitives", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/team/agent-team/package.json b/packages/team/agent-team/package.json index 52289a6345..2a6421d368 100644 --- a/packages/team/agent-team/package.json +++ b/packages/team/agent-team/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-team", "description": "Shared task DAG and change waits for subagent trees", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/team/tool-agent-team/package.json b/packages/team/tool-agent-team/package.json index bdf45dcb45..c7b49cef2d 100644 --- a/packages/team/tool-agent-team/package.json +++ b/packages/team/tool-agent-team/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-agent-team", "description": "Scoped model-facing Agent Teams tools over ctx.agentTeams", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/telemetry/otel/package.json b/packages/telemetry/otel/package.json index 3976fa9e82..1d223cc8c6 100644 --- a/packages/telemetry/otel/package.json +++ b/packages/telemetry/otel/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-otel", "description": "Cordis service for independent ordinary-event and byte-bounded Session-log OTLP channels", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/terminal/terminal-bash/package.json b/packages/terminal/terminal-bash/package.json index b15e801c13..fb866311c0 100644 --- a/packages/terminal/terminal-bash/package.json +++ b/packages/terminal/terminal-bash/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-terminal-bash", "description": "Persistent shell PTY backend over the DeepSeek Harness subprocess terminal primitive", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/terminal/terminal/package.json b/packages/terminal/terminal/package.json index 0b79cf0785..c349ca87e1 100644 --- a/packages/terminal/terminal/package.json +++ b/packages/terminal/terminal/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-terminal", "description": "Persistent PTY session seam for the DeepSeek Harness — owner-scoped ids, backend registry, interactive sends, reads, signals, and awaited cleanup", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/agent-loop-testkit/package.json b/packages/test-support/agent-loop-testkit/package.json index f65234a281..dc3d2ddca9 100644 --- a/packages/test-support/agent-loop-testkit/package.json +++ b/packages/test-support/agent-loop-testkit/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-agent-loop-testkit", "description": "Prerequisite mounting, production AgentLoop drivers, and Inbox stubs for tests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/client-runtime/package.json b/packages/test-support/client-runtime/package.json index e4092a7927..f20d9bfb91 100644 --- a/packages/test-support/client-runtime/package.json +++ b/packages/test-support/client-runtime/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-client-test-runtime", "description": "Browser test runtimes: a jsdom slot bench with test-owned Session and Workspace doubles, and a whole-client tier that boots the web roster through the production bootClient over an endpoint-named Remote mock", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, @@ -25,7 +25,6 @@ "dependencies": { "@testing-library/dom": "^10.4.1", "@testing-library/react": "^16.3.3", - "js-yaml": "^4.3.2", "vitest": "^4.1.11" }, "peerDependencies": { @@ -89,7 +88,6 @@ "@deepseek-ai/dsh-subagent": "workspace:*", "@deepseek-ai/dsh-typert-protocol": "workspace:*", "@deepseek-ai/dsh-web-app": "workspace:*", - "@types/js-yaml": "^4.0.9", "react": "^18.2.0", "react-dom": "^18.2.0", "@deepseek-ai/dsh-client-ui-context-menu": "workspace:*" diff --git a/packages/test-support/client-runtime/src/assembly/bundle-roster.ts b/packages/test-support/client-runtime/src/assembly/bundle-roster.ts index d268bbc84c..d31ab8c876 100644 --- a/packages/test-support/client-runtime/src/assembly/bundle-roster.ts +++ b/packages/test-support/client-runtime/src/assembly/bundle-roster.ts @@ -1,7 +1,7 @@ /** * The browser roster of a `dsh --profile`, read from its bundle patch files * the way the launcher composes them: each bundle's `dsh.bundle.patch` file list is - * parsed with the include plugin's YAML dialect (`entryListSchema`) and + * parsed with the include plugin's `parseEntryYaml` and * composed by its `applyEntryPatches`; every enabled row whose package * declares `dsh.client.platform === 'web'` becomes a roster row carrying that * declaration's `inject` and `immediately`; rows nested in Loader groups count @@ -18,9 +18,8 @@ import { createRequire } from 'node:module' import { basename, dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' import { evaluate, isJsExpr, type EntryOptions } from '@deepseek-ai/cordis-plugin-loader' -import { applyEntryPatches, entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' +import { applyEntryPatches, parseEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import { exactPackageSpecifier, parseDshClient } from '@deepseek-ai/dsh-client-modules/client' -import * as yaml from 'js-yaml' import { ClientRoster, type ClientRosterRow } from './roster.ts' /** @@ -96,7 +95,7 @@ function readLayer(bundle: string, anchor: string): BundleLayer { } const patches = files.flatMap((patch) => { const file = join(dirname(manifestPath), patch) - const parsed: unknown = yaml.load(readFileSync(file, 'utf8'), { schema: entryListSchema }) + const parsed: unknown = parseEntryYaml(readFileSync(file, 'utf8')) if (!Array.isArray(parsed)) throw new Error(`client-test-runtime: ${file} must be a top-level list of patches`) return parsed as PatchOptions[] }) diff --git a/packages/test-support/llm-mock-server/package.json b/packages/test-support/llm-mock-server/package.json index 47a03fdefe..b3bd0beafe 100644 --- a/packages/test-support/llm-mock-server/package.json +++ b/packages/test-support/llm-mock-server/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-mock-server", "description": "Scriptable Messages HTTP/SSE fault server for LLM recovery tests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/llm-replay/package.json b/packages/test-support/llm-replay/package.json index 048caf12a1..36624c49d2 100644 --- a/packages/test-support/llm-replay/package.json +++ b/packages/test-support/llm-replay/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-llm-replay", "description": "Replay LLM plugin: short-circuits llm/stream with model chunks reconstructed from a recorded session JSONL (keyless snapshot tests)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/loader-smoke/package.json b/packages/test-support/loader-smoke/package.json index 82769b2f94..93f13b28ee 100644 --- a/packages/test-support/loader-smoke/package.json +++ b/packages/test-support/loader-smoke/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-loader-smoke", "description": "Shared subprocess and direct-agent harness for keyless real-Loader example smoke tests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/remote-mock/package.json b/packages/test-support/remote-mock/package.json index 37a77f8a81..2e6dae112a 100644 --- a/packages/test-support/remote-mock/package.json +++ b/packages/test-support/remote-mock/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-remote-mock", "description": "Endpoint-named mock for Typert Remote traffic: unary answers and stream scripts per /, live stream control, a log, and the Connection carrier face whole-client specs install", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/session-snapshot/package.json b/packages/test-support/session-snapshot/package.json index 2118e73ee1..d519d057d8 100644 --- a/packages/test-support/session-snapshot/package.json +++ b/packages/test-support/session-snapshot/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-session-snapshot", "description": "Session-log snapshot core with an ACP protocol adapter, expected-output normalization, and fixture invariants", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/test-support/session-snapshot/src/launcher.ts b/packages/test-support/session-snapshot/src/launcher.ts index a99ecac2c0..3524da3347 100644 --- a/packages/test-support/session-snapshot/src/launcher.ts +++ b/packages/test-support/session-snapshot/src/launcher.ts @@ -13,7 +13,6 @@ import { createRequire } from 'node:module' import { basename, dirname, join, resolve } from 'node:path' import { Readable, Writable } from 'node:stream' import { pathToFileURL } from 'node:url' -import * as yaml from 'js-yaml' import { client as createAcpClientApp, methods, @@ -37,7 +36,7 @@ import { type SetSessionConfigOptionResponse, type SessionNotification, } from '@agentclientprotocol/sdk' -import { entryListSchema, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' +import { parseEntryYaml, stringifyEntryYaml, type PatchOptions } from '@deepseek-ai/cordis-plugin-include' import { resolveExampleLaunch } from '@deepseek-ai/dsh-loader-smoke' const EXIT_MARKER_GRACE_MS = 250 @@ -417,7 +416,7 @@ function linkProfilePackage(source: string, cwd: string, profile: string, packag export function materializeProfilePatch( source: string, cwd: string, profile: string, targetDir: string, index: number, ): string { - const parsed = yaml.load(readFileSync(source, 'utf8'), { schema: entryListSchema }) + const parsed = parseEntryYaml(readFileSync(source, 'utf8')) if (!Array.isArray(parsed)) throw new Error(`snapshot profile patch must be a top-level array: ${source}`) const patches = parsed as PatchOptions[] const baseDir = dirname(source) @@ -439,7 +438,7 @@ export function materializeProfilePatch( for (const entry of patch.insert ?? []) visitEntry(entry) } const target = join(targetDir, `${String(index)}-${basename(source)}`) - writeFileSync(target, yaml.dump(patches, { schema: entryListSchema, lineWidth: -1, noRefs: true })) + writeFileSync(target, stringifyEntryYaml(patches, { lineWidth: -1 })) return target } diff --git a/packages/test-support/session-snapshot/tests/fixtures/subagent-send-message-fence.ts b/packages/test-support/session-snapshot/tests/fixtures/subagent-send-message-fence.ts index f8a931a3a5..7f0cd70f28 100644 --- a/packages/test-support/session-snapshot/tests/fixtures/subagent-send-message-fence.ts +++ b/packages/test-support/session-snapshot/tests/fixtures/subagent-send-message-fence.ts @@ -4,7 +4,7 @@ * @module subagent-send-message-fence */ -import type { Context } from '@deepseek-ai/cordis' +import { Context } from '@deepseek-ai/cordis' import type {} from '@deepseek-ai/dsh-agent-loop' /** Fixture plugin name. */ @@ -23,12 +23,12 @@ export function apply(ctx: Context): void { let parentMaintenance: Promise | undefined ctx.effect(() => { - const disposeSession = ctx.root.on('session/event', (session, event) => { + const disposeSession = ctx[Context.root].on('session/event', (session, event) => { if (session.header.parentSession !== undefined || event.type !== 'turn/end' || event.data.turn !== 1) return hasStopped = true parentStopped.resolve(undefined) }) - const disposeStatus = ctx.root.on('agent/status', ({ agent, status }) => { + const disposeStatus = ctx[Context.root].on('agent/status', ({ agent, status }) => { if ( agent.session.header.parentSession === undefined && status === 'idle' && @@ -40,7 +40,7 @@ export function apply(ctx: Context): void { }) } }) - const disposeInbox = ctx.root.on('agent/inbox/inserted', ({ agent, message }) => { + const disposeInbox = ctx[Context.root].on('agent/inbox/inserted', ({ agent, message }) => { if ( agent.session.header.parentSession === undefined && message.source.kind === 'subagent-settled' @@ -48,7 +48,7 @@ export function apply(ctx: Context): void { childSettled.resolve(undefined) } }) - const disposeStep = ctx.root.on('agent/pre-step', async ({ agent, turn, step }, next) => { + const disposeStep = ctx[Context.root].on('agent/pre-step', async ({ agent, turn, step }, next) => { if (agent.session.header.parentSession !== undefined) { childReady.resolve(undefined) if (!hasStopped) await parentStopped.promise diff --git a/packages/test-support/tool-testkit/package.json b/packages/test-support/tool-testkit/package.json index 806974df21..3f21fdc51a 100644 --- a/packages/test-support/tool-testkit/package.json +++ b/packages/test-support/tool-testkit/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-testkit", "description": "Tool definition and execution fixtures for tests and benchmarks", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/todo/tool-todo/package.json b/packages/todo/tool-todo/package.json index d99c3d892e..59b2d3a78b 100644 --- a/packages/todo/tool-todo/package.json +++ b/packages/todo/tool-todo/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-todo", "description": "Model-facing todo_write tool over the DeepSeek Harness event-sourced session log", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/typert/generator/package.json b/packages/typert/generator/package.json index 246c4b7cd8..0e9ecc407c 100644 --- a/packages/typert/generator/package.json +++ b/packages/typert/generator/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-typert-generator", "description": "TypeScript project analyzer and model-driven Typert artifact generator", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/typert/generator/tests/cordis-catalog.spec.ts b/packages/typert/generator/tests/cordis-catalog.spec.ts index e60709fa3c..10ce9a5d92 100644 --- a/packages/typert/generator/tests/cordis-catalog.spec.ts +++ b/packages/typert/generator/tests/cordis-catalog.spec.ts @@ -34,7 +34,7 @@ const SOURCE_LINK_POLICY: CordisCatalogPolicy = { foundationTypeNames: new Set(), typeLinkExemptions: {}, inheritedEvents: [{ name: 'ready', summary: 'Ready.', source: 'vendor/cordis/src/events.ts:9' }], - inheritedServices: [{ name: 'ctx.root', summary: 'Root.', source: 'vendor/cordis/src/context.ts:12' }], + inheritedServices: [{ name: 'ctx.events', summary: 'Events.', source: 'vendor/cordis/src/context.ts:12' }], } describe('Typert-backed Cordis catalog', () => { diff --git a/packages/typert/loader/package.json b/packages/typert/loader/package.json index 265d80716d..e1e2921b59 100644 --- a/packages/typert/loader/package.json +++ b/packages/typert/loader/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-typert-loader", "description": "Loader integration for generated Typert package contributions", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/typert/protocol/package.json b/packages/typert/protocol/package.json index 93f334cf3d..9a2e1daeb7 100644 --- a/packages/typert/protocol/package.json +++ b/packages/typert/protocol/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-typert-protocol", "description": "Compiler-independent Remote metadata and Typert provider protocols", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/typert/protocol/src/index.ts b/packages/typert/protocol/src/index.ts index 7972cd5ef6..e6375e6659 100644 --- a/packages/typert/protocol/src/index.ts +++ b/packages/typert/protocol/src/index.ts @@ -270,8 +270,8 @@ export abstract class TypertRemoteService extends Service { * tree registers it on the root, where it outlives any one Service. */ function provideInvocationAccessor(ctx: Context): void { - if (Object.hasOwn(ctx.root.reflect.props, 'invocation')) return - ctx.root.accessor('invocation', { get: () => undefined }) + if (Object.hasOwn(ctx[Context.root].reflect.props, 'invocation')) return + ctx[Context.root].accessor('invocation', { get: () => undefined }) } /** diff --git a/packages/typert/registry/package.json b/packages/typert/registry/package.json index 86fee8874b..5918ef5a7b 100644 --- a/packages/typert/registry/package.json +++ b/packages/typert/registry/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-typert-registry", "description": "Runtime registry for generated package reflection and Zod schemas", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/atomic-write/package.json b/packages/util/atomic-write/package.json index 46b1b1b3b2..4d6a8a70af 100644 --- a/packages/util/atomic-write/package.json +++ b/packages/util/atomic-write/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-atomic-write", "description": "Atomic file replacement: exclusive-create random-suffix temp + rename carrying the caller-stated permissions (writeFileAtomic)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/brand/package.json b/packages/util/brand/package.json index 734ca10196..685ec6830e 100644 --- a/packages/util/brand/package.json +++ b/packages/util/brand/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-brand", "description": "Stateless branded primitive types for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/chunked-list/package.json b/packages/util/chunked-list/package.json index 36fa5c37f3..621f1e84ab 100644 --- a/packages/util/chunked-list/package.json +++ b/packages/util/chunked-list/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-chunked-list", "description": "Persistent append-only chunked lists with bounded copying and JSON checkpoint validation", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/code-language/package.json b/packages/util/code-language/package.json index fa1c81dd1d..31e9f7122c 100644 --- a/packages/util/code-language/package.json +++ b/packages/util/code-language/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-code-language", "description": "Single file-extension to syntax-highlighting language table shared by Client code surfaces and the Host read card", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/crypto/package.json b/packages/util/crypto/package.json index 5e021f334e..aaf8b1ed3e 100644 --- a/packages/util/crypto/package.json +++ b/packages/util/crypto/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-crypto", "description": "Zero-dependency browser-safe UUID and byte-encoding helpers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/deque/package.json b/packages/util/deque/package.json index 1082bf3294..8e6fac3e2d 100644 --- a/packages/util/deque/package.json +++ b/packages/util/deque/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-deque", "description": "Zero-dependency circular deque with amortized constant-time end operations and bounded vacant storage", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/error/package.json b/packages/util/error/package.json index 0577152ab6..01fce53185 100644 --- a/packages/util/error/package.json +++ b/packages/util/error/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-error", "description": "Dependency-free HarnessError base class with a stable machine-routable code for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/file-drag/package.json b/packages/util/file-drag/package.json index ededdbe428..32768b0a3d 100644 --- a/packages/util/file-drag/package.json +++ b/packages/util/file-drag/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-file-drag", "description": "Shared file drag names and native transfer requests", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/home-paths/package.json b/packages/util/home-paths/package.json index 9f814be031..749642b750 100644 --- a/packages/util/home-paths/package.json +++ b/packages/util/home-paths/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-home-paths", "description": "Shared filesystem path helpers for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/http-proxy/package.json b/packages/util/http-proxy/package.json index 8f71e1670a..c30949adae 100644 --- a/packages/util/http-proxy/package.json +++ b/packages/util/http-proxy/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-http-proxy", "description": "Process-wide outbound HTTP proxy policy for DeepSeek Harness: resolve it from the launch environment and install it as undici's global dispatcher", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/launch-environment/package.json b/packages/util/launch-environment/package.json index 6c8beaed67..ea84d537f2 100644 --- a/packages/util/launch-environment/package.json +++ b/packages/util/launch-environment/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-launch-environment", "description": "Immutable DeepSeek Harness launch environment that records which layer supplied each value", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/lazy-require/package.json b/packages/util/lazy-require/package.json index 0b550529e6..9e0f23b63a 100644 --- a/packages/util/lazy-require/package.json +++ b/packages/util/lazy-require/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-lazy-require", "description": "Caller-relative, success-cached lazy loading for CommonJS-compatible Host dependencies", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/native-command/package.json b/packages/util/native-command/package.json index c82e69156a..45c6ef14d7 100644 --- a/packages/util/native-command/package.json +++ b/packages/util/native-command/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-native-command", "description": "Host-native command and path-opening utilities with shell-free execution, cancellation, desktop detection, and WSL handoff", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/official-bundles/package.json b/packages/util/official-bundles/package.json index 0fe0c11d6f..61dfec02a9 100644 --- a/packages/util/official-bundles/package.json +++ b/packages/util/official-bundles/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-official-bundles", "description": "Installation-owned lists of official dsh bundles (shipped profile templates, optional, on-demand, and retired bundles) and the plugin manager's protected and presented packages", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/output-retention/package.json b/packages/util/output-retention/package.json index c76d9227ac..8ecfc30297 100644 --- a/packages/util/output-retention/package.json +++ b/packages/util/output-retention/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-output-retention", "description": "Zero-dependency bounded-retention primitive: ItemRetainer/TextRetainer + neutral notice helpers (what did we keep, what did we omit)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/package-manifest/package.json b/packages/util/package-manifest/package.json index 8609616013..7b205abd07 100644 --- a/packages/util/package-manifest/package.json +++ b/packages/util/package-manifest/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-package-manifest", "description": "Shared type declarations for package.json.dsh configuration fields", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/plugin-detail/package.json b/packages/util/plugin-detail/package.json index a26e1f90f3..0f0a00f642 100644 --- a/packages/util/plugin-detail/package.json +++ b/packages/util/plugin-detail/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-detail", "description": "Plugin detail documents: meta.detail or README selection, image paths, and local and npm CDN file sources", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/plugin-market-index/package.json b/packages/util/plugin-market-index/package.json index 38f5f28286..fecabf8848 100644 --- a/packages/util/plugin-market-index/package.json +++ b/packages/util/plugin-market-index/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-plugin-market-index", "description": "Plugin market index format 1: JSON validation, relative icon resolution, and pinned install arguments", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/ripgrep/package.json b/packages/util/ripgrep/package.json index 8f37224b38..97ac4d51b7 100644 --- a/packages/util/ripgrep/package.json +++ b/packages/util/ripgrep/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-ripgrep", "description": "Packaged ripgrep resolution and subprocess streaming helpers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/text-search/package.json b/packages/util/text-search/package.json index ddd1ff2170..cbdf75475f 100644 --- a/packages/util/text-search/package.json +++ b/packages/util/text-search/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-text-search", "description": "Multilingual fuzzy filtering for in-memory search lists", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/time/package.json b/packages/util/time/package.json index fab434f550..7421c8ae99 100644 --- a/packages/util/time/package.json +++ b/packages/util/time/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-time", "description": "Strict instant and IANA zone parsing, millisecond spans, and bounded Cron/RRULE recurrence arithmetic", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/timeout/package.json b/packages/util/timeout/package.json index 2d79b453b8..0f61e8d66b 100644 --- a/packages/util/timeout/package.json +++ b/packages/util/timeout/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-timeout", "description": "Zero-dependency timeout/deadline primitive: clampTimeout, deadline, timeoutOf, TimeoutReason (timing + classification only, no termination)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/values/package.json b/packages/util/values/package.json index d70d00195e..d7c395b701 100644 --- a/packages/util/values/package.json +++ b/packages/util/values/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-values", "description": "Duplicate-install-safe value primitives for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/util/workspace-path/package.json b/packages/util/workspace-path/package.json index 7d59db5f9a..4a0a30b393 100644 --- a/packages/util/workspace-path/package.json +++ b/packages/util/workspace-path/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-util-workspace-path", "description": "Browser-safe Workspace path and display helpers", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/web/tool-web/package.json b/packages/web/tool-web/package.json index 51945196ca..0a3371ad87 100644 --- a/packages/web/tool-web/package.json +++ b/packages/web/tool-web/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-web", "description": "Model-facing web tools (web_search, web_fetch) over the DeepSeek Harness web capability seam (ctx.web)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/web/web-deepseek-api/package.json b/packages/web/web-deepseek-api/package.json index c218fd53b6..5e2a6ef624 100644 --- a/packages/web/web-deepseek-api/package.json +++ b/packages/web/web-deepseek-api/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-web-deepseek-api", "description": "DeepSeek Search and Fetch API providers for the DeepSeek Harness web capability seam (ctx.web)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/web/web-fetch-http/package.json b/packages/web/web-fetch-http/package.json index bbb83df64f..229a680a8d 100644 --- a/packages/web/web-fetch-http/package.json +++ b/packages/web/web-fetch-http/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-web-fetch-http", "description": "Anonymous HTTP(S) fetch provider for the DeepSeek Harness web capability seam (ctx.web)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/web/web-search-deepseek/package.json b/packages/web/web-search-deepseek/package.json index 81661b2b84..334b695638 100644 --- a/packages/web/web-search-deepseek/package.json +++ b/packages/web/web-search-deepseek/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-web-search-deepseek", "description": "DeepSeek-backed search provider (native web_search via the Anthropic-compatible API) for the DeepSeek Harness web capability seam (ctx.web)", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/web/web/package.json b/packages/web/web/package.json index e7666bdc63..7eb508c4c4 100644 --- a/packages/web/web/package.json +++ b/packages/web/web/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-web", "description": "Abstract web access capability seam (ctx.web) for the DeepSeek Harness — search/fetch provider registry, registration-order-independent selection, request/result vocabulary, and the WebError taxonomy", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/workflow/tool-workflow/package.json b/packages/workflow/tool-workflow/package.json index 7839090cbb..cb2d4a2bb4 100644 --- a/packages/workflow/tool-workflow/package.json +++ b/packages/workflow/tool-workflow/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-tool-workflow", "description": "Model-facing workflow tool: run a JavaScript orchestration script over ctx.workflowEngine", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/workflow/workflow-ptc/package.json b/packages/workflow/workflow-ptc/package.json index 225331aaa5..8303a8919c 100644 --- a/packages/workflow/workflow-ptc/package.json +++ b/packages/workflow/workflow-ptc/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-workflow-ptc", "description": "Workflow orchestration in the shared sandboxed Node PTC runtime", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/workflow/workflow/package.json b/packages/workflow/workflow/package.json index 740bee4a54..e8b95ddd4d 100644 --- a/packages/workflow/workflow/package.json +++ b/packages/workflow/workflow/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-workflow", "description": "Workflow capability seam: ctx.workflowEngine service, run vocabulary, and workflow/* events", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/packages/workspace/workspace/package.json b/packages/workspace/workspace/package.json index 1a00f56088..0ac71bbffa 100644 --- a/packages/workspace/workspace/package.json +++ b/packages/workspace/workspace/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-ai/dsh-workspace", "description": "Workspace entity registry (ctx.workspaceRegistry): durable workspace records with validated session attachment over the domain data form for the DeepSeek Harness", - "version": "0.2.2-rc.2", + "version": "0.2.2-rc.3", "publishConfig": { "access": "public" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 418ae860a9..680fd27625 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2103,9 +2103,6 @@ importers: ajv: specifier: ^8.20.0 version: 8.20.0 - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 node-addon-require-builtin: specifier: ^0.1.9 version: 0.1.9 @@ -2143,9 +2140,6 @@ importers: '@deepseek-ai/schemastery': specifier: link:../../../vendor/schemastery version: link:../../../vendor/schemastery - '@types/js-yaml': - specifier: ^4.0.9 - version: 4.0.9 '@types/semver': specifier: ^7.8.0 version: 7.8.0 @@ -2170,9 +2164,6 @@ importers: '@deepseek-ai/dsh-atomic-write': specifier: workspace:* version: link:../../util/atomic-write - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 yaml: specifier: ^2.8.1 version: 2.9.0 @@ -2192,9 +2183,6 @@ importers: '@deepseek-ai/dsh-hmr': specifier: workspace:* version: link:../hmr - '@types/js-yaml': - specifier: ^4.0.9 - version: 4.0.9 packages/boot/hmr: dependencies: @@ -10422,9 +10410,6 @@ importers: '@deepseek-ai/cordis-plugin-loader': specifier: workspace:~ version: link:../../../vendor/loader - js-yaml: - specifier: ^4.2.0 - version: 4.3.2 optionalDependencies: '@deepseek-ai/dsh-cua-macos': specifier: workspace:* @@ -10674,9 +10659,6 @@ importers: '@modelcontextprotocol/client': specifier: 2.2.0 version: 2.2.0 - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 optionalDependencies: '@deepseek-ai/dsh-cua-macos': specifier: workspace:* @@ -11333,9 +11315,6 @@ importers: '@deepseek-ai/cordis-plugin-include': specifier: workspace:~ version: link:../../../vendor/include - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 packages/experimental/liveshare: dependencies: @@ -11669,9 +11648,6 @@ importers: '@deepseek-ai/dsh-tools': specifier: workspace:* version: link:../../core/tools - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 packages/experimental/plugin-market-bundle: dependencies: @@ -12716,9 +12692,6 @@ importers: '@deepseek-ai/dsh-session-format-v3-to-v4': specifier: workspace:* version: link:../../session/session-format-v3-to-v4 - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 picomatch: specifier: ^4.0.7 version: 4.0.7 @@ -12726,9 +12699,6 @@ importers: '@deepseek-ai/cordis': specifier: workspace:~ version: link:../../../vendor/cordis - '@types/js-yaml': - specifier: ^4.0.9 - version: 4.0.9 '@types/picomatch': specifier: ^4.0.3 version: 4.0.3 @@ -15108,12 +15078,6 @@ importers: '@deepseek-ai/dsh-skill-filesystem': specifier: workspace:* version: link:../../skill/skill-filesystem - '@types/js-yaml': - specifier: ^4.0.9 - version: 4.0.9 - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 packages/preset/agent-preset-registry: dependencies: @@ -15123,9 +15087,6 @@ importers: '@deepseek-ai/schemastery': specifier: link:../../../vendor/schemastery version: link:../../../vendor/schemastery - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 zod: specifier: 4.6.6 version: 4.6.6 @@ -15211,9 +15172,6 @@ importers: '@deepseek-ai/dsh-working-directory': specifier: workspace:* version: link:../../session/working-directory - '@types/js-yaml': - specifier: ^4.0.9 - version: 4.0.9 packages/preset/persona: dependencies: @@ -17854,6 +17812,9 @@ importers: '@deepseek-ai/cordis': specifier: workspace:~ version: link:../../../vendor/cordis + '@deepseek-ai/cordis-plugin-include': + specifier: workspace:~ + version: link:../../../vendor/include '@deepseek-ai/dsh-agent': specifier: workspace:* version: link:../../core/agent @@ -17924,6 +17885,9 @@ importers: '@deepseek-ai/cordis': specifier: workspace:~ version: link:../../../vendor/cordis + '@deepseek-ai/cordis-plugin-include': + specifier: workspace:~ + version: link:../../../vendor/include '@deepseek-ai/cordis-plugin-loader': specifier: workspace:~ version: link:../../../vendor/loader @@ -18606,9 +18570,6 @@ importers: '@testing-library/react': specifier: ^16.3.3 version: 16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - js-yaml: - specifier: ^4.3.2 - version: 4.3.2 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.1)(@types/node@22.20.1)(@vitest/coverage-v8@4.1.11)(happy-dom@20.11.6)(jsdom@29.1.1(@noble/hashes@2.4.0))(vite@8.2.2(@types/node@22.20.1)(esbuild@0.28.2)(jiti@2.7.0)(tsx@4.23.13)(yaml@2.9.0)) @@ -18712,9 +18673,6 @@ importers: '@deepseek-ai/dsh-web-app': specifier: workspace:* version: link:../../bundle/web-app - '@types/js-yaml': - specifier: ^4.0.9 - version: 4.0.9 react: specifier: ^18.2.0 version: 18.3.1 diff --git a/scripts/cordis-core-api.spec.ts b/scripts/cordis-core-api.spec.ts index 8aef4041a1..8c2ace851b 100644 --- a/scripts/cordis-core-api.spec.ts +++ b/scripts/cordis-core-api.spec.ts @@ -25,7 +25,7 @@ describe('Cordis core API generation', () => { expect(pages.get('docs/cordis-api/events.md')).toContain('## DispatchMode') expect(pages.get('docs/cordis-api/fiber.md')).toContain('## EffectMeta') expect(pages.get('docs/cordis-api/registry.md')).toContain('## Plugin') - expect(pages.get('docs/cordis-api/service.md')).toContain('### Service.resolveConfig') + expect(pages.get('docs/cordis-api/service.md')).toContain('### Service.resolveIntercept') const fiber = pages.get('docs/cordis-api/fiber.md') ?? '' expect(fiber).toContain('```\n\nRegister a cleanup-aware effect on this fiber.') diff --git a/scripts/cordis-core-lifecycle.spec.ts b/scripts/cordis-core-lifecycle.spec.ts index 20f456db81..21c698d1a3 100644 --- a/scripts/cordis-core-lifecycle.spec.ts +++ b/scripts/cordis-core-lifecycle.spec.ts @@ -1,4 +1,4 @@ -/** Cordis rc.11 updates retain dependency ownership and publish only current configuration. */ +/** Cordis lifecycle since rc.11 (vendored Core): updates retain dependency ownership and publish only current configuration. */ import type { Awaitable } from '@deepseek-ai/cosmokit' import { Context, FiberState } from '@deepseek-ai/cordis' import { describe, expect, it, onTestFinished, vi } from 'vitest' @@ -110,7 +110,8 @@ describe('Cordis rc.11 lifecycle', () => { await isolated.plugin((child) => { expect(child.rc11View).toBe('inner') }) await withdraw() expect(owner.rc11View).toBe('outer') - expect(isolated.rc11View).toBe('outer') + // Since rc.12, the isolated context does not fall back to the injected view once its own provision is withdrawn. + expect(() => isolated.rc11View).toThrow('without inject') }) await ctx.plugin((owner) => { owner.isolate('rc11Private').provide('rc11Private', true) diff --git a/scripts/cordis-core-rc12.spec.ts b/scripts/cordis-core-rc12.spec.ts new file mode 100644 index 0000000000..ef6a8e9564 --- /dev/null +++ b/scripts/cordis-core-rc12.spec.ts @@ -0,0 +1,149 @@ +/** Cordis rc.12 root access, intercept metadata, isolation, disposal and event errors. */ +import { Context, FiberState, Service, ValidationError } from '@deepseek-ai/cordis' +import { describe, expect, it, onTestFinished } from 'vitest' + +interface Metadata { + a?: number + b?: number + c?: number + tags?: string[] +} + +declare module '@deepseek-ai/cordis' { + interface Context { + rc12Meta: MetadataService + rc12View: string + } +} + +class MetadataService extends Service { + constructor(ctx: Context) { + super(ctx, 'rc12Meta') + } + + read(): Metadata { + return this[Service.resolveIntercept]() + } +} + +function root() { + const ctx = new Context() + onTestFinished(() => ctx.fiber.dispose()) + return ctx +} + +describe('Cordis rc.12 core', () => { + it('exposes the root context through Context.root only', async () => { + const ctx = root() + const seen: unknown[] = [] + await ctx.plugin((child: Context) => { + seen.push(child[Context.root]) + seen.push(child[Symbol.for('cordis.root') as typeof Context.root]) + expect(() => { Reflect.get(child, 'root') }).toThrow('cannot get property "root" without inject') + }) + expect(seen).toEqual([ctx, ctx]) + }) + + it('merges injected metadata under context intercepts', async () => { + const ctx = root() + await ctx.plugin(MetadataService) + let metadata!: Metadata + await ctx.intercept('rc12Meta', { b: 2 }).inject({ rc12Meta: { a: 1, b: 1 } }, (child) => { + metadata = child.intercept('rc12Meta', { c: 3 }).rc12Meta.read() + }) + expect(metadata).toEqual({ a: 1, b: 2, c: 3 }) + }) + + it('merges through an overridden mergeIntercept in increasing precedence', async () => { + class Tagged extends MetadataService { + override [Service.mergeIntercept](...values: Metadata[]): Metadata { + return { tags: values.flatMap(value => value.tags ?? []) } + } + } + const ctx = root() + await ctx.plugin(Tagged) + let metadata!: Metadata + await ctx.intercept('rc12Meta', { tags: ['outer'] }).inject({ rc12Meta: { tags: ['inject'] } }, (child) => { + metadata = child.intercept('rc12Meta', { tags: ['inner'] }).rc12Meta.read() + }) + expect(metadata).toEqual({ tags: ['inject', 'outer', 'inner'] }) + }) + + it('does not inherit the injected view across an isolation boundary', async () => { + const ctx = root() + ctx.provide('rc12View', 'outer') + const results: string[] = [] + const read = (child: Context) => { + try { + return child.rc12View + } catch (error) { + return error instanceof Error ? error.message : String(error) + } + } + await ctx.inject(['rc12View'], async (owner) => { + await owner.plugin((child) => { results.push(read(child)) }) + await owner.isolate('rc12View').plugin((child) => { results.push(read(child)) }) + }) + expect(results).toEqual(['outer', 'cannot get property "rc12View" without inject']) + }) + + it('isolates a context pinned to its parent realm label from the injected view', async () => { + const ctx = root() + ctx.provide('rc12View', 'outer') + let message = '' + await ctx.inject(['rc12View'], async (owner) => { + const pinned = owner.isolate('rc12View', owner[Context.isolate].rc12View) + expect(() => pinned.rc12View).toThrow('cannot get property "rc12View" without inject') + await pinned.plugin((child) => { + try { + void child.rc12View + } catch (error) { + message = error instanceof Error ? error.message : String(error) + } + }) + }) + expect(message).toBe('cannot get property "rc12View" without inject') + }) + + it('settles pending and failed fibers to DISPOSED', async () => { + const ctx = root() + const pending = ctx.inject(['rc12NeverProvided'], () => {}) + expect(pending.state).toBe(FiberState.PENDING) + await pending.dispose() + expect(pending.state).toBe(FiberState.DISPOSED) + + const failed = ctx.plugin(() => { throw new Error('rc12 boom') }) + await expect(failed.await()).rejects.toThrow('rc12 boom') + expect(ctx.logger.buffer.some(message => message.type === 'error' && message.args[0] instanceof Error && message.args[0].message === 'rc12 boom')).toBe(true) + expect(failed.state).toBe(FiberState.FAILED) + await failed.dispose() + expect(failed.state).toBe(FiberState.DISPOSED) + }) + + it('names the failing event in the parallel AggregateError', async () => { + const ctx = root() + ctx.on('rc12-parallel' as never, () => { throw new Error('listener failed') }) + const symbol = Symbol('rc12-symbol') + ctx.on(symbol as never, () => { throw new Error('symbol listener failed') }) + await expect(ctx.parallel('rc12-parallel' as never)).rejects.toThrow('one or more listeners of event "rc12-parallel" failed') + await expect(ctx.parallel(symbol as never)).rejects.toThrow('one or more listeners of event Symbol(rc12-symbol) failed') + }) + + it('formats config validation paths with keyed segments', () => { + const error = new ValidationError([{ message: 'bad', path: [{ key: 0 }, 'name'] }]) + expect(ValidationError.is(error)).toBe(true) + expect(ValidationError.is(new TypeError('bad'))).toBe(false) + expect(error.issues).toHaveLength(1) + expect(error.message).toBe('invalid config:\n - bad (at 0.name)') + expect(ValidationError.normalizePath([{ key: 'a' }, 1])).toEqual(['a', 1]) + expect(ValidationError.formatPath(undefined)).toBe('') + expect(new ValidationError([{ message: 'bad', path: [] }]).message).toBe('invalid config:\n - bad') + }) + + it('logs an AggregateError without members as itself', () => { + const ctx = root() + const aggregate = new AggregateError([], 'empty') + ctx.logger.error(aggregate) + expect(ctx.logger.buffer.at(-1)?.args[0]).toBe(aggregate) + }) +}) diff --git a/scripts/cordis-entry-yaml.spec.ts b/scripts/cordis-entry-yaml.spec.ts new file mode 100644 index 0000000000..75d938e84b --- /dev/null +++ b/scripts/cordis-entry-yaml.spec.ts @@ -0,0 +1,39 @@ +/** Include's YAML dialect exports used by DSH configuration tools. */ +import { entryYamlErrorPosition, parseEntryYaml, stringifyEntryYaml } from '@deepseek-ai/cordis-plugin-include' +import { describe, expect, it } from 'vitest' + +describe('Include YAML dialect', () => { + it('reads and writes !!js scalars as expression nodes', () => { + const source = '- id: a\n name: example\n disabled: !!js process.env.OFF\n' + const parsed = parseEntryYaml(source) + expect(parsed).toEqual([{ id: 'a', name: 'example', disabled: { __jsExpr: 'process.env.OFF' } }]) + expect(stringifyEntryYaml(parsed)).toBe(source) + }) + + it('reads binary integers as numbers and dates as strings', () => { + expect(parseEntryYaml('- 0b101\n- 2001-01-01\n- ~\n')).toEqual([5, '2001-01-01', null]) + expect(parseEntryYaml('')).toBeUndefined() + }) + + it('writes repeated references in full', () => { + const shared = { value: 1 } + expect(stringifyEntryYaml([{ config: shared }, { config: shared }])).toBe('- config:\n value: 1\n- config:\n value: 1\n') + }) + + it('folds long scalars at the requested line width', () => { + const value = [{ text: Array.from({ length: 20 }, (_, index) => `word${String(index)}`).join(' ') }] + expect(stringifyEntryYaml(value).split('\n').length).toBeGreaterThan(2) + expect(stringifyEntryYaml(value, { lineWidth: -1 }).split('\n')).toHaveLength(2) + }) + + it('locates parse errors', () => { + let error: unknown + try { + parseEntryYaml('- id: a\n name: [\n') + } catch (caught) { + error = caught + } + expect(entryYamlErrorPosition(error)).toEqual({ line: 3, column: 1 }) + expect(entryYamlErrorPosition(new Error('other'))).toBeUndefined() + }) +}) diff --git a/scripts/cordis-yaml.ts b/scripts/cordis-yaml.ts index 43f81af22e..2389c7893f 100644 --- a/scripts/cordis-yaml.ts +++ b/scripts/cordis-yaml.ts @@ -3,30 +3,20 @@ * @module scripts/cordis-yaml */ -import * as yaml from 'js-yaml' +import { parseEntryYaml } from '@deepseek-ai/cordis-plugin-include' /** A Loader `!!js` expression preserved as data instead of executed. */ export interface JsExpr { __jsExpr: string } -const jsExprType = new yaml.Type('tag:yaml.org,2002:js', { - kind: 'scalar', - resolve: data => typeof data === 'string', - construct: (data: unknown): JsExpr => { - if (typeof data !== 'string') throw new TypeError('!!js requires a scalar string') - return { __jsExpr: data } - }, -}) -const schema = yaml.JSON_SCHEMA.extend(jsExprType) - /** * Parse a Cordis config while preserving Loader `!!js` expressions as data. * @param source - Cordis YAML source text. * @returns the parsed YAML value. */ export function loadCordisYaml(source: string): unknown { - return yaml.load(source, { schema }) + return parseEntryYaml(source) } /** diff --git a/scripts/gen-cordis-catalog.ts b/scripts/gen-cordis-catalog.ts index ba8f092406..9b6344496a 100644 --- a/scripts/gen-cordis-catalog.ts +++ b/scripts/gen-cordis-catalog.ts @@ -1246,7 +1246,7 @@ export const CORDIS_CATALOG_POLICY: CordisCatalogPolicy = { { name: 'ctx.effect', summary: 'Register a disposable side effect tied to the fiber.', source: 'vendor/cordis/src/fiber.ts:9' }, { name: 'ctx.get / ctx.set / ctx.provide / ctx.accessor / ctx.mixin', summary: 'Low-level service-store access and binding.', source: 'vendor/cordis/src/reflect.ts:7' }, { name: 'ctx.extend / ctx.isolate / ctx.intercept', summary: 'Derive a child context (scoped services / isolation / interception).', source: 'vendor/cordis/src/context.ts:42' }, - { name: 'ctx.root / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger', summary: 'Ambient handles onto the running context graph.', source: 'vendor/cordis/src/context.ts:16' }, + { name: 'ctx[Context.root] / ctx.fiber / ctx.registry / ctx.reflect / ctx.events / ctx.logger', summary: 'Ambient handles onto the running context graph.', source: 'vendor/cordis/src/context.ts:16' }, { name: 'ctx.timer (+ interval / timeout / throttle / debounce)', summary: 'Disposable timer helpers. The `timer` key is provided at runtime; the four supported helpers are mixed onto ctx directly (declared via Pick).', source: 'vendor/timer/src/index.ts:4' }, { name: 'ctx.loader', summary: 'The config Loader that booted the app (present under the loader).', source: 'vendor/loader/src/index.ts:30' }, ], diff --git a/vendor/README.md b/vendor/README.md index c3a4c8e774..2edebc8b40 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -12,7 +12,7 @@ This file covers the manifest, the local-modification log, and the procedure for |---|---|---|---|---|---| | `cosmokit/` | `@deepseek-ai/cosmokit` | `cosmokit` | 1.8.1 | https://github.com/shigma/cosmokit | `02e691c5aa7f37f6e0b1cee7ee8f4a21c2e34507` | | `schemastery/` | `@deepseek-ai/schemastery` | `schemastery` | 3.18.0 | https://github.com/shigma/schemastery (`packages/core`) | `cf0b7e5481d0e31d10cdc30bc45c09366c332f27` | -| `cordis/` | `@deepseek-ai/cordis` | `cordis` | 4.0.0-rc.11 | https://github.com/cordiverse/cordis (`packages/core`) | `0b96d9fd517b998e44e2209560c9e5f0671ce933` | +| `cordis/` | `@deepseek-ai/cordis` | `cordis` | 4.0.0-rc.12 | https://github.com/cordiverse/cordis (`packages/core`) | `01b396240ce47cf2779c40af9bc445bb748fe112` | | `loader/` | `@deepseek-ai/cordis-plugin-loader` | `@cordisjs/plugin-loader` | 1.0.0-rc.8 | https://github.com/cordiverse/cordis (`packages/loader`) | `0b96d9fd517b998e44e2209560c9e5f0671ce933` | | `include/` | `@deepseek-ai/cordis-plugin-include` | `@cordisjs/plugin-include` | 1.1.1 | https://github.com/cordiverse/cordis (`packages/include`) | `0b96d9fd517b998e44e2209560c9e5f0671ce933` | | `group/` | `@deepseek-ai/cordis-plugin-group` | `@cordisjs/plugin-group` | 1.0.0 | https://github.com/cordiverse/cordis (`packages/group`) | `01b396240ce47cf2779c40af9bc445bb748fe112` | @@ -26,18 +26,18 @@ Intentionally **not** vendored (verified unused by this set): `reggol`, `@cordis ## Local modifications -Keep this log exhaustive — every divergence from upstream must be listed. Each entry has a stable ID: remove an entry when its divergence no longer exists, and never renumber or reuse IDs. The next new entry is V28. +Keep this log exhaustive — every divergence from upstream must be listed. Each entry has a stable ID: remove an entry when its divergence no longer exists, and never renumber or reuse IDs. The next new entry is V29. - **V1 · `hmr/src/index.ts`**: removed the `./locales/en-US.yml` / `./locales/zh-CN.yml` imports, the `.i18n({...})` call on the `Config` schema, and the `src/locales/` directory. Rationale: those imports require a runtime YAML loader hook (`@cordisjs/unyaml`) that we do not vendor; the i18n texts only localize config descriptions. - **V2 · All `package.json` files**: regenerated for Harness releases with scoped names, release versions, publication metadata, precise bundled-runtime and `lib/types/**/*.d.ts` / `.d.ts.map` file entries, source exports where applicable, and declaration metadata pointing at `lib/types`. References within the vendored set use `workspace:~`. HMR declares `esbuild` as a direct dev dependency for its imported `BuildFailure` type, and Loader requires `node-addon-require-builtin@^0.1.4` to match published app runtimes. - **V3 · All `tsconfig.json` files**: regenerated to extend the repo-root `tsconfig.base.json`, emit TypeScript intermediates to `lib/types`, and declare project references. -- **V4 · Vendored TypeScript source internal specifiers**: changed local relative imports/exports from upstream's specifier shape to explicit `.ts` specifiers so TypeScript rewrites emitted JS to `.js` while declarations keep explicit, NodeNext-safe `.ts` specifiers. This includes `loader/src/config/isolate.ts` using `declare module './entry.ts'`. Type-only dependencies use `import type` or inline `type` modifiers so ESM output does not retain erased interfaces. +- **V4 · Vendored TypeScript source internal specifiers**: changed local relative imports/exports from upstream's specifier shape to explicit `.ts` specifiers so TypeScript rewrites emitted JS to `.js` while declarations keep explicit, NodeNext-safe `.ts` specifiers. This includes `loader/src/config/isolate.ts` using `declare module './entry.ts'`. Core's upstream source already uses explicit `.ts` specifiers. Type-only dependencies use `import type` or inline `type` modifiers so ESM output does not retain erased interfaces. - **V5 · `schemastery/tsdown.config.ts` and `logger-console/tsdown.config.ts`**: ours, not upstream files — per-package build-shape overrides (dual ESM+CJS output; separate node/browser entries) for the repo-root tsdown build. They read the JS emitted under `lib/types` and then write the publish runtime entries under `lib/`. Like the regenerated tsconfigs, they are not part of the upstream sync surface. - **V6 · `cordis/src/fiber.ts` lifecycle hardening**: locally closes three reentrant disposal gaps. An effect's owner-list wrapper is registered before its setup body runs, so an unload begun from inside setup awaits setup and every collected cleanup; synchronous setup failure removes the wrapper and rolls back collected cleanup. Async cleanup stays owner-visible until quiescence, and Cordis's internal effect composition joins an already-running cleanup while repeated public disposer calls retain their upstream single-shot result. Effect creation is rejected while the owner is `UNLOADING` (while `PENDING` and `LOADING` remain legal), preventing cleanup-time registrations from escaping the unload snapshot. Child fibers register and receive their parent-owned disposer before `internal/plugin` publication, resolve dependency declarations added by that notification before activation, drain effects attached while pending, and contain teardown-notification failures per observer so one callback cannot starve peers or interrupt ownership cleanup. -- **V7 · JSDoc enrichment**: added `@param`/`@returns` tags and contract documentation (disposal semantics, waterfall veto, bail conditions, error cases) across the public plugin-author surface — `Context` (class, statics, and the `Context` interface properties incl. `root`), module re-exports, shared utility helpers, `EventsService`, `Fiber`, `RegistryService`, `ReflectService`, `Service`, `LoggerService` and their `declare module './context.ts'` overloads. Loader documentation covers `loader/src/{index,internal,config/entry,config/group,config/isolate,config/tree,config/utils}.ts`, including entry ownership, tree mutation methods, and the `!!js` discriminator. The upstream `EventsService.dispatch()` deprecation annotation is omitted: DSH enumerates callbacks to contain each observer failure independently, which the typed dispatch methods do not provide. Timer retains its local class and helper summaries; its README is local documentation because the upstream package has none. Cosmokit and Schemastery add summaries to their exported helpers, types and namespaces, logger-console to its exporters and config namespace, and HMR to its build-failure logger in `hmr/src/error.ts`. Comment-only; no code changes. Motivation: the website API-reference generator renders these docs and hard-errors on undocumented members. Retire this entry when the enrichment is upstreamed. +- **V7 · JSDoc enrichment**: added `@param`/`@returns` tags and contract documentation (disposal semantics, waterfall veto, bail conditions, error cases) across the public plugin-author surface — `Context` (class, statics, the `isolate()` rule that isolated scopes never fall back to an injected view, and the `Context` interface properties incl. `[Context.root]`), module re-exports, shared utility helpers, `EventsService`, `Fiber`, `ValidationError` and its path helpers, `RegistryService`, `ReflectService`, `Service` and its intercept-metadata members, `LoggerService` and their `declare module './context.ts'` overloads. The upstream line comment on `reflect.ts`'s exported `locate()` is rewritten as JSDoc. Loader documentation covers `loader/src/{index,internal,config/entry,config/group,config/isolate,config/tree,config/utils}.ts`, including entry ownership, tree mutation methods, and the `!!js` discriminator. The upstream `EventsService.dispatch()` deprecation annotation is omitted: DSH enumerates callbacks to contain each observer failure independently, which the typed dispatch methods do not provide. Timer retains its local class and helper summaries; its README is local documentation because the upstream package has none. Cosmokit and Schemastery add summaries to their exported helpers, types and namespaces, logger-console to its exporters and config namespace, and HMR to its build-failure logger in `hmr/src/error.ts`. Comment-only; no code changes. Motivation: the website API-reference generator renders these docs and hard-errors on undocumented members. Retire this entry when the enrichment is upstreamed. - **V9 · `hmr/src/index.ts` module-watcher readiness and native paths**: realpath the existing watch base, classify framework modules and attach listeners before reporting readiness, and compare config paths using both canonical and configured spellings. This preserves Node module-cache identity across Windows short-name paths and filesystem aliases. The main watcher uses `ignoreInitial: true` so startup reads do not trigger another refresh; exact profile patch watching is owned by `packages/boot/hmr/src/watch-config.ts`. The Include change listener logs a rejected `Include.refresh()` instead of leaving the rejection unhandled; the rejection reports unsaved runtime changes while Include keeps its running tree. Covered by `packages/boot/hmr/tests/watch-config.spec.ts` and `scripts/cordis-vendor-hmr-include.spec.ts`. - **V10 · Vendored Node-compatible TypeScript**: marked erased imports explicitly across `cordis`, `loader`, `include`, `hmr`, and `schemastery` so Node's native TypeScript transform does not request types as runtime exports. Schemastery's source uses an ESM default export and its package declares `type: module`. Conditional exports select `.mjs` for import and `.cjs` for require; without them, concurrent imports under module-hook hosts reach the CJS entry and can race its require of ESM Cosmokit (`ERR_REQUIRE_ESM_RACE_CONDITION`). -- **V11 · Include patch and YAML exports**: `include/src/index.ts` exports upstream `applyPatches` as `applyEntryPatches` and the `!!js` YAML dialect as `entryListSchema`, so `dsh --dump-config` composes entries with the same algorithm that mounting uses. Covered by `packages/boot/app-boot/tests/config-reload.spec.ts` and `scripts/cordis-entry-commit.spec.ts`. +- **V11 · Include patch and YAML exports**: `include/src/index.ts` exports upstream `applyPatches` as `applyEntryPatches`, so `dsh --dump-config` composes entries with the same algorithm that mounting uses. It also exports `parseEntryYaml`, `stringifyEntryYaml` and `entryYamlErrorPosition` over the `!!js` YAML dialect, and `_read()` parses through `parseEntryYaml`, so every DSH reader and writer of Include-dialect YAML uses Include's parser; `stringifyEntryYaml` always writes with `noRefs` and offers no option to emit aliases, while Include's own writer keeps upstream's options. Covered by `packages/boot/app-boot/tests/config-reload.spec.ts`, `scripts/cordis-entry-commit.spec.ts` and `scripts/cordis-entry-yaml.spec.ts`. - **V14 · Include persistence results**: `include/src/index.ts` keeps an error for unsaved journal changes. `flush()` retries pending writes and rejects while changes remain unsaved; `stop()` returns the same result and always stops the child tree; a later successful flush clears previous errors. A failed `refresh()` can also reject while runtime changes remain unsaved. Patch-owned changes route to the parent Include, so callers that need them persisted must flush that parent too. The constructor omits upstream's `ctx.hmr.watch(this.filename, () => this.refresh())` registration because neither HMR provider exposes `watch()`; both find each Include by scanning loader entries for its `filename` and call `refresh()`. Ordinary Fiber teardown keeps its error containment. Covered by `scripts/cordis-include-journal.spec.ts` and `packages/host/directory-picker-auto/tests/loader-composition.spec.ts`. - **V15 · Configuration access across Core, Loader, Include and HMR**: rc.11 Core owns raw `Fiber.config`, `internal/config(fiber, next)`, `internal/commit` and awaited `internal/update(config, next)`. Root-fiber candidate resolution remains available without a plugin schema. Local `rawConfig`, `resolveConfig(candidate)` and `effectiveConfig` accessors retain the DSH consumer API. Fiber caches the object passed to activation or a successful update that keeps the instance; candidate resolution is pure, failed or superseded updates cannot replace the cache, and volatile updates retain references. Loader resolves only entry roots and excludes Group/Include tree carriers, so nested `!!js` expressions wait for their own injections. Include retains its tree-carrier marker and public patch exports, and HMR transfers raw config through the accessors. Covered by `scripts/cordis-config-access.spec.ts`, `scripts/cordis-core-lifecycle.spec.ts` and the boot/HMR suites. - **V16 · `cordis/package.json` publishes `src`**: added `src` to the `files` list, joining the other eight vendored packages. Cordis declares `"./src/*": "./src/*"` in its exports, so a tarball without `src` publishes an export map pointing at absent files; the release change judgement also reads `files` to decide whether a diff reaches the payload, and a package whose only published paths are build output has no tracked path to match. @@ -48,6 +48,7 @@ Keep this log exhaustive — every divergence from upstream must be listed. Each - **V25 · Loader lifecycle adaptations**: before a combined context/config update, Loader refreshes dependencies locally, which prevents activation against stale isolation bindings; disabled-entry updates await disposal. Failed fibers require an explicit update after correcting their input or dependencies. Core retains the effect hardening in V6; rc.11 owns dependency teardown ordering and superseded-activation handling. - **V26 · `loader/src/config/tree.ts` cross-tree moves**: backports [cordiverse/cordis#271](https://github.com/cordiverse/cordis/pull/271), merged after `v4.0.0-rc.11`. When `EntryTree.update()` moves an entry into a group of another tree, the entry and the same-tree members of its group move their store registrations to the target tree, and the move is rejected before either tree changes when the target tree already holds one of their ids. The source tree receives a removal and the target tree a creation, without `legacy` or `from`. In rc.11 the entry stays registered in the source tree and the target receives an update with `legacy`, so the Include journal writes a partial row and reconciling the target file creates a second Entry. Retire this entry when the vendored Loader includes the upstream fix. Covered by `scripts/cordis-include-journal.spec.ts`. - **V27 · `loader/src/config/tree.ts` explicit ids with `:`**: `ensureId()` accepts explicit ids containing `EntryTree.sep`; upstream rejects them. Generated bundles from `@deepseek-ai/dsh-creation-recommendations` prefix their row ids with `:`, and installed profiles already contain such rows. `resolve()` still splits ids on `:`, so these entries cannot be addressed by nested path. Covered by `scripts/cordis-entry-commit.spec.ts` and `packages/experimental/creation-recommendations/tests/loader-composition.spec.ts`. +- **V28 · Core rc.12 compatibility in Loader and Include**: `loader/src/index.ts` declares `[Service.metadata]`, resolves its intercept through `[Service.resolveIntercept]` and logs through `ctx[Context.root]`; `include/src/index.ts` logs through `ctx[Context.root]`. These lines match the `v4.0.0-rc.12` tag while the rest of both packages keeps its rc.11 baseline. Retire this entry when Loader and Include are synchronized to that tag. ### Resolver adaptations diff --git a/vendor/cordis/src/context.ts b/vendor/cordis/src/context.ts index b7dcf44ff6..5cbb27d6c6 100644 --- a/vendor/cordis/src/context.ts +++ b/vendor/cordis/src/context.ts @@ -14,12 +14,12 @@ import { Fiber } from './fiber.ts' * be read from `ctx`. */ export interface Context { + /** The root context of the application; every child context shares it. */ + [symbols.root]: this /** Isolation map: service name → scope label. Lookups for a name resolve within its label. */ [symbols.isolate]: Dict - /** Intercept map: service name → config merged into that service's per-plugin config. */ + /** Intercept map: service name → intercept metadata merged into that service's resolved metadata. */ [symbols.intercept]: Dict - /** The root context of the application (every child context shares it). @experimental */ - root: this /** Base URL used to resolve relative plugin/module specifiers, if the runtime sets one. */ baseUrl?: string | undefined /** The event bus. Its methods are also mixed onto `ctx` (`ctx.on`, `ctx.emit`, ...). */ @@ -40,13 +40,15 @@ export interface Context { * contexts without mutating their parent. */ export class Context { + /** Symbol key of the root context: `ctx[Context.root]` is the application's root context, shared by every child context. */ + static readonly root: unique symbol = symbols.root /** Symbol key under which a disposer exposes its {@link EffectMeta} diagnostics tree. */ static readonly effect: unique symbol = symbols.effect /** Symbol key for a context's listener filter, consulted on every event dispatch. */ static readonly filter: unique symbol = symbols.filter - /** Symbol key of the isolation map (see the `Context[symbols.isolate]` property). */ + /** Symbol key of the isolation map: `ctx[Context.isolate]` maps each service name to its scope label. */ static readonly isolate: unique symbol = symbols.isolate - /** Symbol key of the intercept map (see the `Context[symbols.intercept]` property). */ + /** Symbol key of the intercept map: `ctx[Context.intercept]` maps each service name to its intercept metadata. */ static readonly intercept: unique symbol = symbols.intercept /** @@ -72,7 +74,7 @@ export class Context { this[symbols.isolate] = Object.create(null) this[symbols.intercept] = Object.create(null) const self = new Proxy(this, ReflectService.handler) - this.root = self + this[symbols.root] = self this.baseUrl = undefined this.fiber = new Fiber(self, {}, Object.create(null), null, () => []) this.reflect = new ReflectService(self) @@ -113,6 +115,9 @@ export class Context { * resolve against the new label instead of the parent's, so a different * implementation can be provided without affecting the parent scope. * Passing the same `label` to two `isolate()` calls joins their scopes. + * The returned context and plugins started below it never fall back to the + * enclosing plugin's injected `name`, even when `label` equals the parent's + * label; until a provider in the new scope supplies `name`, reading it throws. * * @param name — the service name to isolate. * @param label — scope label to join; defaults to a fresh unique symbol. @@ -125,18 +130,19 @@ export class Context { } /** - * Add service-specific intercept config for plugins started below this + * Add service-specific intercept metadata for plugins started below this * context. * * Plugins loaded under the returned context see `config` merged into the - * service's resolved config (ancestor entries first; see - * `Service[symbols.resolveConfig]`). The parent context is not affected. + * service's resolved intercept metadata (injected metadata first, then + * ancestor intercepts; see `Service[symbols.resolveIntercept]`). The parent + * context is not affected. * - * @param name — the service name whose config to intercept. - * @param config — the intercept config to merge for that service. + * @param name — the service name whose metadata to intercept. + * @param config — the intercept metadata to merge for that service. * @returns a child context carrying the additional intercept entry. */ - intercept(name: K, config: Context[K] extends { [symbols.config]: infer T } ? T : never): this + intercept(name: K, config: Context[K] extends { [symbols.metadata]: infer T } ? T : never): this intercept(name: string, config: any): this intercept(name: string, config: any) { const intercept = Object.create(this[symbols.intercept]) diff --git a/vendor/cordis/src/events.ts b/vendor/cordis/src/events.ts index 9e7b6a6633..f0dc92fbe2 100644 --- a/vendor/cordis/src/events.ts +++ b/vendor/cordis/src/events.ts @@ -166,8 +166,10 @@ export class EventsService { this.emit('internal/dispatch', type, name, args, thisArg) } const filter = thisArg?.[Context.filter] - return [thisArg, (this._hooks[name] || []) - .filter(hook => hook.global || !filter || filter.call(thisArg, hook.ctx)).map(hook => hook.callback)] as const + const callbacks = (this._hooks[name] || []) + .filter(hook => hook.global || !filter || filter.call(thisArg, hook.ctx)) + .map(hook => hook.callback) + return [thisArg, callbacks, name] as const } /** @@ -189,10 +191,12 @@ export class EventsService { * @returns a promise resolving once every listener has settled. */ async parallel(...args: any[]) { - const [thisArg, callbacks] = this._resolve('parallel', args) + const [thisArg, callbacks, name] = this._resolve('parallel', args) const results = await Promise.allSettled(callbacks.map(async callback => Reflect.apply(callback, thisArg, args))) const errors = results.filter((result): result is PromiseRejectedResult => result.status === 'rejected') - if (errors.length) throw new AggregateError(errors.map(error => error.reason)) + if (!errors.length) return + const label = typeof name === 'symbol' ? String(name) : `"${name}"` + throw new AggregateError(errors.map(error => error.reason), `one or more listeners of event ${label} failed`) } /** diff --git a/vendor/cordis/src/fiber.ts b/vendor/cordis/src/fiber.ts index 6da19b4767..08a75215d6 100644 --- a/vendor/cordis/src/fiber.ts +++ b/vendor/cordis/src/fiber.ts @@ -24,15 +24,45 @@ export class ValidationError extends TypeError { * * @param issues — the standard-schema issues, one message line each. */ - constructor(issues: readonly StandardSchemaV1.Issue[]) { + constructor(public issues: readonly StandardSchemaV1.Issue[]) { super(`invalid config:\n` + issues.map(issue => { - if (issue.path) { - return ` - ${issue.message} (at ${issue.path.join('.')})` + if (issue.path?.length) { + return ` - ${issue.message} (at ${ValidationError.formatPath(issue.path)})` } else { return ` - ${issue.message}` } }).join('\n')) } + + /** + * Test whether a value is a config `ValidationError`, including one from another copy of Cordis. + * + * @param error — the value to test. + * @returns `true` if `error` carries the global validation-error brand. + */ + static is(error: unknown): error is ValidationError { + return !!error?.[kValidationError] + } + + /** + * Convert an issue path to plain property keys. + * + * @param path — the standard-schema issue path; segments may be `{ key }` objects. + * @returns the property keys, or an empty array when the issue has no path. + */ + static normalizePath(path: StandardSchemaV1.Issue['path'] = []) { + return path.map(segment => typeof segment === 'object' ? segment.key : segment) + } + + /** + * Format an issue path as a dotted string. + * + * @param path — the standard-schema issue path. + * @returns the keys joined with `.`. + */ + static formatPath(path: StandardSchemaV1.Issue['path']) { + return ValidationError.normalizePath(path).map(String).join('.') + } } Object.defineProperty(ValidationError.prototype, kValidationError, { @@ -239,15 +269,6 @@ export class Fiber { this.uid = parent.registry.counter this.ctx = this.context = parent.extend({ fiber: this }) - const injectEntries = Object.entries(this.inject) - if (injectEntries.length) { - this.ctx[Context.intercept] = Object.create(parent[Context.intercept]) - for (const [name, config] of injectEntries) { - if (isNullable(config)) continue - this.ctx[Context.intercept][name] = config - } - } - this._runner = { epoch: INACTIVE, getOuterStack, @@ -290,15 +311,16 @@ export class Fiber { return FiberState.UNLOADING }) } - // `this.inertia` itself should never reject — both `_reload` and - // `_unload` swallow their own work errors via `ctx.logger.error`. - // If it *does* reject, the only remaining cause is the logger - // itself failing, which we can't recover from in this exact spot - // (calling the logger again is what just failed). Let the - // rejection propagate; process-level crash is the honest outcome. + // `inertia` never rejects: `_reload` and `_unload` both log their + // own work errors. A rejection here would mean the logger itself + // failed, so let it propagate. while (this.inertia) { await this.inertia } + // `_setEpoch()` above returns early for a fiber that was not ACTIVE, + // so the cached state is not refreshed. Re-derive it now that + // `uid` is null; the empty callback falls through to `_getState()`. + this._updateState(() => {}) } }, 'ctx.plugin()') diff --git a/vendor/cordis/src/logger.ts b/vendor/cordis/src/logger.ts index 0dc97c16b3..ff35b70de5 100644 --- a/vendor/cordis/src/logger.ts +++ b/vendor/cordis/src/logger.ts @@ -1,14 +1,9 @@ import { defineProperty, hyphenate } from '@deepseek-ai/cosmokit' import { Context } from './context.ts' import { Fiber } from './fiber.ts' +import { Service } from './service.ts' import { createCallable, joinPrototype, symbols, type Tracker } from './utils.ts' -declare module './context.ts' { - interface Intercept { - logger: LoggerService.Intercept - } -} - /** Logger method name and severity category. */ export type LoggerType = 'error' | 'info' | 'warn' | 'debug' @@ -143,7 +138,9 @@ export class Logger { if (args.length === 1 && args[0] instanceof Error) { if (args[0].cause) { this[type](args[0].cause) - } else if (isAggregateError(args[0])) { + } else if (isAggregateError(args[0]) && args[0].errors.length) { + // An aggregate with no members has nothing to flatten; it is logged + // as itself, like any other error. args[0].errors.forEach(error => this[type](error)) return } @@ -192,6 +189,8 @@ export interface LoggerService extends Record { * directly to log with the current fiber-derived name. */ export class LoggerService { + declare [symbols.metadata]: LoggerService.Intercept + bufferSize = 1000 buffer: Message[] = [] ctx!: Context @@ -241,21 +240,9 @@ export class LoggerService { }, 'ctx.logger.exporter()') } - private _resolveConfig(): LoggerService.Intercept { - let intercept = this.ctx[symbols.intercept] - const configs: LoggerService.Intercept[] = [] - while ('logger' in intercept) { - if (Object.hasOwn(intercept, 'logger')) { - configs.unshift(intercept['logger']) - } - intercept = Object.getPrototypeOf(intercept) - } - return Object.assign({}, ...configs) - } - [symbols.invoke](name?: string): Logger { - const config = this._resolveConfig() const caller = (this as any)[symbols.caller] as Context | undefined + const config: LoggerService.Intercept = Service.prototype[Service.resolveIntercept].call(this) const fiber = (caller ?? this.ctx).fiber name ??= config.name name ??= hyphenate(fiber.name) diff --git a/vendor/cordis/src/reflect.ts b/vendor/cordis/src/reflect.ts index 89123616a0..c2256a3534 100644 --- a/vendor/cordis/src/reflect.ts +++ b/vendor/cordis/src/reflect.ts @@ -132,6 +132,39 @@ export interface Impl { isolate: symbol } +/** + * Resolve an access to service `name` from the def site `ctx` by walking up its fibers. + * + * - `{ impl }`: a fiber provides the impl itself in the same isolation. + * - `{ fiber, impl }`: the impl comes from the committed view of `fiber`. + * - `{ fiber }`: `fiber` declares the service but is inactive. + * - `undefined`: no fiber declares the service, or the walk reaches a context that isolates `name` again. + * + * @param ctx — the def-site context of the access. + * @param name — the service name being accessed. + * @returns the fiber whose `inject` admits the access and the impl the access reaches, or `undefined`. + */ +export function locate(ctx: Context, name: string): { fiber?: Fiber; impl?: Impl } | undefined { + const key = ctx[symbols.isolate][name] + let table = ctx[symbols.isolate] + let fiber = ctx.fiber + while (true) { + let impl: Impl | undefined + for (const provision of fiber.provisions) { + if (provision.name === name && provision.ctx[symbols.isolate][name] === key) impl = provision + } + if (impl) return { impl } + while (table !== fiber.ctx[symbols.isolate]) { + if (!table || Object.hasOwn(table, name)) return + table = Object.getPrototypeOf(table) + } + impl = fiber.committed?.[name] + if (impl || name in fiber.inject) return { fiber, impl } + if (!fiber.runtime) return + fiber = fiber.parent.fiber + } +} + /** * Reflection and service-resolution layer installed as `ctx.reflect`. * @@ -161,22 +194,11 @@ export class ReflectService { const defSite = (ctx[symbols.shadow] as Context | undefined) ?? ctx if (!defSite.fiber.runtime) return ctx.reflect.get(prop, false) return ctx.events.waterfall('internal/get', ctx, prop, error, () => { - const key = defSite[symbols.isolate][prop] - let fiber = defSite.fiber - while (true) { - let impl = fiber.committed?.[prop] - for (const provision of fiber.provisions) { - if (provision.name === prop && provision.ctx[symbols.isolate][prop] === key) impl = provision - } - if (impl) return getTraceable(ctx, impl.value) - if (prop in fiber.inject) { - error.message = `cannot get required service "${prop}" in inactive context` - throw error - } - if (!fiber.runtime) throw error - if (fiber.parent[symbols.isolate][prop] !== key) throw error - fiber = fiber.parent.fiber - } + const result = locate(defSite, prop) + if (!result) throw error + if (result.impl) return getTraceable(ctx, result.impl.value) + error.message = `cannot get required service "${prop}" in inactive context` + throw error }) } catch (e: any) { throw e === error ? enhanceError(e) : e @@ -297,7 +319,7 @@ export class ReflectService { } this.props[name] = { type: 'service' } - this.ctx.root[symbols.isolate][name] ??= Symbol(name) + this.ctx[symbols.root][symbols.isolate][name] ??= Symbol(name) const key = this.ctx[symbols.isolate][name] const impl: Impl = { uid: ++this._implCounter, name, value, ctx: this.ctx, check, isolate: key, dependents: new Set() } if (this.store[key]) { diff --git a/vendor/cordis/src/registry.ts b/vendor/cordis/src/registry.ts index 478cf036cb..fe988a2b14 100644 --- a/vendor/cordis/src/registry.ts +++ b/vendor/cordis/src/registry.ts @@ -20,7 +20,7 @@ export type Inject = (keyof M)[] | { [K in keyof M]?: M[K] } /** Context keys that correspond to services with typed intercept config. */ export type InjectKey = keyof { - [K in keyof Context & string as Context[K] extends { [symbols.config]: any } ? K : never]: any + [K in keyof Context & string as Context[K] extends { [symbols.metadata]: any } ? K : never]: any } /** @@ -31,10 +31,10 @@ export type InjectKey = keyof { */ /** * @param name — the required service name. - * @param config — optional intercept config applied for that service. + * @param config — optional intercept metadata injected for that service. * @returns the class or method decorator. */ -export function Inject(name: K, config?: Context[K] extends { [symbols.config]: infer T } ? T : never) { +export function Inject(name: K, config?: Context[K] extends { [symbols.metadata]: infer T } ? T : never) { return function (value: any, decorator: ClassDecoratorContext | ClassMethodDecoratorContext) { if (decorator.kind === 'class') { if (!Object.hasOwn(value, 'inject')) { @@ -43,7 +43,7 @@ export function Inject(name: K, config?: Context[K] extends } value.inject[name] = config } else if (decorator.kind === 'method') { - const inject = (value[symbols.metadata] ??= {}).inject ??= Object.create(null) + const inject = (value[symbols.decorator] ??= {}).inject ??= Object.create(null) inject[name] = config decorator.addInitializer(function () { const property = this[symbols.tracker]?.property diff --git a/vendor/cordis/src/service.ts b/vendor/cordis/src/service.ts index dc5742f8c2..c6ac63e30f 100644 --- a/vendor/cordis/src/service.ts +++ b/vendor/cordis/src/service.ts @@ -1,5 +1,6 @@ -import { defineProperty } from '@deepseek-ai/cosmokit' +import { defineProperty, isNullable } from '@deepseek-ai/cosmokit' import { Context } from './context.ts' +import { locate } from './reflect.ts' import { createCallable, joinPrototype, symbols, type Tracker } from './utils.ts' /** @@ -13,18 +14,20 @@ export abstract class Service { static readonly init: unique symbol = symbols.init /** Symbol key of the availability predicate passed to `ctx.provide()`. */ static readonly check: unique symbol = symbols.check - /** Symbol key of the phantom intercept-config type parameter. */ - static readonly config: unique symbol = symbols.config /** Symbol key of the call body making a service callable (e.g. `ctx.logger()`). */ static readonly invoke: unique symbol = symbols.invoke + /** Symbol key of the phantom intercept-metadata type parameter. */ + static readonly metadata: unique symbol = symbols.metadata /** Symbol key of the helper deriving an extended service instance. */ static readonly extend: unique symbol = symbols.extend /** Symbol key of the tracker metadata used for context tracing. */ static readonly tracker: unique symbol = symbols.tracker - /** Symbol key of the intercept-config resolution helper below. */ - static readonly resolveConfig: unique symbol = symbols.resolveConfig + /** Symbol key of the intercept-metadata merge hook below. */ + static readonly mergeIntercept: unique symbol = symbols.mergeIntercept + /** Symbol key of the intercept-metadata resolution helper below. */ + static readonly resolveIntercept: unique symbol = symbols.resolveIntercept - declare [symbols.config]: T + declare [symbols.metadata]: T /** The service name this instance is registered under. */ public name!: string @@ -73,32 +76,39 @@ export abstract class Service { } /** - * Merge intercept config from ancestors with optional base and head values. + * Merge intercept metadata values, lowest precedence first. * - * Entries added closer to the root apply first; `base` is prepended and - * `head` appended. Uses `Config.merge` when the service declares one, - * otherwise a shallow `Object.assign`. + * Override to customize merging; the default is a shallow `Object.assign`. * - * @param base — lowest-precedence config merged before all intercepts. - * @param head — highest-precedence config merged after all intercepts. - * @returns the merged config. + * @param values — the metadata values in increasing precedence. + * @returns the merged metadata. */ - [symbols.resolveConfig](base?: T, head?: T): T { + [symbols.mergeIntercept](...values: T[]): T { + return Object.assign({}, ...values) + } + + /** + * Resolve the intercept metadata visible to the current caller. + * + * The metadata injected by the fiber that admits the access applies first, + * then intercepts added by ancestor contexts, closest to the root first. + * The values are combined with `[Service.mergeIntercept]`. + * + * @returns the merged metadata. + */ + [symbols.resolveIntercept](): T { + const values: T[] = [] let intercept = this.ctx[Context.intercept] - const configs: any[] = [] while (this.name in intercept) { if (Object.hasOwn(intercept, this.name)) { - configs.unshift(intercept[this.name]) + values.unshift(intercept[this.name]) } intercept = Object.getPrototypeOf(intercept) } - if (base) configs.unshift(base) - if (head) configs.push(head) - if (this['Config']?.merge) { - return this['Config'].merge(...configs) - } else { - return Object.assign({}, ...configs) - } + const value = locate((this as any)[symbols.caller] ?? this.ctx, this.name)?.fiber?.inject[this.name] + if (!isNullable(value)) values.unshift(value) + const merge = this[symbols.mergeIntercept] ?? Service.prototype[symbols.mergeIntercept] + return merge.apply(this, values) } static [Symbol.hasInstance](instance: any) { diff --git a/vendor/cordis/src/utils.ts b/vendor/cordis/src/utils.ts index 07f52e6477..4337b9d6c2 100644 --- a/vendor/cordis/src/utils.ts +++ b/vendor/cordis/src/utils.ts @@ -1,5 +1,6 @@ import { defineProperty } from '@deepseek-ai/cosmokit' -import type { Context, Service } from './index.ts' +import type { Context } from './context.ts' +import type { Service } from './service.ts' /** Ordered collection of disposable values with O(1) deletion by value. */ export class DisposableList { @@ -53,11 +54,12 @@ export const symbols = { caller: Symbol.for('cordis.caller'), receiver: Symbol.for('cordis.receiver'), original: Symbol.for('cordis.original'), - metadata: Symbol.for('cordis.metadata'), + decorator: Symbol.for('cordis.decorator'), initHooks: Symbol.for('cordis.initHooks'), checkProto: Symbol.for('cordis.checkProto'), // context symbols + root: Symbol.for('cordis.root') as typeof Context.root, effect: Symbol.for('cordis.effect') as typeof Context.effect, filter: Symbol.for('cordis.filter') as typeof Context.filter, isolate: Symbol.for('cordis.isolate') as typeof Context.isolate, @@ -66,11 +68,12 @@ export const symbols = { // service symbols init: Symbol.for('cordis.init') as typeof Service.init, check: Symbol.for('cordis.check') as typeof Service.check, - config: Symbol.for('cordis.config') as typeof Service.config, invoke: Symbol.for('cordis.invoke') as typeof Service.invoke, + metadata: Symbol.for('cordis.metadata') as typeof Service.metadata, extend: Symbol.for('cordis.extend') as typeof Service.extend, tracker: Symbol.for('cordis.tracker') as typeof Service.tracker, - resolveConfig: Symbol.for('cordis.resolveConfig') as typeof Service.resolveConfig, + mergeIntercept: Symbol.for('cordis.mergeIntercept') as typeof Service.mergeIntercept, + resolveIntercept: Symbol.for('cordis.resolveIntercept') as typeof Service.resolveIntercept, } const GeneratorFunction = function* () {}.constructor diff --git a/vendor/include/README.md b/vendor/include/README.md index ae01993dc8..1ce78ec9a9 100644 --- a/vendor/include/README.md +++ b/vendor/include/README.md @@ -44,7 +44,7 @@ Patches can insert entries or override fields on entries with a matching `id`. ## Patch composition and persistence -`applyEntryPatches(data, patches, warn)` uses the same upstream algorithm as mounting. It clones file entries even without patches and clones inserted entry lists before indexing them, so later patches can address inserted rows without mutating those input lists. `entryListSchema` exposes Include’s YAML dialect to configuration tools. Nested entry expressions remain literal until their owning Loader entry evaluates them. +`applyEntryPatches(data, patches, warn)` uses the same upstream algorithm as mounting. It clones file entries even without patches and clones inserted entry lists before indexing them, so later patches can address inserted rows without mutating those input lists. `parseEntryYaml(content)` and `stringifyEntryYaml(value, options)` read and write Include’s YAML dialect for configuration tools, and `entryYamlErrorPosition(error)` locates a parse error. `stringifyEntryYaml` writes repeated references in full instead of as aliases. Nested entry expressions remain literal until their owning Loader entry evaluates them. Tree mutations arrive through `commit(change)` and enter a journal. Include merges them with the latest file before writing; file edits win conflicts on the same fields and produce a diagnostic. Patch-owned fields and inserted entries update the parent Include’s patches instead of the included file. Invalid, missing or read-only files leave unsaved changes in memory. diff --git a/vendor/include/src/index.ts b/vendor/include/src/index.ts index 5dd86d50ec..ae489afeaa 100644 --- a/vendor/include/src/index.ts +++ b/vendor/include/src/index.ts @@ -21,9 +21,45 @@ const JsExpr = new yaml.Type('tag:yaml.org,2002:js', { represent: (data) => data['__jsExpr'], }) -/** YAML dialect preserving child-owned JavaScript expression nodes. */ -export const entryListSchema = yaml.JSON_SCHEMA.extend(JsExpr) -const schema = entryListSchema +const schema = yaml.JSON_SCHEMA.extend(JsExpr) + +/** Options for {@link stringifyEntryYaml}. */ +export interface EntryYamlStringifyOptions { + /** Column at which long scalars are folded; `-1` disables folding. Defaults to 80. */ + lineWidth?: number +} + +/** + * Parse text in Include's YAML dialect. A `!!js` scalar becomes a child-owned JavaScript expression node that stays + * literal until its owning Loader entry evaluates it. + * @param content - YAML source text. + * @returns the parsed value, or `undefined` for an empty document. + * @throws the parser's syntax error; {@link entryYamlErrorPosition} reads its location. + */ +export function parseEntryYaml(content: string): unknown { + return yaml.load(content, { schema }) +} + +/** + * Serialize a value in Include's YAML dialect. JavaScript expression nodes are written as `!!js` scalars. The output + * never contains anchors or aliases: repeated object references are written out in full, and no option changes this. + * @param value - entry list, patch list, or entry fragment to serialize. + * @param options - output formatting. + * @returns YAML text ending with a newline. + */ +export function stringifyEntryYaml(value: unknown, options: EntryYamlStringifyOptions = {}): string { + return yaml.dump(value, { schema, noRefs: true, lineWidth: options.lineWidth ?? 80 }) +} + +/** + * Locate a syntax error thrown by {@link parseEntryYaml}. + * @param error - any caught value; only a parse error thrown by {@link parseEntryYaml} yields a position. + * @returns the one-based line and column of the error, or `undefined` when the error carries no source location. + */ +export function entryYamlErrorPosition(error: unknown): { line: number; column: number } | undefined { + if (!(error instanceof yaml.YAMLException) || !error.mark) return undefined + return { line: error.mark.line + 1, column: error.mark.column + 1 } +} const types: Record = { '.json': 'application/json', @@ -133,7 +169,7 @@ export class Include extends EntryTree { } private warn = (format: string, ...args: any[]) => { - this.ctx.root.logger?.('loader').warn(format, ...args) + this.ctx[Context.root].logger?.('loader').warn(format, ...args) } async* [Service.init]() { @@ -255,7 +291,7 @@ export class Include extends EntryTree { let data: any try { data = this.type === 'application/yaml' - ? yaml.load(content, { schema }) + ? parseEntryYaml(content) : JSON.parse(content) } catch (error) { throw new ConfigFileError('parse', this.filename, error) diff --git a/vendor/loader/src/index.ts b/vendor/loader/src/index.ts index ac57527455..2a9e1bb9a3 100644 --- a/vendor/loader/src/index.ts +++ b/vendor/loader/src/index.ts @@ -75,7 +75,7 @@ export namespace Loader { * Subclasses provide persistence by implementing `commit(change)` on `EntryTree`. */ export class Loader extends EntryTree { - declare [Service.config]: Loader.Intercept + declare [Service.metadata]: Loader.Intercept public envData = process.env.CORDIS_SHARED ? JSON.parse(process.env.CORDIS_SHARED) @@ -181,14 +181,14 @@ export class Loader extends EntryTree { } [Service.check]() { - const config: Loader.Intercept = Service.prototype[Service.resolveConfig].call(this) + const config: Loader.Intercept = Service.prototype[Service.resolveIntercept].call(this) if (config.await && this.getTasks().length) return false return true } showLog(entry: Entry, type: string) { if (entry.options.group || !entry.parent.tree.enableLogs) return - this.ctx.root.logger?.('loader').info('%s plugin %C', type, entry.options.name) + this.ctx[Context.root].logger?.('loader').info('%s plugin %C', type, entry.options.name) } /** Return the loader entry id that owns `fiber`, if any. */