subconscious-cli 6.0.0 → 6.1.0

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.
Files changed (76) hide show
  1. package/README.md +135 -2
  2. package/bin/agent-data.js +242 -0
  3. package/bin/agent-help.js +106 -0
  4. package/bin/agent-install.js +354 -0
  5. package/bin/agent-launch.js +199 -0
  6. package/bin/agent-spawn.js +137 -0
  7. package/bin/agents.js +284 -840
  8. package/bin/auth.js +89 -33
  9. package/bin/branding.js +3 -1
  10. package/bin/claude-picker.js +143 -0
  11. package/bin/cli.js +87 -20
  12. package/bin/clipboard-image.js +24 -5
  13. package/bin/colors.js +1 -1
  14. package/bin/feedback.js +71 -21
  15. package/bin/harness-manifest.js +286 -0
  16. package/bin/headless-args.js +35 -0
  17. package/bin/launch-values.js +25 -0
  18. package/bin/model-capabilities.js +12 -8
  19. package/bin/models.js +35 -19
  20. package/bin/native/subc-tui-darwin-amd64 +0 -0
  21. package/bin/native/subc-tui-darwin-arm64 +0 -0
  22. package/bin/native/subc-tui-linux-amd64 +0 -0
  23. package/bin/native/subc-tui-linux-arm64 +0 -0
  24. package/bin/native/subc-tui-windows-amd64.exe +0 -0
  25. package/bin/native/subc-tui-windows-arm64.exe +0 -0
  26. package/bin/opencode-provider.js +48 -5
  27. package/bin/profile-settings.js +129 -0
  28. package/bin/profiles.js +136 -449
  29. package/bin/runbook/README.md +66 -23
  30. package/bin/runbook/claude-code/agent.json +300 -0
  31. package/bin/runbook/claude-code/install.sh +9 -252
  32. package/bin/runbook/codex/agent.json +461 -0
  33. package/bin/runbook/codex/hooks-lib.sh +17 -4
  34. package/bin/runbook/codex/install.sh +0 -4
  35. package/bin/runbook/codex/run.sh +16 -235
  36. package/bin/runbook/copilot/agent.json +185 -0
  37. package/bin/runbook/copilot/install.sh +45 -63
  38. package/bin/runbook/cursor/agent.json +137 -0
  39. package/bin/runbook/cursor/install.sh +8 -35
  40. package/bin/runbook/deepseek-harness/agent.json +163 -0
  41. package/bin/runbook/deepseek-harness/run.sh +20 -59
  42. package/bin/runbook/image-window/index.ts +14 -0
  43. package/bin/runbook/image-window/window.d.ts +19 -0
  44. package/bin/runbook/image-window/window.js +140 -0
  45. package/bin/runbook/lib.sh +41 -0
  46. package/bin/runbook/opencode/agent.json +158 -0
  47. package/bin/runbook/opencode/install.sh +9 -183
  48. package/bin/runbook/opencode/opencode-plugin.d.ts +16 -0
  49. package/bin/runbook/opencode/subconscious-image-window.ts +24 -0
  50. package/bin/runbook/pi/agent.json +216 -0
  51. package/bin/runbook/pi/install.sh +18 -44
  52. package/bin/runbook/pi/run.sh +6 -18
  53. package/bin/runbook/pi/subconscious-compaction.ts +71 -49
  54. package/bin/runbook/shared.json +58 -0
  55. package/bin/runbook/subconscious-code/agent.json +156 -0
  56. package/bin/sessions.js +173 -58
  57. package/bin/tui.js +104 -32
  58. package/bin/update-check.js +54 -21
  59. package/bin/upgrade.js +67 -43
  60. package/bin/usage.js +47 -24
  61. package/bin/windows/agents.js +141 -37
  62. package/bin/windows/common.js +36 -25
  63. package/bin/windows/install.js +116 -34
  64. package/bin/windows/launch.js +260 -77
  65. package/bin/windows/pi-compaction.ts +68 -13
  66. package/bin/windows/process.js +210 -57
  67. package/bin/windows/setup.js +251 -56
  68. package/package.json +9 -4
  69. package/bin/registry.generated.json +0 -406
  70. package/bin/runbook/claude-code/run.sh +0 -254
  71. package/bin/runbook/model-capabilities.generated.sh +0 -9
  72. package/bin/runbook/opencode/provider.sh +0 -93
  73. package/bin/runbook/opencode/run.sh +0 -99
  74. package/bin/runbook/opencode/subconscious-compaction.ts +0 -100
  75. package/bin/runbook/subconscious-code/run.sh +0 -21
  76. package/bin/windows/claude.js +0 -71
@@ -47,26 +47,21 @@
47
47
  set -euo pipefail
48
48
 
49
49
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
50
- source "${SCRIPT_DIR}/../model-capabilities.generated.sh"
50
+ source "${SCRIPT_DIR}/../lib.sh"
51
51
  EXTENSION_SRC="${SCRIPT_DIR}/subconscious-compaction.ts"
52
-
53
- # Load shared env from SUBC_ENV_FILE, or a sibling .env / env.example.
54
- SHARED_ENV="${SUBC_ENV_FILE:-${SCRIPT_DIR}/../.env}"
55
- [[ -f "$SHARED_ENV" ]] || SHARED_ENV="${SCRIPT_DIR}/../env.example"
56
- if [[ -f "$SHARED_ENV" ]]; then set -a; source "$SHARED_ENV"; set +a; fi
52
+ IMAGE_WINDOW_SRC="${SCRIPT_DIR}/../image-window"
57
53
 
58
54
  COMMAND="install"
59
55
  GATEWAY_URL="${GATEWAY_URL:-}"
60
56
  API_KEY="${PI_API_KEY:-${API_KEY:-}}"
61
- MODEL="${MODEL:-subconscious/glm-5.3-marathon}"
62
- CONTEXT_WINDOW="${PI_CONTEXT_WINDOW:-5000000}"
63
- MAX_TOKENS="${PI_MAX_TOKENS:-65536}"
57
+ CONTEXT_WINDOW="${PI_CONTEXT_WINDOW:-}"
58
+ MAX_TOKENS="${PI_MAX_TOKENS:-}"
64
59
 
65
60
  usage() {
66
61
  cat <<'EOF'
67
62
  Usage:
68
- subc pi install [--gateway-url URL] [--api-key KEY] [--model MODEL]
69
- [--context-window N] [--max-tokens N]
63
+ subc pi install [--gateway-url URL] [--api-key KEY] [--context-window N]
64
+ [--max-tokens N]
70
65
  subc pi uninstall
71
66
  subc pi status
72
67
 
@@ -91,10 +86,6 @@ while [[ $# -gt 0 ]]; do
91
86
  API_KEY="${2:-}"
92
87
  shift 2
93
88
  ;;
94
- --model)
95
- MODEL="${2:-}"
96
- shift 2
97
- ;;
98
89
  --context-window)
99
90
  CONTEXT_WINDOW="${2:-}"
100
91
  shift 2
@@ -115,35 +106,8 @@ while [[ $# -gt 0 ]]; do
115
106
  esac
116
107
  done
117
108
 
118
- DEFAULT_SUBCONSCIOUS_MODELS="subconscious/glm-5.3-marathon
119
- subconscious/glm-5.2
120
- subconscious/tim-qwen3.6-27b
121
- subconscious/deepseek-v4-flash-marathon
122
- subconscious/deepseek-v4.1-flash-marathon"
123
- SUPPORTED_MODELS=()
124
-
125
- add_supported_model() {
126
- local model_id="$1" existing
127
- [[ -n "$model_id" ]] || return 0
128
- if [[ ! "$model_id" =~ ^[-A-Za-z0-9._:/+]+$ ]]; then
129
- echo "error: invalid model id: $model_id" >&2
130
- exit 1
131
- fi
132
- if [[ "${#SUPPORTED_MODELS[@]}" -gt 0 ]]; then
133
- for existing in "${SUPPORTED_MODELS[@]}"; do
134
- [[ "$existing" == "$model_id" ]] && return 0
135
- done
136
- fi
137
- SUPPORTED_MODELS+=("$model_id")
138
- }
139
-
140
- add_supported_model "$MODEL"
141
- while IFS= read -r model_id; do
142
- add_supported_model "$model_id"
143
- done <<< "${SUBCONSCIOUS_MODELS:-$DEFAULT_SUBCONSCIOUS_MODELS}"
144
-
145
109
  MODEL_ENTRIES_JSON=""
146
- for model_id in "${SUPPORTED_MODELS[@]}"; do
110
+ while IFS= read -r model_id; do
147
111
  vision_fields=""
148
112
  if subc_model_supports_vision "$model_id"; then
149
113
  vision_fields=',"input":["text","image"]'
@@ -154,12 +118,14 @@ for model_id in "${SUPPORTED_MODELS[@]}"; do
154
118
  else
155
119
  MODEL_ENTRIES_JSON="$model_json"
156
120
  fi
157
- done
121
+ done <<< "${SUBC_MODEL_IDS:-}"
158
122
 
159
123
  PI_DIR="${PI_CODING_AGENT_DIR:-${HOME}/.pi/agent}"
160
124
  MODELS_JSON="${PI_DIR}/models.json"
161
125
  EXTENSIONS_DIR="${PI_DIR}/extensions"
162
126
  EXTENSION_DST="${EXTENSIONS_DIR}/subconscious-compaction.ts"
127
+ # Keeps requests at the newest 30 images so a long session's upload stops growing.
128
+ IMAGE_WINDOW_DST="${EXTENSIONS_DIR}/subconscious-image-window"
163
129
  ENV_FILE="${PI_DIR}/subconscious.env"
164
130
  MARKER='x-subconscious-client'
165
131
 
@@ -222,6 +188,8 @@ write_extension() {
222
188
  fi
223
189
  mkdir -p "$EXTENSIONS_DIR"
224
190
  cp "$EXTENSION_SRC" "$EXTENSION_DST"
191
+ rm -rf "$IMAGE_WINDOW_DST"
192
+ cp -R "$IMAGE_WINDOW_SRC" "$IMAGE_WINDOW_DST"
225
193
  }
226
194
 
227
195
  uninstall_config() {
@@ -235,6 +203,7 @@ uninstall_config() {
235
203
  echo "No Pi models.json at $MODELS_JSON"
236
204
  fi
237
205
  rm -f "$EXTENSION_DST" "$ENV_FILE"
206
+ rm -rf "$IMAGE_WINDOW_DST"
238
207
  }
239
208
 
240
209
  status() {
@@ -253,6 +222,11 @@ status() {
253
222
  else
254
223
  echo "compaction extension: not installed"
255
224
  fi
225
+ if [[ -d "$IMAGE_WINDOW_DST" ]]; then
226
+ echo "image window extension: $IMAGE_WINDOW_DST (installed)"
227
+ else
228
+ echo "image window extension: not installed"
229
+ fi
256
230
  if [[ -f "$ENV_FILE" ]]; then
257
231
  echo "env: $ENV_FILE (present)"
258
232
  else
@@ -1,25 +1,13 @@
1
1
  #!/usr/bin/env bash
2
- # Refresh the Subconscious provider from the live catalog, then launch Pi.
3
- # Other providers in models.json are preserved.
2
+ # Refresh the Subconscious provider from the live catalog, then start the pi
3
+ # argv subc built. Other providers in models.json are preserved.
4
4
 
5
5
  set -euo pipefail
6
6
 
7
7
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- GATEWAY_URL="${GATEWAY_URL:-}"
9
- API_KEY="${PI_API_KEY:-${API_KEY:-}}"
10
- MODEL="${MODEL:-subconscious/glm-5.3-marathon}"
11
- PI_DIR="${PI_CODING_AGENT_DIR:-${HOME}/.pi/agent}"
12
- MODELS_JSON="${PI_DIR}/models.json"
8
+ source "${SCRIPT_DIR}/../lib.sh"
13
9
 
14
- if [[ -z "$GATEWAY_URL" || -z "$API_KEY" ]]; then
15
- echo "error: GATEWAY_URL and API_KEY are required to configure Pi" >&2
16
- exit 1
17
- fi
10
+ # stdin can hold a headless prompt, which belongs to Pi.
11
+ "${SCRIPT_DIR}/install.sh" install </dev/null >/dev/null
18
12
 
19
- "${SCRIPT_DIR}/install.sh" install \
20
- --gateway-url "$GATEWAY_URL" \
21
- --api-key "$API_KEY" \
22
- --model "$MODEL" \
23
- >/dev/null
24
-
25
- exec pi --provider subconscious --model "$MODEL" "$@"
13
+ subc_exec -- "$@"
@@ -31,40 +31,45 @@
31
31
  * https://pi.dev/docs/latest/extensions
32
32
  */
33
33
 
34
- import { readFileSync } from "node:fs"
35
- import { homedir } from "node:os"
36
- import { join } from "node:path"
34
+ import { readFileSync } from 'node:fs';
35
+ import { homedir } from 'node:os';
36
+ import { join } from 'node:path';
37
37
 
38
- const TIMEOUT_MS = 2000
38
+ const TIMEOUT_MS = 2000;
39
39
 
40
- type CompactPhase = "start" | "end"
40
+ type CompactPhase = 'start' | 'end';
41
41
 
42
- let envFileLoaded = false
42
+ let envFileLoaded = false;
43
43
 
44
44
  function loadSubconsciousEnvFile(): void {
45
- if (envFileLoaded) return
46
- envFileLoaded = true
47
- if (process.env.SUBCONSCIOUS_GATEWAY_URL && process.env.SUBCONSCIOUS_API_KEY) {
48
- return
45
+ if (envFileLoaded) return;
46
+ envFileLoaded = true;
47
+ if (
48
+ process.env.SUBCONSCIOUS_GATEWAY_URL &&
49
+ process.env.SUBCONSCIOUS_API_KEY
50
+ ) {
51
+ return;
49
52
  }
50
53
  try {
51
- const path = join(homedir(), ".pi", "agent", "subconscious.env")
52
- const text = readFileSync(path, "utf8")
53
- for (const line of text.split("\n")) {
54
- const trimmed = line.trim()
55
- if (!trimmed || trimmed.startsWith("#")) continue
56
- const m = trimmed.match(/^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=(.*)$/)
57
- if (!m) continue
58
- const key = m[1]
59
- let val = m[2]
54
+ const directory =
55
+ process.env.PI_CODING_AGENT_DIR || join(homedir(), '.pi', 'agent');
56
+ const path = join(directory, 'subconscious.env');
57
+ const text = readFileSync(path, 'utf8');
58
+ for (const line of text.split('\n')) {
59
+ const trimmed = line.trim();
60
+ if (!trimmed || trimmed.startsWith('#')) continue;
61
+ const m = trimmed.match(/^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)=(.*)$/);
62
+ if (!m) continue;
63
+ const key = m[1];
64
+ let val = m[2];
60
65
  if (
61
66
  (val.startsWith('"') && val.endsWith('"')) ||
62
67
  (val.startsWith("'") && val.endsWith("'"))
63
68
  ) {
64
- val = val.slice(1, -1)
69
+ val = val.slice(1, -1);
65
70
  }
66
71
  if (process.env[key] === undefined) {
67
- process.env[key] = val
72
+ process.env[key] = val;
68
73
  }
69
74
  }
70
75
  } catch {
@@ -73,14 +78,18 @@ function loadSubconsciousEnvFile(): void {
73
78
  }
74
79
 
75
80
  function gatewayUrl(): string | undefined {
76
- loadSubconsciousEnvFile()
77
- const raw = process.env.SUBCONSCIOUS_GATEWAY_URL ?? process.env.GATEWAY_URL
78
- return raw ? raw.replace(/\/+$/, "") : undefined
81
+ loadSubconsciousEnvFile();
82
+ const raw = process.env.SUBCONSCIOUS_GATEWAY_URL ?? process.env.GATEWAY_URL;
83
+ return raw ? raw.replace(/\/+$/, '') : undefined;
79
84
  }
80
85
 
81
86
  function apiKey(): string | undefined {
82
- loadSubconsciousEnvFile()
83
- return process.env.SUBCONSCIOUS_API_KEY ?? process.env.API_KEY ?? process.env.PI_API_KEY
87
+ loadSubconsciousEnvFile();
88
+ return (
89
+ process.env.SUBCONSCIOUS_API_KEY ??
90
+ process.env.API_KEY ??
91
+ process.env.PI_API_KEY
92
+ );
84
93
  }
85
94
 
86
95
  async function report(
@@ -89,25 +98,25 @@ async function report(
89
98
  hookEventName: string,
90
99
  metadata?: Record<string, unknown>,
91
100
  ): Promise<void> {
92
- const url = gatewayUrl()
93
- const key = apiKey()
94
- if (!url || !key || !sessionID) return
101
+ const url = gatewayUrl();
102
+ const key = apiKey();
103
+ if (!url || !key || !sessionID) return;
95
104
 
96
105
  // Unique per event, stable for a transport-level retry of this same POST.
97
- const dedupeKey = `${sessionID}:${phase}:${Date.now()}`
106
+ const dedupeKey = `${sessionID}:${phase}:${Date.now()}`;
98
107
 
99
- const controller = new AbortController()
100
- const timer = setTimeout(() => controller.abort(), TIMEOUT_MS)
108
+ const controller = new AbortController();
109
+ const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
101
110
  try {
102
111
  await fetch(`${url}/v1/agent-hooks`, {
103
- method: "POST",
112
+ method: 'POST',
104
113
  headers: {
105
- "content-type": "application/json",
114
+ 'content-type': 'application/json',
106
115
  authorization: `Bearer ${key}`,
107
- "x-subconscious-client": "pi",
116
+ 'x-subconscious-client': 'pi',
108
117
  },
109
118
  body: JSON.stringify({
110
- event: "conversation_compaction",
119
+ event: 'conversation_compaction',
111
120
  conversation_id: sessionID,
112
121
  phase,
113
122
  hook_event_name: hookEventName,
@@ -115,37 +124,50 @@ async function report(
115
124
  metadata: metadata ?? undefined,
116
125
  }),
117
126
  signal: controller.signal,
118
- })
127
+ });
119
128
  } catch {
120
129
  // Fail open on timeout, offline gateway, or auth failure.
121
130
  } finally {
122
- clearTimeout(timer)
131
+ clearTimeout(timer);
123
132
  }
124
133
  }
125
134
 
135
+ type PiCompactEvent = {
136
+ reason?: unknown;
137
+ preparation?: { tokensBefore?: unknown };
138
+ fromExtension?: unknown;
139
+ };
140
+
141
+ type PiContext = {
142
+ sessionManager?: { getSessionId?: () => string | undefined };
143
+ };
144
+
126
145
  // Pi auto-discovers default-exported extension factories from
127
146
  // ~/.pi/agent/extensions/*.ts. See https://pi.dev/docs/latest/extensions
128
147
  export default function (pi: {
129
- on: (event: string, handler: (...args: any[]) => any) => void
148
+ on: (
149
+ event: string,
150
+ handler: (event: PiCompactEvent, ctx: PiContext) => Promise<void>,
151
+ ) => void;
130
152
  }) {
131
- pi.on("session_before_compact", async (event: any, ctx: any) => {
132
- const sessionID = ctx?.sessionManager?.getSessionId?.()
153
+ pi.on('session_before_compact', async (event, ctx) => {
154
+ const sessionID = ctx?.sessionManager?.getSessionId?.();
133
155
  if (sessionID) {
134
- await report(sessionID, "start", "session_before_compact", {
156
+ await report(sessionID, 'start', 'session_before_compact', {
135
157
  reason: event?.reason ?? null,
136
158
  tokens_before: event?.preparation?.tokensBefore ?? null,
137
- })
159
+ });
138
160
  }
139
161
  // Deliberately return nothing: do not cancel or replace summarization.
140
- })
162
+ });
141
163
 
142
- pi.on("session_compact", async (event: any, ctx: any) => {
143
- const sessionID = ctx?.sessionManager?.getSessionId?.()
164
+ pi.on('session_compact', async (event, ctx) => {
165
+ const sessionID = ctx?.sessionManager?.getSessionId?.();
144
166
  if (sessionID) {
145
- await report(sessionID, "end", "session_compact", {
167
+ await report(sessionID, 'end', 'session_compact', {
146
168
  reason: event?.reason ?? null,
147
169
  from_extension: event?.fromExtension ?? null,
148
- })
170
+ });
149
171
  }
150
- })
172
+ });
151
173
  }
@@ -0,0 +1,58 @@
1
+ {
2
+ "agents": [
3
+ "subconscious-code",
4
+ "claude-code",
5
+ "codex",
6
+ "opencode",
7
+ "cursor",
8
+ "copilot",
9
+ "pi",
10
+ "deepseek-harness"
11
+ ],
12
+ "defaults": {
13
+ "model": "subconscious/glm-5.3-marathon",
14
+ "models": [
15
+ "subconscious/glm-5.3-marathon",
16
+ "subconscious/glm-5.2",
17
+ "subconscious/tim-qwen3.6-27b",
18
+ "subconscious/deepseek-v4-flash-marathon",
19
+ "subconscious/deepseek-v4.1-flash-marathon"
20
+ ],
21
+ "baseUrl": "https://api.subconscious.dev"
22
+ },
23
+ "model_capabilities": {
24
+ "subconscious/deepseek-v4.1-flash-marathon": { "vision": true }
25
+ },
26
+ "inputs": [
27
+ {
28
+ "name": "GATEWAY_URL",
29
+ "group": "shared",
30
+ "label": "Gateway URL",
31
+ "description": "Subconscious gateway origin shared by every integration.",
32
+ "type": "url",
33
+ "required": true
34
+ },
35
+ {
36
+ "name": "API_KEY",
37
+ "group": "shared",
38
+ "label": "Shared API key",
39
+ "description": "Default credential used when an agent-specific key is blank.",
40
+ "type": "secret"
41
+ },
42
+ {
43
+ "name": "MODEL",
44
+ "group": "shared",
45
+ "label": "Default model",
46
+ "description": "Initial model used by coding-agent launches and setup. UNSET uses the first live catalog model.",
47
+ "type": "model"
48
+ },
49
+ {
50
+ "name": "MAX_CONCURRENT_SUBAGENTS",
51
+ "default": 4,
52
+ "label": "Concurrent subagents",
53
+ "description": "Maximum concurrent Claude/Codex subagent threads.",
54
+ "type": "integer",
55
+ "min": 1
56
+ }
57
+ ]
58
+ }
@@ -0,0 +1,156 @@
1
+ {
2
+ "id": "subconscious-code",
3
+ "command": "marathon",
4
+ "aliases": ["sc", "subconscious-code"],
5
+ "name": "Marathon",
6
+ "description": "Launch the native Subconscious coding agent with the active profile, gateway, and model.",
7
+ "protocol": "openai",
8
+ "homepage": "https://github.com/subconscious-systems/subconscious-code",
9
+ "install": {
10
+ "commands": {
11
+ "darwin": "subc marathon install",
12
+ "linux": "subc marathon install",
13
+ "win32": "subc marathon install"
14
+ },
15
+ "method": "github-release",
16
+ "repository": "subconscious-systems/subconscious-code",
17
+ "version": "latest",
18
+ "pin_env": "SC_CODE_VERSION",
19
+ "asset": "marathon-{target}.tar.gz",
20
+ "checksum": "marathon-{target}.tar.gz.sha256",
21
+ "legacy_asset": "sc-{target}.tar.gz",
22
+ "targets": [
23
+ "aarch64-apple-darwin",
24
+ "x86_64-apple-darwin",
25
+ "aarch64-unknown-linux-musl",
26
+ "x86_64-unknown-linux-musl"
27
+ ],
28
+ "install_dir": "~/.local/bin",
29
+ "install_dir_env": "SC_INSTALL_DIR",
30
+ "minimum_version": null,
31
+ "verified": true,
32
+ "windows_targets": ["x86_64-pc-windows-msvc", "aarch64-pc-windows-msvc"],
33
+ "windows_assets": [
34
+ "marathon-{target}.zip",
35
+ "marathon-{target}.exe",
36
+ "sc-{target}.zip",
37
+ "sc-{target}.exe"
38
+ ],
39
+ "note": "Windows installs come from the native launcher, which takes the first asset in windows_assets that the release has, plus its .sha256."
40
+ },
41
+ "runbook": {
42
+ "mode": "launch",
43
+ "setup_script": "install.sh",
44
+ "setup_actions": ["install"],
45
+ "setup_needs_auth": false,
46
+ "binary_install_script": "install.sh"
47
+ },
48
+ "help": {
49
+ "usage": "subc [-p NAME] marathon [help|install] [Marathon arguments...]",
50
+ "behavior": "Launches the native Subconscious coding agent with the selected profile gateway, credential, and model.",
51
+ "options": [
52
+ ["help", "Show this help"],
53
+ [
54
+ "install",
55
+ {
56
+ "win32": "Install a verified Windows release, when published upstream",
57
+ "default": "Install the latest precompiled Linux or macOS release"
58
+ }
59
+ ],
60
+ ["--model MODEL", "Override the profile model for this launch"]
61
+ ],
62
+ "args": ["ARGS...", "Pass arguments directly to Marathon"]
63
+ },
64
+ "sessions": { "key": "sc", "portable": false },
65
+ "prerequisites": [
66
+ { "command": "gh|curl", "needed_for": "install", "required": true },
67
+ {
68
+ "command": "sha256sum|shasum",
69
+ "needed_for": "install",
70
+ "required": true
71
+ },
72
+ { "command": "tar", "needed_for": "install", "required": true }
73
+ ],
74
+ "launch": {
75
+ "argv": ["marathon", "{args}"],
76
+ "headless_argv": ["marathon", "--print={prompt}", "{args}"],
77
+ "headless_platforms": ["darwin", "linux"],
78
+ "resume": ["--resume", "{sessionFile}"],
79
+ "persistent_setup": false
80
+ },
81
+ "inputs": [
82
+ {
83
+ "name": "SC_API_KEY",
84
+ "label": "Subconscious Code API key",
85
+ "description": "Subconscious Code credential override; blank uses API_KEY.",
86
+ "type": "secret"
87
+ }
88
+ ],
89
+ "env": [
90
+ {
91
+ "name": "SC_API_KEY",
92
+ "value": "{apiKey}",
93
+ "description": "Gateway credential."
94
+ },
95
+ {
96
+ "name": "SC_BASE_URL",
97
+ "value": "{baseUrlV1}",
98
+ "description": "OpenAI-compatible base URL for model requests."
99
+ },
100
+ {
101
+ "name": "SC_DLR_URL",
102
+ "value": "{baseUrl}",
103
+ "description": "Gateway origin for Marathon's DLR feature.",
104
+ "note": "What DLR does is defined in the Marathon binary, not in this repo."
105
+ },
106
+ {
107
+ "name": "SC_DLR_ENABLED",
108
+ "value": "true",
109
+ "description": "Turns Marathon's DLR feature on.",
110
+ "note": "What DLR does is defined in the Marathon binary, not in this repo."
111
+ },
112
+ {
113
+ "name": "SC_MODEL",
114
+ "value": "{model}",
115
+ "description": "Model for the session."
116
+ }
117
+ ],
118
+ "config": [],
119
+ "capabilities": {
120
+ "compaction": {
121
+ "default": "unknown",
122
+ "on": {
123
+ "set_by_subc": false,
124
+ "kind": null,
125
+ "name": null,
126
+ "value": null,
127
+ "verified": false,
128
+ "note": "subc sets no compaction knob; Marathon's built-in behaviour applies."
129
+ },
130
+ "off": {
131
+ "set_by_subc": false,
132
+ "kind": null,
133
+ "name": null,
134
+ "value": null,
135
+ "verified": false,
136
+ "note": "No off knob is set or documented by subc."
137
+ },
138
+ "threshold": {
139
+ "set_by_subc": false,
140
+ "kind": null,
141
+ "name": null,
142
+ "value": null,
143
+ "verified": false,
144
+ "note": "No threshold knob is set or documented by subc."
145
+ }
146
+ },
147
+ "mcp": {
148
+ "configured_by_subc": false,
149
+ "transports": null,
150
+ "verified": false,
151
+ "note": "subc configures no MCP servers. Transports Marathon supports are not described in this repo."
152
+ },
153
+ "headers": [],
154
+ "hooks": []
155
+ }
156
+ }