peertable 0.8.40 → 0.8.41
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peertable",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.41",
|
|
4
4
|
"description": "A round table of peer agents. No orchestrator at the head. Turn Claude Code, Codex, and Grok sessions into a team of equal, long-lived peers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/room/client.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { boundedRecent, boundedUnread } from './message-bounds.mjs'
|
|
|
14
14
|
|
|
15
15
|
// client.mjs 側のハードコード版数。package.json の version と一致していることを
|
|
16
16
|
// diagnostics の version_consistency が見る(2 つの版数源の drift 検出。決定45)
|
|
17
|
-
const MCP_VERSION = '0.8.
|
|
17
|
+
const MCP_VERSION = '0.8.41'
|
|
18
18
|
const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
19
19
|
|
|
20
20
|
const USAGE = `usage:
|
|
@@ -53,8 +53,19 @@ fi
|
|
|
53
53
|
# **手渡された env を常駐へ渡す。** 新しい session が継ぐのは tmux *server* の環境であって
|
|
54
54
|
# 呼び出し元 client の環境ではないので、素で起こすと `PEERTABLE_TMUX_SOCKET` の手渡しが黙って消え、
|
|
55
55
|
# 常駐が別の socket(本番の既定)を観測しにいく(2026-08-11 実測)。決定73 と同じ形の裏返しである。
|
|
56
|
+
# **秘密値はコマンドラインへ載せない。** `env PEERTABLE_POST_TOKEN=… node …` の形は
|
|
57
|
+
# tmux のsession起動コマンドと ps の両方に平文で残る(2026-08-30 実測)。トークンは
|
|
58
|
+
# 0600 の credential file へ落とし、常駐へはそのパスだけを渡す(bridge 側の
|
|
59
|
+
# resolvePostToken が PEERTABLE_CREDENTIAL_FILE → ~/.config/peertable.env の順で読む)
|
|
60
|
+
if [ -n "${PEERTABLE_POST_TOKEN:-}" ] && [ -z "${PEERTABLE_CREDENTIAL_FILE:-}" ]; then
|
|
61
|
+
cred_dir="$proj/.team/credentials"
|
|
62
|
+
mkdir -p "$cred_dir" && chmod 700 "$cred_dir"
|
|
63
|
+
( umask 177; printf '%s\n' "$PEERTABLE_POST_TOKEN" > "$cred_dir/bridge.token" )
|
|
64
|
+
PEERTABLE_CREDENTIAL_FILE="$cred_dir/bridge.token"
|
|
65
|
+
export PEERTABLE_CREDENTIAL_FILE
|
|
66
|
+
fi
|
|
56
67
|
env_prefix=""
|
|
57
|
-
for v in PEERTABLE_TMUX_SOCKET
|
|
68
|
+
for v in PEERTABLE_TMUX_SOCKET PEERTABLE_CREDENTIAL_FILE PEERTABLE_URL PEERTABLE_PARENT_NAME; do
|
|
58
69
|
eval "val=\${$v:-}"
|
|
59
70
|
[ -n "$val" ] && env_prefix="$env_prefix $v=$(printf '%q' "$val")"
|
|
60
71
|
done
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { resolve } from 'node:path'
|
|
3
3
|
import { fileURLToPath } from 'node:url'
|
|
4
4
|
|
|
5
|
+
// PEERTABLE_POST_TOKEN は渡さない——EncodedCommand は base64 なだけで process 一覧から
|
|
6
|
+
// 復元できる。秘密値は ensure-bridge.sh が credential file へ落とし、ここへはパスだけが来る
|
|
5
7
|
const FORWARDED_ENV = [
|
|
6
8
|
'PEERTABLE_TMUX_SOCKET',
|
|
7
|
-
'PEERTABLE_POST_TOKEN',
|
|
8
9
|
'PEERTABLE_CREDENTIAL_FILE',
|
|
9
10
|
'PEERTABLE_URL',
|
|
10
11
|
'PEERTABLE_PARENT_NAME',
|
|
@@ -94,6 +94,21 @@ test('bridge更新は版数だけでなくruntime source digestへ束縛する',
|
|
|
94
94
|
assert.ok(source.includes('peertable_runtime_digest'))
|
|
95
95
|
})
|
|
96
96
|
|
|
97
|
+
test('bridge起動は書込トークンをコマンドラインへ載せない', () => {
|
|
98
|
+
const ensure = readFileSync(new URL('./ensure-bridge.sh', import.meta.url), 'utf8')
|
|
99
|
+
// env_prefix の転送対象に生トークンを含めない(tmux session コマンドと ps に平文で残る・2026-08-30 実測)
|
|
100
|
+
assert.ok(!ensure.includes('PEERTABLE_TMUX_SOCKET PEERTABLE_POST_TOKEN'))
|
|
101
|
+
assert.ok(ensure.includes('bridge.token'))
|
|
102
|
+
const launch = buildWindowsBridgeLaunch({
|
|
103
|
+
script: 'bridge.mjs', project: 'C:\\work', log: 'C:\\work\\bridge.log',
|
|
104
|
+
env: { PEERTABLE_POST_TOKEN: 'secret-raw-token', PEERTABLE_CREDENTIAL_FILE: 'C:\\work\\.team\\credentials\\bridge.token' },
|
|
105
|
+
})
|
|
106
|
+
const encodedAt = launch.argv.indexOf('-EncodedCommand')
|
|
107
|
+
const decoded = Buffer.from(launch.argv[encodedAt + 1], 'base64').toString('utf16le')
|
|
108
|
+
assert.ok(!decoded.includes('secret-raw-token'))
|
|
109
|
+
assert.ok(decoded.includes('bridge.token'))
|
|
110
|
+
})
|
|
111
|
+
|
|
97
112
|
test('Windows bridgeはUTF-8を明示してログへ書く', () => {
|
|
98
113
|
const launch = buildWindowsBridgeLaunch({ script: 'bridge.mjs', project: 'C:\\work', log: 'C:\\work\\bridge.log' })
|
|
99
114
|
const encodedAt = launch.argv.indexOf('-EncodedCommand')
|