@jayyuen66/dsh-dir-prep-organize 0.1.2-rc → 0.1.3

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,24 @@
1
+ import type { InvocationDescriptor } from "@deepseek-ai/dsh-typert-protocol";
2
+ export declare const DIR_PREP_DESCRIPTORS: readonly InvocationDescriptor[];
3
+ export interface DirPrepOrganizeArgs {
4
+ sessionId: string;
5
+ prompt: string;
6
+ entriesSummary: string;
7
+ roleText?: string;
8
+ }
9
+ export interface DirPrepReader {
10
+ defaults: () => Promise<unknown>;
11
+ context: (sessionId: string) => Promise<unknown>;
12
+ model: (sessionId: string) => Promise<unknown>;
13
+ organize: (args: DirPrepOrganizeArgs) => Promise<unknown>;
14
+ importTemplates: (args: {
15
+ path: string;
16
+ sessionId: string;
17
+ }) => Promise<unknown>;
18
+ }
19
+ interface RemoteHost {
20
+ get?: (name: string, strict?: boolean) => unknown;
21
+ }
22
+ /** 造读取器;当前部署没有远程面时 undefined(卡片只显示读不到)。 */
23
+ export declare function createDirPrepReader(ctx: RemoteHost): DirPrepReader | undefined;
24
+ export {};
@@ -15,8 +15,8 @@ export interface TemplateEntry {
15
15
  * scripts/gen-defaults-lib.mjs,键序 = 下拉分组展示序),本文件不再同名 re-export:
16
16
  * 实测同名两处导出正是 fallow `duplicate_export`(severity=error)报出来的那一条,
17
17
  * 而"两份名字保持同步"的纪律并不由 re-export 保证。表体仍是生成物;host 半引本文件的
18
- * groupLabelOf/parseAgentFrontmatter,精选集(现 640KB)也由 host 半引走、经
19
- * default-templates 端点按需下发,client 半不打包它。 */
18
+ * groupLabelOf/parseAgentFrontmatter,精选集(生成物)也由 host 半引走、经
19
+ * `dirPrepOrganize.defaults` 方法按需下发,client 半不打包它。 */
20
20
  /** 仓库目录名 → 分组标签(groupLabelOf(engineering) === "工程";未收录回落目录名)。
21
21
  * 必须只认**自有属性**:`AGENT_DIR_GROUP_LABELS["constructor"]` 会命中原型上的
22
22
  * function(`?? dirName` 不触发)→ TemplateEntry.group 拿到函数、JSON.stringify
@@ -56,8 +56,8 @@ export declare function condenseRoleBody(body: string): string;
56
56
  */
57
57
  export declare function mergeImportedTemplates(existing: readonly TemplateEntry[], incoming: readonly TemplateEntry[]): TemplateEntry[];
58
58
  /** 内置默认模板(独立开发者精选角色集,生成自插件内置 agents/ 目录)。
59
- * host 作为 settings base 下发;client 在快照缺 templates 字段时兜底使用
60
- * (不猜测快照是否合并 base,两种语义下行为都正确)。
59
+ * client 在快照缺 templates 字段时用它兜底;host 半的下发走 build-host.mjs 打出的
60
+ * templates.data.mjs(同一份生成物的另一产物),不再经 settings base 下发。
61
61
  * 全量角色可经设置页「导入角色」导入(路径留空 = 导入内置 agents/ 全部;显式路径
62
62
  * 受 host 的「cwd 内 + 内置角色目录 allowlist」策略约束)。 */
63
63
  export { DEFAULT_TEMPLATES } from "./default-templates.generated.js";
@@ -96,6 +96,8 @@ export interface UiMessages {
96
96
  readonly skipUnreadable: string;
97
97
  /** 跳过计数:非角色文件。 */
98
98
  readonly skipUnnamed: string;
99
+ /** 跳过计数:真实目标在允许根之外(符号链接逃逸),被安全闸门拦下。 */
100
+ readonly skipEscaped: string;
99
101
  /** 跳过计数整句的外层括号。 */
100
102
  readonly skipSummary: string;
101
103
  /** 跳过计数各项的分隔符。 */
@@ -167,7 +169,7 @@ export interface UiMessages {
167
169
  }
168
170
  /**
169
171
  * 本包的文案命名空间 merge 进官方的 `LocaleNamespaceMap`(installed
170
- * `dsh-client-ui-slots/lib/types/index.d.ts:23`「Dictionary owners extend via declaration
172
+ * `dsh-client-ui-slots/lib/types/index.d.ts`「Dictionary owners extend via declaration
171
173
  * merging (exactly like SlotMap)」)。这不是美化:不 merge 时 `ctx.locale.bind(NS)` 只能
172
174
  * 落到官方那条**未类型化**重载(返回 `Translate<string>`),卡片要的窄键集 `t` 就无官方
173
175
  * 来源,本地只好手写一份同构签名(就是被这一段替换掉的旧版本)。
@@ -189,8 +191,8 @@ declare const LOCALE_NS_KEY: "dir-prep-organize";
189
191
  export type LocaleNs = typeof LOCALE_NS_KEY;
190
192
  /**
191
193
  * 卡片取文案的函数形状:官方 `TranslateNS<N> = Translate<LocaleKeysOf<N>>`(installed
192
- * `dsh-client-ui-slots/lib/types/index.d.ts:67`,而 `Translate<K> =
193
- * (key: K, params?: Record<string, unknown>) => string`,同文件 :45)。函数面归官方,
194
+ * `dsh-client-ui-slots/lib/types/index.d.ts`,而 `Translate<K> =
195
+ * (key: K, params?: Record<string, unknown>) => string`,同文件)。函数面归官方,
194
196
  * 键集就是上面 merge 的 `keyof UiMessages`(外加官方 `LocaleKeysOf` 一并放行的
195
197
  * `common` 命名空间键——那是宿主查不到键时的回落面,运行时行为见其 `lookup`)。
196
198
  */