chore(dsh): 跟上游插件改名 dsh-events,并删掉一条会随机变红的联机验收 (#980)
* rename: 上游插件改名 dsh-jsonl -> dsh-events,同步 vendor 与常量 插件仓库改了名。`jsonl` 说的是输出格式,不是它给你什么——目标用户是想把 dsh 接进 GUI / 编辑器 / CI 的人,他们脑子里的词是「事件」,不是「JSON Lines」。而且别家都不这么 叫(Claude Code 是 --output-format stream-json,Codex 是 --json,OpenCode 是 --format json),有人来找这个能力时搜的是 "dsh json output"。 趁 npm 还没发布、还没对外宣传时改,代价只有改几个文件。旧 URL 有 GitHub 重定向兜底, 但留着迟早会成为断链。 跟着改的:vendor 文件名、同步脚本名、两个常量、环境变量名、模块文档与注释里的链接。 vendor 文件是用改名后的脚本重新生成的,不是手改——review 时加进来的来源与 MIT 许可头 原样保留。 * test(dsh): 删掉一条红绿取决于模型心情的联机验收 `tmp_is_writable_by_design_and_we_cannot_narrow_it` 想把「$TMPDIR 可写且收不掉」这个 dsh 既有行为钉成契约。但验证它必然要让模型去写文件,而 dsh 有**两道松紧不同的围栏**: bash(seatbelt 子进程沙箱) 工作目录 + /tmp + $TMPDIR write / edit(进程内 fs 围栏) 只有工作目录 prompt 里写了「用 bash 执行」,模型照做就绿,改用 write 就红。实测两种都出现过:一次 文件真落下去(bash),一次模型回 DONE 但文件根本没建(write)。这条测试的红绿反映的是 模型当次的选择,不是被测系统的行为——正是它上面那条注释批评过的毛病,我自己又犯了一遍。 那张「两道围栏」的表挪进模块文档,并写明为什么不做成测试。留下的 `sandbox_blocks_writes_outside_the_workspace` 打的是家目录,两道围栏都挡,不受工具选择 影响,那条才作数。
This commit is contained in:
1 parent
b7ac91f0e6
commit
aa0acf8827
3 files changed
+64
-85
No files matched your search
+10
-10
@@ -1,33 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copy the dsh-jsonl plugin into OpenLess.
|
||||
# Copy the dsh-events plugin into OpenLess.
|
||||
#
|
||||
# The plugin's source of truth is github.com/bigsongeth/dsh-jsonl. OpenLess
|
||||
# The plugin's source of truth is github.com/bigsongeth/dsh-events. OpenLess
|
||||
# embeds the source with its provenance and MIT license (via include_str!) so
|
||||
# the app needs no npm install and no network at runtime. Nothing syncs the two automatically —
|
||||
# run this after the upstream plugin changes, then run the dsh live acceptance
|
||||
# (see coding_agent::dsh::live) to confirm the Rust parser still agrees with it.
|
||||
#
|
||||
# scripts/vendor-dsh-jsonl.sh ~/Personal/dsh-jsonl
|
||||
# scripts/vendor-dsh-events.sh ~/Personal/dsh-events
|
||||
set -euo pipefail
|
||||
|
||||
SRC="${1:-}"
|
||||
if [[ -z "$SRC" || ! -f "$SRC/index.js" || ! -f "$SRC/package.json" || ! -f "$SRC/LICENSE" ]]; then
|
||||
echo "usage: $0 <path-to-dsh-jsonl-checkout>" >&2
|
||||
echo "usage: $0 <path-to-dsh-events-checkout>" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
VERSION=$(node -p "require('$SRC/package.json').version")
|
||||
DEST="$(cd "$(dirname "$0")/.." && pwd)/app/src-tauri/src/coding_agent/vendor/dsh-jsonl.js"
|
||||
DEST="$(cd "$(dirname "$0")/.." && pwd)/app/src-tauri/src/coding_agent/vendor/dsh-events.js"
|
||||
|
||||
{
|
||||
echo "// Vendored from github.com/bigsongeth/dsh-jsonl v${VERSION} — do not edit here."
|
||||
echo "// Run scripts/vendor-dsh-jsonl.sh <path-to-checkout> to update, then bump"
|
||||
echo "// VENDORED_DSH_JSONL_VERSION in dsh.rs to match."
|
||||
echo "// Vendored from github.com/bigsongeth/dsh-events v${VERSION} — do not edit here."
|
||||
echo "// Run scripts/vendor-dsh-events.sh <path-to-checkout> to update, then bump"
|
||||
echo "// VENDORED_DSH_EVENTS_VERSION in dsh.rs to match."
|
||||
echo "//"
|
||||
awk '{ print (length($0) ? "// " $0 : "//") }' "$SRC/LICENSE"
|
||||
echo "//"
|
||||
cat "$SRC/index.js"
|
||||
} > "$DEST"
|
||||
|
||||
echo "vendored dsh-jsonl v${VERSION} -> ${DEST}"
|
||||
echo "next: set VENDORED_DSH_JSONL_VERSION = \"${VERSION}\" in coding_agent/dsh.rs"
|
||||
echo "vendored dsh-events v${VERSION} -> ${DEST}"
|
||||
echo "next: set VENDORED_DSH_EVENTS_VERSION = \"${VERSION}\" in coding_agent/dsh.rs"
|
||||
Reference in new issue
Block a user