@morlay/dsh-command 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 +21 -0
- package/README.md +11 -2
- package/dist/command-endpoint-D8Ze5gCZ.d.mts +72 -0
- package/dist/command-registry.service-CFFfpdoB.mjs +13 -0
- package/dist/command-registry.service-CVViz-lS.d.mts +18 -0
- package/dist/contract.d.mts +73 -0
- package/dist/contract.mjs +55 -0
- package/dist/decorate-g56z_1VW.mjs +8 -0
- package/dist/endpoint.d.mts +18 -0
- package/dist/endpoint.mjs +77 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +3 -0
- package/dist/server.d.mts +30 -0
- package/dist/server.mjs +99 -0
- package/dist/ui.d.mts +105 -0
- package/dist/ui.mjs +196 -0
- package/package.json +54 -3
- package/src/command-registry.service.ts +21 -0
- package/src/contract/command-catalog.contract.ts +13 -0
- package/src/contract/command-contribution.ts +17 -0
- package/src/contract/command-entry.ts +5 -0
- package/src/contract/command-registry.contract.ts +22 -0
- package/src/contract/command-runner.contract.ts +15 -0
- package/src/contract/command-ui.contract.ts +36 -0
- package/src/contract/command.decorator.ts +78 -0
- package/src/contract/index.ts +12 -0
- package/src/endpoint/command-endpoint.ts +113 -0
- package/src/endpoint/command-line.ts +32 -0
- package/src/endpoint/index.ts +11 -0
- package/src/index.ts +5 -0
- package/src/server/command-endpoint.service.ts +64 -0
- package/src/server/command-entry-of.ts +13 -0
- package/src/server/command-execution.ts +45 -0
- package/src/server/command.provide.ts +10 -0
- package/src/server/index.ts +16 -0
- package/src/server/registry-catalog.ts +30 -0
- package/src/server/registry-runner.ts +31 -0
- package/src/ui/command-endpoint.client.ts +84 -0
- package/src/ui/command-palette.store.ts +92 -0
- package/src/ui/command-palette.view.tsx +41 -0
- package/src/ui/command-ui.service.ts +13 -0
- package/src/ui/command.provide.ts +19 -0
- package/src/ui/conversation-input-overlay.slot.ts +8 -0
- package/src/ui/index.ts +11 -0
- package/src/ui/remote-command-catalog.ts +17 -0
- package/src/ui/remote-command-runner.ts +18 -0
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,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @morlay/dsh-command
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
命令注册表与斜杠命令的两半:谁能登记一条命令、模型与用户怎么触发它,各有各的面。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
- 导出:`CommandRegistry` / `CommandCatalog` / `CommandRunner` / `CommandContribution` 与 `@Command()` 装饰器;wire 契约在 `@morlay/dsh-command/endpoint`。
|
|
8
|
+
- 装配函数:宿主半 `provideCommand()`(`./server`)、浏览器半 `provideCommandUi()`(`./ui`)。本包不拥有装配清单。
|
|
9
|
+
|
|
10
|
+
## 设计
|
|
11
|
+
|
|
12
|
+
包内子域怎么分、契约与行各放哪,见[包内子域拆分与注册抽象](../.agents/designs/20261028-包内子域拆分与注册抽象.md)。
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AssertTrue, AssertWireFace } from "@morlay/zephyr-app/client";
|
|
2
|
+
import { AsyncReturn, DropParam, MapParam } from "@morlay/zephyr-app/typert";
|
|
3
|
+
import { Agent } from "@morlay/dsh-agent";
|
|
4
|
+
import { SessionId } from "@morlay/dsh-session/endpoint";
|
|
5
|
+
import CommandRuntime from "@deepseek-ai/dsh-commands";
|
|
6
|
+
import { CommandExecution, CommandSubmitAttachment } from "@deepseek-ai/dsh-commands/types";
|
|
7
|
+
import { CommandEntry } from "@morlay/dsh-command/contract";
|
|
8
|
+
import { CommandId } from "@deepseek-ai/dsh-commands/src/brand.ts";
|
|
9
|
+
/** `commands/list` 的请求。 */
|
|
10
|
+
interface CommandListRequest {
|
|
11
|
+
readonly sessionId: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* `commands/list` 的响应:**裸数组**。
|
|
15
|
+
*
|
|
16
|
+
* 消费方是上游 `ui-commands` 的目录(`const list = await ctx.remote.commands.list(id)` 之后直接迭代),
|
|
17
|
+
* 包一层 `{ commands }` 会让它报 `list is not iterable`。
|
|
18
|
+
*/
|
|
19
|
+
type CommandListValue = readonly CommandEntry[];
|
|
20
|
+
/**
|
|
21
|
+
* `commands/execute` 的响应:上游 `CommandExecution`(`commandId` 生命周期配对 id + 归一化结果)。
|
|
22
|
+
*
|
|
23
|
+
* **直接取上游那份**:手抄过一次(`commandId: string` 对 branded、`result` 手写联合),形状漂了只能靠
|
|
24
|
+
* 运行时发现。`result` 是判别式联合(`success` / `error`),消费方按 `kind` 分派。
|
|
25
|
+
*/
|
|
26
|
+
type CommandExecuteValue = CommandExecution;
|
|
27
|
+
/** `commands` 组:列目录、执行命令。 */
|
|
28
|
+
declare class CommandEndpoint {
|
|
29
|
+
/**
|
|
30
|
+
* 列出某个会话可见的命令。
|
|
31
|
+
*
|
|
32
|
+
* wire 是**一个位置参数** `{ sessionId }`:上游消费方(`ui-commands` 的目录)按
|
|
33
|
+
* `remote.commands.list(sessionId)` 传位置标量;声明了 `parameters` 之后宿主也按位置取。
|
|
34
|
+
* @param _sessionId - 会话 id(上游称 agent id)。
|
|
35
|
+
* @returns 目录(未知会话给空数组)。
|
|
36
|
+
*/
|
|
37
|
+
list(_sessionId: SessionId): Promise<CommandListValue>;
|
|
38
|
+
/**
|
|
39
|
+
* 执行一条命令。
|
|
40
|
+
*
|
|
41
|
+
* **wire 是三个位置参数**(`{ sessionId, line, submittedAttachments }`),不是"一个请求对象":
|
|
42
|
+
* 上游的消费方全都按位置调(`ui-commands` 的 `ctx.remote.commands.execute(sessionId, line, attachments)`、
|
|
43
|
+
* `ui-plan` 的 `execute(sessionId, '/plan off', [])`、会话面的 `execute(this.sessionId, line, [])`)。
|
|
44
|
+
* 之前这里没声明 `parameters`,descriptor 把第一个实参编成 `request`,于是整行与附件都丢了、
|
|
45
|
+
* 宿主只拿到一个字符串——真机上的症状是 `commands/execute: 缺少会话或命令名`。
|
|
46
|
+
* @param _sessionId - 目标会话(上游称 agent id)。
|
|
47
|
+
* @param _line - **整行**(`/plan off`):上游协议就是传整行,拆分在宿主侧做(`splitCommandLine`)。
|
|
48
|
+
* @param _submittedAttachments - 随命令提交的附件;本装配的命令都不消费它们(见债:命令附件未接线)。
|
|
49
|
+
* @returns 注册表给出的执行结果。
|
|
50
|
+
*/
|
|
51
|
+
execute(_sessionId: SessionId, _line: string, _submittedAttachments: readonly CommandSubmitAttachment[]): Promise<CommandExecuteValue | undefined>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* **上游 `commands` 的 wire 面**:从宿主类 `CommandRuntime` 投影出来,三步(规则与出处见
|
|
55
|
+
* `@morlay/zephyr-app/typert` 的 `params.ts`):`DropParam`(末尾 `signal` 走 cancellation)→
|
|
56
|
+
* `MapParam`(lookup:`Agent` → `SessionId`)→ `AsyncReturn`(wire 上每次调用都是异步的)。
|
|
57
|
+
*
|
|
58
|
+
* 业务类型只出现在这一行组合里——框架那三个工具不认识 `Agent` / `SessionId` / `AbortSignal`。
|
|
59
|
+
*/
|
|
60
|
+
type CommandsWire = AsyncReturn<MapParam<DropParam<CommandRuntime, AbortSignal>, Agent, SessionId>>;
|
|
61
|
+
/**
|
|
62
|
+
* 覆盖守卫:契约对上**宿主类**的 wire 面(见 {@link CommandsWire})。
|
|
63
|
+
*
|
|
64
|
+
* 这一组是自研 wire(不挂上游 descriptor:它的端点带 `scope`/`lookup`,本装配的载具不解析),但
|
|
65
|
+
* **调用形状**是上游的协议——签名漂了(像 `execute` 曾经漏掉 `parameters`、只收一个 `request`)就红。
|
|
66
|
+
*
|
|
67
|
+
* 部分覆盖:宿主类还有 `register` / `find` / `registerFileReceiptResolver` 这些**不进 wire** 的方法,所以
|
|
68
|
+
* 覆盖范围**显式列在下面的 `Pick` 里**(按 `keyof CommandEndpoint` 取会放过「契约掉了一个端点」这种退化)。
|
|
69
|
+
* `Pick` 还守住另一半:契约声明了宿主类没有的端点,它自己会报。
|
|
70
|
+
*/
|
|
71
|
+
type CommandEndpointCovered = AssertTrue<AssertWireFace<Pick<CommandsWire, "list" | "execute">, CommandEndpoint>>;
|
|
72
|
+
export { CommandListRequest as a, CommandId as i, CommandEndpointCovered as n, CommandListValue as o, CommandExecuteValue as r, CommandEndpoint as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import CommandRuntime from "@deepseek-ai/dsh-commands";
|
|
2
|
+
import { Injectable } from "@morlay/zephyr";
|
|
3
|
+
import { fromCordis } from "@morlay/zephyr/compat";
|
|
4
|
+
import { CommandRegistry } from "./contract.mjs";
|
|
5
|
+
import { t as __decorate } from "./decorate-g56z_1VW.mjs";
|
|
6
|
+
// src/command-registry.service.ts
|
|
7
|
+
let CommandRegistryDefault = class CommandRegistryDefault extends fromCordis(CommandRegistry, CommandRuntime) {
|
|
8
|
+
async onInit(ctx) {
|
|
9
|
+
await this.mount(ctx);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
CommandRegistryDefault = __decorate([Injectable()], CommandRegistryDefault);
|
|
13
|
+
export { CommandRegistryDefault as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CommandRuntime from "@deepseek-ai/dsh-commands";
|
|
2
|
+
import { Context } from "@morlay/zephyr";
|
|
3
|
+
import { CommandRegistry } from "./contract.mjs";
|
|
4
|
+
declare const CommandRegistryDefault_base: import("@morlay/zephyr/compat").AdaptedClass<typeof CommandRegistry, typeof CommandRuntime>;
|
|
5
|
+
/**
|
|
6
|
+
* 命令注册表的实现:直接复用上游 `CommandRuntime`(它就是这个注册表)。
|
|
7
|
+
*
|
|
8
|
+
* 两个名字各有出处,**互不干扰**:
|
|
9
|
+
* - 上游按 `ctx.inject(['commands'])` 找它(`permission-presets` 就这样注册 `/permission`)——
|
|
10
|
+
* 这条由 `mount` 的**双注册**满足:上游自己的 `provide`/`Service` 名字同时落到本行的 cordis ctx;
|
|
11
|
+
* - 我们自己的代码按令牌 `CommandRegistry` 注入它——这条由 `fromCordis(契约, 实现)` 绑定。
|
|
12
|
+
*
|
|
13
|
+
* 所以不需要"别名契约":一个实现兑现一个契约,另一个名字走上游自己的注册通道。
|
|
14
|
+
*/
|
|
15
|
+
declare class CommandRegistryDefault extends CommandRegistryDefault_base {
|
|
16
|
+
onInit(ctx: Context): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export { CommandRegistryDefault as t };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { CommandDescriptor as CommandEntry } from "@deepseek-ai/dsh-commands/types";
|
|
2
|
+
import { CommandInvocation, CommandResult } from "@morlay/dsh-command/server";
|
|
3
|
+
import { CommandFileReceiptResolver } from "@deepseek-ai/dsh-commands";
|
|
4
|
+
import { SessionId } from "@morlay/dsh-session/endpoint";
|
|
5
|
+
import { r as CommandExecuteValue } from "./command-endpoint-D8Ze5gCZ.mjs";
|
|
6
|
+
import { CommandContribution as CommandContribution$1, CommandDecoration } from "@deepseek-ai/dsh-client-ui-commands/client";
|
|
7
|
+
/** 一条命令:名字、一行说明、执行入口。 */
|
|
8
|
+
export interface CommandContribution {
|
|
9
|
+
/** `/name` 里的名字(不含斜杠;上游要求小写、字母开头)。 */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
/** 一行说明(发现面展示用,不能为空)。 */
|
|
12
|
+
readonly description: string;
|
|
13
|
+
/** 执行;返回的结果被注册表包成 `command/run` / `command/done` 事件。 */
|
|
14
|
+
readonly handler: (invocation: CommandInvocation) => CommandResult | Promise<CommandResult>;
|
|
15
|
+
}
|
|
16
|
+
export declare abstract class CommandRegistry {
|
|
17
|
+
/** 登记一条命令;返回**这一条**的撤销函数(`@Command()` 生成的登记在行卸载时调它)。 */
|
|
18
|
+
abstract register(contribution: CommandContribution): () => void;
|
|
19
|
+
/**
|
|
20
|
+
* 命令提交里「暂存文件回执」的唯一解析方(会话上传方装它,提交时按 id 换回附件引用)。
|
|
21
|
+
*
|
|
22
|
+
* 它和 `register` 是同一族:都是往注册表里**装一个面**。漏了它,上传行拿到的是空壳,
|
|
23
|
+
* 报错落在 `ctx.commands.registerFileReceiptResolver is not a function`(离这里很远)。
|
|
24
|
+
*/
|
|
25
|
+
abstract registerFileReceiptResolver(resolver: CommandFileReceiptResolver): () => void;
|
|
26
|
+
}
|
|
27
|
+
/** 命令目录:某个会话当前可见的命令。实现由组合层提供(host 直连、走 remote、或测试里的假实现)。 */
|
|
28
|
+
export declare abstract class CommandCatalog {
|
|
29
|
+
/** 拉一个会话可见的命令(实现方可缓存)。 */
|
|
30
|
+
abstract list(sessionId: SessionId): Promise<readonly CommandEntry[]>;
|
|
31
|
+
}
|
|
32
|
+
/** 执行一条命令(宿主侧 `commands/execute` 的端口)。 */
|
|
33
|
+
export declare abstract class CommandRunner {
|
|
34
|
+
/** 执行;找不到命令或执行失败以异常抛出,处理器自己结算的失败在 `result.kind` 上。 */
|
|
35
|
+
abstract run(sessionId: SessionId, name: string, input?: string): Promise<CommandExecuteValue>;
|
|
36
|
+
}
|
|
37
|
+
export declare abstract class CommandUi {
|
|
38
|
+
/**
|
|
39
|
+
* 登记一条客户端命令贡献(`/model` 的弹层就是这个)。
|
|
40
|
+
* @param contribution - 名字、可用性判断、弹层规格。
|
|
41
|
+
* @returns 撤销函数。
|
|
42
|
+
*/
|
|
43
|
+
abstract register(contribution: CommandContribution$1): () => void;
|
|
44
|
+
/**
|
|
45
|
+
* 给宿主已有的一条命令挂「裸调用时的弹层」(`/permission` 用这个)。
|
|
46
|
+
* @param decoration - 宿主命令名 + 可用性 + 弹层规格。
|
|
47
|
+
* @returns 撤销函数。
|
|
48
|
+
*/
|
|
49
|
+
abstract decorate(decoration: CommandDecoration): () => void;
|
|
50
|
+
/**
|
|
51
|
+
* 关掉某条命令的弹层(目录失效时用)。
|
|
52
|
+
* @param name - 命令名(不含斜杠)。
|
|
53
|
+
*/
|
|
54
|
+
abstract dismiss(name: string): void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 贡献类的构造面。
|
|
58
|
+
*
|
|
59
|
+
* 用 `any[]` 而不是 zephyr 的 `Newable`(`never[]`):TS 的混入规则(TS2545)要求被 `extends` 的
|
|
60
|
+
* 类型变量的构造是「单个 `any[]` rest 参数」,写成 `never[]` 或 `ConstructorParameters<T>` 都不认。
|
|
61
|
+
*/
|
|
62
|
+
type CommandClass<T> = new (...args: any[]) => T;
|
|
63
|
+
/**
|
|
64
|
+
* 把类声明成一条命令贡献:装配期登记进 `CommandRegistry`,行卸载时撤销。
|
|
65
|
+
*
|
|
66
|
+
* ```ts
|
|
67
|
+
* @Command()
|
|
68
|
+
* export class GoalCommand implements CommandContribution { … } // 包仍有自己的 module.ts
|
|
69
|
+
* ```
|
|
70
|
+
* @returns 类装饰器(返回绑好装配期登记的 Provider 子类)。
|
|
71
|
+
*/
|
|
72
|
+
export declare function Command(): <T extends CommandClass<CommandContribution>>(target: T) => T;
|
|
73
|
+
export type { CommandEntry };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Injectable, inject } from "@morlay/zephyr";
|
|
2
|
+
import { t as __decorate } from "./decorate-g56z_1VW.mjs";
|
|
3
|
+
// src/contract/command-registry.contract.ts
|
|
4
|
+
let CommandRegistry = class CommandRegistry {};
|
|
5
|
+
CommandRegistry = __decorate([Injectable({ name: "commands" })], CommandRegistry);
|
|
6
|
+
// src/contract/command-catalog.contract.ts
|
|
7
|
+
let CommandCatalog = class CommandCatalog {};
|
|
8
|
+
CommandCatalog = __decorate([Injectable()], CommandCatalog);
|
|
9
|
+
// src/contract/command-runner.contract.ts
|
|
10
|
+
let CommandRunner = class CommandRunner {};
|
|
11
|
+
CommandRunner = __decorate([Injectable()], CommandRunner);
|
|
12
|
+
// src/contract/command-ui.contract.ts
|
|
13
|
+
let CommandUi = class CommandUi {};
|
|
14
|
+
CommandUi = __decorate([Injectable({ name: "commandUi" })], CommandUi);
|
|
15
|
+
// src/contract/command.decorator.ts
|
|
16
|
+
/**
|
|
17
|
+
* 把类声明成一条命令贡献:装配期登记进 `CommandRegistry`,行卸载时撤销。
|
|
18
|
+
*
|
|
19
|
+
* ```ts
|
|
20
|
+
* @Command()
|
|
21
|
+
* export class GoalCommand implements CommandContribution { … } // 包仍有自己的 module.ts
|
|
22
|
+
* ```
|
|
23
|
+
* @returns 类装饰器(返回绑好装配期登记的 Provider 子类)。
|
|
24
|
+
*/
|
|
25
|
+
function Command() {
|
|
26
|
+
return (target) => {
|
|
27
|
+
const hooks = target.prototype;
|
|
28
|
+
class CommandProvider extends target {
|
|
29
|
+
constructor(...args) {
|
|
30
|
+
super(...args);
|
|
31
|
+
}
|
|
32
|
+
/** 注册表:构造期占位,装配期解析(`inject` 只在 Provider 自有的字段生效)。 */
|
|
33
|
+
registry = inject(CommandRegistry);
|
|
34
|
+
/** 这一条的撤销函数:`onDispose` 里调一次,行卸载即从注册表里摘掉。 */
|
|
35
|
+
release;
|
|
36
|
+
async onInit(ctx) {
|
|
37
|
+
await hooks.onInit?.call(this, ctx);
|
|
38
|
+
this.release = this.registry.register({
|
|
39
|
+
name: this.name,
|
|
40
|
+
description: this.description,
|
|
41
|
+
handler: (invocation) => this.handler(invocation)
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async onDispose() {
|
|
45
|
+
this.release?.();
|
|
46
|
+
this.release = void 0;
|
|
47
|
+
await hooks.onDispose?.call(this);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
Object.defineProperty(CommandProvider, "name", { value: target.name });
|
|
51
|
+
Injectable()(CommandProvider);
|
|
52
|
+
return CommandProvider;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export { Command, CommandCatalog, CommandRegistry, CommandRunner, CommandUi };
|
|
@@ -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,18 @@
|
|
|
1
|
+
import { a as CommandListRequest, i as CommandId, n as CommandEndpointCovered, o as CommandListValue, r as CommandExecuteValue, t as CommandEndpoint } from "./command-endpoint-D8Ze5gCZ.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* 由名字与输入拼出一行。
|
|
4
|
+
* @param name - 命令名(带不带前导 `/` 都行)。
|
|
5
|
+
* @param input - 名字后面的输入;`undefined` 与空串都表示没有。
|
|
6
|
+
* @returns 以 `/` 开头的命令行。
|
|
7
|
+
*/
|
|
8
|
+
export declare function commandLineOf(name: string, input?: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* 拆出一行的名字与输入(首个空格为界;名字不带前导 `/`)。
|
|
11
|
+
* @param line - 以 `/` 开头的命令行(没有前导 `/` 也按同一规则拆)。
|
|
12
|
+
* @returns 命令名(可能是空串:只有空白输入)与它后面的输入。
|
|
13
|
+
*/
|
|
14
|
+
export declare function splitCommandLine(line: string): {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly input: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
export { CommandEndpoint, CommandEndpointCovered, CommandExecuteValue, CommandId, CommandListRequest, CommandListValue };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { RemoteGroup, RemoteMethod } from "@morlay/zephyr-app/remote";
|
|
2
|
+
import { t as __decorate } from "./decorate-g56z_1VW.mjs";
|
|
3
|
+
// ../../../vendor/deepseek-harness/packages/interaction/commands/src/brand.ts
|
|
4
|
+
/**
|
|
5
|
+
* Brand a string as a {@link CommandId}.
|
|
6
|
+
* @param id - the executor-minted pairing id.
|
|
7
|
+
* @returns the same string, branded; no validation is performed.
|
|
8
|
+
*/
|
|
9
|
+
function CommandId(id) {
|
|
10
|
+
return id;
|
|
11
|
+
}
|
|
12
|
+
// src/endpoint/command-endpoint.ts
|
|
13
|
+
let CommandEndpoint = class CommandEndpoint {
|
|
14
|
+
/**
|
|
15
|
+
* 列出某个会话可见的命令。
|
|
16
|
+
*
|
|
17
|
+
* wire 是**一个位置参数** `{ sessionId }`:上游消费方(`ui-commands` 的目录)按
|
|
18
|
+
* `remote.commands.list(sessionId)` 传位置标量;声明了 `parameters` 之后宿主也按位置取。
|
|
19
|
+
* @param _sessionId - 会话 id(上游称 agent id)。
|
|
20
|
+
* @returns 目录(未知会话给空数组)。
|
|
21
|
+
*/
|
|
22
|
+
async list(_sessionId) {
|
|
23
|
+
throw new Error("commands/list:契约类未实现(宿主侧要在子类里实现它)");
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 执行一条命令。
|
|
27
|
+
*
|
|
28
|
+
* **wire 是三个位置参数**(`{ sessionId, line, submittedAttachments }`),不是"一个请求对象":
|
|
29
|
+
* 上游的消费方全都按位置调(`ui-commands` 的 `ctx.remote.commands.execute(sessionId, line, attachments)`、
|
|
30
|
+
* `ui-plan` 的 `execute(sessionId, '/plan off', [])`、会话面的 `execute(this.sessionId, line, [])`)。
|
|
31
|
+
* 之前这里没声明 `parameters`,descriptor 把第一个实参编成 `request`,于是整行与附件都丢了、
|
|
32
|
+
* 宿主只拿到一个字符串——真机上的症状是 `commands/execute: 缺少会话或命令名`。
|
|
33
|
+
* @param _sessionId - 目标会话(上游称 agent id)。
|
|
34
|
+
* @param _line - **整行**(`/plan off`):上游协议就是传整行,拆分在宿主侧做(`splitCommandLine`)。
|
|
35
|
+
* @param _submittedAttachments - 随命令提交的附件;本装配的命令都不消费它们(见债:命令附件未接线)。
|
|
36
|
+
* @returns 注册表给出的执行结果。
|
|
37
|
+
*/
|
|
38
|
+
async execute(_sessionId, _line, _submittedAttachments) {
|
|
39
|
+
throw new Error("commands/execute:契约类未实现(宿主侧要在子类里实现它)");
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
__decorate([RemoteMethod({ parameters: ["sessionId"] })], CommandEndpoint.prototype, "list", null);
|
|
43
|
+
__decorate([RemoteMethod({ parameters: [
|
|
44
|
+
"sessionId",
|
|
45
|
+
"line",
|
|
46
|
+
"submittedAttachments"
|
|
47
|
+
] })], CommandEndpoint.prototype, "execute", null);
|
|
48
|
+
CommandEndpoint = __decorate([RemoteGroup({ name: "commands" })], CommandEndpoint);
|
|
49
|
+
// src/endpoint/command-line.ts
|
|
50
|
+
/**
|
|
51
|
+
* 由名字与输入拼出一行。
|
|
52
|
+
* @param name - 命令名(带不带前导 `/` 都行)。
|
|
53
|
+
* @param input - 名字后面的输入;`undefined` 与空串都表示没有。
|
|
54
|
+
* @returns 以 `/` 开头的命令行。
|
|
55
|
+
*/
|
|
56
|
+
function commandLineOf(name, input) {
|
|
57
|
+
const bare = name.startsWith("/") ? name.slice(1) : name;
|
|
58
|
+
return input === void 0 || input === "" ? `/${bare}` : `/${bare} ${input}`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 拆出一行的名字与输入(首个空格为界;名字不带前导 `/`)。
|
|
62
|
+
* @param line - 以 `/` 开头的命令行(没有前导 `/` 也按同一规则拆)。
|
|
63
|
+
* @returns 命令名(可能是空串:只有空白输入)与它后面的输入。
|
|
64
|
+
*/
|
|
65
|
+
function splitCommandLine(line) {
|
|
66
|
+
const text = line.startsWith("/") ? line.slice(1) : line;
|
|
67
|
+
const separator = text.indexOf(" ");
|
|
68
|
+
if (separator === -1) return {
|
|
69
|
+
name: text,
|
|
70
|
+
input: void 0
|
|
71
|
+
};
|
|
72
|
+
return {
|
|
73
|
+
name: text.slice(0, separator),
|
|
74
|
+
input: text.slice(separator + 1)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export { CommandEndpoint, CommandId, commandLineOf, splitCommandLine };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Command, CommandCatalog, CommandContribution, CommandEntry, CommandRegistry, CommandRunner, CommandUi } from "./contract.mjs";
|
|
2
|
+
import { t as CommandRegistryDefault } from "./command-registry.service-CVViz-lS.mjs";
|
|
3
|
+
export { Command, CommandCatalog, CommandContribution, type CommandEntry, CommandRegistry, CommandRegistryDefault, CommandRunner, CommandUi };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Command, CommandCatalog, CommandRegistry, CommandRunner, CommandUi } from "./contract.mjs";
|
|
2
|
+
import { t as CommandRegistryDefault } from "./command-registry.service-CFFfpdoB.mjs";
|
|
3
|
+
export { Command, CommandCatalog, CommandRegistry, CommandRegistryDefault, CommandRunner, CommandUi };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SessionId } from "@morlay/dsh-session/endpoint";
|
|
2
|
+
import { CommandSubmitAttachment } from "@deepseek-ai/dsh-commands/types";
|
|
3
|
+
import { CommandEndpoint, CommandExecuteValue, CommandListValue } from "@morlay/dsh-command/endpoint";
|
|
4
|
+
import { OnInit } from "@morlay/zephyr";
|
|
5
|
+
import { CommandCatalog, CommandEntry, CommandRunner } from "@morlay/dsh-command/contract";
|
|
6
|
+
import { t as CommandRegistryDefault } from "./command-registry.service-CVViz-lS.mjs";
|
|
7
|
+
import { CommandDescriptor, CommandInvocation, CommandResult } from "@deepseek-ai/dsh-commands";
|
|
8
|
+
/** `commands` 组的宿主实现。 */
|
|
9
|
+
export declare class CommandEndpointDefault extends CommandEndpoint implements OnInit {
|
|
10
|
+
private readonly handlers;
|
|
11
|
+
private readonly registry;
|
|
12
|
+
private readonly agents;
|
|
13
|
+
onInit(): void;
|
|
14
|
+
list(sessionId: SessionId): Promise<CommandListValue>;
|
|
15
|
+
execute(sessionId: SessionId, line: string, _submittedAttachments: readonly CommandSubmitAttachment[]): Promise<CommandExecuteValue>;
|
|
16
|
+
}
|
|
17
|
+
/** 直连注册表的目录实现:按会话解析 agent 后取它的命令。 */
|
|
18
|
+
export declare class RegistryCatalog extends CommandCatalog {
|
|
19
|
+
private readonly registry;
|
|
20
|
+
private readonly agents;
|
|
21
|
+
list(sessionId: SessionId): Promise<readonly CommandEntry[]>;
|
|
22
|
+
}
|
|
23
|
+
/** 直连注册表的执行器实现:交给注册表自己的执行入口(它负责解析与生命周期事件)。 */
|
|
24
|
+
export declare class RegistryRunner extends CommandRunner {
|
|
25
|
+
private readonly registry;
|
|
26
|
+
private readonly agents;
|
|
27
|
+
run(sessionId: SessionId, name: string, input?: string): Promise<CommandExecuteValue>;
|
|
28
|
+
}
|
|
29
|
+
export declare const provideCommand: (...features: import("@morlay/zephyr").ProviderFeature[]) => readonly [typeof CommandRegistryDefault, typeof CommandEndpointDefault, import("@morlay/zephyr-app").RemoteDescriptorEntry];
|
|
30
|
+
export type { CommandDescriptor, CommandInvocation, CommandResult };
|
package/dist/server.mjs
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import "@morlay/dsh-session/endpoint";
|
|
2
|
+
import { AgentDirectory } from "@morlay/dsh-agent";
|
|
3
|
+
import { CommandEndpoint, CommandId, commandLineOf, splitCommandLine } from "@morlay/dsh-command/endpoint";
|
|
4
|
+
import { Injectable, inject, provide } from "@morlay/zephyr";
|
|
5
|
+
import { RemoteHandlers, remoteDescriptor } from "@morlay/zephyr-app";
|
|
6
|
+
import { RemoteGroup, registerRemoteGroup } from "@morlay/zephyr-app/remote";
|
|
7
|
+
import { t as CommandRegistryDefault } from "./command-registry.service-CFFfpdoB.mjs";
|
|
8
|
+
import { t as __decorate } from "./decorate-g56z_1VW.mjs";
|
|
9
|
+
import { CommandCatalog, CommandRunner } from "@morlay/dsh-command/contract";
|
|
10
|
+
// src/server/command-entry-of.ts
|
|
11
|
+
/**
|
|
12
|
+
* 一条命令的对外形状。
|
|
13
|
+
* @param descriptor - 上游 `CommandRuntime.list(agent)` 的返回项。
|
|
14
|
+
* @returns 同一份(类型是别名,不再手抄字段)。
|
|
15
|
+
*/
|
|
16
|
+
function commandEntryOf(descriptor) {
|
|
17
|
+
return descriptor;
|
|
18
|
+
}
|
|
19
|
+
// src/server/command-execution.ts
|
|
20
|
+
/**
|
|
21
|
+
* 执行一条命令。
|
|
22
|
+
* @param options - 注册表、agent、名字与输入、报错前缀。
|
|
23
|
+
* @returns 注册表的结算值(`commandId` + `result`);处理器自己结算的失败在 `result.kind` 上。
|
|
24
|
+
* @throws 名字解析不到时抛错(上游对语法错或未知名字返回 `undefined`)。
|
|
25
|
+
*/
|
|
26
|
+
async function runCommand(options) {
|
|
27
|
+
const line = options.line;
|
|
28
|
+
const execution = await options.registry.execute(options.agent, line, [], new AbortController().signal);
|
|
29
|
+
if (execution === void 0) throw new Error(`${options.where}: 没有命令 "${splitCommandLine(line).name}"`);
|
|
30
|
+
return execution;
|
|
31
|
+
}
|
|
32
|
+
// src/server/command-endpoint.service.ts
|
|
33
|
+
let CommandEndpointDefault = class CommandEndpointDefault extends CommandEndpoint {
|
|
34
|
+
handlers = inject(RemoteHandlers);
|
|
35
|
+
registry = inject(CommandRegistryDefault);
|
|
36
|
+
agents = inject(AgentDirectory);
|
|
37
|
+
onInit() {
|
|
38
|
+
registerRemoteGroup(this.handlers, this);
|
|
39
|
+
}
|
|
40
|
+
async list(sessionId) {
|
|
41
|
+
const agent = this.agents.get(sessionId);
|
|
42
|
+
if (agent === void 0) return [];
|
|
43
|
+
return this.registry.list(agent).map(commandEntryOf);
|
|
44
|
+
}
|
|
45
|
+
async execute(sessionId, line, _submittedAttachments) {
|
|
46
|
+
const agent = this.agents.get(sessionId);
|
|
47
|
+
if (agent === void 0) throw new Error(`commands/execute: 会话 "${sessionId}" 没有 agent`);
|
|
48
|
+
const { name } = splitCommandLine(line);
|
|
49
|
+
const execution = await runCommand({
|
|
50
|
+
registry: this.registry,
|
|
51
|
+
agent,
|
|
52
|
+
line,
|
|
53
|
+
where: "commands/execute"
|
|
54
|
+
});
|
|
55
|
+
if (execution === void 0) return {
|
|
56
|
+
commandId: CommandId(""),
|
|
57
|
+
result: {
|
|
58
|
+
kind: "error",
|
|
59
|
+
text: `没有命令 "${name}"`
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return execution;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
CommandEndpointDefault = __decorate([RemoteGroup()], CommandEndpointDefault);
|
|
66
|
+
// src/server/registry-catalog.ts
|
|
67
|
+
let RegistryCatalog = class RegistryCatalog extends CommandCatalog {
|
|
68
|
+
registry = inject(CommandRegistryDefault);
|
|
69
|
+
agents = inject(AgentDirectory);
|
|
70
|
+
async list(sessionId) {
|
|
71
|
+
const agent = this.agents.get(sessionId);
|
|
72
|
+
if (agent === void 0) return [];
|
|
73
|
+
return this.registry.list(agent).map(commandEntryOf);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
RegistryCatalog = __decorate([Injectable()], RegistryCatalog);
|
|
77
|
+
// src/server/registry-runner.ts
|
|
78
|
+
let RegistryRunner = class RegistryRunner extends CommandRunner {
|
|
79
|
+
registry = inject(CommandRegistryDefault);
|
|
80
|
+
agents = inject(AgentDirectory);
|
|
81
|
+
async run(sessionId, name, input) {
|
|
82
|
+
const agent = this.agents.get(sessionId);
|
|
83
|
+
if (agent === void 0) throw new Error(`commands: 会话 "${sessionId}" 没有 agent`);
|
|
84
|
+
return runCommand({
|
|
85
|
+
registry: this.registry,
|
|
86
|
+
agent,
|
|
87
|
+
line: commandLineOf(name, input),
|
|
88
|
+
where: "commands"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
RegistryRunner = __decorate([Injectable()], RegistryRunner);
|
|
93
|
+
// src/server/command.provide.ts
|
|
94
|
+
const provideCommand = provide([
|
|
95
|
+
CommandRegistryDefault,
|
|
96
|
+
CommandEndpointDefault,
|
|
97
|
+
remoteDescriptor(() => import("@deepseek-ai/dsh-commands/remote"))
|
|
98
|
+
]);
|
|
99
|
+
export { CommandEndpointDefault, RegistryCatalog, RegistryRunner, provideCommand };
|
package/dist/ui.d.mts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { CommandUi } from "./contract.mjs";
|
|
2
|
+
import * as UiCommandsPlugin from "@deepseek-ai/dsh-client-ui-commands/client";
|
|
3
|
+
import { CommandCatalog, CommandEntry, CommandRunner } from "@morlay/dsh-command/contract";
|
|
4
|
+
import { Remote, RemoteTransport, SlotViewBase } from "@morlay/zephyr-app/client";
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
|
+
import { CommandSubmitAttachment } from "@deepseek-ai/dsh-commands/types";
|
|
7
|
+
import { SessionId } from "@morlay/dsh-session/endpoint";
|
|
8
|
+
import { CommandEndpoint, CommandExecuteValue, CommandListValue } from "@morlay/dsh-command/endpoint";
|
|
9
|
+
import { Context, OnInit } from "@morlay/zephyr";
|
|
10
|
+
declare const CommandUiRow_base: import("@morlay/zephyr/compat").AdaptedClass<typeof CommandUi, typeof UiCommandsPlugin>;
|
|
11
|
+
/** 命令 UI 行的基类:mount 由基类给出,子类只补注入与 onInit。 */
|
|
12
|
+
export declare class CommandUiRow extends CommandUiRow_base {}
|
|
13
|
+
/** 一个会话的命令弹层状态。 */
|
|
14
|
+
interface CommandPaletteState {
|
|
15
|
+
readonly open: boolean;
|
|
16
|
+
readonly query: string;
|
|
17
|
+
readonly selected: number;
|
|
18
|
+
readonly entries: readonly CommandEntry[];
|
|
19
|
+
}
|
|
20
|
+
/** 命令弹层的状态机(视图通过 `useSyncExternalStore` 订阅)。 */
|
|
21
|
+
export declare class CommandPaletteStore {
|
|
22
|
+
private readonly catalog;
|
|
23
|
+
private readonly runner;
|
|
24
|
+
private readonly listeners;
|
|
25
|
+
private readonly states;
|
|
26
|
+
/** 一个会话的当前状态(没打开过就是关闭态)。 */
|
|
27
|
+
stateOf(sessionId: string): CommandPaletteState;
|
|
28
|
+
/** 订阅状态变化。 */
|
|
29
|
+
subscribe(listener: () => void): () => void;
|
|
30
|
+
/** 打开弹层(拉一次目录)。 */
|
|
31
|
+
open(sessionId: string): Promise<void>;
|
|
32
|
+
/** 关闭弹层。 */
|
|
33
|
+
close(sessionId: string): void;
|
|
34
|
+
/** 改过滤词(选中项回到第一个)。 */
|
|
35
|
+
setQuery(sessionId: string, query: string): void;
|
|
36
|
+
/** 在过滤后的列表里移动选中项(循环)。 */
|
|
37
|
+
move(sessionId: string, delta: number): void;
|
|
38
|
+
/** 过滤后的可见项:空查询给全部,否则按名字与说明做包含匹配。 */
|
|
39
|
+
visibleOf(state: CommandPaletteState): readonly CommandEntry[];
|
|
40
|
+
/** 执行选中项(执行完关闭;没有选中项时只关闭)。 */
|
|
41
|
+
run(sessionId: string): Promise<void>;
|
|
42
|
+
private patch;
|
|
43
|
+
}
|
|
44
|
+
/** 输入区浮层的位置(名字与上游 slot 名一致)。 */
|
|
45
|
+
export declare abstract class ConversationInputOverlaySlot extends SlotViewBase {}
|
|
46
|
+
/** 命令弹层:把 store 的会话状态渲染成列表,选中项带标记。 */
|
|
47
|
+
export declare class CommandPaletteView extends ConversationInputOverlaySlot {
|
|
48
|
+
private readonly palette;
|
|
49
|
+
render(): ReactNode;
|
|
50
|
+
}
|
|
51
|
+
/** `commands` 组的客户端契约实例。 */
|
|
52
|
+
export declare class CommandEndpointClient extends CommandEndpoint implements OnInit {
|
|
53
|
+
/** 转发目标:`remote.invoke`(wire 的命名参数由契约的 `parameters` 声明决定)。 */
|
|
54
|
+
protected readonly remote: Remote & import("@morlay/zephyr").Required<Remote>;
|
|
55
|
+
/** 传输:转发走它(我们的组不注册进上游 `remote`)。 */
|
|
56
|
+
protected readonly transport: RemoteTransport & import("@morlay/zephyr").Required<RemoteTransport>;
|
|
57
|
+
/**
|
|
58
|
+
* 挂上这一组的 descriptor:客户端形态**自己挂自己那一组**,不另开 binding 行。
|
|
59
|
+
*
|
|
60
|
+
* 面本身是给**上游消费方**用的(`ctx.remote.commands.execute(sessionId, line, attachments)`);
|
|
61
|
+
* 本仓自己的调用走下面的显式转发。
|
|
62
|
+
* @param ctx - 本行 ctx:disposer 挂在它上面,卸载随行 fiber。
|
|
63
|
+
*/
|
|
64
|
+
onInit(ctx: Context): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* 列目录:wire 是 `{ sessionId }`(一个位置参数)。
|
|
67
|
+
* @param sessionId - 目标会话。
|
|
68
|
+
* @returns 目录(未知会话给空数组)。
|
|
69
|
+
*/
|
|
70
|
+
list(sessionId: SessionId): Promise<CommandListValue>;
|
|
71
|
+
/**
|
|
72
|
+
* 执行一条命令:wire 是 `{ sessionId, line, submittedAttachments }`(三个扁平字段)。
|
|
73
|
+
* @param sessionId - 目标会话。
|
|
74
|
+
* @param line - 整行(`/plan off`)。
|
|
75
|
+
* @param submittedAttachments - 随命令提交的附件(本装配不消费,仍按协议传)。
|
|
76
|
+
* @returns 注册表给出的执行结果。
|
|
77
|
+
*/
|
|
78
|
+
execute(sessionId: SessionId, line: string, submittedAttachments: readonly CommandSubmitAttachment[]): Promise<CommandExecuteValue>;
|
|
79
|
+
/**
|
|
80
|
+
* 一次 unary 调用:端点名由组名(契约上的 `@RemoteGroup`)与方法名拼出,不另写字符串表。
|
|
81
|
+
* @param method - 方法名。
|
|
82
|
+
* @param args - wire 的命名参数。
|
|
83
|
+
* @returns 宿主给的原样值。
|
|
84
|
+
*/
|
|
85
|
+
private invoke;
|
|
86
|
+
}
|
|
87
|
+
/** 走 remote 的命令目录。 */
|
|
88
|
+
export declare class RemoteCommandCatalog extends CommandCatalog {
|
|
89
|
+
private readonly endpoint;
|
|
90
|
+
list(sessionId: SessionId): Promise<readonly CommandEntry[]>;
|
|
91
|
+
}
|
|
92
|
+
/** 走 remote 的命令执行器。 */
|
|
93
|
+
export declare class RemoteCommandRunner extends CommandRunner {
|
|
94
|
+
private readonly endpoint;
|
|
95
|
+
run(sessionId: SessionId, name: string, input?: string): Promise<CommandExecuteValue>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* command 的浏览器半:RPC 客户端 + 目录/执行器的远端实现 + 命令 UI 行 + 弹层的 store 与视图。
|
|
99
|
+
*
|
|
100
|
+
* 顺序 = 依赖:端点客户端先(其余都经它走 wire);`commands` 的 namespace 面由它的 `onInit` 挂上
|
|
101
|
+
* (没有单独的绑定行),因此它要排在消费方之前——上游 `ui-commands` 的 `static inject` 里有
|
|
102
|
+
* `remote.commands`(那一行在会话域的输入区组里装,因为它的头一项依赖是 `inputTriggers`)。
|
|
103
|
+
*/
|
|
104
|
+
export declare const provideCommandUi: (...features: import("@morlay/zephyr").ProviderFeature[]) => readonly [typeof CommandEndpointClient, typeof RemoteCommandCatalog, typeof RemoteCommandRunner, typeof CommandPaletteStore];
|
|
105
|
+
export { type CommandPaletteState, CommandUi };
|