subconscious-cli 4.0.8 → 4.0.10

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/README.md CHANGED
@@ -34,8 +34,9 @@ subc <agent> uninstall
34
34
  Running `subc` with no arguments in a terminal opens the native Go TUI. Use
35
35
  the arrow keys and Enter to launch agents or manage the active profile, `p` to
36
36
  switch profiles, and `q` to quit. The menu includes dedicated **Create profile**,
37
- **Set default model**, and **Update base URL** actions. Model and URL changes
38
- are validated and saved to the active profile without leaving the TUI.
37
+ **Set default model**, **Set subagent model**, and **Update base URL** actions.
38
+ Model and URL changes are validated and saved to the active profile without
39
+ leaving the TUI.
39
40
  `subc help` and `subc --help` continue to print script-friendly command help.
40
41
  Non-interactive `subc` also prints regular help.
41
42
 
@@ -142,6 +143,8 @@ subc config # list every profile and its file path
142
143
  subc -p staging config create # create a profile with default settings
143
144
  subc -p staging config # print that path and env file
144
145
  subc -p staging config --model subconscious/glm-5.2
146
+ subc -p staging config --subagent-model subconscious/deepseek-v4-flash-marathon
147
+ subc -p staging config --subagent-model follow-default
145
148
  subc config --gateway-url https://gateway.example
146
149
  subc config path
147
150
  subc config edit # open the selected profile in $VISUAL, $EDITOR, vim, or nano
@@ -154,8 +157,12 @@ prints that path, then the file (API keys and other secrets redacted). Extra
154
157
  `KEY=value` lines in the file are passed through to launches and override
155
158
  Subconscious-injected defaults; resolved login identity (`GATEWAY_URL`,
156
159
  `API_KEY`, `MODEL`) still comes from login, `--model`, and the matching flags.
157
- In scripts and CI, keep using `subc config --gateway-url`, `--api-key`, and
158
- `--model`.
160
+ In scripts and CI, keep using `subc config --gateway-url`, `--api-key`,
161
+ `--model`, and `--subagent-model`.
162
+
163
+ The subagent setting controls `CLAUDE_CODE_SUBAGENT_MODEL` for Claude Code.
164
+ Use `follow-default` to clear the override so subagents automatically follow
165
+ the profile's default model.
159
166
 
160
167
  Each agent section can hold its own API key. An agent-specific key takes
161
168
  precedence over the shared profile key and can be used on its own, so profiles
@@ -196,6 +203,7 @@ the environment:
196
203
  ```bash
197
204
  subc codex --model subconscious/glm-5.2
198
205
  subc config --model subconscious/deepseek-v4-flash-marathon
206
+ subc config --subagent-model subconscious/tim-qwen3.6-27b
199
207
  export SUBCONSCIOUS_MODEL=subconscious/glm-5.2
200
208
  ```
201
209
 
Binary file
Binary file
Binary file
Binary file
package/bin/profiles.js CHANGED
@@ -37,6 +37,7 @@ export const RUNBOOK_DEFAULTS = {
37
37
  GATEWAY_URL: registry.defaults.baseUrl,
38
38
  API_KEY: '',
39
39
  MODEL: registry.defaults.model,
40
+ CLAUDE_CODE_SUBAGENT_MODEL: '',
40
41
  CLAUDE_GATEWAY_URL: '',
41
42
  CLAUDE_CODE_API_KEY: '',
42
43
  CODEX_API_KEY: '',
@@ -86,6 +87,13 @@ const SETTINGS = {
86
87
  type: 'choice',
87
88
  choices: SUPPORTED_MODELS,
88
89
  },
90
+ CLAUDE_CODE_SUBAGENT_MODEL: {
91
+ key: 'CLAUDE_CODE_SUBAGENT_MODEL',
92
+ label: 'Subagent model',
93
+ description: 'Model used by Claude Code subagents; blank follows the default model.',
94
+ type: 'choice',
95
+ choices: SUPPORTED_MODELS,
96
+ },
89
97
  CLAUDE_GATEWAY_URL: {
90
98
  key: 'CLAUDE_GATEWAY_URL',
91
99
  label: 'Claude gateway override',
@@ -267,6 +275,7 @@ const AGENT_SETTING_KEYS = {
267
275
  'claude-code': [
268
276
  'CLAUDE_GATEWAY_URL',
269
277
  'CLAUDE_CODE_API_KEY',
278
+ 'CLAUDE_CODE_SUBAGENT_MODEL',
270
279
  'CLAUDE_CODE_AUTO_COMPACT_WINDOW',
271
280
  'CLAUDE_CODE_MAX_CONTEXT_TOKENS',
272
281
  'MAX_CONCURRENT_SUBAGENTS',
@@ -346,6 +355,8 @@ DEEPSEEK_HARNESS_API_KEY={DEEPSEEK_HARNESS_API_KEY}
346
355
  # Claude Code
347
356
  # Leave CLAUDE_GATEWAY_URL blank to use GATEWAY_URL above.
348
357
  CLAUDE_GATEWAY_URL={CLAUDE_GATEWAY_URL}
358
+ # Leave blank to use MODEL above for Claude Code subagents.
359
+ CLAUDE_CODE_SUBAGENT_MODEL={CLAUDE_CODE_SUBAGENT_MODEL}
349
360
  CLAUDE_CODE_AUTO_COMPACT_WINDOW={CLAUDE_CODE_AUTO_COMPACT_WINDOW}
350
361
  CLAUDE_CODE_MAX_CONTEXT_TOKENS={CLAUDE_CODE_MAX_CONTEXT_TOKENS}
351
362
  MAX_CONCURRENT_SUBAGENTS={MAX_CONCURRENT_SUBAGENTS}
@@ -680,6 +691,7 @@ Usage:
680
691
  subc -p NAME config edit [vim|nano]
681
692
  subc config [show|path|list|create|delete]
682
693
  [--gateway-url URL] [--api-key KEY] [--model MODEL]
694
+ [--subagent-model MODEL|follow-default]
683
695
 
684
696
  subc config List every profile and its file path
685
697
  subc -p NAME config Print that profile's path and env file
@@ -718,15 +730,21 @@ export async function configCommand(argv, profileName = DEFAULT_PROFILE, options
718
730
  return;
719
731
  } else if (['show', 'path', 'list', 'create', 'delete', 'edit', 'interactive'].includes(arg)) {
720
732
  action = arg === 'interactive' ? 'edit' : arg;
721
- } else if (arg === '--gateway-url' || arg === '--api-key' || arg === '--model') {
733
+ } else if (
734
+ arg === '--gateway-url' ||
735
+ arg === '--api-key' ||
736
+ arg === '--model' ||
737
+ arg === '--subagent-model'
738
+ ) {
722
739
  const value = argv[++i];
723
740
  if (!value) throw new Error(`${arg} requires a value`);
724
741
  const key = {
725
742
  '--gateway-url': 'GATEWAY_URL',
726
743
  '--api-key': 'API_KEY',
727
744
  '--model': 'MODEL',
745
+ '--subagent-model': 'CLAUDE_CODE_SUBAGENT_MODEL',
728
746
  }[arg];
729
- updates[key] = value;
747
+ updates[key] = arg === '--subagent-model' && value === 'follow-default' ? '' : value;
730
748
  } else if (action === 'edit' && ALLOWED_EDITORS.has(arg)) {
731
749
  if (editor) throw new Error('Specify only one editor (vim or nano)');
732
750
  editor = arg;
@@ -739,7 +757,9 @@ export async function configCommand(argv, profileName = DEFAULT_PROFILE, options
739
757
 
740
758
  if (action === 'edit') {
741
759
  if (Object.keys(updates).length) {
742
- throw new Error('config edit cannot be combined with --gateway-url, --api-key, or --model');
760
+ throw new Error(
761
+ 'config edit cannot be combined with --gateway-url, --api-key, --model, or --subagent-model',
762
+ );
743
763
  }
744
764
  await editProfile(profileName, editor);
745
765
  return;
@@ -163,13 +163,14 @@ export ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION="${SONNET_MODEL_DESCRIPTION}"
163
163
  export ANTHROPIC_DEFAULT_HAIKU_MODEL="${HAIKU_MODEL}"
164
164
  export ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME="${HAIKU_MODEL_NAME}"
165
165
  export ANTHROPIC_DEFAULT_HAIKU_MODEL_DESCRIPTION="${HAIKU_MODEL_DESCRIPTION}"
166
- export CLAUDE_CODE_SUBAGENT_MODEL="${MODEL}"
166
+ export CLAUDE_CODE_SUBAGENT_MODEL="${CLAUDE_CODE_SUBAGENT_MODEL:-$MODEL}"
167
167
  export CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS="${MAX_CONCURRENT_SUBAGENTS}"
168
168
  export CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH="${MAX_SUBAGENT_SPAWN_DEPTH}"
169
169
  export CLAUDE_CODE_AUTO_COMPACT_WINDOW="${COMPACT_WINDOW}"
170
170
  export CLAUDE_CODE_MAX_CONTEXT_TOKENS="${MAX_CONTEXT_TOKENS}"
171
171
  export CLAUDE_CODE_ENABLE_TELEMETRY=1
172
172
  export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
173
+ export ENABLE_CLAUDEAI_MCP_SERVERS=false
173
174
  # Claude Code purpose attribution only (api_request → /v1/logs):
174
175
  # https://code.claude.com/docs/en/monitoring-usage#api-request-event
175
176
  export OTEL_LOGS_EXPORTER=otlp
@@ -213,6 +214,7 @@ unset CLAUDE_CODE_AUTO_COMPACT_WINDOW
213
214
  unset CLAUDE_CODE_MAX_CONTEXT_TOKENS
214
215
  unset CLAUDE_CODE_ENABLE_TELEMETRY
215
216
  unset CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC
217
+ unset ENABLE_CLAUDEAI_MCP_SERVERS
216
218
  unset OTEL_LOGS_EXPORTER
217
219
  unset OTEL_EXPORTER_OTLP_PROTOCOL
218
220
  unset OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
@@ -147,6 +147,9 @@ export CLAUDE_CODE_MAX_CONTEXT_TOKENS="${MAX_CONTEXT_TOKENS}"
147
147
  # Requires Claude Code >= 2.1.152.
148
148
  export CLAUDE_CODE_ENABLE_TELEMETRY="${CLAUDE_CODE_ENABLE_TELEMETRY:-1}"
149
149
  export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="${CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC:-1}"
150
+ # claude.ai connectors require subscription OAuth and cannot be used while the
151
+ # Subconscious bearer token and gateway URL are active.
152
+ export ENABLE_CLAUDEAI_MCP_SERVERS=false
150
153
  export OTEL_LOGS_EXPORTER="${OTEL_LOGS_EXPORTER:-otlp}"
151
154
  export OTEL_EXPORTER_OTLP_PROTOCOL="${OTEL_EXPORTER_OTLP_PROTOCOL:-http/json}"
152
155
  export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT="${EFFECTIVE_GATEWAY_URL%/}/v1/logs"
@@ -152,6 +152,13 @@ write_model_catalog() {
152
152
  "visibility": "list",
153
153
  "supported_in_api": true,
154
154
  "priority": 0,
155
+ "service_tiers": [
156
+ {
157
+ "id": "priority",
158
+ "name": "Priority",
159
+ "description": "Route requests through the configured priority service tier"
160
+ }
161
+ ],
155
162
  "availability_nux": null,
156
163
  "upgrade": null,
157
164
  "base_instructions": "You are Codex, a coding agent.",
package/bin/tui.js CHANGED
@@ -77,6 +77,10 @@ function selectedModelFor(profile) {
77
77
  );
78
78
  }
79
79
 
80
+ function subagentModelFor(profile) {
81
+ return profile.values.CLAUDE_CODE_SUBAGENT_MODEL?.trim() || '';
82
+ }
83
+
80
84
  function gatewayFor(profile) {
81
85
  return (
82
86
  process.env.SUBCONSCIOUS_BASE_URL?.trim() ||
@@ -106,6 +110,7 @@ export async function createTuiState(profileName = DEFAULT_PROFILE, options = {}
106
110
  return {
107
111
  name,
108
112
  model: selectedModelFor(profile),
113
+ subagentModel: subagentModelFor(profile),
109
114
  authenticated: Boolean(auth?.key),
110
115
  };
111
116
  }),
@@ -128,6 +133,7 @@ export async function createTuiState(profileName = DEFAULT_PROFILE, options = {}
128
133
  profiles,
129
134
  models: catalog.models,
130
135
  selectedModel,
136
+ subagentModel: subagentModelFor(activeProfile),
131
137
  gatewayUrl,
132
138
  savedGatewayUrl:
133
139
  activeProfile.values.GATEWAY_URL?.trim().replace(/\/+$/, '') ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subconscious-cli",
3
- "version": "4.0.8",
3
+ "version": "4.0.10",
4
4
  "description": "CLI for Subconscious — run Claude Code, Codex, OpenCode, DeepSeek Harness, Cursor, Copilot, and Pi",
5
5
  "bin": {
6
6
  "subc": "bin/cli.js"