subconscious-cli 4.1.0 → 4.1.1
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 +15 -8
- package/bin/agents.js +3 -3
- package/bin/native/subc-tui-darwin-amd64 +0 -0
- package/bin/native/subc-tui-darwin-arm64 +0 -0
- package/bin/native/subc-tui-linux-amd64 +0 -0
- package/bin/native/subc-tui-linux-arm64 +0 -0
- package/bin/native/subc-tui-windows-amd64.exe +0 -0
- package/bin/native/subc-tui-windows-arm64.exe +0 -0
- package/bin/registry.generated.json +9 -5
- package/bin/sessions.js +3 -2
- package/bin/windows/agents.js +1 -1
- package/bin/windows/install.js +13 -10
- package/bin/windows/launch.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Log in to Subconscious, then run coding agents against the Subconscious gateway.
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g subconscious-cli
|
|
9
9
|
subc login
|
|
10
|
-
subc
|
|
10
|
+
subc marathon
|
|
11
11
|
subc claude
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -54,7 +54,7 @@ profile; they do not authenticate, install, configure, or launch anything:
|
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
subc claude help
|
|
57
|
-
subc
|
|
57
|
+
subc marathon help
|
|
58
58
|
subc codex help
|
|
59
59
|
subc cursor help
|
|
60
60
|
subc config help
|
|
@@ -69,7 +69,7 @@ gateway environment applied for that process. Arguments pass through as usual:
|
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
71
|
subc claude --continue
|
|
72
|
-
subc
|
|
72
|
+
subc marathon -- -p "fix the tests"
|
|
73
73
|
subc codex exec "write a test"
|
|
74
74
|
subc opencode
|
|
75
75
|
subc pi
|
|
@@ -134,8 +134,8 @@ any preview version pin from the current PowerShell session:
|
|
|
134
134
|
|
|
135
135
|
```powershell
|
|
136
136
|
Remove-Item Env:SC_CODE_VERSION -ErrorAction SilentlyContinue
|
|
137
|
-
subc.cmd
|
|
138
|
-
subc.cmd
|
|
137
|
+
subc.cmd marathon install
|
|
138
|
+
subc.cmd marathon
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
The installer requires the selected release's Windows asset and SHA-256
|
|
@@ -152,7 +152,7 @@ The packaged integrations live in `cli/bin/runbook`.
|
|
|
152
152
|
|
|
153
153
|
| Command | Behavior |
|
|
154
154
|
| --- | --- |
|
|
155
|
-
| `subc
|
|
155
|
+
| `subc marathon` | Launch Subconscious Code with the active gateway, key, model, and DLR transport |
|
|
156
156
|
| `subc claude` | Launch Claude Code with the runbook environment, context limits, subagent limits, and OTEL usage reporting |
|
|
157
157
|
| `subc codex` | Launch Codex with the runbook provider, temporary model catalog, and surgically merged compaction hooks |
|
|
158
158
|
| `subc opencode` | Launch OpenCode with the runbook provider, client header, and context/output limits |
|
|
@@ -195,10 +195,17 @@ to install it before launching. Pi refreshes its Subconscious provider on every
|
|
|
195
195
|
`subc pi` launch while preserving all other providers in `models.json`; its
|
|
196
196
|
executable must already be installed.
|
|
197
197
|
|
|
198
|
-
`subc
|
|
198
|
+
`subc marathon install` detects the operating system and architecture, then downloads
|
|
199
199
|
and checksum-verifies the matching precompiled release from
|
|
200
200
|
`subconscious-systems/subconscious-code`. Apple Silicon and Intel macOS plus
|
|
201
|
-
x86_64 and ARM64 Linux are supported; Cargo is not required.
|
|
201
|
+
x86_64 and ARM64 Linux and Windows x64 are supported; Cargo is not required.
|
|
202
|
+
|
|
203
|
+
Starting with CLI 4.1.1, `subc marathon` is the native agent command. On Windows,
|
|
204
|
+
the installer writes `marathon.exe`, avoiding the system `sc.exe` command.
|
|
205
|
+
`subc sc` remains a compatibility alias but never launches Windows service
|
|
206
|
+
control. Older pinned release binaries are also installed as `marathon.exe`.
|
|
207
|
+
Existing `.sc` settings, sessions, and `SC_*` variables are preserved. Unix
|
|
208
|
+
continues using its existing `sc` binary and shell implementation.
|
|
202
209
|
|
|
203
210
|
`subc codex` disables Codex apps and plugin tools for that launch by default so
|
|
204
211
|
requests remain below the gateway's 128-tool limit. Core coding tools remain
|
package/bin/agents.js
CHANGED
|
@@ -94,7 +94,7 @@ const AGENTS = registry.agents
|
|
|
94
94
|
.filter((agent) => agent.cli !== false)
|
|
95
95
|
.map((agent) => {
|
|
96
96
|
const { command, fallback } = resolveInstall(agent.install);
|
|
97
|
-
return { ...agent, install: command, installFallback: fallback };
|
|
97
|
+
return { ...agent, bin: agent.binByPlatform?.[process.platform] || agent.bin, install: command, installFallback: fallback };
|
|
98
98
|
});
|
|
99
99
|
const BY_ALIAS = new Map();
|
|
100
100
|
for (const agent of AGENTS) {
|
|
@@ -166,14 +166,14 @@ export function parseAgentAction(agent, argv = []) {
|
|
|
166
166
|
|
|
167
167
|
const AGENT_HELP = {
|
|
168
168
|
'subconscious-code': {
|
|
169
|
-
usage: 'subc [-p NAME]
|
|
169
|
+
usage: 'subc [-p NAME] marathon [help|install] [Marathon arguments...]',
|
|
170
170
|
behavior:
|
|
171
171
|
'Launches the native Subconscious coding agent with the selected profile gateway, credential, and model.',
|
|
172
172
|
options: [
|
|
173
173
|
['help', 'Show this help'],
|
|
174
174
|
['install', process.platform === 'win32' ? 'Install a verified Windows release, when published upstream' : 'Install the latest precompiled Linux or macOS release'],
|
|
175
175
|
['--model MODEL', 'Override the profile model for this launch'],
|
|
176
|
-
['ARGS...', 'Pass arguments directly to
|
|
176
|
+
['ARGS...', 'Pass arguments directly to Marathon'],
|
|
177
177
|
],
|
|
178
178
|
},
|
|
179
179
|
'claude-code': {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"agents": [
|
|
17
17
|
{
|
|
18
18
|
"id": "subconscious-code",
|
|
19
|
-
"command": "
|
|
20
|
-
"name": "
|
|
19
|
+
"command": "marathon",
|
|
20
|
+
"name": "Marathon",
|
|
21
21
|
"aliases": [
|
|
22
|
+
"sc",
|
|
22
23
|
"subconscious-code"
|
|
23
24
|
],
|
|
24
25
|
"description": "Launch the native Subconscious coding agent with the active profile, gateway, and model.",
|
|
@@ -33,10 +34,13 @@
|
|
|
33
34
|
"protocol": "openai",
|
|
34
35
|
"homepage": "https://github.com/subconscious-systems/subconscious-code",
|
|
35
36
|
"bin": "sc",
|
|
37
|
+
"binByPlatform": {
|
|
38
|
+
"win32": "marathon"
|
|
39
|
+
},
|
|
36
40
|
"install": {
|
|
37
|
-
"darwin": "subc
|
|
38
|
-
"linux": "subc
|
|
39
|
-
"win32": "subc
|
|
41
|
+
"darwin": "subc marathon install",
|
|
42
|
+
"linux": "subc marathon install",
|
|
43
|
+
"win32": "subc marathon install"
|
|
40
44
|
},
|
|
41
45
|
"runbook": {
|
|
42
46
|
"mode": "launch",
|
package/bin/sessions.js
CHANGED
|
@@ -21,7 +21,7 @@ export const SESSION_HARNESSES = Object.freeze({
|
|
|
21
21
|
codex: { name: 'Codex CLI', command: 'codex', portable: true },
|
|
22
22
|
opencode: { name: 'OpenCode', command: 'opencode', portable: true },
|
|
23
23
|
pi: { name: 'Pi', command: 'pi', portable: true },
|
|
24
|
-
sc: { name: '
|
|
24
|
+
sc: { name: 'Marathon', command: 'marathon', portable: false },
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
function cleanText(value) {
|
|
@@ -592,7 +592,8 @@ export async function sessionsCommand(argv, options = {}) {
|
|
|
592
592
|
if (!session) throw new Error(`Session '${key}' was not found. Run subc sessions to refresh the list.`);
|
|
593
593
|
session = await hydrateSession(session);
|
|
594
594
|
const harnessIndex = argv.indexOf('--harness');
|
|
595
|
-
const
|
|
595
|
+
const requestedHarness = harnessIndex >= 0 ? argv[harnessIndex + 1] : session.harness;
|
|
596
|
+
const targetHarness = requestedHarness === 'marathon' ? 'sc' : requestedHarness;
|
|
596
597
|
const target = SESSION_HARNESSES[targetHarness];
|
|
597
598
|
if (!target) throw new Error(`Unknown destination harness: ${targetHarness}`);
|
|
598
599
|
|
package/bin/windows/agents.js
CHANGED
|
@@ -21,7 +21,7 @@ export async function runWindowsAgent(agent, argv, dependencies) {
|
|
|
21
21
|
? [path.resolve(environment[agent.runbook.installDirEnv] || path.join(os.homedir(), agent.runbook.installDir))] : [];
|
|
22
22
|
environment.PATH = windowsPath([...preferredDirs, ...(environment.PATH || '').split(';'), ...windowsBinDirs(environment)]);
|
|
23
23
|
if (agent.id === 'subconscious-code' && parsed.action === 'install') {
|
|
24
|
-
if (args.length) throw new Error('Usage: subc
|
|
24
|
+
if (args.length) throw new Error('Usage: subc marathon install');
|
|
25
25
|
return finish(await installWindowsAgent(agent.id, environment));
|
|
26
26
|
}
|
|
27
27
|
if (['status', 'uninstall'].includes(parsed.action)) {
|
package/bin/windows/install.js
CHANGED
|
@@ -16,7 +16,7 @@ function npmInstall(command) {
|
|
|
16
16
|
export function windowsInstallSpec(id, env = process.env) {
|
|
17
17
|
const install = registry.agents.find(agent => agent.id === id)?.install;
|
|
18
18
|
const command = typeof install === 'object' ? install.win32 : undefined;
|
|
19
|
-
if (id === 'subconscious-code') return { nativeRelease: true, display: 'subc
|
|
19
|
+
if (id === 'subconscious-code') return { nativeRelease: true, display: 'subc marathon install' };
|
|
20
20
|
if (!command) return null; // Never fall back to a Linux installer.
|
|
21
21
|
if (id === 'claude-code') {
|
|
22
22
|
const primary = powershellCommand("$ErrorActionPreference = 'Stop'; Invoke-RestMethod 'https://claude.ai/install.ps1' | Invoke-Expression; if (-not $?) { exit 1 }", env);
|
|
@@ -30,9 +30,11 @@ export function windowsInstallSpec(id, env = process.env) {
|
|
|
30
30
|
export function windowsReleaseAsset(release, arch = process.arch) {
|
|
31
31
|
const target = { x64: 'x86_64-pc-windows-msvc', arm64: 'aarch64-pc-windows-msvc' }[arch];
|
|
32
32
|
if (!target) throw new Error(`Subconscious Code does not support Windows architecture ${arch}`);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
// Pinned older releases are installed under the new executable name too.
|
|
34
|
+
// Never resolve or overwrite Windows' own sc.exe.
|
|
35
|
+
const names = [`marathon-${target}.zip`, `marathon-${target}.exe`, `sc-${target}.zip`, `sc-${target}.exe`];
|
|
36
|
+
const asset = names.map(name => release.assets?.find(asset => asset.name === name)).find(Boolean);
|
|
37
|
+
if (!asset) throw new Error(`Marathon ${release.tag_name || 'latest'} has no published native Windows ${arch} binary for subc marathon install.`);
|
|
36
38
|
const checksum = release.assets.find(candidate => candidate.name === `${asset.name}.sha256`);
|
|
37
39
|
if (!checksum) throw new Error(`The Windows release is missing ${asset.name}.sha256; refusing an unverified installation.`);
|
|
38
40
|
return { asset, checksum };
|
|
@@ -52,21 +54,22 @@ export async function installWindowsSC(env, { fetchImpl = fetch, run = runWindow
|
|
|
52
54
|
if (!response.ok) throw new Error(`Download failed (HTTP ${response.status}): ${asset.name}`);
|
|
53
55
|
return Buffer.from(await response.arrayBuffer());
|
|
54
56
|
};
|
|
55
|
-
log(`Downloading
|
|
57
|
+
log(`Downloading Marathon ${release.tag_name} for Windows ${arch}...`);
|
|
56
58
|
const [binary, checksumText] = await Promise.all([download(asset), download(checksum)]);
|
|
57
59
|
const expected = checksumText.toString('utf8').trim().split(/\s+/)[0];
|
|
58
60
|
if (!/^[a-f0-9]{64}$/i.test(expected) || createHash('sha256').update(binary).digest('hex') !== expected.toLowerCase()) throw new Error('Subconscious Code checksum verification failed');
|
|
59
61
|
const dir = await fs.mkdtemp(path.join(os.tmpdir(), 'subc-sc-install-'));
|
|
60
62
|
const installDir = path.resolve(env.SC_INSTALL_DIR || path.join(home, '.local', 'bin'));
|
|
61
|
-
const destination = path.join(installDir, '
|
|
62
|
-
const staging = path.join(installDir, `
|
|
63
|
+
const destination = path.join(installDir, 'marathon.exe');
|
|
64
|
+
const staging = path.join(installDir, `marathon-${randomUUID()}.tmp`);
|
|
63
65
|
try {
|
|
64
|
-
const extracted = path.join(dir, '
|
|
66
|
+
const extracted = path.join(dir, 'marathon.exe');
|
|
65
67
|
if (asset.name.endsWith('.zip')) {
|
|
66
68
|
const archive = path.join(dir, 'release.zip');
|
|
67
69
|
await fs.writeFile(archive, binary, { flag: 'wx' });
|
|
68
70
|
// Extract only the exact root executable. No archive-controlled paths.
|
|
69
|
-
const
|
|
71
|
+
const executable = asset.name.startsWith('marathon-') ? 'marathon.exe' : 'sc.exe';
|
|
72
|
+
const spec = powershellCommand("$ErrorActionPreference = 'Stop'; Add-Type -AssemblyName System.IO.Compression.FileSystem; $z = [IO.Compression.ZipFile]::OpenRead($env:SUBC_ARCHIVE); try { $e = $z.GetEntry($env:SUBC_EXECUTABLE); if ($null -eq $e) { throw 'Archive has no expected root executable' }; [IO.Compression.ZipFileExtensions]::ExtractToFile($e, $env:SUBC_EXTRACTED, $false) } finally { $z.Dispose() }", { ...env, SUBC_ARCHIVE: archive, SUBC_EXTRACTED: extracted, SUBC_EXECUTABLE: executable });
|
|
70
73
|
if (await run(spec.command, spec.args, { env: spec.env })) throw new Error('Could not extract the Windows release');
|
|
71
74
|
} else await fs.writeFile(extracted, binary, { flag: 'wx' });
|
|
72
75
|
const magic = (await fs.readFile(extracted)).subarray(0, 2).toString('ascii');
|
|
@@ -74,7 +77,7 @@ export async function installWindowsSC(env, { fetchImpl = fetch, run = runWindow
|
|
|
74
77
|
await fs.mkdir(installDir, { recursive: true });
|
|
75
78
|
await fs.copyFile(extracted, staging);
|
|
76
79
|
await fs.rename(staging, destination);
|
|
77
|
-
log(`Installed ${destination}. Run subc
|
|
80
|
+
log(`Installed ${destination}. Run subc marathon to launch it.`);
|
|
78
81
|
return 0;
|
|
79
82
|
} finally {
|
|
80
83
|
await fs.rm(staging, { force: true });
|
package/bin/windows/launch.js
CHANGED
|
@@ -19,7 +19,7 @@ export async function windowsLaunch(id, argv, env, { tempRoot = os.tmpdir() } =
|
|
|
19
19
|
const { model, base, key } = connection(env, keyName);
|
|
20
20
|
const childEnv = { ...env, SUBCONSCIOUS_API_KEY: key, SUBCONSCIOUS_GATEWAY_URL: base };
|
|
21
21
|
if (id === 'subconscious-code') {
|
|
22
|
-
return { command: '
|
|
22
|
+
return { command: 'marathon', args: argv, env: { ...childEnv, SC_API_KEY: key, SC_BASE_URL: `${base}/v1`, SC_DLR_URL: base, SC_DLR_ENABLED: 'true', SC_MODEL: model } };
|
|
23
23
|
}
|
|
24
24
|
if (id === 'pi') return { command: 'pi', args: ['--provider', 'subconscious', '--model', model, ...argv], env: childEnv };
|
|
25
25
|
if (id === 'opencode') {
|
package/package.json
CHANGED