clikcode 1.0.2 → 1.0.3

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/dist/cli.js CHANGED
@@ -12681,6 +12681,7 @@ function eraseInlineBlock() {
12681
12681
  inlineBlock.last = "";
12682
12682
  inlineBlock.liveRows = [];
12683
12683
  inlineBlock.pad = 0;
12684
+ inlineBlock.padOverSaved = false;
12684
12685
  inlineBlock.slack = 0;
12685
12686
  return out2;
12686
12687
  }
@@ -12701,6 +12702,10 @@ var init_inline = __esm({
12701
12702
  columns: 0,
12702
12703
  /** The blank rows above the conversation (a conversation shorter than the screen) that retired rows have not yet used. */
12703
12704
  pad: 0,
12705
+ /** The blank rows above the conversation stand over saved lines that hold part of it (a terminal that did not pull them
12706
+ * back when its screen grew, and the block was pushed down instead): a shrink pushes them into the saved lines, which
12707
+ * are not the blank rows of a short conversation and must never be cleared as if they were. */
12708
+ padOverSaved: false,
12704
12709
  /** The blank rows below the block that a terminal added when its screen grew and that nothing could take: the block is
12705
12710
  * that many rows above the last, until output fills them. */
12706
12711
  slack: 0,
@@ -12864,9 +12869,9 @@ var CLIKCODE_VERSION, CLIKCODE_USER_AGENT, CLIKCODE_COMMIT;
12864
12869
  var init_version = __esm({
12865
12870
  "src/version.ts"() {
12866
12871
  "use strict";
12867
- CLIKCODE_VERSION = "1.0.2" ? "1.0.2" : CLIKCODE_VERSION_FALLBACK;
12872
+ CLIKCODE_VERSION = "1.0.3" ? "1.0.3" : CLIKCODE_VERSION_FALLBACK;
12868
12873
  CLIKCODE_USER_AGENT = `ClikCode/${CLIKCODE_VERSION}`;
12869
- CLIKCODE_COMMIT = "bae78cb80cfad0ce5e7f03ee20377fea76d15b92" ? "bae78cb80cfad0ce5e7f03ee20377fea76d15b92" : void 0;
12874
+ CLIKCODE_COMMIT = "b948fac0a909f3dd8b404c888255cc93f3631de2" ? "b948fac0a909f3dd8b404c888255cc93f3631de2" : void 0;
12870
12875
  }
12871
12876
  });
12872
12877
 
@@ -18384,6 +18389,65 @@ var init_version_memo = __esm({
18384
18389
  }
18385
18390
  });
18386
18391
 
18392
+ // src/runtime/installer-env.ts
18393
+ function installerEnv(env3, extra = {}) {
18394
+ const kept = {};
18395
+ for (const [name, value] of Object.entries(env3)) {
18396
+ if (value === void 0) continue;
18397
+ if (KEEP.has(name) || KEEP.has(name.toUpperCase()) || /^LC_/.test(name) || /^XDG_/.test(name)) kept[name] = value;
18398
+ }
18399
+ return { ...kept, ...extra };
18400
+ }
18401
+ var KEEP;
18402
+ var init_installer_env = __esm({
18403
+ "src/runtime/installer-env.ts"() {
18404
+ "use strict";
18405
+ KEEP = /* @__PURE__ */ new Set([
18406
+ "PATH",
18407
+ "HOME",
18408
+ "USER",
18409
+ "LOGNAME",
18410
+ "SHELL",
18411
+ "TERM",
18412
+ "LANG",
18413
+ "TMPDIR",
18414
+ "TMP",
18415
+ "TEMP",
18416
+ "TZ",
18417
+ "HTTP_PROXY",
18418
+ "HTTPS_PROXY",
18419
+ "NO_PROXY",
18420
+ "ALL_PROXY",
18421
+ "http_proxy",
18422
+ "https_proxy",
18423
+ "no_proxy",
18424
+ "all_proxy",
18425
+ "SSL_CERT_FILE",
18426
+ "SSL_CERT_DIR",
18427
+ "NODE_EXTRA_CA_CERTS",
18428
+ "REQUESTS_CA_BUNDLE",
18429
+ "CURL_CA_BUNDLE",
18430
+ // Windows: the profile, system and program locations an installer resolves paths from.
18431
+ "USERPROFILE",
18432
+ "APPDATA",
18433
+ "LOCALAPPDATA",
18434
+ "PROGRAMDATA",
18435
+ "PROGRAMFILES",
18436
+ "PROGRAMFILES(X86)",
18437
+ "SYSTEMROOT",
18438
+ "WINDIR",
18439
+ "COMSPEC",
18440
+ "PATHEXT",
18441
+ "HOMEDRIVE",
18442
+ "HOMEPATH",
18443
+ "USERNAME",
18444
+ "OS",
18445
+ "PROCESSOR_ARCHITECTURE",
18446
+ "NUMBER_OF_PROCESSORS"
18447
+ ]);
18448
+ }
18449
+ });
18450
+
18387
18451
  // src/tui/active-terminal.ts
18388
18452
  var TERMINAL;
18389
18453
  var init_active_terminal = __esm({
@@ -19179,7 +19243,7 @@ async function runInstallerScript(step) {
19179
19243
  try {
19180
19244
  const script = join13(directory2, windows2 ? "install.ps1" : "install.sh");
19181
19245
  await downloadInstaller(step.url, script);
19182
- const env3 = { ...process.env, ...step.env ?? {} };
19246
+ const env3 = installerEnv(process.env, step.env ?? {});
19183
19247
  let command;
19184
19248
  let args;
19185
19249
  if (windows2) {
@@ -19274,6 +19338,7 @@ var processReporter, inFlight, INSTALL_TIMEOUT_MS, UV_INSTALLER, LOCK_STALE_MS,
19274
19338
  var init_install = __esm({
19275
19339
  "src/harness/transport/native/install.ts"() {
19276
19340
  "use strict";
19341
+ init_installer_env();
19277
19342
  init_lifecycle_log();
19278
19343
  init_paths();
19279
19344
  init_active_terminal();
@@ -44536,7 +44601,7 @@ function parseSandboxMode(value) {
44536
44601
  return void 0;
44537
44602
  }
44538
44603
  function sandboxModeText(mode) {
44539
- return mode === "workspace" ? "Sandbox on \xB7 shell commands write only the workspace, the temp dir and tool caches; they read everything and keep the network" : "Sandbox off \xB7 shell commands run with your full permissions";
44604
+ return mode === "workspace" ? "Sandbox on \xB7 shell commands write only the workspace, the temp dir and tool caches; they read everything except ClikCode's stored sign-ins and secrets, and keep the network" : "Sandbox off \xB7 shell commands run with your full permissions";
44540
44605
  }
44541
44606
  function sandboxWritableDirs(input11) {
44542
44607
  const dirs = [
@@ -44553,10 +44618,16 @@ function sandboxWritableDirs(input11) {
44553
44618
  ];
44554
44619
  return [...new Set(dirs.map((dir2) => path12.resolve(dir2)))];
44555
44620
  }
44621
+ function sandboxHiddenPaths(stateDir) {
44622
+ return {
44623
+ dirs: ["profiles", "computer", "mcp-oauth"].map((name) => path12.join(stateDir, name)),
44624
+ files: ["api-key", "secrets.json"].map((name) => path12.join(stateDir, name))
44625
+ };
44626
+ }
44556
44627
  function maskedDirs(request3) {
44557
44628
  return request3.exists?.(SSH_CONFIG_DROPINS) ? [SSH_CONFIG_DROPINS] : [];
44558
44629
  }
44559
- function bwrapInvocation(command, writable, cwd, masked = [], readOnly = []) {
44630
+ function bwrapInvocation(command, writable, cwd, masked = [], readOnly = [], hidden3 = { dirs: [], files: [] }) {
44560
44631
  return {
44561
44632
  file: "bwrap",
44562
44633
  args: [
@@ -44570,6 +44641,9 @@ function bwrapInvocation(command, writable, cwd, masked = [], readOnly = []) {
44570
44641
  ...masked.flatMap((dir2) => ["--tmpfs", dir2]),
44571
44642
  ...writable.flatMap((dir2) => ["--bind-try", dir2, dir2]),
44572
44643
  ...readOnly.flatMap((entry2) => ["--ro-bind-try", entry2, entry2]),
44644
+ // Last, so a writable or read-only bind above can never put a secret back in view.
44645
+ ...hidden3.dirs.flatMap((dir2) => ["--tmpfs", dir2]),
44646
+ ...hidden3.files.flatMap((file6) => ["--ro-bind", "/dev/null", file6]),
44573
44647
  "--die-with-parent",
44574
44648
  "--chdir",
44575
44649
  cwd,
@@ -44579,27 +44653,36 @@ function bwrapInvocation(command, writable, cwd, masked = [], readOnly = []) {
44579
44653
  ]
44580
44654
  };
44581
44655
  }
44582
- function seatbeltProfile(writableCount) {
44656
+ function seatbeltProfile(writableCount, hiddenDirs = 0, hiddenFiles = 0) {
44583
44657
  const allowed = Array.from({ length: writableCount }, (_, index) => ` (subpath (param "W${index}"))`).join("");
44658
+ const dirs = Array.from({ length: hiddenDirs }, (_, index) => ` (subpath (param "HD${index}"))`).join("");
44659
+ const files = Array.from({ length: hiddenFiles }, (_, index) => ` (literal (param "HF${index}"))`).join("");
44660
+ const hide = hiddenDirs + hiddenFiles ? `(deny file-read* file-write*${dirs}${files})
44661
+ ` : "";
44584
44662
  return `(version 1)
44585
44663
  (allow default)
44586
44664
  (deny file-write*)
44587
44665
  (allow file-write* (subpath "/dev")${allowed})
44588
- `;
44666
+ ${hide}`;
44589
44667
  }
44590
- function sandboxExecInvocation(command, writable) {
44668
+ function sandboxExecInvocation(command, writable, hidden3 = { dirs: [], files: [] }) {
44591
44669
  return {
44592
44670
  file: "/usr/bin/sandbox-exec",
44593
- args: ["-p", seatbeltProfile(writable.length), ...writable.flatMap((dir2, index) => ["-D", `W${index}=${dir2}`]), command.file, ...command.args]
44671
+ args: ["-p", seatbeltProfile(writable.length, hidden3.dirs.length, hidden3.files.length), ...writable.flatMap((dir2, index) => ["-D", `W${index}=${dir2}`]), ...hidden3.dirs.flatMap((dir2, index) => ["-D", `HD${index}=${dir2}`]), ...hidden3.files.flatMap((file6, index) => ["-D", `HF${index}=${file6}`]), command.file, ...command.args]
44594
44672
  };
44595
44673
  }
44674
+ function presentHidden(request3) {
44675
+ const hidden3 = request3.hidden ?? { dirs: [], files: [] };
44676
+ const exists4 = request3.exists ?? (() => false);
44677
+ return { dirs: hidden3.dirs.filter(exists4), files: hidden3.files.filter(exists4) };
44678
+ }
44596
44679
  function wrapForSandbox(request3) {
44597
44680
  if (request3.mode !== "workspace") return { sandboxed: false, invocation: request3.command };
44598
44681
  if (request3.platform === "linux") {
44599
- return request3.available("bwrap") ? { sandboxed: true, invocation: bwrapInvocation(request3.command, request3.writable, request3.cwd, maskedDirs(request3), request3.readOnly) } : { sandboxed: false, invocation: request3.command, missing: "bubblewrap (bwrap)" };
44682
+ return request3.available("bwrap") ? { sandboxed: true, invocation: bwrapInvocation(request3.command, request3.writable, request3.cwd, maskedDirs(request3), request3.readOnly, presentHidden(request3)) } : { sandboxed: false, invocation: request3.command, missing: "bubblewrap (bwrap)" };
44600
44683
  }
44601
44684
  if (request3.platform === "darwin") {
44602
- return request3.available("/usr/bin/sandbox-exec") ? { sandboxed: true, invocation: sandboxExecInvocation(request3.command, request3.writable) } : { sandboxed: false, invocation: request3.command, missing: "sandbox-exec" };
44685
+ return request3.available("/usr/bin/sandbox-exec") ? { sandboxed: true, invocation: sandboxExecInvocation(request3.command, request3.writable, presentHidden(request3)) } : { sandboxed: false, invocation: request3.command, missing: "sandbox-exec" };
44603
44686
  }
44604
44687
  return { sandboxed: false, invocation: request3.command, missing: `a sandbox for ${request3.platform}` };
44605
44688
  }
@@ -44666,12 +44749,13 @@ function sandboxCommand(mode, command, scope) {
44666
44749
  const git3 = mode === "workspace" ? linkedWorktreeGit(scope.cwd) : { writable: [], readOnly: [] };
44667
44750
  const named2 = sandboxWritableDirs({ ...scope, addDirs: [...scope.addDirs, ...git3.writable], tmpDir: os4.tmpdir(), env: process.env, platformDirs: platformDirs() });
44668
44751
  const resolved = [...new Set(named2.map(realOrSame))];
44669
- return { ...wrapForSandbox({ mode, platform: process.platform, command, writable: resolved, cwd: scope.cwd, available: sandboxAvailable, exists: existsSync8, readOnly: git3.readOnly.map(realOrSame) }), writable: [.../* @__PURE__ */ new Set([...resolved, ...named2])] };
44752
+ return { ...wrapForSandbox({ mode, platform: process.platform, command, writable: resolved, cwd: scope.cwd, available: sandboxAvailable, exists: existsSync8, readOnly: git3.readOnly.map(realOrSame), hidden: sandboxHiddenPaths(realOrSame(stateDirectory())) }), writable: [.../* @__PURE__ */ new Set([...resolved, ...named2])] };
44670
44753
  }
44671
44754
  var HOME_CACHE_DIRS, CACHE_ENV_VARS, SSH_CONFIG_DROPINS, SANDBOX_DENIAL_HINT, DENIAL, PATHS, bwrapRuns, darwinDirs;
44672
44755
  var init_sandbox = __esm({
44673
44756
  "src/agent/sandbox.ts"() {
44674
44757
  "use strict";
44758
+ init_paths();
44675
44759
  HOME_CACHE_DIRS = [
44676
44760
  ".cache",
44677
44761
  ".npm",
@@ -51606,8 +51690,8 @@ function flushInlineFrame(finished, pending4) {
51606
51690
  const found = anchored ? inlineBlock.found : void 0;
51607
51691
  inlineBlock.found = void 0;
51608
51692
  const moved = found === void 0 ? 0 : inlineBlock.height - inlineBlock.rows - inlineBlock.slack - found;
51609
- const blanksOnly = moved > 0 && moved <= inlineBlock.pad;
51610
- const onScreen = inlineBlock.pad > 0 || moved < 0;
51693
+ const overSaved = inlineBlock.padOverSaved;
51694
+ const blanksOnly = moved > 0 && moved <= inlineBlock.pad && !overSaved;
51611
51695
  if (anchored) {
51612
51696
  const spacer = Math.max(0, inlineBlock.rows - finished.length - live2.length);
51613
51697
  if (spacer) {
@@ -51632,10 +51716,10 @@ function flushInlineFrame(finished, pending4) {
51632
51716
  if (!clear && !lost && !finished.length && !modes && !signals && signature2 === inlineBlock.last) {
51633
51717
  if (found === void 0) return;
51634
51718
  const gap = height - found - inlineBlock.rows;
51635
- if (!blanksOnly && (gap === 0 || gap > 0 && !onScreen)) {
51719
+ if (!blanksOnly && gap === 0) {
51636
51720
  inlineBlock.height = height;
51637
- inlineBlock.slack = Math.max(0, gap);
51638
51721
  inlineBlock.pad = Math.max(0, inlineBlock.pad - Math.max(0, moved));
51722
+ if (inlineBlock.pad === 0) inlineBlock.padOverSaved = false;
51639
51723
  return;
51640
51724
  }
51641
51725
  }
@@ -51647,6 +51731,7 @@ function flushInlineFrame(finished, pending4) {
51647
51731
  let park2;
51648
51732
  let nextPad = Math.max(0, inlineBlock.pad - Math.max(0, moved));
51649
51733
  let nextSlack = 0;
51734
+ let padOverSaved = overSaved;
51650
51735
  if (diff) {
51651
51736
  let at = inlineBlock.cursorRow;
51652
51737
  const move = (to) => {
@@ -51697,10 +51782,11 @@ ${live2[index]}\x1B[K`;
51697
51782
  nextPad -= amount;
51698
51783
  }
51699
51784
  const gap = height - oldTop - body.length;
51700
- if (gap > 0 && onScreen) {
51785
+ if (gap > 0) {
51701
51786
  lead += `\x1B[1;1H\x1B[${gap}L\x1B[${oldTop + gap + 1};1H`;
51787
+ if (nextPad === 0) padOverSaved = true;
51702
51788
  nextPad += gap;
51703
- } else if (gap > 0) nextSlack = gap;
51789
+ }
51704
51790
  if (blanksOnly) lead += "\x1B[3J";
51705
51791
  }
51706
51792
  text7 = body.map((row, index) => `${row}\x1B[K${index < body.length - 1 ? "\r\n" : ""}`).join("");
@@ -51708,6 +51794,7 @@ ${live2[index]}\x1B[K`;
51708
51794
  park2 = `${back ? `\x1B[${back}A` : ""}\x1B[${Math.max(1, pending4.cursorColumn)}G`;
51709
51795
  }
51710
51796
  inlineBlock.pad = nextPad;
51797
+ inlineBlock.padOverSaved = nextPad > 0 && padOverSaved && !clear && !lost;
51711
51798
  inlineBlock.slack = nextSlack;
51712
51799
  if (!anchored || found !== void 0 || lost) inlineBlock.height = height;
51713
51800
  inlineBlock.rows = live2.length;
@@ -71161,7 +71248,7 @@ function watchConsole(page) {
71161
71248
  logs.set(page, entries);
71162
71249
  const push = (entry2) => {
71163
71250
  entries.push(entry2);
71164
- if (entries.length > KEEP) entries.splice(0, entries.length - KEEP);
71251
+ if (entries.length > KEEP2) entries.splice(0, entries.length - KEEP2);
71165
71252
  };
71166
71253
  page.on("console", (message2) => {
71167
71254
  const at = message2.location();
@@ -71174,7 +71261,7 @@ function pickConsole(entries, options2 = {}) {
71174
71261
  const floor = options2.level ? order.indexOf(options2.level === "warn" ? "warning" : options2.level) : -1;
71175
71262
  const wanted = options2.find?.toLowerCase();
71176
71263
  const kept = entries.filter((entry2) => (floor < 0 || order.indexOf(entry2.level) <= floor) && (!wanted || entry2.text.toLowerCase().includes(wanted)));
71177
- return kept.slice(-Math.min(Math.max(Math.floor(options2.limit ?? 30), 1), KEEP));
71264
+ return kept.slice(-Math.min(Math.max(Math.floor(options2.limit ?? 30), 1), KEEP2));
71178
71265
  }
71179
71266
  function describeConsole(entries, total) {
71180
71267
  if (!entries.length) return total ? "No console messages match." : "The console is empty: nothing logged and no page errors in this tab.";
@@ -71189,7 +71276,7 @@ async function readConsole(page, options2 = {}) {
71189
71276
  if (options2.clear) all.length = 0;
71190
71277
  return hideKeyLikeText(scrubSecrets(await maskSensitive(page, text7))).text;
71191
71278
  }
71192
- var KEEP, MAX_TEXT, logs, watched, LEVELS;
71279
+ var KEEP2, MAX_TEXT, logs, watched, LEVELS;
71193
71280
  var init_console_log = __esm({
71194
71281
  "src/agent/computer/console-log.ts"() {
71195
71282
  "use strict";
@@ -71197,7 +71284,7 @@ var init_console_log = __esm({
71197
71284
  init_secret_finder();
71198
71285
  init_sensitive_fields();
71199
71286
  init_secret_scrubber();
71200
- KEEP = 200;
71287
+ KEEP2 = 200;
71201
71288
  MAX_TEXT = 600;
71202
71289
  logs = sharedState("console-logs", () => /* @__PURE__ */ new WeakMap());
71203
71290
  watched = sharedState("console-watched", () => /* @__PURE__ */ new WeakSet());
@@ -82952,6 +83039,70 @@ function createToolRunner(rt, runTurn) {
82952
83039
  }
82953
83040
  });
82954
83041
  const runSubagent = innerSubagent;
83042
+ const foregroundSubagent = (callId, request3, run4) => {
83043
+ const hand = (handler) => {
83044
+ if (handler) rt.foregroundSteers.set(callId, handler);
83045
+ else rt.foregroundSteers.delete(callId);
83046
+ };
83047
+ const agents = rt.backgroundAgents;
83048
+ if (request3.background || !agents) return run4({ ...request3, callId, ...request3.background ? {} : signal ? { signal } : {}, ...request3.background ? {} : { onSteerReady: hand } });
83049
+ const own = new AbortController();
83050
+ const relay = () => own.abort();
83051
+ if (signal?.aborted) own.abort();
83052
+ else signal?.addEventListener("abort", relay, { once: true });
83053
+ let current5;
83054
+ let promoted;
83055
+ let over = false;
83056
+ const running4 = run4({
83057
+ ...request3,
83058
+ callId,
83059
+ signal: own.signal,
83060
+ onSteerReady: (handler) => {
83061
+ current5 = handler;
83062
+ if (promoted) promoted(handler);
83063
+ else hand(handler);
83064
+ }
83065
+ });
83066
+ const alert = steerAlert(rt);
83067
+ return new Promise((resolve14, reject) => {
83068
+ const detach = () => {
83069
+ alert.signal.removeEventListener("abort", promote);
83070
+ alert.dispose();
83071
+ };
83072
+ function promote() {
83073
+ if (over) return;
83074
+ detach();
83075
+ hand(void 0);
83076
+ signal?.removeEventListener("abort", relay);
83077
+ const label3 = request3.description?.trim() || request3.prompt.split("\n")[0].slice(0, 80);
83078
+ const id = agents.start(label3, (ready) => {
83079
+ promoted = ready;
83080
+ ready(current5);
83081
+ return running4;
83082
+ });
83083
+ resolve14({
83084
+ output: `[Returned early because the user sent a message; read it before anything else. The sub-agent is NOT stopped: it carries on as background agent ${id}, and its result arrives as a message when it finishes. agent_send("${id}", ...) gives it instructions, agent_wait("${id}") gets its result.]`,
83085
+ continuesAs: id
83086
+ });
83087
+ }
83088
+ running4.then(
83089
+ (result) => {
83090
+ over = true;
83091
+ detach();
83092
+ signal?.removeEventListener("abort", relay);
83093
+ resolve14(result);
83094
+ },
83095
+ (error) => {
83096
+ over = true;
83097
+ detach();
83098
+ signal?.removeEventListener("abort", relay);
83099
+ reject(error);
83100
+ }
83101
+ );
83102
+ if (alert.signal.aborted) queueMicrotask(promote);
83103
+ else alert.signal.addEventListener("abort", promote, { once: true });
83104
+ });
83105
+ };
82955
83106
  const toolContext = (callId, toolName, emitOutput) => ({
82956
83107
  cwd,
82957
83108
  addDirs,
@@ -82975,16 +83126,7 @@ function createToolRunner(rt, runTurn) {
82975
83126
  ...input11.onPlan ? { onPlan: input11.onPlan } : {},
82976
83127
  ...input11.net ? { net: input11.net } : {},
82977
83128
  ...sandboxNow(input11) === "workspace" ? { sandbox: "workspace" } : {},
82978
- ...runSubagent ? { runSubagent: (request3) => runSubagent({
82979
- ...request3,
82980
- callId,
82981
- ...request3.background ? {} : signal ? { signal } : {},
82982
- // A foreground sub-agent is steerable while its call is open (turn-runtime.ts).
82983
- ...request3.background ? {} : { onSteerReady: (handler) => {
82984
- if (handler) rt.foregroundSteers.set(callId, handler);
82985
- else rt.foregroundSteers.delete(callId);
82986
- } }
82987
- }) } : {},
83129
+ ...runSubagent ? { runSubagent: (request3) => foregroundSubagent(callId, request3, runSubagent) } : {},
82988
83130
  ...rt.backgroundAgents ? { agents: rt.backgroundAgents } : {}
82989
83131
  });
82990
83132
  const authorize = async (call, tool, ctx) => {
@@ -98668,6 +98810,9 @@ async function runRemoteChat(terminal, localId, first2, firstDraft, startBridge2
98668
98810
  if (!/^[/!]/.test(line3)) setupSession = void 0;
98669
98811
  const complete = new Promise((resolve14, reject) => completions.set(id, { resolve: resolve14, reject }));
98670
98812
  sending = line3;
98813
+ const stepped = new Promise((resolve14) => {
98814
+ wakeLeave = resolve14;
98815
+ });
98671
98816
  if (!/^[/!]/.test(line3)) {
98672
98817
  early = line3;
98673
98818
  typed.set(id, line3);
@@ -98693,9 +98838,6 @@ async function runRemoteChat(terminal, localId, first2, firstDraft, startBridge2
98693
98838
  dropEarly();
98694
98839
  throw error;
98695
98840
  }
98696
- const stepped = new Promise((resolve14) => {
98697
- wakeLeave = resolve14;
98698
- });
98699
98841
  await Promise.race([complete, stepped]);
98700
98842
  wakeLeave = void 0;
98701
98843
  sending = void 0;
@@ -106854,13 +106996,13 @@ function killCgroup(dir2) {
106854
106996
  return false;
106855
106997
  }
106856
106998
  }
106857
- var KEEP2, isKept, boot, realReaders;
106999
+ var KEEP3, isKept, boot, realReaders;
106858
107000
  var init_cgroup_inspect = __esm({
106859
107001
  "src/worker/cgroup-inspect.ts"() {
106860
107002
  "use strict";
106861
107003
  init_command_groups();
106862
- KEEP2 = "clikcode:keep";
106863
- isKept = (commandLine3) => !!commandLine3 && (commandLine3.includes(KEEP2) || /\bcomputer-host\b/.test(commandLine3));
107004
+ KEEP3 = "clikcode:keep";
107005
+ isKept = (commandLine3) => !!commandLine3 && (commandLine3.includes(KEEP3) || /\bcomputer-host\b/.test(commandLine3));
106864
107006
  realReaders = {
106865
107007
  pids: groupPids,
106866
107008
  startedAt: (pid) => {
@@ -107234,7 +107376,7 @@ async function installViaOfficialScript(deps, version) {
107234
107376
  if (!response.ok) throw new Error(`Could not download Cua's installer from ${OFFICIAL_INSTALLER} (HTTP ${response.status}).`);
107235
107377
  const script = await response.text();
107236
107378
  deps.log(`running Cua's macOS installer, pinned to ${version}`);
107237
- const code = await deps.runVisible("/bin/bash", ["-c", script, "cua-driver-install"], { ...deps.env, CUA_DRIVER_RS_VERSION: version });
107379
+ const code = await deps.runVisible("/bin/bash", ["-c", script, "cua-driver-install"], installerEnv(deps.env, { CUA_DRIVER_RS_VERSION: version }));
107238
107380
  if (code !== 0) throw new Error(`Cua's installer exited with ${code}.`);
107239
107381
  return { action: "delegated", version, notes: ["Accessibility and Screen Recording must be granted once: run `cua-driver permissions grant`."] };
107240
107382
  }
@@ -107348,6 +107490,7 @@ var DRIVER_REPO, TAG_PREFIX, WITHDRAWN, CHECKSUMS_REQUIRED_FROM, COSIGN_ISSUER,
107348
107490
  var init_driver_install = __esm({
107349
107491
  "src/agent/computer/driver-install.ts"() {
107350
107492
  "use strict";
107493
+ init_installer_env();
107351
107494
  init_lifecycle_log();
107352
107495
  init_driver();
107353
107496
  DRIVER_REPO = "trycua/cua";
@@ -238,9 +238,9 @@ var CLIKCODE_VERSION, CLIKCODE_USER_AGENT, CLIKCODE_COMMIT;
238
238
  var init_version = __esm({
239
239
  "src/version.ts"() {
240
240
  "use strict";
241
- CLIKCODE_VERSION = "1.0.2" ? "1.0.2" : CLIKCODE_VERSION_FALLBACK;
241
+ CLIKCODE_VERSION = "1.0.3" ? "1.0.3" : CLIKCODE_VERSION_FALLBACK;
242
242
  CLIKCODE_USER_AGENT = `ClikCode/${CLIKCODE_VERSION}`;
243
- CLIKCODE_COMMIT = "bae78cb80cfad0ce5e7f03ee20377fea76d15b92" ? "bae78cb80cfad0ce5e7f03ee20377fea76d15b92" : void 0;
243
+ CLIKCODE_COMMIT = "b948fac0a909f3dd8b404c888255cc93f3631de2" ? "b948fac0a909f3dd8b404c888255cc93f3631de2" : void 0;
244
244
  }
245
245
  });
246
246
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // ClikCode (program b6023dfaccef7be3). Written by scripts/build.mjs; the program is cli.js.
2
+ // ClikCode (program 92c56e05ff732e39). Written by scripts/build.mjs; the program is cli.js.
3
3
  import module from 'node:module';
4
4
  import { homedir } from 'node:os';
5
5
  import { join } from 'node:path';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clikcode",
3
3
  "//version": "MAJOR.MINOR only: ClikDeploy computes the patch and stamps the full version into its own build copy before `npm publish`, so the patch digit here is ignored. Bump the minor (or major) here for a release line; never the patch.",
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "description": "The harness that logs in all your favorite AI coding providers, in the terminal and in VS Code. Chats you can resume in any of them, and automatic account switching when you hit a usage limit.",
6
6
  "type": "module",
7
7
  "bin": {