teamsmith 0.4.1 → 0.4.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.
- package/package.json +1 -1
- package/skills/teamsmith/CHANGELOG.md +18 -0
- package/skills/teamsmith/SKILL.md +1 -1
- package/skills/teamsmith/extension/team-reply.ts +16 -2
- package/skills/teamsmith/scripts/lib/common.sh +1 -1
- package/skills/teamsmith/scripts/panel/panel.js +56 -56
- package/skills/teamsmith/scripts/panel/src/layout.ts +8 -10
- package/skills/teamsmith/scripts/panel/src/strings/en.ts +2 -2
- package/skills/teamsmith/scripts/panel/src/strings/zh.ts +3 -2
- package/skills/teamsmith/scripts/reply-capture.mjs +9 -16
- package/skills/teamsmith/scripts/team +3 -1
- package/skills/teamsmith/tests/key-replies-pty.sh +11 -11
- package/skills/teamsmith/tests/lib/reply-fixture.sh +4 -4
- package/skills/teamsmith/tests/reply-capture.mjs +168 -99
- package/skills/teamsmith/tests/slash-team.sh +4 -4
- package/skills/teamsmith-init/SKILL.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamsmith",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Turn one agent session into a project owner: self-contained task briefs dispatched to worker agents in their own git worktrees, independent verification on a separate checkout, and an auditable ledger (BOARD / reviews / threads / DECISIONS). Runs on Pi today.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -5,6 +5,24 @@
|
|
|
5
5
|
> `SKILL.md`/`references/**`/`templates/**`/`extension/**` 在 Pi 里输入 `/reload`(或 `/pi-team-reload`)即生效;
|
|
6
6
|
> 判断自己是不是旧的:`team mark-loaded`(开局记一次)→ `team version --check`。
|
|
7
7
|
|
|
8
|
+
## v0.4.3(2026-11-05)
|
|
9
|
+
|
|
10
|
+
让"回复没进编号回复页"这件事留下可查的原因。
|
|
11
|
+
|
|
12
|
+
- 扩展的诊断行不再只写 stderr(TUI 里看不见):同时追加到 `.pi/team/state/reply-capture/diagnostics.log`,超过 256 KB 保留最近 400 行。
|
|
13
|
+
- 收束时若判定当前会话不合格,会记一条 `ineligible-at-turn`,不再无声丢弃待发布的条目。
|
|
14
|
+
|
|
15
|
+
行为未变,只是把失败原因写下来。
|
|
16
|
+
|
|
17
|
+
## v0.4.2(2026-11-05)
|
|
18
|
+
|
|
19
|
+
修复续用旧会话的 PM 无法捕获关键回复:会话文件被过度严格的权限判据拒绝注册。
|
|
20
|
+
|
|
21
|
+
- 目录与文件的检查不再看组可写、他人可写、硬链接数:那是为“别的用户替换我的文件”设计的,而这是本地单用户工具。标准布局(775 目录、664 文件)不再被判不安全。
|
|
22
|
+
- 保留真正防事故的检查:路径规范化、必须是主检出、tmux 会话/窗口与进程证据、启动凭证、不跟随符号链接、属主必须是运行者本人、写入用 `flock` 加原子替换。
|
|
23
|
+
|
|
24
|
+
升级方式:`npm i -g teamsmith@0.4.2`,在 Pi 中 `/reload` 或重启 PM。无需修改任何目录或文件权限。
|
|
25
|
+
|
|
8
26
|
## v0.4.1(2026-11-05)
|
|
9
27
|
|
|
10
28
|
修复 0.4.0 的一处功能失效:关键回复在组可写的项目目录下从不注册。
|
|
@@ -3,7 +3,7 @@ name: teamsmith
|
|
|
3
3
|
description: teamsmith gives one agent real ownership of a project — it plans, writes self-contained task briefs, dispatches worker agents into their own tmux windows and git worktrees, verifies their work on an independent checkout, merges, and keeps an auditable ledger (BOARD/reviews/threads/DECISIONS). A pulse window (the periodic patrol) wakes the owner only when there is pending work, and the owner can deliberately stand down. Works with Pi; the launch/notify seam is an internal seam (frozen) reserved for a possible future non-Pi adapter, with no compatibility promise. Use when the user wants an agent to own a project end to end, dispatch tasks to worker agents, run agents in parallel in tmux with git worktree isolation, act as a PM/orchestrator over other agents, review an agent's work independently, run the patrol (`pulse`) as a tmux window, wake the PM only when there is pending work, or resume and coordinate a multi-agent project. To start a new project, use the teamsmith-init skill.
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.4.
|
|
6
|
+
version: "0.4.3"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# teamsmith · one agent that actually owns the project
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** PM-only, explicit live-message capture. No tools, provider hooks, history import, or automatic selection. */
|
|
2
2
|
import type { ExtensionAPI, ExtensionContext } from '@earendil-works/pi-coding-agent'
|
|
3
3
|
import { createHash, randomUUID } from 'node:crypto'
|
|
4
|
-
import { readFileSync, realpathSync } from 'node:fs'
|
|
4
|
+
import { appendFileSync, readFileSync, realpathSync, statSync, writeFileSync } from 'node:fs'
|
|
5
5
|
import { dirname, join } from 'node:path'
|
|
6
6
|
import { fileURLToPath } from 'node:url'
|
|
7
7
|
import { isDeepStrictEqual } from 'node:util'
|
|
@@ -39,7 +39,21 @@ export default async function (pi: ExtensionAPI) {
|
|
|
39
39
|
})
|
|
40
40
|
const diagnostic = (d: { reason: string; entryId: string; path: string }) => {
|
|
41
41
|
// Never title/body/model text. Diagnostics are separate from the ordinary answer, including print/JSON modes.
|
|
42
|
-
|
|
42
|
+
const line = `[team-reply] ${d.reason}; source=${d.entryId || 'unbound'}; evidence=${d.path}\n`
|
|
43
|
+
process.stderr.write(line)
|
|
44
|
+
// A TUI swallows stderr, so the same line also lands beside the journal: without it a refused
|
|
45
|
+
// publication leaves no trace at all and the only symptom is a reply page that never grows.
|
|
46
|
+
try {
|
|
47
|
+
const state = registration?.state
|
|
48
|
+
if (!state) return
|
|
49
|
+
const file = join(state, 'reply-capture', 'diagnostics.log')
|
|
50
|
+
appendFileSync(file, `${new Date().toISOString()} ${line}`)
|
|
51
|
+
const stat = statSync(file)
|
|
52
|
+
if (stat.size > 256 * 1024) {
|
|
53
|
+
const kept = readFileSync(file, 'utf8').split('\n').slice(-400).join('\n')
|
|
54
|
+
writeFileSync(file, kept)
|
|
55
|
+
}
|
|
56
|
+
} catch { /* A diagnostic sink that cannot be written must not block cleanup. */ }
|
|
43
57
|
}
|
|
44
58
|
const runtime = (status: string, reason?: string) => {
|
|
45
59
|
if (!current()) return
|