thinkpool-pair 0.7.215 → 0.7.216

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/bridge.mjs CHANGED
@@ -1937,7 +1937,7 @@ function openStructured({ id, runtime = 'claude', model, effort, resume, log, co
1937
1937
  // fork-bomb breaker, now one level deeper (2026-07-10 cascade-spawn-depth spec).
1938
1938
  tool(
1939
1939
  'spawn_terminal',
1940
- 'Open a NEW agent terminal (Claude or Codex) in this ThinkPool Code room — YOUR lane to use, not a sibling that is already working. The runtime defaults to inheriting this lane, or pass `runtime` to dispatch across runtimes. Use it to fan work out or run a cascade: give it an initial `task`, collect its result later with read_terminal, then ALWAYS close_terminal it — a finished lane left open holds a slot against the room cap and blocks the next fan-out. By default the new lane INHERITS your current permission mode. ALWAYS prefer spawning a fresh lane over post_to_terminal into one that is already busy. Bounded by cascade depth, the room terminal cap, and per-turn limits.',
1940
+ 'Open a NEW agent terminal (Claude or Codex) in this ThinkPool Code room — YOUR lane to use, not a sibling that is already working. The runtime defaults to inheriting this lane, or pass `runtime` to dispatch across runtimes. Choose `model` explicitly from advertised metadata when practical: for Codex use Luna/Mini for mechanical work, Terra for ordinary feature/fix work, and Sol only for repeated-failure, architecture/conductor, or adversarial final-review work; never inherit Sol by default, and omit `model` for runtime fallback when the named tier is unavailable. Give the lane an initial `task`, collect its result later with read_terminal, then ALWAYS close_terminal it — a finished lane left open holds a slot against the room cap and blocks the next fan-out. By default the new lane INHERITS your current permission mode. ALWAYS prefer spawning a fresh lane over post_to_terminal into one that is already busy. Bounded by cascade depth, the room terminal cap, and per-turn limits.',
1941
1941
  {
1942
1942
  name: z.string().max(80).optional().describe('a short label for the new lane so the room (and you) can find it, e.g. "Research: topologies"'),
1943
1943
  task: z.string().optional().describe('an initial task to hand the new lane immediately; omit to open it idle'),
@@ -214,13 +214,14 @@ export class CodexAppServerClient {
214
214
  return id
215
215
  }
216
216
 
217
- async startTurn({ threadId, input, images, model, effort, approvalPolicy } = {}) {
217
+ async startTurn({ threadId, input, images, model, effort, approvalPolicy, collaborationMode } = {}) {
218
218
  const result = await this.request('turn/start', {
219
219
  threadId,
220
220
  input: turnInput(input, images),
221
221
  ...(model ? { model } : {}),
222
222
  ...(effort ? { effort } : {}),
223
223
  ...(approvalPolicy ? { approvalPolicy } : {}),
224
+ ...(collaborationMode ? { collaborationMode } : {}),
224
225
  }, this.turnStartTimeoutMs)
225
226
  const turnId = result?.turn?.id || result?.turnId
226
227
  if (!turnId) throw new Error('Codex App Server did not return a turn id')
package/codex-session.mjs CHANGED
@@ -46,6 +46,18 @@ export function codexConfigForMode(mode) {
46
46
  return CODEX_MODE_CONFIG[mode] || CODEX_MODE_CONFIG.default
47
47
  }
48
48
 
49
+ export function codexDefaultCollaborationMode(model, effort) {
50
+ if (!model) return null
51
+ return {
52
+ mode: 'default',
53
+ settings: {
54
+ model: String(model),
55
+ reasoning_effort: EFFORT_LEVELS.has(effort) ? effort : null,
56
+ developer_instructions: null,
57
+ },
58
+ }
59
+ }
60
+
49
61
  /**
50
62
  * The permission mode a FRESHLY-OPENED terminal gets when none was specified
51
63
  * (the person clicked "+ New terminal" without picking a mode). Codex defaults
@@ -476,6 +488,10 @@ export function startCodexSession({ cwd, model, effort: initialEffort = 'high',
476
488
  model: activeModel,
477
489
  sandbox,
478
490
  approvalPolicy: modeConfig.approvalPolicy,
491
+ // Codex 0.144.1 gates request_user_input by INTERNAL collaboration
492
+ // mode. Enable it for Default mode on this thread without changing the
493
+ // independent ThinkPool sandbox / approval posture above.
494
+ config: { 'features.default_mode_request_user_input': true },
479
495
  })
480
496
  appServerThreadReady = true
481
497
  mapper.push({ type: 'thread.started', thread_id: sessionId })
@@ -505,6 +521,7 @@ export function startCodexSession({ cwd, model, effort: initialEffort = 'high',
505
521
  model: activeModel,
506
522
  effort: activeEffort,
507
523
  approvalPolicy: modeConfig.approvalPolicy,
524
+ collaborationMode: codexDefaultCollaborationMode(activeModel, activeEffort),
508
525
  })
509
526
  const completed = await appServer.waitForTurn(activeTurnId)
510
527
  const status = completed?.turn?.status
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.215",
3
+ "version": "0.7.216",
4
4
  "description": "Share a local coding-agent CLI (Claude Code, Codex, Gemini, Aider, …) into a ThinkPool Code room, live.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,5 +15,6 @@ export const THINKPOOL_REMOTE_DELIVERY_RULES = Object.freeze([
15
15
 
16
16
  export const CODEX_THINKPOOL_FIRST_TURN_PREAMBLE = [
17
17
  'ENVIRONMENT (authoritative): You are Codex running inside a ThinkPool Code room, driven live through the thinkpool-pair bridge by a user and possibly a partner. This is a shared remote workspace, not an ordinary local terminal session; act accordingly.',
18
+ 'MODEL TIERING FOR DISPATCH: When calling spawn_terminal for Codex, explicitly choose from the available model metadata when practical: gpt-5.6-luna or gpt-5.4-mini for mechanical/scaffold/search/formatting work; gpt-5.6-terra for ordinary feature/fix work; gpt-5.6-sol only for trap-laden repeated failures, architecture/conductor work, or adversarial final review. Do not inherit or select Sol by default. If a named model is unavailable, use the nearest advertised lower tier or omit model and allow runtime fallback.',
18
19
  ...THINKPOOL_REMOTE_DELIVERY_RULES,
19
20
  ].join(' ')