autopilot-ai 1.30.0 → 2.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.
@@ -878,8 +878,6 @@ interface KimiConfig {
878
878
  costAttribution?: boolean;
879
879
  /** Enable @ file mention picker in chat input. Default: false. */
880
880
  filePicker?: boolean;
881
- /** UI theme name. Default: everforest-dark. */
882
- theme?: string;
883
881
  /** URL of the remote orchestrator Worker. */
884
882
  remoteWorkerUrl?: string;
885
883
  /** Shared secret for authenticating with the remote Worker. */
@@ -898,11 +896,6 @@ interface KimiConfig {
898
896
  githubRepo?: string;
899
897
  /** Shell override for the bash tool. "auto" (default) detects the platform, or specify "bash", "cmd", "powershell", or an absolute path. */
900
898
  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
899
  /** Max cost per Hotcell worker in USD (default: 1.0). */
907
900
  workerBudgetUsd?: number;
908
901
  /** Hard ceiling for workerBudgetUsd. Any configured or programmatic value above this is silently capped. Default: 5.0. */
package/dist/sdk/index.js CHANGED
@@ -2023,9 +2023,7 @@ async function loadConfig() {
2023
2023
  lspServers: persisted.lspServers,
2024
2024
  costAttribution: readBooleanEnv("KIMI_COST_ATTRIBUTION") ?? persisted.costAttribution ?? true,
2025
2025
  filePicker: readBooleanEnv("KIMIFLARE_FILE_PICKER") ?? persisted.filePicker ?? true,
2026
- theme: persisted.theme,
2027
2026
  shell: process.env.KIMIFLARE_SHELL ?? persisted.shell,
2028
- uiEngine: persisted.uiEngine,
2029
2027
  remoteWorkerUrl: persisted.remoteWorkerUrl,
2030
2028
  remoteAuthSecret: persisted.remoteAuthSecret,
2031
2029
  remoteTtlMinutes: persisted.remoteTtlMinutes,
@@ -7606,6 +7604,7 @@ ${text3}`
7606
7604
 
7607
7605
  // src/cost-debug.ts
7608
7606
  init_storage_limits();
7607
+ init_logger();
7609
7608
  import { appendFile, mkdir as mkdir2 } from "fs/promises";
7610
7609
  import { homedir as homedir6 } from "os";
7611
7610
  import { join as join9 } from "path";
@@ -7614,9 +7613,6 @@ function debugDir() {
7614
7613
  const xdg = process.env.XDG_DATA_HOME || join9(homedir6(), ".local", "share");
7615
7614
  return join9(xdg, "kimiflare");
7616
7615
  }
7617
- function debugPath() {
7618
- return join9(debugDir(), "cost-debug.jsonl");
7619
- }
7620
7616
  function now() {
7621
7617
  return (/* @__PURE__ */ new Date()).toISOString();
7622
7618
  }
@@ -7670,9 +7666,11 @@ function buildToolStats(results) {
7670
7666
  });
7671
7667
  }
7672
7668
  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");
7669
+ const dir = debugDir();
7670
+ const path = join9(dir, "cost-debug.jsonl");
7671
+ await mkdir2(dir, { recursive: true });
7672
+ await rotateJsonl(path, RETENTION.costDebugMaxBytes, RETENTION.costDebugRotations);
7673
+ await appendFile(path, JSON.stringify(entry) + "\n", "utf8");
7676
7674
  }
7677
7675
  function serializePrefix(messages) {
7678
7676
  let end = 0;
@@ -7736,6 +7734,13 @@ function comparePromptPrefixes(prev, curr) {
7736
7734
  };
7737
7735
  }
7738
7736
  async function logTurnDebug(ctx) {
7737
+ try {
7738
+ await writeTurnDebug(ctx);
7739
+ } catch (err) {
7740
+ logger.debug("cost_debug:write_failed", { error: err?.message ?? String(err) });
7741
+ }
7742
+ }
7743
+ async function writeTurnDebug(ctx) {
7739
7744
  const promptSections = analyzePrompt(ctx.messages);
7740
7745
  const promptTotalChars = promptSections.reduce((sum, s) => sum + s.chars, 0);
7741
7746
  const toolStats = buildToolStats(ctx.toolResults);