thinkpool-pair 0.7.340 → 0.7.341

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.
@@ -14,7 +14,6 @@ const command = (name, description, route, inputHint, runtimes = ['claude', 'cod
14
14
 
15
15
  export const CODE_ROOM_COMMANDS = Object.freeze([
16
16
  command('/side', 'investigate beside this terminal', 'side', 'task'),
17
- command('/flow', 'open an explicit visible Cascade', 'flow', 'task [--mode guide|steer|autopilot]'),
18
17
  command('/help', 'list commands available in this lane', 'control'),
19
18
  command('/status', 'runtime, model, permissions, and busy state', 'control'),
20
19
  command('/usage', 'session usage and provider limits', 'control'),
@@ -28,10 +27,21 @@ export const CODE_ROOM_COMMANDS = Object.freeze([
28
27
  command('/queue', 'run a prompt after the active turn', 'queue', 'prompt'),
29
28
  command('/steer', 'guide the active turn', 'steer', 'prompt', ['codex', 'hermes']),
30
29
  command('/credits', 'provider credit balance', 'credits', null, ['codex', 'hermes']),
31
- command('/reasoning', 'Hermes reasoning effort', 'runtime', 'low | medium | high | xhigh | max | none | reset', ['hermes']),
32
30
  command('/review', 'review uncommitted changes', 'runtime', null, ['codex']),
33
31
  ])
34
32
 
33
+ // Native catalogs are runtime evidence, never portable session metadata.
34
+ // Claude's adapter default-denies raw SDK commands and passes only proven room
35
+ // controls plus installed Skills. Hermes' isolated ACP bootstrap owns its safe
36
+ // native catalog. Codex App Server publishes no native slash catalog, so a
37
+ // restored/foreign list must not manufacture one. Compatibility aliases stay
38
+ // callable at their runtime boundary without remaining discoverable.
39
+ const NATIVE_COMMAND_POLICY = Object.freeze({
40
+ claude: Object.freeze({ accept: true, hidden: Object.freeze(new Set(['/flow'])) }),
41
+ codex: Object.freeze({ accept: false, hidden: Object.freeze(new Set(['/flow'])) }),
42
+ hermes: Object.freeze({ accept: true, hidden: Object.freeze(new Set(['/flow', '/reasoning'])) }),
43
+ })
44
+
35
45
  const cleanRuntime = (runtime) => runtime === 'thinkpool' ? 'hermes' : runtime
36
46
  const cleanName = (value) => {
37
47
  const raw = typeof value === 'string' ? value : value?.name
@@ -54,6 +64,7 @@ const normalizeNative = (value) => {
54
64
  // retained only after the runtime-specific adapter has already allowlisted them.
55
65
  export function commandCatalogForRuntime(runtime, nativeCommands = []) {
56
66
  const id = cleanRuntime(runtime)
67
+ const nativePolicy = NATIVE_COMMAND_POLICY[id] || NATIVE_COMMAND_POLICY.codex
57
68
  const byName = new Map()
58
69
  for (const item of CODE_ROOM_COMMANDS) {
59
70
  if (!item.runtimes.includes(id)) continue
@@ -66,7 +77,7 @@ export function commandCatalogForRuntime(runtime, nativeCommands = []) {
66
77
  }
67
78
  for (const raw of (Array.isArray(nativeCommands) ? nativeCommands : [])) {
68
79
  const item = normalizeNative(raw)
69
- if (!item) continue
80
+ if (!item || !nativePolicy.accept || nativePolicy.hidden.has(item.name)) continue
70
81
  const shared = byName.get(item.name)
71
82
  const hermesNativeControl = id === 'hermes' && ['/help', '/status', '/context', '/credits'].includes(item.name)
72
83
  byName.set(item.name, shared
@@ -168,10 +168,10 @@ acp_adapter.server.HermesACPAgent._build_model_state = nous_only_model_state
168
168
  # account tokens, or lifecycle/admin controls enter the room surface.
169
169
  _TP_REASONING_CONFIG_ID = "thinkpool_reasoning_effort"
170
170
  _TP_REASONING_LEVELS = frozenset({"none", "low", "medium", "high", "xhigh", "max"})
171
+ _TP_HIDDEN_COMMANDS = frozenset({"reasoning"})
171
172
  _TP_COMMANDS = (
172
173
  {"name": "credits", "description": "Show safe Nous credit balance and top-up handoff"},
173
174
  {"name": "status", "description": "Show session, model, context, version, and reasoning status"},
174
- {"name": "reasoning", "description": "Set session-only reasoning effort", "input_hint": "low, medium, high, xhigh, max, none, or reset"},
175
175
  )
176
176
 
177
177
  _native_compact = getattr(acp_adapter.server.HermesACPAgent, "_cmd_compact", None)
@@ -283,8 +283,12 @@ _available_commands = getattr(acp_adapter.server.HermesACPAgent, "_available_com
283
283
  @classmethod
284
284
  def thinkpool_available_commands(cls):
285
285
  # Keep the upstream catalog canonical, then append exactly our process-local
286
- # commands. This drives ACP updates and /help from one registry.
287
- base = list(_available_commands.__func__(cls)) if _available_commands else []
286
+ # commands. Compatibility aliases remain executable without appearing in
287
+ # ACP updates or /help; the room-level /effort control is canonical.
288
+ base = [
289
+ item for item in (list(_available_commands.__func__(cls)) if _available_commands else [])
290
+ if str(getattr(item, "name", item.get("name", "") if isinstance(item, dict) else "") or "").lstrip("/").lower() not in _TP_HIDDEN_COMMANDS
291
+ ]
288
292
  try:
289
293
  from acp.schema import AvailableCommand, UnstructuredCommandInput
290
294
  known = {getattr(item, "name", "") for item in base}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.340",
3
+ "version": "0.7.341",
4
4
  "description": "Connect Claude Code, Codex, or Hermes on your computer to a Thinkpool Code room.",
5
5
  "type": "module",
6
6
  "bin": {