@morlay/dsh-timeline 0.0.0-stage → 0.2.0-alpha.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 morlay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # @morlay/dsh-timeline
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 上游实验包 `@deepseek-ai/dsh-timeline`(任务树 / 进度条 / 定时报告)的两条装配行。
4
+
5
+ ## 用法
6
+
7
+ ```ts
8
+ // 宿主半
9
+ import { provideTimeline } from "@morlay/dsh-timeline";
10
+ // 浏览器半
11
+ import { provideTimelineUi } from "@morlay/dsh-timeline/ui";
12
+ ```
13
+
14
+ ## 事实
15
+
16
+ - 这是**行**不是模块:两半各一个 `fromCordis(上游插件)` 的适配行,不发布服务(产出全是副作用:工具 / 命令 / 投影 / 报告 / 页签 / dock)。
17
+ - 宿主半 `TimelineDefault` 把上游 `inject` 的六个名字交进 `mount` 的 deps:`agents` / `sessions` / `sessionProjections` / `tools` / `llm` / `systemPrompt`(全部是同名契约令牌)。给 deps 是为了让内核排出依赖边、缺谁在装配期点名;只靠 store 就退化成「必须排在提供者之后」的隐式约定。
18
+ - 浏览器半 `TimelineUi` 同理交七个:`slots` / `locale` / `sidebarRightTabs` / `sidebarRight` / `configForms` / `connection` / `sessions`。
19
+ - 配置一律走上游 `Config` 的 schema 默认值(`fromCordis` 用 `Config({})` 规范化),本包**不加 `configure`**。
20
+ - 工具名固定为 `timeline_tree` / `timeline_tasks` / `timeline_pull` / `timeline_read` / `timeline_reply`;命令名 `timeline`;右栏页签 kind `timeline`。
21
+
22
+ ## 已知副作用(不是 bug)
23
+
24
+ 本部署**故意不提供插件市场**(`@deepseek-ai/dsh-client-ui-plugin-manager`),于是:
25
+
26
+ 1. timeline 的**设置表单无处可去** —— 它注册进 slot `plugins.bundle.config`,而那个 slot 由插件市场页的 `main` 注册声明。其余界面(右栏页签 / 输入区 dock / 工具卡)都在。
27
+ 2. 那份 config form 因此恒 `unavailable`,`autoOpenSidebar`(第一棵任务树出现时自动开右栏)**不会触发**;要它生效得让 Host 服务 `timeline-experimental` 这个 settings 命名空间,那不在本包。
28
+
29
+ ## 构建(新建同类包时照这条)
30
+
31
+ `pnpm exec devkit build --filter @morlay/dsh-timeline` 要 `target/dts` 里已有本包的 `src/index.d.ts`:
32
+ **新包第一次构建前先跑 `just dts`**,否则报 `声明缺失: target/dts/packages/…/src/index.d.ts(先跑 target/dts 的全仓声明生成)`。
33
+ 声明树是产物、不进 git(见[如何写的「包出口」一节](../../../.agents/standards/how-to-write.md)),
34
+ 所以新建包或改了 `exports` 面之后的第一次构建,都要先让声明树认得这个入口。
35
+
36
+ ## 上游状态
37
+
38
+ `@deepseek-ai/dsh-timeline` 在 `packages/experimental/`:发布不等于提升,**没有稳定性承诺**。
@@ -0,0 +1,8 @@
1
+ // \0@oxc-project+runtime@0.160.0/helpers/esm/decorate.js
2
+ function __decorate(decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ }
8
+ export { __decorate as t };
@@ -0,0 +1,21 @@
1
+ import * as TimelinePlugin from "@deepseek-ai/dsh-timeline";
2
+ import { Context } from "@morlay/zephyr";
3
+ declare const TimelineDefault_base: import("@morlay/zephyr/compat").AdaptedClass<import("@morlay/zephyr").TokenClass<unknown>, typeof TimelinePlugin>;
4
+ /** timeline 的宿主半行。 */
5
+ export declare class TimelineDefault extends TimelineDefault_base {
6
+ private readonly agents;
7
+ private readonly sessions;
8
+ private readonly projections;
9
+ private readonly tools;
10
+ private readonly llm;
11
+ private readonly systemPrompt;
12
+ onInit(ctx: Context): Promise<void>;
13
+ }
14
+ /**
15
+ * 装 timeline 的宿主半(工具 / 命令 / 投影 / 定时报告)。
16
+ *
17
+ * 装配面要 `without(TimelineDefault)` 时按实现类定位,所以实现类也从这里出。
18
+ * @returns provider 清单。
19
+ */
20
+ export declare const provideTimeline: (...features: import("@morlay/zephyr").ProviderFeature[]) => readonly [typeof TimelineDefault];
21
+ export {};
package/dist/index.mjs ADDED
@@ -0,0 +1,35 @@
1
+ import { Injectable, inject, provide } from "@morlay/zephyr";
2
+ import * as TimelinePlugin from "@deepseek-ai/dsh-timeline";
3
+ import { fromCordis } from "@morlay/zephyr/compat";
4
+ import { AgentDirectory, Llm, SystemPrompt, ToolRegistry } from "@morlay/dsh-agent";
5
+ import { SessionProjectionStore, SessionStore } from "@morlay/dsh-session";
6
+ import { t as __decorate } from "./decorate-g56z_1VW.mjs";
7
+ // src/timeline.service.ts
8
+ let TimelineDefault = class TimelineDefault extends fromCordis(TimelinePlugin) {
9
+ agents = inject(AgentDirectory);
10
+ sessions = inject(SessionStore);
11
+ projections = inject(SessionProjectionStore);
12
+ tools = inject(ToolRegistry);
13
+ llm = inject(Llm);
14
+ systemPrompt = inject(SystemPrompt);
15
+ async onInit(ctx) {
16
+ await this.mount(ctx, void 0, {
17
+ agents: this.agents,
18
+ sessions: this.sessions,
19
+ sessionProjections: this.projections,
20
+ tools: this.tools,
21
+ llm: this.llm,
22
+ systemPrompt: this.systemPrompt
23
+ });
24
+ }
25
+ };
26
+ TimelineDefault = __decorate([Injectable()], TimelineDefault);
27
+ // src/index.ts
28
+ /**
29
+ * 装 timeline 的宿主半(工具 / 命令 / 投影 / 定时报告)。
30
+ *
31
+ * 装配面要 `without(TimelineDefault)` 时按实现类定位,所以实现类也从这里出。
32
+ * @returns provider 清单。
33
+ */
34
+ const provideTimeline = provide([TimelineDefault]);
35
+ export { TimelineDefault, provideTimeline };
package/dist/ui.d.mts ADDED
@@ -0,0 +1,22 @@
1
+ import * as TimelineClientPlugin from "@deepseek-ai/dsh-timeline/client";
2
+ import { Context } from "@morlay/zephyr";
3
+ declare const TimelineUi_base: import("@morlay/zephyr/compat").AdaptedClass<import("@morlay/zephyr").TokenClass<unknown>, typeof TimelineClientPlugin>;
4
+ /** timeline 的浏览器半行。 */
5
+ export declare class TimelineUi extends TimelineUi_base {
6
+ private readonly slots;
7
+ private readonly locale;
8
+ private readonly sidebarRightTabs;
9
+ private readonly sidebarRight;
10
+ private readonly configForms;
11
+ private readonly connection;
12
+ private readonly sessions;
13
+ onInit(ctx: Context): Promise<void>;
14
+ }
15
+ /**
16
+ * 装 timeline 的浏览器半(右栏页签 / 输入区 dock / 工具卡)。
17
+ *
18
+ * 装配面要 `without(TimelineUi)` 时按实现类定位,所以实现类也从这里出。
19
+ * @returns provider 清单。
20
+ */
21
+ export declare const provideTimelineUi: (...features: import("@morlay/zephyr").ProviderFeature[]) => readonly [typeof TimelineUi];
22
+ export {};
package/dist/ui.mjs ADDED
@@ -0,0 +1,37 @@
1
+ import { Injectable, inject, provide } from "@morlay/zephyr";
2
+ import * as TimelineClientPlugin from "@deepseek-ai/dsh-timeline/client";
3
+ import { fromCordis } from "@morlay/zephyr/compat";
4
+ import { ClientConnection, ConfigForms, Locale, SidebarRight, SidebarRightTabs, Slots } from "@morlay/zephyr-app/client";
5
+ import { SessionController } from "@morlay/dsh-session/endpoint";
6
+ import { t as __decorate } from "./decorate-g56z_1VW.mjs";
7
+ // src/ui/timeline-ui.service.ts
8
+ let TimelineUi = class TimelineUi extends fromCordis(TimelineClientPlugin) {
9
+ slots = inject(Slots);
10
+ locale = inject(Locale);
11
+ sidebarRightTabs = inject(SidebarRightTabs);
12
+ sidebarRight = inject(SidebarRight);
13
+ configForms = inject(ConfigForms);
14
+ connection = inject(ClientConnection);
15
+ sessions = inject(SessionController);
16
+ async onInit(ctx) {
17
+ await this.mount(ctx, void 0, {
18
+ slots: this.slots,
19
+ locale: this.locale,
20
+ sidebarRightTabs: this.sidebarRightTabs,
21
+ sidebarRight: this.sidebarRight,
22
+ configForms: this.configForms,
23
+ connection: this.connection,
24
+ sessions: this.sessions
25
+ });
26
+ }
27
+ };
28
+ TimelineUi = __decorate([Injectable()], TimelineUi);
29
+ // src/ui/index.ts
30
+ /**
31
+ * 装 timeline 的浏览器半(右栏页签 / 输入区 dock / 工具卡)。
32
+ *
33
+ * 装配面要 `without(TimelineUi)` 时按实现类定位,所以实现类也从这里出。
34
+ * @returns provider 清单。
35
+ */
36
+ const provideTimelineUi = provide([TimelineUi]);
37
+ export { TimelineUi, provideTimelineUi };
package/package.json CHANGED
@@ -1,6 +1,43 @@
1
1
  {
2
2
  "name": "@morlay/dsh-timeline",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0-alpha.0",
4
+ "private": false,
5
+ "description": "上游实验包 timeline 的装配行:任务树 / 进度条 / 定时报告(宿主半 + 浏览器半)。",
6
+ "files": [
7
+ "dist",
8
+ "src",
9
+ "!**/__tests__"
10
+ ],
11
+ "type": "module",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.mts",
15
+ "default": "./dist/index.mjs"
16
+ },
17
+ "./ui": {
18
+ "types": "./dist/ui.d.mts",
19
+ "default": "./dist/ui.mjs"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "dependencies": {
24
+ "@deepseek-ai/dsh-timeline": "^0.2.3-alpha.3",
25
+ "@morlay/dsh-agent": "^0.2.0-alpha.0",
26
+ "@morlay/dsh-session": "^0.2.0-alpha.0",
27
+ "@morlay/zephyr": "^0.2.0-alpha.0",
28
+ "@morlay/zephyr-app": "^0.2.0-alpha.0"
29
+ },
30
+ "devDependencies": {
31
+ "@morlay/dsh-session-persistence": "^0.2.0-alpha.0",
32
+ "@morlay/dsh-setting": "^0.2.0-alpha.0"
33
+ },
34
+ "engines": {
35
+ "dsh": ">= 0.2.3-alpha.3 < 0.2.4"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/morlay/zephyr.git",
40
+ "directory": "packages/agent/dsh-timeline"
41
+ },
42
+ "scripts": {}
6
43
  }
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
1
+ // 宿主半的装配出口:一行。
2
+ import { provide } from "@morlay/zephyr";
3
+ import { TimelineDefault } from "./timeline.service.ts";
4
+
5
+ /**
6
+ * 装 timeline 的宿主半(工具 / 命令 / 投影 / 定时报告)。
7
+ *
8
+ * 装配面要 `without(TimelineDefault)` 时按实现类定位,所以实现类也从这里出。
9
+ * @returns provider 清单。
10
+ */
11
+ export const provideTimeline = provide([TimelineDefault]);
12
+
13
+ export { TimelineDefault } from "./timeline.service.ts";
@@ -0,0 +1,39 @@
1
+ // 上游 timeline(实验包)的宿主半:任务树 / 进度条 / 定时报告。
2
+ //
3
+ // 只做装配行:上游 `inject` 的六个名字按名字交进 `mount` 的 deps(我们的令牌就是同名契约),
4
+ // 于是内核能给这一行排出依赖边(拓扑序)、缺谁在装配期点名。配置走上游 `Config` 的 schema 默认值
5
+ // (`fromCordis` 拿 `{}` 过一遍 schema),本行不加 `configure`。
6
+ //
7
+ // 这一行不发布服务:它的产出全是副作用(工具 / 命令 / 投影 / 报告 / 提示),所以没有契约令牌。
8
+ import * as TimelinePlugin from "@deepseek-ai/dsh-timeline";
9
+ import { inject, Injectable, type Context } from "@morlay/zephyr";
10
+ import { fromCordis } from "@morlay/zephyr/compat";
11
+ import { AgentDirectory, Llm, SystemPrompt, ToolRegistry } from "@morlay/dsh-agent";
12
+ import { SessionProjectionStore, SessionStore } from "@morlay/dsh-session";
13
+
14
+ /** timeline 的宿主半行。 */
15
+ @Injectable()
16
+ export class TimelineDefault extends fromCordis(TimelinePlugin) {
17
+ private readonly agents = inject(AgentDirectory);
18
+
19
+ private readonly sessions = inject(SessionStore);
20
+
21
+ private readonly projections = inject(SessionProjectionStore);
22
+
23
+ private readonly tools = inject(ToolRegistry);
24
+
25
+ private readonly llm = inject(Llm);
26
+
27
+ private readonly systemPrompt = inject(SystemPrompt);
28
+
29
+ override async onInit(ctx: Context): Promise<void> {
30
+ await this.mount(ctx, undefined, {
31
+ agents: this.agents,
32
+ sessions: this.sessions,
33
+ sessionProjections: this.projections,
34
+ tools: this.tools,
35
+ llm: this.llm,
36
+ systemPrompt: this.systemPrompt,
37
+ });
38
+ }
39
+ }
@@ -0,0 +1,13 @@
1
+ // 浏览器半的装配出口:一行。
2
+ import { provide } from "@morlay/zephyr";
3
+ import { TimelineUi } from "./timeline-ui.service.ts";
4
+
5
+ /**
6
+ * 装 timeline 的浏览器半(右栏页签 / 输入区 dock / 工具卡)。
7
+ *
8
+ * 装配面要 `without(TimelineUi)` 时按实现类定位,所以实现类也从这里出。
9
+ * @returns provider 清单。
10
+ */
11
+ export const provideTimelineUi = provide([TimelineUi]);
12
+
13
+ export { TimelineUi } from "./timeline-ui.service.ts";
@@ -0,0 +1,48 @@
1
+ // 上游 timeline 的浏览器半:右栏页签(任务树)+ 输入区进度 dock + 工具卡。
2
+ //
3
+ // 上游 `inject` 的七个名字按名字交进 `mount` 的 deps,理由同宿主半:给依赖边,不靠清单位置。
4
+ // **不装 `@deepseek-ai/dsh-client-ui-plugin-manager`**:那是插件市场页,本部署故意没有;
5
+ // 它在 timeline 里只是 `import type {}`(类型合并),运行期零边。缺它的唯一后果是本行的设置表单
6
+ // 无处可去(slot `plugins.bundle.config` 由那个页面声明),其余全在。
7
+ import * as TimelineClientPlugin from "@deepseek-ai/dsh-timeline/client";
8
+ import { inject, Injectable, type Context } from "@morlay/zephyr";
9
+ import { fromCordis } from "@morlay/zephyr/compat";
10
+ import {
11
+ ClientConnection,
12
+ ConfigForms,
13
+ Locale,
14
+ SidebarRight,
15
+ SidebarRightTabs,
16
+ Slots,
17
+ } from "@morlay/zephyr-app/client";
18
+ import { SessionController } from "@morlay/dsh-session/endpoint";
19
+
20
+ /** timeline 的浏览器半行。 */
21
+ @Injectable()
22
+ export class TimelineUi extends fromCordis(TimelineClientPlugin) {
23
+ private readonly slots = inject(Slots);
24
+
25
+ private readonly locale = inject(Locale);
26
+
27
+ private readonly sidebarRightTabs = inject(SidebarRightTabs);
28
+
29
+ private readonly sidebarRight = inject(SidebarRight);
30
+
31
+ private readonly configForms = inject(ConfigForms);
32
+
33
+ private readonly connection = inject(ClientConnection);
34
+
35
+ private readonly sessions = inject(SessionController);
36
+
37
+ override async onInit(ctx: Context): Promise<void> {
38
+ await this.mount(ctx, undefined, {
39
+ slots: this.slots,
40
+ locale: this.locale,
41
+ sidebarRightTabs: this.sidebarRightTabs,
42
+ sidebarRight: this.sidebarRight,
43
+ configForms: this.configForms,
44
+ connection: this.connection,
45
+ sessions: this.sessions,
46
+ });
47
+ }
48
+ }