dsh-taskbridge 1.4.0 → 1.4.2

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/lib/client.js CHANGED
@@ -897,8 +897,17 @@ window.__ModuleLoader__.load({
897
897
  function isLiveTask(task) {
898
898
  return task?.state === "pending" || task?.state === "running";
899
899
  }
900
- function hasLiveTasks(tasks) {
901
- return Array.isArray(tasks) && tasks.some(isLiveTask);
900
+ function isTaskRecordChanging(task) {
901
+ if (isLiveTask(task)) return true;
902
+ if (task?.state === "awaiting-host-review") {
903
+ const persistence = task.reviewPersistence;
904
+ if (persistence !== null && typeof persistence === "object") return persistence.durable !== true;
905
+ return task.hostAcceptance === null || task.hostAcceptance === void 0;
906
+ }
907
+ return task?.reviewPersistence?.pending === true;
908
+ }
909
+ function hasChangingRecords(tasks) {
910
+ return Array.isArray(tasks) && tasks.some(isTaskRecordChanging);
902
911
  }
903
912
  function precheckMonitoring(monitoring) {
904
913
  const problems = [];
@@ -922,13 +931,16 @@ window.__ModuleLoader__.load({
922
931
  function taskOutcome(task) {
923
932
  const state = String(task?.state ?? "");
924
933
  const acceptance = task?.hostAcceptance;
925
- const accepted = acceptance !== null && acceptance !== void 0 && acceptance.accepted === true;
926
- const decided = acceptance !== null && acceptance !== void 0;
934
+ const persistence = task?.reviewPersistence;
935
+ const decided = acceptance !== null && acceptance !== void 0 && (persistence === null || persistence === void 0 || persistence.durable !== false);
936
+ const accepted = decided && acceptance?.accepted === true;
927
937
  const executed = state === "awaiting-host-review" || decided;
928
938
  let label;
929
939
  let tone;
930
940
  let note;
931
941
  let phaseLabel;
942
+ const saving = persistence?.pending === true;
943
+ const failedWrite = persistence?.state === "failed";
932
944
  if (accepted) {
933
945
  label = "审查通过";
934
946
  tone = "on";
@@ -939,6 +951,16 @@ window.__ModuleLoader__.load({
939
951
  tone = "warn";
940
952
  note = "宿主已记录验收结论:需要修正(本任务的执行结果未被接受)。";
941
953
  phaseLabel = null;
954
+ } else if (saving) {
955
+ label = persistence.state === "timed-out" ? "审查结论保存未确认" : "审查结论保存中";
956
+ tone = "warn";
957
+ note = persistence.state === "timed-out" ? "审查结论已发出但尚未确认写入;插件会继续读取同一任务直到确认,不要重新派工。" : "审查结论正在写入,确认保存后才会显示审查通过或需要修正。";
958
+ phaseLabel = null;
959
+ } else if (failedWrite) {
960
+ label = "审查结论保存失败";
961
+ tone = "warn";
962
+ note = "审查结论未能写入,未记录为已验收;可对同一任务重试。";
963
+ phaseLabel = null;
942
964
  } else if (state === "awaiting-host-review") {
943
965
  label = "等待宿主审查";
944
966
  tone = "warn";
@@ -970,6 +992,35 @@ window.__ModuleLoader__.load({
970
992
  const note = typeof acceptance.note === "string" && acceptance.note !== "" ? `:${boundedText(acceptance.note, 200)}` : "";
971
993
  return `${label}${at}${note}`;
972
994
  }
995
+ var REVIEW_NOTE_PREVIEW_CHARS = 200;
996
+ function reviewNotePreview(task) {
997
+ const acceptance = task?.hostAcceptance;
998
+ if (acceptance === null || acceptance === void 0) return null;
999
+ if (acceptance.noteOmitted === true && typeof acceptance.note !== "string") {
1000
+ const chars = Number.isFinite(acceptance.noteChars) ? acceptance.noteChars : 0;
1001
+ return { text: "", chars, truncated: chars > 0, omitted: true };
1002
+ }
1003
+ const note = typeof acceptance.note === "string" ? acceptance.note : "";
1004
+ const all = Array.from(note);
1005
+ return {
1006
+ text: all.slice(0, REVIEW_NOTE_PREVIEW_CHARS).join(""),
1007
+ chars: all.length,
1008
+ truncated: all.length > REVIEW_NOTE_PREVIEW_CHARS,
1009
+ omitted: false
1010
+ };
1011
+ }
1012
+ var RECORD_REFRESH_INTERVAL_MS = 5e3;
1013
+ function recordRefreshPlan(input = {}) {
1014
+ const all = [];
1015
+ if (Array.isArray(input.tasks)) all.push(...input.tasks);
1016
+ if (input.selectedTask !== null && input.selectedTask !== void 0) all.push(input.selectedTask);
1017
+ const changing = hasChangingRecords(all);
1018
+ const intervalMs = RECORD_REFRESH_INTERVAL_MS;
1019
+ if (input.visible === false) return { refresh: false, intervalMs, reason: "hidden" };
1020
+ if (changing !== true) return { refresh: false, intervalMs, reason: "settled" };
1021
+ if (input.loading === true) return { refresh: false, intervalMs, reason: "loading" };
1022
+ return { refresh: true, intervalMs, reason: "changing" };
1023
+ }
973
1024
  function changedFiles(task) {
974
1025
  const candidates = [task?.diff?.files, task?.diff?.changedFiles, task?.changedFiles];
975
1026
  for (const candidate of candidates) {
@@ -2913,6 +2964,45 @@ window.__ModuleLoader__.load({
2913
2964
  ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-faint", children: "关闭时不创建审查代理,也不发出任何审查请求。" })
2914
2965
  ] });
2915
2966
  }
2967
+ function ReviewNoteDetail({ task }) {
2968
+ const [open, setOpen] = (0, import_react.useState)(false);
2969
+ const [copyState, setCopyState] = (0, import_react.useState)(null);
2970
+ const preview = reviewNotePreview(task);
2971
+ if (preview === null) return "未记录(插件不会自行验收)";
2972
+ if (preview.omitted === true) {
2973
+ return `审查意见已保存(${preview.chars} 字符),当前读取结果省略正文;可在结果详情中按需读取全文。`;
2974
+ }
2975
+ if (preview.chars === 0) return "(无审查意见正文)";
2976
+ const full = typeof task?.hostAcceptance?.note === "string" ? task.hostAcceptance.note : "";
2977
+ const copy = () => {
2978
+ const clipboard = globalThis.navigator?.clipboard;
2979
+ if (typeof clipboard?.writeText !== "function") {
2980
+ setCopyState("复制失败:浏览器不支持写入剪贴板,请手动选择文本。");
2981
+ return;
2982
+ }
2983
+ void Promise.resolve().then(() => clipboard.writeText(full)).then(
2984
+ () => {
2985
+ setCopyState("已复制完整审查意见");
2986
+ },
2987
+ () => {
2988
+ setCopyState("复制失败:浏览器未允许写入剪贴板,请手动选择文本。");
2989
+ }
2990
+ );
2991
+ };
2992
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-note", children: [
2993
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-row", children: [
2994
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dshdg-hint", children: [
2995
+ preview.chars,
2996
+ " 字符"
2997
+ ] }),
2998
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshdg-spacer" }),
2999
+ preview.chars > REVIEW_NOTE_PREVIEW_CHARS ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: () => setOpen(!open), children: open ? "收起" : "展开全文" }) : null,
3000
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: copy, children: "复制全文" })
3001
+ ] }),
3002
+ copyState === null ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-hint", children: copyState }),
3003
+ open || preview.chars <= REVIEW_NOTE_PREVIEW_CHARS ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: "dshdg-mono dshdg-note-full", children: full }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { className: "dshdg-mono dshdg-note-preview", children: `${preview.text}…` })
3004
+ ] });
3005
+ }
2916
3006
  function TaskDetail({ store, task }) {
2917
3007
  const outcome = taskOutcome(task);
2918
3008
  const files = changedFiles(task);
@@ -2990,7 +3080,9 @@ window.__ModuleLoader__.load({
2990
3080
  review?.verdict === null || review?.verdict === void 0 ? "" : ` · ${REVIEW_VERDICT_LABELS[review.verdict] ?? review.verdict}`
2991
3081
  ] }),
2992
3082
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "宿主验收" }),
2993
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: hostReviewLine(task, formatTime) })
3083
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: hostReviewLine(task, formatTime) }),
3084
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", { children: "完整审查意见" }),
3085
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReviewNoteDetail, { task }, task.taskId) })
2994
3086
  ] }),
2995
3087
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: "改动文件" }),
2996
3088
  files === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-faint", children: "宿主未回报可识别的文件摘要,请以下方原始 diff 为准。" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "dshdg-mono", children: files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: file }, file)) }),
@@ -3036,37 +3128,55 @@ window.__ModuleLoader__.load({
3036
3128
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-hint", children: "重试前请确认顶部的本机调用开关已开启,然后在 MCP 宿主重新提交任务。本界面不会直接提交任务。" })
3037
3129
  ] });
3038
3130
  }
3039
- function useTaskAutoRefresh({ store, snapshot, intervalMs = 5e3 }) {
3040
- const live = hasLiveTasks(snapshot.tasks) || snapshot.taskDetail !== null && isLiveTask(snapshot.taskDetail);
3041
- const liveRef = (0, import_react.useRef)(live);
3042
- liveRef.current = live;
3131
+ function useTaskAutoRefresh({ store, snapshot, intervalMs = RECORD_REFRESH_INTERVAL_MS }) {
3132
+ const plan = recordRefreshPlan({
3133
+ tasks: snapshot.tasks,
3134
+ selectedTask: snapshot.taskDetail,
3135
+ visible: globalThis.document?.hidden !== true,
3136
+ loading: snapshot.loading?.tasks === true
3137
+ });
3138
+ const changing = hasChangingRecords([
3139
+ ...Array.isArray(snapshot.tasks) ? snapshot.tasks : [],
3140
+ ...snapshot.taskDetail === null || snapshot.taskDetail === void 0 ? [] : [snapshot.taskDetail]
3141
+ ]);
3142
+ const changingRef = (0, import_react.useRef)(changing);
3143
+ changingRef.current = changing;
3144
+ const [refreshError, setRefreshError] = (0, import_react.useState)(null);
3043
3145
  (0, import_react.useEffect)(() => {
3044
- if (!live) return void 0;
3146
+ if (!changing) return void 0;
3045
3147
  let timer = null;
3046
3148
  let disposed = false;
3149
+ let inFlight = false;
3047
3150
  const schedule = () => {
3048
3151
  if (disposed) return;
3049
3152
  if (timer !== null) clearTimeout(timer);
3050
3153
  timer = setTimeout(tick, intervalMs);
3051
3154
  timer.unref?.();
3052
3155
  };
3156
+ const read = () => {
3157
+ if (inFlight) return;
3158
+ inFlight = true;
3159
+ setRefreshError(null);
3160
+ void store.refreshTasks("auto").then((result) => {
3161
+ if (result?.ok === false) setRefreshError(describeError(result.error));
3162
+ }).finally(() => {
3163
+ inFlight = false;
3164
+ schedule();
3165
+ });
3166
+ };
3053
3167
  const tick = () => {
3054
3168
  timer = null;
3055
3169
  if (disposed) return;
3056
3170
  if (globalThis.document?.hidden === true) return;
3057
- if (!liveRef.current) return;
3058
- void store.refreshTasks("auto").finally(() => {
3059
- schedule();
3060
- });
3171
+ if (!changingRef.current) return;
3172
+ read();
3061
3173
  };
3062
3174
  const onVisibility = () => {
3063
3175
  if (globalThis.document?.hidden === true) return;
3064
- if (!liveRef.current) return;
3176
+ if (!changingRef.current) return;
3065
3177
  if (timer !== null) clearTimeout(timer);
3066
3178
  timer = null;
3067
- void store.refreshTasks("auto").finally(() => {
3068
- schedule();
3069
- });
3179
+ read();
3070
3180
  };
3071
3181
  schedule();
3072
3182
  const doc = globalThis.document;
@@ -3077,22 +3187,47 @@ window.__ModuleLoader__.load({
3077
3187
  timer = null;
3078
3188
  doc?.removeEventListener?.("visibilitychange", onVisibility);
3079
3189
  };
3080
- }, [store, live, intervalMs]);
3190
+ }, [store, changing, intervalMs]);
3191
+ return { ...plan, refreshError };
3192
+ }
3193
+ function TaskListNote({ task, onOpen }) {
3194
+ const preview = reviewNotePreview(task);
3195
+ if (preview === null) return null;
3196
+ if (preview.omitted === true) {
3197
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "dshdg-hint", children: [
3198
+ `审查意见已保存(${preview.chars} 字符),此处省略正文。`,
3199
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dshdg-link", onClick: onOpen, children: "查看完整审查意见" })
3200
+ ] });
3201
+ }
3202
+ if (preview.chars === 0) return null;
3203
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "dshdg-hint dshdg-note-preview", children: [
3204
+ `审查意见:${preview.text}${preview.truncated ? "…" : ""}(${preview.chars} 字符)`,
3205
+ preview.truncated ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "dshdg-link", onClick: onOpen, children: "查看完整审查意见" }) : null
3206
+ ] });
3081
3207
  }
3082
3208
  function TasksPanel({ store, snapshot }) {
3083
3209
  const tasks = snapshot.tasks ?? [];
3084
3210
  const detail = snapshot.taskDetail;
3085
- useTaskAutoRefresh({ store, snapshot });
3211
+ const plan = useTaskAutoRefresh({ store, snapshot });
3086
3212
  const liveCount = tasks.filter(isLiveTask).length;
3213
+ const changing = hasChangingRecords([
3214
+ ...tasks,
3215
+ ...detail === null || detail === void 0 ? [] : [detail]
3216
+ ]);
3087
3217
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-panel", children: [
3088
3218
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshdg-row", children: [
3089
3219
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-muted", children: "这里只记录执行事实。执行完成不等于被接受:“等待宿主审查”要由宿主(例如 Codex)单独给出结论。" }),
3090
3220
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshdg-spacer" }),
3091
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshdg-hint", children: liveCount === 0 && !(detail !== null && isLiveTask(detail)) ? "当前没有运行中的任务,不会自动刷新。" : `有 ${liveCount} 个进行中的任务,页面可见时每 5 秒自动刷新一次(只读,不调用模型)。` }),
3221
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshdg-hint", children: changing !== true ? "当前没有会变化的记录,不会自动刷新。" : `${liveCount > 0 ? `有 ${liveCount} 个进行中的任务;` : ""}有记录可能变化(待审或结论保存中),页面可见时每 5 秒只读刷新一次(不调用模型)。` }),
3092
3222
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", disabled: snapshot.loading?.tasks === true, onClick: () => {
3093
3223
  void store.refreshTasks("manual");
3094
3224
  }, children: snapshot.loading?.tasks === true ? "读取中…" : "刷新" })
3095
3225
  ] }),
3226
+ plan.refreshError !== null && plan.refreshError !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "dshdg-warn", children: [
3227
+ "自动刷新失败(",
3228
+ String(plan.refreshError),
3229
+ "),下面仍是上次读取的内容;可点“刷新”重试。"
3230
+ ] }) : null,
3096
3231
  tasks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-faint", children: "还没有任务记录。" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dshdg-list", children: tasks.map((task) => {
3097
3232
  const progress = taskProgress(task);
3098
3233
  const outcome = taskOutcome(task);
@@ -3135,6 +3270,9 @@ window.__ModuleLoader__.load({
3135
3270
  )
3136
3271
  ] }),
3137
3272
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-hint", children: progress.headline }),
3273
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TaskListNote, { task, onOpen: () => {
3274
+ void store.openTask(task.taskId);
3275
+ } }),
3138
3276
  isAwaitingPermission(task) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "dshdg-hint", children: permissionSummary(task).note }) : null
3139
3277
  ] }, task.taskId);
3140
3278
  }) }),
package/package.json CHANGED
@@ -1,143 +1,144 @@
1
- {
2
- "name": "dsh-taskbridge",
3
- "version": "1.4.0",
4
- "description": "让 Claude Code 或 Codex 指挥 DSH 完成任务;在 DSH 插件中配置 API、执行模型、思考强度、权限审批与集中审查。",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/ranranyya/dsh-taskbridge.git"
9
- },
10
- "homepage": "https://github.com/ranranyya/dsh-taskbridge#readme",
11
- "bugs": {
12
- "url": "https://github.com/ranranyya/dsh-taskbridge/issues"
13
- },
14
- "type": "module",
15
- "engines": {
16
- "node": ">=24",
17
- "dsh": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1"
18
- },
19
- "main": "src/index.js",
20
- "types": "src/index.d.ts",
21
- "exports": {
22
- ".": {
23
- "types": "./src/index.d.ts",
24
- "default": "./src/index.js"
25
- },
26
- "./client": {
27
- "types": "./lib/client.d.ts",
28
- "default": "./lib/client.js"
29
- },
30
- "./mcp": {
31
- "types": "./bin/dsh-delegate-mcp.d.ts",
32
- "default": "./bin/dsh-delegate-mcp.js"
33
- },
34
- "./package.json": "./package.json"
35
- },
36
- "bin": {
37
- "dsh-delegate-mcp": "bin/dsh-delegate-mcp.js",
38
- "dsh-delegate-codex-agent": "bin/dsh-delegate-codex-agent.js",
39
- "dsh-delegate-control": "bin/dsh-delegate-control.js",
40
- "dsh-taskbridge-mcp": "bin/dsh-delegate-mcp.js",
41
- "dsh-taskbridge-codex-agent": "bin/dsh-delegate-codex-agent.js",
42
- "dsh-taskbridge-control": "bin/dsh-delegate-control.js"
43
- },
44
- "files": [
45
- "src/**/*.js",
46
- "src/**/*.jsx",
47
- "src/**/*.d.ts",
48
- "lib/client.js",
49
- "lib/client.d.ts",
50
- "bin/dsh-delegate-mcp.js",
51
- "bin/dsh-delegate-mcp.d.ts",
52
- "bin/dsh-delegate-codex-agent.js",
53
- "bin/dsh-delegate-control.js",
54
- "bin/dsh-delegate-control.d.ts",
55
- "codex/dsh-taskbridge.toml",
56
- "cordis.patch.yml",
57
- "README.md",
58
- "LICENSE",
59
- "CHANGELOG.md",
60
- "docs/auth-contract.md",
61
- "docs/codex-integration.md",
62
- "docs/conversation-placement.md",
63
- "docs/contracts-stage-b.md",
64
- "docs/redaction-contract.md",
65
- "docs/runtime-compatibility.md",
66
- "docs/silent-wait.md",
67
- "docs/worker-permissions.md",
68
- "docs/workspace-contract.md",
69
- "icon.svg",
70
- "locale/*.json",
71
- "docs/INTRODUCTION.zh.md",
72
- "docs/INTRODUCTION.md",
73
- "docs/taskdispatch-upgrade.md",
74
- "docs/claude-code.md",
75
- "docs/plugin-market.md",
76
- "docs/taskbridge-upgrade.md",
77
- "docs/releases/1.4.0.zh.md",
78
- "docs/releases/1.4.0-token-benchmark.zh.md"
79
- ],
80
- "dsh": {
81
- "manifestVersion": 1,
82
- "bundle": {
83
- "patch": "./cordis.patch.yml"
84
- },
85
- "client": {
86
- "inject": [
87
- "@deepseek-ai/dsh-client-ui-renderer",
88
- "@deepseek-ai/dsh-client-ui-plugin-manager"
89
- ],
90
- "platform": "web"
91
- }
92
- },
93
- "peerDependencies": {
94
- "@deepseek-ai/dsh-agent": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1",
95
- "@deepseek-ai/dsh-llm": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1",
96
- "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1",
97
- "@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1",
98
- "@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.2-rc.1",
99
- "@earendil-works/pi-ai": "^0.87.1 || ^1.1.0"
100
- },
101
- "dependencies": {
102
- "@deepseek-ai/schemastery": "~3.18.4"
103
- },
104
- "devDependencies": {
105
- "@deepseek-ai/cordis": "4.0.5",
106
- "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
107
- "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
108
- "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
109
- "@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
110
- "@deepseek-ai/dsh-session": "0.2.0-rc.2",
111
- "@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
112
- "@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
113
- "@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
114
- "@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
115
- "@deepseek-ai/schemastery": "~3.18.4",
116
- "@earendil-works/pi-ai": "^0.87.1",
117
- "esbuild": "0.25.11"
118
- },
119
- "scripts": {
120
- "test": "node --test --test-concurrency=1 tests/*.test.js",
121
- "test:isolated": "node --test tests/*.test.js",
122
- "build:client": "node scripts/build-client.mjs",
123
- "check:client": "node scripts/build-client.mjs --check",
124
- "mcp": "node bin/dsh-delegate-mcp.js",
125
- "codex-agent": "node bin/dsh-delegate-codex-agent.js",
126
- "control": "node bin/dsh-delegate-control.js",
127
- "pack:dry": "npm pack --dry-run",
128
- "build:market": "node scripts/build-plugin-market.mjs",
129
- "verify:silent-wait": "node scripts/verify-silent-wait.mjs --duration-seconds 1200"
130
- },
131
- "keywords": [
132
- "dsh",
133
- "dsh-plugin",
134
- "deepseek-harness",
135
- "taskbridge",
136
- "codex",
137
- "claude-code",
138
- "mcp",
139
- "delegation"
140
- ],
141
- "author": "ranranyya",
142
- "icon": "./icon.svg"
143
- }
1
+ {
2
+ "name": "dsh-taskbridge",
3
+ "version": "1.4.2",
4
+ "description": "让 Claude Code 或 Codex 指挥 DSH 完成任务;在 DSH 插件中配置 API、执行模型、思考强度、权限审批与集中审查。",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/ranranyya/dsh-taskbridge.git"
9
+ },
10
+ "homepage": "https://github.com/ranranyya/dsh-taskbridge#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/ranranyya/dsh-taskbridge/issues"
13
+ },
14
+ "type": "module",
15
+ "engines": {
16
+ "node": ">=24"
17
+ },
18
+ "main": "src/index.js",
19
+ "types": "src/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./src/index.d.ts",
23
+ "default": "./src/index.js"
24
+ },
25
+ "./client": {
26
+ "types": "./lib/client.d.ts",
27
+ "default": "./lib/client.js"
28
+ },
29
+ "./mcp": {
30
+ "types": "./bin/dsh-delegate-mcp.d.ts",
31
+ "default": "./bin/dsh-delegate-mcp.js"
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
35
+ "bin": {
36
+ "dsh-delegate-mcp": "bin/dsh-delegate-mcp.js",
37
+ "dsh-delegate-codex-agent": "bin/dsh-delegate-codex-agent.js",
38
+ "dsh-delegate-control": "bin/dsh-delegate-control.js",
39
+ "dsh-taskbridge-mcp": "bin/dsh-delegate-mcp.js",
40
+ "dsh-taskbridge-codex-agent": "bin/dsh-delegate-codex-agent.js",
41
+ "dsh-taskbridge-control": "bin/dsh-delegate-control.js"
42
+ },
43
+ "files": [
44
+ "src/**/*.js",
45
+ "src/**/*.jsx",
46
+ "src/**/*.d.ts",
47
+ "lib/client.js",
48
+ "lib/client.d.ts",
49
+ "bin/dsh-delegate-mcp.js",
50
+ "bin/dsh-delegate-mcp.d.ts",
51
+ "bin/dsh-delegate-codex-agent.js",
52
+ "bin/dsh-delegate-control.js",
53
+ "bin/dsh-delegate-control.d.ts",
54
+ "codex/dsh-taskbridge.toml",
55
+ "cordis.patch.yml",
56
+ "README.md",
57
+ "LICENSE",
58
+ "CHANGELOG.md",
59
+ "docs/auth-contract.md",
60
+ "docs/codex-integration.md",
61
+ "docs/conversation-placement.md",
62
+ "docs/contracts-stage-b.md",
63
+ "docs/redaction-contract.md",
64
+ "docs/runtime-compatibility.md",
65
+ "docs/silent-wait.md",
66
+ "docs/worker-permissions.md",
67
+ "docs/workspace-contract.md",
68
+ "icon.svg",
69
+ "locale/*.json",
70
+ "docs/INTRODUCTION.zh.md",
71
+ "docs/INTRODUCTION.md",
72
+ "docs/taskdispatch-upgrade.md",
73
+ "docs/claude-code.md",
74
+ "docs/plugin-market.md",
75
+ "docs/taskbridge-upgrade.md",
76
+ "docs/releases/1.4.0.zh.md",
77
+ "docs/releases/1.4.0-token-benchmark.zh.md",
78
+ "docs/releases/1.4.1.zh.md",
79
+ "docs/releases/1.4.2.zh.md"
80
+ ],
81
+ "dsh": {
82
+ "manifestVersion": 1,
83
+ "bundle": {
84
+ "patch": "./cordis.patch.yml"
85
+ },
86
+ "client": {
87
+ "inject": [
88
+ "@deepseek-ai/dsh-client-ui-renderer",
89
+ "@deepseek-ai/dsh-client-ui-plugin-manager"
90
+ ],
91
+ "platform": "web"
92
+ }
93
+ },
94
+ "peerDependencies": {
95
+ "@deepseek-ai/dsh-agent": "*",
96
+ "@deepseek-ai/dsh-llm": "*",
97
+ "@deepseek-ai/dsh-llm-pi-ai": "*",
98
+ "@deepseek-ai/dsh-tool-fs": "*",
99
+ "@deepseek-ai/dsh-tool-fs-search": "*",
100
+ "@earendil-works/pi-ai": "^0.87.1 || ^1.1.0"
101
+ },
102
+ "dependencies": {
103
+ "@deepseek-ai/schemastery": "~3.18.4"
104
+ },
105
+ "devDependencies": {
106
+ "@deepseek-ai/cordis": "4.0.5",
107
+ "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
108
+ "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
109
+ "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
110
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.2",
111
+ "@deepseek-ai/dsh-session": "0.2.0-rc.2",
112
+ "@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
113
+ "@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
114
+ "@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
115
+ "@deepseek-ai/dsh-user-approval": "0.2.0-rc.2",
116
+ "@deepseek-ai/schemastery": "~3.18.4",
117
+ "@earendil-works/pi-ai": "^0.87.1",
118
+ "esbuild": "0.25.11"
119
+ },
120
+ "scripts": {
121
+ "test": "node --test --test-concurrency=1 tests/*.test.js",
122
+ "test:isolated": "node --test tests/*.test.js",
123
+ "build:client": "node scripts/build-client.mjs",
124
+ "check:client": "node scripts/build-client.mjs --check",
125
+ "mcp": "node bin/dsh-delegate-mcp.js",
126
+ "codex-agent": "node bin/dsh-delegate-codex-agent.js",
127
+ "control": "node bin/dsh-delegate-control.js",
128
+ "pack:dry": "npm pack --dry-run",
129
+ "build:market": "node scripts/build-plugin-market.mjs",
130
+ "verify:silent-wait": "node scripts/verify-silent-wait.mjs --duration-seconds 1200"
131
+ },
132
+ "keywords": [
133
+ "dsh",
134
+ "dsh-plugin",
135
+ "deepseek-harness",
136
+ "taskbridge",
137
+ "codex",
138
+ "claude-code",
139
+ "mcp",
140
+ "delegation"
141
+ ],
142
+ "author": "ranranyya",
143
+ "icon": "./icon.svg"
144
+ }