autopilot-ai 1.30.0 → 2.0.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.
@@ -898,11 +898,6 @@ interface KimiConfig {
898
898
  githubRepo?: string;
899
899
  /** Shell override for the bash tool. "auto" (default) detects the platform, or specify "bash", "cmd", "powershell", or an absolute path. */
900
900
  shell?: string;
901
- /**
902
- * Deprecated/ignored: Camouflage is always used (the hidden `--ui ink`
903
- * picks Ink for one run). Kept so existing configs still load.
904
- */
905
- uiEngine?: "ink" | "camouflage";
906
901
  /** Max cost per Hotcell worker in USD (default: 1.0). */
907
902
  workerBudgetUsd?: number;
908
903
  /** Hard ceiling for workerBudgetUsd. Any configured or programmatic value above this is silently capped. Default: 5.0. */
package/dist/sdk/index.js CHANGED
@@ -2025,7 +2025,6 @@ async function loadConfig() {
2025
2025
  filePicker: readBooleanEnv("KIMIFLARE_FILE_PICKER") ?? persisted.filePicker ?? true,
2026
2026
  theme: persisted.theme,
2027
2027
  shell: process.env.KIMIFLARE_SHELL ?? persisted.shell,
2028
- uiEngine: persisted.uiEngine,
2029
2028
  remoteWorkerUrl: persisted.remoteWorkerUrl,
2030
2029
  remoteAuthSecret: persisted.remoteAuthSecret,
2031
2030
  remoteTtlMinutes: persisted.remoteTtlMinutes,
@@ -7606,6 +7605,7 @@ ${text3}`
7606
7605
 
7607
7606
  // src/cost-debug.ts
7608
7607
  init_storage_limits();
7608
+ init_logger();
7609
7609
  import { appendFile, mkdir as mkdir2 } from "fs/promises";
7610
7610
  import { homedir as homedir6 } from "os";
7611
7611
  import { join as join9 } from "path";
@@ -7614,9 +7614,6 @@ function debugDir() {
7614
7614
  const xdg = process.env.XDG_DATA_HOME || join9(homedir6(), ".local", "share");
7615
7615
  return join9(xdg, "kimiflare");
7616
7616
  }
7617
- function debugPath() {
7618
- return join9(debugDir(), "cost-debug.jsonl");
7619
- }
7620
7617
  function now() {
7621
7618
  return (/* @__PURE__ */ new Date()).toISOString();
7622
7619
  }
@@ -7670,9 +7667,11 @@ function buildToolStats(results) {
7670
7667
  });
7671
7668
  }
7672
7669
  async function logCostDebug(entry) {
7673
- await mkdir2(debugDir(), { recursive: true });
7674
- await rotateJsonl(debugPath(), RETENTION.costDebugMaxBytes, RETENTION.costDebugRotations);
7675
- await appendFile(debugPath(), JSON.stringify(entry) + "\n", "utf8");
7670
+ const dir = debugDir();
7671
+ const path = join9(dir, "cost-debug.jsonl");
7672
+ await mkdir2(dir, { recursive: true });
7673
+ await rotateJsonl(path, RETENTION.costDebugMaxBytes, RETENTION.costDebugRotations);
7674
+ await appendFile(path, JSON.stringify(entry) + "\n", "utf8");
7676
7675
  }
7677
7676
  function serializePrefix(messages) {
7678
7677
  let end = 0;
@@ -7736,6 +7735,13 @@ function comparePromptPrefixes(prev, curr) {
7736
7735
  };
7737
7736
  }
7738
7737
  async function logTurnDebug(ctx) {
7738
+ try {
7739
+ await writeTurnDebug(ctx);
7740
+ } catch (err) {
7741
+ logger.debug("cost_debug:write_failed", { error: err?.message ?? String(err) });
7742
+ }
7743
+ }
7744
+ async function writeTurnDebug(ctx) {
7739
7745
  const promptSections = analyzePrompt(ctx.messages);
7740
7746
  const promptTotalChars = promptSections.reduce((sum, s) => sum + s.chars, 0);
7741
7747
  const toolStats = buildToolStats(ctx.toolResults);