Sync current schedule integration into Team UI layer

This commit is contained in:
Dudu-0223 committed 2026-10-29 18:22:55 +08:00
commit 997fc4b05e
251 files changed
+19848 -19104

No files matched your search

+22
View File
@@ -214,6 +214,7 @@ describe('client bundle purity gate', () => {
expect(resolveId('@deepseek-ai/dsh-session/surface')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-brand')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-deque')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-util-time')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-util-values')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-token-meter/client')).toBeNull()
expect(() => resolveId('@deepseek-ai/dsh-token-meter')).toThrow(/purity/)
@@ -227,6 +228,27 @@ describe('client bundle purity gate', () => {
expect(() => resolveId('@deepseek-ai/dsh-plugin-manager/registry/internal')).toThrow(/purity/)
})
it('omits unused RRULE code from a Cron-only browser import', async () => {
const builds = await build({
config: false, platform: 'browser', format: ['esm'], entry: ['cron-only'],
write: false, clean: false, exports: false, report: false, logLevel: 'silent',
plugins: [{
name: 'cron-only',
resolveId: id => id === 'cron-only' ? id : null,
load: id => id === 'cron-only'
? `export { Cron } from ${JSON.stringify(join(packageDir('util/time'), 'src/index.ts'))}` : null,
}],
})
try {
const modules = builds.flatMap(bundle => bundle.chunks).flatMap(chunk => chunk.type === 'chunk' ? chunk.moduleIds : [])
.map(id => id.replaceAll('\\', '/'))
expect(modules.some(id => id.endsWith('/time/src/cron.ts'))).toBe(true)
expect(modules.some(id => id.includes('/rrule'))).toBe(false)
} finally {
for (const bundle of builds) await bundle[Symbol.asyncDispose]()
}
})
it('admits only the pure spill notice entry, not its Host policy', () => {
expect(resolveId('@deepseek-ai/dsh-spill-policy/notice')).toBeNull()
expect(resolveId('@deepseek-ai/dsh-output-retention')).toBeNull()
+2 -2
View File
@@ -48,9 +48,9 @@ const MAX_DECL_CHARS = 1200
* share that hands down a subsystem instead of a share, and prose that grew
* into a manual. Every report also lists one line per standard prop seat of its
* scope, so the widest Session-scope slot (`tool.call.toolview`, with the
* global and Session access seats) sets the current 123.
* global and Session access seats) sets the current 125.
*/
const MAX_ENTRY_LINES = 123
const MAX_ENTRY_LINES = 125
/** One register-call option as the catalog teaches it. */
interface OptionDoc {
+12 -4
View File
@@ -611,13 +611,21 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
ScheduleDeliveryHistoryResult: 'schedule.md',
ScheduleCreateRequest: 'schedule.md',
ScheduleListRequest: 'schedule.md',
ScheduleDeleteRequest: 'schedule.md',
ScheduleDeleteResult: 'schedule.md',
ScheduleDeleteInactiveResult: 'schedule.md',
ScheduleTimingChange: 'schedule.md',
ScheduleUpdateRequest: 'schedule.md',
ScheduleUpdateResult: 'schedule.md',
ScheduleRecord: 'schedule.md',
ScheduleEditResult: 'schedule.md',
ScheduleListResult: 'schedule.md',
ScheduleRunResult: 'schedule.md',
ScheduleViewResult: 'schedule.md',
ScheduleViewRequest: 'schedule.md',
SchedulePatch: 'schedule.md',
ScheduleEditRequest: 'schedule.md',
ScheduleRunRequest: 'schedule.md',
ScheduleConflictResult: 'schedule.md',
ScheduleSessionCreateSpec: 'schedule.md',
ScheduleTarget: 'schedule.md',
ScheduleTargetRequest: 'schedule.md',
DailyInput: 'schedule.md',
DailyScheduleRecord: 'schedule.md',
RecurringScheduleRecord: 'schedule.md',
+1 -1
View File
@@ -710,7 +710,7 @@ const SERVICE_ROLES: ServiceRole[] = [
pkg: 'schedule',
title: 'Host scheduled messages',
mode: 'core',
note: 'Stores tasks independently of Session activation and queues due messages in the original Session.',
note: 'Stores tasks independently of Session activation and queues due messages in each task\'s target Session.',
},
{
key: 'goals',
+11 -10
View File
@@ -64,7 +64,7 @@ import TerminalSessionService from '@deepseek-ai/dsh-terminal'
import * as ToolPty from '@deepseek-ai/dsh-tool-terminal'
import * as ToolGoal from '@deepseek-ai/dsh-tool-goal'
import * as ToolSchedule from '@deepseek-ai/dsh-tool-schedule'
import type ScheduleService from '@deepseek-ai/dsh-schedule'
import ScheduleService from '@deepseek-ai/dsh-schedule'
import Lsp from '@deepseek-ai/dsh-lsp'
import * as ToolLsp from '@deepseek-ai/dsh-tool-lsp'
import * as ToolSkill from '@deepseek-ai/dsh-tool-skill'
@@ -477,20 +477,21 @@ const TOOL_PACKAGES: ToolPackage[] = [
pkg: '@deepseek-ai/dsh-tool-schedule',
dir: 'tool-schedule',
source: 'packages/schedule/tool-schedule/src/index.ts',
requires: ['ctx.tools', 'ctx.schedule'],
requires: ['ctx.tools', 'ctx.schedule', 'ctx.systemPrompt'],
writes: ['tool/call', 'Schedule storage domain create, update, or delete', 'tool/result'],
async mount(ctx) {
// Schema harvest never executes a tool, so the Host service is a
// declaration-only stub.
ctx.provide('schedule', {} as ScheduleService)
// Schema harvest never executes a tool, so the Host service is a stub that answers only the read of the
// default delivery limits, which the target description names when above the minimum.
ctx.provide('schedule', {
deliveryLimits: () => ({ newSessionIntervalSeconds: ScheduleService.Config({}).newSessionIntervalSeconds }),
} as ScheduleService)
await ctx.plugin(ToolSchedule)
},
note:
'A preset or Agent scope mounts this package; the preset decides which agents receive the four '
+ 'management tools. Each call acts on the calling Agent\'s Session. '
+ 'Accepts after_seconds, explicit absolute at, bounded fixed-rate every_seconds, daily and weekly '
+ 'local times in an explicit IANA zone, and cron as a five-field expression. '
+ 'Management uses the Host storage domain; due messages resume the original Session.',
'A preset or Agent scope mounts this package and decides which agents receive its tools. '
+ 'Management reads and writes Host tasks by id across Sessions. '
+ 'Tasks store an RFC 5545 recurrence and an existing, first-created-and-reused, or per-run-new Session target. '
+ 'Delegated subagents cannot call these tools.',
},
{
pkg: '@deepseek-ai/dsh-tool-lsp',
+5 -5
View File
@@ -88,8 +88,8 @@ describe('product identifiers', () => {
'apps/cli/tests/optional-bundle-transitions.e2e.ts',
'apps/web/tests/agent-preset-selection.e2e.ts',
'apps/web/tests/developer-tools-settings.e2e.ts',
'docs/subsystems/schedule.md',
'docs/subsystems/schedule.zh.md',
'docs/subsystems/extensions.md',
'docs/subsystems/extensions.zh.md',
'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md',
'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md',
'docs/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md',
@@ -177,7 +177,7 @@ describe('product identifiers', () => {
})
it('rewrites multiline fenced imports while preserving prose and fenced product data', () => {
const file = 'docs/subsystems/schedule.md'
const file = 'docs/subsystems/extensions.md'
const text = "The `cordis` preset.\n```ts\nconst preset = 'cordis'\nimport {\n Context,\n} from 'cordis'\n```\n"
const scoped = "The `cordis` preset.\n```ts\nconst preset = 'cordis'\nimport {\n Context,\n} from '@deepseek-ai/cordis'\n```\n"
expectRoundTrip(file, text, scoped, 1)
@@ -188,7 +188,7 @@ describe('product identifiers', () => {
const scoped = `# The 'cordis' preset.\n- name: ${name.replace('cordis', '@deepseek-ai/cordis')} # 'cordis' stays product data\n`
for (const [file, wrap] of [
['packages/bundle/web-app/cordis.patch.yml', (value: string) => value],
['docs/subsystems/schedule.md', (value: string) => `The \`cordis\` preset.\n\`\`\`yaml\n${value}\`\`\`\n`],
['docs/subsystems/extensions.md', (value: string) => `The \`cordis\` preset.\n\`\`\`yaml\n${value}\`\`\`\n`],
] as const) {
expectRoundTrip(file, wrap(text), wrap(scoped), 1)
}
@@ -215,7 +215,7 @@ describe('product identifiers', () => {
})
it.each(['```ts\n```\n', "```ts\nimport 'cordis'\n"])('keeps fence line counts without requiring a closing fence', (text) => {
const file = 'docs/subsystems/schedule.md'
const file = 'docs/subsystems/extensions.md'
const scoped = text.replace("import 'cordis'", "import '@deepseek-ai/cordis'")
expectRoundTrip(file, text, scoped, scoped === text ? 0 : 1)
})
-2
View File
@@ -109,8 +109,6 @@ const GENERIC_SKIPS: readonly GenericSkip[] = [
{ file: 'apps/cli/tests/optional-bundle-transitions.e2e.ts', upstream: ['cordis'] },
{ file: 'apps/web/tests/agent-preset-selection.e2e.ts', upstream: ['cordis'] },
{ file: 'apps/web/tests/developer-tools-settings.e2e.ts', upstream: ['cordis'] },
{ file: 'docs/subsystems/schedule.md', upstream: ['cordis'] },
{ file: 'docs/subsystems/schedule.zh.md', upstream: ['cordis'] },
{ file: 'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.md', upstream: ['cordis'] },
{ file: 'docs/upgrade-guide/v0.2.0-rc.2/schedule-bundle-retired/guide.zh.md', upstream: ['cordis'] },
{ file: 'docs/upgrade-guide/v0.2.1-alpha.1/subagent-preset-composition/guide.md', upstream: ['cordis'] },
@@ -61,9 +61,9 @@
"read",
"read_image",
"schedule_create",
"schedule_delete",
"schedule_edit",
"schedule_list",
"schedule_update",
"schedule_view",
"send_message",
"skill",
"subagent",
@@ -124,9 +124,9 @@
"read",
"read_image",
"schedule_create",
"schedule_delete",
"schedule_edit",
"schedule_list",
"schedule_update",
"schedule_view",
"send_message",
"skill",
"snapshot_ping",
@@ -202,9 +202,9 @@
"read",
"read_image",
"schedule_create",
"schedule_delete",
"schedule_edit",
"schedule_list",
"schedule_update",
"schedule_view",
"send_message",
"skill",
"subagent",
-170
View File
@@ -302,176 +302,6 @@
"symbol": "GoalChanged",
"source": "packages/goal/goal/src/domain.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "AfterScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "AtScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "EveryScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "DailyInput",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "DailyScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "RecurringScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "LegacyScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteInactiveResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "LocalAtInput",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "AtInput",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "OneShotScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryReceipt",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryRecord",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleTimingChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleUpdateRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleUpdateResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryHistoryRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "DeliveryRetentionBounds",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryHistoryResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleCatalogEntry",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleCreateChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "OneShotScheduleDispatchChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "EveryScheduleDispatchChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDispatchChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleChange",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleState",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeliveryMode",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleView",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleCreateRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleListRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteRequest",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/schedule.md",
"symbol": "ScheduleDeleteResult",
"source": "packages/schedule/schedule/src/types.ts"
},
{
"doc": "docs/subsystems/agent-team.md",
"symbol": "TeamTaskView",