@botharness/core 1.5.0 → 1.5.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/CHANGELOG.md CHANGED
@@ -6,7 +6,45 @@ Unreleased entries arrive as [change fragments](changes/README.md) and are folde
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- No changes since 1.5.0 yet.
9
+ No changes since 1.5.1 yet.
10
+
11
+ ## [1.5.1] - 2026-10-25
12
+
13
+ Tobs uses the scoped npm package alongside the compatible deepseekbot entry, unifies explicit Bot messaging and repairs background Subagent reporting and installed CLI startup.
14
+
15
+ Mobile entries describe source and artwork changes for the independently versioned app; this npm release does not publish or qualify an iOS or Android binary. The Human selected 1.5.1 after closing #2435; the entries below describe shipped behavior, not a claim of general per-message retry/recovery support.
16
+
17
+ ### Added
18
+
19
+ - Added unified Channel and external IM delivery with model-chosen reporting, optional Inbox completion and optional turn conclusion after a successful send, retaining Group draft review and per-message external reply deduplication ([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435)).
20
+
21
+ ### Removed
22
+
23
+ - Removed obsolete Bot sending tools from both model and direct CLI catalogs; use `bot_send_message` for delivery and `channel_action` for draft actions/reactions. Approval requests no longer force a preliminary message and retry; the model decides when an explanation helps ([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435)).
24
+
25
+ ### Changed
26
+
27
+ - Independent Bot Subagents select an allowed explicit native preset, a configured child default, or the current DSH system default; forks retain the parent's preset. Their direct CLI calls now use the existing parent Agent's tool pipeline and refuse when no live parent is available ([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435)).
28
+
29
+ - Use “托布 Tobs” for the Chinese iOS app name, permission prompts and promotional artwork, while the English name remains “Tobs” ([#2725](https://github.com/BotHarness/DeepSeekBot/issues/2725)).
30
+
31
+ - Chinese iOS store artwork now places original native screenshots at their original aspect ratio, with larger headlines and complete phone frames ([#2725](https://github.com/BotHarness/DeepSeekBot/issues/2725)).
32
+
33
+ ### Fixed
34
+
35
+ - Preserve the original Mac desktop setup error or cancellation when temporary video-component cleanup fails, and retry transient cleanup failures before recording a separate diagnostic ([#2761](https://github.com/BotHarness/DeepSeekBot/issues/2761)).
36
+
37
+ - Background Subagent reports can resume an idle Bot and explicitly deliver their results using its current model; long-running direct Subagent calls no longer hide a later Human turn from stop and steering controls ([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435)).
38
+
39
+ - Publish Tobs through `@botharness/tobs`, retaining the `tobs` command and the supported `deepseekbot` compatibility package after npm refused the unscoped name; the npm README follows the GitHub product introduction ([#2744](https://github.com/BotHarness/DeepSeekBot/issues/2744)).
40
+
41
+ - Fixed the desktop conversation return button so scrolling away from the latest messages shows an opaque icon above the composer on the right, with hover/press feedback and a badge for new messages, and reaching the bottom hides it ([#2748](https://github.com/BotHarness/DeepSeekBot/issues/2748)).
42
+
43
+ - Kept the core CLI entry point external when bundling `deepseekbot`, so rebuilding with existing core outputs preserves dependency resource paths and the installed CLI starts correctly ([#2436](https://github.com/BotHarness/DeepSeekBot/pull/2436)).
44
+
45
+ ### Documentation
46
+
47
+ - Documented Tailscale desktop-control prerequisites, usage and exact-build macOS/iOS qualification, with Connect and pending Windows/Android limitations ([#2562](https://github.com/BotHarness/DeepSeekBot/issues/2562)).
10
48
 
11
49
  ## [1.5.0] - 2026-10-24
12
50
 
package/CHANGELOG.zh.md CHANGED
@@ -6,7 +6,45 @@
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- 1.5.0 之后暂无变更。
9
+ 1.5.1 之后暂无变更。
10
+
11
+ ## [1.5.1] - 2026-10-25
12
+
13
+ Tobs 使用带作用域的 npm 包并保留兼容的 deepseekbot 入口,统一 Bot 显式发送,修复后台 Subagent 汇报和安装后的 CLI 启动。
14
+
15
+ 移动端条目记录独立版本应用的源码和宣传图变化;本次 npm 发布不发布或验收 iOS、Android 安装包。用户在关闭 #2435 后指定发布 1.5.1;下列条目仅描述已实现行为,不代表已支持通用的逐条消息重试与恢复。
16
+
17
+ ### Added
18
+
19
+ - 新增 Channel 和外部 IM 的统一显式发送入口,由模型按需汇报,可在发送成功后选择结清 Inbox 和结束当前回合,保留群聊草稿审查,并支持外部回复逐条去重([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435))。
20
+
21
+ ### Removed
22
+
23
+ - 移除模型和直接 CLI 目录中的旧 Bot 发送工具,统一使用 `bot_send_message` 发送、`channel_action` 操作草稿和表情。审批请求不再强制先发说明再重试,由模型判断何时需要解释([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435))。
24
+
25
+ ### Changed
26
+
27
+ - 独立 Bot Subagent 依次使用允许的显式原生 preset、配置的子 Agent 默认值或当前 DSH 系统默认值;fork 继续继承父级。直接 CLI 调用复用现有父 Agent 的工具执行链,无存活父 Agent 时明确拒绝([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435))。
28
+
29
+ - iOS 中文应用名称、权限说明和宣传图统一使用“托布 Tobs”,英文名称保持“Tobs”([#2725](https://github.com/BotHarness/DeepSeekBot/issues/2725))。
30
+
31
+ - 中文 iOS 宣传图改用保持宽高比的原始截图,放大标题并保留完整手机框([#2725](https://github.com/BotHarness/DeepSeekBot/issues/2725))。
32
+
33
+ ### Fixed
34
+
35
+ - Mac 桌面组件临时目录清理失败时,保留原始安装错误或取消结果;对暂时性清理故障有限重试,并单独记录诊断([#2761](https://github.com/BotHarness/DeepSeekBot/issues/2761))。
36
+
37
+ - 后台 Subagent 回报可恢复空闲 Bot,使用当前模型显式发送结果;长时间运行的直接 Subagent 调用不再遮蔽后续用户回合的停止与追加指令([#2435](https://github.com/BotHarness/DeepSeekBot/issues/2435))。
38
+
39
+ - npm 拒绝无作用域包名后,Tobs 改用 `@botharness/tobs` 发布,保留 `tobs` 命令和继续支持的 `deepseekbot` 兼容包;npm README 与 GitHub 产品介绍保持一致([#2744](https://github.com/BotHarness/DeepSeekBot/issues/2744))。
40
+
41
+ - 修复桌面会话回到底部按钮:离开最新消息时在输入框上方右侧显示不透明图标,悬停、按住时改变颜色,有新消息时显示数量徽标,到底后隐藏([#2748](https://github.com/BotHarness/DeepSeekBot/issues/2748))。
42
+
43
+ - 打包 `deepseekbot` 时保留 core CLI 入口为外部依赖,避免已有 core 构建产物被再次内联后破坏依赖资源路径,确保安装后的 CLI 正常启动([#2436](https://github.com/BotHarness/DeepSeekBot/pull/2436))。
44
+
45
+ ### Documentation
46
+
47
+ - 补充 Tailscale 桌面远控的前提、步骤与具体构建的 macOS/iOS 验收范围,明确 Connect 限制及 Windows/Android 待验收项([#2562](https://github.com/BotHarness/DeepSeekBot/issues/2562))。
10
48
 
11
49
  ## [1.5.0] - 2026-10-24
12
50
 
package/cli/index.mjs CHANGED
@@ -37223,7 +37223,7 @@ function createSqliteChannelStore(options) {
37223
37223
  joinRequests: (channel.joinRequests ?? []).map((item) => item.id === request.id ? decided : item),
37224
37224
  updatedAt: timestamp
37225
37225
  };
37226
- const body = "Your request to join Group Channel " + channel.name + " (" + channel.id + ") was " + status + ". " + (input.accept ? "You may now use channel_read and channel_send there." : "You are not a member of that Group.");
37226
+ const body = "Your request to join Group Channel " + channel.name + " (" + channel.id + ") was " + status + ". " + (input.accept ? "You may now use channel_read and bot_send_message there." : "You are not a member of that Group.");
37227
37227
  database.transaction((db) => {
37228
37228
  db.prepare("UPDATE channel_records SET record_json = ? WHERE channel_id = ?").run(JSON.stringify(updated), channel.id);
37229
37229
  const sourceEventId = randomUUID();
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ToolCallKind, ToolCallView, ToolExecution } from "@deepseek-ai/dsh-tools";
1
+ import { ToolCallKind, ToolCallView, ToolDefinition, ToolExecution } from "@deepseek-ai/dsh-tools";
2
2
  import { parseArgs } from "node:util";
3
3
  import { DatabaseSync } from "node:sqlite";
4
4
  import { BlockAssembler, ContextFormed, ToolCallId } from "@deepseek-ai/dsh-llm";
@@ -10361,7 +10361,7 @@ interface OutboundMessaging {
10361
10361
  defaults<Platform extends string = 'feishu'>(platform?: Platform): MessagingDefaults<Platform>;
10362
10362
  setDefaults(input: MessagingDefaultsInput): Promise<MessagingDefaults>;
10363
10363
  identity(botSlug: string, input: MessagingIdentityInput): Promise<MessagingIdentity>;
10364
- reply(botSlug: string, sourceEventId: string, text: string): Promise<OutboxIntent>;
10364
+ reply(botSlug: string, sourceEventId: string, text: string, messageKey?: string): Promise<OutboxIntent>;
10365
10365
  privateInputNotice(botSlug: string, sourceEventId: string, requestId: string, webUrl: string, authority: PrivateReplyAuthority): Promise<OutboxIntent>;
10366
10366
  acquireFile(botSlug: string, sourceEventId: string, attachmentId: string, signal?: AbortSignal): Promise<ChannelAttachmentRef>;
10367
10367
  readChannelMedia(input: {
@@ -10376,7 +10376,7 @@ interface OutboundMessaging {
10376
10376
  inline?: boolean;
10377
10377
  }>;
10378
10378
  prepareAudio(botSlug: string, sourceEventId: string, attachmentId: string, signal?: AbortSignal): Promise<ChannelAttachmentRef>;
10379
- replyFile(botSlug: string, sourceEventId: string, file: ChannelAttachmentRef): Promise<OutboxIntent>;
10379
+ replyFile(botSlug: string, sourceEventId: string, file: ChannelAttachmentRef, messageKey?: string): Promise<OutboxIntent>;
10380
10380
  register(provider: MessagingProvider): () => void;
10381
10381
  snapshot(botSlug: string): Promise<MessagingSnapshot>;
10382
10382
  disableBot(botSlug: string): Promise<void>;
@@ -12384,10 +12384,18 @@ interface OrchestratorAssignmentAccess {
12384
12384
  }>;
12385
12385
  }
12386
12386
  interface OrchestratorAgentRun {
12387
+ replyDestination?(sourceEventId: string): {
12388
+ kind: 'external';
12389
+ } | {
12390
+ kind: 'channel';
12391
+ channelId: string;
12392
+ messageId: string;
12393
+ };
12387
12394
  tobCli?: boolean;
12388
12395
  inboxHistory?(input?: InboxHistoryInput): InboxHistoryPage;
12389
12396
  triage?: OrchestratorInboxTriage;
12390
12397
  acceptNativeInput?: () => boolean;
12398
+ setExecutionReady?(ready: boolean): void;
12391
12399
  requireContent?(): void;
12392
12400
  sessionId: string;
12393
12401
  resume: boolean;
@@ -12437,7 +12445,7 @@ interface OrchestratorAgentRun {
12437
12445
  read(sourceEventId: string): ExternalSource;
12438
12446
  share(sourceEventId: string, channelId: string): ReturnType<OutboundMessaging['inbound']['share']>;
12439
12447
  context(sourceEventId: string, query: ExternalContextQuery, signal?: AbortSignal): Promise<ExternalContextResult>;
12440
- reply(sourceEventId: string, text: string): ReturnType<OutboundMessaging['reply']>;
12448
+ reply(sourceEventId: string, text: string, messageKey?: string): ReturnType<OutboundMessaging['reply']>;
12441
12449
  saveFile(input: {
12442
12450
  sourceEventId: string;
12443
12451
  attachmentId: string;
@@ -12445,7 +12453,7 @@ interface OrchestratorAgentRun {
12445
12453
  destinationPath: string;
12446
12454
  representation?: 'playback';
12447
12455
  }): ReturnType<typeof saveAttachmentFile>;
12448
- replyFile(sourceEventId: string, fileId: string): ReturnType<OutboundMessaging['replyFile']>;
12456
+ replyFile(sourceEventId: string, fileId: string, messageKey?: string): ReturnType<OutboundMessaging['replyFile']>;
12449
12457
  };
12450
12458
  channels: OrchestratorChannelAccess;
12451
12459
  sourcePolicy?: {
@@ -12575,6 +12583,10 @@ interface BotCreateOutcome {
12575
12583
  model: 'host-default' | 'set';
12576
12584
  }
12577
12585
  interface OrchestratorChannelAccess {
12586
+ replySource?(sourceEventId: string): {
12587
+ channelId: string;
12588
+ messageId: string;
12589
+ };
12578
12590
  list(input?: ChannelListInput): ChannelListPage;
12579
12591
  read(input?: {
12580
12592
  channelId?: string;
@@ -12689,6 +12701,7 @@ interface OrchestratorChannelAccess {
12689
12701
  yieldToMessageIds?: string[];
12690
12702
  }): SendReviewOutcome;
12691
12703
  send(input: {
12704
+ replySourceEventId?: string;
12692
12705
  observationId?: string;
12693
12706
  draftId?: string;
12694
12707
  freshnessOverride?: FreshnessOverride;
@@ -12736,7 +12749,7 @@ interface BotAgentAdapter {
12736
12749
  stopBot?(botSlug: string, sessionIds: string[]): Promise<void>;
12737
12750
  releaseSession?(sessionId: string): Promise<void>;
12738
12751
  directTools?(): DirectBotToolSpec[];
12739
- runDirectTool?(run: OrchestratorAgentRun, tool: string, args: Record<string, unknown>, signal: AbortSignal): Promise<unknown>;
12752
+ runDirectTool?(run: OrchestratorAgentRun, tool: string, args: Record<string, unknown>, signal: AbortSignal, parentSessionId?: string): Promise<unknown>;
12740
12753
  close(): Promise<void>;
12741
12754
  }
12742
12755
  interface HandleDmMessageInput {
@@ -12762,7 +12775,6 @@ interface BotRuntime {
12762
12775
  captureTobCliAuthority?(sessionId: string): TobCliAuthority;
12763
12776
  canRequestPrivateInput?(sessionId: string, sourceEventId?: string): boolean;
12764
12777
  askChannel?(sessionId: string): string | undefined;
12765
- askNotice?(sessionId: string, toolName: string): string | undefined;
12766
12778
  bindPrivateInputOrigin?(sessionId: string, sourceEventId?: string): PrivateInputOrigin | undefined;
12767
12779
  beginAssignmentApprovalWait?(sessionId: string, callId: string, signal: AbortSignal): AssignmentApprovalWaitLease | undefined;
12768
12780
  assignmentApprovalWait?(sessionId: string, callId: string): AssignmentExecutionWait | undefined;
@@ -12772,6 +12784,7 @@ interface BotRuntime {
12772
12784
  bindNativeQuestionInput?(sessionId: string, channelId: string): ((deliver: () => boolean) => Promise<boolean>) | undefined;
12773
12785
  recoverNativeQuestionInput?(sessionId: string, channelId: string, requestMessageId: string): ((deliver: () => boolean) => Promise<boolean>) | undefined;
12774
12786
  nativeQuestionAvailable?(sessionId: string, channelId: string): boolean;
12787
+ prepareNativeOrchestratorStep?(sessionId: string, senderSessionIds: readonly string[], signal: AbortSignal): Promise<boolean>;
12775
12788
  originalAttachmentRoot?(sessionId: string, path: string, kind: 'read' | 'write', shell?: boolean): string | undefined;
12776
12789
  reconcileMemoryChangesOnStartup?(): void;
12777
12790
  retryDmMessage?(channelId: string, messageId: string): Promise<void>;
@@ -12870,6 +12883,7 @@ interface DshBotAgentAdapterOptions {
12870
12883
  agents: DshAgentHost;
12871
12884
  defaultModel: DshDefaultModelHost;
12872
12885
  resolveModelPlan?: (botSlug: string) => PersonaBotModelPlan | undefined;
12886
+ subagentTools?: (botSlug: string) => ToolDefinition[];
12873
12887
  hasSession?: (sessionId: string) => Promise<boolean>;
12874
12888
  prepareModelRoute?: (botSlug: string, role: 'orchestrator' | 'assignment', retainedRoute?: ModelRoute) => Promise<void>;
12875
12889
  resolveAgentPresets?: () => DshAgentPresetHost | undefined;
@@ -13954,6 +13968,17 @@ interface UsageProjection {
13954
13968
  idleCompactions(botSlug: string, sinceIso: string): IdleCompactionRecord[];
13955
13969
  }
13956
13970
  //#endregion
13971
+ //#region packages/core/src/runtime/subagent-model-tools.d.ts
13972
+ declare module '@deepseek-ai/dsh-jobs' {
13973
+ interface JobKindMap {
13974
+ subagent: 'subagent';
13975
+ }
13976
+ }
13977
+ interface BotSubagentPresetConfig {
13978
+ agentPreset?: string;
13979
+ allowedAgentPresets?: string[] | undefined;
13980
+ }
13981
+ //#endregion
13957
13982
  //#region packages/core/src/plugin.d.ts
13958
13983
  export declare const name = "botharness-core";
13959
13984
  export declare const inject: string[];
@@ -13963,6 +13988,7 @@ interface BotHarnessConfig {
13963
13988
  privateInputExecution?: boolean;
13964
13989
  privateInputWebUrl?: string;
13965
13990
  agentPreset?: string;
13991
+ subagent?: BotSubagentPresetConfig;
13966
13992
  activityDetailConsumers?: string[];
13967
13993
  marketplaceUrl?: string;
13968
13994
  telemetry?: boolean;