@deepseek-ai/dsh-schedule 0.1.5-rc.2 → 0.1.6-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +8 -8
- package/lib/invariant.js +1 -1
- package/lib/types/index.js +1 -0
- package/lib/types/invariant.d.ts +1 -1
- package/lib/types/invariant.js +4 -1
- package/lib/types/runtime.js +1 -0
- package/lib/types/tools.js +1 -0
- package/package.json +21 -21
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/schedule/schedule/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 962c343111849ef20fd085dbe8ba454e57a78f8b
|
|
6
|
+
README.zh.md: 8913bc53d68ad2eb7406f1ce6780d69ec522b956
|
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ The package rests on one separation and three commitments:
|
|
|
94
94
|
| [`src/projection.ts`](src/projection.ts) | Optional seed-aware Session projection and strict checkpoint schema |
|
|
95
95
|
| [`src/client.ts`](src/client.ts) | Browser-safe type-only `ScheduleRecord` export |
|
|
96
96
|
| [`src/transaction.ts`](src/transaction.ts) | Agent-scoped serialization for reads and durable mutations |
|
|
97
|
-
| [`src/invariant.ts`](src/invariant.ts) |
|
|
97
|
+
| [`src/invariant.ts`](src/invariant.ts) | `schedule-invariant` companion at `./invariant`, applying replay policy to existing logs and candidate events |
|
|
98
98
|
|
|
99
99
|
### Durable state and replay
|
|
100
100
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
Schedule 让你向模型请求持久提醒;提醒会作为普通 follow-up 消息返回同一会话。你可以创建延时或绝对时间的一次性提醒、按固定间隔重复提醒、列出待处理提醒,也可以取消提醒。提醒在重启后仍然存在,但交付需要 live 根 agent
|
|
12
|
+
Schedule 让你向模型请求持久提醒;提醒会作为普通 follow-up 消息返回同一会话。你可以创建延时或绝对时间的一次性提醒、按固定间隔重复提醒、列出待处理提醒,也可以取消提醒。提醒在重启后仍然存在,但交付需要 live 根 agent(智能体):已关闭的会话会让提醒保持逾期,直到恢复。交付绝不会使用电子邮件、短信、推送或浏览器通知。启用 Schedule overlay 即可提供提醒工具和活动提醒目录;侧边栏闹钟只是已知活动提醒的尽力而为指示,不证明提醒交付当前正在运行。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -71,14 +71,14 @@ dsh web --patch apps/cli/config/examples/schedule/cordis.yml
|
|
|
71
71
|
|
|
72
72
|
Time-context 不是 Schedule 的依赖。官方 Web overlay 挂载 `@deepseek-ai/dsh-time-context`,让模型能够按浏览器请求本地时区解释自然语言;但模型仍必须向 `schedule_create` 传入显式偏移量或 `time_zone`;Schedule 绝不会从模型上下文导入或推断该值。
|
|
73
73
|
|
|
74
|
-
Session projection 是可选能力。`ctx.sessionProjections` 存在时,插件会注册严格的 `schedule` 单元并公开完整的活动 `ScheduleRecord[]`;不带注册表的 headless 组合仍保留相同工具与 runtime
|
|
74
|
+
Session projection 是可选能力。`ctx.sessionProjections` 存在时,插件会注册严格的 `schedule` 单元并公开完整的活动 `ScheduleRecord[]`;不带注册表的 headless 组合仍保留相同工具与 runtime。浏览器安全的记录词汇可从纯类型导出 `@deepseek-ai/dsh-schedule/client` 获取。随附 Web bundle 通过 disabled row 解析 `ui-schedule`,显式 Schedule overlay 再与 Host Schedule 服务一起启用该 row。
|
|
75
75
|
|
|
76
76
|
### 设计理念
|
|
77
77
|
|
|
78
78
|
本包建立在一个分离与三项承诺之上:
|
|
79
79
|
|
|
80
80
|
- **会话日志拥有状态。** 版本 1 的 `schedule/change` 事件是唯一持久权威;timer、工具值与 follow-up 都是从折叠结果重建的可丢弃投影。
|
|
81
|
-
- **严格回放。** 解码器拒绝未知版本、额外字段、重复使用的 id、形状不匹配的 dispatch
|
|
81
|
+
- **严格回放。** 解码器拒绝未知版本、额外字段、重复使用的 id、形状不匹配的 dispatch 以及针对非活动记录的转换,因此损坏的流会明确报错,而不是派生出错误视图。
|
|
82
82
|
- **先持久化再决策。** 每项读取或决策都等待共享的会话 flush barrier,create 与 delete 只在第二个 post-append barrier 之后才确认。
|
|
83
83
|
- **仅限会话本地交付。** 没有外部渠道、没有 cold 会话调度器、也没有回执:到期工作进入同一会话,否则保持活动。
|
|
84
84
|
|
|
@@ -92,9 +92,9 @@ Session projection 是可选能力。`ctx.sessionProjections` 存在时,插件
|
|
|
92
92
|
| [`src/runtime.ts`](src/runtime.ts) | live timer owner:maintenance 认领、follow-up、dispatch barrier |
|
|
93
93
|
| [`src/persistence.ts`](src/persistence.ts) | Schedule 对共享会话持久化 barrier 的使用 |
|
|
94
94
|
| [`src/projection.ts`](src/projection.ts) | 可选的 seed-aware Session projection 与严格检查点 schema |
|
|
95
|
-
| [`src/client.ts`](src/client.ts) | 浏览器安全的纯类型 `ScheduleRecord`
|
|
95
|
+
| [`src/client.ts`](src/client.ts) | 浏览器安全的纯类型 `ScheduleRecord` 导出 |
|
|
96
96
|
| [`src/transaction.ts`](src/transaction.ts) | 读取与持久变更的 agent 范围串行化 |
|
|
97
|
-
| [`src/invariant.ts`](src/invariant.ts) | `./invariant` 配套模块,对现有日志与候选事件应用回放策略 |
|
|
97
|
+
| [`src/invariant.ts`](src/invariant.ts) | 位于 `./invariant` 的 `schedule-invariant` 配套模块,对现有日志与候选事件应用回放策略 |
|
|
98
98
|
|
|
99
99
|
### 持久状态与回放
|
|
100
100
|
|
|
@@ -104,7 +104,7 @@ Session projection 是可选能力。`ctx.sessionProjections` 存在时,插件
|
|
|
104
104
|
|
|
105
105
|
可选的 `schedule` projection 将 `{ inheritedEventCount, active, seenIds }` 作为严格的纯 JSON 检查点,并且只发布完整的 `active` 数组。其 schema 复用持久 Schedule decoder,拒绝重复或不一致的 id,并让损坏的持久事件通过既有 Session 读取失败传播,而不是发布部分目录。live 惰性构建、事件驱动构建、cold restore、history 读取与 detached Subagent 读取都使用精确 Session 切点与同一套自有后缀 transition。
|
|
106
106
|
|
|
107
|
-
projection 只携带持久记录。它不持久化或传输 scheduled/overdue 状态、本地化文本、相对时间、浏览器本地时间、排序状态、popover 状态、runtime 存活或交付回执。[`dsh-client-ui-schedule`](../../client/ui-schedule/README.zh.md) 从完整数组与查看方浏览器时钟派生目录呈现。[`dsh-client-ui-workspace`](../../client/ui-workspace/README.zh.md) 只派生列表值是否为非空数组,因此持久 projection cache
|
|
107
|
+
projection 只携带持久记录。它不持久化或传输 scheduled/overdue 状态、本地化文本、相对时间、浏览器本地时间、排序状态、popover 状态、runtime 存活或交付回执。[`dsh-client-ui-schedule`](../../client/ui-schedule/README.zh.md) 从完整数组与查看方浏览器时钟派生目录呈现。[`dsh-client-ui-workspace`](../../client/ui-workspace/README.zh.md) 只派生列表值是否为非空数组,因此持久 projection cache 缺失或陈旧时,普通行与搜索行中的闹钟可能短暂漏显或残留。
|
|
108
108
|
|
|
109
109
|
### 时间校验
|
|
110
110
|
|
|
@@ -209,7 +209,7 @@ reminders_json: <JSON.stringify(reminders)>
|
|
|
209
209
|
<a id="known-limitations-and-deferred-work"></a>
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
这些限制说明 Schedule
|
|
212
|
+
这些限制说明 Schedule 何时不适合你的使用场景,或何时需要在运维中特别注意。它们是当前包约束,不是通用提醒服务对比或任务积压。
|
|
213
213
|
|
|
214
214
|
- **仅限会话本地交付**——提醒只有在原会话 live 时才能准时运行;cold 会话不会收到外部通知,只有恢复后才会处理逾期记录。
|
|
215
215
|
- **活动驱动的重试**——到期 preflight 被拒绝或 framing/入队失败被收容后,记录仍保持活动,但不会启动私有重试 timer;后续 agent 活动或成功的 Schedule preflight 会触发重新计算。
|
|
@@ -218,7 +218,7 @@ reminders_json: <JSON.stringify(reminders)>
|
|
|
218
218
|
- **只追赶最新一次**——逾期 Every 记录只贡献其最新一个到期发生时点,因此 Schedule 绝不会回放因错过间隔而形成的积压。
|
|
219
219
|
- **存在狭窄的崩溃重复窗口**——同步 follow-up 获得准入后、dispatch 检查点完成前发生崩溃,可能使提醒重复;本包不承诺模型完成、用户确认或副作用恰好执行一次。
|
|
220
220
|
- **加载顺序边界**——插件不会扫描或接管加载时已经 live 的 agent。
|
|
221
|
-
- **目录只是只读当前状态**——可选 Web
|
|
221
|
+
- **目录只是只读当前状态**——可选 Web 界面没有历史记录,也不具备变更、重试或确认语义;终结记录会消失,交付仍然是普通对话输出。
|
|
222
222
|
|
|
223
223
|
<a id="dev-note"></a>
|
|
224
224
|
### 开发备注
|
package/lib/invariant.js
CHANGED
|
@@ -272,7 +272,7 @@ function foldScheduleEvents(events, inheritedEventCount = SessionLogOffset(0)) {
|
|
|
272
272
|
*/
|
|
273
273
|
const PACKAGE_NAME = "@deepseek-ai/dsh-schedule";
|
|
274
274
|
/** Cordis invariant-companion plugin name. */
|
|
275
|
-
const name = "
|
|
275
|
+
const name = "schedule-invariant";
|
|
276
276
|
/** Service required before reserving this package's invariant ownership. */
|
|
277
277
|
const inject = ["invariants"];
|
|
278
278
|
/** Validate a complete exact-session stream under its fork suffix policy. */
|
package/lib/types/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export function apply(ctx) {
|
|
|
26
26
|
const cleanup = agent.ctx.effect(() => {
|
|
27
27
|
const disposeTools = registerScheduleTools(ctx, agent.ctx, agent, () => { runtime.requestDrive(); });
|
|
28
28
|
const stopStatus = agent.ctx.on('agent/status', ({ status }) => {
|
|
29
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
29
30
|
if (status === 'idle' && agent.session.snapshotEvents().some(event => event.type === 'schedule/change')) {
|
|
30
31
|
runtime.requestDrive();
|
|
31
32
|
}
|
package/lib/types/invariant.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { Context } from '@deepseek-ai/cordis';
|
|
6
6
|
/** Cordis invariant-companion plugin name. */
|
|
7
|
-
export declare const name = "
|
|
7
|
+
export declare const name = "schedule-invariant";
|
|
8
8
|
/** Service required before reserving this package's invariant ownership. */
|
|
9
9
|
export declare const inject: string[];
|
|
10
10
|
/**
|
package/lib/types/invariant.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { foldScheduleEvents, ScheduleLogError } from "./domain.js";
|
|
6
6
|
const PACKAGE_NAME = '@deepseek-ai/dsh-schedule';
|
|
7
7
|
/** Cordis invariant-companion plugin name. */
|
|
8
|
-
export const name = '
|
|
8
|
+
export const name = 'schedule-invariant';
|
|
9
9
|
/** Service required before reserving this package's invariant ownership. */
|
|
10
10
|
export const inject = ['invariants'];
|
|
11
11
|
/** Validate a complete exact-session stream under its fork suffix policy. */
|
|
@@ -24,9 +24,11 @@ function validate(events, fail) {
|
|
|
24
24
|
/** Install replay and pre-append validation for the owned event stream. */
|
|
25
25
|
const install = Object.assign((ctx, fail) => {
|
|
26
26
|
for (const session of ctx.sessions.list()) {
|
|
27
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
27
28
|
validate(session.ownEvents(), fail);
|
|
28
29
|
}
|
|
29
30
|
ctx.on('session/created', (session) => {
|
|
31
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
30
32
|
validate(session.ownEvents(), fail);
|
|
31
33
|
}, { global: true });
|
|
32
34
|
ctx.on('internal/dispatch', (_mode, eventName, args) => {
|
|
@@ -35,6 +37,7 @@ const install = Object.assign((ctx, fail) => {
|
|
|
35
37
|
const [session, event] = args;
|
|
36
38
|
if (event.type !== 'schedule/change')
|
|
37
39
|
return;
|
|
40
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
38
41
|
validate([...session.ownEvents(), event], fail);
|
|
39
42
|
}, { global: true });
|
|
40
43
|
}, { inject: ['sessions'] });
|
package/lib/types/runtime.js
CHANGED
|
@@ -164,6 +164,7 @@ export class ScheduleRuntime {
|
|
|
164
164
|
/** Fold the current exact runtime suffix and contain a corrupt durable stream. */
|
|
165
165
|
readFolded() {
|
|
166
166
|
try {
|
|
167
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
167
168
|
return foldScheduleEvents(this.agent.session.ownEvents());
|
|
168
169
|
}
|
|
169
170
|
catch (error) {
|
package/lib/types/tools.js
CHANGED
|
@@ -161,6 +161,7 @@ function inputError(error) {
|
|
|
161
161
|
/** Fold only after a successful preflight, mapping corruption to a stable value. */
|
|
162
162
|
function foldForTool(agent) {
|
|
163
163
|
try {
|
|
164
|
+
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
164
165
|
return foldScheduleEvents(agent.session.ownEvents());
|
|
165
166
|
}
|
|
166
167
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-schedule",
|
|
3
3
|
"description": "Agent-scoped durable after, at, and fixed-rate reminders over the session event log",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
],
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-session-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
40
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.6-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
|
|
48
48
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
55
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
57
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-brand": "^0.1.
|
|
59
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-session
|
|
62
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
55
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
|
|
59
|
+
"@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
61
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
62
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.6-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-session-persistence": "^0.1.6-alpha.1",
|
|
67
67
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
68
68
|
}
|
|
69
69
|
}
|