diff --git a/apps/web/tests/agent-team-panel.e2e.ts b/apps/web/tests/agent-team-panel.e2e.ts index fadccb85fb..3ac6e18bfe 100644 --- a/apps/web/tests/agent-team-panel.e2e.ts +++ b/apps/web/tests/agent-team-panel.e2e.ts @@ -8,7 +8,7 @@ import { afterAll, beforeAll, describe, expect, it, onTestFailed, onTestFinished import type {} from '@deepseek-ai/dsh-agent-team' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import { createMessage, createUserMessage } from '@deepseek-ai/dsh-llm' import { acknowledgeReloadConnectionLoss, assertFixtureInventory, captureStableAria, compareOrRefreshGolden, diff --git a/apps/web/tests/details-session-lifecycle.e2e.ts b/apps/web/tests/details-session-lifecycle.e2e.ts index e73eaa5d0b..05da4a6afa 100644 --- a/apps/web/tests/details-session-lifecycle.e2e.ts +++ b/apps/web/tests/details-session-lifecycle.e2e.ts @@ -10,7 +10,7 @@ import { fixtureUserPrompts, launchWebScaffold, seedSession, watchConsole, webSnapshotMode, type WebScaffold, } from './scaffold.ts' -import { connectFreshWorkspace, newEnglishPage, saveFailureShot } from './support.ts' +import { connectFreshWorkspace, fullscreenBox, newEnglishPage, saveFailureShot } from './support.ts' const SNAPSHOT_DIR = fileURLToPath(new URL('../../../snapshots/web/details-session-lifecycle', import.meta.url)) const HANDLES_EXPECTED = join(SNAPSHOT_DIR, 'handles.expected.md') @@ -110,8 +110,8 @@ async function sidebarSnapshot(page: Page) { mode: panel.getAttribute('data-sidebar-right-panel'), panelContentWidth: expanded ? Math.round(Number.parseFloat(style.width)) : 0, panelOuterWidth: expanded ? Math.round(rect.width) : 0, - coversViewport: expanded && rect.x === 0 && rect.y === 0 - && Math.round(rect.width) === window.innerWidth && Math.round(rect.height) === window.innerHeight, + coversViewport: expanded && rect.x === -1 && rect.y === 0 + && Math.round(rect.width) === window.innerWidth + 1 && Math.round(rect.height) === window.innerHeight, resizeHandleWidth: handle === null ? 0 : Math.round(handle.getBoundingClientRect().width), expandedDirectories: [...panel.querySelectorAll('[data-files-entry="directory"] button[aria-expanded="true"]')] .map(button => button.textContent?.trim()), @@ -195,7 +195,7 @@ describe.skipIf(MODE === 'record')('web e2e: details panel follows the current S await expect.poll(() => blankColumn.locator('[data-dockkit-host="dock"]:not([hidden])').evaluate(element => getComputedStyle(element).transform)) .toBe('none') await expect.poll(() => blankColumn.locator('[data-sidebar-right-panel]').boundingBox()) - .toEqual({ x: 0, y: 0, width: 767, height: blankViewport.height }) + .toEqual(fullscreenBox({ width: 767, height: blankViewport.height })) // A preview the files page opened starts with its tree hidden; shown, the tree fills the viewport. const treeToggle = blankColumn.locator('[data-files-navigator-toggle]') await expect.poll(() => treeToggle.getAttribute('aria-expanded')).toBe('false') @@ -360,7 +360,7 @@ describe.skipIf(MODE === 'record')('web e2e: details panel follows the current S await checkpoint('A normal: two panes') await column.locator('[data-sidebar-right-mode="fullscreen"]').click() - await expect.poll(() => panel.boundingBox()).toEqual({ x: 0, y: 0, ...viewport }) + await expect.poll(() => panel.boundingBox()).toEqual(fullscreenBox(viewport)) expect(await columns(page)).toEqual(normalColumns) expect(await sidebarSnapshot(page)).toMatchObject({ mode: 'fullscreen', resizeHandleWidth: 0, coversViewport: true }) expect(await paneSnapshot(page)).toEqual(retainedA) @@ -395,7 +395,7 @@ describe.skipIf(MODE === 'record')('web e2e: details panel follows the current S expect(await panel.getAttribute('data-sidebar-right-panel')).toBe('fullscreen') expect(await paneSnapshot(page)).toEqual(retainedA) await open() - await expect.poll(() => panel.boundingBox()).toEqual({ x: 0, y: 0, ...viewport }) + await expect.poll(() => panel.boundingBox()).toEqual(fullscreenBox(viewport)) expect(await paneSnapshot(page)).toEqual(retainedA) await checkpoint('A restored: manual fullscreen, tabs, and panes') await column.locator('[data-sidebar-right-mode="push"]').click() @@ -433,7 +433,7 @@ describe.skipIf(MODE === 'record')('web e2e: details panel follows the current S await page.locator('[data-sidebar-right-expand]').click() await expect.poll(() => columns(page)).toEqual([420, viewport.width - 420 - normalWidth, normalWidth]) await page.setViewportSize({ width: 767, height: viewport.height }) - await expect.poll(() => panel.boundingBox()).toEqual({ x: 0, y: 0, width: 767, height: viewport.height }) + await expect.poll(() => panel.boundingBox()).toEqual(fullscreenBox({ width: 767, height: viewport.height })) await expect.poll(() => columns(page)).toEqual([0, 767, 0]) expect(await sidebarSnapshot(page)).toMatchObject({ mode: 'fullscreen', resizeHandleWidth: 0, coversViewport: true }) await checkpoint('A automatic fullscreen at 767px') diff --git a/apps/web/tests/question-ptc.e2e.ts b/apps/web/tests/question-ptc.e2e.ts index fa8917e4c1..50d7a2c4cb 100644 --- a/apps/web/tests/question-ptc.e2e.ts +++ b/apps/web/tests/question-ptc.e2e.ts @@ -6,7 +6,7 @@ import type { Browser, Page } from 'playwright' import { chromium } from 'playwright' import { afterAll, beforeAll, describe, expect, it } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { ReplayEntry } from '@deepseek-ai/dsh-llm-replay' import type {} from '@deepseek-ai/dsh-tool-executor-ptc/types' import type { SessionEvent } from '@deepseek-ai/dsh-session' diff --git a/apps/web/tests/sidebar-right.e2e.ts b/apps/web/tests/sidebar-right.e2e.ts index 79c72a683c..c1027b1d54 100644 --- a/apps/web/tests/sidebar-right.e2e.ts +++ b/apps/web/tests/sidebar-right.e2e.ts @@ -26,7 +26,7 @@ import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest' import { createMessage, createUserMessage } from '@deepseek-ai/dsh-llm' import { acknowledgeReloadConnectionLoss, launchWebScaffold, watchConsole, type WebScaffold } from './scaffold.ts' import { - connectFreshWorkspace, newEnglishPage, saveFailureShot, ZH_BROWSER_LOCALE, + connectFreshWorkspace, fullscreenBox, newEnglishPage, saveFailureShot, ZH_BROWSER_LOCALE, } from './support.ts' /** The produced file the seeded turn writes, and what the preview should show. */ @@ -524,7 +524,7 @@ describe('web e2e: shipped right Sidebar', () => { expect(await width(column)).toBe(trackWidth) const viewport = page.viewportSize() if (viewport === null) throw new Error('expected a fixed viewport') - await expect.poll(async () => await panel.boundingBox()).toEqual({ x: 0, y: 0, ...viewport }) + await expect.poll(async () => await panel.boundingBox()).toEqual(fullscreenBox(viewport)) expect(await expandOf(page).count()).toBe(0) expect(await frame.locator('[data-side="rightbar"]').count()).toBe(0) await shot(page, '03-fullscreen-panel') @@ -558,7 +558,7 @@ describe('web e2e: shipped right Sidebar', () => { await frame.evaluate(async (node) => { await Promise.allSettled(node.getAnimations().map(animation => animation.finished)) }) const normalColumns = (await geometry()).columns await column.locator('[data-sidebar-right-mode="fullscreen"]').click() - await expect.poll(() => panel.boundingBox()).toEqual({ x: 0, y: 0, ...viewport }) + await expect.poll(() => panel.boundingBox()).toEqual(fullscreenBox(viewport)) await column.locator('[data-sidebar-right-toggle]').click() await Promise.all([ panel.evaluate(async (node) => { @@ -586,7 +586,7 @@ describe('web e2e: shipped right Sidebar', () => { await held.evaluate((state) => { (state.animation as Animation).finish() }) await expect.poll(() => frame.getAttribute('data-rightbar-fullscreen')).toBe('true') - expect(await panel.boundingBox()).toEqual({ x: 0, y: 0, ...viewport }) + expect(await panel.boundingBox()).toEqual(fullscreenBox(viewport)) expect(await geometry()).toEqual({ columns: normalColumns, transition: 'none', handles: ['none'], animatingGrid: false }) const exit = await holdPanelSlide(panel) @@ -621,7 +621,7 @@ describe('web e2e: shipped right Sidebar', () => { await expect.poll(() => frame.getAttribute('data-rightbar-fullscreen')).toBeNull() await expandOf(page).click() await expect.poll(() => frame.getAttribute('data-rightbar-fullscreen')).toBe('true') - expect(await panel.boundingBox()).toEqual({ x: 0, y: 0, ...viewport }) + expect(await panel.boundingBox()).toEqual(fullscreenBox(viewport)) expect((await geometry()).columns).toBe(normalColumns) expect((await geometry()).animatingGrid).toBe(false) } finally { @@ -733,7 +733,7 @@ describe('web e2e: shipped right Sidebar', () => { await page.setViewportSize({ width: 767, height: viewport.height }) await expect.poll(async () => await panel.getAttribute('data-sidebar-right-panel')).toBe('fullscreen') - await expect.poll(async () => await width(panel)).toBe(767) + await expect.poll(async () => await width(panel)).toBe(768) await expect.poll(() => frame.getAttribute('data-rightbar-fullscreen')).toBe('true') expect(await expandOf(page).count()).toBe(0) expect(await frame.locator('[data-side="rightbar"]').count()).toBe(0) diff --git a/apps/web/tests/support.ts b/apps/web/tests/support.ts index ecb8457bb7..c78ef64f6e 100644 --- a/apps/web/tests/support.ts +++ b/apps/web/tests/support.ts @@ -479,3 +479,13 @@ export async function openSettings(page: Page, locale: 'en' | 'zh' | 'ja'): Prom await trigger.click() await page.getByRole('menuitem', { name: labels[locale][1], exact: true }).click() } + +/** + * The right Sidebar's fullscreen panel box: 1px wider than the viewport, so the + * first column's divider sits past the window's left edge where the frame clips it. + * @param viewport - the page viewport size. + * @returns the panel's expected bounding box. + */ +export function fullscreenBox(viewport: { width: number; height: number }): { x: number; y: number; width: number; height: number } { + return { x: -1, y: 0, width: viewport.width + 1, height: viewport.height } +} diff --git a/benchmarks/active-stream-reconnect/reconnect.worker.client.ts b/benchmarks/active-stream-reconnect/reconnect.worker.client.ts index 6c7cad6e01..08786aed4f 100644 --- a/benchmarks/active-stream-reconnect/reconnect.worker.client.ts +++ b/benchmarks/active-stream-reconnect/reconnect.worker.client.ts @@ -2,7 +2,7 @@ import { performance } from 'node:perf_hooks' import { AssistantStreamAccumulator } from '@deepseek-ai/dsh-llm/assistant-stream' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/types' import type { SessionAssistantStreamBaseline } from '@deepseek-ai/dsh-api-session-controller/types' // The Client implementation has no plain-Node export; only this adapter is bundled. import { ClientAssistantStream } from '../../packages/api/session-controller/src/client/sessions/assistant-stream.ts' diff --git a/benchmarks/conversation-fold/conversation-fold.worker.client.ts b/benchmarks/conversation-fold/conversation-fold.worker.client.ts index af55bc5135..306424418a 100644 --- a/benchmarks/conversation-fold/conversation-fold.worker.client.ts +++ b/benchmarks/conversation-fold/conversation-fold.worker.client.ts @@ -4,7 +4,7 @@ import { performance } from 'node:perf_hooks' import { Context } from '@deepseek-ai/cordis' import { AssistantStreamAccumulator } from '@deepseek-ai/dsh-llm/assistant-stream' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId, ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId, ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { StreamChunk } from '@deepseek-ai/dsh-llm' import type { SessionEvent } from '@deepseek-ai/dsh-session/types' import type { ChatNode, ChatSnapshot } from '@deepseek-ai/dsh-client-ui-chat/client' diff --git a/docs/event-producer-consumer.md b/docs/event-producer-consumer.md index 0130da284e..a4a3f3687b 100644 --- a/docs/event-producer-consumer.md +++ b/docs/event-producer-consumer.md @@ -11,7 +11,7 @@ Application listeners are outside this package matrix. Desktop Host subscribes t | Event | Mode | Declared in | Dispatchers | Listeners | | --- | --- | --- | --- | --- | | `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:198`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - | -| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:66`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` | +| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:90`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` | | `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:400`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` | | `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:291`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-team`](../packages/team/agent-team), `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`tool-subagent`](../packages/subagent/tool-subagent) | | `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`action-cards`](../packages/experimental/action-cards), [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) | diff --git a/docs/event-producer-consumer.zh.md b/docs/event-producer-consumer.zh.md index 58806b4011..2b32730f71 100644 --- a/docs/event-producer-consumer.zh.md +++ b/docs/event-producer-consumer.zh.md @@ -13,7 +13,7 @@ | Event | Mode | Declared in | Dispatchers | Listeners | | --- | --- | --- | --- | --- | | `agent-loop/config-start-failed` | `emit` | [`packages/core/agent-loop/src/index.ts:198`](../packages/core/agent-loop/src/index.ts) | [`agent-loop`](../packages/core/agent-loop) (`events.dispatch`) | - | -| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:66`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` | +| `agent-preset/selected` | `emit` | [`packages/preset/agent-preset-registry/src/types.ts:90`](../packages/preset/agent-preset-registry/src/types.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`) | [`cua`](../packages/experimental/cua), `remotes` | | `agent/assistant-stream` | `emit` | [`packages/core/agent/src/runtime-types.ts:400`](../packages/core/agent/src/runtime-types.ts) | [`agent-loop`](../packages/core/agent-loop) (`emit`) | [`headless`](../packages/bundle/headless), `session-controller` | | `agent/created` | `serial` | [`packages/core/agent/src/runtime-types.ts:291`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`serial`) | [`agent-team`](../packages/team/agent-team), `browser-use-runtime`, `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`cua`](../packages/experimental/cua), [`file-reference-local`](../packages/context/file-reference-local), [`goal`](../packages/goal/goal), [`goal-round-driver`](../packages/goal/goal-round-driver), [`hooks-claude-code`](../packages/experimental/hooks-claude-code), [`hooks-codex`](../packages/experimental/hooks-codex), `liveshare`, [`loader-smoke`](../packages/test-support/loader-smoke), [`permission-presets`](../packages/interaction/permission-presets), `session-controller`, [`tool-subagent`](../packages/subagent/tool-subagent) | | `agent/disposed` | `emit` | [`packages/core/agent/src/runtime-types.ts:300`](../packages/core/agent/src/runtime-types.ts) | [`agent`](../packages/core/agent) (`events.dispatch`) | [`action-cards`](../packages/experimental/action-cards), [`agent-loop`](../packages/core/agent-loop), `claude-code-mods`, [`creation-recommendations`](../packages/experimental/creation-recommendations), [`file-reference-local`](../packages/context/file-reference-local), [`goal-round-driver`](../packages/goal/goal-round-driver), `server`, `session-controller`, [`subagent`](../packages/subagent/subagent), [`tool-office`](../packages/document/tool-office), [`tool-subagent-control`](../packages/subagent/tool-subagent-control) | diff --git a/docs/persistence-catalog.i18n.yaml b/docs/persistence-catalog.i18n.yaml index 12973fb6d4..efbba57cc2 100644 --- a/docs/persistence-catalog.i18n.yaml +++ b/docs/persistence-catalog.i18n.yaml @@ -993,17 +993,17 @@ en: 5341a464a13a03e4 zh: 24646b10e58ba2cd /session-persistence-event-catalog/resolved-persistence-types/assistantmessage: - en: 2a8bc13a30855b26 - zh: 87f1f5fd2882a411 + en: 6256529c68fa8a4a + zh: c6b36aa7ed6a6561 /session-persistence-event-catalog/resolved-persistence-types/assistantstreamrecord: - en: 144fc40c557c39fb - zh: 93edf73620f690bc + en: 06ea09d614a94006 + zh: 03ebd4893c9ac303 /session-persistence-event-catalog/resolved-persistence-types/assistantstreamrecord~2: en: e393deed01de3665 zh: 0fa98ad93c22ce79 /session-persistence-event-catalog/resolved-persistence-types/commandsource: - en: 459a6f8c8800d3e5 - zh: f1b2626c08c62b4d + en: 7130f07ad7ae38b4 + zh: 18a5ab4fbd7c767d /session-persistence-event-catalog/resolved-persistence-types/compactioncheckpointsource: en: 0795c7736e079322 zh: b95c1b8790851588 @@ -1017,8 +1017,8 @@ en: 9207aa0489ccf8db zh: 850dd92da6769998 /session-persistence-event-catalog/resolved-persistence-types/contextsnapshotsection: - en: 09c25cb603f1253e - zh: be9ac4ac394dc1fc + en: b1ee86f2cffbf211 + zh: c829b0ddfef06ea8 /session-persistence-event-catalog/resolved-persistence-types/contextsnapshotsection~2: en: 6e11a7855b002f20 zh: d752566bb2b75948 @@ -1029,8 +1029,8 @@ en: 8cc704c4048167a7 zh: d27823620065ad25 /session-persistence-event-catalog/resolved-persistence-types/developermessage: - en: b91fd6f924b6d84e - zh: c74abb179c889ed6 + en: 103da29240708c4d + zh: b4b7d45cd6e458e5 /session-persistence-event-catalog/resolved-persistence-types/epochheader: en: 3bdc8ecd0bdf0c9c zh: 0fe5b75c174ebab4 @@ -1128,11 +1128,11 @@ en: d2a3b6594fc71ea0 zh: a5a7df42594fdb57 /session-persistence-event-catalog/resolved-persistence-types/llmcallconfig: - en: 620752606b81ad3b - zh: 336903c12d1d3bdc + en: 2f81218010fc1150 + zh: db716025bc33f483 /session-persistence-event-catalog/resolved-persistence-types/llmcallconfigadapterdefaults: - en: 8f669d7819805099 - zh: 391d51d7835afe02 + en: e977e22261e0761c + zh: 4b2a6434d475dfe3 /session-persistence-event-catalog/resolved-persistence-types/llmfailure: en: 1c1591ce9b3cc186 zh: 74ebe1b8c58e87d7 @@ -1143,8 +1143,8 @@ en: fdd00b0eb42e499d zh: a6dc05d9a0a8f39e /session-persistence-event-catalog/resolved-persistence-types/message: - en: 0a728ea7fb7a297e - zh: 9539ccd702170fa6 + en: 56f33deeab3f3c80 + zh: 872475dd48fe13a1 /session-persistence-event-catalog/resolved-persistence-types/messagefeedbackdelete: en: c582953270d4ca44 zh: 966ccfe2e7660a2a @@ -1158,14 +1158,14 @@ en: 1918aad92fd51fc9 zh: c36696f1b77baa7d /session-persistence-event-catalog/resolved-persistence-types/messagesource: - en: 80d51b79557bc4d8 - zh: e7a9721b8b3ea9f3 + en: c8eb3f3f75734433 + zh: 9c4dd71eaab4a5bc /session-persistence-event-catalog/resolved-persistence-types/message~2: en: 7106ebd39f6cd290 zh: 4e36b5377d222a0a /session-persistence-event-catalog/resolved-persistence-types/modelmessagesource: - en: 5f9154ca34235ab9 - zh: a833105910ebfa82 + en: 65a618e2ec94bbc4 + zh: 622197f4b127068b /session-persistence-event-catalog/resolved-persistence-types/modelselection: en: 6e301c0ea35d9e0e zh: 6fbf1d318db9a4e0 @@ -1260,11 +1260,11 @@ en: 737806b6ec54263d zh: b4e44293950ddf8c /session-persistence-event-catalog/resolved-persistence-types/systemmessage: - en: 94876079d6696df9 - zh: d25c7ad9f5054eb7 + en: f689bc49f7561a5d + zh: c5eeb6590dcdf42d /session-persistence-event-catalog/resolved-persistence-types/systempromptmessagesource: - en: 967c82dcda03d0d4 - zh: ad590611be701d97 + en: d325b34f94e9c4e8 + zh: 11db81c2aba9d275 /session-persistence-event-catalog/resolved-persistence-types/teammemberphase: en: bf78ae1a14d64469 zh: 0d5c34aff23a133c @@ -1302,8 +1302,8 @@ en: d7478804801b52a4 zh: 27287739a5874fdd /session-persistence-event-catalog/resolved-persistence-types/toolmessagesource: - en: 036b2595215410bb - zh: 41792808ebac1fa3 + en: f3f2db82e7eb5668 + zh: 8e159d1f8122156f /session-persistence-event-catalog/resolved-persistence-types/toolremovalblock: en: 0080c345c319a4b5 zh: de1a8b3ed621ce21 @@ -1311,8 +1311,8 @@ en: b2488366535b5fdc zh: b64d50345521eb99 /session-persistence-event-catalog/resolved-persistence-types/toolresultmessage: - en: 2258683c3cfa4ce3 - zh: 5663aa76c911761b + en: 49fcbb63c824347e + zh: 187486d676edfe0e /session-persistence-event-catalog/resolved-persistence-types/toolschema: en: afa1e3fd9ccdd95b zh: 7af667e3ebac25e8 @@ -1338,8 +1338,8 @@ en: 50736659a0e79990 zh: 34ebfd42a70069e3 /session-persistence-event-catalog/resolved-persistence-types/usermessage: - en: 92cc51a395ca7c7b - zh: 4bd6029ea1241e25 + en: e623e26208294712 + zh: d3c837902528211a /session-persistence-event-catalog/resolved-persistence-types/usermessage~2: en: f36c65420460fcf1 zh: 4208e6734c0672df @@ -1368,8 +1368,8 @@ en: 7660c41e4129b466 zh: bcbb1b15cb872214 /session-persistence-event-catalog/resolved-persistence-types/string: - en: e855396a65482550 - zh: 0729e0b86b4d9681 + en: 0bd8cec4019a5ad5 + zh: c6cc79ce5aa844c4 /session-persistence-event-catalog/resolved-persistence-types/string~2: en: 0089620bf4638263 zh: 1922bef1713094bb @@ -2013,8 +2013,8 @@ en: 56230efa41e79869 zh: 9ca4b8990a28d4d9 /session-persistence-event-catalog/resolved-persistence-types/type-chunk: - en: 2186ede3e9917aea - zh: 0cfef64045dce95b + en: 4b0ed1fe2caa26fb + zh: 8fffdc4f8c3deb79 /session-persistence-event-catalog/resolved-persistence-types/type-command-done: en: 1a28f9fcd1818880 zh: 6d1ed0ec06272e65 @@ -2088,8 +2088,8 @@ en: 8cfacba0b814f1aa zh: a9ee7804452fef23 /session-persistence-event-catalog/resolved-persistence-types/type-reasoning-chunks: - en: 34e5591d75322649 - zh: a216839f305c9796 + en: 4bf62582902829c5 + zh: c9da9d11402ee1c4 /session-persistence-event-catalog/resolved-persistence-types/type-reasoning-delta: en: a3f08ffda3526201 zh: e599517be130ff99 @@ -2151,8 +2151,8 @@ en: 722aa2e9b1ce6425 zh: b18eb3b53d619e85 /session-persistence-event-catalog/resolved-persistence-types/type-text-chunks: - en: 1484738718de5312 - zh: 3e6fbe9c64068225 + en: 28bab22053eabff2 + zh: 54c0e424fcb99c05 /session-persistence-event-catalog/resolved-persistence-types/type-text-delta: en: 5f30a603fab07135 zh: 3b7e2076351a1473 @@ -2160,8 +2160,8 @@ en: 2fa7ba77598a95b4 zh: 50972b51d77e9155 /session-persistence-event-catalog/resolved-persistence-types/type-tool-call-chunks: - en: 32f732b97739e4d2 - zh: f288e48e356969c0 + en: 45ff4145d9e2c7d4 + zh: 36a346ff729c4b84 /session-persistence-event-catalog/resolved-persistence-types/type-tool-call-delta: en: 0e907728f330a8c7 zh: d9d1400d4c468ab2 diff --git a/docs/persistence-catalog.md b/docs/persistence-catalog.md index 32249cc9d0..491e852cc0 100644 --- a/docs/persistence-catalog.md +++ b/docs/persistence-catalog.md @@ -3237,7 +3237,7 @@ One of: SHA-256: `fa87537f4a9c1e25602990a8bf686b383e9e00352ec8946e16ae24ba7c1625be` -Sources: [`packages/llm/llm/src/message.ts:167`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:166`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -3256,7 +3256,7 @@ Sources: [`packages/llm/llm/src/message.ts:167`](../packages/llm/llm/src/message SHA-256: `33341aac09312300de5a178e6cc6f6544a4876f7f710cfea55eda473c8d329ef` -Sources: [`packages/llm/llm/src/assistant-stream.ts:20`](../packages/llm/llm/src/assistant-stream.ts) +Sources: [`packages/llm/llm/src/assistant-stream.ts:19`](../packages/llm/llm/src/assistant-stream.ts) One of: @@ -3283,7 +3283,7 @@ Array of [`AssistantStreamRecord`](#persistence-type-sha256-33341aac09312300de5a SHA-256: `ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05` -Sources: [`packages/core/session/src/types.ts:195`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:111`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) +Sources: [`packages/core/session/src/types.ts:195`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:110`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) | Property | Presence | Type | |---|---|---| @@ -3369,7 +3369,7 @@ Array of [`ContentBlock`](#persistence-type-sha256-8064c03c87c357fd1575cb9395ce8 SHA-256: `86e1e384495ee09ac2d60c9db3610f1f1fddac2d248f6f1d6000e78054680219` -Sources: [`packages/llm/llm/src/message.ts:70`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:69`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -3436,7 +3436,7 @@ Sources: [`packages/web/web-search-deepseek/src/provider.ts:55`](../packages/web SHA-256: `824b1d4d4f007bdaa5eee7994a5db3ede7707c6cd2bf8e2509be176c7609e3bc` -Sources: [`packages/llm/llm/src/message.ts:157`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:156`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -4057,7 +4057,7 @@ Sources: [`packages/schedule/schedule/src/types.ts:185`](../packages/schedule/sc SHA-256: `67d5f73ceae82f5265258142ad6cf172de2c1fef93ba551b7f0454e0a93bffe0` -Sources: [`packages/llm/llm/src/call-config.ts:31`](../packages/llm/llm/src/call-config.ts) +Sources: [`packages/llm/llm/src/call-config.ts:30`](../packages/llm/llm/src/call-config.ts) | Property | Presence | Type | |---|---|---| @@ -4078,7 +4078,7 @@ Sources: [`packages/llm/llm/src/call-config.ts:31`](../packages/llm/llm/src/call SHA-256: `326a9bfda27dda5882fb3cbe6e715df41dae2298fdae3d66437457268a665693` -Sources: [`packages/llm/llm/src/call-config.ts:54`](../packages/llm/llm/src/call-config.ts) +Sources: [`packages/llm/llm/src/call-config.ts:53`](../packages/llm/llm/src/call-config.ts) | Property | Presence | Type | |---|---|---| @@ -4152,7 +4152,7 @@ Sources: [`packages/llm/llm-retry/src/types.ts:43`](../packages/llm/llm-retry/sr SHA-256: `c51f0d0a405bb96fcb008c0dc560a512dcd8c3919b6b446937f449ea2f7d21d8` -Sources: [`packages/llm/llm/src/message.ts:196`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:195`](../packages/llm/llm/src/message.ts) One of: @@ -4245,7 +4245,7 @@ One of: SHA-256: `dca3ba43188095fa7342e49e6c206d4685125497d4767595bf12a62ea2fd73ce` -Sources: [`packages/llm/llm/src/message.ts:136`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:135`](../packages/llm/llm/src/message.ts) | kind | Form property | Other required fields | Full definition | |---|---|---|---| @@ -4387,7 +4387,7 @@ Array of [`Message`](#persistence-type-sha256-c51f0d0a405bb96fcb008c0dc560a512dc SHA-256: `719c51f67074f97034a6c94297fe1f4b5d3c8d392c57586dab732aa5398c7a91` -Sources: [`packages/llm/llm/src/message.ts:24`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:23`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -4977,7 +4977,7 @@ One of: SHA-256: `09f3f8dc417f278257202714132f98ba7b52957d7b558c4a04456603890eb363` -Sources: [`packages/llm/llm/src/message.ts:151`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:150`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -4996,7 +4996,7 @@ Sources: [`packages/llm/llm/src/message.ts:151`](../packages/llm/llm/src/message SHA-256: `65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad` -Sources: [`packages/llm/llm/src/message.ts:35`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:34`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -5235,7 +5235,7 @@ Sources: [`packages/llm/llm/src/types.ts:112`](../packages/llm/llm/src/types.ts) SHA-256: `d9c462b9f62fdd3efc76a44b9524dc8781f6b91cd9c7e584b17d971defafebab` -Sources: [`packages/llm/llm/src/message.ts:29`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:28`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -5286,7 +5286,7 @@ Sources: [`packages/core/tools/src/contracts.ts:395`](../packages/core/tools/src SHA-256: `4b259f7f8f0a44ad5e90b70a73553ced1df27012d126921d397ff403b6c86731` -Sources: [`packages/llm/llm/src/message.ts:173`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:172`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -5448,7 +5448,7 @@ Sources: [`packages/core/session/src/types.ts:238`](../packages/core/session/src SHA-256: `74e0e5885d2ddf04530ddf341b25cd65e1f85c00b30a88bd992f11fc06615a0c` -Sources: [`packages/llm/llm/src/message.ts:162`](../packages/llm/llm/src/message.ts) +Sources: [`packages/llm/llm/src/message.ts:161`](../packages/llm/llm/src/message.ts) | Property | Presence | Type | |---|---|---| @@ -5657,7 +5657,7 @@ Array of `number`. SHA-256: `4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b` -Sources: [`packages/api/session-controller/src/types.ts:391`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:21`](../packages/core/session/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:31`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/jobs/jobs/src/brand.ts:19`](../packages/jobs/jobs/src/brand.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/team/agent-team/src/types.ts:20`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:32`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:8`](../packages/team/agent-team/src/types.ts) · [`packages/workflow/workflow/src/types.ts:14`](../packages/workflow/workflow/src/types.ts) +Sources: [`packages/api/session-controller/src/types.ts:391`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:21`](../packages/core/session/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:22`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/jobs/jobs/src/brand.ts:9`](../packages/jobs/jobs/src/brand.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/team/agent-team/src/types.ts:20`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:32`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:8`](../packages/team/agent-team/src/types.ts) · [`packages/workflow/workflow/src/types.ts:14`](../packages/workflow/workflow/src/types.ts) `string` @@ -8342,7 +8342,7 @@ Sources: [`packages/llm/llm/src/types.ts:497`](../packages/llm/llm/src/types.ts) SHA-256: `487b65c37bfedb8b72088c4107a0a90a6249701f6b26745f6d98f9b8a22b07c7` -Sources: [`packages/llm/llm/src/assistant-stream.ts:44`](../packages/llm/llm/src/assistant-stream.ts) +Sources: [`packages/llm/llm/src/assistant-stream.ts:43`](../packages/llm/llm/src/assistant-stream.ts) | Property | Presence | Type | |---|---|---| @@ -8736,7 +8736,7 @@ SHA-256: `a7cf43ce7c2a4c038feed1885cd7a00d5c6ee2d90a7e0d56b46f78a3e1ca327f` SHA-256: `71bb3254ec8f1e491ce63b762a7b5f18709de23aa4e8abcc8b886f4b6ce051dd` -Sources: [`packages/llm/llm/src/assistant-stream.ts:28`](../packages/llm/llm/src/assistant-stream.ts) +Sources: [`packages/llm/llm/src/assistant-stream.ts:27`](../packages/llm/llm/src/assistant-stream.ts) | Property | Presence | Type | |---|---|---| @@ -9072,7 +9072,7 @@ SHA-256: `bca0f9cb63d8620b6954bb045b07bb07cb557513a7f0e2e177f5e87f704e7ba7` SHA-256: `e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33` -Sources: [`packages/llm/llm/src/assistant-stream.ts:21`](../packages/llm/llm/src/assistant-stream.ts) +Sources: [`packages/llm/llm/src/assistant-stream.ts:20`](../packages/llm/llm/src/assistant-stream.ts) | Property | Presence | Type | |---|---|---| @@ -9118,7 +9118,7 @@ SHA-256: `b978cff734e62143eb56c9125423ec275405eda969802d42aaf73ecb987d3b26` SHA-256: `3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6` -Sources: [`packages/llm/llm/src/assistant-stream.ts:35`](../packages/llm/llm/src/assistant-stream.ts) +Sources: [`packages/llm/llm/src/assistant-stream.ts:34`](../packages/llm/llm/src/assistant-stream.ts) | Property | Presence | Type | |---|---|---| diff --git a/docs/persistence-catalog.zh.md b/docs/persistence-catalog.zh.md index ce31c94bb5..f79b98e2d6 100644 --- a/docs/persistence-catalog.zh.md +++ b/docs/persistence-catalog.zh.md @@ -3239,7 +3239,7 @@ SHA-256: `05d2ae1e0c7f8770f83f9a09047afb39a335d8ac986df3193659aa1e581472cf` SHA-256: `fa87537f4a9c1e25602990a8bf686b383e9e00352ec8946e16ae24ba7c1625be` -来源:[`packages/llm/llm/src/message.ts:167`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:166`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -3258,7 +3258,7 @@ SHA-256: `fa87537f4a9c1e25602990a8bf686b383e9e00352ec8946e16ae24ba7c1625be` SHA-256: `33341aac09312300de5a178e6cc6f6544a4876f7f710cfea55eda473c8d329ef` -来源:[`packages/llm/llm/src/assistant-stream.ts:20`](../packages/llm/llm/src/assistant-stream.ts) +来源:[`packages/llm/llm/src/assistant-stream.ts:19`](../packages/llm/llm/src/assistant-stream.ts) 以下类型之一: @@ -3285,7 +3285,7 @@ SHA-256: `84bbfdce7d2eab5b0c53e72ff7406db856c8bfd621b965b72fd86598ba493bf7` SHA-256: `ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05` -来源:[`packages/core/session/src/types.ts:195`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:111`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) +来源:[`packages/core/session/src/types.ts:195`](../packages/core/session/src/types.ts) · [`packages/interaction/commands/src/types.ts:75`](../packages/interaction/commands/src/types.ts) · [`packages/interaction/commands/src/types.ts:79`](../packages/interaction/commands/src/types.ts) · [`packages/llm/llm/src/message.ts:110`](../packages/llm/llm/src/message.ts) · [`packages/session/session-title/src/types.ts:35`](../packages/session/session-title/src/types.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -3371,7 +3371,7 @@ SHA-256: `b52f215a6cd691058a3413c12f161fa3b563a2f4895adb3df6f744ec4b0a6ef1` SHA-256: `86e1e384495ee09ac2d60c9db3610f1f1fddac2d248f6f1d6000e78054680219` -来源:[`packages/llm/llm/src/message.ts:70`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:69`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -3438,7 +3438,7 @@ SHA-256: `abd6ca62a5ab166553848324a23fef90eed7f59c8021bd63e7ea5bc6fd666b0c` SHA-256: `824b1d4d4f007bdaa5eee7994a5db3ede7707c6cd2bf8e2509be176c7609e3bc` -来源:[`packages/llm/llm/src/message.ts:157`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:156`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -4059,7 +4059,7 @@ SHA-256: `4b1e632e05776982a2d21c25a50c7c04c199d311c5675218fa73ff9fe30d22cd` SHA-256: `67d5f73ceae82f5265258142ad6cf172de2c1fef93ba551b7f0454e0a93bffe0` -来源:[`packages/llm/llm/src/call-config.ts:31`](../packages/llm/llm/src/call-config.ts) +来源:[`packages/llm/llm/src/call-config.ts:30`](../packages/llm/llm/src/call-config.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -4080,7 +4080,7 @@ SHA-256: `67d5f73ceae82f5265258142ad6cf172de2c1fef93ba551b7f0454e0a93bffe0` SHA-256: `326a9bfda27dda5882fb3cbe6e715df41dae2298fdae3d66437457268a665693` -来源:[`packages/llm/llm/src/call-config.ts:54`](../packages/llm/llm/src/call-config.ts) +来源:[`packages/llm/llm/src/call-config.ts:53`](../packages/llm/llm/src/call-config.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -4154,7 +4154,7 @@ SHA-256: `6f72ece8f317cd080c4f20a93f1bf709965f5b81ac4669528f5a023191cfcf20` SHA-256: `c51f0d0a405bb96fcb008c0dc560a512dcd8c3919b6b446937f449ea2f7d21d8` -来源:[`packages/llm/llm/src/message.ts:196`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:195`](../packages/llm/llm/src/message.ts) 以下类型之一: @@ -4247,7 +4247,7 @@ SHA-256: `390eed1028aba02774f14408647acec10ec5516e97d4f15ecde2b9989d5a69f2` SHA-256: `dca3ba43188095fa7342e49e6c206d4685125497d4767595bf12a62ea2fd73ce` -来源:[`packages/llm/llm/src/message.ts:136`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:135`](../packages/llm/llm/src/message.ts) | kind | form 属性 | 其他必需字段 | 完整定义 | |---|---|---|---| @@ -4389,7 +4389,7 @@ SHA-256: `42e2ff61928fb7dfaf0f057d61686f3a32ff713da419d12d4f250efc96733fe0` SHA-256: `719c51f67074f97034a6c94297fe1f4b5d3c8d392c57586dab732aa5398c7a91` -来源:[`packages/llm/llm/src/message.ts:24`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:23`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -4979,7 +4979,7 @@ SHA-256: `335e242de1fcc17b6ca920fc420d71bec2d76e53e37955c00948b65ab77f05c5` SHA-256: `09f3f8dc417f278257202714132f98ba7b52957d7b558c4a04456603890eb363` -来源:[`packages/llm/llm/src/message.ts:151`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:150`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -4998,7 +4998,7 @@ SHA-256: `09f3f8dc417f278257202714132f98ba7b52957d7b558c4a04456603890eb363` SHA-256: `65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad` -来源:[`packages/llm/llm/src/message.ts:35`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:34`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -5237,7 +5237,7 @@ SHA-256: `c1f0f17b6493b85db6453bb30e01b208d703731b25bc1e68e5d4fc72eea9cdea` SHA-256: `d9c462b9f62fdd3efc76a44b9524dc8781f6b91cd9c7e584b17d971defafebab` -来源:[`packages/llm/llm/src/message.ts:29`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:28`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -5288,7 +5288,7 @@ SHA-256: `3cfc3a56502da1f8c6153c2c56657bab4b749056968634dd0991d325ec1c919f` SHA-256: `4b259f7f8f0a44ad5e90b70a73553ced1df27012d126921d397ff403b6c86731` -来源:[`packages/llm/llm/src/message.ts:173`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:172`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -5450,7 +5450,7 @@ SHA-256: `f1687f982fa3d41ef29e159feed154ecd13af4dd209acaee16038f223f2e9402` SHA-256: `74e0e5885d2ddf04530ddf341b25cd65e1f85c00b30a88bd992f11fc06615a0c` -来源:[`packages/llm/llm/src/message.ts:162`](../packages/llm/llm/src/message.ts) +来源:[`packages/llm/llm/src/message.ts:161`](../packages/llm/llm/src/message.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -5659,7 +5659,7 @@ SHA-256: `5d03ba38734809bcbd2a55221bd938b3b3fc34b49bb686c6113e9e4931e3aa78` SHA-256: `4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b` -来源:[`packages/api/session-controller/src/types.ts:391`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:21`](../packages/core/session/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:31`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/jobs/jobs/src/brand.ts:19`](../packages/jobs/jobs/src/brand.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/team/agent-team/src/types.ts:20`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:32`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:8`](../packages/team/agent-team/src/types.ts) · [`packages/workflow/workflow/src/types.ts:14`](../packages/workflow/workflow/src/types.ts) +来源:[`packages/api/session-controller/src/types.ts:391`](../packages/api/session-controller/src/types.ts) · [`packages/attachment/attachment/src/brand.ts:6`](../packages/attachment/attachment/src/brand.ts) · [`packages/compaction/compaction/src/brand.ts:4`](../packages/compaction/compaction/src/brand.ts) · [`packages/core/session/src/types.ts:21`](../packages/core/session/src/types.ts) · [`packages/experimental/webhook/src/brand.ts:12`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:6`](../packages/experimental/webhook/src/brand.ts) · [`packages/experimental/webhook/src/brand.ts:9`](../packages/experimental/webhook/src/brand.ts) · [`packages/feedback/message-feedback/src/types.ts:14`](../packages/feedback/message-feedback/src/types.ts) · [`packages/goal/goal/src/types.ts:17`](../packages/goal/goal/src/types.ts) · [`packages/interaction/commands/src/brand.ts:22`](../packages/interaction/commands/src/brand.ts) · [`packages/interaction/user-approval/src/types.ts:17`](../packages/interaction/user-approval/src/types.ts) · [`packages/jobs/jobs/src/brand.ts:9`](../packages/jobs/jobs/src/brand.ts) · [`packages/llm/llm-retry/src/brand.ts:4`](../packages/llm/llm-retry/src/brand.ts) · [`packages/llm/llm/src/brand.ts:16`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:31`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:43`](../packages/llm/llm/src/brand.ts) · [`packages/llm/llm/src/brand.ts:67`](../packages/llm/llm/src/brand.ts) · [`packages/schedule/schedule/src/types.ts:14`](../packages/schedule/schedule/src/types.ts) · [`packages/session/session-title/src/types.ts:17`](../packages/session/session-title/src/types.ts) · [`packages/team/agent-team/src/types.ts:20`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:32`](../packages/team/agent-team/src/types.ts) · [`packages/team/agent-team/src/types.ts:8`](../packages/team/agent-team/src/types.ts) · [`packages/workflow/workflow/src/types.ts:14`](../packages/workflow/workflow/src/types.ts) `string` @@ -8344,7 +8344,7 @@ SHA-256: `3bec87f9e6ab3da03346f49923d3c51621debc0159df68605e543c3b2a026f90` SHA-256: `487b65c37bfedb8b72088c4107a0a90a6249701f6b26745f6d98f9b8a22b07c7` -来源:[`packages/llm/llm/src/assistant-stream.ts:44`](../packages/llm/llm/src/assistant-stream.ts) +来源:[`packages/llm/llm/src/assistant-stream.ts:43`](../packages/llm/llm/src/assistant-stream.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -8738,7 +8738,7 @@ SHA-256: `a7cf43ce7c2a4c038feed1885cd7a00d5c6ee2d90a7e0d56b46f78a3e1ca327f` SHA-256: `71bb3254ec8f1e491ce63b762a7b5f18709de23aa4e8abcc8b886f4b6ce051dd` -来源:[`packages/llm/llm/src/assistant-stream.ts:28`](../packages/llm/llm/src/assistant-stream.ts) +来源:[`packages/llm/llm/src/assistant-stream.ts:27`](../packages/llm/llm/src/assistant-stream.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -9074,7 +9074,7 @@ SHA-256: `bca0f9cb63d8620b6954bb045b07bb07cb557513a7f0e2e177f5e87f704e7ba7` SHA-256: `e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33` -来源:[`packages/llm/llm/src/assistant-stream.ts:21`](../packages/llm/llm/src/assistant-stream.ts) +来源:[`packages/llm/llm/src/assistant-stream.ts:20`](../packages/llm/llm/src/assistant-stream.ts) | 属性 | 存在性 | 类型 | |---|---|---| @@ -9120,7 +9120,7 @@ SHA-256: `b978cff734e62143eb56c9125423ec275405eda969802d42aaf73ecb987d3b26` SHA-256: `3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6` -来源:[`packages/llm/llm/src/assistant-stream.ts:35`](../packages/llm/llm/src/assistant-stream.ts) +来源:[`packages/llm/llm/src/assistant-stream.ts:34`](../packages/llm/llm/src/assistant-stream.ts) | 属性 | 存在性 | 类型 | |---|---|---| diff --git a/docs/persistence-schema.json b/docs/persistence-schema.json index b9900aa387..ef7836f96a 100644 --- a/docs/persistence-schema.json +++ b/docs/persistence-schema.json @@ -83,7 +83,7 @@ {"digest":"07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235","names":["packages/session/session-title/src/types.ts#SessionTitleModelIdentity","packages/subagent/tool-subagent/src/model-selection.ts#AllowedModelRoute"],"sources":["packages/session/session-title/src/types.ts:20","packages/subagent/tool-subagent/src/model-selection.ts:12"]}, {"digest":"07eccc9ea2f9b5439d76cc77d5e062936677d43f07a23da749819b0a22ee36b7","names":[],"sources":[]}, {"digest":"09655b34d7f3cf1e9005974de2357de2d4a60deea165d16dac1eadaa6ec539a8","names":[],"sources":[]}, - {"digest":"09f3f8dc417f278257202714132f98ba7b52957d7b558c4a04456603890eb363","names":["packages/llm/llm/src/message.ts#SystemMessage"],"sources":["packages/llm/llm/src/message.ts:151"]}, + {"digest":"09f3f8dc417f278257202714132f98ba7b52957d7b558c4a04456603890eb363","names":["packages/llm/llm/src/message.ts#SystemMessage"],"sources":["packages/llm/llm/src/message.ts:150"]}, {"digest":"0a30c3be336cdd4f8f34e66543a3d46d611c43986edd9b3ce6cbb9b721d3b5d3","names":[],"sources":["packages/core/session/src/types.ts:209"]}, {"digest":"0a8a062bc9c3c0d97fd97742262f2ea53dd32297f834e81114870d38ac3dc6da","names":[],"sources":[]}, {"digest":"0a92c5bdfa06c2e2615b777728f3aa95f408d43b9012e7b754568311251db623","names":[],"sources":["packages/experimental/liveshare/src/host/viewer-principal.ts:29"]}, @@ -196,9 +196,9 @@ {"digest":"312aee2f0c42aabbae6cc60d92d596d8453c0aeb061c5868d1755a69ef49e69a","names":[],"sources":[]}, {"digest":"31907de9563751822af6d9be02bafaf26faa098bbd1cb412524134d577cc1648","names":["packages/compaction/compaction/src/checkpoint.ts#CompactionCheckpointSource"],"sources":["packages/compaction/compaction/src/checkpoint.ts:21"]}, {"digest":"3247e566f4340029325b70e4366b56fa9719977f1e39033b769a2ec221ab22a9","names":[],"sources":[]}, - {"digest":"326a9bfda27dda5882fb3cbe6e715df41dae2298fdae3d66437457268a665693","names":["packages/llm/llm/src/call-config.ts#LlmCallConfigAdapterDefaults"],"sources":["packages/llm/llm/src/call-config.ts:54"]}, + {"digest":"326a9bfda27dda5882fb3cbe6e715df41dae2298fdae3d66437457268a665693","names":["packages/llm/llm/src/call-config.ts#LlmCallConfigAdapterDefaults"],"sources":["packages/llm/llm/src/call-config.ts:53"]}, {"digest":"3305a4bb6b6c29b482ba91d59c60b47e8f98282d3dacc8c29e4a4c2712209bdd","names":[],"sources":[]}, - {"digest":"33341aac09312300de5a178e6cc6f6544a4876f7f710cfea55eda473c8d329ef","names":["packages/llm/llm/src/assistant-stream.ts#AssistantStreamRecord"],"sources":["packages/llm/llm/src/assistant-stream.ts:20"]}, + {"digest":"33341aac09312300de5a178e6cc6f6544a4876f7f710cfea55eda473c8d329ef","names":["packages/llm/llm/src/assistant-stream.ts#AssistantStreamRecord"],"sources":["packages/llm/llm/src/assistant-stream.ts:19"]}, {"digest":"335e242de1fcc17b6ca920fc420d71bec2d76e53e37955c00948b65ab77f05c5","names":["packages/core/session/src/types.ts#SurfaceOp"],"sources":["packages/core/session/src/types.ts:470"]}, {"digest":"347de3380f2da308d0c74e08821f9e85559f55af4c5010795b110d00f7fc9dbd","names":[],"sources":[]}, {"digest":"34d1ab5c5df378186d6054b1a1beea9a41e41965d6f336f0bc0025c441a82e66","names":[],"sources":[]}, @@ -210,7 +210,7 @@ {"digest":"37cbc9cf06d494cfe5c67f078af1605eacb8e4c2c853e9e26455b73de0ee7ccf","names":[],"sources":[]}, {"digest":"37ff65426bcf130f045d3a59ef2a4648eb170cd30280cbd024108a2e9b4401d1","names":[],"sources":["packages/web/web-search-deepseek/src/provider.ts:82"]}, {"digest":"383cf73ae4748e5beb281ae74857ba1ffb92ae01075b9fbf51af78b666007a8f","names":[],"sources":[]}, - {"digest":"3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:35"]}, + {"digest":"3860b4757d512a2869be833acb0faf834335b1b056bf3f83df5474dce95f8fa6","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:34"]}, {"digest":"390eed1028aba02774f14408647acec10ec5516e97d4f15ecde2b9989d5a69f2","names":["packages/feedback/message-feedback/src/types.ts#MessageFeedbackRating"],"sources":["packages/feedback/message-feedback/src/types.ts:17"]}, {"digest":"39cf2d3ff8bac81c62d49ac2ba38a095b18e80f3ad700819fa1f650a4e60197f","names":["packages/jobs/jobs/src/types.ts#JobToolCall"],"sources":["packages/jobs/jobs/src/types.ts:16"]}, {"digest":"3b04790e08b35241ffa0d38f6d7e4f8788aa921341f6c0d7574a329397c59408","names":[],"sources":[]}, @@ -246,7 +246,7 @@ {"digest":"477614bca595a9e7adb5a1870be446b9a8684f3ba8950259d6289f2d3b74f028","names":[],"sources":["packages/compaction/compaction-image-offload/src/projection.ts:25"]}, {"digest":"47e5d84f1a93450a78c7f3954b43990d0f629af7c034a56313e5deb63e772c1b","names":[],"sources":[]}, {"digest":"47e9095591ae36e7c39ee62553097772f2bfa16304536a72dbbc3f691f605180","names":["packages/llm/llm/src/types.ts#StreamChunk"],"sources":["packages/llm/llm/src/types.ts:496"]}, - {"digest":"487b65c37bfedb8b72088c4107a0a90a6249701f6b26745f6d98f9b8a22b07c7","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:44"]}, + {"digest":"487b65c37bfedb8b72088c4107a0a90a6249701f6b26745f6d98f9b8a22b07c7","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:43"]}, {"digest":"48e5c9861f16ac07e78cb7b5ae9dabdf7bb85c58baed5a51b4ad275050ea58e3","names":[],"sources":[]}, {"digest":"48f9c19417a1abbedfa59f4667bba36b93ac2db407adf5e84cb3ba0de30942cb","names":[],"sources":[]}, {"digest":"4991dfc415c9efebc36fa6969e1798c7d2e42396cc1e6e0ac7d7c89c5c5c4aea","names":[],"sources":[]}, @@ -256,10 +256,10 @@ {"digest":"4ae007ed190a72c92138b22d059b83208079c7551ca13fb59ae8cf5e23693964","names":[],"sources":[]}, {"digest":"4aed17ec726b5397c29f6cb4bcd7905dc1a12bb6140f1657f073cd24380f2af8","names":[],"sources":[]}, {"digest":"4b1e632e05776982a2d21c25a50c7c04c199d311c5675218fa73ff9fe30d22cd","names":["packages/schedule/schedule/src/types.ts#LegacyScheduleRecord"],"sources":["packages/schedule/schedule/src/types.ts:185"]}, - {"digest":"4b259f7f8f0a44ad5e90b70a73553ced1df27012d126921d397ff403b6c86731","names":["packages/llm/llm/src/message.ts#ToolResultMessage"],"sources":["packages/llm/llm/src/message.ts:173"]}, + {"digest":"4b259f7f8f0a44ad5e90b70a73553ced1df27012d126921d397ff403b6c86731","names":["packages/llm/llm/src/message.ts#ToolResultMessage"],"sources":["packages/llm/llm/src/message.ts:172"]}, {"digest":"4b7ddaf3710b88ff9b8df66304f5f97bf03688fd19730eedc2e9535203c820ea","names":[],"sources":[]}, {"digest":"4bb451330ff699f36b45539ceb0eb2606ead72084e2c5bb637c36cc80e2252db","names":[],"sources":["packages/core/session/src/types.ts:198"]}, - {"digest":"4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b","names":["packages/api/session-controller/src/types.ts#SessionRequestId","packages/attachment/attachment/src/brand.ts#AttachmentId","packages/compaction/compaction/src/brand.ts#CompactionId","packages/core/session/src/types.ts#SessionId","packages/experimental/webhook/src/brand.ts#WebhookDeliveryId","packages/experimental/webhook/src/brand.ts#WebhookRuleId","packages/experimental/webhook/src/brand.ts#WebhookSourceId","packages/feedback/message-feedback/src/types.ts#MessageFeedbackVersion","packages/goal/goal/src/types.ts#GoalId","packages/interaction/commands/src/brand.ts#CommandId","packages/interaction/user-approval/src/types.ts#ApprovalRequestId","packages/jobs/jobs/src/brand.ts#JobId","packages/llm/llm-retry/src/brand.ts#RetryId","packages/llm/llm/src/brand.ts#MessageId","packages/llm/llm/src/brand.ts#ProviderRequestId","packages/llm/llm/src/brand.ts#ReasoningEffortId","packages/llm/llm/src/brand.ts#ToolCallId","packages/schedule/schedule/src/types.ts#ScheduleId","packages/session/session-title/src/types.ts#SessionTitleProviderId","packages/team/agent-team/src/types.ts#TeamId","packages/team/agent-team/src/types.ts#TeamMessageId","packages/team/agent-team/src/types.ts#TeamTaskId","packages/workflow/workflow/src/types.ts#WorkflowRunId"],"sources":["packages/api/session-controller/src/types.ts:391","packages/attachment/attachment/src/brand.ts:6","packages/compaction/compaction/src/brand.ts:4","packages/core/session/src/types.ts:21","packages/experimental/webhook/src/brand.ts:12","packages/experimental/webhook/src/brand.ts:6","packages/experimental/webhook/src/brand.ts:9","packages/feedback/message-feedback/src/types.ts:14","packages/goal/goal/src/types.ts:17","packages/interaction/commands/src/brand.ts:31","packages/interaction/user-approval/src/types.ts:17","packages/jobs/jobs/src/brand.ts:19","packages/llm/llm-retry/src/brand.ts:4","packages/llm/llm/src/brand.ts:16","packages/llm/llm/src/brand.ts:31","packages/llm/llm/src/brand.ts:43","packages/llm/llm/src/brand.ts:67","packages/schedule/schedule/src/types.ts:14","packages/session/session-title/src/types.ts:17","packages/team/agent-team/src/types.ts:20","packages/team/agent-team/src/types.ts:32","packages/team/agent-team/src/types.ts:8","packages/workflow/workflow/src/types.ts:14"]}, + {"digest":"4cd48f3e5108bd6ebedf7301c3638839b8b2b9db8dbd493974177fbdeb91a01b","names":["packages/api/session-controller/src/types.ts#SessionRequestId","packages/attachment/attachment/src/brand.ts#AttachmentId","packages/compaction/compaction/src/brand.ts#CompactionId","packages/core/session/src/types.ts#SessionId","packages/experimental/webhook/src/brand.ts#WebhookDeliveryId","packages/experimental/webhook/src/brand.ts#WebhookRuleId","packages/experimental/webhook/src/brand.ts#WebhookSourceId","packages/feedback/message-feedback/src/types.ts#MessageFeedbackVersion","packages/goal/goal/src/types.ts#GoalId","packages/interaction/commands/src/brand.ts#CommandId","packages/interaction/user-approval/src/types.ts#ApprovalRequestId","packages/jobs/jobs/src/brand.ts#JobId","packages/llm/llm-retry/src/brand.ts#RetryId","packages/llm/llm/src/brand.ts#MessageId","packages/llm/llm/src/brand.ts#ProviderRequestId","packages/llm/llm/src/brand.ts#ReasoningEffortId","packages/llm/llm/src/brand.ts#ToolCallId","packages/schedule/schedule/src/types.ts#ScheduleId","packages/session/session-title/src/types.ts#SessionTitleProviderId","packages/team/agent-team/src/types.ts#TeamId","packages/team/agent-team/src/types.ts#TeamMessageId","packages/team/agent-team/src/types.ts#TeamTaskId","packages/workflow/workflow/src/types.ts#WorkflowRunId"],"sources":["packages/api/session-controller/src/types.ts:391","packages/attachment/attachment/src/brand.ts:6","packages/compaction/compaction/src/brand.ts:4","packages/core/session/src/types.ts:21","packages/experimental/webhook/src/brand.ts:12","packages/experimental/webhook/src/brand.ts:6","packages/experimental/webhook/src/brand.ts:9","packages/feedback/message-feedback/src/types.ts:14","packages/goal/goal/src/types.ts:17","packages/interaction/commands/src/brand.ts:22","packages/interaction/user-approval/src/types.ts:17","packages/jobs/jobs/src/brand.ts:9","packages/llm/llm-retry/src/brand.ts:4","packages/llm/llm/src/brand.ts:16","packages/llm/llm/src/brand.ts:31","packages/llm/llm/src/brand.ts:43","packages/llm/llm/src/brand.ts:67","packages/schedule/schedule/src/types.ts:14","packages/session/session-title/src/types.ts:17","packages/team/agent-team/src/types.ts:20","packages/team/agent-team/src/types.ts:32","packages/team/agent-team/src/types.ts:8","packages/workflow/workflow/src/types.ts:14"]}, {"digest":"4d60dddaa65d3da8d4cd014d85ce3d2c2875664dd0433e331d8e9d395289686b","names":["packages/experimental/liveshare/src/host/viewer-principal.ts#ShareViewerPrincipal"],"sources":["packages/experimental/liveshare/src/host/viewer-principal.ts:24"]}, {"digest":"4e011753f8263f436efaabfbb3b4db53a98fc55342c5ded2daf7208b217be159","names":[],"sources":[]}, {"digest":"4e44c9118152f6829634bfd508e47669ab0497caffa380c94b4be91f9390d35d","names":[],"sources":[]}, @@ -321,11 +321,11 @@ {"digest":"63ba8895cc09e4693cf0819fdcd18c084bef195febda5b6a23af279b3852be36","names":[],"sources":[]}, {"digest":"6487b10ba7542f3c447b1e41a1c6a590b7bfafe0b9b66b49f34028da85bb970f","names":["packages/subagent/subagent/src/descriptor.ts#ContinuableSubagentDescriptorData"],"sources":["packages/subagent/subagent/src/descriptor.ts:72"]}, {"digest":"6598cd6da253948d6b207c6374a45335804c79b576866d6215649c2d1bc85e25","names":["packages/team/agent-team/src/types.ts#TeamMemberSnapshot"],"sources":["packages/team/agent-team/src/types.ts:50"]}, - {"digest":"65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad","names":["packages/llm/llm/src/message.ts#SystemPromptMessageSource"],"sources":["packages/llm/llm/src/message.ts:35"]}, + {"digest":"65a8400e451e667e5b6e34df72ceb81fca8c12330330fa72083ad40279b189ad","names":["packages/llm/llm/src/message.ts#SystemPromptMessageSource"],"sources":["packages/llm/llm/src/message.ts:34"]}, {"digest":"65d583e66518c5236015e0846470fb32efcf92375ed306aef14e50a9d2cd2099","names":["packages/skill/tool-skill/src/index.ts#SkillCatalogSource"],"sources":["packages/skill/tool-skill/src/index.ts:35"]}, {"digest":"66ba70f6f068da443f969a0b947a013c3addd776b9b60a0a393759c19825e9a2","names":["packages/llm/llm/src/types.ts#ToolSchema"],"sources":["packages/llm/llm/src/types.ts:517"]}, {"digest":"672c4aa2a9b736e3d6e5da6346d2e2ed5e3573f2d0baafa18e7407c9f3fee3db","names":["packages/skill/skill/src/index.ts#SkillInvocationSource"],"sources":["packages/skill/skill/src/index.ts:146"]}, - {"digest":"67d5f73ceae82f5265258142ad6cf172de2c1fef93ba551b7f0454e0a93bffe0","names":["packages/llm/llm/src/call-config.ts#LlmCallConfig"],"sources":["packages/llm/llm/src/call-config.ts:31"]}, + {"digest":"67d5f73ceae82f5265258142ad6cf172de2c1fef93ba551b7f0454e0a93bffe0","names":["packages/llm/llm/src/call-config.ts#LlmCallConfig"],"sources":["packages/llm/llm/src/call-config.ts:30"]}, {"digest":"68141cbe3994a5ffcd064c07c75996538437fd9dbf77ce8a2927e89ec577fabe","names":[],"sources":[]}, {"digest":"688e853dc149f0d30b31765c12ec7e3be74169bdf1a4c6463a10b945d50cc1b8","names":[],"sources":[]}, {"digest":"68f44f59e91c41395076cb77265981a601680ec8a381bbbeb6ab754ffdc94573","names":[],"sources":[]}, @@ -354,11 +354,11 @@ {"digest":"6f9e00383836275e46c0a9915767f9bb561be5fc30aae490174908a93e99a912","names":[],"sources":[]}, {"digest":"70b082fe78991edf13cf66e1b4d06cd2dcff9cacfd76f8cfb996bfb61939e7b2","names":[],"sources":[]}, {"digest":"7180844e1066230c5e891f1b9ccd942423b0fe48aac6ded7eef2a285b288a732","names":[],"sources":[]}, - {"digest":"719c51f67074f97034a6c94297fe1f4b5d3c8d392c57586dab732aa5398c7a91","names":["packages/llm/llm/src/message.ts#ModelMessageSource"],"sources":["packages/llm/llm/src/message.ts:24"]}, - {"digest":"71bb3254ec8f1e491ce63b762a7b5f18709de23aa4e8abcc8b886f4b6ce051dd","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:28"]}, + {"digest":"719c51f67074f97034a6c94297fe1f4b5d3c8d392c57586dab732aa5398c7a91","names":["packages/llm/llm/src/message.ts#ModelMessageSource"],"sources":["packages/llm/llm/src/message.ts:23"]}, + {"digest":"71bb3254ec8f1e491ce63b762a7b5f18709de23aa4e8abcc8b886f4b6ce051dd","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:27"]}, {"digest":"72ec79127a9c0d0241b1106a74cc2b24c81ce467170f1c3c93f7b71a9496d227","names":[],"sources":[]}, {"digest":"7382c4fc95fe8c5db65ca4d9da572b115d0dbb818b7f32c22ab040318ffbb4bc","names":[],"sources":[]}, - {"digest":"74e0e5885d2ddf04530ddf341b25cd65e1f85c00b30a88bd992f11fc06615a0c","names":["packages/llm/llm/src/message.ts#UserMessage"],"sources":["packages/llm/llm/src/message.ts:162"]}, + {"digest":"74e0e5885d2ddf04530ddf341b25cd65e1f85c00b30a88bd992f11fc06615a0c","names":["packages/llm/llm/src/message.ts#UserMessage"],"sources":["packages/llm/llm/src/message.ts:161"]}, {"digest":"750a2b129d67704df675c06823c20c80b65cbae89d5aaa914fd5a72e3df395b5","names":["packages/jobs/jobs/src/types.ts#JobSettleCause"],"sources":["packages/jobs/jobs/src/types.ts:247"]}, {"digest":"7554565be416b0342053ee6a46256c9dab07c487349b4a5f10bab1edc151c619","names":[],"sources":[]}, {"digest":"756b5e23a5cb2c7f486f366a828f7461c88902af21125bd6810881f4ccbff6cc","names":[],"sources":[]}, @@ -389,7 +389,7 @@ {"digest":"814d9434e1ddf9078612b3b34322f26e9363b469213335007f7e9ba7fee9464e","names":["packages/llm/llm/src/types.ts#ReasoningBlock"],"sources":["packages/llm/llm/src/types.ts:75"]}, {"digest":"82470020b5bfcb1a843e2aa05602af7d37df99e82d01f015c7c589ba054fd89d","names":[],"sources":[]}, {"digest":"824a4aad44a54e245c67196817d67946734a2dc0eee0b0b6834a5b2a6ef352ce","names":[],"sources":[]}, - {"digest":"824b1d4d4f007bdaa5eee7994a5db3ede7707c6cd2bf8e2509be176c7609e3bc","names":["packages/llm/llm/src/message.ts#DeveloperMessage"],"sources":["packages/llm/llm/src/message.ts:157"]}, + {"digest":"824b1d4d4f007bdaa5eee7994a5db3ede7707c6cd2bf8e2509be176c7609e3bc","names":["packages/llm/llm/src/message.ts#DeveloperMessage"],"sources":["packages/llm/llm/src/message.ts:156"]}, {"digest":"825ca23416b1ea9d81442afead5cf9229a6fa05842f042135cc3aa9710a6a2d8","names":[],"sources":[]}, {"digest":"829a2fb3be6efd4ba36aef8ed2d381a4c6fb2a0aaf50c823a6f3f8290786b809","names":[],"sources":[]}, {"digest":"83079c8a3f733ac3fa603eefa0fbb4737ca4d8b69e7e2e7298b60f9ac4098693","names":[],"sources":["packages/skill/tool-skill/src/index.ts:43"]}, @@ -407,7 +407,7 @@ {"digest":"8620189c8e33582708ece48fd2d20dc4d57912486a17bdbb9aea4c44f7018062","names":[],"sources":[]}, {"digest":"866f7b2dbdc5b421eab3e629312d1c839b75c259633b4b43b50d23bac44d92a0","names":[],"sources":[]}, {"digest":"86d1d0e9cfebb240421187e3dc37fb71cc38a1501885cf32f8f9adef7b0a2bde","names":["packages/subagent/subagent/src/descriptor.ts#SubagentDescriptorData"],"sources":["packages/subagent/subagent/src/descriptor.ts:89"]}, - {"digest":"86e1e384495ee09ac2d60c9db3610f1f1fddac2d248f6f1d6000e78054680219","names":["packages/llm/llm/src/message.ts#ContextSnapshotSection"],"sources":["packages/llm/llm/src/message.ts:70"]}, + {"digest":"86e1e384495ee09ac2d60c9db3610f1f1fddac2d248f6f1d6000e78054680219","names":["packages/llm/llm/src/message.ts#ContextSnapshotSection"],"sources":["packages/llm/llm/src/message.ts:69"]}, {"digest":"871bfd6f7bb91061246768d3377f3fd58d6b8ea7c31f44c714ae7ab215650d62","names":[],"sources":[]}, {"digest":"87b1a33564b9a4d63b00988a524c12259243953aebb9c9a05127d87b27464df9","names":[],"sources":[]}, {"digest":"88841202942c7683b3b7e5ea6a796047ec326b6701ac23e58cc236d85613b9fa","names":[],"sources":[]}, @@ -507,7 +507,7 @@ {"digest":"ad22a5ca5bbaab2e1440779cd3648e85ddfc6f73b5207394eda699555cf31430","names":[],"sources":[]}, {"digest":"ad3b56aa2fc1ad4250e7399295d34a8eae592e1907e85852e2291b2e498a30bc","names":[],"sources":[]}, {"digest":"ad92f473a03ae72599ff26c86e897c25e16269519ad2a87340f0bea946517af8","names":[],"sources":[]}, - {"digest":"ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05","names":["packages/interaction/commands/src/types.ts#CommandSource"],"sources":["packages/core/session/src/types.ts:195","packages/interaction/commands/src/types.ts:75","packages/interaction/commands/src/types.ts:79","packages/llm/llm/src/message.ts:111","packages/session/session-title/src/types.ts:35"]}, + {"digest":"ada310bf0bdb8fed51f3b56ea63f6ea6b18bbd587f04fccb63a14ab0b2a24e05","names":["packages/interaction/commands/src/types.ts#CommandSource"],"sources":["packages/core/session/src/types.ts:195","packages/interaction/commands/src/types.ts:75","packages/interaction/commands/src/types.ts:79","packages/llm/llm/src/message.ts:110","packages/session/session-title/src/types.ts:35"]}, {"digest":"ade057f4fdc387aec6426f48704a1f9359cfc6fee13f27735b07f9b215ec16ca","names":[],"sources":[]}, {"digest":"ae63d9d1080ed8945031594d93f8d96651d7101b848719cc3e1475875cd3d649","names":[],"sources":[]}, {"digest":"aec150797b655c5f15ebb7a501454b0c208fbaccec9ace49d7de2171fc02f47d","names":[],"sources":[]}, @@ -573,7 +573,7 @@ {"digest":"c2deb7c9183735d4e0fffddf5c623f4e34daa1c8e96b111982e957dfcbbcf896","names":["packages/workflow/workflow/src/types.ts#WorkflowAgentOutcome"],"sources":["packages/workflow/workflow/src/types.ts:116"]}, {"digest":"c2f49004d9ae38a964e80850c87bc6849d6a872091a1d43e99eedf00c641e2a3","names":[],"sources":[]}, {"digest":"c43b119ce579b3e9983a0d3adc4ba402ebb9ba773d89738a2dab01ecf5813943","names":[],"sources":[]}, - {"digest":"c51f0d0a405bb96fcb008c0dc560a512dcd8c3919b6b446937f449ea2f7d21d8","names":["packages/llm/llm/src/message.ts#Message"],"sources":["packages/llm/llm/src/message.ts:196"]}, + {"digest":"c51f0d0a405bb96fcb008c0dc560a512dcd8c3919b6b446937f449ea2f7d21d8","names":["packages/llm/llm/src/message.ts#Message"],"sources":["packages/llm/llm/src/message.ts:195"]}, {"digest":"c5228b7a55498d84f529591744a0ab26e0b93ade18a70a26db1377a1ecfa6b49","names":[],"sources":[]}, {"digest":"c55827fba7018198772c50e37cb7d3f60a3d8bb6e94b07de72dee0d9f8968005","names":[],"sources":["packages/interaction/user-questions/src/types.ts:134"]}, {"digest":"c5687b1313206a6ff334066047b6a0681611467dc4df8c5a8e71d0b6df39311f","names":[],"sources":[]}, @@ -605,7 +605,7 @@ {"digest":"d85590a5675c6e2fd8164e5792a6cceac714605b8ac228adae5ee668facb1490","names":[],"sources":[]}, {"digest":"d8a476d2c6fd30df6ec0e799f91716d1518c780d23b4121dce545abfcfb7c5a5","names":[],"sources":[]}, {"digest":"d9196086e41e4dd5c2ce87f5c25529c8112a1731d258cf0728747d41a9ee3241","names":[],"sources":[]}, - {"digest":"d9c462b9f62fdd3efc76a44b9524dc8781f6b91cd9c7e584b17d971defafebab","names":["packages/llm/llm/src/message.ts#ToolMessageSource"],"sources":["packages/llm/llm/src/message.ts:29"]}, + {"digest":"d9c462b9f62fdd3efc76a44b9524dc8781f6b91cd9c7e584b17d971defafebab","names":["packages/llm/llm/src/message.ts#ToolMessageSource"],"sources":["packages/llm/llm/src/message.ts:28"]}, {"digest":"d9edf1862e4471d6ad8a106a3f4160e0643874368707d50ecd8e27e5ee7a2567","names":[],"sources":[]}, {"digest":"da60ed58a8fa23d7aa4920ab5c1f4e3d28109cb0797ef9e5c8b125721b847582","names":[],"sources":["packages/session/working-directory/src/index.ts:56"]}, {"digest":"dacf3d5f3e4ff619c1320e64a48dec5e7ecd7870bece65fbd449a0e63adfa521","names":[],"sources":[]}, @@ -614,7 +614,7 @@ {"digest":"db874d463b0fdec77e9da1c4568f37cb70bd6596781eb93800db44fb8a116965","names":[],"sources":[]}, {"digest":"dba54c09c6e7aafc9acbed7792ecc920d99f92d0784aeeed10af55f7fe0bc8cd","names":[],"sources":["packages/core/tool-executor-ptc/src/types.ts:68"]}, {"digest":"dbdafceb9a900183cccc80596498d386f3bf7bddead2b8cfde68453aa4739edc","names":[],"sources":[]}, - {"digest":"dca3ba43188095fa7342e49e6c206d4685125497d4767595bf12a62ea2fd73ce","names":["packages/llm/llm/src/message.ts#MessageSource"],"sources":["packages/llm/llm/src/message.ts:136"]}, + {"digest":"dca3ba43188095fa7342e49e6c206d4685125497d4767595bf12a62ea2fd73ce","names":["packages/llm/llm/src/message.ts#MessageSource"],"sources":["packages/llm/llm/src/message.ts:135"]}, {"digest":"dd00cdccd0ba487b92362ef67db58cd264f48c1bfd368291424a1da9a899489a","names":[],"sources":[]}, {"digest":"dd2780e7e07684332f7a9ab047237798d260e7eaffb1321cb38eca695d184c3d","names":[],"sources":[]}, {"digest":"dd5ee8762bd8a14b6c6bffedd1753e4e78505bb0f9ea1621018d03a54eef59d5","names":[],"sources":[]}, @@ -644,7 +644,7 @@ {"digest":"e5d3828df1ec3e2a66879de0659e0f4866d9cfffc00825ee731a66f8a0c03d98","names":[],"sources":[]}, {"digest":"e6063d0451dc02026fd9b54ad3f77c7b1b6392ad3e872a7737ac84e13ca72344","names":["packages/schedule/schedule/src/types.ts#EveryScheduleDispatchChange"],"sources":["packages/schedule/schedule/src/types.ts:220"]}, {"digest":"e6411b09c1d982f789bf741ca74e2bea69df56029847f86a6148e722039ee732","names":[],"sources":[]}, - {"digest":"e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:21"]}, + {"digest":"e72269f931559e901e5e8fe1cfcbd0669fb795f43cc038ff39fba62f60403c33","names":[],"sources":["packages/llm/llm/src/assistant-stream.ts:20"]}, {"digest":"e75916628f3f10c2d50658bd143052a46285fbf1a9a700ba54947614603d26b4","names":[],"sources":[]}, {"digest":"e7ce49f12953583fad217bf80fb9f1463acff2c3e9471a823782661675fb124c","names":[],"sources":[]}, {"digest":"e7e154d47d5fbc5366330fb4dade1f108c6dfe4335044d21ded14b7bf1dce084","names":[],"sources":[]}, @@ -691,7 +691,7 @@ {"digest":"f90eb4ab2d3897bc20c521a038e3119d581f791ec974b1a0004f63a8ab9e232d","names":[],"sources":["packages/core/session/src/types.ts:294","packages/deliverables/workspace-changes/src/types.ts:106"]}, {"digest":"f97f47b0eb87905ed77cc27c5e4ed75ef805cb372c98905253709de1aab9b63c","names":[],"sources":[]}, {"digest":"f9cfc89e8fe085b4fcc9cd32b74b6f103608c54d7d8cd97b47c01de34f252ba3","names":[],"sources":[]}, - {"digest":"fa87537f4a9c1e25602990a8bf686b383e9e00352ec8946e16ae24ba7c1625be","names":["packages/llm/llm/src/message.ts#AssistantMessage"],"sources":["packages/llm/llm/src/message.ts:167"]}, + {"digest":"fa87537f4a9c1e25602990a8bf686b383e9e00352ec8946e16ae24ba7c1625be","names":["packages/llm/llm/src/message.ts#AssistantMessage"],"sources":["packages/llm/llm/src/message.ts:166"]}, {"digest":"fab2bb09bc5e3b9db0685e8f5500b029af1a2b33e70bc703c1d5d0f596fbc1fd","names":["packages/sandbox/sandbox/src/index.ts#SandboxMode"],"sources":["packages/sandbox/sandbox/src/index.ts:38"]}, {"digest":"fab35c4520883c0d69e42d079c9f543fc5ac7a2d15b537b5572fcd99059c7018","names":[],"sources":[]}, {"digest":"fb5e0517050d2c6d40e5b8145db1f7c5ca7044d5d50fada6ff80e0b22c6ca973","names":[],"sources":[]}, diff --git a/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.i18n.yaml b/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.i18n.yaml new file mode 100644 index 0000000000..1ed20c765c --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/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/package-export-cleanup/guide.md +/: + en: 339d7b0b02737b51 + zh: 838c1190f28a0565 +/update-removed-package-subpath-imports: + en: 1adc7e7bb2f8b4e9 + zh: 4bb7adb66c934614 +/update-removed-package-subpath-imports/change: + en: 600dde54ce4b5132 + zh: 1b64aaf2a34628e2 +/update-removed-package-subpath-imports/migration: + en: 9077ae29fb66d460 + zh: a07779cf73666b1d diff --git a/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.md b/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.md new file mode 100644 index 0000000000..358923c4dd --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.md @@ -0,0 +1,36 @@ +--- +kind: upgrade-guide +description: Update removed package subpaths; retained identity constructors remain available. +--- + +# Update removed package subpath imports + +English | [中文](guide.zh.md) + +## Change + +Upgrading from v0.2.2-rc.2 removes the seven package subpaths below. Existing identity-only string constructors remain available at retained entrypoints; their implementations and branded type definitions are preserved. The `/types` entries re-export those types without runtime values. Persisted strings, Session formats, validation and ID generation do not change. + +| Removed subpath | Type import or supported replacement | +|---|---| +| `@deepseek-ai/dsh-commands/brand` | `@deepseek-ai/dsh-commands/types` | +| `@deepseek-ai/dsh-browser-use/brand` | `@deepseek-ai/dsh-browser-use/types` | +| `@deepseek-ai/dsh-computer-use/brand` | `@deepseek-ai/dsh-computer-use/types` | +| `@deepseek-ai/dsh-jobs/brand` | `@deepseek-ai/dsh-jobs/types` | +| `@deepseek-ai/dsh-llm/brand` | `@deepseek-ai/dsh-llm/types` | +| `@deepseek-ai/dsh-tools/presentation` | Type imports from `@deepseek-ai/dsh-tools` | +| `@deepseek-ai/dsh-file-reference-local/search` | The `fileReferences` service; no replacement public search helper | + +## Migration + +1. Move identifier type imports from the five `/brand` paths to the corresponding `/types` entries, using `import type`. These entries do not replace runtime constructor imports. +2. For existing constructor calls from the removed paths, commands, jobs and LLM callers can import the retained constructor from the package root. Browser/computer provider-name constructors were not root exports; use `brandString(value)` with the type from `/types`. Add `@deepseek-ai/dsh-brand` as a direct dependency when importing its runtime helper. Keep validation and UUID/counter generation where they already occur. + + ```ts + import { brandString } from '@deepseek-ai/dsh-brand' + import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/types' + + const providerName = brandString('my-browser-provider') + ``` + +3. Compile and run your plugin/SDK tests, then load plain-JavaScript fixtures under Node. Check for `ERR_PACKAGE_PATH_NOT_EXPORTED` and missing named-export errors; TypeScript checking alone does not cover `.mjs` consumers. diff --git a/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.zh.md b/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.zh.md new file mode 100644 index 0000000000..b44e07583b --- /dev/null +++ b/docs/upgrade-guide/v0.2.2-rc.2/package-export-cleanup/guide.zh.md @@ -0,0 +1,36 @@ +--- +kind: upgrade-guide +description: 更新已移除的包子路径;保留入口上的标识符构造函数仍可用。 +--- + +# 更新已移除的包子路径导入 + +[English](guide.md) | 中文 + +## 变更 + +从 v0.2.2-rc.2 升级会移除下列七个包子路径。既有字符串恒等构造函数在保留的入口上仍然可用,其实现和品牌类型定义均保留。`/types` 入口仅再导出这些类型,不导出运行时值。持久化字符串、Session 格式、校验和 ID 生成行为不变。 + +| 已移除子路径 | 类型导入或受支持的替代方式 | +|---|---| +| `@deepseek-ai/dsh-commands/brand` | `@deepseek-ai/dsh-commands/types` | +| `@deepseek-ai/dsh-browser-use/brand` | `@deepseek-ai/dsh-browser-use/types` | +| `@deepseek-ai/dsh-computer-use/brand` | `@deepseek-ai/dsh-computer-use/types` | +| `@deepseek-ai/dsh-jobs/brand` | `@deepseek-ai/dsh-jobs/types` | +| `@deepseek-ai/dsh-llm/brand` | `@deepseek-ai/dsh-llm/types` | +| `@deepseek-ai/dsh-tools/presentation` | 从 `@deepseek-ai/dsh-tools` 导入类型 | +| `@deepseek-ai/dsh-file-reference-local/search` | 使用 `fileReferences` 服务;没有替代的公开搜索辅助值 | + +## 迁移 + +1. 将标识符类型导入从五个 `/brand` 路径移至对应 `/types` 入口,并使用 `import type`。这些入口不能替代运行时构造函数导入。 +2. 对原来从已移除路径调用构造函数的代码,commands、jobs 和 LLM 调用方可以改从包根入口导入保留的构造函数。Browser/computer provider-name 构造函数原本不是根出口,应使用 `brandString(value)` 并从 `/types` 导入类型。导入这个运行时辅助函数时,应将 `@deepseek-ai/dsh-brand` 加为直接依赖。保留原有位置上的校验和 UUID/计数器生成操作。 + + ```ts + import { brandString } from '@deepseek-ai/dsh-brand' + import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/types' + + const providerName = brandString('my-browser-provider') + ``` + +3. 编译并运行插件/SDK 测试,再用 Node 加载纯 JavaScript fixture。检查是否出现 `ERR_PACKAGE_PATH_NOT_EXPORTED` 或缺少具名出口错误;仅靠 TypeScript 检查覆盖不到 `.mjs` 消费者。 diff --git a/packages/api/job-controller/src/client/model.ts b/packages/api/job-controller/src/client/model.ts index 6f87a5d39e..df64009b55 100644 --- a/packages/api/job-controller/src/client/model.ts +++ b/packages/api/job-controller/src/client/model.ts @@ -7,7 +7,7 @@ */ import { notifySubscribers } from '@deepseek-ai/dsh-client-store' -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import type { JobView } from '@deepseek-ai/dsh-jobs/view' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { JobFollowFrame } from '../types.ts' diff --git a/packages/api/job-controller/src/client/service.ts b/packages/api/job-controller/src/client/service.ts index f9b900c406..72a1a888ce 100644 --- a/packages/api/job-controller/src/client/service.ts +++ b/packages/api/job-controller/src/client/service.ts @@ -10,7 +10,7 @@ import { Service, type Context } from '@deepseek-ai/cordis' import { RemoteStreamCarrierError, type ClientRemote } from '@deepseek-ai/dsh-api-gateway/client' import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol' -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { JobKillRequest, JobKillValue, JobFollowFrame, JobFollowRequest, JobListFrame, JobListRequest } from '../types.ts' import type { ClientJobsModel, JobsSource } from './model.ts' diff --git a/packages/api/job-controller/src/observe.ts b/packages/api/job-controller/src/observe.ts index 31b4682bed..52b11fdf97 100644 --- a/packages/api/job-controller/src/observe.ts +++ b/packages/api/job-controller/src/observe.ts @@ -1,6 +1,6 @@ /** Per-job observation generations: anchor, coalesced output, terminal status. */ -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import type { JobChunk, JobRegistry, JobStatus, JobView } from '@deepseek-ai/dsh-jobs' import type { JobFollowFrame, JobFollowRequest } from './types.ts' import { OutputWaiter, sleep } from './wake.ts' diff --git a/packages/api/job-controller/src/types.ts b/packages/api/job-controller/src/types.ts index 4e5eceac72..6f809bb3b3 100644 --- a/packages/api/job-controller/src/types.ts +++ b/packages/api/job-controller/src/types.ts @@ -5,7 +5,7 @@ * @module @deepseek-ai/dsh-api-job-controller/types */ -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import type { JobChunk, JobView } from '@deepseek-ai/dsh-jobs/view' import type { SessionId } from '@deepseek-ai/dsh-session/types' diff --git a/packages/api/job-controller/tests/model.client.spec.ts b/packages/api/job-controller/tests/model.client.spec.ts index 34ea82327f..6d101e2145 100644 --- a/packages/api/job-controller/tests/model.client.spec.ts +++ b/packages/api/job-controller/tests/model.client.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { ClientJobsModel } from '../src/client/model.ts' import { ClientJobs } from '../src/client/service.ts' diff --git a/packages/api/session-controller/src/client/contract/session.ts b/packages/api/session-controller/src/client/contract/session.ts index ce060ec4aa..7a854e714c 100644 --- a/packages/api/session-controller/src/client/contract/session.ts +++ b/packages/api/session-controller/src/client/contract/session.ts @@ -8,7 +8,7 @@ * invisible out here. */ import type { FileAttachmentRef, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { SessionId, SessionSeq } from '@deepseek-ai/dsh-session/types' import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol' import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store' diff --git a/packages/api/session-controller/src/client/sessions/assistant-stream.ts b/packages/api/session-controller/src/client/sessions/assistant-stream.ts index 973fd10853..5166ead61f 100644 --- a/packages/api/session-controller/src/client/sessions/assistant-stream.ts +++ b/packages/api/session-controller/src/client/sessions/assistant-stream.ts @@ -6,7 +6,7 @@ import type { } from '../../types.ts' import { expandAssistantStream } from '@deepseek-ai/dsh-llm/assistant-stream' import type { AssistantStreamRecord } from '@deepseek-ai/dsh-llm/assistant-stream' -import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/types' import type { SessionAssistantSettlementEntry, SessionEventLikeEntry, diff --git a/packages/api/session-controller/src/client/sessions/session.ts b/packages/api/session-controller/src/client/sessions/session.ts index 60194de5eb..9b795949ab 100644 --- a/packages/api/session-controller/src/client/sessions/session.ts +++ b/packages/api/session-controller/src/client/sessions/session.ts @@ -5,7 +5,7 @@ import type { InboxState, InboxTarget } from '@deepseek-ai/dsh-agent/types' import { randomUUID } from '@deepseek-ai/dsh-util-crypto' import type { FileAttachmentRef, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment' import type { SubagentAddress } from '@deepseek-ai/dsh-subagent/client' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { UserMessage } from '@deepseek-ai/dsh-llm/types' import { SessionLogOffset, SessionSeq, type SessionId } from '@deepseek-ai/dsh-session/types' import { SessionEventStream } from '../transport.ts' diff --git a/packages/api/session-controller/src/types.ts b/packages/api/session-controller/src/types.ts index 49cd7c0f9d..1b8ede4c70 100644 --- a/packages/api/session-controller/src/types.ts +++ b/packages/api/session-controller/src/types.ts @@ -6,7 +6,7 @@ import type { ImageAttachmentLimits, ImageAttachmentRef, ImageMediaType, } from '@deepseek-ai/dsh-attachment' import type { Branded } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId, MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId, MessageId } from '@deepseek-ai/dsh-llm/types' import type { LlmModelBadge, TextBlock } from '@deepseek-ai/dsh-llm' import type { SessionId, SessionSeq, SessionSeqCursor } from '@deepseek-ai/dsh-session/types' import type { SessionProjectionMap, SessionProjectionSummaryExcluded, SessionProjectionSummaryValues } from '@deepseek-ai/dsh-session-projection/types' diff --git a/packages/api/session-controller/tests/client-contract.client.spec.ts b/packages/api/session-controller/tests/client-contract.client.spec.ts index 5ee7d2077b..b6dd26d657 100644 --- a/packages/api/session-controller/tests/client-contract.client.spec.ts +++ b/packages/api/session-controller/tests/client-contract.client.spec.ts @@ -6,7 +6,7 @@ import { type SessionLiveEventEntry, type SessionTransientEventEntry, } from '../src/client/contract/events.ts' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/types' import type { ISession } from '../src/client/contract/session.ts' import type { ProjectionsBaseline } from '../src/client/sessions/projection-store.ts' import { ProjectionValueStore } from '../src/client/sessions/projection-store.ts' diff --git a/packages/api/session-controller/tests/history-records.client.spec.ts b/packages/api/session-controller/tests/history-records.client.spec.ts index d3960b020f..5ec7bbe335 100644 --- a/packages/api/session-controller/tests/history-records.client.spec.ts +++ b/packages/api/session-controller/tests/history-records.client.spec.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionHistoryRecord } from '../src/types.ts' import { historyEntries, diff --git a/packages/api/session-controller/tests/session-list-blank.host.spec.ts b/packages/api/session-controller/tests/session-list-blank.host.spec.ts index 7eaddbe66e..6251c415b8 100644 --- a/packages/api/session-controller/tests/session-list-blank.host.spec.ts +++ b/packages/api/session-controller/tests/session-list-blank.host.spec.ts @@ -24,7 +24,7 @@ import SessionStore, { SessionSeq } from '@deepseek-ai/dsh-session' import type { Session, SessionEvent, SessionId } from '@deepseek-ai/dsh-session' import * as JsonlSessionPersistence from '@deepseek-ai/dsh-session-persistence-jsonl' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' // Side-effect type imports: the configuration-event SessionEventMap merges. import type {} from '@deepseek-ai/dsh-permission-presets' import type {} from '@deepseek-ai/dsh-sandbox-policy' diff --git a/packages/boot/plugin-manager/tests/tools.spec.ts b/packages/boot/plugin-manager/tests/tools.spec.ts index f2fdcc6b75..23ac835c68 100644 --- a/packages/boot/plugin-manager/tests/tools.spec.ts +++ b/packages/boot/plugin-manager/tests/tools.spec.ts @@ -6,7 +6,7 @@ import { Context } from '@deepseek-ai/cordis' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { type ToolExecutionResult } from '@deepseek-ai/dsh-tools' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { Agent } from '@deepseek-ai/dsh-agent' import SandboxPolicy from '@deepseek-ai/dsh-sandbox-policy' import { Session, type SessionId, SESSION_FORMAT_VERSION } from '@deepseek-ai/dsh-session' diff --git a/packages/boot/plugin-market/tests/tools.spec.ts b/packages/boot/plugin-market/tests/tools.spec.ts index 47b59226bd..84d186cd07 100644 --- a/packages/boot/plugin-market/tests/tools.spec.ts +++ b/packages/boot/plugin-market/tests/tools.spec.ts @@ -5,7 +5,7 @@ import { Context, Service } from '@deepseek-ai/cordis' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { afterEach, expect, it, onTestFinished, vi } from 'vitest' import PluginMarket from '../src/index.ts' import * as tool from '../src/tools.ts' diff --git a/packages/browser-use/browser-use/README.i18n.yaml b/packages/browser-use/browser-use/README.i18n.yaml index f072f077ab..f05c2e9d0d 100644 --- a/packages/browser-use/browser-use/README.i18n.yaml +++ b/packages/browser-use/browser-use/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: f14f34fce35a8d90 /deepseek-ai-dsh-browser-use/use-this-package: - en: 10aeb1a586a0fabe - zh: c8613a3a57591d6a + en: 2a4ece799bdfbbd6 + zh: cdea47ec3e8fe51e /deepseek-ai-dsh-browser-use/understand-the-implementation: en: c4d9ec0df22a30ea zh: 06057e2a56cebbb9 diff --git a/packages/browser-use/browser-use/README.md b/packages/browser-use/browser-use/README.md index 9b5f4ad2b5..5fc6ee69e9 100644 --- a/packages/browser-use/browser-use/README.md +++ b/packages/browser-use/browser-use/README.md @@ -31,7 +31,7 @@ Mount the service once beside the chosen provider in a Cordis composition: - name: '@deepseek-ai/dsh-browser-use' ``` -The service has no configuration. Provider plugins inject `browserUse` and call `ctx.browserUse.register(brandString(name))`, using `brandString` from `@deepseek-ai/dsh-brand` and the type from `@deepseek-ai/dsh-browser-use/brand`. The returned effect disposer releases that registration. +The service has no configuration. Provider plugins inject `browserUse` and call `ctx.browserUse.register(brandString(name))`, using `brandString` from `@deepseek-ai/dsh-brand` and the type from `@deepseek-ai/dsh-browser-use/types`. The returned effect disposer releases that registration. Providers stop admitting tool calls, close their resources, and await owned work before releasing the registration. `ctx.browserUse.providerName` reports the registered name until release. diff --git a/packages/browser-use/browser-use/README.zh.md b/packages/browser-use/browser-use/README.zh.md index bc680574e9..0aacfd49e5 100644 --- a/packages/browser-use/browser-use/README.zh.md +++ b/packages/browser-use/browser-use/README.zh.md @@ -31,7 +31,7 @@ kind: "package-reference" - name: '@deepseek-ai/dsh-browser-use' ``` -服务没有配置。提供方插件注入 `browserUse` 并调用 `ctx.browserUse.register(brandString(name))`,其中 `brandString` 来自 `@deepseek-ai/dsh-brand`,类型来自 `@deepseek-ai/dsh-browser-use/brand`。返回的 effect 清理器释放该注册。 +服务没有配置。提供方插件注入 `browserUse` 并调用 `ctx.browserUse.register(brandString(name))`,其中 `brandString` 来自 `@deepseek-ai/dsh-brand`,类型来自 `@deepseek-ai/dsh-browser-use/types`。返回的 effect 清理器释放该注册。 提供方 在释放注册前停止接收工具调用、关闭资源并等待自己拥有的工作结束。`ctx.browserUse.providerName` 在释放之前持续报告已注册名称。 diff --git a/packages/browser-use/browser-use/package.json b/packages/browser-use/browser-use/package.json index 859d04e019..26c0428067 100644 --- a/packages/browser-use/browser-use/package.json +++ b/packages/browser-use/browser-use/package.json @@ -21,9 +21,9 @@ "./src/*": "./src/*", "./locale/*.json": "./locale/*.json", "./package.json": "./package.json", - "./brand": { - "types": "./lib/types/brand.d.ts", - "default": "./lib/types/brand.js" + "./types": { + "types": "./lib/types/types.d.ts", + "default": "./lib/types/types.js" } }, "files": [ diff --git a/packages/browser-use/browser-use/src/brand.ts b/packages/browser-use/browser-use/src/brand.ts index 477dae0419..27b13f5267 100644 --- a/packages/browser-use/browser-use/src/brand.ts +++ b/packages/browser-use/browser-use/src/brand.ts @@ -1,4 +1,4 @@ -/** Browser-use provider identities. @module @deepseek-ai/dsh-browser-use/brand */ +/** Browser-use provider identities. @module @deepseek-ai/dsh-browser-use/src/brand.ts */ import type { Branded } from '@deepseek-ai/dsh-brand' diff --git a/packages/browser-use/browser-use/src/index.ts b/packages/browser-use/browser-use/src/index.ts index 1444f251f2..158a99ad8f 100644 --- a/packages/browser-use/browser-use/src/index.ts +++ b/packages/browser-use/browser-use/src/index.ts @@ -4,7 +4,7 @@ */ import { Context, Service } from '@deepseek-ai/cordis' -import type { BrowserUseProviderName } from './brand.ts' +import type { BrowserUseProviderName } from './types.ts' declare module '@deepseek-ai/cordis' { interface Context { diff --git a/packages/browser-use/browser-use/src/types.ts b/packages/browser-use/browser-use/src/types.ts new file mode 100644 index 0000000000..dbf66f0ab1 --- /dev/null +++ b/packages/browser-use/browser-use/src/types.ts @@ -0,0 +1,2 @@ +/** Public type-only entry for browser-use identities. */ +export type { BrowserUseProviderName } from './brand.ts' diff --git a/packages/browser-use/browser-use/tests/registry.spec.ts b/packages/browser-use/browser-use/tests/registry.spec.ts index c6a2219f50..df1827c11d 100644 --- a/packages/browser-use/browser-use/tests/registry.spec.ts +++ b/packages/browser-use/browser-use/tests/registry.spec.ts @@ -2,7 +2,7 @@ import { Context } from '@deepseek-ai/cordis' import { describe, expect, it } from 'vitest' import BrowserUseRegistry from '../src/index.ts' import { brandString } from '@deepseek-ai/dsh-brand' -import type { BrowserUseProviderName } from '../src/brand.ts' +import type { BrowserUseProviderName } from '../src/types.ts' const MCP = brandString('playwright-mcp') const NATIVE = brandString('stagehand') diff --git a/packages/client/connection/src/client/api.ts b/packages/client/connection/src/client/api.ts index a3de74c4fe..84273a6586 100644 --- a/packages/client/connection/src/client/api.ts +++ b/packages/client/connection/src/client/api.ts @@ -10,7 +10,7 @@ export type { } from '../rpc.ts' export { RpcId, transportError } from '../rpc.ts' export type { SessionId, SessionEvent } from '@deepseek-ai/dsh-session/types' -export type { MessageId } from '@deepseek-ai/dsh-llm/brand' +export type { MessageId } from '@deepseek-ai/dsh-llm/types' export type { ContentBlock, StreamChunk } from '@deepseek-ai/dsh-llm/types' import type { RpcResponse, RpcResult } from '../rpc.ts' diff --git a/packages/client/product-analytics/src/events.ts b/packages/client/product-analytics/src/events.ts index 309b7b07ff..9657fbb150 100644 --- a/packages/client/product-analytics/src/events.ts +++ b/packages/client/product-analytics/src/events.ts @@ -1,6 +1,6 @@ /** Desktop analytics fields selected by product event owners. */ import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' /** Event names and their selected product attributes. */ export interface ProductEventMap { diff --git a/packages/client/ui-agent-preset/src/client/locales.ts b/packages/client/ui-agent-preset/src/client/locales.ts index f5a3c8ed67..67329c8ff3 100644 --- a/packages/client/ui-agent-preset/src/client/locales.ts +++ b/packages/client/ui-agent-preset/src/client/locales.ts @@ -124,7 +124,7 @@ export const zh: Record = { // re-exported here so every surface in this plugin reads one path; the // Settings plugin list inlines the same fold over this plugin's dictionaries. export { isBuiltInPreset, presetDisplayText } from '@deepseek-ai/dsh-agent-preset-registry/display' -export type { PresetDisplaySource, PresetDisplayText } from '@deepseek-ai/dsh-agent-preset-registry/display' +export type { PresetDisplaySource, PresetDisplayText } from '@deepseek-ai/dsh-agent-preset-registry/types' /** Japanese copy, checked against the English keys. */ export const ja = { diff --git a/packages/client/ui-agent-team/tests/team-command.client.spec.tsx b/packages/client/ui-agent-team/tests/team-command.client.spec.tsx index 14119c4882..38839f5655 100644 --- a/packages/client/ui-agent-team/tests/team-command.client.spec.tsx +++ b/packages/client/ui-agent-team/tests/team-command.client.spec.tsx @@ -2,7 +2,7 @@ import { afterEach, describe, expect, it } from 'vitest' import { cleanup, fireEvent, render } from '@testing-library/react' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import { makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' import { IconUsersOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives' import { TeamCommandRow, type TeamCommandRowProps } from '../src/client/TeamCommandRow.tsx' diff --git a/packages/client/ui-chat/src/client/contract/slots.ts b/packages/client/ui-chat/src/client/contract/slots.ts index 9cf0ba7252..47566f6a34 100644 --- a/packages/client/ui-chat/src/client/contract/slots.ts +++ b/packages/client/ui-chat/src/client/contract/slots.ts @@ -1,6 +1,6 @@ /** Chat-owned Slot declarations and composed component props. */ import type { RefObject } from 'react' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { SessionId, SessionSeq } from '@deepseek-ai/dsh-session/types' import type { PendingSubmission } from '@deepseek-ai/dsh-api-session-controller/client' import type { FileAttachmentRef } from '@deepseek-ai/dsh-attachment' diff --git a/packages/client/ui-chat/tests/apply-inject.client.spec.tsx b/packages/client/ui-chat/tests/apply-inject.client.spec.tsx index 760a85f66b..3d891a9a5f 100644 --- a/packages/client/ui-chat/tests/apply-inject.client.spec.tsx +++ b/packages/client/ui-chat/tests/apply-inject.client.spec.tsx @@ -1,5 +1,5 @@ import type { AssistantNodeInjected } from '../src/client/chat/AssistantNodeView.tsx' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { apply as applyMenus, inject as injectMenus } from '@deepseek-ai/dsh-client-ui-context-menu/client' // @vitest-environment jsdom /** Chat inject factories exercised over independently mounted Conversation and Chat plugins. */ 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 d3caf88c5a..26797e8de5 100644 --- a/packages/client/ui-chat/tests/chat-view.client.spec.tsx +++ b/packages/client/ui-chat/tests/chat-view.client.spec.tsx @@ -5,7 +5,7 @@ import { ChatViewport } from '../src/client/chat/use-chat-viewport.ts' import type { ProcessGroupData } from '../src/client/contract/process-groups.ts' import type { InboxState } from '@deepseek-ai/dsh-agent/types' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { GlobalStandardProps, PropsRenderFactories, PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { act, cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react' diff --git a/packages/client/ui-chat/tests/chat-visibility.client.spec.ts b/packages/client/ui-chat/tests/chat-visibility.client.spec.ts index 73a4610705..44467a2b64 100644 --- a/packages/client/ui-chat/tests/chat-visibility.client.spec.ts +++ b/packages/client/ui-chat/tests/chat-visibility.client.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import type { ChatNode } from '../src/client/contract/chat-nodes.ts' import { isVisibleChatNode } from '../src/client/contract/chat-visibility.ts' diff --git a/packages/client/ui-chat/tests/conversation-node-definitions.client.spec.ts b/packages/client/ui-chat/tests/conversation-node-definitions.client.spec.ts index c2c3965f17..37623877bb 100644 --- a/packages/client/ui-chat/tests/conversation-node-definitions.client.spec.ts +++ b/packages/client/ui-chat/tests/conversation-node-definitions.client.spec.ts @@ -14,7 +14,7 @@ import type { SessionEvent } from '@deepseek-ai/dsh-session/types' import { inspectSystemPrompt } from '../../ui-conversation/src/client/contract/system-prompt.ts' import { AssistantStreamAccumulator } from '@deepseek-ai/dsh-llm/assistant-stream' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId, ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId, ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { StreamChunk } from '@deepseek-ai/dsh-llm' import { hasAssistantReplyContent } from '../src/client/contract/assistant-content.ts' import { assistantDefinition } from '../src/client/conversation-nodes/assistant.ts' diff --git a/packages/client/ui-chat/tests/fence-slot.client.spec.tsx b/packages/client/ui-chat/tests/fence-slot.client.spec.tsx index 447990f04e..44d054ada8 100644 --- a/packages/client/ui-chat/tests/fence-slot.client.spec.tsx +++ b/packages/client/ui-chat/tests/fence-slot.client.spec.tsx @@ -11,7 +11,7 @@ import { SlotTestRuntime, stubConfigForm, usePinnedBrowserLanguages } from '@dee import { apply as applyConversation, inject as injectConversation } from '@deepseek-ai/dsh-client-ui-conversation/client' import { apply as applyChat, inject as injectChat } from '@deepseek-ai/dsh-client-ui-chat/client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId, MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId, MessageId } from '@deepseek-ai/dsh-llm/types' import { SessionSeq, type SessionId } from '@deepseek-ai/dsh-session/types' import type { WorkspaceId } from '@deepseek-ai/dsh-workspace/types' import { CHAT_SETTINGS_NAMESPACE, type ChatSettings } from '../src/chat-settings.ts' diff --git a/packages/client/ui-chat/tests/process-groups.client.spec.ts b/packages/client/ui-chat/tests/process-groups.client.spec.ts index 125a8728e0..e4db23c088 100644 --- a/packages/client/ui-chat/tests/process-groups.client.spec.ts +++ b/packages/client/ui-chat/tests/process-groups.client.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from 'vitest' import { SessionSeq } from '@deepseek-ai/dsh-session/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { ConversationTimelineSnapshot, TurnLocation } from '@deepseek-ai/dsh-client-ui-conversation/client' import { PartialArguments } from '@deepseek-ai/dsh-util-values' import type { ChatConversationViewNode, ChatNode } from '../src/client/contract/chat-nodes.ts' diff --git a/packages/client/ui-commands/tests/directory.client.spec.ts b/packages/client/ui-commands/tests/directory.client.spec.ts index 159fcac4a6..41e16ac88a 100644 --- a/packages/client/ui-commands/tests/directory.client.spec.ts +++ b/packages/client/ui-commands/tests/directory.client.spec.ts @@ -8,7 +8,7 @@ import { describe, expect, it } from 'vitest' import type { SessionId } from '@deepseek-ai/dsh-api-remotes/client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/types' import type { CommandDescriptor } from '../src/client/directory.ts' import { CommandDirectory } from '../src/client/directory.ts' diff --git a/packages/client/ui-commands/tests/service.client.spec.ts b/packages/client/ui-commands/tests/service.client.spec.ts index e6cf4bc532..3b666497e3 100644 --- a/packages/client/ui-commands/tests/service.client.spec.ts +++ b/packages/client/ui-commands/tests/service.client.spec.ts @@ -10,8 +10,7 @@ import { Context } from '@deepseek-ai/cordis' import { describe, expect, it, onTestFinished, vi } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' -import type { CommandResult } from '@deepseek-ai/dsh-commands/types' +import type { CommandDefinitionId, CommandResult } from '@deepseek-ai/dsh-commands/types' import { scopeOf } from '@deepseek-ai/dsh-api-session-controller/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { RemoteError, TestRemote, TestSessions } from '@deepseek-ai/dsh-client-test-runtime' diff --git a/packages/client/ui-conversation/src/client/contract/records.ts b/packages/client/ui-conversation/src/client/contract/records.ts index daddf0aac7..1426f2bbc0 100644 --- a/packages/client/ui-conversation/src/client/contract/records.ts +++ b/packages/client/ui-conversation/src/client/contract/records.ts @@ -2,8 +2,8 @@ // substructure references. Stable node and location stores make old snapshots // live readers rather than time-point views. -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { ContentBlock } from '@deepseek-ai/dsh-llm/types' import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment' import type { LlmRetryEventData } from '@deepseek-ai/dsh-llm-retry/types' diff --git a/packages/client/ui-conversation/src/client/conversation/assembler.ts b/packages/client/ui-conversation/src/client/conversation/assembler.ts index b76db2ec7f..ab1ab05f7b 100644 --- a/packages/client/ui-conversation/src/client/conversation/assembler.ts +++ b/packages/client/ui-conversation/src/client/conversation/assembler.ts @@ -1,7 +1,7 @@ import type { SessionAssistantSettlementEntry, SessionEventLikeEntry, SessionTransientEventEntry, } from '@deepseek-ai/dsh-api-session-controller/client' -import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/types' import type { ConversationContextReader, ConversationLocationData, ConversationMatch, ConversationMatchResult, ConversationNodeContext, ConversationNodeDefinition, ConversationPreviousContext, diff --git a/packages/client/ui-conversation/src/client/queue/QueueDock.tsx b/packages/client/ui-conversation/src/client/queue/QueueDock.tsx index 6396387a91..b0907447c6 100644 --- a/packages/client/ui-conversation/src/client/queue/QueueDock.tsx +++ b/packages/client/ui-conversation/src/client/queue/QueueDock.tsx @@ -10,7 +10,7 @@ import { } from '@deepseek-ai/dsh-client-ui-primitives' import type { InboxState } from '@deepseek-ai/dsh-agent/types' import type { QueueAction } from '@deepseek-ai/dsh-api-session-controller/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { UserTextFacts } from '../index.ts' import { NS } from '../locales.ts' import css from './QueueDock.module.css' diff --git a/packages/client/ui-conversation/src/client/service.ts b/packages/client/ui-conversation/src/client/service.ts index af19eb7721..27cae036db 100644 --- a/packages/client/ui-conversation/src/client/service.ts +++ b/packages/client/ui-conversation/src/client/service.ts @@ -25,7 +25,7 @@ import type { ComposerAttachment, ComposerFileAttachment, ComposerImageAttachment, DraftFileUpload, } from './contract/slots.ts' import type { QueueAction } from '@deepseek-ai/dsh-api-session-controller/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { ComposerBlocks } from './contract/composer-blocks.ts' import type { DraftAttachmentId, DraftAttachmentSerializationResult, SessionInputResolver, SubmitAttachment, SubmitOutcome, diff --git a/packages/client/ui-conversation/tests/conversation-assembler.client.spec.ts b/packages/client/ui-conversation/tests/conversation-assembler.client.spec.ts index 791524d651..624b789466 100644 --- a/packages/client/ui-conversation/tests/conversation-assembler.client.spec.ts +++ b/packages/client/ui-conversation/tests/conversation-assembler.client.spec.ts @@ -3,7 +3,7 @@ import type { SessionEventLike, SessionEventLikeEntry, SessionLiveEventEntry, } from '@deepseek-ai/dsh-api-session-controller/client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId, ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId, ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { StreamChunk } from '@deepseek-ai/dsh-llm' import { SessionSeq } from '@deepseek-ai/dsh-session/types' import type { SessionEvent } from '@deepseek-ai/dsh-session/types' diff --git a/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx b/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx index 7c048d5ee9..c6f05165a6 100644 --- a/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx +++ b/packages/client/ui-conversation/tests/queue-dock.client.spec.tsx @@ -13,7 +13,7 @@ import type { } from '@deepseek-ai/dsh-api-session-controller/client' import type { InboxState } from '@deepseek-ai/dsh-agent/types' import type { UserMessage } from '@deepseek-ai/dsh-llm/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' diff --git a/packages/client/ui-conversation/tests/service-orchestration.client.spec.ts b/packages/client/ui-conversation/tests/service-orchestration.client.spec.ts index 92541cc3ba..e29bf0a8e0 100644 --- a/packages/client/ui-conversation/tests/service-orchestration.client.spec.ts +++ b/packages/client/ui-conversation/tests/service-orchestration.client.spec.ts @@ -4,7 +4,7 @@ // service's scopeOf/binding path runs against production resolution (no local // tag probe). import type { UserMessage } from '@deepseek-ai/dsh-llm/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { Context } from '@deepseek-ai/cordis' import { describe, expect, it, vi } from 'vitest' import { makeTranslate, RemoteError, SlotTestRuntime } from '@deepseek-ai/dsh-client-test-runtime' diff --git a/packages/client/ui-deliverables/src/presented.ts b/packages/client/ui-deliverables/src/presented.ts index f9274f067a..a53f3fe6c0 100644 --- a/packages/client/ui-deliverables/src/presented.ts +++ b/packages/client/ui-deliverables/src/presented.ts @@ -1,7 +1,7 @@ /** Validate declared workspace paths and address their native-open actions. */ import type { PresentedFile } from '@deepseek-ai/dsh-tool-present/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' /** Authenticated POST route for opening a workspace file on the Host desktop. */ export const PRESENT_OPEN_PATH = '/api/present.open' diff --git a/packages/client/ui-goal/src/client/goal-command-input.ts b/packages/client/ui-goal/src/client/goal-command-input.ts index 742959a349..01e6441385 100644 --- a/packages/client/ui-goal/src/client/goal-command-input.ts +++ b/packages/client/ui-goal/src/client/goal-command-input.ts @@ -1,6 +1,5 @@ import type { SessionEvent } from '@deepseek-ai/dsh-session/types' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' -import type {} from '@deepseek-ai/dsh-commands/types' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import type { ConversationNodeDefinition, } from '@deepseek-ai/dsh-client-ui-conversation/client' diff --git a/packages/client/ui-jobs/src/client/index.ts b/packages/client/ui-jobs/src/client/index.ts index 5174aa1fb8..b4595f53cb 100644 --- a/packages/client/ui-jobs/src/client/index.ts +++ b/packages/client/ui-jobs/src/client/index.ts @@ -5,7 +5,7 @@ * holds no transport state of its own. */ import type { Context as ClientContext } from '@deepseek-ai/cordis' -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import { JobListAction } from './JobListAction.tsx' import type { JobListInjected } from './JobListAction.tsx' import type {} from '@deepseek-ai/dsh-api-job-controller/client' diff --git a/packages/client/ui-jobs/tests/browser-plugin.client.spec.ts b/packages/client/ui-jobs/tests/browser-plugin.client.spec.ts index e79466817a..73092ce046 100644 --- a/packages/client/ui-jobs/tests/browser-plugin.client.spec.ts +++ b/packages/client/ui-jobs/tests/browser-plugin.client.spec.ts @@ -5,7 +5,7 @@ */ import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { Context } from '@deepseek-ai/cordis' -import type { JobId } from '@deepseek-ai/dsh-jobs/brand' +import type { JobId } from '@deepseek-ai/dsh-jobs/types' import { brandString } from '@deepseek-ai/dsh-brand' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { describe, expect, it } from 'vitest' diff --git a/packages/client/ui-model-selection/tests/browser-plugin.client.spec.ts b/packages/client/ui-model-selection/tests/browser-plugin.client.spec.ts index ccd58c6a81..275a4d2ec9 100644 --- a/packages/client/ui-model-selection/tests/browser-plugin.client.spec.ts +++ b/packages/client/ui-model-selection/tests/browser-plugin.client.spec.ts @@ -18,7 +18,7 @@ import { RemoteError, TestRemote } from '@deepseek-ai/dsh-client-test-runtime' import type { ModelSelection } from '@deepseek-ai/dsh-agent/types' import type { ModelSelectionProjection } from '@deepseek-ai/dsh-agent/types' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import type { CommandContribution, PopupSelectSpec, SelectOption } from '@deepseek-ai/dsh-client-ui-commands/client' import type { ModelSelectInjected } from '../src/client/slots.ts' import { apply, inject } from '../src/client/index.ts' diff --git a/packages/client/ui-plan/src/client/PlanCard.tsx b/packages/client/ui-plan/src/client/PlanCard.tsx index e629b024c3..777a8f971e 100644 --- a/packages/client/ui-plan/src/client/PlanCard.tsx +++ b/packages/client/ui-plan/src/client/PlanCard.tsx @@ -5,7 +5,7 @@ import type { ObservableSnapshot } from '@deepseek-ai/dsh-client-store' import type { SubmittedPlan } from './plan.ts' import type {} from './plan-definition.ts' import type { HostObservable, InjectFace, PropsLocale, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type {} from '@deepseek-ai/dsh-client-ui-user-questions/client' import type { createPlanReviewStore } from './review-store.ts' diff --git a/packages/client/ui-plan/src/client/plan.ts b/packages/client/ui-plan/src/client/plan.ts index 6ec1937f5c..cd5f0524d1 100644 --- a/packages/client/ui-plan/src/client/plan.ts +++ b/packages/client/ui-plan/src/client/plan.ts @@ -1,6 +1,6 @@ /** Plan text and resource identities derived from logged native or PTC calls. */ import type {} from '@deepseek-ai/dsh-tool-executor-ptc/client' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { SessionAddress } from '@deepseek-ai/dsh-api-session-controller/types' diff --git a/packages/client/ui-sidebar-right/src/client/shell/SidebarRight.tsx b/packages/client/ui-sidebar-right/src/client/shell/SidebarRight.tsx index e0182a611b..2659481ab6 100644 --- a/packages/client/ui-sidebar-right/src/client/shell/SidebarRight.tsx +++ b/packages/client/ui-sidebar-right/src/client/shell/SidebarRight.tsx @@ -339,8 +339,11 @@ function SidebarPanel(panel: PanelProps & { width: number; panelRef: RefObject { expect(panel.style.width).toBe('420px') fireEvent.click(element(h.view.container, '[data-sidebar-right-mode]')) expect(h.layout().mode).toBe('fullscreen') - expect(panel.style.width).toBe('100vw') + expect(panel.style.width).toBe('calc(1px + 100vw)') + expect(panel.style.getPropertyValue('--dsh-sidebar-width')).toBe('calc(100vw + 1px)') expect(panel.dataset['sidebarRightPanel']).toBe('fullscreen') expect(element(h.view.container, '[data-tab-body]')).toBe(body) expect(h.frame.openRightbar).toHaveBeenLastCalledWith(true, true) diff --git a/packages/client/ui-user-questions/src/client/contract/slots.ts b/packages/client/ui-user-questions/src/client/contract/slots.ts index 4d1e9fd0e9..81e140387a 100644 --- a/packages/client/ui-user-questions/src/client/contract/slots.ts +++ b/packages/client/ui-user-questions/src/client/contract/slots.ts @@ -1,7 +1,7 @@ /** Question composer props and one pending Remote waterfall response. */ import type { InjectFace, PropsLocale, PropsRenderSlots, PropsRuntime, PropsStore } from '@deepseek-ai/dsh-client-ui-slots' // The client module declares the conversation.composer SlotMap entry required by PropsRuntime. -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { AskUserQuestionAnswer, AskUserQuestionAnswerItem, AskUserQuestionItem, UserQuestionState, diff --git a/packages/client/ui-user-questions/tests/plan-review-panel.client.spec.tsx b/packages/client/ui-user-questions/tests/plan-review-panel.client.spec.tsx index 31b9296885..e6020e1b25 100644 --- a/packages/client/ui-user-questions/tests/plan-review-panel.client.spec.tsx +++ b/packages/client/ui-user-questions/tests/plan-review-panel.client.spec.tsx @@ -5,7 +5,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { cleanup, fireEvent, render, screen } from '@testing-library/react' import { allowAllAccess } from '@deepseek-ai/dsh-client-test-runtime' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createWaterfallRequest, PendingQuestion, planReviewOf, type QuestionComposerProps, type QuestionWait, } from '../src/client/contract/slots.ts' diff --git a/packages/compaction/command-compact/src/index.ts b/packages/compaction/command-compact/src/index.ts index f3040d2341..1b3aa10644 100644 --- a/packages/compaction/command-compact/src/index.ts +++ b/packages/compaction/command-compact/src/index.ts @@ -5,7 +5,7 @@ import type { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/types' import { ManualCompactionError } from '@deepseek-ai/dsh-compaction' import type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands' diff --git a/packages/compaction/compaction-basic/src/index.ts b/packages/compaction/compaction-basic/src/index.ts index 096fa72fe4..109202ec8c 100644 --- a/packages/compaction/compaction-basic/src/index.ts +++ b/packages/compaction/compaction-basic/src/index.ts @@ -13,7 +13,7 @@ import { CONTEXT_WINDOW_EXCEEDED_CODE, LlmError } from '@deepseek-ai/dsh-llm' import type { LlmCallConfig } from '@deepseek-ai/dsh-llm' import { assertNever } from '@deepseek-ai/dsh-util-values' import type { Agent, PreStepDecision } from '@deepseek-ai/dsh-agent' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' // Type-only: makes the optional sibling service available to `ctx.get()`. import type {} from '@deepseek-ai/dsh-compaction-tool-result-pruner' import { diff --git a/packages/compaction/compaction-basic/src/region.ts b/packages/compaction/compaction-basic/src/region.ts index 416d13867b..2623071d27 100644 --- a/packages/compaction/compaction-basic/src/region.ts +++ b/packages/compaction/compaction-basic/src/region.ts @@ -16,7 +16,7 @@ import { toolPairingBalancedBefore, } from '@deepseek-ai/dsh-compaction' import type { CompactionResult } from '@deepseek-ai/dsh-compaction' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import { createUserMessage, errorChain } from '@deepseek-ai/dsh-llm' import type { Message, UserMessage } from '@deepseek-ai/dsh-llm' import type { TokenMeasurement, TokenMeter } from '@deepseek-ai/dsh-token-meter' diff --git a/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts b/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts index 6d6d8cda5a..a2ca29319a 100644 --- a/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts +++ b/packages/compaction/compaction-basic/tests/manual-compaction.spec.ts @@ -4,7 +4,7 @@ import { Context } from '@deepseek-ai/cordis' import AgentLoop from '@deepseek-ai/dsh-agent-loop' import { mountAgentLoopTestDependencies } from '@deepseek-ai/dsh-agent-loop-testkit' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import { BasicCompactionEngine } from '@deepseek-ai/dsh-compaction-basic' import type { CompactionId } from '@deepseek-ai/dsh-compaction/types' import { isCompactCheckpointSource, ManualCompactionError } from '@deepseek-ai/dsh-compaction' diff --git a/packages/compaction/compaction/src/checkpoint.ts b/packages/compaction/compaction/src/checkpoint.ts index 80baa96104..622643e91c 100644 --- a/packages/compaction/compaction/src/checkpoint.ts +++ b/packages/compaction/compaction/src/checkpoint.ts @@ -12,7 +12,7 @@ */ import type { MessageSource } from '@deepseek-ai/dsh-llm/message' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import type { CompactionId } from './brand.ts' const COMPACT_CHECKPOINT_MARKER = Object.freeze({ kind: 'compact-checkpoint' } as const) diff --git a/packages/compaction/compaction/src/index.ts b/packages/compaction/compaction/src/index.ts index c6dee6fbae..c77e5e014e 100644 --- a/packages/compaction/compaction/src/index.ts +++ b/packages/compaction/compaction/src/index.ts @@ -9,7 +9,7 @@ import { Context, Service } from '@deepseek-ai/cordis' import type { Session, SessionSeq } from '@deepseek-ai/dsh-session' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import type { CompactionResult } from './types.ts' import type { CompactionCheckpointSource } from './checkpoint.ts' diff --git a/packages/compaction/compaction/src/types.ts b/packages/compaction/compaction/src/types.ts index 0c69c53deb..b35dc283a5 100644 --- a/packages/compaction/compaction/src/types.ts +++ b/packages/compaction/compaction/src/types.ts @@ -8,7 +8,7 @@ */ import type { ContentBlock, TokenUsage } from '@deepseek-ai/dsh-llm' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import type { SessionSeq } from '@deepseek-ai/dsh-session/types' import type { CompactionId } from './brand.ts' diff --git a/packages/computer-use/computer-use/README.i18n.yaml b/packages/computer-use/computer-use/README.i18n.yaml index 1ff39ccdb7..fd75db2c57 100644 --- a/packages/computer-use/computer-use/README.i18n.yaml +++ b/packages/computer-use/computer-use/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 405b30feaf48c087 /deepseek-ai-dsh-computer-use/use-this-package: - en: 8f22c8f8753dbb98 - zh: 34a000c400b52cea + en: 66ffc2bb7d3fde41 + zh: 4066645e046da98a /deepseek-ai-dsh-computer-use/understand-the-implementation: en: 181679887837591a zh: cc2e96766ce0aa63 diff --git a/packages/computer-use/computer-use/README.md b/packages/computer-use/computer-use/README.md index d46396cda5..d0f70f8370 100644 --- a/packages/computer-use/computer-use/README.md +++ b/packages/computer-use/computer-use/README.md @@ -31,7 +31,7 @@ Mount the service once beside the chosen provider in a Cordis composition: - name: '@deepseek-ai/dsh-computer-use' ``` -The service has no configuration. Provider plugins inject `computerUse` and call `ctx.computerUse.register(brandString(name))`, using `brandString` from `@deepseek-ai/dsh-brand` and the type from `@deepseek-ai/dsh-computer-use/brand`. The returned effect disposer releases that registration. +The service has no configuration. Provider plugins inject `computerUse` and call `ctx.computerUse.register(brandString(name))`, using `brandString` from `@deepseek-ai/dsh-brand` and the type from `@deepseek-ai/dsh-computer-use/types`. The returned effect disposer releases that registration. Providers stop admitting tool calls, close their resources, and await owned work before releasing the registration. `ctx.computerUse.providerName` reports the registered name until release. diff --git a/packages/computer-use/computer-use/README.zh.md b/packages/computer-use/computer-use/README.zh.md index 16b5da2749..f3ab0fa3a5 100644 --- a/packages/computer-use/computer-use/README.zh.md +++ b/packages/computer-use/computer-use/README.zh.md @@ -31,7 +31,7 @@ kind: "package-reference" - name: '@deepseek-ai/dsh-computer-use' ``` -服务没有配置项。提供方插件注入 `computerUse` 并调用 `ctx.computerUse.register(brandString(name))`,其中 `brandString` 来自 `@deepseek-ai/dsh-brand`,类型来自 `@deepseek-ai/dsh-computer-use/brand`。返回的 effect 清理函数释放此次注册。 +服务没有配置项。提供方插件注入 `computerUse` 并调用 `ctx.computerUse.register(brandString(name))`,其中 `brandString` 来自 `@deepseek-ai/dsh-brand`,类型来自 `@deepseek-ai/dsh-computer-use/types`。返回的 effect 清理函数释放此次注册。 提供方先停止接收工具调用、关闭资源并等待自有工作结束,再释放注册。释放前,`ctx.computerUse.providerName` 始终报告已注册的名称。 diff --git a/packages/computer-use/computer-use/package.json b/packages/computer-use/computer-use/package.json index 05d763c517..000923c7b1 100644 --- a/packages/computer-use/computer-use/package.json +++ b/packages/computer-use/computer-use/package.json @@ -21,9 +21,9 @@ "./src/*": "./src/*", "./locale/*.json": "./locale/*.json", "./package.json": "./package.json", - "./brand": { - "types": "./lib/types/brand.d.ts", - "default": "./lib/types/brand.js" + "./types": { + "types": "./lib/types/types.d.ts", + "default": "./lib/types/types.js" } }, "files": [ diff --git a/packages/computer-use/computer-use/src/brand.ts b/packages/computer-use/computer-use/src/brand.ts index fb2895cc72..ed4840f9f7 100644 --- a/packages/computer-use/computer-use/src/brand.ts +++ b/packages/computer-use/computer-use/src/brand.ts @@ -1,4 +1,4 @@ -/** Computer-use provider identities. @module @deepseek-ai/dsh-computer-use/brand */ +/** Computer-use provider identities. @module @deepseek-ai/dsh-computer-use/src/brand.ts */ import type { Branded } from '@deepseek-ai/dsh-brand' diff --git a/packages/computer-use/computer-use/src/index.ts b/packages/computer-use/computer-use/src/index.ts index 139acff447..57c54e848e 100644 --- a/packages/computer-use/computer-use/src/index.ts +++ b/packages/computer-use/computer-use/src/index.ts @@ -4,7 +4,7 @@ */ import { Context, Service } from '@deepseek-ai/cordis' -import type { ComputerUseProviderName } from './brand.ts' +import type { ComputerUseProviderName } from './types.ts' declare module '@deepseek-ai/cordis' { interface Context { diff --git a/packages/computer-use/computer-use/src/types.ts b/packages/computer-use/computer-use/src/types.ts new file mode 100644 index 0000000000..cdd9e96d9f --- /dev/null +++ b/packages/computer-use/computer-use/src/types.ts @@ -0,0 +1,2 @@ +/** Public type-only entry for computer-use identities. */ +export type { ComputerUseProviderName } from './brand.ts' diff --git a/packages/computer-use/computer-use/tests/registry.spec.ts b/packages/computer-use/computer-use/tests/registry.spec.ts index d4f82567b3..f5943863ab 100644 --- a/packages/computer-use/computer-use/tests/registry.spec.ts +++ b/packages/computer-use/computer-use/tests/registry.spec.ts @@ -2,7 +2,7 @@ import { Context } from '@deepseek-ai/cordis' import { describe, expect, it } from 'vitest' import ComputerUseRegistry from '../src/index.ts' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ComputerUseProviderName } from '../src/brand.ts' +import type { ComputerUseProviderName } from '../src/types.ts' const MCP = brandString('cua-driver-mcp') const NATIVE = brandString('cua-driver-native') diff --git a/packages/context/file-reference-local/package.json b/packages/context/file-reference-local/package.json index bb2022a417..96c326d58b 100644 --- a/packages/context/file-reference-local/package.json +++ b/packages/context/file-reference-local/package.json @@ -18,10 +18,6 @@ "types": "./lib/types/index.d.ts", "default": "./lib/index.js" }, - "./search": { - "types": "./lib/types/search.d.ts", - "default": "./lib/types/search.js" - }, "./src/*": "./src/*", "./package.json": "./package.json", "./locale/*.json": "./locale/*.json" @@ -29,7 +25,6 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.js", "lib/types/**/*.d.ts", "lib/types/**/*.d.ts.map", "lib/**/*.js.map", diff --git a/packages/context/file-reference-local/src/search.ts b/packages/context/file-reference-local/src/search.ts index ad4571cc97..24aeb34c5f 100644 --- a/packages/context/file-reference-local/src/search.ts +++ b/packages/context/file-reference-local/src/search.ts @@ -3,7 +3,7 @@ * only: selected values remain ordinary prompt text and file contents stay * behind the model-facing `read` tool. * - * @module @deepseek-ai/dsh-file-reference-local/search + * @module @deepseek-ai/dsh-file-reference-local/src/search */ import { lstat, readdir } from 'node:fs/promises' diff --git a/packages/context/file-reference/README.i18n.yaml b/packages/context/file-reference/README.i18n.yaml index 9a8cf38301..282ed780e0 100644 --- a/packages/context/file-reference/README.i18n.yaml +++ b/packages/context/file-reference/README.i18n.yaml @@ -33,8 +33,8 @@ en: 191332951f81b136 zh: 8336659a9ffa20f1 /deepseek-ai-dsh-file-reference/understand-the-implementation/source-map: - en: 7ca26c752fab5c46 - zh: 961bc4283792155d + en: ca79028d30496fde + zh: 58db2bd6a66db1f8 /deepseek-ai-dsh-file-reference/understand-the-implementation/main-flow: en: fd65f309c940de96 zh: c1517e592d646d6c diff --git a/packages/context/file-reference/README.md b/packages/context/file-reference/README.md index 59ad5ba784..598987de3a 100644 --- a/packages/context/file-reference/README.md +++ b/packages/context/file-reference/README.md @@ -59,7 +59,7 @@ The package separates an abstract discovery service from a shared, browser-safe |---|---| | [`src/index.ts`](src/index.ts) | Abstract `FileReferenceService` and `FILE_REFERENCE_PROMPT` | | [`src/grammar.ts`](src/grammar.ts) | `activeAtToken` recognition and `formatFileMention` rendering | -| [`src/types.ts`](src/types.ts) | `FileReferenceCandidate` path-only result type | +| [`src/types.ts`](src/types.ts) | Path-only `FileReferenceCandidate` results and `ActiveAtToken` mention-token records | ### Main flow diff --git a/packages/context/file-reference/README.zh.md b/packages/context/file-reference/README.zh.md index 9a0d3a95c8..0cfbde5dab 100644 --- a/packages/context/file-reference/README.zh.md +++ b/packages/context/file-reference/README.zh.md @@ -59,7 +59,7 @@ kind: "package-reference" |---|---| | [`src/index.ts`](src/index.ts) | 抽象 `FileReferenceService` 与 `FILE_REFERENCE_PROMPT` | | [`src/grammar.ts`](src/grammar.ts) | `activeAtToken` 识别与 `formatFileMention` 渲染 | -| [`src/types.ts`](src/types.ts) | 仅含路径的结果类型 `FileReferenceCandidate` | +| [`src/types.ts`](src/types.ts) | 仅含路径的 `FileReferenceCandidate` 结果和 `ActiveAtToken` 提及词元记录 | ### 主要流程 diff --git a/packages/context/file-reference/src/grammar.ts b/packages/context/file-reference/src/grammar.ts index 86bb51a843..e840af0eb3 100644 --- a/packages/context/file-reference/src/grammar.ts +++ b/packages/context/file-reference/src/grammar.ts @@ -4,17 +4,7 @@ * @module @deepseek-ai/dsh-file-reference/grammar */ -import type { FileReferenceCandidate } from './types.ts' - -/** Active `@` token ending at the editor cursor. */ -export interface ActiveAtToken { - /** Complete token replaced when the user accepts a completion. */ - prefix: string - /** Path query after `@` or `@"`. */ - query: string - /** Whether the user opened a quoted path. */ - quoted: boolean -} +import type { ActiveAtToken, FileReferenceCandidate } from './types.ts' /** * Extract an `@path` or `@"path with spaces` token at the cursor. An `@` diff --git a/packages/context/file-reference/src/index.ts b/packages/context/file-reference/src/index.ts index d6b30e783e..a42133775a 100644 --- a/packages/context/file-reference/src/index.ts +++ b/packages/context/file-reference/src/index.ts @@ -10,8 +10,7 @@ import type { Agent } from '@deepseek-ai/dsh-agent' import type { FileReferenceCandidate } from './types.ts' export { activeAtToken, formatFileMention } from './grammar.ts' -export type { ActiveAtToken } from './grammar.ts' -export type { FileReferenceCandidate } from './types.ts' +export type { ActiveAtToken, FileReferenceCandidate } from './types.ts' /** Model guidance for path-only references selected by a user interface. */ export const FILE_REFERENCE_PROMPT = 'Tokens prefixed with @ are paths the user explicitly referenced. Relative paths resolve from the workspace root; absolute paths identify files or directories on the host. A trailing slash marks a directory: list it when its contents matter. Anything else is a file: use the read tool when its contents are needed, and do not claim to have inspected it before reading. @"..." quotes a path containing spaces.' diff --git a/packages/context/file-reference/src/types.ts b/packages/context/file-reference/src/types.ts index 3637b2b2c4..26987562a4 100644 --- a/packages/context/file-reference/src/types.ts +++ b/packages/context/file-reference/src/types.ts @@ -1,9 +1,19 @@ /** - * Public file-reference discovery records. This module contains types only so + * Public file-reference discovery and mention-token records. This module contains types only so * generated Remote clients can consume it without Host runtime code. * @module @deepseek-ai/dsh-file-reference/types */ +/** Active `@` token ending at the editor cursor. */ +export interface ActiveAtToken { + /** Complete token replaced when the user accepts a completion. */ + prefix: string + /** Path query after `@` or `@"`. */ + query: string + /** Whether the user opened a quoted path. */ + quoted: boolean +} + /** One path-only completion candidate inside the target session cwd. */ export interface FileReferenceCandidate { /** User-facing path accepted by normal prompts and filesystem tools. */ diff --git a/packages/core/agent/src/model-selection.ts b/packages/core/agent/src/model-selection.ts index fc4b6afccf..3c4c7fb070 100644 --- a/packages/core/agent/src/model-selection.ts +++ b/packages/core/agent/src/model-selection.ts @@ -6,7 +6,7 @@ import type { Model, AgentOptions, PreStepDecision } from './runtime-types.ts' import type { ModelSelection } from './types.ts' import { boundContextSummary, createUserMessage, type ContextFormed } from '@deepseek-ai/dsh-llm' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import type { Session, EpochHeader } from '@deepseek-ai/dsh-session' import type { ProjectionDefinition } from '@deepseek-ai/dsh-session-projection' import { z } from 'zod' diff --git a/packages/core/agent/src/types.ts b/packages/core/agent/src/types.ts index 06d2c88ab1..703b843c7f 100644 --- a/packages/core/agent/src/types.ts +++ b/packages/core/agent/src/types.ts @@ -4,7 +4,7 @@ * @module @deepseek-ai/dsh-agent/types */ -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import type { UserMessage } from '@deepseek-ai/dsh-llm/types' // Type-only: the Workspace registry's archive-admission family map this registry merges `turn` into. import type {} from '@deepseek-ai/dsh-workspace/types' diff --git a/packages/core/tool-executor-ptc/src/types.ts b/packages/core/tool-executor-ptc/src/types.ts index 116eb06f4a..0a2c01f2e6 100644 --- a/packages/core/tool-executor-ptc/src/types.ts +++ b/packages/core/tool-executor-ptc/src/types.ts @@ -4,7 +4,7 @@ * @module @deepseek-ai/dsh-tool-executor-ptc/types */ -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { ContentBlock } from '@deepseek-ai/dsh-llm/types' import type { JsonValue } from '@deepseek-ai/dsh-util-values' diff --git a/packages/core/tools/package.json b/packages/core/tools/package.json index 6d67b4487b..cd7a4aaa56 100644 --- a/packages/core/tools/package.json +++ b/packages/core/tools/package.json @@ -18,10 +18,6 @@ "types": "./lib/types/index.d.ts", "default": "./lib/index.js" }, - "./presentation": { - "types": "./lib/types/presentation.d.ts", - "default": "./lib/types/presentation.js" - }, "./src/*": "./src/*", "./package.json": "./package.json", "./locale/*.json": "./locale/*.json", @@ -35,7 +31,6 @@ "lib/index.js", "lib/pipeline.js", "lib/shared-*.js", - "lib/types/**/*.js", "lib/types/**/*.d.ts", "lib/types/**/*.d.ts.map", "lib/**/*.js.map", diff --git a/packages/deliverables/tool-present/src/types.ts b/packages/deliverables/tool-present/src/types.ts index 04d8aba451..75a0650dcf 100644 --- a/packages/deliverables/tool-present/src/types.ts +++ b/packages/deliverables/tool-present/src/types.ts @@ -1,5 +1,5 @@ /** Durable file deliveries produced by the present tool. */ -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' /** A declared filesystem file whose current contents remain at its source path. */ export interface PresentedFile { diff --git a/packages/experimental/action-cards/src/types.ts b/packages/experimental/action-cards/src/types.ts index d240f47126..1b259baf71 100644 --- a/packages/experimental/action-cards/src/types.ts +++ b/packages/experimental/action-cards/src/types.ts @@ -1,6 +1,6 @@ /** Card proposals, recorded decisions and user-action results shared by every action kind. */ import type { ContextFormed } from '@deepseek-ai/dsh-llm' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionSeq } from '@deepseek-ai/dsh-session/types' import type { SessionProjectionSummaryExcluded } from '@deepseek-ai/dsh-session-projection/types' import type { JsonValue } from '@deepseek-ai/dsh-util-values' diff --git a/packages/experimental/browser-use-runtime/src/mcp.ts b/packages/experimental/browser-use-runtime/src/mcp.ts index 20d89588f1..e6abcb6aa8 100644 --- a/packages/experimental/browser-use-runtime/src/mcp.ts +++ b/packages/experimental/browser-use-runtime/src/mcp.ts @@ -4,7 +4,7 @@ import type { Context } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' import Schema from '@deepseek-ai/schemastery' import { brandString } from '@deepseek-ai/dsh-brand' -import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/brand' +import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/types' import * as McpClient from '@deepseek-ai/dsh-mcp-client' import { createScope } from '@deepseek-ai/dsh-scope' import type { Scope } from '@deepseek-ai/dsh-scope' diff --git a/packages/experimental/browser-use-stagehand-native/src/index.ts b/packages/experimental/browser-use-stagehand-native/src/index.ts index 9114233880..06870a2331 100644 --- a/packages/experimental/browser-use-stagehand-native/src/index.ts +++ b/packages/experimental/browser-use-stagehand-native/src/index.ts @@ -6,7 +6,7 @@ import type { Context } from '@deepseek-ai/cordis' import Schema from '@deepseek-ai/schemastery' import { brandString } from '@deepseek-ai/dsh-brand' -import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/brand' +import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/types' import { SessionResources } from '@deepseek-ai/dsh-experimental-browser-use-runtime' import { createMcpToolDefinition } from '@deepseek-ai/dsh-mcp-client' import { z } from 'zod' diff --git a/packages/experimental/browser-use-stagehand-native/tests/provider.spec.ts b/packages/experimental/browser-use-stagehand-native/tests/provider.spec.ts index 901eadcf7c..6c7caaf2fb 100644 --- a/packages/experimental/browser-use-stagehand-native/tests/provider.spec.ts +++ b/packages/experimental/browser-use-stagehand-native/tests/provider.spec.ts @@ -9,7 +9,7 @@ import type { Agent } from '@deepseek-ai/dsh-agent' import { mountAgentLoopTestDependencies, mountAgentLoopTestHarness } from '@deepseek-ai/dsh-agent-loop-testkit' import BrowserUseRegistry from '@deepseek-ai/dsh-browser-use' import { brandString } from '@deepseek-ai/dsh-brand' -import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/brand' +import type { BrowserUseProviderName } from '@deepseek-ai/dsh-browser-use/types' import { LlmAdapter, type ToolCallId, createUserMessage } from '@deepseek-ai/dsh-llm' import type { StreamChunk } from '@deepseek-ai/dsh-llm' import type { SessionId } from '@deepseek-ai/dsh-session' diff --git a/packages/experimental/client-ui-action-cards/src/client/Card.tsx b/packages/experimental/client-ui-action-cards/src/client/Card.tsx index 20e6f75700..296b0ef44a 100644 --- a/packages/experimental/client-ui-action-cards/src/client/Card.tsx +++ b/packages/experimental/client-ui-action-cards/src/client/Card.tsx @@ -3,7 +3,7 @@ import { useCallback, useId, useMemo, useState, type ReactNode } from 'react' import { Button } from '@deepseek-ai/dsh-client-ui-primitives' import type { HostObservable, InjectFace, PropsLocale, PropsRuntime, Translate } from '@deepseek-ai/dsh-client-ui-slots' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { ActionCardDecision, ActionCardFields, ActionCardProposal, ActionCardResult, ActionCardView, } from '@deepseek-ai/dsh-action-cards/types' diff --git a/packages/experimental/client-ui-action-cards/tests/browser-plugin.client.spec.ts b/packages/experimental/client-ui-action-cards/tests/browser-plugin.client.spec.ts index 2ee4f48c21..2a23a53ff7 100644 --- a/packages/experimental/client-ui-action-cards/tests/browser-plugin.client.spec.ts +++ b/packages/experimental/client-ui-action-cards/tests/browser-plugin.client.spec.ts @@ -5,7 +5,7 @@ import { SlotRegistry } from '@deepseek-ai/dsh-client-ui-renderer/client' import { LocaleRuntime } from '@deepseek-ai/dsh-client-locale/client' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { expect, it, onTestFinished, vi } from 'vitest' import { mountActionCards, inject } from '../src/client/mount.ts' import { apply as hostApply } from '../src/index.ts' diff --git a/packages/experimental/client-ui-action-cards/tests/card.client.spec.tsx b/packages/experimental/client-ui-action-cards/tests/card.client.spec.tsx index b744b037c8..a3d20c625f 100644 --- a/packages/experimental/client-ui-action-cards/tests/card.client.spec.tsx +++ b/packages/experimental/client-ui-action-cards/tests/card.client.spec.tsx @@ -3,7 +3,7 @@ import { memo, type ComponentProps } from 'react' import { act, cleanup, fireEvent, render, screen } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { type SessionId, SessionSeq } from '@deepseek-ai/dsh-session/types' import type { ActionCardDecision, ActionCardResult, ActionCardView } from '@deepseek-ai/dsh-action-cards/types' import { ActionCard, ActionCardTail, FoldedText } from '../src/client/Card.tsx' diff --git a/packages/experimental/client-ui-creation-recommendations/tests/card.client.spec.tsx b/packages/experimental/client-ui-creation-recommendations/tests/card.client.spec.tsx index cbcb3382ef..2a2eb58f7f 100644 --- a/packages/experimental/client-ui-creation-recommendations/tests/card.client.spec.tsx +++ b/packages/experimental/client-ui-creation-recommendations/tests/card.client.spec.tsx @@ -2,7 +2,7 @@ import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { FoldedText } from '@deepseek-ai/dsh-client-ui-action-cards/src/client/Card.tsx' diff --git a/packages/experimental/client-ui-creation-recommendations/tests/mount.client.spec.tsx b/packages/experimental/client-ui-creation-recommendations/tests/mount.client.spec.tsx index 8f3fe0911c..c4347c6942 100644 --- a/packages/experimental/client-ui-creation-recommendations/tests/mount.client.spec.tsx +++ b/packages/experimental/client-ui-creation-recommendations/tests/mount.client.spec.tsx @@ -4,7 +4,7 @@ import { cleanup, render, screen } from '@testing-library/react' import { Context } from '@deepseek-ai/cordis' import { LocaleRuntime } from '@deepseek-ai/dsh-client-locale/client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { ActionCardDescriptor } from '@deepseek-ai/dsh-client-ui-action-cards/client' import { FoldedText } from '@deepseek-ai/dsh-client-ui-action-cards/src/client/Card.tsx' diff --git a/packages/experimental/client-ui-plugin-recommendations/src/client/Card.tsx b/packages/experimental/client-ui-plugin-recommendations/src/client/Card.tsx index 5cf89a4df8..c64c50b191 100644 --- a/packages/experimental/client-ui-plugin-recommendations/src/client/Card.tsx +++ b/packages/experimental/client-ui-plugin-recommendations/src/client/Card.tsx @@ -5,7 +5,7 @@ import { Button } from '@deepseek-ai/dsh-client-ui-primitives' import type { SnapshotStore } from '@deepseek-ai/dsh-client-store' import type { LocalizedText } from '@deepseek-ai/dsh-package-manifest' import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { ActionCardBodyProps } from '@deepseek-ai/dsh-client-ui-action-cards/client' import type { PluginDetails, RecommendationDetails } from '@deepseek-ai/dsh-plugin-recommendations/types' import type { RecommendationKey } from './locales.ts' diff --git a/packages/experimental/client-ui-plugin-recommendations/tests/browser-plugin.client.spec.tsx b/packages/experimental/client-ui-plugin-recommendations/tests/browser-plugin.client.spec.tsx index b4b1a8debd..29313d6a47 100644 --- a/packages/experimental/client-ui-plugin-recommendations/tests/browser-plugin.client.spec.tsx +++ b/packages/experimental/client-ui-plugin-recommendations/tests/browser-plugin.client.spec.tsx @@ -4,7 +4,7 @@ import { act, cleanup, render, screen } from '@testing-library/react' import { Context } from '@deepseek-ai/cordis' import { LocaleRuntime } from '@deepseek-ai/dsh-client-locale/client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { ActionCardDescriptor } from '@deepseek-ai/dsh-client-ui-action-cards/client' import { FoldedText } from '@deepseek-ai/dsh-client-ui-action-cards/src/client/Card.tsx' diff --git a/packages/experimental/client-ui-plugin-recommendations/tests/card.client.spec.tsx b/packages/experimental/client-ui-plugin-recommendations/tests/card.client.spec.tsx index 0cc2b311d4..f78a774cae 100644 --- a/packages/experimental/client-ui-plugin-recommendations/tests/card.client.spec.tsx +++ b/packages/experimental/client-ui-plugin-recommendations/tests/card.client.spec.tsx @@ -2,7 +2,7 @@ import { act, cleanup, fireEvent, render, screen, waitFor, within } from '@testing-library/react' import { afterEach, expect, it, vi } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { createSnapshotStore } from '@deepseek-ai/dsh-client-store' import { makeTranslate } from '@deepseek-ai/dsh-client-test-runtime' diff --git a/packages/experimental/client-ui-stats/tests/stats-plugin.client.spec.ts b/packages/experimental/client-ui-stats/tests/stats-plugin.client.spec.ts index bc5f0c1a90..7db00f03ad 100644 --- a/packages/experimental/client-ui-stats/tests/stats-plugin.client.spec.ts +++ b/packages/experimental/client-ui-stats/tests/stats-plugin.client.spec.ts @@ -2,7 +2,7 @@ import { Context } from '@deepseek-ai/cordis' import { describe, expect, it, vi } from 'vitest' import type { AttachmentId, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment/types' import { brandString } from '@deepseek-ai/dsh-brand' -import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/types' import type { StreamChunk } from '@deepseek-ai/dsh-llm' import type { AssistantLiveChunkEvent, SessionEventLike, SessionEventLikeEntry, diff --git a/packages/experimental/computer-use-cua-driver-mcp/src/index.ts b/packages/experimental/computer-use-cua-driver-mcp/src/index.ts index b0eded53eb..54b6cf3369 100644 --- a/packages/experimental/computer-use-cua-driver-mcp/src/index.ts +++ b/packages/experimental/computer-use-cua-driver-mcp/src/index.ts @@ -7,7 +7,7 @@ import type { Context, Fiber } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/brand' +import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/types' import * as McpClient from '@deepseek-ai/dsh-mcp-client' import type {} from '@deepseek-ai/dsh-computer-use' diff --git a/packages/experimental/computer-use-cua-driver-mcp/tests/composition.spec.ts b/packages/experimental/computer-use-cua-driver-mcp/tests/composition.spec.ts index d422ec248f..c002cc57b6 100644 --- a/packages/experimental/computer-use-cua-driver-mcp/tests/composition.spec.ts +++ b/packages/experimental/computer-use-cua-driver-mcp/tests/composition.spec.ts @@ -11,7 +11,7 @@ import Loader from '@deepseek-ai/cordis-plugin-loader' import Include from '@deepseek-ai/cordis-plugin-include' import ComputerUse from '@deepseek-ai/dsh-computer-use' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/brand' +import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import LlmRuntime, { LlmAdapter, type ToolCallId, createUserMessage } from '@deepseek-ai/dsh-llm' diff --git a/packages/experimental/computer-use-cua-driver-mcp/tests/lifecycle.spec.ts b/packages/experimental/computer-use-cua-driver-mcp/tests/lifecycle.spec.ts index c6ad49527d..b3d0e0894a 100644 --- a/packages/experimental/computer-use-cua-driver-mcp/tests/lifecycle.spec.ts +++ b/packages/experimental/computer-use-cua-driver-mcp/tests/lifecycle.spec.ts @@ -4,7 +4,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import ComputerUse from '@deepseek-ai/dsh-computer-use' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/brand' +import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' diff --git a/packages/experimental/computer-use-cua-driver-native/src/index.ts b/packages/experimental/computer-use-cua-driver-native/src/index.ts index 832b55f6a9..c8bae5f713 100644 --- a/packages/experimental/computer-use-cua-driver-native/src/index.ts +++ b/packages/experimental/computer-use-cua-driver-native/src/index.ts @@ -6,7 +6,7 @@ import type { Context } from '@deepseek-ai/cordis' import Schema from '@deepseek-ai/schemastery' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/brand' +import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/types' import { createMcpToolDefinition } from '@deepseek-ai/dsh-mcp-client' import { z } from 'zod' import type { CuaDriver as NativeDriver } from '@trycua/cua-driver' diff --git a/packages/experimental/computer-use-cua-driver-native/tests/provider.spec.ts b/packages/experimental/computer-use-cua-driver-native/tests/provider.spec.ts index f711c3e9e8..dc55cdc64f 100644 --- a/packages/experimental/computer-use-cua-driver-native/tests/provider.spec.ts +++ b/packages/experimental/computer-use-cua-driver-native/tests/provider.spec.ts @@ -6,7 +6,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import ComputerUseRegistry from '@deepseek-ai/dsh-computer-use' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/brand' +import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import type { ToolCallId } from '@deepseek-ai/dsh-llm' diff --git a/packages/experimental/cua/src/index.ts b/packages/experimental/cua/src/index.ts index 9016236f50..f8da4aa4a8 100644 --- a/packages/experimental/cua/src/index.ts +++ b/packages/experimental/cua/src/index.ts @@ -6,7 +6,7 @@ import { withFileLock } from '@deepseek-ai/dsh-atomic-write' import type { Context } from '@deepseek-ai/cordis' import Schema from '@deepseek-ai/schemastery' import type { Agent } from '@deepseek-ai/dsh-agent' -import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/brand' +import type { ComputerUseProviderName } from '@deepseek-ai/dsh-computer-use/types' import { admitEncodedImages } from '@deepseek-ai/dsh-attachment' import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment' import type { ContentBlock } from '@deepseek-ai/dsh-llm' diff --git a/packages/experimental/liveshare/tests/viewer-fixture.client.ts b/packages/experimental/liveshare/tests/viewer-fixture.client.ts index 410014ac6a..e62dfadb89 100644 --- a/packages/experimental/liveshare/tests/viewer-fixture.client.ts +++ b/packages/experimental/liveshare/tests/viewer-fixture.client.ts @@ -16,7 +16,7 @@ import { } from '@deepseek-ai/dsh-llm/message' import { brandString } from '@deepseek-ai/dsh-brand' import type { RemoteAccessFrame, RemoteAccessGrant } from '@deepseek-ai/dsh-api-remote-access/client' -import type { MessageId, ReasoningEffortId, ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId, ReasoningEffortId, ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { AssistantMessage, ContentBlock, @@ -26,7 +26,7 @@ import type { ToolResultMessage, UserMessage, } from '@deepseek-ai/dsh-llm' -import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/brand' +import type { LlmAttemptId } from '@deepseek-ai/dsh-llm/types' import { AssistantStreamAccumulator, expandAssistantStream, @@ -49,8 +49,7 @@ import type { import { SESSION_FORMAT_VERSION, SessionSeq } from '@deepseek-ai/dsh-session/types' import type { JsonValue } from '@deepseek-ai/dsh-util-values' import type { TodoItem } from '@deepseek-ai/dsh-tool-todo/client' -import type { CommandDefinitionId, CommandId } from '@deepseek-ai/dsh-commands/brand' -import type { CommandDescriptor, CommandExecution, CommandResult } from '@deepseek-ai/dsh-commands/types' +import type { CommandDefinitionId, CommandId, CommandDescriptor, CommandExecution, CommandResult } from '@deepseek-ai/dsh-commands/types' import type { CredentialInfo } from '@deepseek-ai/dsh-credentials/types' import type { DirectoryListing as FixtureDirectoryListing } from '@deepseek-ai/dsh-host-directory-picker/types' import type { SettingsDescribeValue, SettingsNamespaceView } from '@deepseek-ai/dsh-settings/types' diff --git a/packages/extensions/cordis-host-runner/tests/helpers.ts b/packages/extensions/cordis-host-runner/tests/helpers.ts index 9ad558424a..cd8e6d8b67 100644 --- a/packages/extensions/cordis-host-runner/tests/helpers.ts +++ b/packages/extensions/cordis-host-runner/tests/helpers.ts @@ -3,7 +3,7 @@ import * as NativeToolExecutor from '@deepseek-ai/dsh-tool-executor-native' import { Context } from '@deepseek-ai/cordis' import Timer from '@deepseek-ai/cordis-plugin-timer' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRegistry from '@deepseek-ai/dsh-tools' import type { ToolDefinition, ToolExecutionResult } from '@deepseek-ai/dsh-tools' diff --git a/packages/feedback/command-feedback/src/index.ts b/packages/feedback/command-feedback/src/index.ts index f7ab58117d..960c8c70b1 100644 --- a/packages/feedback/command-feedback/src/index.ts +++ b/packages/feedback/command-feedback/src/index.ts @@ -10,7 +10,7 @@ import type { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/types' import type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands' import type { Session } from '@deepseek-ai/dsh-session' import { getOrCreateAnonymousUserId } from '@deepseek-ai/dsh-anonymous-user-id' diff --git a/packages/feedback/message-feedback/src/types.ts b/packages/feedback/message-feedback/src/types.ts index a844ca9870..434dec6689 100644 --- a/packages/feedback/message-feedback/src/types.ts +++ b/packages/feedback/message-feedback/src/types.ts @@ -6,7 +6,7 @@ */ import type { Branded } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { FeedbackCategory } from '@deepseek-ai/dsh-command-feedback/types' diff --git a/packages/feedback/message-feedback/tests/helpers.ts b/packages/feedback/message-feedback/tests/helpers.ts index da33724660..9bc4c0c06a 100644 --- a/packages/feedback/message-feedback/tests/helpers.ts +++ b/packages/feedback/message-feedback/tests/helpers.ts @@ -4,7 +4,7 @@ import { join } from 'node:path' import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' import { createAssistantMessage, createUserMessage } from '@deepseek-ai/dsh-llm' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import SessionStore, { SessionLogOffset, SESSION_FORMAT_VERSION, Session, diff --git a/packages/feedback/message-feedback/tests/message-feedback.spec.ts b/packages/feedback/message-feedback/tests/message-feedback.spec.ts index 413996ea08..1ab570885b 100644 --- a/packages/feedback/message-feedback/tests/message-feedback.spec.ts +++ b/packages/feedback/message-feedback/tests/message-feedback.spec.ts @@ -1,7 +1,7 @@ import { randomUUID } from 'node:crypto' import { afterEach, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { Session, type SessionId, SessionLogOffset, SessionSeq, type SessionEvent } from '@deepseek-ai/dsh-session' import { remoteMethods } from '@deepseek-ai/dsh-typert-protocol' import MessageFeedbackService from '../src/index.ts' diff --git a/packages/goal/command-goal/src/index.ts b/packages/goal/command-goal/src/index.ts index cf82edc516..e4b332caf7 100644 --- a/packages/goal/command-goal/src/index.ts +++ b/packages/goal/command-goal/src/index.ts @@ -5,7 +5,7 @@ import type { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/types' import type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands' import { GoalError } from '@deepseek-ai/dsh-goal' import type { GoalPhase, GoalRef, GoalView } from '@deepseek-ai/dsh-goal' diff --git a/packages/goal/tool-goal/tests/tool-goal.spec.ts b/packages/goal/tool-goal/tests/tool-goal.spec.ts index 90911aa612..87b38f5891 100644 --- a/packages/goal/tool-goal/tests/tool-goal.spec.ts +++ b/packages/goal/tool-goal/tests/tool-goal.spec.ts @@ -10,7 +10,7 @@ import { brandString } from '@deepseek-ai/dsh-brand' import type { GoalId } from '@deepseek-ai/dsh-goal/types' import GoalService from '@deepseek-ai/dsh-goal' import type { GoalRef } from '@deepseek-ai/dsh-goal' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage } from '@deepseek-ai/dsh-llm' import type { MessageSource } from '@deepseek-ai/dsh-llm' import type { ContextFormed } from '@deepseek-ai/dsh-llm' diff --git a/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts b/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts index 98c01de17f..85f6271e9a 100644 --- a/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts +++ b/packages/guard/repeat-tool-reminder/tests/repeat-tool-reminder.spec.ts @@ -2,7 +2,7 @@ import { executeToolFixture } from '@deepseek-ai/dsh-tool-testkit' import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage } from '@deepseek-ai/dsh-llm' import type { ContextFormed } from '@deepseek-ai/dsh-llm' import type { SessionId, SessionEvent } from '@deepseek-ai/dsh-session' diff --git a/packages/guard/timeout-policy/tests/timeout-policy.spec.ts b/packages/guard/timeout-policy/tests/timeout-policy.spec.ts index 6839e10f7b..4ffe77bde9 100644 --- a/packages/guard/timeout-policy/tests/timeout-policy.spec.ts +++ b/packages/guard/timeout-policy/tests/timeout-policy.spec.ts @@ -12,7 +12,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { HarnessError } from '@deepseek-ai/dsh-llm' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { TOOL_ABORTED, type ToolExecutionInput, type PostToolDecision } from '@deepseek-ai/dsh-tools' diff --git a/packages/host/open-in-app/README.i18n.yaml b/packages/host/open-in-app/README.i18n.yaml index a3fdd18140..97f08b56d1 100644 --- a/packages/host/open-in-app/README.i18n.yaml +++ b/packages/host/open-in-app/README.i18n.yaml @@ -33,8 +33,8 @@ en: 558e741770080c93 zh: 80482d355dc89cae /deepseek-ai-dsh-host-open-in-app/understand-the-implementation: - en: 3cf8397731645138 - zh: a8fbf657a150d8c9 + en: 0ebb9f5dfb251f11 + zh: d60bd93d5b3e6fb9 /deepseek-ai-dsh-host-open-in-app/further-exploration: en: d5b6ee9a195a810b zh: 7825d6182be37255 diff --git a/packages/host/open-in-app/README.md b/packages/host/open-in-app/README.md index a02f064741..d32d42b93a 100644 --- a/packages/host/open-in-app/README.md +++ b/packages/host/open-in-app/README.md @@ -77,7 +77,7 @@ Linux desktop-entry fields and icons use the shared [native-command](../../util/
Implementation internals — click to expand -The package splits into a data table and three roles. [`src/catalog.ts`](src/catalog.ts) is the compile-time table: each entry's per-platform locator chain (`fixed`, `app`, `xcode`, `cli`, `file`, `scan`, `app-paths`, `install-record`, `github-desktop`, `desktop`) plus, on Linux, the desktop-entry id owning its icon. [`src/resolver.ts`](src/resolver.ts) resolves the table against this host: one pass yields a map of catalog id to verified launch (primary and optional fallback argv plus the icon source), sharing one batched Windows-registry read; argv launches spawn detached with a credential-scrubbed environment (`scrubbedParentEnv`) plus explicit adapter entries, and keep Windows GUI processes visible unless the adapter hides a CLI process that launches the GUI separately. `shell-open` launches (the file managers) run the OS shell's open verb through `dsh-native-command`'s path opener under the same watch window, and a spawn `ENOENT` is classified as `missing` so the routes can refresh a stale entry. [`src/icons.ts`](src/icons.ts) extracts icons per platform: `plutil`/`sips` over the resolved bundle on macOS, a generated PowerShell `ExtractAssociatedIcon` script over the resolved executable on Windows (positional `-File` args keep paths out of command-line parsing), and desktop-entry/hicolor/pixmaps filesystem lookup on Linux. +The package splits into a data table and three roles. [`src/catalog.ts`](src/catalog.ts) is the compile-time table: each entry's per-platform locator chain (`fixed`, `app`, `xcode`, `cli`, `file`, `scan`, `app-paths`, `install-record`, `github-desktop`, `desktop`) plus, on Linux, the desktop-entry id owning its icon. [`src/resolver.ts`](src/resolver.ts) resolves the table against this host: one pass yields a map of catalog id to verified launch (primary and optional fallback argv plus the icon source), sharing one batched Windows-registry read; argv launches spawn detached with a credential-scrubbed environment (`scrubbedParentEnv`) minus the Desktop Host's `ELECTRON_RUN_AS_NODE`, plus explicit adapter entries, and keep Windows GUI processes visible unless the adapter hides a CLI process that launches the GUI separately. `shell-open` launches (the file managers) run the OS shell's open verb through `dsh-native-command`'s path opener under the same watch window, and a spawn `ENOENT` is classified as `missing` so the routes can refresh a stale entry. [`src/icons.ts`](src/icons.ts) extracts icons per platform: `plutil`/`sips` over the resolved bundle on macOS, a generated PowerShell `ExtractAssociatedIcon` script over the resolved executable on Windows (positional `-File` args keep paths out of command-line parsing), and desktop-entry/hicolor/pixmaps filesystem lookup on Linux. [`src/index.ts`](src/index.ts) registers the three routes on `ctx.webServer`: `GET /open-in-app/apps` (the resolution map's keys), `GET /open-in-app/icon/` (the extracted icon, cached in memory per process), and `POST /open-in-app/open` (launches the map's verified launcher directly — never a re-detection). Every route asks the composition's `connection` service for a rejection first; the complete trust story — the Host/Origin fence and browser authentication — has one home in the [`src/index.ts`](src/index.ts) module comment. On top of that fence the open route validates its body at the wire: an `application/json` media type, a 64 KiB ceiling, a resolved-available catalog id, and an absolute path naming an existing directory. Resolution and icon commands run through [`@deepseek-ai/dsh-native-command`](../../util/native-command/README.md) (argv, never a shell) under their respective deadlines; PATH names go through `ctx.subprocess.resolveExecutable()` in-process. diff --git a/packages/host/open-in-app/README.zh.md b/packages/host/open-in-app/README.zh.md index 966493118a..d14624c00d 100644 --- a/packages/host/open-in-app/README.zh.md +++ b/packages/host/open-in-app/README.zh.md @@ -77,7 +77,7 @@ Linux 桌面文件字段和图标使用共享的 [native-command](../../util/nat
实现内幕——点击展开 -本包拆为一张数据表与三个角色。[`src/catalog.ts`](src/catalog.ts) 是编译期表格:每个条目按平台的 locator 链(`fixed`、`app`、`xcode`、`cli`、`file`、`scan`、`app-paths`、`install-record`、`github-desktop`、`desktop`),以及 Linux 上拥有其图标的 desktop 条目 id。[`src/resolver.ts`](src/resolver.ts) 把表格解析到本机:一趟产出目录 id 到已验证启动的映射(主/回退 argv 加图标来源),共享一次批量的 Windows 注册表读取;argv 启动以清理过凭据的环境(`scrubbedParentEnv`)叠加适配器显式环境后 detached 派生,Windows GUI 默认保持可见,只有负责另行打开 GUI 的 CLI 适配器会隐藏自己的进程。`shell-open` 启动(文件管理器)在同一看护窗口下经 `dsh-native-command` 的路径打开器执行 OS shell 的 open verb,spawn 的 `ENOENT` 被归类为 `missing`,让路由能刷新失效条目。[`src/icons.ts`](src/icons.ts) 按平台提取图标:macOS 在解析出的 bundle 上跑 `plutil`/`sips`,Windows 在解析出的可执行文件上跑生成的 PowerShell `ExtractAssociatedIcon` 脚本(`-File` 位置参数让路径不经过命令行解析),Linux 走 desktop 条目/hicolor/pixmaps 的文件系统查找。 +本包拆为一张数据表与三个角色。[`src/catalog.ts`](src/catalog.ts) 是编译期表格:每个条目按平台的 locator 链(`fixed`、`app`、`xcode`、`cli`、`file`、`scan`、`app-paths`、`install-record`、`github-desktop`、`desktop`),以及 Linux 上拥有其图标的 desktop 条目 id。[`src/resolver.ts`](src/resolver.ts) 把表格解析到本机:一趟产出目录 id 到已验证启动的映射(主/回退 argv 加图标来源),共享一次批量的 Windows 注册表读取;argv 启动以清理过凭据的环境(`scrubbedParentEnv`)去掉 Desktop Host 的 `ELECTRON_RUN_AS_NODE` 后叠加适配器显式环境,再 detached 派生,Windows GUI 默认保持可见,只有负责另行打开 GUI 的 CLI 适配器会隐藏自己的进程。`shell-open` 启动(文件管理器)在同一看护窗口下经 `dsh-native-command` 的路径打开器执行 OS shell 的 open verb,spawn 的 `ENOENT` 被归类为 `missing`,让路由能刷新失效条目。[`src/icons.ts`](src/icons.ts) 按平台提取图标:macOS 在解析出的 bundle 上跑 `plutil`/`sips`,Windows 在解析出的可执行文件上跑生成的 PowerShell `ExtractAssociatedIcon` 脚本(`-File` 位置参数让路径不经过命令行解析),Linux 走 desktop 条目/hicolor/pixmaps 的文件系统查找。 [`src/index.ts`](src/index.ts) 在 `ctx.webServer` 上注册三条路由:`GET /open-in-app/apps`(解析映射的 keys)、`GET /open-in-app/icon/`(提取的图标,进程内内存缓存)、`POST /open-in-app/open`(直接使用映射中已验证的启动器——绝不重新检测)。每条路由都先向组合的 `connection` 服务询问是否拒绝;完整的信任叙述——Host/Origin 栅栏与浏览器认证——唯一的出处在 [`src/index.ts`](src/index.ts) 的模块注释。在该栅栏之上,open 路由在 wire 边界校验请求体:`application/json` 媒体类型、64 KiB 上限、解析为可用的目录 id、指向现存目录的绝对路径。解析与图标命令经 [`@deepseek-ai/dsh-native-command`](../../util/native-command/README.zh.md)(argv,绝不走 shell)在各自期限内执行;PATH 名称走 `ctx.subprocess.resolveExecutable()` 进程内解析。 diff --git a/packages/host/open-in-app/src/resolver.ts b/packages/host/open-in-app/src/resolver.ts index 8ad0cbecb7..37c93e46d5 100644 --- a/packages/host/open-in-app/src/resolver.ts +++ b/packages/host/open-in-app/src/resolver.ts @@ -58,14 +58,15 @@ export type OpenInAppLaunchOutcome = 'launched' | 'missing' | 'failed' /** * Launch one application adapter detached from this process: the child gets a * credential-scrubbed environment (never the harness's `*KEY*`/`*SECRET*` - * variables) plus the adapter's explicit environment entries, holds no stdio - * pipe, and outlives dsh. Windows GUI processes remain visible unless the - * adapter explicitly hides its own CLI process. Launch success is decoupled - * from process exit — launchers such as kitty or the JetBrains IDEs stay in - * the foreground for their whole window lifetime, so the watch window only - * catches launchers that fail immediately: rejects on a spawn failure and on - * a nonzero exit inside the window; a child still running when the window - * closes is unrefed and counted launched, never killed. + * variables) without an inherited `ELECTRON_RUN_AS_NODE`, plus the adapter's + * explicit environment entries, holds no stdio pipe, and outlives dsh. Windows + * GUI processes remain visible unless the adapter explicitly hides its own CLI + * process. Launch success is decoupled from process exit — launchers such as + * kitty or the JetBrains IDEs stay in the foreground for their whole window + * lifetime, so the watch window only catches launchers that fail immediately: + * rejects on a spawn failure and on a nonzero exit inside the window; a child + * still running when the window closes is unrefed and counted launched, never + * killed. * @param command - executable path or PATH name. * @param args - argv (never a shell string). * @param options - watch-window length and adapter-specific process options. @@ -73,11 +74,15 @@ export type OpenInAppLaunchOutcome = 'launched' | 'missing' | 'failed' */ export const launchDetachedApp: OpenInAppLauncher = (command, args, options) => new Promise((resolve, reject) => { + // Desktop runs the Host with ELECTRON_RUN_AS_NODE=1; inheriting it starts Electron apps such as VS Code in Node mode. + // Windows environment names are case-insensitive. + const base = Object.fromEntries(Object.entries(scrubbedParentEnv()) + .filter(([name]) => name.toUpperCase() !== 'ELECTRON_RUN_AS_NODE')) const child = spawn(command, [...args], { detached: true, stdio: 'ignore', windowsHide: options.windowsHide, - env: { ...scrubbedParentEnv(), ...options.env }, + env: { ...base, ...options.env }, }) let settled = false const settle = (outcome: () => void): void => { diff --git a/packages/host/open-in-app/tests/resolver.spec.ts b/packages/host/open-in-app/tests/resolver.spec.ts index 867dec7f7c..ad7ecfde4d 100644 --- a/packages/host/open-in-app/tests/resolver.spec.ts +++ b/packages/host/open-in-app/tests/resolver.spec.ts @@ -683,4 +683,23 @@ describe('launchDetachedApp', () => { } expect(JSON.parse(await readFile(witness, 'utf8'))).toEqual([null, 'overridden', '1']) }) + + it('does not pass the Desktop Host ELECTRON_RUN_AS_NODE selector to the application in any case', async () => { + const root = await tempRoot() + const witness = join(root, 'env.json') + process.env.ELECTRON_RUN_AS_NODE = '1' + process.env.electron_run_as_node = '1' + try { + await launchDetachedApp(node, [ + '-e', + 'require("node:fs").writeFileSync(process.argv[1], JSON.stringify(' + + 'Object.keys(process.env).filter(name => name.toUpperCase() === "ELECTRON_RUN_AS_NODE")))', + witness, + ], { watchMs: TIMEOUT_MS }) + } finally { + delete process.env.ELECTRON_RUN_AS_NODE + delete process.env.electron_run_as_node + } + expect(JSON.parse(await readFile(witness, 'utf8'))).toEqual([]) + }) }) diff --git a/packages/interaction/commands/README.i18n.yaml b/packages/interaction/commands/README.i18n.yaml index 10204e668f..f34b208c8d 100644 --- a/packages/interaction/commands/README.i18n.yaml +++ b/packages/interaction/commands/README.i18n.yaml @@ -18,8 +18,8 @@ en: 6eee80c31dad122b zh: 8f261f844a22ddad /deepseek-ai-dsh-commands/use-this-package/registering-a-command: - en: 76b750f0623f0982 - zh: 3fdc427a963242a8 + en: c1457d64a4855cac + zh: 5013345e7ca82b59 /deepseek-ai-dsh-commands/use-this-package/command-syntax: en: f9160436da4939e7 zh: 90af200afaf3bb4c @@ -39,8 +39,8 @@ en: 063b49f26f48d628 zh: 2ec899aa6f01359f /deepseek-ai-dsh-commands/understand-the-implementation/source-map: - en: 908aaf67b8dc151a - zh: 200e471607e52029 + en: dd971f6e1c972756 + zh: b61651b56a2856bf /deepseek-ai-dsh-commands/understand-the-implementation/lifecycle-events: en: c9fcc06089f8035d zh: 74072476994a2093 diff --git a/packages/interaction/commands/README.md b/packages/interaction/commands/README.md index d9543dcf97..42ceefa34e 100644 --- a/packages/interaction/commands/README.md +++ b/packages/interaction/commands/README.md @@ -29,7 +29,7 @@ Compose this service when an interactive UI should let users drive agent-side be ### Registering a command -Import `CommandDefinitionId` and `CommandId` as types from `@deepseek-ai/dsh-commands/brand`. Use `brandString()` from `@deepseek-ai/dsh-brand` to brand an admitted string; it neither validates nor generates ids. +Import `CommandDefinitionId` and `CommandId` as types from `@deepseek-ai/dsh-commands/types`. Use `brandString()` from `@deepseek-ai/dsh-brand` to brand an admitted string; it neither validates nor generates ids. A plugin registers a command with `ctx.commands.register()`: a lowercase name, a discovery description, an optional `input` hint, and a handler. An optional branded `definitionId` gives the definition a stable, plugin-namespaced identity for adapters; it is independent of display copy and execution `commandId`. The effective descriptor carries only the selected definition's identity, so a scoped override never inherits the shadowed registration's identity. @@ -84,8 +84,8 @@ The observable behavior is covered in [Use this package](#use-this-package); thi | File | Role | |---|---| | [`src/index.ts`](src/index.ts) | `CommandRuntime` service: registration, scoping, dispatch, lifecycle events | -| [`src/types.ts`](src/types.ts) | Command definition, descriptor, execution, and result types | -| [`src/brand.ts`](src/brand.ts) | Stable command-definition identities and per-execution lifecycle ids | +| [`src/types.ts`](src/types.ts) | Public type entry: identity re-exports, descriptors, execution, and results | +| [`src/brand.ts`](src/brand.ts) | Command identity definitions and compatibility constructors | | [`src/builtin.ts`](src/builtin.ts) | First-party identity and token resolution for Host and Client adapters | ### Lifecycle events diff --git a/packages/interaction/commands/README.zh.md b/packages/interaction/commands/README.zh.md index 019c78117f..b462089af8 100644 --- a/packages/interaction/commands/README.zh.md +++ b/packages/interaction/commands/README.zh.md @@ -29,7 +29,7 @@ kind: "package-reference" ### 注册命令 -从 `@deepseek-ai/dsh-commands/brand` 以类型方式导入 `CommandDefinitionId` 和 `CommandId`。使用 `@deepseek-ai/dsh-brand` 的 `brandString()` 为已准入的字符串添加品牌;它不验证或生成 id。 +从 `@deepseek-ai/dsh-commands/types` 以类型方式导入 `CommandDefinitionId` 和 `CommandId`。使用 `@deepseek-ai/dsh-brand` 的 `brandString()` 为已准入的字符串添加品牌;它不验证或生成 id。 插件通过 `ctx.commands.register()` 注册命令,提供小写名称、发现界面中的说明、可选的 `input` 提示和处理器。可选的品牌类型字段 `definitionId` 为适配器提供带插件命名空间的稳定定义标识,它独立于显示文案和每次执行的 `commandId`。有效描述符只携带被选中定义的标识,作用域覆盖不会继承被遮蔽注册项的标识。 @@ -84,8 +84,8 @@ ctx.commands.register({ | 文件 | 职责 | |---|---| | [`src/index.ts`](src/index.ts) | `CommandRuntime` 服务:注册、作用域、分派、生命周期事件 | -| [`src/types.ts`](src/types.ts) | 命令定义、描述符、执行与结果类型 | -| [`src/brand.ts`](src/brand.ts) | 稳定命令定义标识和每次执行的生命周期 id | +| [`src/types.ts`](src/types.ts) | 公开类型入口:标识类型再导出、描述符、执行与结果 | +| [`src/brand.ts`](src/brand.ts) | 命令标识定义与兼容构造函数 | | [`src/builtin.ts`](src/builtin.ts) | Host 和 Client 适配器共享的第一方身份及输入 token 解析 | ### 生命周期事件 diff --git a/packages/interaction/commands/package.json b/packages/interaction/commands/package.json index afb057bf23..075a9d09c5 100644 --- a/packages/interaction/commands/package.json +++ b/packages/interaction/commands/package.json @@ -22,10 +22,6 @@ "types": "./lib/types/types.d.ts", "default": "./lib/types/types.js" }, - "./brand": { - "types": "./lib/types/brand.d.ts", - "default": "./lib/types/brand.js" - }, "./typert": { "types": "./lib/typert.host.d.ts", "default": "./lib/typert.host.js" diff --git a/packages/interaction/commands/src/brand.ts b/packages/interaction/commands/src/brand.ts index a841ce2502..141a667a35 100644 --- a/packages/interaction/commands/src/brand.ts +++ b/packages/interaction/commands/src/brand.ts @@ -1,13 +1,4 @@ -/** - * Command definition identities and execution ids for discovery and lifecycle pairing. - * - * The `Branded` primitive lives in `@deepseek-ai/dsh-brand`; this module - * is a pure type/constructor outlet (no cordis imports, no module - * augmentation) so wire and client programs can name the brand without - * loading the host plugin's Context merges — the `dsh-llm/brand` shape. - * - * @module @deepseek-ai/dsh-commands/brand - */ +/** Standalone command identities and compatibility constructors, without Cordis registration effects. */ import type { Branded } from '@deepseek-ai/dsh-brand' diff --git a/packages/interaction/commands/src/types.ts b/packages/interaction/commands/src/types.ts index c1ee991f81..67962e9c76 100644 --- a/packages/interaction/commands/src/types.ts +++ b/packages/interaction/commands/src/types.ts @@ -117,3 +117,5 @@ declare module '@deepseek-ai/dsh-session/types' { } } } + +export type { CommandDefinitionId, CommandId } from './brand.ts' diff --git a/packages/interaction/commands/tests/builtin.spec.ts b/packages/interaction/commands/tests/builtin.spec.ts index 15ec27d32f..4e30d6b066 100644 --- a/packages/interaction/commands/tests/builtin.spec.ts +++ b/packages/interaction/commands/tests/builtin.spec.ts @@ -1,8 +1,7 @@ import { describe, expect, it } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' import { builtinCommandName, builtinCommandTokens, resolveCommand } from '../src/builtin.ts' -import type { CommandDefinitionId } from '../src/brand.ts' -import type { CommandDescriptor } from '../src/types.ts' +import type { CommandDefinitionId, CommandDescriptor } from '../src/types.ts' const definitions = [ ['goal', '@deepseek-ai/dsh-command-goal'], diff --git a/packages/interaction/permission-presets/src/index.ts b/packages/interaction/permission-presets/src/index.ts index 379f0824ff..cf89fa0c12 100644 --- a/packages/interaction/permission-presets/src/index.ts +++ b/packages/interaction/permission-presets/src/index.ts @@ -18,7 +18,7 @@ import type { Volatile } from '@deepseek-ai/cordis' import { Context, Service } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/types' import z from '@deepseek-ai/schemastery' import { z as zod } from 'zod' import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol' diff --git a/packages/interaction/user-approval/src/types.ts b/packages/interaction/user-approval/src/types.ts index 12b8106d34..ba01acfdc6 100644 --- a/packages/interaction/user-approval/src/types.ts +++ b/packages/interaction/user-approval/src/types.ts @@ -8,7 +8,7 @@ import type { Branded } from '@deepseek-ai/dsh-brand' import type { Scoped } from '@deepseek-ai/dsh-scope' import type { Agent } from '@deepseek-ai/dsh-agent/types' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' /** * Pairs one `approval/asked` audit event with its `approval/decided`. diff --git a/packages/interaction/user-questions/src/types.ts b/packages/interaction/user-questions/src/types.ts index 25340a3009..68aa4bdbed 100644 --- a/packages/interaction/user-questions/src/types.ts +++ b/packages/interaction/user-questions/src/types.ts @@ -2,7 +2,7 @@ import type { Scoped } from '@deepseek-ai/dsh-scope' import type { Agent } from '@deepseek-ai/dsh-agent/types' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type {} from '@deepseek-ai/dsh-session/types' import type {} from '@deepseek-ai/dsh-session-projection/types' diff --git a/packages/jobs/jobs-local/tests/jobs.spec.ts b/packages/jobs/jobs-local/tests/jobs.spec.ts index 2c3e775a35..abb85be448 100644 --- a/packages/jobs/jobs-local/tests/jobs.spec.ts +++ b/packages/jobs/jobs-local/tests/jobs.spec.ts @@ -3,7 +3,7 @@ import { randomUUID } from 'node:crypto' import { afterEach, beforeEach, describe, expect, expectTypeOf, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { Session, type SessionId } from '@deepseek-ai/dsh-session' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage } from '@deepseek-ai/dsh-llm' import AgentRegistry from '@deepseek-ai/dsh-agent' import type { Agent } from '@deepseek-ai/dsh-agent' diff --git a/packages/jobs/jobs/README.i18n.yaml b/packages/jobs/jobs/README.i18n.yaml index 1d2665d284..7ef7612f55 100644 --- a/packages/jobs/jobs/README.i18n.yaml +++ b/packages/jobs/jobs/README.i18n.yaml @@ -39,8 +39,8 @@ en: 2a42e1e06dfc469e zh: 5c2c77eca52846f0 /deepseek-ai-dsh-jobs/understand-the-implementation/source-map: - en: 474dd94bf936e0e1 - zh: bec0e9768a2d5d50 + en: c2a2db63daf67fd3 + zh: d86092f2641a641b /deepseek-ai-dsh-jobs/understand-the-implementation/service-operations: en: b2e4ef34ccf1e749 zh: 128b57b57ed09316 diff --git a/packages/jobs/jobs/README.md b/packages/jobs/jobs/README.md index ae873d7937..b292380138 100644 --- a/packages/jobs/jobs/README.md +++ b/packages/jobs/jobs/README.md @@ -79,9 +79,9 @@ This section explains the design decisions behind the contract and points at the | File | Role | |---|---| | [`src/index.ts`](src/index.ts) | Plugin entry: the abstract `JobRegistry` service and its contract | -| [`src/types.ts`](src/types.ts) | Shared vocabulary: `JobSpec`, `JobHandle`, `JobHooks`, `JobOutcome`, `JobEvent`, and the read results | +| [`src/types.ts`](src/types.ts) | Type-only `/types` entry: shared job vocabulary and the `JobId` re-export | +| [`src/brand.ts`](src/brand.ts) | `JobId` definition and compatibility constructor | | [`src/view.ts`](src/view.ts) | Client-safe leaf: `JobView`, `JobChunk`, `JobStatus`, and the merge-extensible `JobKindMap` | -| [`src/brand.ts`](src/brand.ts) | the `JobId` branded identifier, importable without the agent dependency | | [`src/error.ts`](src/error.ts) | `JobError` and its closed `JOB_ERROR_CODES` list | | [`src/archive-admission.ts`](src/archive-admission.ts) | The `job` family of the Workspace registry's archive admission, installed by the seam's constructor for every implementation | diff --git a/packages/jobs/jobs/README.zh.md b/packages/jobs/jobs/README.zh.md index 49a2e1e2e8..ce25767286 100644 --- a/packages/jobs/jobs/README.zh.md +++ b/packages/jobs/jobs/README.zh.md @@ -79,9 +79,9 @@ kind: "package-reference" | 文件 | 职责 | |---|---| | [`src/index.ts`](src/index.ts) | 插件入口:抽象 `JobRegistry` 服务及其约定 | -| [`src/types.ts`](src/types.ts) | 共享词汇:`JobSpec`、`JobHandle`、`JobHooks`、`JobOutcome`、`JobEvent` 与读取结果 | +| [`src/types.ts`](src/types.ts) | 纯类型 `/types` 入口:共享 job 类型和 `JobId` 再导出 | +| [`src/brand.ts`](src/brand.ts) | `JobId` 定义与兼容构造函数 | | [`src/view.ts`](src/view.ts) | 客户端安全叶子:`JobView`、`JobChunk`、`JobStatus` 与可合并扩展的 `JobKindMap` | -| [`src/brand.ts`](src/brand.ts) | 带类型标记的 `JobId` 标识符,无需 agent 依赖即可导入 | | [`src/error.ts`](src/error.ts) | `JobError` 及其封闭的 `JOB_ERROR_CODES` 列表 | | [`src/archive-admission.ts`](src/archive-admission.ts) | Workspace 注册表归档准入中的 `job` 族,由接缝构造函数为每个实现安装 | diff --git a/packages/jobs/jobs/package.json b/packages/jobs/jobs/package.json index 257660f29a..c802446815 100644 --- a/packages/jobs/jobs/package.json +++ b/packages/jobs/jobs/package.json @@ -18,9 +18,9 @@ "types": "./lib/types/index.d.ts", "default": "./lib/index.js" }, - "./brand": { - "types": "./lib/types/brand.d.ts", - "default": "./lib/types/brand.js" + "./types": { + "types": "./lib/types/types.d.ts", + "default": "./lib/types/types.js" }, "./view": { "types": "./lib/types/view.d.ts", diff --git a/packages/jobs/jobs/src/brand.ts b/packages/jobs/jobs/src/brand.ts index 82e59f3663..02adbc8211 100644 --- a/packages/jobs/jobs/src/brand.ts +++ b/packages/jobs/jobs/src/brand.ts @@ -1,14 +1,4 @@ -/** - * dsh-jobs' owned branded id, carried across the registry, the model-facing - * control surface, and the client wire. - * - * It lives in its own leaf because the package root and `./types` both reach - * `dsh-agent` through the owner and listener signatures, which a Client program - * cannot resolve even as a type. A browser-safe consumer imports the id here; - * `Branded` itself comes from the zero-dependency `@deepseek-ai/dsh-brand`. - * - * @module @deepseek-ai/dsh-jobs/brand - */ +/** Job identities and compatibility constructors, independent of the registry implementation. */ import type { Branded } from '@deepseek-ai/dsh-brand' diff --git a/packages/jobs/jobs/src/index.ts b/packages/jobs/jobs/src/index.ts index f023f039b0..812e3969d1 100644 --- a/packages/jobs/jobs/src/index.ts +++ b/packages/jobs/jobs/src/index.ts @@ -14,7 +14,7 @@ import type { SessionId } from '@deepseek-ai/dsh-session' import { installJobArchiveAdmission } from './archive-admission.ts' import type { JobEvents, JobId, JobOutputRead, JobRead, JobSpec, JobView } from './types.ts' -export { JobId } from './types.ts' +export { JobId } from './brand.ts' export { JOB_ERROR_CODES, JobError, type JobErrorCode } from './error.ts' export type { JobAppendOptions, diff --git a/packages/jobs/jobs/src/types.ts b/packages/jobs/jobs/src/types.ts index 33ea07d75b..5239ab0225 100644 --- a/packages/jobs/jobs/src/types.ts +++ b/packages/jobs/jobs/src/types.ts @@ -5,11 +5,11 @@ * @module @deepseek-ai/dsh-jobs/types */ -import type { SessionEventMap, SessionId } from '@deepseek-ai/dsh-session' +import type { SessionEventMap, SessionId } from '@deepseek-ai/dsh-session/types' import type { JobId } from './brand.ts' import type { JobChannel, JobChunk, JobKind, JobView } from './view.ts' -export { JobId } from './brand.ts' +export type { JobId } from './brand.ts' export type { JobChannel, JobChunk, JobKind, JobKindMap, JobStatus, JobView } from './view.ts' /** Tool dispatch that created a job; nested calls retain their root invocation. */ diff --git a/packages/jobs/jobs/src/view.ts b/packages/jobs/jobs/src/view.ts index ad778954ab..1fe406aa0e 100644 --- a/packages/jobs/jobs/src/view.ts +++ b/packages/jobs/jobs/src/view.ts @@ -9,7 +9,7 @@ import type { SessionId } from '@deepseek-ai/dsh-session/types' // Type-only: the Workspace registry's archive-admission family map this seam merges `job` into. import type {} from '@deepseek-ai/dsh-workspace/types' -import type { JobId } from './brand.ts' +import type { JobId } from './types.ts' /** * Job lifecycle: `running`, optionally `stopping`, then exactly one terminal diff --git a/packages/jobs/tool-jobs/tests/steer-wait.spec.ts b/packages/jobs/tool-jobs/tests/steer-wait.spec.ts index 42d62c329c..7b11aaa309 100644 --- a/packages/jobs/tool-jobs/tests/steer-wait.spec.ts +++ b/packages/jobs/tool-jobs/tests/steer-wait.spec.ts @@ -2,7 +2,7 @@ import { setImmediate } from 'node:timers/promises' import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import LlmRuntime, { createUserMessage, type StreamChunk } from '@deepseek-ai/dsh-llm' import SessionStore, { type SessionId } from '@deepseek-ai/dsh-session' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' diff --git a/packages/llm/llm-deepseek/src/model-info.ts b/packages/llm/llm-deepseek/src/model-info.ts index 5ec98570e3..0c7ee7ba63 100644 --- a/packages/llm/llm-deepseek/src/model-info.ts +++ b/packages/llm/llm-deepseek/src/model-info.ts @@ -1,6 +1,6 @@ /** Protocol-independent model capabilities and reasoning choices. */ import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import type { LlmModelBadge, LlmModelInfo, LlmResolvedModelInfo } from '@deepseek-ai/dsh-llm' import type { DeepSeekCatalogModel, DeepSeekConnectionOptions } from './types.ts' diff --git a/packages/llm/llm/README.i18n.yaml b/packages/llm/llm/README.i18n.yaml index 1bc1470673..1bc7dd7016 100644 --- a/packages/llm/llm/README.i18n.yaml +++ b/packages/llm/llm/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 09388d293f9be9cb /deepseek-ai-dsh-llm/use-this-package: - en: 6d8d4c583c4c6e78 - zh: 9179d52befae4ffd + en: 6f699b1a69c08c09 + zh: 7590df5e3ff119b5 /deepseek-ai-dsh-llm/use-this-package/when-to-choose-it: en: c3ecb5a1421f27db zh: 4bbd3c0e513845e1 diff --git a/packages/llm/llm/README.md b/packages/llm/llm/README.md index 90f9e43603..e5d2838586 100644 --- a/packages/llm/llm/README.md +++ b/packages/llm/llm/README.md @@ -29,7 +29,7 @@ Use `@deepseek-ai/dsh-llm` to stream model calls through configured provider ada Any composition that calls a model provider — an agent loop, a session-title generator, a compaction summarizer — streams its requests through this service. Mount it together with at least one provider adapter; the service itself has no configuration and no provider wire code. -Import message, tool-call, provider-request, attempt, and reasoning-effort identifier types from `@deepseek-ai/dsh-llm/brand` or the package root using `import type`. Brand strings with `brandString(value)` from `@deepseek-ai/dsh-brand`; branding preserves the string without validation. +Import message, tool-call, provider-request, attempt, and reasoning-effort identifier types from `@deepseek-ai/dsh-llm/types` or the package root using `import type`. Brand strings with `brandString(value)` from `@deepseek-ai/dsh-brand`; branding preserves the string without validation. ### When to choose it diff --git a/packages/llm/llm/README.zh.md b/packages/llm/llm/README.zh.md index acb8c24db2..21e2b778ba 100644 --- a/packages/llm/llm/README.zh.md +++ b/packages/llm/llm/README.zh.md @@ -29,7 +29,7 @@ kind: "package-reference" 任何调用模型提供方的组合——agent loop(智能体循环)、会话标题生成器、压缩(compaction)摘要器——都会通过本服务流式发起请求。与至少一个提供方适配器一起挂载它;服务本身没有任何配置,也不包含提供方协议代码。 -使用 `import type` 从 `@deepseek-ai/dsh-llm/brand` 或包根入口导入消息、工具调用、提供方请求、尝试和推理强度标识符类型。通过 `@deepseek-ai/dsh-brand` 的 `brandString(value)` 为字符串添加品牌;此操作保留原字符串,不执行校验。 +使用 `import type` 从 `@deepseek-ai/dsh-llm/types` 或包根入口导入消息、工具调用、提供方请求、尝试和推理强度标识符类型。通过 `@deepseek-ai/dsh-brand` 的 `brandString(value)` 为字符串添加品牌;此操作保留原字符串,不执行校验。 ### 何时选择 diff --git a/packages/llm/llm/package.json b/packages/llm/llm/package.json index dae156a933..e693a62ea1 100644 --- a/packages/llm/llm/package.json +++ b/packages/llm/llm/package.json @@ -22,10 +22,6 @@ "types": "./lib/types/types.d.ts", "default": "./lib/types/types.js" }, - "./brand": { - "types": "./lib/types/brand.d.ts", - "default": "./lib/types/brand.js" - }, "./message": { "types": "./lib/types/message.d.ts", "default": "./lib/types/message.js" diff --git a/packages/llm/llm/src/assembler.ts b/packages/llm/llm/src/assembler.ts index 917dd11e2c..b92b3006e8 100644 --- a/packages/llm/llm/src/assembler.ts +++ b/packages/llm/llm/src/assembler.ts @@ -8,7 +8,7 @@ import { brandString } from '@deepseek-ai/dsh-brand' import { assertNever } from '@deepseek-ai/dsh-util-values' -import type { ToolCallId } from './brand.ts' +import type { ToolCallId } from './types.ts' import { createAssistantMessage } from './message.ts' import type { AssistantMessage, ModelMessageSource } from './message.ts' import type { ContentBlock, FinishReason, ReplayEnvelope, StreamChunk, TokenUsage } from './types.ts' diff --git a/packages/llm/llm/src/assistant-stream.ts b/packages/llm/llm/src/assistant-stream.ts index 7fca34c5d5..0723593d70 100644 --- a/packages/llm/llm/src/assistant-stream.ts +++ b/packages/llm/llm/src/assistant-stream.ts @@ -7,8 +7,7 @@ import { assertNever, deepFreeze, snapshotJsonValue } from '@deepseek-ai/dsh-util-values' import { BlockAssembler } from './assembler.ts' -import type { ToolCallId } from './brand.ts' -import type { ContentBlock, StreamChunk } from './types.ts' +import type { ContentBlock, StreamChunk, ToolCallId } from './types.ts' /** One model chunk paired with its original Session timestamp. */ export interface TimedStreamChunk { diff --git a/packages/llm/llm/src/brand.ts b/packages/llm/llm/src/brand.ts index c919603da4..6a256df920 100644 --- a/packages/llm/llm/src/brand.ts +++ b/packages/llm/llm/src/brand.ts @@ -7,7 +7,7 @@ * without depending on dsh-llm; see that package's README for the * nominal-typing policy. * - * @module @deepseek-ai/dsh-llm/brand + * @module @deepseek-ai/dsh-llm/src/brand.ts */ import { brandString, type Branded } from '@deepseek-ai/dsh-brand' diff --git a/packages/llm/llm/src/call-config.ts b/packages/llm/llm/src/call-config.ts index 29b97bb468..712e4ff2a2 100644 --- a/packages/llm/llm/src/call-config.ts +++ b/packages/llm/llm/src/call-config.ts @@ -6,8 +6,7 @@ * @module dsh-llm/call-config */ -import type { GenerateOptions, LlmResolvedModelInfo } from './types.ts' -import type { ReasoningEffortId } from './brand.ts' +import type { GenerateOptions, LlmResolvedModelInfo, ReasoningEffortId } from './types.ts' /** Process-local identities of request objects assembled by dsh-agent-loop. */ const AGENT_LOOP_REQUESTS = new WeakSet() diff --git a/packages/llm/llm/src/content.ts b/packages/llm/llm/src/content.ts index b862381118..340da23bf0 100644 --- a/packages/llm/llm/src/content.ts +++ b/packages/llm/llm/src/content.ts @@ -3,7 +3,7 @@ import type { ContentBlock, ImageBlock, LlmImageRequestBudget, ToolSchema, ToolUpdate, ToolHistory } from './types.ts' import type { RequestMessage } from './types.ts' import type { Message } from './message.ts' -import type { MessageId } from './brand.ts' +import type { MessageId } from './types.ts' import type { AttachmentStore, FileAttachmentRef, ImageAttachmentRef, ImageMediaType, RequestImageAttachment, } from '@deepseek-ai/dsh-attachment' diff --git a/packages/llm/llm/src/index.ts b/packages/llm/llm/src/index.ts index 2f4299d8cd..cd1aa71ca8 100644 --- a/packages/llm/llm/src/index.ts +++ b/packages/llm/llm/src/index.ts @@ -46,7 +46,7 @@ export * from './attribution.ts' export * from './brand.ts' export * from './error.ts' export * from './api-key.ts' -export * from './types.ts' +export type * from './types.ts' export * from './content.ts' export * from './assistant-stream.ts' export * from './message.ts' diff --git a/packages/llm/llm/src/message.ts b/packages/llm/llm/src/message.ts index d96a63edb6..0138452426 100644 --- a/packages/llm/llm/src/message.ts +++ b/packages/llm/llm/src/message.ts @@ -3,8 +3,7 @@ import { randomUUID } from '@deepseek-ai/dsh-util-crypto' import { brandString } from '@deepseek-ai/dsh-brand' import { deepFreeze } from '@deepseek-ai/dsh-util-values' -import type { MessageId, ToolCallId } from './brand.ts' -import type { ContentBlock } from './types.ts' +import type { ContentBlock, MessageId, ToolCallId } from './types.ts' /** Provider/model identity and adapter-private replay data for an assistant message. */ export interface AssistantProviderMetadata { diff --git a/packages/llm/llm/src/types.ts b/packages/llm/llm/src/types.ts index 8a48b89895..dae3c7c4ac 100644 --- a/packages/llm/llm/src/types.ts +++ b/packages/llm/llm/src/types.ts @@ -604,3 +604,5 @@ export interface GenerateOptions { */ purpose?: Purpose } + +export type { MessageId, ToolCallId, ProviderRequestId, LlmAttemptId, ReasoningEffortId } from './brand.ts' diff --git a/packages/llm/llm/tests/call-config.spec.ts b/packages/llm/llm/tests/call-config.spec.ts index a16b1b1af7..df24ff7f72 100644 --- a/packages/llm/llm/tests/call-config.spec.ts +++ b/packages/llm/llm/tests/call-config.spec.ts @@ -8,7 +8,7 @@ import { describe, expect, it } from 'vitest' import { deepFreeze } from '@deepseek-ai/dsh-util-values' import { callConfigEquals, isAgentLoopRequest, markAgentLoopRequest } from '../src/call-config.ts' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '../src/brand.ts' +import type { ReasoningEffortId } from '../src/types.ts' import type { GenerateOptions } from '../src/types.ts' describe('callConfigEquals', () => { diff --git a/packages/llm/llm/tests/properties.spec.ts b/packages/llm/llm/tests/properties.spec.ts index c9bb8d4a12..eb95389195 100644 --- a/packages/llm/llm/tests/properties.spec.ts +++ b/packages/llm/llm/tests/properties.spec.ts @@ -12,7 +12,7 @@ import fc from 'fast-check' import { BlockAssembler } from '@deepseek-ai/dsh-llm' import type { StreamChunk } from '@deepseek-ai/dsh-llm' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' // A small pool of indices so collisions (duplicate-index bugs) are common. const indexArb = fc.integer({ min: 0, max: 4 }) diff --git a/packages/mcp/mcp-client/tests/protocol.spec.ts b/packages/mcp/mcp-client/tests/protocol.spec.ts index c7f4687dd3..e1ae9bb5d7 100644 --- a/packages/mcp/mcp-client/tests/protocol.spec.ts +++ b/packages/mcp/mcp-client/tests/protocol.spec.ts @@ -9,7 +9,7 @@ import { InMemoryTransport, type Transport } from '@modelcontextprotocol/client' import { McpServer } from '@modelcontextprotocol/server' import { serveStdio } from '@modelcontextprotocol/server/stdio' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import McpResources from '@deepseek-ai/dsh-mcp-resources' diff --git a/packages/mcp/mcp-client/tests/reconnect.spec.ts b/packages/mcp/mcp-client/tests/reconnect.spec.ts index 543988f2da..df50f30616 100644 --- a/packages/mcp/mcp-client/tests/reconnect.spec.ts +++ b/packages/mcp/mcp-client/tests/reconnect.spec.ts @@ -13,7 +13,7 @@ import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import McpResources from '@deepseek-ai/dsh-mcp-resources' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { TestCredentials } from './credential-fixture.ts' import type { Config } from '@deepseek-ai/dsh-mcp-client' diff --git a/packages/mcp/mcp-client/tests/server-context.spec.ts b/packages/mcp/mcp-client/tests/server-context.spec.ts index d559973ea5..243525b158 100644 --- a/packages/mcp/mcp-client/tests/server-context.spec.ts +++ b/packages/mcp/mcp-client/tests/server-context.spec.ts @@ -5,7 +5,7 @@ import { Context } from '@deepseek-ai/cordis' import SystemPrompt, { renderPrompt } from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import McpResources from '@deepseek-ai/dsh-mcp-resources' import { createScope } from '@deepseek-ai/dsh-scope' import { registerServerContext } from '../src/server-context.ts' diff --git a/packages/mcp/mcp-client/tests/tool-definition.spec.ts b/packages/mcp/mcp-client/tests/tool-definition.spec.ts index 393c560cec..87c0c9365a 100644 --- a/packages/mcp/mcp-client/tests/tool-definition.spec.ts +++ b/packages/mcp/mcp-client/tests/tool-definition.spec.ts @@ -2,7 +2,7 @@ import { executeToolFixture } from '@deepseek-ai/dsh-tool-testkit' import * as NativeToolExecutor from '@deepseek-ai/dsh-tool-executor-native' import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import type { ToolExecution } from '@deepseek-ai/dsh-tools' diff --git a/packages/plan/plan-mode/src/types.ts b/packages/plan/plan-mode/src/types.ts index b8f3257ba5..c3dcc85ebf 100644 --- a/packages/plan/plan-mode/src/types.ts +++ b/packages/plan/plan-mode/src/types.ts @@ -8,7 +8,7 @@ * @module @deepseek-ai/dsh-plan-mode/types */ -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' /** * The plan projection's wire value. `active` is the logged state in force diff --git a/packages/plan/plan-mode/tests/plan-mode.spec.ts b/packages/plan/plan-mode/tests/plan-mode.spec.ts index f51549a3d1..190d0444b9 100644 --- a/packages/plan/plan-mode/tests/plan-mode.spec.ts +++ b/packages/plan/plan-mode/tests/plan-mode.spec.ts @@ -5,7 +5,7 @@ import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { provideWorkingDirectoryFixture } from '@deepseek-ai/dsh-agent-loop-testkit' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage } from '@deepseek-ai/dsh-llm' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { RUN_CODE_NAME } from '@deepseek-ai/dsh-tools' diff --git a/packages/plan/plan-mode/tests/projection.spec.ts b/packages/plan/plan-mode/tests/projection.spec.ts index 47e0b8e4fd..97a639302e 100644 --- a/packages/plan/plan-mode/tests/projection.spec.ts +++ b/packages/plan/plan-mode/tests/projection.spec.ts @@ -12,7 +12,7 @@ import ToolRuntime from '@deepseek-ai/dsh-tools' import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import UserQuestionService from '@deepseek-ai/dsh-user-questions' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandId } from '@deepseek-ai/dsh-commands/types' import PlanModeController from '@deepseek-ai/dsh-plan-mode' interface Bench { diff --git a/packages/preset/agent-preset-registry/src/display.ts b/packages/preset/agent-preset-registry/src/display.ts index 15585dde76..78df5c9e12 100644 --- a/packages/preset/agent-preset-registry/src/display.ts +++ b/packages/preset/agent-preset-registry/src/display.ts @@ -1,36 +1,13 @@ /** * Display resolution for roster presets, shared by every surface that renders * preset names: shipped presets resolve through locale dictionary keys, and - * user-authored metadata is never translated. A pure fold with no imports, so + * user-authored metadata is never translated. A pure fold with no runtime imports, so * browser bundles inline it and the Host uses the same single home for which * shipped id carries which copy key. * @module @deepseek-ai/dsh-agent-preset-registry/display */ -/** Dictionary keys carrying one shipped preset's display copy. */ -export type BuiltInPresetCopyKey = - | 'presetStandardName' | 'presetStandardDescription' - | 'presetPtcName' | 'presetPtcDescription' - | 'presetMinimalName' | 'presetMinimalDescription' - | 'presetCordisName' | 'presetCordisDescription' - -/** Preset roster fields needed to resolve display copy. */ -export interface PresetDisplaySource { - /** Stable preset id. */ - readonly id: string - /** Unlocalized name published by the preset. */ - readonly name?: string - /** Unlocalized description published by the preset. */ - readonly description?: string -} - -/** Display copy resolved for the active locale. */ -export interface PresetDisplayText { - /** Localized built-in name or the preset's own fallback name. */ - readonly name: string - /** Localized built-in description or the preset's own description. */ - readonly description?: string -} +import type { BuiltInPresetCopyKey, PresetDisplaySource, PresetDisplayText } from './types.ts' interface PresetLocaleKeys { readonly name: BuiltInPresetCopyKey diff --git a/packages/preset/agent-preset-registry/src/types.ts b/packages/preset/agent-preset-registry/src/types.ts index 0875990d11..fc9220a49c 100644 --- a/packages/preset/agent-preset-registry/src/types.ts +++ b/packages/preset/agent-preset-registry/src/types.ts @@ -1,6 +1,30 @@ /** Client-safe payloads and event declarations owned by the agent-preset domain. */ import type { SessionId } from '@deepseek-ai/dsh-session/types' +/** Dictionary keys carrying one shipped preset's display copy. */ +export type BuiltInPresetCopyKey = + | 'presetStandardName' | 'presetStandardDescription' + | 'presetPtcName' | 'presetPtcDescription' + | 'presetMinimalName' | 'presetMinimalDescription' + | 'presetCordisName' | 'presetCordisDescription' + +/** Preset roster fields needed to resolve display copy. */ +export interface PresetDisplaySource { + /** Stable preset id. */ + readonly id: string + /** Unlocalized name published by the preset. */ + readonly name?: string + /** Unlocalized description published by the preset. */ + readonly description?: string +} + +/** Display copy resolved for the active locale. */ +export interface PresetDisplayText { + /** Localized built-in name or the preset's own fallback name. */ + readonly name: string + /** Localized built-in description or the preset's own description. */ + readonly description?: string +} /** * One declared preset as a client reads it. diff --git a/packages/preset/agent-preset-registry/tests/display.spec.ts b/packages/preset/agent-preset-registry/tests/display.spec.ts index 5233b4305b..f9c0c001ec 100644 --- a/packages/preset/agent-preset-registry/tests/display.spec.ts +++ b/packages/preset/agent-preset-registry/tests/display.spec.ts @@ -4,7 +4,8 @@ */ import { describe, expect, it } from 'vitest' -import { presetDisplayText, type BuiltInPresetCopyKey } from '../src/display.ts' +import { presetDisplayText } from '../src/display.ts' +import type { BuiltInPresetCopyKey } from '../src/types.ts' const t = (key: BuiltInPresetCopyKey): string => `t:${key}` diff --git a/packages/preset/agent-preset-registry/tests/tool-executors.spec.ts b/packages/preset/agent-preset-registry/tests/tool-executors.spec.ts index e5c6665bdd..0085c02c4c 100644 --- a/packages/preset/agent-preset-registry/tests/tool-executors.spec.ts +++ b/packages/preset/agent-preset-registry/tests/tool-executors.spec.ts @@ -14,7 +14,7 @@ import { NativeToolExecutor } from '@deepseek-ai/dsh-tool-executor-native' import type { Context } from '@deepseek-ai/cordis' import { expect, it, onTestFinished } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { defineTool, type ToolExecutor } from '@deepseek-ai/dsh-tools' import { agentOn, declare, harness } from './harness.ts' diff --git a/packages/schedule/schedule/src/storage.ts b/packages/schedule/schedule/src/storage.ts index bcf3ee7596..13ac12e131 100644 --- a/packages/schedule/schedule/src/storage.ts +++ b/packages/schedule/schedule/src/storage.ts @@ -4,7 +4,7 @@ import { isDeepStrictEqual } from 'node:util' import { z } from 'zod' import type { SessionId } from '@deepseek-ai/dsh-session/types' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { defineDomain, domainTable } from '@deepseek-ai/dsh-storage-domain' import { decodeScheduleRecord } from './domain.ts' import type { ScheduleDeliveryRecord, ScheduleId, ScheduleRecord, ScheduleTarget } from './types.ts' diff --git a/packages/schedule/schedule/src/types.ts b/packages/schedule/schedule/src/types.ts index b4920e9203..80d8144543 100644 --- a/packages/schedule/schedule/src/types.ts +++ b/packages/schedule/schedule/src/types.ts @@ -4,7 +4,7 @@ */ import type { SessionId } from '@deepseek-ai/dsh-session/types' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { Branded } from '@deepseek-ai/dsh-brand' import type {} from '@deepseek-ai/dsh-typert-protocol' // Type-only: the Workspace registry's archive-admission family map this plugin merges `schedule` into. diff --git a/packages/schedule/schedule/tests/delete-inactive.spec.ts b/packages/schedule/schedule/tests/delete-inactive.spec.ts index d55196ef83..34eb08118c 100644 --- a/packages/schedule/schedule/tests/delete-inactive.spec.ts +++ b/packages/schedule/schedule/tests/delete-inactive.spec.ts @@ -1,7 +1,7 @@ /** Host-wide removal of every ended task shares per-row deletion's durability rules. */ import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { afterEach, beforeEach, expect, it, vi } from 'vitest' import { createAfterScheduleRecord, createEveryScheduleRecord } from '../src/domain.ts' import type { ScheduleId } from '../src/types.ts' diff --git a/packages/schedule/schedule/tests/delivery-history.spec.ts b/packages/schedule/schedule/tests/delivery-history.spec.ts index 2de312fc6b..fabadf921e 100644 --- a/packages/schedule/schedule/tests/delivery-history.spec.ts +++ b/packages/schedule/schedule/tests/delivery-history.spec.ts @@ -2,7 +2,7 @@ import type { Context } from '@deepseek-ai/cordis' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { afterEach, beforeEach, expect, it, vi } from 'vitest' import { ScheduleInputError, createAfterScheduleRecord } from '../src/domain.ts' import { scheduleDomain, type ScheduleTask } from '../src/storage.ts' diff --git a/packages/schedule/schedule/tests/domain-restart.spec.ts b/packages/schedule/schedule/tests/domain-restart.spec.ts index a508369b20..ba2c1b366c 100644 --- a/packages/schedule/schedule/tests/domain-restart.spec.ts +++ b/packages/schedule/schedule/tests/domain-restart.spec.ts @@ -9,7 +9,7 @@ import { DomainFacility } from '@deepseek-ai/dsh-storage-domain' import { JsonStorageBackend } from '@deepseek-ai/dsh-storage-json' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { scheduleDomain, scheduleTaskSchema, type ScheduleTask } from '../src/storage.ts' import { createAfterScheduleRecord, diff --git a/packages/schedule/schedule/tests/runtime.spec.ts b/packages/schedule/schedule/tests/runtime.spec.ts index aa0b59f0fd..999585ea3f 100644 --- a/packages/schedule/schedule/tests/runtime.spec.ts +++ b/packages/schedule/schedule/tests/runtime.spec.ts @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { Agent } from '@deepseek-ai/dsh-agent' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { RemoteError } from '@deepseek-ai/dsh-typert-protocol' import { ScheduleRuntime, MAX_TIMER_DELAY_MS } from '../src/runtime.ts' import { diff --git a/packages/schedule/schedule/tests/update-restart.spec.ts b/packages/schedule/schedule/tests/update-restart.spec.ts index d209d72eda..774267154f 100644 --- a/packages/schedule/schedule/tests/update-restart.spec.ts +++ b/packages/schedule/schedule/tests/update-restart.spec.ts @@ -5,7 +5,7 @@ import { join } from 'node:path' import type { Context } from '@deepseek-ai/cordis' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import { JsonStorageBackend } from '@deepseek-ai/dsh-storage-json' import { afterEach, beforeEach, expect, it, vi } from 'vitest' import { createDailyScheduleRecord } from '../src/domain.ts' diff --git a/packages/sdk/client/README.md b/packages/sdk/client/README.md index fe5e69d25f..24e89a3955 100644 --- a/packages/sdk/client/README.md +++ b/packages/sdk/client/README.md @@ -64,7 +64,7 @@ The following example imports `brandString` at runtime. Declare `@deepseek-ai/ds ```ts import { DeepSeekHarness } from '@deepseek-ai/dsh-sdk-client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' await using harness = new DeepSeekHarness({ profile: 'sdk', diff --git a/packages/sdk/client/README.zh.md b/packages/sdk/client/README.zh.md index 4bc34e332c..4a9ddc44f6 100644 --- a/packages/sdk/client/README.zh.md +++ b/packages/sdk/client/README.zh.md @@ -64,7 +64,7 @@ try { ```ts import { DeepSeekHarness } from '@deepseek-ai/dsh-sdk-client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' await using harness = new DeepSeekHarness({ profile: 'sdk', diff --git a/packages/sdk/server/tests/query-input.spec.ts b/packages/sdk/server/tests/query-input.spec.ts index b532370227..f898dd7812 100644 --- a/packages/sdk/server/tests/query-input.spec.ts +++ b/packages/sdk/server/tests/query-input.spec.ts @@ -1,7 +1,6 @@ import { describe, expect, it } from 'vitest' import { brandString } from '@deepseek-ai/dsh-brand' -import type { CommandDescriptor } from '@deepseek-ai/dsh-commands/types' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId, CommandDescriptor } from '@deepseek-ai/dsh-commands/types' import { queryCommand } from '../src/query-input.ts' const commands: readonly CommandDescriptor[] = [ diff --git a/packages/session-query/session-log-export/src/index.ts b/packages/session-query/session-log-export/src/index.ts index 5fe99dce5f..b179610537 100644 --- a/packages/session-query/session-log-export/src/index.ts +++ b/packages/session-query/session-log-export/src/index.ts @@ -1,7 +1,7 @@ /** Session export command and Host-owned ZIP download and Markdown copy routes. */ import type { Context } from '@deepseek-ai/cordis' -import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/brand' +import type { CommandDefinitionId } from '@deepseek-ai/dsh-commands/types' import Schema from '@deepseek-ai/schemastery' import { brandString } from '@deepseek-ai/dsh-brand' import type {} from '@deepseek-ai/dsh-attachment' diff --git a/packages/session/session-persistence-jsonl/README.i18n.yaml b/packages/session/session-persistence-jsonl/README.i18n.yaml index d8f2314ebd..440d9e0ca4 100644 --- a/packages/session/session-persistence-jsonl/README.i18n.yaml +++ b/packages/session/session-persistence-jsonl/README.i18n.yaml @@ -30,8 +30,8 @@ en: 96498792672f6d50 zh: d767a9c69dced889 /deepseek-ai-dsh-session-persistence-jsonl/use-this-package/reading-the-logs: - en: 4cec8a6c9f6e488b - zh: 4757440a552db5e3 + en: e7e612a45f80e32e + zh: 211b357403747dd2 /deepseek-ai-dsh-session-persistence-jsonl/understand-the-implementation: en: a35407bb25671e7e zh: 6a00f9510c85adcb diff --git a/packages/session/session-persistence-jsonl/README.md b/packages/session/session-persistence-jsonl/README.md index 2de63df367..72023cbeeb 100644 --- a/packages/session/session-persistence-jsonl/README.md +++ b/packages/session/session-persistence-jsonl/README.md @@ -84,7 +84,7 @@ Unloading the backend waits for the consumer unloads it triggers through `sessio Materialized `stat` and `list` snapshots include the format catalog's header classification as `formatStatus`, alongside the translated logical `header`. They also include `location: { kind: 'jsonl', path }` for the selected physical generation. A read-only preparation leaves the selected historical version unchanged; the status becomes `current` after publication of the successor. Unmaterialized pending Sessions omit `formatStatus` and `location`. -`open(id, 'read'|'write')` selects the highest canonical generation. Current input follows the ordinary fast path. For historical input, a read open decodes and migrates the source once, validates the current logical result, and returns it without publishing a successor. A write open reuses that revision-keyed preparation when available, or performs the same preparation, then encodes a same-directory temporary file in bounded chunks, verifies it in a Worker Thread, rechecks the source revision, and publishes the current successor without overwrite before returning. The source remains byte-identical. Source drift after preparation rejects that write open without replacing the logical history already returned to readers; a later write open prepares the new revision. The backend marks decoded event graphs `shared-frozen` when it freezes them before memoization; every nested object and array is frozen, and handle reads and slices preserve that state, including empty slices. Only an unmaterialized pending log reports `detached`. `stat(id)` and `list()` select and translate only the highest generation header without reading event rows or starting migration; snapshots carry the selected file’s `sizeBytes` and a best-effort revision. Current revisions identify that file; historical revisions also fingerprint the selected files across the persistence root, so child changes invalidate cached logical events. Fingerprinting reads filesystem metadata only; unrelated changes conservatively invalidate historical revisions. One `list()` call shares a corpus fingerprint across its historical entries. With `compression: 'none'`, the log is newline-delimited text an external reader can consume directly; the compressed default must be read through the backend. +`open(id, 'read'|'write')` selects the highest canonical generation. Current input follows the ordinary fast path. For historical input, a read open decodes and migrates the source once, validates the current logical result, and returns it without publishing a successor. A write open reuses that revision-keyed preparation when available, or performs the same preparation, then encodes a same-directory temporary file in bounded chunks, verifies it in a Worker Thread, rechecks the source revision, and publishes the current successor without overwrite before returning. The source remains byte-identical. Source drift after preparation rejects that write open without replacing the logical history already returned to readers; a later write open prepares the new revision. The backend marks decoded event graphs `shared-frozen` when it freezes them before memoization; every nested object and array is frozen, and handle reads and slices preserve that state, including empty slices. Only an unmaterialized pending log reports `detached`. `stat(id)` and `list()` select and translate only the highest generation header without reading event rows or starting migration; snapshots carry the selected file’s `sizeBytes` and a best-effort revision. Current revisions identify that file; historical revisions also fingerprint the selected files across the persistence root, so child changes invalidate cached logical events. Fingerprinting reads filesystem metadata only; unrelated changes conservatively invalidate historical revisions. One `list()` call shares a corpus fingerprint across its historical entries and computes it from the same stat results. A later `list()` reuses a header from the previous complete listing while its file revision is unchanged, so it reads only the headers of changed logs. With `compression: 'none'`, the log is newline-delimited text an external reader can consume directly; the compressed default must be read through the backend. Verification accepts a successful Worker response only after the Worker exits naturally with code 0. Its concurrency slot remains held through that exit; cancellation and Worker errors terminate and join the Worker before rejecting. diff --git a/packages/session/session-persistence-jsonl/README.zh.md b/packages/session/session-persistence-jsonl/README.zh.md index e5494de7d6..fb2e3072c8 100644 --- a/packages/session/session-persistence-jsonl/README.zh.md +++ b/packages/session/session-persistence-jsonl/README.zh.md @@ -84,7 +84,7 @@ kind: "package-reference" 已实体化的 `stat` 与 `list` 快照在转换后的逻辑 `header` 之外,通过 `formatStatus` 保留格式 catalog 的头部分类。它们还包含选中物理 generation 的 `location: { kind: 'jsonl', path }`。只读准备不会改变所选历史版本;发布后继之后,状态才变为 `current`。尚未实体化的待定 Session 省略 `formatStatus` 与 `location`。 -`open(id, 'read'|'write')` 选择最高规范 generation。当前格式输入走普通快速路径。对于历史输入,只读 open 会单遍解码并迁移源、校验当前逻辑结果,然后在不发布后继的情况下返回。写 open 会在可用时复用按 revision 为键的 preparation,否则执行同一套 preparation,再按有界分片编码同目录临时文件、在 Worker Thread 中校验、复查源修订,并在返回前以不覆盖方式发布当前后继。源保持逐字节不变。如果源在 preparation 后发生变化,该次写 open 会失败,已经返回给读方的逻辑历史不会被替换;后续写 open 会针对新的 revision 重新执行 preparation。后端在 memo 化前冻结已解码的 event graph,并在此时将其标记为 `shared-frozen`;每个嵌套对象和数组都会冻结,句柄读取和 slice 即使为空也保留该状态。只有尚未实体化的 pending 空日志报告 `detached`。`stat(id)` 与 `list()` 只选择并转换最高 generation 的 header,不读取事件行,也不启动迁移;快照携带所选文件的 `sizeBytes` 与尽力而为的修订号。当前格式修订号标识该文件;历史格式修订号还包含持久化根目录中所选文件的指纹,因此子日志变化会使缓存的逻辑事件失效。指纹只读取文件系统元数据;无关变化也会保守地使历史修订号失效。一次 `list()` 为其历史条目共用一个全库指纹。选择 `compression: 'none'` 后,日志是外部读取方可直接消费的换行分隔文本;压缩默认值必须经后端读取。 +`open(id, 'read'|'write')` 选择最高规范 generation。当前格式输入走普通快速路径。对于历史输入,只读 open 会单遍解码并迁移源、校验当前逻辑结果,然后在不发布后继的情况下返回。写 open 会在可用时复用按 revision 为键的 preparation,否则执行同一套 preparation,再按有界分片编码同目录临时文件、在 Worker Thread 中校验、复查源修订,并在返回前以不覆盖方式发布当前后继。源保持逐字节不变。如果源在 preparation 后发生变化,该次写 open 会失败,已经返回给读方的逻辑历史不会被替换;后续写 open 会针对新的 revision 重新执行 preparation。后端在 memo 化前冻结已解码的 event graph,并在此时将其标记为 `shared-frozen`;每个嵌套对象和数组都会冻结,句柄读取和 slice 即使为空也保留该状态。只有尚未实体化的 pending 空日志报告 `detached`。`stat(id)` 与 `list()` 只选择并转换最高 generation 的 header,不读取事件行,也不启动迁移;快照携带所选文件的 `sizeBytes` 与尽力而为的修订号。当前格式修订号标识该文件;历史格式修订号还包含持久化根目录中所选文件的指纹,因此子日志变化会使缓存的逻辑事件失效。指纹只读取文件系统元数据;无关变化也会保守地使历史修订号失效。一次 `list()` 为其历史条目共用一个全库指纹,并基于同一批 stat 结果计算该指纹。后续 `list()` 在文件修订号未变时复用上一次完整列举的 header,因此只读取已变化日志的 header。选择 `compression: 'none'` 后,日志是外部读取方可直接消费的换行分隔文本;压缩默认值必须经后端读取。 校验只有在 Worker 自然以退出码 0 结束后,才接受其成功响应。并发配额一直保留到该次退出;取消或 Worker 错误会先终止并等待 Worker 退出,再使校验失败。 diff --git a/packages/session/session-persistence-jsonl/src/index.ts b/packages/session/session-persistence-jsonl/src/index.ts index 8dbc94eb1e..2d95753d7a 100644 --- a/packages/session/session-persistence-jsonl/src/index.ts +++ b/packages/session/session-persistence-jsonl/src/index.ts @@ -187,6 +187,13 @@ interface ResolvedJsonlGeneration { readonly currentPath: string } +/** One listed generation header and the file revision it was read from. */ +interface ListedHeader { + readonly revision: PersistenceRevision + /** `undefined` when the log is unreadable as a listed Session. */ + readonly metadata: GenerationHeader | undefined +} + /** One backend-owned historical preparation shared by its current callers. */ interface MigrationPreparation { readonly sourcePath: string @@ -208,6 +215,20 @@ function fileRevision(identity: JsonlPhysicalIdentity): PersistenceRevision { ].join(':')) } +/** + * Fingerprint a generation corpus independently of listing order. + * @param revisions - each generation path with its file revision or `missing`. + * @returns the hex digest. + */ +function corpusDigest(revisions: ReadonlyArray): string { + const hash = createHash('sha256') + const byPath = new Map(revisions) + for (const path of [...byPath.keys()].sort()) { + hash.update(JSON.stringify([path, byPath.get(path)])) + } + return hash.digest('hex') +} + /** Whether a filesystem error means absence; every non-ENOENT failure must surface. */ function isENOENT(error: unknown): boolean { return (error as NodeJS.ErrnoException | null)?.code === 'ENOENT' @@ -311,6 +332,19 @@ class JsonlSessionPersistence extends SessionPersistence { * revision guard. */ private readonly coldLogMemo = new Map() + /** + * Generation headers observed by the latest complete listing, keyed by + * source path and guarded by the stat-derived revision, so a listing reads + * only the first frame of logs whose file changed. Each complete listing + * replaces the map, which drops deleted paths. + * + * Reuse relies on this backend never rewriting a generation's header line + * in place: publication creates a new file, append grows it, and repair + * truncates its tail, so every content change moves the revision. The + * revision is file metadata, not a byte checksum. A reused entry also + * reuses the path-identity check its first read passed. + */ + private listedHeaders = new Map() /** One joinable decode/migration operation per selected historical Session file revision. */ private readonly migrationPreparations = new Map() @@ -528,27 +562,15 @@ class JsonlSessionPersistence extends SessionPersistence { // append lands mid-scan is then still in this snapshot (its artifact may // predate the scan), so create-to-list visibility never has a hole. const pending = [...this.tracker.pendingEntries()] - const artifacts = await this.listArtifacts(signal) + const { artifacts, revisions } = await this.listArtifacts(signal) const corpusRevision = artifacts.some(artifact => artifact.sourceVersion < SESSION_FORMAT_VERSION) - ? await this.historicalCorpusRevision(signal) : undefined - const statted = settledValues(await settleLimited(this.listLimit, artifacts, async (artifact) => { - signal?.throwIfAborted() - try { - const identity = await stat(artifact.path, { bigint: true }) - signal?.throwIfAborted() - return { artifact, identity } - } catch (error: unknown) { - signal?.throwIfAborted() - if (!isENOENT(error)) throw error - return undefined - } - })) - for (const entry of statted) { - if (entry === undefined) continue - const { artifact, identity } = entry + ? corpusDigest(revisions) : undefined + for (const artifact of artifacts) { + const { identity } = artifact listed.add(artifact.header.id) snapshots.push({ - header: artifact.header, + // Detached from the header the listing cache retains. + header: { ...artifact.header }, formatStatus: artifact.formatStatus, revision: artifact.sourceVersion < SESSION_FORMAT_VERSION ? brandString(`${fileRevision(identity)}:${corpusRevision}`) @@ -685,7 +707,7 @@ class JsonlSessionPersistence extends SessionPersistence { let prepared: Awaited> let validateRelatedSources: () => Promise try { - const children = async () => (await this.listArtifacts(signal)) + const children = async () => (await this.listArtifacts(signal)).artifacts .filter(source => source.header.origin === 'subagent' && source.header.parentSession === id) const sources = await children() const related = await prepareCatalogFacts(id, sources, this.compression, signal) @@ -1120,54 +1142,87 @@ class JsonlSessionPersistence extends SessionPersistence { /** Historical logical events depend on the corpus, including members with unreadable headers. */ private async historicalCorpusRevision(signal?: AbortSignal): Promise { - const paths = (await this.listGenerations(signal)).map(source => source.sourcePath).sort() + const paths = (await this.listGenerations(signal)).map(source => source.sourcePath) const entries = settledValues(await settleLimited(this.listLimit, paths, async (path) => { signal?.throwIfAborted() try { - return { path, revision: fileRevision(await stat(path, { bigint: true })) } + return [path, fileRevision(await stat(path, { bigint: true }))] as const } catch (error: unknown) { if (!isENOENT(error)) throw error - return { path, revision: 'missing' } + return [path, 'missing'] as const } })) - const hash = createHash('sha256') - for (const { path, revision } of entries) hash.update(JSON.stringify([path, revision])) signal?.throwIfAborted() - return hash.digest('hex') + return corpusDigest(entries) } - private async listArtifacts( - signal?: AbortSignal, - ): Promise> { + /** + * Read every listed Session's generation header with one stat per generation. + * @param signal - optional cancellation. + * @returns the readable artifacts, and the revision of every generation + * (`missing` when it vanished) for {@link corpusDigest}. + */ + private async listArtifacts(signal?: AbortSignal): Promise<{ + artifacts: Array + revisions: Array + }> { signal?.throwIfAborted() await this.ensureRootEncoding() signal?.throwIfAborted() const generations = await this.listGenerations(signal) + const previous = this.listedHeaders + const listed = new Map() const headers = await settleLimited(this.listLimit, generations, async (selected) => { signal?.throwIfAborted() + let identity: JsonlPhysicalIdentity try { - return { selected, metadata: await this.readGenerationHeader(selected, undefined, signal) } + identity = await stat(selected.sourcePath, { bigint: true }) } catch (error: unknown) { - if (error instanceof SessionFormatUnsupportedError || error instanceof SessionPersistenceCorruptionError) { - return { selected, metadata: undefined } - } - throw error + signal?.throwIfAborted() + if (!isENOENT(error)) throw error + return { selected, revision: 'missing', identity: undefined, metadata: undefined } } + signal?.throwIfAborted() + const revision = fileRevision(identity) + const memo = previous.get(selected.sourcePath) + const metadata = memo !== undefined && memo.revision === revision + ? memo.metadata + : await this.readListedHeader(selected, signal) + listed.set(selected.sourcePath, { revision, metadata }) + return { selected, revision, identity, metadata } }) - const artifacts: Array = [] + const artifacts: Array = [] + const revisions: Array = [] const ids = new Set() for (const outcome of headers) { if (outcome.status === 'rejected') throw outcome.reason - const { selected, metadata } = outcome.value - if (metadata === undefined) continue + const { selected, revision, identity, metadata } = outcome.value + revisions.push([selected.sourcePath, revision]) + if (identity === undefined || metadata === undefined) continue if (ids.has(metadata.header.id)) { throw new Error(`duplicate JSONL session id "${metadata.header.id}" appears in multiple project directories`) } ids.add(metadata.header.id) - artifacts.push({ ...metadata, path: selected.sourcePath, sourceVersion: selected.sourceVersion }) + artifacts.push({ ...metadata, path: selected.sourcePath, sourceVersion: selected.sourceVersion, identity }) } signal?.throwIfAborted() - return artifacts + this.listedHeaders = listed + return { artifacts, revisions } + } + + /** Read one listed generation header; an unsupported or corrupt log is not a listed Session. */ + private async readListedHeader( + selected: ResolvedJsonlGeneration, + signal?: AbortSignal, + ): Promise { + try { + return await this.readGenerationHeader(selected, undefined, signal) + } catch (error: unknown) { + if (error instanceof SessionFormatUnsupportedError || error instanceof SessionPersistenceCorruptionError) { + return undefined + } + throw error + } } /** Read and translate one selected generation header without inspecting its body. */ diff --git a/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts b/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts index 558847d09d..95200cf9c6 100644 --- a/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/jsonl.spec.ts @@ -2,7 +2,8 @@ import { type MessageId, createMessage } from '@deepseek-ai/dsh-llm' import { brandString } from '@deepseek-ai/dsh-brand' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' -import { appendFile, mkdtemp, mkdir, rm, readFile, writeFile, readdir, stat, symlink } from 'node:fs/promises' +import { appendFile, mkdtemp, mkdir, open, rm, readFile, writeFile, readdir, stat, symlink, utimes } from 'node:fs/promises' +import type { FileHandle } from 'node:fs/promises' import { tmpdir } from 'node:os' import { dirname, join, relative, resolve } from 'node:path' import { scheduler } from 'node:timers/promises' @@ -2067,13 +2068,13 @@ describe('JsonlSessionPersistence: durability and crash semantics', () => { const m = meta('vanishing-snapshot') await writeLog(ctx.sessionPersistence, m, oneTurnLog()) const persistence = ctx.sessionPersistence as unknown as { - listArtifacts(): Promise> + listGenerations(): Promise> } - const listArtifacts = persistence.listArtifacts.bind(persistence) - const discovery = vi.spyOn(persistence, 'listArtifacts').mockImplementation(async () => { - const artifacts = await listArtifacts() - await rm(artifacts[0]!.path) - return artifacts + const listGenerations = persistence.listGenerations.bind(persistence) + const discovery = vi.spyOn(persistence, 'listGenerations').mockImplementation(async () => { + const generations = await listGenerations() + await rm(generations[0]!.sourcePath) + return generations }) await expect(ctx.sessionPersistence.list()).resolves.toEqual([]) @@ -2082,11 +2083,13 @@ describe('JsonlSessionPersistence: durability and crash semantics', () => { it('surfaces non-ENOENT stat failures during listing', async () => { const persistence = ctx.sessionPersistence as unknown as { - listArtifacts(): Promise> + listGenerations(): Promise> } - const discovery = vi.spyOn(persistence, 'listArtifacts').mockResolvedValue([{ - header: meta('snapshot-stat-failure'), - path: `${root}\0snapshot-stat-failure`, + const path = `${root}\0snapshot-stat-failure` + const discovery = vi.spyOn(persistence, 'listGenerations').mockResolvedValue([{ + sourcePath: path, + sourceVersion: SESSION_FORMAT_VERSION, + currentPath: path, }]) await expect(ctx.sessionPersistence.list()).rejects.toThrow(/null bytes/) @@ -2095,7 +2098,7 @@ describe('JsonlSessionPersistence: durability and crash semantics', () => { it('forwards list cancellation and awaits in-flight discovery cleanup', async () => { const persistence = ctx.sessionPersistence as unknown as { - listArtifacts(signal?: AbortSignal): Promise> + listArtifacts(signal?: AbortSignal): Promise<{ artifacts: never[]; revisions: never[] }> } const started = Promise.withResolvers() const cleanup = Promise.withResolvers() @@ -2103,7 +2106,7 @@ describe('JsonlSessionPersistence: durability and crash semantics', () => { if (signal === undefined) throw new Error('expected list signal') started.resolve(signal) await cleanup.promise - return [] + return { artifacts: [], revisions: [] } }) const reason = new Error('JSONL list discovery cancelled') const controller = new AbortController() @@ -2127,11 +2130,13 @@ describe('JsonlSessionPersistence: durability and crash semantics', () => { const m = meta('snapshot-stat-cancellation') await writeLog(ctx.sessionPersistence, m, oneTurnLog()) const persistence = ctx.sessionPersistence as unknown as { - listArtifacts(signal?: AbortSignal): Promise> + listGenerations(signal?: AbortSignal): Promise> } - const discovery = vi.spyOn(persistence, 'listArtifacts').mockResolvedValue([{ - header: m, - path: rawLogPath(root, m.cwd, m.id), + const path = rawLogPath(root, m.cwd, m.id) + const discovery = vi.spyOn(persistence, 'listGenerations').mockResolvedValue([{ + sourcePath: path, + sourceVersion: SESSION_FORMAT_VERSION, + currentPath: path, }]) const reason = new Error('JSONL list stat cancelled') const controller = new AbortController() @@ -2633,6 +2638,53 @@ describe('JsonlSessionPersistence: edge cases', () => { expect(await ctx.sessionPersistence.list()).toEqual([]) }) + it('list re-reads only the headers of logs whose file changed', async () => { + const kept = meta('memo-kept', '/memo') + const changed = meta('memo-changed', '/memo') + const removed = meta('memo-removed', '/memo') + const corrupt = meta('memo-corrupt', '/memo') + for (const m of [kept, changed, removed]) await writeLog(ctx.sessionPersistence, m, oneTurnLog()) + const corruptPath = rawLogPath(root, corrupt.cwd, corrupt.id) + await mkdir(dirname(corruptPath), { recursive: true }) + await writeFile(corruptPath, 'not json\n') + const created = (ids: readonly { header: SessionHeader }[]) => + Object.fromEntries(ids.map(({ header }) => [header.id, header.createdAt])) + const first = await ctx.sessionPersistence.list() + expect(created(first)) + .toEqual({ [kept.id]: kept.createdAt, [changed.id]: changed.createdAt, [removed.id]: removed.createdAt }) + // A caller's copy is detached from the headers later listings reuse. + mutableHeader(first.find(({ header }) => header.id === kept.id)!.header).createdAt = 0 + + const path = rawLogPath(root, changed.cwd, changed.id) + const probe = await open(path, 'r') + const handles = Object.getPrototypeOf(probe) as Pick + await probe.close() + const reads = vi.spyOn(handles, 'read') + expect(created(await ctx.sessionPersistence.list())) + .toEqual({ [kept.id]: kept.createdAt, [changed.id]: changed.createdAt, [removed.id]: removed.createdAt }) + expect(reads).not.toHaveBeenCalled() + + // An explicit mtime keeps each revision distinct on coarse-timestamp filesystems. + const later = new Date(Date.now() + 60_000) + await writeFile(path, [ + JSON.stringify(toHeaderLine({ ...changed, createdAt: changed.createdAt + 1 })), + ...oneTurnLog().map(event => JSON.stringify(event)), + '', + ].join('\n')) + await utimes(path, later, later) + await writeFile(corruptPath, [ + JSON.stringify(toHeaderLine(corrupt)), + ...oneTurnLog().map(event => JSON.stringify(event)), + '', + ].join('\n')) + await utimes(corruptPath, later, later) + await rm(sessionDir(root, removed.cwd, removed.id), { recursive: true }) + expect(created(await ctx.sessionPersistence.list())) + .toEqual({ [kept.id]: kept.createdAt, [changed.id]: changed.createdAt + 1, [corrupt.id]: corrupt.createdAt }) + expect(reads).toHaveBeenCalledTimes(2) + reads.mockRestore() + }) + it('keeps the transcript in an extensible session-owned directory', async () => { const m = meta('owned-directory', '/project') await writeLog(ctx.sessionPersistence, m, oneTurnLog()) diff --git a/packages/session/session-persistence-jsonl/tests/zstd.spec.ts b/packages/session/session-persistence-jsonl/tests/zstd.spec.ts index cd4975da6c..278bb318dd 100644 --- a/packages/session/session-persistence-jsonl/tests/zstd.spec.ts +++ b/packages/session/session-persistence-jsonl/tests/zstd.spec.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' -import { appendFile, mkdir, mkdtemp, open, readFile, readdir, rm, stat, writeFile } from 'node:fs/promises' +import { appendFile, mkdir, mkdtemp, open, readFile, readdir, rm, stat, utimes, writeFile } from 'node:fs/promises' import type { FileHandle } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' @@ -571,6 +571,8 @@ describe('JsonlSessionPersistence: default Zstandard encoding', () => { await writeLog(ctx.sessionPersistence, header, oneTurnLog()) await ctx.sessionPersistence.list() const path = logPath(root, header.cwd, header.id, compression) + // A changed revision makes the next listing read the header again. + await utimes(path, new Date(), new Date(Date.now() + 60_000)) const probe = await open(path, 'r') const prototype = Object.getPrototypeOf(probe) as { read: HeaderRead } const originalRead = prototype.read diff --git a/packages/skill/tool-workspace-dependencies/tests/tool-workspace-dependencies.spec.ts b/packages/skill/tool-workspace-dependencies/tests/tool-workspace-dependencies.spec.ts index fbcfd56f94..1377a573a7 100644 --- a/packages/skill/tool-workspace-dependencies/tests/tool-workspace-dependencies.spec.ts +++ b/packages/skill/tool-workspace-dependencies/tests/tool-workspace-dependencies.spec.ts @@ -15,7 +15,7 @@ import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import * as workspaceDependencies from '../src/index.ts' import { copyPrimaryRuntime, installPrimaryRuntime, parsePrimaryRuntime, readPrimaryRuntime, resolvePrimaryRuntime, workspaceDependencyPaths, type PrimaryRuntimeManifest } from '../src/index.ts' diff --git a/packages/spill/spill-local/tests/spill-local.spec.ts b/packages/spill/spill-local/tests/spill-local.spec.ts index cc22d24bf5..ead3753c3d 100644 --- a/packages/spill/spill-local/tests/spill-local.spec.ts +++ b/packages/spill/spill-local/tests/spill-local.spec.ts @@ -16,7 +16,7 @@ import { realpath } from 'node:fs/promises' import { tmpdir } from 'node:os' import { basename, dirname, isAbsolute, join, normalize } from 'node:path' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session' import type { SaveTextSpill } from '@deepseek-ai/dsh-spill' import LocalSpillStore, { diff --git a/packages/spill/spill/tests/service.spec.ts b/packages/spill/spill/tests/service.spec.ts index e203a42861..076f144057 100644 --- a/packages/spill/spill/tests/service.spec.ts +++ b/packages/spill/spill/tests/service.spec.ts @@ -7,7 +7,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session' import { type SpillLocator, SpillStore } from '@deepseek-ai/dsh-spill' import { brandString } from '@deepseek-ai/dsh-brand' diff --git a/packages/subagent/subagent-acp/tests/fixtures/loader/mock-delegating-llm.ts b/packages/subagent/subagent-acp/tests/fixtures/loader/mock-delegating-llm.ts index ffa7159665..041a8656af 100644 --- a/packages/subagent/subagent-acp/tests/fixtures/loader/mock-delegating-llm.ts +++ b/packages/subagent/subagent-acp/tests/fixtures/loader/mock-delegating-llm.ts @@ -1,7 +1,7 @@ import type { Context } from '@deepseek-ai/cordis' import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { LlmAdapter } from '@deepseek-ai/dsh-llm' /** Script one delegation, then acknowledge the receipt and the completion notice. */ diff --git a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/child-mock-llm.ts b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/child-mock-llm.ts index f97d1dc5bc..36753b25b6 100644 --- a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/child-mock-llm.ts +++ b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/child-mock-llm.ts @@ -3,7 +3,7 @@ import { existsSync, writeFileSync } from 'node:fs' import { setTimeout } from 'node:timers/promises' import type { GenerateOptions, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import { LlmAdapter } from '@deepseek-ai/dsh-llm' /** diff --git a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/mock-delegating-llm.ts b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/mock-delegating-llm.ts index fa9fef269e..b3f9fa7a84 100644 --- a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/mock-delegating-llm.ts +++ b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/mock-delegating-llm.ts @@ -2,7 +2,7 @@ import type { Context } from '@deepseek-ai/cordis' import { appendFileSync } from 'node:fs' import type { GenerateOptions, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId, ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId, ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import { LlmAdapter } from '@deepseek-ai/dsh-llm' /** Script one delegation, then acknowledge the receipt and the completion notice. */ diff --git a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/nested-mock-llm.ts b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/nested-mock-llm.ts index 4ba7e20024..0b93f898bb 100644 --- a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/nested-mock-llm.ts +++ b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/nested-mock-llm.ts @@ -3,7 +3,7 @@ import { existsSync, writeFileSync } from 'node:fs' import { setTimeout } from 'node:timers/promises' import type { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { LlmAdapter, type GenerateOptions, type LlmResolvedModelInfo, type StreamChunk } from '@deepseek-ai/dsh-llm' class NestedAdapter extends LlmAdapter { diff --git a/packages/subagent/subagent-dsh-sdk/tests/subagent-dsh-sdk.spec.ts b/packages/subagent/subagent-dsh-sdk/tests/subagent-dsh-sdk.spec.ts index 6051dd7fca..14d4cbae8a 100644 --- a/packages/subagent/subagent-dsh-sdk/tests/subagent-dsh-sdk.spec.ts +++ b/packages/subagent/subagent-dsh-sdk/tests/subagent-dsh-sdk.spec.ts @@ -26,7 +26,7 @@ import { createProcessDeepSeekHarness } from '../../../sdk/client/src/api.ts' import type { RuntimeProcessOptions } from '../../../sdk/client/src/launch.ts' import type { DeepSeekHarnessOptions } from '@deepseek-ai/dsh-sdk-client' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import * as sdk from '../src/index.ts' import { DEFAULT_DISPOSE_EOF_GRACE_MS, diff --git a/packages/subagent/subagent/src/control-types.ts b/packages/subagent/subagent/src/control-types.ts index 442526b3d0..30ac7973d5 100644 --- a/packages/subagent/subagent/src/control-types.ts +++ b/packages/subagent/subagent/src/control-types.ts @@ -7,7 +7,7 @@ import type { PromptContentPart } from '@deepseek-ai/dsh-attachment/types' import type { Branded } from '@deepseek-ai/dsh-brand' -import type { MessageId } from '@deepseek-ai/dsh-llm/brand' +import type { MessageId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session/types' import type { KnownSubagentCatalogFields } from './projection-types.ts' // Type-only: the Workspace registry's archive-admission family map this runtime merges `subagent` into. diff --git a/packages/subagent/subagent/tests/child-agent.spec.ts b/packages/subagent/subagent/tests/child-agent.spec.ts index 0c75194c08..14b4f89cef 100644 --- a/packages/subagent/subagent/tests/child-agent.spec.ts +++ b/packages/subagent/subagent/tests/child-agent.spec.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import type { Agent } from '@deepseek-ai/dsh-agent' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import { Session, type SessionId } from '@deepseek-ai/dsh-session' import { resolveChildAgentOptions, resolveChildDepth } from '../src/child-agent.ts' diff --git a/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts b/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts index 5096015e93..a6b5b08860 100644 --- a/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts +++ b/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts @@ -9,7 +9,7 @@ import { defineTool } from '@deepseek-ai/dsh-tools' import { renderContextSnapshot } from '@deepseek-ai/dsh-system-prompt' import type { Agent } from '@deepseek-ai/dsh-agent' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage } from '@deepseek-ai/dsh-llm' import AgentLoop from '@deepseek-ai/dsh-agent-loop' import { mountAgentLoopTestDependencies } from '@deepseek-ai/dsh-agent-loop-testkit' diff --git a/packages/subagent/tool-subagent-control/tests/wait-agent.spec.ts b/packages/subagent/tool-subagent-control/tests/wait-agent.spec.ts index c7daf09c63..59c73e60f3 100644 --- a/packages/subagent/tool-subagent-control/tests/wait-agent.spec.ts +++ b/packages/subagent/tool-subagent-control/tests/wait-agent.spec.ts @@ -5,7 +5,7 @@ import type { Agent } from '@deepseek-ai/dsh-agent' import { agentCarrier, emitAgentEvent } from '@deepseek-ai/dsh-agent' import { mountAgentLoopTestDependencies, mountAgentLoopTestHarness } from '@deepseek-ai/dsh-agent-loop-testkit' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage, HarnessError } from '@deepseek-ai/dsh-llm' import type { SessionId } from '@deepseek-ai/dsh-session' import SubagentRuntime from '@deepseek-ai/dsh-subagent' diff --git a/packages/subagent/tool-subagent/src/index.ts b/packages/subagent/tool-subagent/src/index.ts index 164b8512b9..9d396be692 100644 --- a/packages/subagent/tool-subagent/src/index.ts +++ b/packages/subagent/tool-subagent/src/index.ts @@ -12,7 +12,7 @@ import type {} from '@deepseek-ai/dsh-agent-preset-registry' import { defineTool, ToolContextUnavailableError } from '@deepseek-ai/dsh-tools' import type { ToolDefinition } from '@deepseek-ai/dsh-tools' import type { AgentOptions } from '@deepseek-ai/dsh-agent' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import type { ContentBlock } from '@deepseek-ai/dsh-llm' import { assertSubagentMaxDepth, diff --git a/packages/subagent/tool-subagent/src/model-selection.ts b/packages/subagent/tool-subagent/src/model-selection.ts index 868bf8c538..e229d7a878 100644 --- a/packages/subagent/tool-subagent/src/model-selection.ts +++ b/packages/subagent/tool-subagent/src/model-selection.ts @@ -1,7 +1,7 @@ /** Child LLM route selection for the subagent tool. */ import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import type { LlmRuntime } from '@deepseek-ai/dsh-llm' import type { AgentOptions } from '@deepseek-ai/dsh-agent' import { SubagentError } from '@deepseek-ai/dsh-subagent' diff --git a/packages/subagent/tool-subagent/tests/harness.ts b/packages/subagent/tool-subagent/tests/harness.ts index d300dc2f12..739240def0 100644 --- a/packages/subagent/tool-subagent/tests/harness.ts +++ b/packages/subagent/tool-subagent/tests/harness.ts @@ -3,7 +3,7 @@ import { mountWorkingDirectoryFixture } from '../../subagent/tests/working-direc import { afterEach } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { Agent, AgentOptions } from '@deepseek-ai/dsh-agent' import AgentLoop from '@deepseek-ai/dsh-agent-loop' import { mountAgentLoopTestDependencies } from '@deepseek-ai/dsh-agent-loop-testkit' diff --git a/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts b/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts index a9145f640f..f12333372d 100644 --- a/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts +++ b/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts @@ -6,7 +6,7 @@ import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { assembleContextFor } from '@deepseek-ai/dsh-agent' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { Session, type SessionId } from '@deepseek-ai/dsh-session' import type { SessionEvent } from '@deepseek-ai/dsh-session' import Loader from '@deepseek-ai/cordis-plugin-loader' diff --git a/packages/subagent/tool-subagent/tests/model-selection.spec.ts b/packages/subagent/tool-subagent/tests/model-selection.spec.ts index 964228ee69..3a7e0f31a2 100644 --- a/packages/subagent/tool-subagent/tests/model-selection.spec.ts +++ b/packages/subagent/tool-subagent/tests/model-selection.spec.ts @@ -4,7 +4,7 @@ import { mountWorkingDirectoryFixture } from '../../subagent/tests/working-direc import { describe, expect, it, vi } from 'vitest' import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ReasoningEffortId, ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ReasoningEffortId, ToolCallId } from '@deepseek-ai/dsh-llm/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' import type { Agent } from '@deepseek-ai/dsh-agent' diff --git a/packages/subagent/tool-subagent/tests/tool-subagent.spec.ts b/packages/subagent/tool-subagent/tests/tool-subagent.spec.ts index 2b1a4aa85f..3a012203ee 100644 --- a/packages/subagent/tool-subagent/tests/tool-subagent.spec.ts +++ b/packages/subagent/tool-subagent/tests/tool-subagent.spec.ts @@ -8,7 +8,7 @@ import path from 'node:path' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId, ReasoningEffortId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId, ReasoningEffortId } from '@deepseek-ai/dsh-llm/types' import { TOOL_ABORTED_BEFORE_DISPATCH } from '@deepseek-ai/dsh-tools' import { assembleContextFor } from '@deepseek-ai/dsh-agent' import type { Agent } from '@deepseek-ai/dsh-agent' diff --git a/packages/test-support/tool-testkit/tests/model-call.spec.ts b/packages/test-support/tool-testkit/tests/model-call.spec.ts index b2ae0cf586..8c672fb749 100644 --- a/packages/test-support/tool-testkit/tests/model-call.spec.ts +++ b/packages/test-support/tool-testkit/tests/model-call.spec.ts @@ -1,7 +1,7 @@ /** Model-call fixtures preserve raw JSON input and reject incomplete execution. */ import { Context } from '@deepseek-ai/cordis' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import Tools, { type ToolExecutor } from '@deepseek-ai/dsh-tools' import { expect, it, onTestFinished } from 'vitest' diff --git a/packages/todo/tool-todo/tests/loader-composition.spec.ts b/packages/todo/tool-todo/tests/loader-composition.spec.ts index 2b6d12fd60..254c9a8e1b 100644 --- a/packages/todo/tool-todo/tests/loader-composition.spec.ts +++ b/packages/todo/tool-todo/tests/loader-composition.spec.ts @@ -12,7 +12,7 @@ import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import Include from '@deepseek-ai/cordis-plugin-include' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { Session, type SessionId } from '@deepseek-ai/dsh-session' import AgentRegistry from '@deepseek-ai/dsh-agent' import type { Agent } from '@deepseek-ai/dsh-agent' diff --git a/packages/todo/tool-todo/tests/tool-todo.spec.ts b/packages/todo/tool-todo/tests/tool-todo.spec.ts index 068e4c9a69..703cc3aa5e 100644 --- a/packages/todo/tool-todo/tests/tool-todo.spec.ts +++ b/packages/todo/tool-todo/tests/tool-todo.spec.ts @@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest' import { Context } from '@deepseek-ai/cordis' import Loader from '@deepseek-ai/cordis-plugin-loader' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createUserMessage } from '@deepseek-ai/dsh-llm' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' diff --git a/packages/web/tool-web/tests/integration.spec.ts b/packages/web/tool-web/tests/integration.spec.ts index fe1c1de2cb..49896f0a3a 100644 --- a/packages/web/tool-web/tests/integration.spec.ts +++ b/packages/web/tool-web/tests/integration.spec.ts @@ -15,7 +15,7 @@ import { Context } from '@deepseek-ai/cordis' import type { Agent } from '@deepseek-ai/dsh-agent' import { DSH_LAUNCH_ENVIRONMENT_KEY, createLaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { createScope } from '@deepseek-ai/dsh-scope' import type { SessionId } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' diff --git a/packages/web/tool-web/tests/spill.spec.ts b/packages/web/tool-web/tests/spill.spec.ts index 7a377f1c02..4c6a09f8e6 100644 --- a/packages/web/tool-web/tests/spill.spec.ts +++ b/packages/web/tool-web/tests/spill.spec.ts @@ -18,7 +18,7 @@ import { join } from 'node:path' import { Context } from '@deepseek-ai/cordis' import { estimateContent } from '@deepseek-ai/dsh-token-meter/estimate' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { SessionId } from '@deepseek-ai/dsh-session' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' import ToolRuntime from '@deepseek-ai/dsh-tools' diff --git a/packages/web/tool-web/tests/tool-web.spec.ts b/packages/web/tool-web/tests/tool-web.spec.ts index fa18861faa..933ac0b2d1 100644 --- a/packages/web/tool-web/tests/tool-web.spec.ts +++ b/packages/web/tool-web/tests/tool-web.spec.ts @@ -7,7 +7,7 @@ import type { Agent, ModelSelection } from '@deepseek-ai/dsh-agent' import { createScope, type Scope } from '@deepseek-ai/dsh-scope' import TurndownService from 'turndown' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import SystemPrompt, { renderPrompt } from '@deepseek-ai/dsh-system-prompt' import ToolRuntime, { type ResolvedToolSet, type ToolExecutionInput, type ToolExecutionResult } from '@deepseek-ai/dsh-tools' import type { SessionId } from '@deepseek-ai/dsh-session' diff --git a/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts b/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts index 0f52d4458f..19dc5d0e0a 100644 --- a/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts +++ b/packages/workflow/tool-workflow/tests/tool-workflow.spec.ts @@ -15,7 +15,7 @@ import type { WorkflowAgentEndInfo, WorkflowAgentInfo, WorkflowResult, WorkflowRun, WorkflowStartRequest, } from '@deepseek-ai/dsh-workflow' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import type { JobId } from '@deepseek-ai/dsh-jobs' import AgentRegistry from '@deepseek-ai/dsh-agent' import LocalJobRegistry from '@deepseek-ai/dsh-jobs-local' diff --git a/scripts/python-snapshot-workflow-order.spec.ts b/scripts/python-snapshot-workflow-order.spec.ts index 29dcd236eb..b73ef75517 100644 --- a/scripts/python-snapshot-workflow-order.spec.ts +++ b/scripts/python-snapshot-workflow-order.spec.ts @@ -2,7 +2,7 @@ import { getEventListeners } from 'node:events' import { Context } from '@deepseek-ai/cordis' import { agentEvents, type Agent, type PreStepDecision } from '@deepseek-ai/dsh-agent' import { createToolResultMessage, createUserMessage } from '@deepseek-ai/dsh-llm' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import SessionStore, { type SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' import type { WorkflowRunId } from '@deepseek-ai/dsh-workflow/types' diff --git a/scripts/session-query-spill-command.spec.ts b/scripts/session-query-spill-command.spec.ts index dbe30fa959..0611c2f3ce 100644 --- a/scripts/session-query-spill-command.spec.ts +++ b/scripts/session-query-spill-command.spec.ts @@ -5,7 +5,7 @@ import LocalSubprocessRuntime from '@deepseek-ai/dsh-subprocess-local' import { LocalBashExecutor } from '@deepseek-ai/dsh-bash-local' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { mkdtemp, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, resolve } from 'node:path' diff --git a/scripts/snapshot-spill-locators.spec.ts b/scripts/snapshot-spill-locators.spec.ts index 403c97a7dd..53d5cf0641 100644 --- a/scripts/snapshot-spill-locators.spec.ts +++ b/scripts/snapshot-spill-locators.spec.ts @@ -3,7 +3,7 @@ import { LocalSpillStore } from '@deepseek-ai/dsh-spill-local' import { LocalFileSystem } from '@deepseek-ai/dsh-fs-local' import type { SessionId } from '@deepseek-ai/dsh-session' import { brandString } from '@deepseek-ai/dsh-brand' -import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand' +import type { ToolCallId } from '@deepseek-ai/dsh-llm/types' import { mkdtemp, readFile, realpath, rm, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, resolve } from 'node:path' diff --git a/snapshots/web/details-session-lifecycle/sidebar.expected.md b/snapshots/web/details-session-lifecycle/sidebar.expected.md index f205ed9765..4607cf35ed 100644 --- a/snapshots/web/details-session-lifecycle/sidebar.expected.md +++ b/snapshots/web/details-session-lifecycle/sidebar.expected.md @@ -64,8 +64,8 @@ "columnTransition": "none", "expanded": true, "mode": "fullscreen", - "panelContentWidth": 1680, - "panelOuterWidth": 1680, + "panelContentWidth": 1681, + "panelOuterWidth": 1681, "coversViewport": true, "resizeHandleWidth": 0, "expandedDirectories": [], @@ -197,8 +197,8 @@ "columnTransition": "none", "expanded": true, "mode": "fullscreen", - "panelContentWidth": 1680, - "panelOuterWidth": 1680, + "panelContentWidth": 1681, + "panelOuterWidth": 1681, "coversViewport": true, "resizeHandleWidth": 0, "expandedDirectories": [], @@ -424,8 +424,8 @@ "columnTransition": "none", "expanded": true, "mode": "fullscreen", - "panelContentWidth": 767, - "panelOuterWidth": 767, + "panelContentWidth": 768, + "panelOuterWidth": 768, "coversViewport": true, "resizeHandleWidth": 0, "expandedDirectories": [], diff --git a/tsconfig.base.json b/tsconfig.base.json index 7155b1ccba..bc892d2ed3 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -92,7 +92,7 @@ "@deepseek-ai/dsh/profile-boot": ["./apps/cli/src/profile-boot.ts"], "@deepseek-ai/dsh/lib/bin.js": ["./apps/cli/src/bin.ts"], "@deepseek-ai/dsh-browser-use": ["./packages/browser-use/browser-use/src/index.ts"], - "@deepseek-ai/dsh-browser-use/brand": ["./packages/browser-use/browser-use/src/brand.ts"], + "@deepseek-ai/dsh-browser-use/types": ["./packages/browser-use/browser-use/src/types.ts"], "@deepseek-ai/dsh-experimental-browser-use-runtime": ["./packages/experimental/browser-use-runtime/src/index.ts"], "@deepseek-ai/dsh-experimental-browser-use-playwright-mcp": ["./packages/experimental/browser-use-playwright-mcp/src/index.ts"], "@deepseek-ai/dsh-experimental-browser-use-chrome-devtools-mcp": ["./packages/experimental/browser-use-chrome-devtools-mcp/src/index.ts"], @@ -109,7 +109,7 @@ "@deepseek-ai/dsh-ssh/schemas": ["./packages/ssh/ssh/src/schemas.ts"], "@deepseek-ai/dsh-subprocess-local/output": ["./packages/subprocess/subprocess-local/src/output.ts"], "@deepseek-ai/dsh-computer-use": ["./packages/computer-use/computer-use/src/index.ts"], - "@deepseek-ai/dsh-computer-use/brand": ["./packages/computer-use/computer-use/src/brand.ts"], + "@deepseek-ai/dsh-computer-use/types": ["./packages/computer-use/computer-use/src/types.ts"], "@deepseek-ai/dsh-experimental-computer-use-cua-driver-mcp": ["./packages/experimental/computer-use-cua-driver-mcp/src/index.ts"], "@deepseek-ai/dsh-cua-macos": ["./packages/experimental/cua-macos/src/index.ts"], "@deepseek-ai/dsh-cua-windows": ["./packages/experimental/cua-windows/src/index.ts"], @@ -199,7 +199,6 @@ "@deepseek-ai/dsh-goal/types": ["./packages/goal/goal/src/types.ts"], "@deepseek-ai/dsh-goal/client": ["./packages/goal/goal/src/client.ts"], "@deepseek-ai/dsh-llm/types": ["./packages/llm/llm/src/types.ts"], - "@deepseek-ai/dsh-llm/brand": ["./packages/llm/llm/src/brand.ts"], "@deepseek-ai/dsh-llm/assistant-stream": ["./packages/llm/llm/src/assistant-stream.ts"], "@deepseek-ai/dsh-deepseek-llm-api-extensions/types": ["./packages/llm/deepseek-llm-api-extensions/src/types.ts"], "@deepseek-ai/dsh-llm-retry/types": ["./packages/llm/llm-retry/src/types.ts"], @@ -207,9 +206,8 @@ "@deepseek-ai/dsh-tool-workflow/types": ["./packages/workflow/tool-workflow/src/types.ts"], "@deepseek-ai/dsh-llm/message": ["./packages/llm/llm/src/message.ts"], "@deepseek-ai/dsh-commands/builtin": ["./packages/interaction/commands/src/builtin.ts"], - "@deepseek-ai/dsh-commands/brand": ["./packages/interaction/commands/src/brand.ts"], "@deepseek-ai/dsh-commands/types": ["./packages/interaction/commands/src/types.ts"], - "@deepseek-ai/dsh-jobs/brand": ["./packages/jobs/jobs/src/brand.ts"], + "@deepseek-ai/dsh-jobs/types": ["./packages/jobs/jobs/src/types.ts"], "@deepseek-ai/dsh-jobs/view": ["./packages/jobs/jobs/src/view.ts"], "@deepseek-ai/dsh-credentials/types": ["./packages/credentials/credentials/src/types.ts"], "@deepseek-ai/dsh-authorization/types": ["./packages/credentials/authorization/src/types.ts"], @@ -225,7 +223,6 @@ "@deepseek-ai/dsh-tool-executor-ptc/client": ["./packages/core/tool-executor-ptc/src/client.ts"], "@deepseek-ai/dsh-tools/pipeline": ["./packages/core/tools/src/pipeline.ts"], "@deepseek-ai/dsh-tool-testkit": ["./packages/test-support/tool-testkit/src/index.ts"], - "@deepseek-ai/dsh-tools/presentation": ["./packages/core/tools/src/presentation.ts"], "@deepseek-ai/dsh-tool-subagent/model-selection-settings": ["./packages/subagent/tool-subagent/src/model-selection-settings.ts"], "@deepseek-ai/dsh-user-approval/types": ["./packages/interaction/user-approval/src/types.ts"], "@deepseek-ai/dsh-user-questions/types": ["./packages/interaction/user-questions/src/types.ts"],