@yoooclaw/cli 0.1.9 → 0.2.0-beta.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.md +13 -305
- package/bin/yc.js +52 -0
- package/package.json +25 -55
- package/LICENSE +0 -21
- package/dist/bin.cjs +0 -14836
- package/dist/bin.cjs.map +0 -115
- package/dist/command-tree.d.ts +0 -40
- package/dist/context.d.ts +0 -19
- package/dist/errors.d.ts +0 -71
- package/dist/index.cjs +0 -14833
- package/dist/index.cjs.map +0 -114
- package/dist/index.d.ts +0 -8
- package/dist/output/format.d.ts +0 -18
- package/dist/paths.d.ts +0 -30
- package/dist/program.d.ts +0 -14
- package/dist/version.d.ts +0 -3
- package/skills/yoooclaw-lightrule-create/SKILL.md +0 -63
- package/skills/yoooclaw-notification-query/SKILL.md +0 -71
- package/skills/yoooclaw-recording-entity-extraction/SKILL.md +0 -121
- package/skills/yoooclaw-recording-interview/SKILL.md +0 -112
- package/skills/yoooclaw-recording-meeting-minutes/SKILL.md +0 -92
- package/skills/yoooclaw-recording-mindmap/SKILL.md +0 -142
- package/skills/yoooclaw-recording-query/SKILL.md +0 -145
- package/skills/yoooclaw-recording-translation/SKILL.md +0 -130
- package/skills/yoooclaw-tunnel-debug/SKILL.md +0 -63
package/dist/command-tree.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 命令树声明 —— Service-oriented,对齐 lark-cli 形态与本仓 PRD「命令树总览」。
|
|
3
|
-
*
|
|
4
|
-
* 这是命令树的**单一事实来源**:program.ts 据此构建 commander 程序(结构 + options),
|
|
5
|
-
* 实现体由 commands/registry.ts 按 path 提供;未注册的 path 回落 notImplemented 占位。
|
|
6
|
-
*
|
|
7
|
-
* daemon 依赖标记(仅文档用途,体现在 summary 里):
|
|
8
|
-
* 🟢 不需要 daemon 🟡 需要 daemon 在跑 🔵 进程类(管理 daemon 自身)
|
|
9
|
-
*/
|
|
10
|
-
export interface OptionSpec {
|
|
11
|
-
/** commander flags,如 `--from <iso8601>`、`--follow` */
|
|
12
|
-
flags: string;
|
|
13
|
-
summary: string;
|
|
14
|
-
/** 默认值(仅对带值的 option 有意义) */
|
|
15
|
-
default?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface SubcommandSpec {
|
|
18
|
-
/** 子命令名 + 位置参数,如 `show <id>`、`api <method> <path>` */
|
|
19
|
-
name: string;
|
|
20
|
-
summary: string;
|
|
21
|
-
options?: OptionSpec[];
|
|
22
|
-
}
|
|
23
|
-
export interface ShortcutSpec {
|
|
24
|
-
/** 含 `+` 前缀的快捷命令名,如 `+today` */
|
|
25
|
-
name: string;
|
|
26
|
-
summary: string;
|
|
27
|
-
options?: OptionSpec[];
|
|
28
|
-
}
|
|
29
|
-
export interface ServiceSpec {
|
|
30
|
-
name: string;
|
|
31
|
-
summary: string;
|
|
32
|
-
/** 子命令列表。leaf 命令(直接执行,无子命令)省略此项并提供 `args`。 */
|
|
33
|
-
subcommands?: SubcommandSpec[];
|
|
34
|
-
/** leaf 命令的位置参数,如 `[keyword]`、`<method> <path>`。 */
|
|
35
|
-
args?: string;
|
|
36
|
-
/** leaf 命令的 options。 */
|
|
37
|
-
options?: OptionSpec[];
|
|
38
|
-
shortcuts?: ShortcutSpec[];
|
|
39
|
-
}
|
|
40
|
-
export declare const COMMAND_TREE: ServiceSpec[];
|
package/dist/context.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type ProfilePaths } from "./paths.js";
|
|
2
|
-
import { type OutputFormat } from "./output/format.js";
|
|
3
|
-
export interface GlobalFlags {
|
|
4
|
-
profile?: string;
|
|
5
|
-
format?: string;
|
|
6
|
-
quiet?: boolean;
|
|
7
|
-
color?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface CliContext {
|
|
10
|
-
profile: string;
|
|
11
|
-
paths: ProfilePaths;
|
|
12
|
-
format: OutputFormat;
|
|
13
|
-
quiet: boolean;
|
|
14
|
-
color: boolean;
|
|
15
|
-
}
|
|
16
|
-
/** 解析当前 active profile:--profile > $YOOOCLAW_PROFILE > active-profile 文件 > default。 */
|
|
17
|
-
export declare function resolveActiveProfile(flagProfile?: string): string;
|
|
18
|
-
/** 把全局 flags 物化成贯穿命令的 CliContext。 */
|
|
19
|
-
export declare function buildContext(flags: GlobalFlags): CliContext;
|
package/dist/errors.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 结构化错误码 —— 进入半正式契约,命名前缀统一 `YOOOCLAW_*`。
|
|
3
|
-
* 命令失败时统一以 `{ ok: false, error: { code, message, ... } }` 输出(见 output/format.ts)。
|
|
4
|
-
*/
|
|
5
|
-
export declare const ErrorCode: {
|
|
6
|
-
/** 通用 / 未归类错误 */
|
|
7
|
-
readonly UNKNOWN: "YOOOCLAW_UNKNOWN";
|
|
8
|
-
/** 参数校验失败 */
|
|
9
|
-
readonly INVALID_ARGUMENT: "YOOOCLAW_INVALID_ARGUMENT";
|
|
10
|
-
/** 该命令尚未实现(脚手架阶段占位) */
|
|
11
|
-
readonly NOT_IMPLEMENTED: "YOOOCLAW_NOT_IMPLEMENTED";
|
|
12
|
-
/** daemon 未运行 */
|
|
13
|
-
readonly DAEMON_NOT_RUNNING: "YOOOCLAW_DAEMON_NOT_RUNNING";
|
|
14
|
-
/** daemon 已在运行(单例保护) */
|
|
15
|
-
readonly DAEMON_ALREADY_RUNNING: "YOOOCLAW_DAEMON_ALREADY_RUNNING";
|
|
16
|
-
/** 鉴权失败 / token 不一致 */
|
|
17
|
-
readonly UNAUTHORIZED: "YOOOCLAW_UNAUTHORIZED";
|
|
18
|
-
/** 配置缺失或非法 */
|
|
19
|
-
readonly CONFIG_INVALID: "YOOOCLAW_CONFIG_INVALID";
|
|
20
|
-
/** profile 不存在 */
|
|
21
|
-
readonly PROFILE_NOT_FOUND: "YOOOCLAW_PROFILE_NOT_FOUND";
|
|
22
|
-
/** 图片尚未下载完成 */
|
|
23
|
-
readonly IMAGE_NOT_READY: "YOOOCLAW_IMAGE_NOT_READY";
|
|
24
|
-
/** 资源未找到 */
|
|
25
|
-
readonly NOT_FOUND: "YOOOCLAW_NOT_FOUND";
|
|
26
|
-
/** 资源已存在(如 profile 重名) */
|
|
27
|
-
readonly ALREADY_EXISTS: "YOOOCLAW_ALREADY_EXISTS";
|
|
28
|
-
/** 存储目录不可用 */
|
|
29
|
-
readonly STORAGE_UNAVAILABLE: "YOOOCLAW_STORAGE_UNAVAILABLE";
|
|
30
|
-
/** 凭据缺失 */
|
|
31
|
-
readonly CREDENTIAL_MISSING: "YOOOCLAW_CREDENTIAL_MISSING";
|
|
32
|
-
/** OS keychain 不可用 */
|
|
33
|
-
readonly KEYCHAIN_UNAVAILABLE: "YOOOCLAW_KEYCHAIN_UNAVAILABLE";
|
|
34
|
-
/** api-key label 不合法 */
|
|
35
|
-
readonly APIKEY_LABEL_INVALID: "YOOOCLAW_APIKEY_LABEL_INVALID";
|
|
36
|
-
/** api-key label 已存在 */
|
|
37
|
-
readonly APIKEY_LABEL_DUPLICATE: "YOOOCLAW_APIKEY_LABEL_DUPLICATE";
|
|
38
|
-
/** api-key label 不存在 */
|
|
39
|
-
readonly APIKEY_LABEL_NOT_FOUND: "YOOOCLAW_APIKEY_LABEL_NOT_FOUND";
|
|
40
|
-
/** multi-key 模式不支持 keychain 写入 */
|
|
41
|
-
readonly KEYCHAIN_MULTI_UNSUPPORTED: "YOOOCLAW_KEYCHAIN_MULTI_UNSUPPORTED";
|
|
42
|
-
/** tunnel label 不存在 */
|
|
43
|
-
readonly TUNNEL_LABEL_NOT_FOUND: "YOOOCLAW_TUNNEL_LABEL_NOT_FOUND";
|
|
44
|
-
/** 网络 / 出站调用失败 */
|
|
45
|
-
readonly NETWORK_ERROR: "YOOOCLAW_NETWORK_ERROR";
|
|
46
|
-
/** 操作被用户取消或需要确认 */
|
|
47
|
-
readonly CONFIRMATION_REQUIRED: "YOOOCLAW_CONFIRMATION_REQUIRED";
|
|
48
|
-
/** 需要 TTY 交互但当前非交互环境 */
|
|
49
|
-
readonly NOT_INTERACTIVE: "YOOOCLAW_NOT_INTERACTIVE";
|
|
50
|
-
};
|
|
51
|
-
export type ErrorCodeValue = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
52
|
-
export interface YoooclawErrorDetails {
|
|
53
|
-
hint?: string;
|
|
54
|
-
checkedPaths?: string[];
|
|
55
|
-
[key: string]: unknown;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* 携带结构化错误码的错误。CLI 顶层捕获后按 `--format` 序列化为统一错误 schema。
|
|
59
|
-
*/
|
|
60
|
-
export declare class YoooclawError extends Error {
|
|
61
|
-
readonly code: ErrorCodeValue;
|
|
62
|
-
readonly details: YoooclawErrorDetails;
|
|
63
|
-
/** 进程退出码,默认 1 */
|
|
64
|
-
readonly exitCode: number;
|
|
65
|
-
constructor(code: ErrorCodeValue, message: string, details?: YoooclawErrorDetails, exitCode?: number);
|
|
66
|
-
toErrorPayload(): {
|
|
67
|
-
code: ErrorCodeValue;
|
|
68
|
-
message: string;
|
|
69
|
-
} & YoooclawErrorDetails;
|
|
70
|
-
}
|
|
71
|
-
export declare function notImplemented(command: string): YoooclawError;
|