codedeck 0.1.9 → 0.3.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.
- package/README.md +97 -1
- package/dist/cli/cli-name.js +20 -0
- package/dist/cli/cli-name.js.map +1 -0
- package/dist/cli/commands/claims.js +170 -0
- package/dist/cli/commands/claims.js.map +1 -0
- package/dist/cli/commands/doctor.js +22 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/models.js +3 -3
- package/dist/cli/commands/models.js.map +1 -1
- package/dist/cli/commands/open.js +331 -0
- package/dist/cli/commands/open.js.map +1 -0
- package/dist/cli/commands/ps.js +260 -23
- package/dist/cli/commands/ps.js.map +1 -1
- package/dist/cli/commands/rename.js +29 -0
- package/dist/cli/commands/rename.js.map +1 -0
- package/dist/cli/commands/run.js +68 -30
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/setup.js +508 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/usage.js +37 -0
- package/dist/cli/commands/usage.js.map +1 -0
- package/dist/cli/commands/wait.js +3 -2
- package/dist/cli/commands/wait.js.map +1 -1
- package/dist/cli/index.js +37 -21
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/picker-state.js +168 -0
- package/dist/cli/picker-state.js.map +1 -0
- package/dist/cli/picker.js +157 -0
- package/dist/cli/picker.js.map +1 -0
- package/dist/cli/ui.js +233 -0
- package/dist/cli/ui.js.map +1 -0
- package/dist/config/config.js +47 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/orchestrator-mode.js +72 -0
- package/dist/config/orchestrator-mode.js.map +1 -0
- package/dist/config/paths.js +8 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/core/models.js +23 -4
- package/dist/core/models.js.map +1 -1
- package/dist/core/pricing.js +65 -0
- package/dist/core/pricing.js.map +1 -0
- package/dist/core/roles.js +83 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/run-usage.js +46 -0
- package/dist/core/run-usage.js.map +1 -0
- package/dist/core/session.js +5 -0
- package/dist/core/session.js.map +1 -1
- package/dist/daemon/daemon.js +90 -3
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/ipc.js +10 -3
- package/dist/daemon/ipc.js.map +1 -1
- package/dist/drivers/opencode/driver.js +1 -114
- package/dist/drivers/opencode/driver.js.map +1 -1
- package/dist/drivers/opencode/parser.js +86 -0
- package/dist/drivers/opencode/parser.js.map +1 -0
- package/dist/drivers/session-runtime.js +1 -0
- package/dist/drivers/session-runtime.js.map +1 -1
- package/dist/git/worktree.js +1 -1
- package/dist/git/worktree.js.map +1 -1
- package/dist/open/contract.js +104 -0
- package/dist/open/contract.js.map +1 -0
- package/dist/open/injection.js +59 -0
- package/dist/open/injection.js.map +1 -0
- package/dist/open/launchers/claude.js +212 -0
- package/dist/open/launchers/claude.js.map +1 -0
- package/dist/open/launchers/opencode.js +178 -0
- package/dist/open/launchers/opencode.js.map +1 -0
- package/dist/open/orchestrator-prose.js +12 -0
- package/dist/open/orchestrator-prose.js.map +1 -0
- package/dist/open/pty.js +281 -0
- package/dist/open/pty.js.map +1 -0
- package/dist/open/runtime.js +597 -0
- package/dist/open/runtime.js.map +1 -0
- package/dist/plugin/.claude-plugin/plugin.json +11 -0
- package/dist/plugin/agents/auditor.md +36 -0
- package/dist/plugin/agents/general.md +35 -0
- package/dist/plugin/agents/orchestrator-edit.md +69 -0
- package/dist/plugin/agents/orchestrator-read.md +69 -0
- package/dist/plugin/agents/orchestrator.md +91 -0
- package/dist/plugin/agents/reviewer.md +36 -0
- package/dist/plugin/commands/autonomous.md +58 -0
- package/dist/plugin/hooks/hooks.json +24 -0
- package/dist/plugin/hooks/session-id.sh +23 -0
- package/dist/plugin/hooks/session-name-lib.mjs +40 -0
- package/dist/plugin/hooks/session-name-worker.mjs +124 -0
- package/dist/plugin/hooks/session-name.mjs +66 -0
- package/dist/plugin/hooks/session-name.sh +7 -0
- package/dist/plugin/pty-shim.mjs +114 -0
- package/dist/plugin/statusline.sh +260 -0
- package/dist/plugin/themes/codedeck-rage.json +74 -0
- package/dist/plugin/themes/codedeck-ultra.json +76 -0
- package/dist/plugin/ultra.md +9 -0
- package/dist/store/claims.js +152 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/database.js +14 -0
- package/dist/store/database.js.map +1 -1
- package/dist/store/sessions.js +17 -3
- package/dist/store/sessions.js.map +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import * as readline from "node:readline";
|
|
5
|
+
import { IpcClient } from "../../daemon/ipc.js";
|
|
6
|
+
import { loadConfig, resolveRoleBinding, resolveOrchestratorMode, } from "../../config/config.js";
|
|
7
|
+
import { harnessInjection } from "../../open/injection.js";
|
|
8
|
+
import { ptyShimPath } from "../../open/pty.js";
|
|
9
|
+
import { isInteractiveTerminal } from "./setup.js";
|
|
10
|
+
import { sessionsDir } from "../../open/pty.js";
|
|
11
|
+
import { ROLES, parseRole, resolvePluginDir } from "../../core/roles.js";
|
|
12
|
+
import { getCliName } from "../cli-name.js";
|
|
13
|
+
import { effectiveModel, resolveOpenModel } from "../../open/contract.js";
|
|
14
|
+
import { buildArgs as buildOpencodeArgs, buildInlineConfig, createEphemeralTuiDir, ensureOpencodeTheme, OPENCODE_NOT_FOUND, preflight as preflightOpencode, removeEphemeralTuiDir, resolveBinary as resolveOpencodeBinary, } from "../../open/launchers/opencode.js";
|
|
15
|
+
import { assertSupport, buildOpenArgs, CLAUDE_NOT_FOUND, DEFAULT_EFFORT, DEFAULT_MODEL, entitlementError, preflightModel, resolveBinary, } from "../../open/launchers/claude.js";
|
|
16
|
+
import { assertPluginDirectory, currentWorkingDirectory, finishOpenSession, playBoot, renderBanner, spawnHarness, } from "../../open/runtime.js";
|
|
17
|
+
export { ROLES, parseRole, resolvePluginDir };
|
|
18
|
+
export { effectiveModel };
|
|
19
|
+
export { buildOpenArgs, buildSettings, entitlementError, judgeModel, sessionName } from "../../open/launchers/claude.js";
|
|
20
|
+
export { bootFrame, ensureCodedeckShim, exitCodeFor, finishOpenSession, installSigintGuard, renderBanner, renderExit, resumeHint, sanitizeEnv, spinnerTips, withCodedeckOnPath, writeStdoutSync, } from "../../open/runtime.js";
|
|
21
|
+
const DEFAULT_ROLE = "orchestrator";
|
|
22
|
+
export function launchClaude(claudeBin, model, args, cwd, sessionFile, onClose, spawnChild = spawn, signalHost = process, envExtra, pty) {
|
|
23
|
+
return spawnHarness(claudeBin, args, {
|
|
24
|
+
cwd,
|
|
25
|
+
sessionFile,
|
|
26
|
+
envExtra,
|
|
27
|
+
model,
|
|
28
|
+
notFoundMessage: CLAUDE_NOT_FOUND,
|
|
29
|
+
entitlementError,
|
|
30
|
+
onClose,
|
|
31
|
+
spawnChild,
|
|
32
|
+
signalHost,
|
|
33
|
+
pty,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* What CodeDeck may type into this harness, or nothing when the harness has no
|
|
38
|
+
* command worth typing or the caller turned the pty off. Interactive only: a
|
|
39
|
+
* `--print` launch has no TUI to type into.
|
|
40
|
+
*/
|
|
41
|
+
export function ptyLaunchForHarness(harness, pluginDir, sessionFile, flags, config, interactive) {
|
|
42
|
+
if (!interactive)
|
|
43
|
+
return undefined;
|
|
44
|
+
if (flags.pty === false || config.pty === false)
|
|
45
|
+
return undefined;
|
|
46
|
+
const rename = harnessInjection(harness).rename;
|
|
47
|
+
if (!rename)
|
|
48
|
+
return undefined;
|
|
49
|
+
return { shim: ptyShimPath(pluginDir), sessionFile, keystrokesForName: rename };
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Width of each replacement verb in terminal columns. Keeping this fixed
|
|
53
|
+
* leaves Claude's elapsed-time and token-count fields aligned.
|
|
54
|
+
*/
|
|
55
|
+
export const SPINNER_VERB_WIDTH = 12;
|
|
56
|
+
/**
|
|
57
|
+
* Why an agent bound to a harness without a launcher cannot be opened, or
|
|
58
|
+
* nothing. `open` launches claude and opencode sessions; anything else has no
|
|
59
|
+
* launcher, so refusing beats opening a session under a name whose
|
|
60
|
+
* configuration it does not follow.
|
|
61
|
+
*
|
|
62
|
+
* The model is deliberately not part of the check. An explicit --model changes
|
|
63
|
+
* which binary runs, never whether it is the right harness.
|
|
64
|
+
*/
|
|
65
|
+
export function harnessMismatch(role, binding) {
|
|
66
|
+
if (!binding || binding.harness === "claude" || binding.harness === "opencode") {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
return (`Agent "${role}" runs on ${binding.harness}, and ${getCliName()} open only launches claude and opencode sessions. ` +
|
|
70
|
+
`Use \`${getCliName()} run --role ${role} "<prompt>"\`, or move it with \`${getCliName()} setup\`.`);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The one dispatch decision: the binding owns the harness, and an unbound
|
|
74
|
+
* role opens claude like it always did. Anything else throws instead of
|
|
75
|
+
* rounding down to the wrong session.
|
|
76
|
+
*/
|
|
77
|
+
export function launcherFor(role, binding) {
|
|
78
|
+
const harness = binding?.harness ?? "claude";
|
|
79
|
+
if (harness === "claude" || harness === "opencode")
|
|
80
|
+
return harness;
|
|
81
|
+
const mismatch = harnessMismatch(role, binding);
|
|
82
|
+
throw new Error(mismatch ?? `Agent "${role}" runs on ${harness}, which ${getCliName()} open does not launch.`);
|
|
83
|
+
}
|
|
84
|
+
function selectRole() {
|
|
85
|
+
const rl = readline.createInterface({
|
|
86
|
+
input: process.stdin,
|
|
87
|
+
output: process.stdout,
|
|
88
|
+
});
|
|
89
|
+
return new Promise((resolve, reject) => {
|
|
90
|
+
let settled = false;
|
|
91
|
+
const finish = (role) => {
|
|
92
|
+
if (settled)
|
|
93
|
+
return;
|
|
94
|
+
settled = true;
|
|
95
|
+
rl.close();
|
|
96
|
+
resolve(role);
|
|
97
|
+
};
|
|
98
|
+
// Ctrl+D closes the interface without ever answering, so without this the
|
|
99
|
+
// promise stays pending and the command hangs. It is a walk-out, not a
|
|
100
|
+
// choice: EOF here used to launch a permission-bypassed session the user
|
|
101
|
+
// never picked, and the model wizard already treats the same keystroke as
|
|
102
|
+
// leaving. Reaching this needs a TTY, so a piped launch cannot trip it.
|
|
103
|
+
rl.once("close", () => {
|
|
104
|
+
if (settled)
|
|
105
|
+
return;
|
|
106
|
+
settled = true;
|
|
107
|
+
reject(new Error("Role selection was interrupted; nothing was launched."));
|
|
108
|
+
});
|
|
109
|
+
const ask = () => {
|
|
110
|
+
rl.question(`Role [${DEFAULT_ROLE}] (${ROLES.join("/")}): `, (answer) => {
|
|
111
|
+
const role = parseRole(answer || DEFAULT_ROLE);
|
|
112
|
+
if (role) {
|
|
113
|
+
finish(role);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
process.stderr.write(`Invalid role. Available roles: ${ROLES.join(", ")}\n`);
|
|
117
|
+
ask();
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
ask();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* `claude -p` answers one prompt and exits, so there is no session to choose a
|
|
125
|
+
* role for. A terminal check alone does not catch this: under a pty (CI scripts,
|
|
126
|
+
* `script`, most CI runners) stdout is a TTY and the prompt would block forever.
|
|
127
|
+
*/
|
|
128
|
+
export function isNonInteractiveLaunch(passthrough) {
|
|
129
|
+
return passthrough.some((arg) => arg === "-p" || arg === "--print");
|
|
130
|
+
}
|
|
131
|
+
export function resolveRole(input, interactive) {
|
|
132
|
+
if (input !== undefined) {
|
|
133
|
+
const role = parseRole(input);
|
|
134
|
+
if (!role) {
|
|
135
|
+
return Promise.reject(new Error(`Invalid role "${input}". Available roles: ${ROLES.join(", ")}`));
|
|
136
|
+
}
|
|
137
|
+
return Promise.resolve(role);
|
|
138
|
+
}
|
|
139
|
+
if (!interactive || !isInteractiveTerminal())
|
|
140
|
+
return Promise.resolve(DEFAULT_ROLE);
|
|
141
|
+
return selectRole();
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Unknown options have to be allowed so the passthrough can carry Claude's own
|
|
145
|
+
* flags, but that acceptance must stop at the separator. Without this check a
|
|
146
|
+
* typo in a safety flag is silent: `open --no-bypas` looks like it turned the
|
|
147
|
+
* permission bypass off and launches with it still on.
|
|
148
|
+
*
|
|
149
|
+
* The rule enforced is commander's own: reject exactly what commander would
|
|
150
|
+
* treat as unknown under allowUnknownOption(). Looser lets a dropped flag
|
|
151
|
+
* through, which is the bug this exists to catch; stricter refuses a command
|
|
152
|
+
* line commander parses happily.
|
|
153
|
+
*
|
|
154
|
+
* Returns the operands, meaning the tokens commander did not swallow as an
|
|
155
|
+
* option or an option's value, so the caller can tell a role from a value that
|
|
156
|
+
* happens to spell one.
|
|
157
|
+
*
|
|
158
|
+
* The known set is read from commander's registry so it cannot drift from the
|
|
159
|
+
* declared options. Help is the exception: commander keeps its help option out
|
|
160
|
+
* of `command.options`, so those two spellings are mirrored from the
|
|
161
|
+
* `.helpOption()` call in src/cli/index.ts and change with it.
|
|
162
|
+
*/
|
|
163
|
+
export function scanOptions(tokens, command) {
|
|
164
|
+
const takesValue = new Map([
|
|
165
|
+
["-h", false],
|
|
166
|
+
["--help", false],
|
|
167
|
+
]);
|
|
168
|
+
for (const option of command.options) {
|
|
169
|
+
const wantsValue = option.required || option.optional;
|
|
170
|
+
if (option.short)
|
|
171
|
+
takesValue.set(option.short, wantsValue);
|
|
172
|
+
if (option.long)
|
|
173
|
+
takesValue.set(option.long, wantsValue);
|
|
174
|
+
}
|
|
175
|
+
const operands = [];
|
|
176
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
177
|
+
const token = tokens[i];
|
|
178
|
+
if (!token.startsWith("-") || token === "-") {
|
|
179
|
+
operands.push(token);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const separator = token.indexOf("=");
|
|
183
|
+
const name = separator >= 0 ? token.slice(0, separator) : token;
|
|
184
|
+
const wantsValue = takesValue.get(name);
|
|
185
|
+
if (wantsValue === undefined) {
|
|
186
|
+
throw new Error(`Unknown option "${name}" for ${getCliName()} open. Options for Claude go after "--".`);
|
|
187
|
+
}
|
|
188
|
+
// Commander honours "=" only on options declared with a value and drops the
|
|
189
|
+
// whole token otherwise, so `--no-bypass=false` would read as accepted and
|
|
190
|
+
// launch with the bypass still on.
|
|
191
|
+
if (separator >= 0 && !wantsValue) {
|
|
192
|
+
throw new Error(`Option "${name}" for ${getCliName()} open takes no value.`);
|
|
193
|
+
}
|
|
194
|
+
// The next token belongs to this option even when it looks like a flag,
|
|
195
|
+
// which is what keeps `--model -weird` from reading as an unknown option.
|
|
196
|
+
if (wantsValue && separator < 0)
|
|
197
|
+
i += 1;
|
|
198
|
+
}
|
|
199
|
+
return operands;
|
|
200
|
+
}
|
|
201
|
+
function getInvocation(command, roleArg) {
|
|
202
|
+
const rawArgs = command.parent?.rawArgs ?? [];
|
|
203
|
+
// Searching forward from the executable and script entries, never backwards:
|
|
204
|
+
// `open -- --print open` would otherwise match the passthrough word instead
|
|
205
|
+
// of the command and lose the separator behind it.
|
|
206
|
+
const commandIndex = rawArgs.indexOf(command.name(), 2);
|
|
207
|
+
const separatorIndex = commandIndex >= 0 ? rawArgs.indexOf("--", commandIndex + 1) : -1;
|
|
208
|
+
const beforeSeparator = commandIndex >= 0
|
|
209
|
+
? rawArgs.slice(commandIndex + 1, separatorIndex >= 0 ? separatorIndex : undefined)
|
|
210
|
+
: [];
|
|
211
|
+
const operands = scanOptions(beforeSeparator, command);
|
|
212
|
+
if (separatorIndex >= 0) {
|
|
213
|
+
// Commander folds the separator away, so roleArg can just as easily have
|
|
214
|
+
// come from the passthrough. It counts as a role only when it really stood
|
|
215
|
+
// before the separator as an operand, never as some option's value:
|
|
216
|
+
// `open --resume reviewer -- reviewer` asks for no role at all.
|
|
217
|
+
const explicitRole = roleArg !== undefined && operands.includes(roleArg) ? roleArg : undefined;
|
|
218
|
+
return {
|
|
219
|
+
roleInput: explicitRole,
|
|
220
|
+
passthrough: rawArgs.slice(separatorIndex + 1),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
const parsedArgs = command.args.slice();
|
|
224
|
+
if (roleArg !== undefined && parsedArgs[0] === roleArg) {
|
|
225
|
+
parsedArgs.shift();
|
|
226
|
+
}
|
|
227
|
+
if (parsedArgs.length > 0) {
|
|
228
|
+
throw new Error('Arguments for Claude must follow "--" so CodeDeck can forward them verbatim.');
|
|
229
|
+
}
|
|
230
|
+
return { roleInput: roleArg, passthrough: [] };
|
|
231
|
+
}
|
|
232
|
+
export function registerOpenCommand(program) {
|
|
233
|
+
program
|
|
234
|
+
.command("open [role]")
|
|
235
|
+
.description(`Open a configured Claude Code session (roles: ${ROLES.join(" | ")}, default: ${DEFAULT_ROLE}, 3-letter prefixes accepted)`)
|
|
236
|
+
.option("--model <model>", `model to use (default: ${DEFAULT_MODEL})`)
|
|
237
|
+
.option("--effort <level>", `reasoning effort (default: ${DEFAULT_EFFORT})`)
|
|
238
|
+
.option("--resume <session>", "resume a Claude Code session")
|
|
239
|
+
.option("--worktree", "ask Claude Code to create an isolated worktree")
|
|
240
|
+
.option("--no-bypass", "do not skip Claude Code permission prompts")
|
|
241
|
+
.option("--no-theme", "keep only the CodeDeck status line, without the theme or the renderer")
|
|
242
|
+
.option("--no-pty", "do not run the session under a pty, which also drops the automatic rename")
|
|
243
|
+
.allowUnknownOption()
|
|
244
|
+
.action(async (roleArg, opts, command) => {
|
|
245
|
+
const invocation = getInvocation(command, roleArg);
|
|
246
|
+
const interactive = !isNonInteractiveLaunch(invocation.passthrough);
|
|
247
|
+
const role = await resolveRole(invocation.roleInput, interactive);
|
|
248
|
+
const pluginDir = resolvePluginDir();
|
|
249
|
+
assertPluginDirectory(pluginDir);
|
|
250
|
+
const cwd = currentWorkingDirectory();
|
|
251
|
+
const client = new IpcClient();
|
|
252
|
+
await client.ensureDaemonStarted();
|
|
253
|
+
// Launching never opens the wizard. Asking a model per harness was the
|
|
254
|
+
// wrong question to greet someone with, and `codedeck setup` is the place
|
|
255
|
+
// to answer it deliberately.
|
|
256
|
+
const config = loadConfig();
|
|
257
|
+
const orchestratorMode = resolveOrchestratorMode(config);
|
|
258
|
+
const binding = resolveRoleBinding(role, config);
|
|
259
|
+
const launcher = launcherFor(role, binding);
|
|
260
|
+
const passthroughModel = effectiveModel(invocation.passthrough);
|
|
261
|
+
const { model: boundModel, fromConfig } = resolveOpenModel(role, { model: opts.model, passthroughModel }, config);
|
|
262
|
+
// Not the shared temp directory: `open` types the name it finds beside
|
|
263
|
+
// this file into a live session, and on Linux anyone on the box can put
|
|
264
|
+
// a file in /tmp under a name that is only a pid.
|
|
265
|
+
const sessionFile = path.join(sessionsDir(), `codedeck-session-${process.pid}`);
|
|
266
|
+
const runId = randomUUID();
|
|
267
|
+
if (launcher === "opencode") {
|
|
268
|
+
// Dispatch needs a binding, and a binding always carries a model, so
|
|
269
|
+
// this is unreachable through the CLI. It stays because buildArgs
|
|
270
|
+
// takes a string and a TypeError is not a diagnostic.
|
|
271
|
+
if (boundModel === undefined) {
|
|
272
|
+
throw new Error(`Agent "${role}" has no model bound. Run \`${getCliName()} setup\` to bind one.`);
|
|
273
|
+
}
|
|
274
|
+
if (opts.worktree) {
|
|
275
|
+
console.error("Warning: --worktree has no effect on opencode (no native worktree); continuing without it.");
|
|
276
|
+
}
|
|
277
|
+
const model = passthroughModel ?? boundModel;
|
|
278
|
+
await preflightOpencode(model, fromConfig);
|
|
279
|
+
const opencodeBin = await resolveOpencodeBinary();
|
|
280
|
+
// Effort has no opencode flag; the banner names the fallback.
|
|
281
|
+
const effort = opts.effort ?? "default";
|
|
282
|
+
// --no-theme asks for no CodeDeck styling, and an animation is styling.
|
|
283
|
+
if (opts.theme === false) {
|
|
284
|
+
process.stdout.write(renderBanner(role, model, effort));
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
await playBoot(role, model, effort);
|
|
288
|
+
}
|
|
289
|
+
// --no-theme leaves the user's own opencode theme alone. Otherwise the
|
|
290
|
+
// managed rage theme is ensured once and selected through an ephemeral
|
|
291
|
+
// config dir, so the user's tui.json is never rewritten.
|
|
292
|
+
const tuiDir = opts.theme === false || !ensureOpencodeTheme(pluginDir)
|
|
293
|
+
? undefined
|
|
294
|
+
: createEphemeralTuiDir();
|
|
295
|
+
const closeOpencode = () => {
|
|
296
|
+
if (tuiDir !== undefined)
|
|
297
|
+
removeEphemeralTuiDir(tuiDir);
|
|
298
|
+
finishOpenSession(role, sessionFile);
|
|
299
|
+
};
|
|
300
|
+
await spawnHarness(opencodeBin, buildOpencodeArgs(role, { ...opts, model: boundModel }, invocation.passthrough), {
|
|
301
|
+
cwd,
|
|
302
|
+
envExtra: {
|
|
303
|
+
CODEDECK_RUN_ID: runId,
|
|
304
|
+
OPENCODE_CONFIG_CONTENT: buildInlineConfig(pluginDir, role, orchestratorMode),
|
|
305
|
+
...(tuiDir !== undefined ? { OPENCODE_CONFIG_DIR: tuiDir } : {}),
|
|
306
|
+
},
|
|
307
|
+
sessionFile,
|
|
308
|
+
model,
|
|
309
|
+
notFoundMessage: OPENCODE_NOT_FOUND,
|
|
310
|
+
onClose: closeOpencode,
|
|
311
|
+
});
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const resolved = boundModel ?? DEFAULT_MODEL;
|
|
315
|
+
const args = buildOpenArgs(role, { ...opts, model: resolved, remoteControl: config.remoteControl }, pluginDir, invocation.passthrough, cwd, orchestratorMode);
|
|
316
|
+
const model = passthroughModel ?? resolved;
|
|
317
|
+
await preflightModel(model, fromConfig);
|
|
318
|
+
const claudeBin = await resolveBinary();
|
|
319
|
+
await assertSupport(claudeBin, cwd);
|
|
320
|
+
const effort = opts.effort ?? DEFAULT_EFFORT;
|
|
321
|
+
// --no-theme asks for no CodeDeck styling, and an animation is styling.
|
|
322
|
+
if (opts.theme === false) {
|
|
323
|
+
process.stdout.write(renderBanner(role, model, effort));
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
await playBoot(role, model, effort);
|
|
327
|
+
}
|
|
328
|
+
await launchClaude(claudeBin, model, args, cwd, sessionFile, () => finishOpenSession(role, sessionFile), undefined, undefined, { CODEDECK_RUN_ID: runId }, ptyLaunchForHarness("claude", pluginDir, sessionFile, opts, config, interactive));
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
//# sourceMappingURL=open.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.js","sourceRoot":"","sources":["../../../src/cli/commands/open.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,uBAAuB,GAGxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAa,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAkB,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EACL,SAAS,IAAI,iBAAiB,EAC9B,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,SAAS,IAAI,iBAAiB,EAC9B,qBAAqB,EACrB,aAAa,IAAI,qB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