dsh-plugin-lark-bridge 0.1.3 → 0.1.4

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.
@@ -0,0 +1,49 @@
1
+ /**
2
+ * 被引消息:按 `reply_to` 读取原消息并渲染 `<quote>` 块。
3
+ * 导出 QuotedMessage、readQuoted、toQuotedMessage、truncateQuote 与 formatQuote。
4
+ */
5
+ import type { LarkCli } from './cli.ts';
6
+ /** 发送者身份。 */
7
+ export type QuoteFrom = 'user' | 'bot';
8
+ /** 引用正文的呈现分支。 */
9
+ export type QuoteKind = 'text' | 'forwarded' | 'other';
10
+ /** 一条被引消息的呈现模型。 */
11
+ export interface QuotedMessage {
12
+ /** 被引消息标识。 */
13
+ readonly messageId: string;
14
+ /** 发送者身份。 */
15
+ readonly from: QuoteFrom;
16
+ /** 已格式化时间;不可得为空串。 */
17
+ readonly time: string;
18
+ /** 渲染分支。 */
19
+ readonly kind: QuoteKind;
20
+ /** 截断前的正文或类型占位。 */
21
+ readonly text: string;
22
+ /** 读取失败标记。 */
23
+ readonly unavailable: boolean;
24
+ }
25
+ /**
26
+ * 把一条 mget 消息转成引用模型。
27
+ * @param messageId - 被引消息标识。
28
+ * @param raw - mget 返回的单条消息。
29
+ */
30
+ export declare function toQuotedMessage(messageId: string, raw: Record<string, unknown>): QuotedMessage;
31
+ /**
32
+ * 把引用正文截断到上限,去掉代理对残留。
33
+ * @param text - 原始正文。
34
+ * @param limit - 最大字符数。
35
+ */
36
+ export declare function truncateQuote(text: string, limit?: number): string;
37
+ /**
38
+ * 渲染 `<quote>` 块。
39
+ * @param quote - 被引消息。
40
+ */
41
+ export declare function formatQuote(quote: QuotedMessage): string;
42
+ /**
43
+ * 读取被引消息:user 身份优先,bot 兜底,均失败时返回不可用引用。
44
+ * @param cli - lark-cli 适配层。
45
+ * @param messageId - 被引消息标识。
46
+ * @param timeoutMs - 单次调用超时。
47
+ */
48
+ export declare function readQuoted(cli: LarkCli, messageId: string, timeoutMs?: number): Promise<QuotedMessage>;
49
+ //# sourceMappingURL=quote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../src/quote.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC,aAAa;AACb,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;AAEvC,iBAAiB;AACjB,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,OAAO,CAAC;AAEvD,mBAAmB;AACnB,MAAM,WAAW,aAAa;IAC5B,cAAc;IACd,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,aAAa;IACb,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,qBAAqB;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,YAAY;IACZ,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,cAAc;IACd,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AA8BD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,CAe9F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAkB,GAAG,MAAM,CAG3E;AASD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAYxD;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,MAAM,EACjB,SAAS,SAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAgBxB"}
@@ -1,7 +1,7 @@
1
1
  import type { Session } from '@deepseek-ai/dsh-session';
2
2
  import type { SessionManager } from './sessions.ts';
3
3
  import type { Context } from './types.ts';
4
- /** 提醒正文;说明块含义与回复规则。 */
4
+ /** 提醒正文;说明块含义、回复规则与引用读取方式。 */
5
5
  export declare const BRIDGE_REMINDER: string;
6
6
  /** 构造提醒消息。 */
7
7
  export declare function createReminderMessage(): {
@@ -1 +1 @@
1
- {"version":3,"file":"reminder.d.ts","sourceRoot":"","sources":["../src/reminder.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,uBAAuB;AACvB,eAAO,MAAM,eAAe,QAOhB,CAAC;AAEb,cAAc;AACd,wBAAgB,qBAAqB;;;;;;;;;oEAKpC;AAED,kBAAkB;AAClB,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAM5D;AAED,eAAe;AACf,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAwBxE"}
1
+ {"version":3,"file":"reminder.d.ts","sourceRoot":"","sources":["../src/reminder.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C,8BAA8B;AAC9B,eAAO,MAAM,eAAe,QAWhB,CAAC;AAEb,cAAc;AACd,wBAAgB,qBAAqB;;;;;;;;;oEAKpC;AAED,kBAAkB;AAClB,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAM5D;AAED,eAAe;AACf,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAwBxE"}
@@ -1,7 +1,7 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import type { Agent } from '@deepseek-ai/dsh-agent';
3
3
  import { type Session } from '@deepseek-ai/dsh-session';
4
- import type { PluginConfig } from './config.ts';
4
+ import { type PluginConfig } from './config.ts';
5
5
  import type { StateStore } from './state.ts';
6
6
  /** 一次注入的结果。 */
7
7
  export interface InjectionResult {
@@ -38,10 +38,16 @@ export declare class SessionManager {
38
38
  private attach;
39
39
  /** 恢复一个可用会话;失败返回 undefined。 */
40
40
  private resume;
41
- /** 新建会话,设置标题、挂到工作区并置顶。 */
41
+ /** 解析可用的预设;名册缺失、读取失败或候选不可用时返回空串。 */
42
+ private resolvePreset;
43
+ /** 校验配置的模型选择;服务缺失或校验失败时返回 undefined。 */
44
+ private resolveSelection;
45
+ /** 把模型选择写入新会话;失败只记录警告。 */
46
+ private applySelection;
47
+ /** 新建会话,应用预设与模型,设置标题、挂到工作区并置顶。 */
42
48
  private create;
43
- /** 确保标题与置顶状态符合配置。 */
44
- private syncMeta;
49
+ /** 置顶会话;失败只记日志。 */
50
+ private pin;
45
51
  /**
46
52
  * 取得当前工作区对应的会话;没有记录或不可用时新建。
47
53
  * @param workspaceRoot - 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6
6
  readonly parts?: number;
7
7
  readonly messageId?: string;
8
+ readonly replyTo?: string;
8
9
  readonly error?: {
9
10
  readonly code: string;
10
11
  readonly message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAC;AAGjE,YAAY;AACZ,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAgD7F;AAED,cAAc;AACd,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,CA+ChE"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,YAAY,CAAC;AAGjE,YAAY;AACZ,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE;AAED,YAAY;AACZ,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CAC7C;AAiBD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CA4D7F;AAED,cAAc;AACd,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,CAsDhE"}
package/dist/utils.d.ts CHANGED
@@ -9,6 +9,8 @@ export declare function formatTime(value: string | number | undefined, timeZone?
9
9
  export declare function escapeAttribute(value: string): string;
10
10
  /** 解析毫秒时间戳字符串;非法值返回当前时间。 */
11
11
  export declare function parseTimestamp(value: string | undefined): number;
12
+ /** 转义块内正文的结束标记,避免提前闭合外层块。 */
13
+ export declare function escapeBlockText(value: string): string;
12
14
  /**
13
15
  * 把文本包成 system-reminder 帧。
14
16
  * @param text - 提醒正文。
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,eAAe;AAEf,kBAAkB;AAClB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,sBAAsB;AACtB,wBAAgB,OAAO,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,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGhE;AAED,6BAA6B;AAC7B,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAa/D;AAED,oCAAoC;AACpC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAMtD;AAED,wBAAwB;AACxB,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,SAAM,GAAG,MAAM,CAG/D"}
package/icon.svg ADDED
@@ -0,0 +1,9 @@
1
+ <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <title>飞书桥接</title>
3
+ <!-- 飞书标志,来源 https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/open/website/favicon-logo.svg -->
4
+ <g transform="translate(7 7) scale(1.375)">
5
+ <path d="M8.5611 8.26287L8.59322 8.23075C8.6141 8.20988 8.63658 8.18739 8.65906 8.16652L8.70402 8.12316L8.8373 7.99148L9.02037 7.81324L9.17613 7.65908L9.32226 7.51456L9.47481 7.36361L9.61452 7.22551L9.81043 7.03281C9.84737 6.99588 9.8859 6.96055 9.92444 6.92522C9.9951 6.86099 10.069 6.79836 10.1428 6.73734C10.2119 6.68274 10.2825 6.62975 10.3548 6.57836C10.456 6.5061 10.5603 6.44026 10.6663 6.37603C10.7707 6.31501 10.8783 6.2572 10.9875 6.2026C11.0903 6.15282 11.1963 6.10625 11.3038 6.0645C11.3633 6.04041 11.4243 6.01954 11.4853 5.99866C11.5158 5.98903 11.5463 5.97779 11.5784 5.96815C11.3071 4.90028 10.8109 3.90468 10.122 3.04556C9.98868 2.88016 9.78634 2.78381 9.57438 2.78381H3.94598C3.88817 2.78381 3.84 2.83038 3.84 2.8898C3.84 2.92352 3.85605 2.95403 3.88335 2.97491C5.80391 4.38321 7.39689 6.19297 8.54826 8.27732L8.5611 8.26287Z" fill="#00D6B9"/>
6
+ <path d="M6.32424 13.2168C9.23077 13.2168 11.7631 11.6126 13.0831 9.24238C13.1297 9.15887 13.1747 9.07537 13.218 8.99026C13.1522 9.11712 13.0783 9.23917 12.9964 9.35478C12.9675 9.39493 12.9386 9.43508 12.9081 9.47522C12.8696 9.525 12.831 9.57157 12.7909 9.61814C12.7588 9.65507 12.7266 9.6904 12.6929 9.72573C12.6255 9.79638 12.5548 9.86383 12.4809 9.92646C12.4392 9.96178 12.3991 9.99551 12.3557 10.0276C12.3059 10.0662 12.2545 10.1031 12.2031 10.1368C12.171 10.1593 12.1373 10.1802 12.1036 10.2011C12.0699 10.2219 12.0345 10.2428 11.9976 10.2637C11.9253 10.3038 11.8499 10.3424 11.7744 10.3761C11.7085 10.405 11.6411 10.4323 11.5737 10.458C11.4998 10.4853 11.4259 10.5094 11.3488 10.5302C11.2348 10.5624 11.1208 10.5864 11.0036 10.6041C10.9201 10.617 10.8334 10.6266 10.7483 10.633C10.6583 10.6394 10.5668 10.641 10.4753 10.641C10.3741 10.6394 10.2729 10.633 10.1702 10.6218C10.0947 10.6137 10.0192 10.6025 9.94375 10.5897C9.87791 10.5784 9.81208 10.564 9.74624 10.5479C9.71091 10.5399 9.67719 10.5302 9.64186 10.5206C9.54551 10.4949 9.44916 10.4676 9.35281 10.4403C9.30464 10.4259 9.25646 10.413 9.20989 10.3986C9.13763 10.3777 9.06698 10.3552 8.99632 10.3327C8.93851 10.3151 8.8807 10.2958 8.82289 10.2765C8.76829 10.2589 8.71209 10.2412 8.65749 10.2219L8.54508 10.1834C8.50012 10.1673 8.45355 10.1513 8.40859 10.1352L8.31224 10.0999C8.24801 10.0774 8.18378 10.0533 8.12115 10.0292C8.08421 10.0148 8.04728 10.0019 8.01035 9.98748C7.96057 9.96821 7.91239 9.94894 7.86261 9.92967C7.81123 9.90879 7.75823 9.88792 7.70685 9.86704L7.60568 9.82529L7.48043 9.7739L7.38408 9.73376L7.28452 9.6904L7.1978 9.65186L7.11912 9.61653L7.03883 9.5796L6.95693 9.54106L6.85255 9.49288L6.74336 9.4415C6.70482 9.42223 6.66628 9.40456 6.62774 9.38529L6.52978 9.33712C4.80192 8.4748 3.24267 7.31218 1.92269 5.90227C1.88254 5.86052 1.8167 5.85731 1.77335 5.89746C1.75247 5.91673 1.73962 5.94563 1.73962 5.97454L1.74284 10.9413V11.3444C1.74284 11.5788 1.85845 11.7972 2.05276 11.9273C3.31654 12.772 4.80353 13.22 6.32424 13.2168Z" fill="#3370FF"/>
7
+ <path d="M14.8656 6.21539C13.8844 5.73525 12.7619 5.63248 11.7101 5.92795C11.6652 5.94079 11.6218 5.95364 11.5784 5.96649C11.5479 5.97612 11.5174 5.98576 11.4853 5.997C11.4243 6.01787 11.3633 6.04036 11.3039 6.06284C11.1963 6.10459 11.0919 6.15116 10.9875 6.20094C10.8783 6.25393 10.7707 6.31174 10.6663 6.37276C10.5588 6.43539 10.456 6.50283 10.3548 6.57509C10.2825 6.62648 10.2119 6.67947 10.1428 6.73407C10.0674 6.79509 9.99511 6.85611 9.92445 6.92195C9.88591 6.95728 9.84898 6.99261 9.81044 7.02954L9.61453 7.22224L9.47482 7.36034L9.32227 7.51129L9.17614 7.65581L9.02038 7.80997L8.83892 7.98982L8.70564 8.1215L8.66067 8.16485C8.6398 8.18573 8.61732 8.20821 8.59483 8.22909L8.56272 8.2612L8.51294 8.30777C8.49367 8.32544 8.476 8.34149 8.45673 8.35916C7.97338 8.80397 7.43383 9.18455 6.85413 9.49447L6.9585 9.54265L7.0404 9.58119L7.12069 9.61812L7.19938 9.65345L7.28609 9.69199L7.38565 9.73534L7.482 9.77549L7.60725 9.82688L7.70842 9.86863C7.75981 9.8895 7.8128 9.91038 7.86419 9.93125C7.91236 9.95052 7.96214 9.9698 8.01192 9.98907C8.04886 10.0035 8.08579 10.0164 8.12272 10.0308C8.18696 10.0549 8.25119 10.0774 8.31382 10.1015L8.41016 10.1368C8.45513 10.1529 8.50009 10.1689 8.54666 10.185L8.65907 10.2235C8.71366 10.2412 8.76826 10.2604 8.82447 10.2781C8.88228 10.2974 8.94008 10.315 8.99789 10.3343C9.06855 10.3568 9.14081 10.3777 9.21147 10.4002C9.25964 10.4146 9.30782 10.4291 9.35439 10.4419C9.45073 10.4692 9.54708 10.4965 9.64343 10.5222C9.67876 10.5318 9.71248 10.5399 9.74781 10.5495C9.81365 10.5656 9.87949 10.5784 9.94533 10.5912C10.0208 10.6041 10.0963 10.6153 10.1717 10.6234C10.2745 10.6346 10.3757 10.641 10.4769 10.6426C10.5684 10.6442 10.6599 10.641 10.7498 10.6346C10.8366 10.6282 10.9217 10.6185 11.0052 10.6057C11.1208 10.588 11.2364 10.5623 11.3504 10.5318C11.4259 10.511 11.5014 10.4869 11.5752 10.4596C11.6427 10.4355 11.7101 10.4082 11.776 10.3777C11.8514 10.344 11.9269 10.3054 11.9992 10.2653C12.0345 10.246 12.0698 10.2251 12.1052 10.2026C12.1405 10.1818 12.1726 10.1593 12.2047 10.1384C12.2561 10.1031 12.3075 10.0677 12.3573 10.0292C12.4006 9.99709 12.4424 9.96337 12.4825 9.92804C12.5548 9.86542 12.6254 9.79797 12.6929 9.72732C12.7266 9.69199 12.7587 9.65666 12.7908 9.61973C12.831 9.57316 12.8711 9.52498 12.9081 9.47681C12.9386 9.43827 12.9675 9.39812 12.9964 9.35637C13.0767 9.24075 13.1505 9.12032 13.2164 8.99506L13.2919 8.84572L13.9631 7.50807L13.9711 7.49202C14.1927 7.01348 14.4946 6.58312 14.8656 6.21539Z" fill="#133C9A"/>
8
+ </g>
9
+ </svg>
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Lark bot bridge",
4
- "description": "Receives Lark direct messages as the local lark-cli bot, injects them into a DSH session as system reminders, and provides a notification tool and in-plugin authentication."
4
+ "description": "Receives Lark direct messages through the local lark-cli bot, injects them into a session in the selected DSH workspace, and provides a notification tool and in-plugin authentication."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "飞书机器人桥",
4
- "description": "通过本机 lark-cli 的 bot 身份接收飞书私聊消息,以 system-reminder 注入 DSH 会话,并提供通知用户的工具与配置页鉴权。"
4
+ "description": "通过本机 lark-cli 的 bot 身份接收飞书私聊消息,注入所选工作区的 DSH 会话,并提供通知用户的工具与配置页鉴权。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "dsh-plugin-lark-bridge",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
+ "icon": "./icon.svg",
8
9
  "keywords": [
9
10
  "dsh",
10
11
  "deepseek",
@@ -22,12 +23,14 @@
22
23
  "types": "./dist/client/index.d.ts",
23
24
  "default": "./dist/client.js"
24
25
  },
25
- "./locale/*.json": "./locale/*.json"
26
+ "./locale/*.json": "./locale/*.json",
27
+ "./icon": "./icon.svg"
26
28
  },
27
29
  "files": [
28
30
  "dist",
29
31
  "cordis.patch.yml",
30
32
  "locale/*.json",
33
+ "icon.svg",
31
34
  "README.md"
32
35
  ],
33
36
  "dsh": {
@@ -39,6 +42,7 @@
39
42
  "inject": [
40
43
  "@deepseek-ai/dsh-client-locale",
41
44
  "@deepseek-ai/dsh-client-ui-layout",
45
+ "@deepseek-ai/dsh-client-ui-model-selection",
42
46
  "@deepseek-ai/dsh-client-ui-plugin-manager",
43
47
  "@deepseek-ai/dsh-client-ui-renderer",
44
48
  "@deepseek-ai/dsh-client-ui-settings",
@@ -77,24 +81,31 @@
77
81
  "@biomejs/biome": "^2.5.8",
78
82
  "@deepseek-ai/cordis": "~4.1.0",
79
83
  "@deepseek-ai/cordis-plugin-loader": "~1.1.0",
80
- "@deepseek-ai/dsh-agent": "0.2.2-rc.3",
81
- "@deepseek-ai/dsh-client-locale": "0.2.2-rc.3",
82
- "@deepseek-ai/dsh-client-store": "0.2.2-rc.3",
83
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.3",
84
- "@deepseek-ai/dsh-client-ui-layout": "0.2.2-rc.3",
85
- "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.3",
86
- "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.3",
87
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.3",
88
- "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.3",
89
- "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.3",
90
- "@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.3",
91
- "@deepseek-ai/dsh-llm": "0.2.2-rc.3",
92
- "@deepseek-ai/dsh-session": "0.2.2-rc.3",
93
- "@deepseek-ai/dsh-session-title": "0.2.2-rc.3",
94
- "@deepseek-ai/dsh-storage-domain": "0.2.2-rc.3",
95
- "@deepseek-ai/dsh-tools": "0.2.2-rc.3",
96
- "@deepseek-ai/dsh-workspace": "0.2.2-rc.3",
84
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
85
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.2-rc.5",
86
+ "@deepseek-ai/dsh-api-remotes": "0.2.2-rc.5",
87
+ "@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.5",
88
+ "@deepseek-ai/dsh-client-locale": "0.2.2-rc.5",
89
+ "@deepseek-ai/dsh-client-product-analytics": "0.2.2-rc.5",
90
+ "@deepseek-ai/dsh-client-store": "0.2.2-rc.5",
91
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.5",
92
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.2-rc.5",
93
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.2.2-rc.5",
94
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.5",
95
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.5",
96
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
97
+ "@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.5",
98
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
99
+ "@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.5",
100
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
101
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
102
+ "@deepseek-ai/dsh-session-title": "0.2.2-rc.5",
103
+ "@deepseek-ai/dsh-storage-domain": "0.2.2-rc.5",
104
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.5",
105
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
106
+ "@deepseek-ai/dsh-workspace": "0.2.2-rc.5",
97
107
  "@deepseek-ai/schemastery": "~3.19.0",
108
+ "@tsdown/css": "^0.22.14",
98
109
  "@types/node": "^24.19.2",
99
110
  "@types/react": "~18.3.1",
100
111
  "@types/react-dom": "~18.3.0",