@tbox.cn/tboxcode-dsh-bundle 0.1.0-rc.15 → 0.1.0-rc.17

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.
@@ -1,10 +1,10 @@
1
- import { n as isOwnedHome, r as startRetentionScheduler } from "./retention-DNEdnIxC.js";
2
- import { t as createLogger } from "./logger-BGwLHZXY.js";
1
+ import { n as isOwnedHome, r as startRetentionScheduler } from "./retention-CVHXhi92.js";
2
+ import { t as createLogger } from "./logger-Dnz11jWP.js";
3
3
  import { join } from "node:path";
4
+ import { translateMode } from "@tbox.cn/dsh-acp-bridge-core";
4
5
  import { homedir } from "node:os";
5
6
  import { RemoteError, TypertRemoteService, remoteMethods } from "@deepseek-ai/dsh-typert-protocol";
6
7
  import { setSandboxMode } from "@deepseek-ai/dsh-sandbox-policy";
7
- import { translateMode } from "@tbox.cn/dsh-acp-bridge-core";
8
8
  import { runAutoCommit } from "@tbox.cn/tboxcode-dsh-tools";
9
9
 
10
10
  //#region src/remote.ts
@@ -55,6 +55,41 @@ async function handleAttachmentsAdmit(services, request) {
55
55
  if (attachments === void 0) throw new RemoteError("tboxcode/attachments-unavailable", "附件服务未挂载(image prompt 拒绝)", {});
56
56
  return { parts: await attachments.admitPromptContent(request.parts) };
57
57
  }
58
+ /**
59
+ * 图片 URL 准入(载体二):抓取 + 归一化 + 出处记录全在 dsh 侧完成,返回与入参
60
+ * 等长同序的准入结果(attachmentId + 归一化字节)。领域失败转 RemoteError——
61
+ * sdk 侧统一映射为 invalidParams(bridge 的错误面只透传 RequestError)。
62
+ */
63
+ async function handleImagesAdmit(services, request, signal) {
64
+ const imageSources = services.imageSources;
65
+ if (imageSources === void 0) throw new RemoteError("tboxcode/images-unavailable", "图片 URL 服务未挂载(image/tbox_url prompt 拒绝)", {});
66
+ try {
67
+ const admitted = await imageSources.admitUrls({
68
+ sessionId: request.sessionId,
69
+ urls: request.urls,
70
+ ...request.names === void 0 ? {} : { names: request.names },
71
+ signal
72
+ });
73
+ return { images: await Promise.all(admitted.map(async (image) => {
74
+ const bytes = await imageSources.readImage(image.attachment, signal);
75
+ if (bytes === void 0) throw new RemoteError("tboxcode/image-unavailable", "图片字节读取失败(附件缺失)", {});
76
+ return {
77
+ attachmentId: image.attachmentId,
78
+ attachment: bytes,
79
+ ...image.name === void 0 ? {} : { name: image.name }
80
+ };
81
+ })) };
82
+ } catch (error) {
83
+ if (error instanceof RemoteError) throw error;
84
+ throw new RemoteError("tboxcode/image-unavailable", error instanceof Error ? error.message : String(error), {});
85
+ }
86
+ }
87
+ /** 读一张已落盘图片(载体二历史回显);未命中返回 null(调用方降级占位)。 */
88
+ async function handleImagesRead(services, request, signal) {
89
+ const imageSources = services.imageSources;
90
+ if (imageSources === void 0) throw new RemoteError("tboxcode/images-unavailable", "图片 URL 服务未挂载", {});
91
+ return { image: await imageSources.readImage(request.attachment, signal) ?? null };
92
+ }
58
93
  async function handleSessionsFlush(services, request) {
59
94
  const session = services.sessions.get(request.sessionId);
60
95
  if (session === void 0) throw new RemoteError("tboxcode/agent-not-found", `会话 ${request.sessionId} 不在内存(flush 须热会话)`, { sessionId: request.sessionId });
@@ -65,6 +100,68 @@ async function handleSessionsStat(services, request) {
65
100
  const found = await services.persistence.stat(request.sessionId);
66
101
  return found === void 0 ? null : { header: found.header };
67
102
  }
103
+ /** Stop 枚举预算:目录读是异步 Session 读,Stop 不该无界等待。 */
104
+ const STOP_ENUM_TIMEOUT_MS = 1e4;
105
+ /**
106
+ * 枚举一棵树的全部后代并逐个 user-authority 软停。
107
+ * 单目标失败记日志后继续(resident 缺席/已结束本身是 no-op);枚举失败上抛,
108
+ * 由调用方决定是否整体失败。
109
+ */
110
+ async function stopDescendants(subagents, sessionId, log) {
111
+ const signal = AbortSignal.timeout(STOP_ENUM_TIMEOUT_MS);
112
+ const seen = /* @__PURE__ */ new Set();
113
+ for (let pass = 0; pass < 2; pass++) {
114
+ const fresh = (await subagents.listDescendants(sessionId, signal)).filter((row) => !seen.has(row.id));
115
+ if (fresh.length === 0) return;
116
+ for (const row of fresh) {
117
+ seen.add(row.id);
118
+ try {
119
+ subagents.interrupt(row.id, { kind: "user" });
120
+ } catch (error) {
121
+ log?.warn(`stop subagent ${row.id} failed for ${sessionId}: ${String(error)}`);
122
+ }
123
+ }
124
+ }
125
+ }
126
+ /**
127
+ * Stop 级联(网关 close/cancel 的 server 侧实现):软停该会话的全部后代,
128
+ * 本地子代理保留驻留与收件箱,外部执行永久停止。
129
+ */
130
+ async function handleSessionsStopSubagents(services, request) {
131
+ const subagents = services.subagents;
132
+ if (subagents === void 0) return {};
133
+ try {
134
+ await stopDescendants(subagents, request.sessionId, services.log);
135
+ } catch (error) {
136
+ services.log?.warn(`enumerate subagents for stop failed (${request.sessionId}): ${String(error)}`);
137
+ throw new RemoteError("tboxcode/stop-failed", `枚举会话 ${request.sessionId} 的 subagent 后代失败:${error instanceof Error ? error.message : String(error)}`, { sessionId: request.sessionId });
138
+ }
139
+ return {};
140
+ }
141
+ /**
142
+ * Close 级联(网关 session/close 的 server 侧实现):释放该会话的全部后代。
143
+ *
144
+ * 冷根(无 live agent)没有可释放的句柄,退化为软停:目录仍可读,running 的后代
145
+ * 至少不会继续耗额度;释放留给下次激活或进程退出。
146
+ */
147
+ async function handleSessionsDrainSubagents(services, request) {
148
+ const subagents = services.subagents;
149
+ if (subagents === void 0) return {};
150
+ const agent = services.agents.get(request.sessionId);
151
+ if (agent === void 0) {
152
+ await stopDescendants(subagents, request.sessionId, services.log).catch((error) => {
153
+ services.log?.warn(`cold-root drain fallback failed (${request.sessionId}): ${String(error)}`);
154
+ });
155
+ return {};
156
+ }
157
+ try {
158
+ await subagents.drainDescendants([agent]);
159
+ } catch (error) {
160
+ services.log?.warn(`drain subagents failed (${request.sessionId}): ${String(error)}`);
161
+ throw new RemoteError("tboxcode/drain-failed", `释放会话 ${request.sessionId} 的 subagent 后代失败:${error instanceof Error ? error.message : String(error)}`, { sessionId: request.sessionId });
162
+ }
163
+ return {};
164
+ }
68
165
  /**
69
166
  * skills/change 转发流(P5-3 定案:skills/change 不在 $events allowlist——
70
167
  * 零上游变更的进程内桥接;payload-free seq 递增,消费方重取 commands.list)。
@@ -280,12 +377,17 @@ var TboxcodeRemoteGateway = class extends TypertRemoteService {
280
377
  });
281
378
  stateOf(this).services = {
282
379
  agents: remoteCtx.agents,
380
+ log: stateOf(this).log,
283
381
  commands: remoteCtx.commands,
284
382
  skills: remoteCtx.skills,
285
383
  approval: remoteCtx.approval,
286
384
  agentDefaultModel: remoteCtx.agentDefaultModel,
287
385
  sessions: remoteCtx.sessions,
288
386
  ...remoteCtx.get?.("attachments") === void 0 ? {} : { attachments: remoteCtx.get("attachments") },
387
+ ...remoteCtx.get?.("imageSources") === void 0 ? {} : { imageSources: remoteCtx.get("imageSources") },
388
+ get subagents() {
389
+ return remoteCtx.get?.("subagents");
390
+ },
289
391
  persistence: remoteCtx.sessionPersistence ?? { stat: async () => void 0 },
290
392
  on: (event, listener) => remoteCtx.on(event, listener),
291
393
  sandbox: { setSandboxMode: (session, mode) => setSandboxMode(session, mode) },
@@ -298,6 +400,12 @@ var TboxcodeRemoteGateway = class extends TypertRemoteService {
298
400
  attachmentsAdmit(request) {
299
401
  return handleAttachmentsAdmit(stateOf(this).services, request);
300
402
  }
403
+ imagesAdmit(request, signal) {
404
+ return handleImagesAdmit(stateOf(this).services, request, signal);
405
+ }
406
+ imagesRead(request, signal) {
407
+ return handleImagesRead(stateOf(this).services, request, signal);
408
+ }
301
409
  commandsList(request) {
302
410
  return handleCommandsList(stateOf(this).services, request);
303
411
  }
@@ -324,6 +432,12 @@ var TboxcodeRemoteGateway = class extends TypertRemoteService {
324
432
  sessionsStat(request) {
325
433
  return handleSessionsStat(stateOf(this).services, request);
326
434
  }
435
+ sessionsStopSubagents(request) {
436
+ return handleSessionsStopSubagents(stateOf(this).services, request);
437
+ }
438
+ sessionsDrainSubagents(request) {
439
+ return handleSessionsDrainSubagents(stateOf(this).services, request);
440
+ }
327
441
  skillsWatch(signal) {
328
442
  return handleSkillsWatch(stateOf(this).services, signal);
329
443
  }
@@ -351,6 +465,14 @@ const REMOTE_METHODS = [
351
465
  method: "attachmentsAdmit",
352
466
  exportName: "attachments.admit"
353
467
  },
468
+ {
469
+ method: "imagesAdmit",
470
+ exportName: "images.admit"
471
+ },
472
+ {
473
+ method: "imagesRead",
474
+ exportName: "images.read"
475
+ },
354
476
  {
355
477
  method: "commandsList",
356
478
  exportName: "commands.list"
@@ -398,6 +520,16 @@ const REMOTE_METHODS = [
398
520
  method: "sessionsStat",
399
521
  exportName: "sessions.stat"
400
522
  },
523
+ {
524
+ method: "sessionsStopSubagents",
525
+ exportName: "sessions.stopSubagents",
526
+ resources: { session: (request) => request.sessionId }
527
+ },
528
+ {
529
+ method: "sessionsDrainSubagents",
530
+ exportName: "sessions.drainSubagents",
531
+ resources: { session: (request) => request.sessionId }
532
+ },
401
533
  {
402
534
  method: "reload",
403
535
  exportName: "reload"
@@ -415,10 +547,11 @@ Object.defineProperty(TboxcodeRemoteGateway.prototype, REMOTE_METHOD_DESCRIPTOR,
415
547
  configurable: true,
416
548
  value: Object.freeze({
417
549
  version: 1,
418
- methods: Object.freeze(REMOTE_METHODS.map(({ method, exportName, mode }) => Object.freeze({
550
+ methods: Object.freeze(REMOTE_METHODS.map(({ method, exportName, mode, resources }) => Object.freeze({
419
551
  method,
420
552
  ...exportName === method ? {} : { exportName },
421
553
  ...mode === void 0 ? {} : { mode },
554
+ ...resources === void 0 ? {} : { resources },
422
555
  invocation: Object.freeze({ kind: "direct" })
423
556
  })))
424
557
  })
@@ -428,4 +561,4 @@ if (markers.length !== REMOTE_METHODS.length || REMOTE_METHODS.some(({ exportNam
428
561
  var remote_default = TboxcodeRemoteGateway;
429
562
 
430
563
  //#endregion
431
- export { inject as _, handleCommandsList as a, handleGitPushWatch as c, handleReload as d, handleRetentionRun as f, handleSkillsWatch as g, handleSkillsUserInvocable as h, handleCommandsExecute as i, handleHealth as l, handleSessionsStat as m, handleAgentWatch as n, handleCommit as o, handleSessionsFlush as p, handleAttachmentsAdmit as r, handleDefaultSelection as s, TboxcodeRemoteGateway as t, handleMode as u, name as v, remote_default as y };
564
+ export { remote_default as C, name as S, handleSessionsStat as _, handleCommandsList as a, handleSkillsWatch as b, handleGitPushWatch as c, handleImagesRead as d, handleMode as f, handleSessionsFlush as g, handleSessionsDrainSubagents as h, handleCommandsExecute as i, handleHealth as l, handleRetentionRun as m, handleAgentWatch as n, handleCommit as o, handleReload as p, handleAttachmentsAdmit as r, handleDefaultSelection as s, TboxcodeRemoteGateway as t, handleImagesAdmit as u, handleSessionsStopSubagents as v, inject as x, handleSkillsUserInvocable as y };
@@ -1,8 +1,9 @@
1
- import { t as ConvergenceCore } from "./convergence-core-C1ZtU17g.js";
2
- import { a as SweepResult, r as RetentionScheduler } from "./retention-B2V8Plpx.js";
1
+ import { t as ConvergenceCore } from "./convergence-core-B81Z55Bq.js";
2
+ import { a as SweepResult, r as RetentionScheduler } from "./retention-f1rAWNdl.js";
3
+ import { n as Logger } from "./logger-DcHqQwUI.js";
4
+ import { Context } from "@deepseek-ai/cordis";
3
5
  import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
4
6
  import { AutoCommitConfig, AutoCommitOutcome } from "@tbox.cn/tboxcode-dsh-tools";
5
- import { Context } from "@deepseek-ai/cordis";
6
7
 
7
8
  //#region src/remote.d.ts
8
9
  declare module '@deepseek-ai/dsh-typert-protocol' {
@@ -17,6 +18,16 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
17
18
  readonly mode: string;
18
19
  };
19
20
  'tboxcode/attachments-unavailable': Record<string, never>;
21
+ 'tboxcode/images-unavailable': Record<string, never>;
22
+ 'tboxcode/image-unavailable': {
23
+ readonly reason?: string;
24
+ };
25
+ 'tboxcode/stop-failed': {
26
+ readonly sessionId: string;
27
+ };
28
+ 'tboxcode/drain-failed': {
29
+ readonly sessionId: string;
30
+ };
20
31
  }
21
32
  }
22
33
  interface RemoteAgentLike {
@@ -31,6 +42,17 @@ interface DefaultModelSelection {
31
42
  model?: unknown;
32
43
  reasoningEffort?: unknown;
33
44
  }
45
+ /** subagent 服务的最小结构面(不依赖 dsh-subagent 编译域——与载体一同纪律)。 */
46
+ interface SubagentTreeLifecycle {
47
+ listDescendants(rootSessionId: string, signal?: AbortSignal): Promise<ReadonlyArray<{
48
+ readonly kind: 'child' | 'diagnostic';
49
+ readonly id: string;
50
+ }>>;
51
+ interrupt(id: string, authority: {
52
+ readonly kind: 'user';
53
+ }): void;
54
+ drainDescendants(parents: readonly unknown[]): Promise<void>;
55
+ }
34
56
  interface TboxcodeRemoteServices {
35
57
  agents: {
36
58
  get(sessionId: string): (RemoteAgentLike & Record<string, unknown>) | undefined;
@@ -70,9 +92,26 @@ interface TboxcodeRemoteServices {
70
92
  attachments?: {
71
93
  admitPromptContent(input: readonly unknown[]): Promise<readonly unknown[]>;
72
94
  };
95
+ /** 图片 URL 准入面(载体二——两端口经 RPC 抵达 dsh 侧同一服务)。 */
96
+ imageSources?: {
97
+ admitUrls(request: {
98
+ sessionId: string;
99
+ urls: readonly string[];
100
+ names?: readonly (string | undefined)[];
101
+ signal?: AbortSignal;
102
+ }): Promise<readonly Record<string, unknown>[]>;
103
+ readImage(attachment: unknown, signal?: AbortSignal): Promise<{
104
+ mediaType: string;
105
+ data: string;
106
+ } | undefined>;
107
+ };
73
108
  sandbox: {
74
109
  setSandboxMode(session: unknown, mode: unknown): unknown;
75
110
  };
111
+ /** 诊断出口(Stop/Drain 失败观测——services 无 logger 时静默降级)。 */
112
+ log?: Logger;
113
+ /** subagent 树收敛面(Stop 软停 / Close 释放;组合未挂服务时缺席)。 */
114
+ subagents?: SubagentTreeLifecycle;
76
115
  convergence?: ConvergenceCore;
77
116
  retention?: RetentionScheduler;
78
117
  memoryUsage?: () => NodeJS.MemoryUsage;
@@ -110,6 +149,27 @@ declare function handleAttachmentsAdmit(services: TboxcodeRemoteServices, reques
110
149
  }): Promise<{
111
150
  parts: readonly unknown[];
112
151
  }>;
152
+ /**
153
+ * 图片 URL 准入(载体二):抓取 + 归一化 + 出处记录全在 dsh 侧完成,返回与入参
154
+ * 等长同序的准入结果(attachmentId + 归一化字节)。领域失败转 RemoteError——
155
+ * sdk 侧统一映射为 invalidParams(bridge 的错误面只透传 RequestError)。
156
+ */
157
+ declare function handleImagesAdmit(services: TboxcodeRemoteServices, request: {
158
+ sessionId: string;
159
+ urls: readonly string[];
160
+ names?: readonly (string | undefined)[];
161
+ }, signal: AbortSignal): Promise<{
162
+ images: readonly Record<string, unknown>[];
163
+ }>;
164
+ /** 读一张已落盘图片(载体二历史回显);未命中返回 null(调用方降级占位)。 */
165
+ declare function handleImagesRead(services: TboxcodeRemoteServices, request: {
166
+ attachment: unknown;
167
+ }, signal: AbortSignal): Promise<{
168
+ image: {
169
+ mediaType: string;
170
+ data: string;
171
+ } | null;
172
+ }>;
113
173
  declare function handleSessionsFlush(services: TboxcodeRemoteServices, request: {
114
174
  sessionId: string;
115
175
  }): Promise<void>;
@@ -119,6 +179,22 @@ declare function handleSessionsStat(services: TboxcodeRemoteServices, request: {
119
179
  }): Promise<{
120
180
  header: Record<string, unknown>;
121
181
  } | null>;
182
+ /**
183
+ * Stop 级联(网关 close/cancel 的 server 侧实现):软停该会话的全部后代,
184
+ * 本地子代理保留驻留与收件箱,外部执行永久停止。
185
+ */
186
+ declare function handleSessionsStopSubagents(services: TboxcodeRemoteServices, request: {
187
+ sessionId: string;
188
+ }): Promise<Record<string, never>>;
189
+ /**
190
+ * Close 级联(网关 session/close 的 server 侧实现):释放该会话的全部后代。
191
+ *
192
+ * 冷根(无 live agent)没有可释放的句柄,退化为软停:目录仍可读,running 的后代
193
+ * 至少不会继续耗额度;释放留给下次激活或进程退出。
194
+ */
195
+ declare function handleSessionsDrainSubagents(services: TboxcodeRemoteServices, request: {
196
+ sessionId: string;
197
+ }): Promise<Record<string, never>>;
122
198
  /**
123
199
  * skills/change 转发流(P5-3 定案:skills/change 不在 $events allowlist——
124
200
  * 零上游变更的进程内桥接;payload-free seq 递增,消费方重取 commands.list)。
@@ -185,6 +261,21 @@ declare class TboxcodeRemoteGateway extends TypertRemoteService {
185
261
  }): Promise<{
186
262
  parts: readonly unknown[];
187
263
  }>;
264
+ imagesAdmit(request: {
265
+ sessionId: string;
266
+ urls: readonly string[];
267
+ names?: readonly (string | undefined)[];
268
+ }, signal: AbortSignal): Promise<{
269
+ images: readonly Record<string, unknown>[];
270
+ }>;
271
+ imagesRead(request: {
272
+ attachment: unknown;
273
+ }, signal: AbortSignal): Promise<{
274
+ image: {
275
+ mediaType: string;
276
+ data: string;
277
+ } | null;
278
+ }>;
188
279
  commandsList(request: {
189
280
  agentId: string;
190
281
  }): ReadonlyArray<Record<string, unknown>>;
@@ -217,6 +308,12 @@ declare class TboxcodeRemoteGateway extends TypertRemoteService {
217
308
  }): Promise<{
218
309
  header: Record<string, unknown>;
219
310
  } | null>;
311
+ sessionsStopSubagents(request: {
312
+ sessionId: string;
313
+ }): Promise<Record<string, never>>;
314
+ sessionsDrainSubagents(request: {
315
+ sessionId: string;
316
+ }): Promise<Record<string, never>>;
220
317
  skillsWatch(signal: AbortSignal): AsyncIterable<{
221
318
  seq: number;
222
319
  }>;
@@ -233,4 +330,4 @@ declare class TboxcodeRemoteGateway extends TypertRemoteService {
233
330
  retentionRun(): Promise<SweepResult>;
234
331
  }
235
332
  //#endregion
236
- export { name as C, inject as S, handleRetentionRun as _, TboxcodeRemoteGateway as a, handleSkillsUserInvocable as b, handleAttachmentsAdmit as c, handleCommit as d, handleDefaultSelection as f, handleReload as g, handleMode as h, RemoteAgentLike as i, handleCommandsExecute as l, handleHealth as m, DefaultModelSelection as n, TboxcodeRemoteServices as o, handleGitPushWatch as p, GitPushEvent as r, handleAgentWatch as s, AgentWatchItem as t, handleCommandsList as u, handleSessionsFlush as v, handleSkillsWatch as x, handleSessionsStat as y };
333
+ export { handleSessionsStat as C, inject as D, handleSkillsWatch as E, name as O, handleSessionsFlush as S, handleSkillsUserInvocable as T, handleImagesRead as _, SubagentTreeLifecycle as a, handleRetentionRun as b, handleAgentWatch as c, handleCommandsList as d, handleCommit as f, handleImagesAdmit as g, handleHealth as h, RemoteAgentLike as i, handleAttachmentsAdmit as l, handleGitPushWatch as m, DefaultModelSelection as n, TboxcodeRemoteGateway as o, handleDefaultSelection as p, GitPushEvent as r, TboxcodeRemoteServices as s, AgentWatchItem as t, handleCommandsExecute as u, handleMode as v, handleSessionsStopSubagents as w, handleSessionsDrainSubagents as x, handleReload as y };
package/lib/remote.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import "./convergence-core-C1ZtU17g.js";
2
- import "./retention-B2V8Plpx.js";
3
- import { C as name, S as inject, _ as handleRetentionRun, a as TboxcodeRemoteGateway, b as handleSkillsUserInvocable, c as handleAttachmentsAdmit, d as handleCommit, f as handleDefaultSelection, g as handleReload, h as handleMode, i as RemoteAgentLike, l as handleCommandsExecute, m as handleHealth, n as DefaultModelSelection, o as TboxcodeRemoteServices, p as handleGitPushWatch, r as GitPushEvent, s as handleAgentWatch, t as AgentWatchItem, u as handleCommandsList, v as handleSessionsFlush, x as handleSkillsWatch, y as handleSessionsStat } from "./remote-BZjKKp64.js";
4
- export { AgentWatchItem, DefaultModelSelection, GitPushEvent, RemoteAgentLike, TboxcodeRemoteGateway, TboxcodeRemoteGateway as default, TboxcodeRemoteServices, handleAgentWatch, handleAttachmentsAdmit, handleCommandsExecute, handleCommandsList, handleCommit, handleDefaultSelection, handleGitPushWatch, handleHealth, handleMode, handleReload, handleRetentionRun, handleSessionsFlush, handleSessionsStat, handleSkillsUserInvocable, handleSkillsWatch, inject, name };
1
+ import "./convergence-core-B81Z55Bq.js";
2
+ import "./retention-f1rAWNdl.js";
3
+ import "./logger-DcHqQwUI.js";
4
+ import { C as handleSessionsStat, D as inject, E as handleSkillsWatch, O as name, S as handleSessionsFlush, T as handleSkillsUserInvocable, _ as handleImagesRead, a as SubagentTreeLifecycle, b as handleRetentionRun, c as handleAgentWatch, d as handleCommandsList, f as handleCommit, g as handleImagesAdmit, h as handleHealth, i as RemoteAgentLike, l as handleAttachmentsAdmit, m as handleGitPushWatch, n as DefaultModelSelection, o as TboxcodeRemoteGateway, p as handleDefaultSelection, r as GitPushEvent, s as TboxcodeRemoteServices, t as AgentWatchItem, u as handleCommandsExecute, v as handleMode, w as handleSessionsStopSubagents, x as handleSessionsDrainSubagents, y as handleReload } from "./remote-Cw_L6bz7.js";
5
+ export { AgentWatchItem, DefaultModelSelection, GitPushEvent, RemoteAgentLike, SubagentTreeLifecycle, TboxcodeRemoteGateway, TboxcodeRemoteGateway as default, TboxcodeRemoteServices, handleAgentWatch, handleAttachmentsAdmit, handleCommandsExecute, handleCommandsList, handleCommit, handleDefaultSelection, handleGitPushWatch, handleHealth, handleImagesAdmit, handleImagesRead, handleMode, handleReload, handleRetentionRun, handleSessionsDrainSubagents, handleSessionsFlush, handleSessionsStat, handleSessionsStopSubagents, handleSkillsUserInvocable, handleSkillsWatch, inject, name };
package/lib/remote.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./retention-DNEdnIxC.js";
2
- import "./logger-BGwLHZXY.js";
3
- import { _ as inject, a as handleCommandsList, c as handleGitPushWatch, d as handleReload, f as handleRetentionRun, g as handleSkillsWatch, h as handleSkillsUserInvocable, i as handleCommandsExecute, l as handleHealth, m as handleSessionsStat, n as handleAgentWatch, o as handleCommit, p as handleSessionsFlush, r as handleAttachmentsAdmit, s as handleDefaultSelection, t as TboxcodeRemoteGateway, u as handleMode, v as name, y as remote_default } from "./remote-lvZ2n78k.js";
1
+ import "./retention-CVHXhi92.js";
2
+ import "./logger-Dnz11jWP.js";
3
+ import { C as remote_default, S as name, _ as handleSessionsStat, a as handleCommandsList, b as handleSkillsWatch, c as handleGitPushWatch, d as handleImagesRead, f as handleMode, g as handleSessionsFlush, h as handleSessionsDrainSubagents, i as handleCommandsExecute, l as handleHealth, m as handleRetentionRun, n as handleAgentWatch, o as handleCommit, p as handleReload, r as handleAttachmentsAdmit, s as handleDefaultSelection, t as TboxcodeRemoteGateway, u as handleImagesAdmit, v as handleSessionsStopSubagents, x as inject, y as handleSkillsUserInvocable } from "./remote-BocZwlS-.js";
4
4
 
5
- export { TboxcodeRemoteGateway, remote_default as default, handleAgentWatch, handleAttachmentsAdmit, handleCommandsExecute, handleCommandsList, handleCommit, handleDefaultSelection, handleGitPushWatch, handleHealth, handleMode, handleReload, handleRetentionRun, handleSessionsFlush, handleSessionsStat, handleSkillsUserInvocable, handleSkillsWatch, inject, name };
5
+ export { TboxcodeRemoteGateway, remote_default as default, handleAgentWatch, handleAttachmentsAdmit, handleCommandsExecute, handleCommandsList, handleCommit, handleDefaultSelection, handleGitPushWatch, handleHealth, handleImagesAdmit, handleImagesRead, handleMode, handleReload, handleRetentionRun, handleSessionsDrainSubagents, handleSessionsFlush, handleSessionsStat, handleSessionsStopSubagents, handleSkillsUserInvocable, handleSkillsWatch, inject, name };
@@ -1,2 +1,2 @@
1
- import { a as SweepResult, c as sweepLlmCalls, i as SessionsSweepFs, l as sweepSessions, n as RetentionKnobs, o as isOwnedHome, r as RetentionScheduler, s as startRetentionScheduler, t as DEFAULT_KNOBS } from "./retention-B2V8Plpx.js";
1
+ import { a as SweepResult, c as sweepLlmCalls, i as SessionsSweepFs, l as sweepSessions, n as RetentionKnobs, o as isOwnedHome, r as RetentionScheduler, s as startRetentionScheduler, t as DEFAULT_KNOBS } from "./retention-f1rAWNdl.js";
2
2
  export { DEFAULT_KNOBS, RetentionKnobs, RetentionScheduler, SessionsSweepFs, SweepResult, isOwnedHome, startRetentionScheduler, sweepLlmCalls, sweepSessions };
package/lib/retention.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as sweepSessions, i as sweepLlmCalls, n as isOwnedHome, r as startRetentionScheduler, t as DEFAULT_KNOBS } from "./retention-DNEdnIxC.js";
1
+ import { a as sweepSessions, i as sweepLlmCalls, n as isOwnedHome, r as startRetentionScheduler, t as DEFAULT_KNOBS } from "./retention-CVHXhi92.js";
2
2
 
3
3
  export { DEFAULT_KNOBS, isOwnedHome, startRetentionScheduler, sweepLlmCalls, sweepSessions };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@tbox.cn/tboxcode-dsh-bundle",
3
- "version": "0.1.0-rc.15",
3
+ "version": "0.1.0-rc.17",
4
4
  "type": "module",
5
- "description": "tboxcode 组合点(host 服务行 + agent 平面 host 行 + profile 模板三件):patch + prompts / reminders 插件 + tboxcode Remote 服务",
5
+ "description": "tboxcode 组合点(host 服务行 + agent 平面 host 行 + profile 模板三件):patch + prompts / identity 插件 + tboxcode Remote 服务",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "exports": {
@@ -15,6 +15,10 @@
15
15
  "types": "./lib/prompts.d.ts",
16
16
  "default": "./lib/prompts.js"
17
17
  },
18
+ "./identity": {
19
+ "types": "./lib/identity.d.ts",
20
+ "default": "./lib/identity.js"
21
+ },
18
22
  "./convergence": {
19
23
  "types": "./lib/convergence.d.ts",
20
24
  "default": "./lib/convergence.js"
@@ -27,6 +31,10 @@
27
31
  "types": "./lib/remote.d.ts",
28
32
  "default": "./lib/remote.js"
29
33
  },
34
+ "./image-source": {
35
+ "types": "./lib/image-source.d.ts",
36
+ "default": "./lib/image-source.js"
37
+ },
30
38
  "./retention": {
31
39
  "types": "./lib/retention.d.ts",
32
40
  "default": "./lib/retention.js"
@@ -47,22 +55,24 @@
47
55
  },
48
56
  "dependencies": {
49
57
  "zod": "4.6.7",
50
- "@tbox.cn/tboxcode-dsh-tools": "0.1.0-rc.15",
51
- "@tbox.cn/tboxcode-dsh-runtime": "0.1.0-rc.15",
52
- "@tbox.cn/tboxcode-dsh-llm": "0.1.0-rc.15",
53
- "@tbox.cn/dsh-acp-bridge-core": "0.1.0-rc.15"
58
+ "@tbox.cn/tboxcode-dsh-runtime": "0.1.0-rc.17",
59
+ "@tbox.cn/dsh-acp-bridge-core": "0.1.0-rc.17",
60
+ "@tbox.cn/tboxcode-dsh-llm": "0.1.0-rc.17",
61
+ "@tbox.cn/tboxcode-dsh-tools": "0.1.0-rc.17"
54
62
  },
55
63
  "peerDependencies": {
56
64
  "@deepseek-ai/cordis": "4.1.0",
57
- "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
58
- "@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.1"
65
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
66
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.5",
67
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5"
59
68
  },
60
69
  "devDependencies": {
70
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
61
71
  "@deepseek-ai/cordis": "4.1.0",
62
72
  "yaml": "^2.8.0",
63
- "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
64
- "@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.1",
65
- "@deepseek-ai/dsh-commands": "0.2.2-rc.1"
73
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
74
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-rc.5",
75
+ "@deepseek-ai/dsh-commands": "0.2.2-rc.5"
66
76
  },
67
77
  "scripts": {
68
78
  "build": "tsdown",
File without changes