dsh-task-ledger 0.1.7 → 0.1.8

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/dist/client.js CHANGED
@@ -68799,7 +68799,7 @@ body[data-ds-dark-theme]{
68799
68799
  variant: "outline",
68800
68800
  size: "md",
68801
68801
  onClick: onBack
68802
- }, `← ${t("backToConversation")}`), (0, react$1.createElement)("div", { style: titleStyle }, t("panelTitle"), (0, react$1.createElement)("span", { style: buildTagStyle }, `v0.1.7 261108-021844-562`))), (0, react$1.createElement)("div", { style: {
68802
+ }, `← ${t("backToConversation")}`), (0, react$1.createElement)("div", { style: titleStyle }, t("panelTitle"), (0, react$1.createElement)("span", { style: buildTagStyle }, `v0.1.7 261108-114806-978`))), (0, react$1.createElement)("div", { style: {
68803
68803
  display: "flex",
68804
68804
  alignItems: "center",
68805
68805
  gap: "var(--dtl-space-3)"
@@ -2,14 +2,25 @@ import { spawn } from "node:child_process";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { IdentityMissingError } from "../errors.js";
4
4
  /**
5
- * 内嵌 skill 入口的默认路径:dist/host/repositories/runner.js → 包根 skill/scripts/progress
6
- * (比原 host/script.js 深一层 ⇒ 相对路径多一级 `../`)。
5
+ * 内嵌 skill 的平台入口:dist/host/repositories/runner.js → 包根 skill/scripts(比原
6
+ * host/script.js 深一层 ⇒ 相对路径多一级 `../`)。
7
+ *
8
+ * POSIX:`scripts/progress` 这个薄 shell 包装,按平台 exec `scripts/bin/ledger-<os>-<arch>`
9
+ * (自带运行时的静态二进制)——所以本插件不需要系统装任何运行时。
10
+ *
11
+ * Windows:不能起这个包装。CreateProcessW 不执行无扩展名的 sh 脚本,还会按扩展名补
12
+ * `.exe` 去找 `scripts/progress.exe`,结果就是 spawn ENOENT(issue #1)⇒ 直接起
13
+ * `scripts/bin/` 下的静态二进制。Windows 资产目前只有 amd64 一份,Intel 与 ARM64 都能跑。
7
14
  *
8
- * 这是个薄 shell 包装,按平台 exec `skill/scripts/bin/ledger-<os>-<arch>`(自带运行时的
9
- * 静态二进制)——所以本插件不需要系统装任何运行时。
10
15
  * 构建时 scripts/copy-skill.mjs 把 packages/skill 的运行时拷到 packages/plugin/skill/。
11
16
  */
12
- const DEFAULT_SCRIPT_PATH = fileURLToPath(new URL("../../../skill/scripts/progress", import.meta.url));
17
+ function defaultScriptPath() {
18
+ if (process.platform === "win32") {
19
+ return fileURLToPath(new URL("../../../skill/scripts/bin/ledger-windows-amd64.exe", import.meta.url));
20
+ }
21
+ return fileURLToPath(new URL("../../../skill/scripts/progress", import.meta.url));
22
+ }
23
+ const DEFAULT_SCRIPT_PATH = defaultScriptPath();
13
24
  /** 单次脚本调用超时上限(ms)。实测单仓 5 万行全量 1.2s,10s 是宽松上限。 */
14
25
  const DEFAULT_TIMEOUT_MS = 10_000;
15
26
  /** 脚本绝对路径(界面上要写给用户复制的命令用;别在别处再拼一份)。 */
@@ -80,9 +80,11 @@ function sendWriteFailure(res, error) {
80
80
  }
81
81
  sendFailure(res, error);
82
82
  }
83
- /** 界面上给用户复制到终端的 init 命令(有工作区就带上 --repo,否则脚本找不到台账)。 */
83
+ /** 界面上给用户复制到终端的 init 命令(有工作区就带上 --repo,否则脚本找不到台账)。
84
+ * Windows 上 scriptPath() 已经是 bin 下的 exe,不能加 `sh ` 前缀。 */
84
85
  function initCommandOf(repoPath) {
85
- const head = `sh "${scriptPath()}" init`;
86
+ const entry = scriptPath();
87
+ const head = process.platform === "win32" ? `"${entry}" init` : `sh "${entry}" init`;
86
88
  return repoPath === "" ? head : `${head} --repo "${repoPath}"`;
87
89
  }
88
90
  /** 换身份请求体 → 动作参数(名字 / uuid 的合法性由 skill 再判一次,这里只挡形状)。 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-task-ledger",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Tasks are created, claimed, advanced and closed by the agent and written straight into a plain-text ledger in the workspace, so the owner, the current state and the next step are always on record. It is not limited to development work — research, documentation, presentations and video production all fit. No cloud service is involved: everything is managed locally. Single-user and multi-user both work, with Git synchronisation, and every action is on record. The control panel summarises in-flight, overdue and stalled work with weekly trends.",
5
5
  "icon": "./assets/icon.svg",
6
6
  "keywords": [
package/skill/SKILL.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: task-ledger
3
3
  description: 本地任务台账,跨会话记录在办任务的归属、进度与起止。当用户要登记一件新的事(新建任务 / 建个坑 / 这活我领了)、记录已有任务的进展(接着做 / 记一条进展 / 这轮先记下)、查看任务状态或历史(现在该做什么 / 这活谁在做 / 上周做过什么)、给任务结案 / 取消作废 / 退回(做完了 / 验收通过 / 取消 / 作废 / 退回待认领)、删除建错的或垃圾任务(只认「删除」二字)、整理标签或检查台账一致性时加载;同一件事做了多轮、用户始终没提记账时也加载,问一句要不要建台账(只提醒一次,无需就忽略)。
4
- version: 1.3.57
4
+ version: 1.3.58
5
5
  allowed-tools: Read,Edit,Bash,Grep
6
6
  ---
7
7
 
@@ -319,6 +319,7 @@ allowed-tools: Read,Edit,Bash,Grep
319
319
  - **不需要安装任何东西**(不装解释器、不装运行时、不往 PATH 里加命令):直接执行上面那条绝对路径即可。
320
320
  - 若报 `Permission denied`(某些安装环节会丢可执行位),前面加 `sh `:`sh <本 SKILL.md 所在目录>/scripts/progress <子命令> …`。
321
321
  - **交给用户的命令必须是这个绝对路径**,不许简写成 `progress` —— 用户机器的 PATH 里没有这个命令,简写后用户一跑就是 `command not found`。
322
+ - **Windows 上直接跑 `scripts/bin/ledger-windows-amd64.exe`**:`scripts/progress` 是无扩展名的 sh 包装,CreateProcessW 不会执行它(还会按扩展名补 `.exe` 去找 → 报找不到)。同一目录下的 exe 参数完全一致;Git Bash / WSL 里仍可用 `scripts/progress`。
322
323
 
323
324
  - 定位项目:`--repo <工作区根>`(**直接含有 `ledger/` 的那个目录**)给了就校验后用;不给就从当前目录逐级向上找。当前目录已经在这个工作区里时不要带 `--repo`,只有要操作别的工作区才带。`ledger/` 本身、以及它下面的任何子目录都不是根,指过去会被直接拒绝(判据只看位置,不看目录里有哪些文件 —— 项目根自带 `pool.json`、`history/`、`worklog/` 都不影响)。
324
325
  - `--no-sync`(放在子命令**前**):用户明确要求「先别同步」时才用;之后自己 `git add ledger && commit && push`。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "task-ledger",
3
- "version": "1.3.57",
3
+ "version": "1.3.58",
4
4
  "description": "Task-ledger skill for coding agents: per-workspace progress tracking (ledger/pool.json + owners/<hash>.json shards + owners.json index, history, worklog) driven by a CLI script. Standalone install for CodeBuddy and other agents; also bundled inside the dsh-task-ledger DSH plugin.",
5
5
  "keywords": [
6
6
  "skill",