peertable 0.8.43 → 0.8.45

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.43",
3
+ "version": "0.8.45",
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.43'
17
+ const MCP_VERSION = '0.8.45'
18
18
  const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
19
19
 
20
20
  const USAGE = `usage:
package/room/server.mjs CHANGED
@@ -598,9 +598,9 @@ const UI = room => `<!doctype html><html lang="ja"><head><meta charset="utf-8"><
598
598
  .bridgewarn:empty{display:none}
599
599
  .chip.has-meta{cursor:pointer}
600
600
  /* 稼働状態の点。報告が途絶えたら unknown(中空)へ落として、古い状態を出し続けない */
601
- .chip .nm{display:inline-flex;align-items:center;gap:5px}
602
- .chip .state-label{font-size:10px;font-weight:700;color:var(--dim);white-space:nowrap}
603
- .chip .activity{display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim);font-size:10px;font-weight:500}
601
+ .chip .id{display:inline-grid;grid-template-columns:min-content}
602
+ .chip .nm{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
603
+ .chip .activity{display:block;width:0;min-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dim);font-size:10px;font-weight:500}
604
604
  .chip .st{flex:none;display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--dim)}
605
605
  .chip .st.busy{background:var(--busy)}
606
606
  .chip .st.idle{background:var(--idle)}
@@ -610,7 +610,7 @@ const UI = room => `<!doctype html><html lang="ja"><head><meta charset="utf-8"><
610
610
  .metapop{position:fixed;z-index:20;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:12px;box-shadow:0 6px 20px rgba(0,0,0,.18);max-width:70vw}
611
611
  .metapop .metaname{font-weight:600;margin-bottom:2px}
612
612
  .metapop .metaline{color:var(--dim)}
613
- .chip{position:relative;flex:none;display:flex;align-items:center;gap:7px;min-width:150px;max-width:230px;padding:6px 11px 6px 6px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:12px;font-weight:600}
613
+ .chip{position:relative;flex:none;display:flex;align-items:center;gap:7px;padding:6px 11px 6px 6px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:12px;font-weight:600}
614
614
  .chip .av{width:22px;height:22px;font-size:11px;flex:none}
615
615
  .chip .id{display:flex;flex-direction:column;gap:1px;min-width:0;line-height:1.25}
616
616
  .chip.recent{border-color:hsl(var(--h) var(--sat) var(--edge))}
@@ -840,11 +840,10 @@ async function refreshMembers(){
840
840
  const id=el('span','id')
841
841
  const nameRow=el('span','nm',m.name)
842
842
  nameRow.appendChild(el('span','st '+(st??'unknown')))
843
- nameRow.appendChild(el('span','state-label',stateText))
844
843
  id.appendChild(nameRow)
845
- id.appendChild(el('span','activity',m.activity_text??'現在作業未取得'))
844
+ id.appendChild(el('span','activity',rolesText||'役割未設定'))
846
845
  c.appendChild(id)
847
- c.setAttribute('aria-label',m.name+'、'+stateText+'、'+(m.activity_text??'現在作業未取得'))
846
+ c.setAttribute('aria-label',m.name+'、'+stateText+'、'+(rolesText||'役割未設定'))
848
847
  // タップ環境には hover が無いので、押した時に同じ内容を出す(ホバーは title が担う)
849
848
  if(meta.length){c.classList.add('has-meta');c.addEventListener('click',ev=>{ev.stopPropagation();showMeta(c,m,meta)})}
850
849
  membersEl.appendChild(c)
@@ -37,8 +37,8 @@ def main(argv):
37
37
  lines = [
38
38
  f"# 円卓ログ — room `{room}`(全{len(messages)}発言)",
39
39
  "",
40
- "teardown(archive モード)が書き出した正史。room サーバー側は削除済みなので、"
41
- "この文書が唯一の記録である。",
40
+ "teardown(archive モード)が、解散の区切りを投稿する前までの room ログを書き出した控え。"
41
+ "room と過去ログの原本はサーバー側に残り、次の卓も同じ room で続く。",
42
42
  "",
43
43
  "---",
44
44
  "",
@@ -198,3 +198,31 @@ test('teardownはalarm-bridgeを停止してから.teamを削除する', () => {
198
198
  assert.ok(source.includes('miss "alarm-bridge 停止に失敗'))
199
199
  assert.ok(source.includes('-X DELETE "$url/api/$room/bridges"'))
200
200
  })
201
+
202
+ test('archive room logは解散区切り前の控えであり原本をroomに残すと明記する', () => {
203
+ const dir = mkdtempSync(join(tmpdir(), 'peertable-archive-room-log-'))
204
+ const out = join(dir, 'room-log.md')
205
+ const script = fileURLToPath(new URL('./archive-room-log.py', import.meta.url))
206
+ const fixture = JSON.stringify({
207
+ messages: [{ seq: 1, from: 'bell', to_names: ['all'], ts: '2026-08-30T00:00:00Z', body: '完了' }],
208
+ })
209
+ const python = [
210
+ 'import importlib.util, json, sys',
211
+ 'spec = importlib.util.spec_from_file_location("archive_room_log", sys.argv[1])',
212
+ 'module = importlib.util.module_from_spec(spec)',
213
+ 'spec.loader.exec_module(module)',
214
+ 'fixture = json.loads(sys.argv[3])',
215
+ 'module.fetch = lambda _url, _path: fixture',
216
+ 'raise SystemExit(module.main(["https://room.example", "factory", sys.argv[2]]))',
217
+ ].join('; ')
218
+ try {
219
+ const result = spawnSync('python3', ['-c', python, script, out, fixture], { encoding: 'utf8' })
220
+ assert.equal(result.status, 0, result.stderr)
221
+ const log = readFileSync(out, 'utf8')
222
+ assert.match(log, /解散の区切りを投稿する前までの room ログを書き出した控え/u)
223
+ assert.match(log, /room と過去ログの原本はサーバー側に残り、次の卓も同じ room で続く/u)
224
+ assert.doesNotMatch(log, /削除済み|唯一の記録/u)
225
+ } finally {
226
+ rmSync(dir, { recursive: true, force: true })
227
+ }
228
+ })
@@ -461,11 +461,12 @@ export function subtreeCpuSeconds(psRows, rootPid, { includeChild = () => true,
461
461
  return total
462
462
  }
463
463
 
464
- // ---- 親番犬の「起こす価値」判定(2026-08-29 オーナー裁定「番犬が必要な時だけ呼べ」)----
465
- // 選別は親のターン(有料)でなく機械(無料)が行う。起こすのは親の行動が要るものだけ。
466
- const ROUTINE_WAIT_DM = /^\s*\[待機\]/u
464
+ // ---- 親番犬の「起こす価値」判定 ----
465
+ // 2026-08-29裁定「番犬が必要な時だけ呼べ」で[待機]DMを沈黙させていたが、
466
+ // 2026-08-30裁定「待機にお前が気付けないのが問題だ。待機宣言は届くようにしろ」で撤回。
467
+ // 親宛DMは待機宣言を含めて全件起こす。room全体発言だけは従来どおり選別する。
467
468
  export function parentWatchShouldNotify(message, roomUpdate) {
468
469
  const body = String(message?.body ?? '')
469
470
  if (roomUpdate) return /全タスク完了|\[オーナー宛/u.test(body)
470
- return !ROUTINE_WAIT_DM.test(body)
471
+ return true
471
472
  }