peertable 0.4.22 → 0.4.23

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.4.22",
3
+ "version": "0.4.23",
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
@@ -13,7 +13,7 @@ import { findModelsDoc, resolveSeatIdentity } from '../skill/scripts/resolve-sea
13
13
 
14
14
  // client.mjs 側のハードコード版数。package.json の version と一致していることを
15
15
  // diagnostics の version_consistency が見る(2 つの版数源の drift 検出。決定45)
16
- const MCP_VERSION = '0.4.22'
16
+ const MCP_VERSION = '0.4.23'
17
17
  const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
18
18
 
19
19
  const USAGE = `usage:
@@ -21,6 +21,7 @@ if (process.env.PEERTABLE_PLAN) env_vars.push(
21
21
  'LATTICE_TODO_ACTOR_SESSION', 'LATTICE_TODO_ACTOR_AGENT',
22
22
  )
23
23
  if (vendor === 'grok' && process.env.GROK_HOME) env_vars.push('GROK_HOME')
24
+ if (vendor === 'codex' && process.env.CODEX_HOME) env_vars.push('CODEX_HOME')
24
25
  const result = await client.callTool({
25
26
  name: `${vendor}_agent`,
26
27
  arguments: {
@@ -16,7 +16,7 @@ const [action, project, peertableRepo] = process.argv.slice(2)
16
16
  if (!['ensure', 'remove'].includes(action) || !project || !peertableRepo)
17
17
  fail('SEAT_CODEX_ROOM_MCP_ARGS_INVALID', '<ensure|remove> <project> <peertable_repo>')
18
18
 
19
- const configDir = resolve(project, '.codex')
19
+ const configDir = resolve(process.env.CODEX_HOME || join(project, '.codex'))
20
20
  const configFile = join(configDir, 'config.toml')
21
21
  const startPattern = /^# BEGIN PEERTABLE ROOM MCP added_newline=([01])$/mu
22
22
  const endMarker = '# END PEERTABLE ROOM MCP'
@@ -374,6 +374,15 @@ fi
374
374
  if [ "$vendor" = grok ]; then
375
375
  launch_env+=("GROK_HOME=$grok_home")
376
376
  fi
377
+ if [ "$vendor" = codex ]; then
378
+ codex_home="${proj}/.team/seats/${name}.codex"
379
+ mkdir -p "$codex_home"
380
+ if [ -f "${HOME}/.codex/auth.json" ]; then
381
+ cp "${HOME}/.codex/auth.json" "${codex_home}/auth.json"
382
+ chmod 600 "${codex_home}/auth.json" 2>/dev/null || true
383
+ fi
384
+ launch_env+=("CODEX_HOME=$codex_home")
385
+ fi
377
386
  if [ "$vendor" = codex ] \
378
387
  && ! env -u PEERTABLE_POST_TOKEN "${launch_env[@]}" node "$codex_room_mcp_helper" ensure "$proj" "$peertable_repo"; then
379
388
  echo "SEAT_CODEX_ROOM_MCP_INVALID: Codexのproject設定へseat固有room clientを装備できない(席は立てない)" >&2
@@ -81,6 +81,7 @@ if ! rm -f "$proj/.team/seats/$name.json"; then
81
81
  failed=1
82
82
  fi
83
83
  rm -rf "$proj/.team/seats/${name}.grok-home"
84
+ rm -rf "$proj/.team/seats/${name}.codex"
84
85
  if ! env -u PEERTABLE_POST_TOKEN node "$credential_helper" remove "$proj" "$credential_file"; then
85
86
  echo "SEAT_LEAVE_CREDENTIAL_FAILED: $name" >&2
86
87
  failed=1