flavor-code 1.2.8 → 1.2.10

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.
Files changed (39) hide show
  1. package/README.md +47 -0
  2. package/README.zh-CN.md +42 -0
  3. package/dist/agent/loop.d.ts +4 -0
  4. package/dist/agent/types.d.ts +10 -0
  5. package/dist/{app-NL2O75LQ.js → app-USAFQVSX.js} +379 -12
  6. package/dist/{chunk-NVLYFU6P.js → chunk-F2HMO5Q2.js} +28 -11
  7. package/dist/{chunk-6X5PHLZI.js → chunk-G32MCAZA.js} +1 -1
  8. package/dist/{chunk-N2S7USST.js → chunk-RQTYHUMK.js} +2 -1
  9. package/dist/{chunk-ED4R7ZCP.js → chunk-WGYNTR4Q.js} +1820 -492
  10. package/dist/{chunk-MBLAXTUP.js → chunk-XFCJXRJ2.js} +15 -5
  11. package/dist/{claude-ink-WPWPEL5A.js → claude-ink-ORUA7GWG.js} +2 -2
  12. package/dist/cli.js +9 -8
  13. package/dist/config/protected-file.d.ts +6 -0
  14. package/dist/context/manager.d.ts +2 -0
  15. package/dist/context/workspace-instructions.d.ts +10 -0
  16. package/dist/desktop/main.js +10528 -2912
  17. package/dist/desktop/pixel-worker.js +73 -0
  18. package/dist/desktop/preload.cjs +80 -2
  19. package/dist/desktop-renderer/assets/index-BVxdOZFW.js +151 -0
  20. package/dist/desktop-renderer/assets/index-CPxt3vFY.css +1 -0
  21. package/dist/desktop-renderer/index.html +3 -4
  22. package/dist/harness/local.d.ts +4 -1
  23. package/dist/jobs/registry.d.ts +48 -0
  24. package/dist/{load-RN3WBX4C.js → load-6ZMEBHSG.js} +1 -1
  25. package/dist/permissions/engine.d.ts +7 -0
  26. package/dist/production.d.ts +13 -1
  27. package/dist/sdk/index.js +4 -4
  28. package/dist/terminal/service.d.ts +57 -0
  29. package/dist/tools/files.d.ts +10 -0
  30. package/dist/tools/jobs.d.ts +4 -0
  31. package/dist/tools/runtime.d.ts +2 -0
  32. package/dist/tools/shell.d.ts +13 -3
  33. package/dist/tools/terminal.d.ts +3 -0
  34. package/dist/tools/types.d.ts +76 -4
  35. package/dist/tools/web.d.ts +53 -0
  36. package/package.json +13 -2
  37. package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +752 -1
  38. package/dist/desktop-renderer/assets/index-57tXtXhI.js +0 -143
  39. package/dist/desktop-renderer/assets/index-Cm_ktmXm.css +0 -1
@@ -5,7 +5,7 @@ import {
5
5
  getGraphemeSegmenter,
6
6
  isEnvTruthy,
7
7
  logError
8
- } from "./chunk-N2S7USST.js";
8
+ } from "./chunk-RQTYHUMK.js";
9
9
  import {
10
10
  __commonJS,
11
11
  __require,
@@ -28628,38 +28628,51 @@ async function setClipboard(text) {
28628
28628
  return raw;
28629
28629
  }
28630
28630
  var linuxCopy;
28631
- function copyNative(text) {
28631
+ var WRITE_WINDOWS_CLIPBOARD_TEXT = String.raw`
28632
+ $inputStream = [Console]::OpenStandardInput()
28633
+ $memoryStream = New-Object System.IO.MemoryStream
28634
+ try {
28635
+ $inputStream.CopyTo($memoryStream)
28636
+ $text = [System.Text.Encoding]::UTF8.GetString($memoryStream.ToArray())
28637
+ Add-Type -AssemblyName System.Windows.Forms
28638
+ [System.Windows.Forms.Clipboard]::SetText($text)
28639
+ } finally {
28640
+ $memoryStream.Dispose()
28641
+ }
28642
+ `;
28643
+ function copyNative(text, options = {}) {
28632
28644
  const opts = { input: text, useCwd: false, timeout: 2e3 };
28633
- switch (process.platform) {
28645
+ const run = options.run ?? execFileNoThrow;
28646
+ switch (options.platform ?? process.platform) {
28634
28647
  case "darwin":
28635
- void execFileNoThrow("pbcopy", [], opts);
28648
+ void run("pbcopy", [], opts);
28636
28649
  return;
28637
28650
  case "linux": {
28638
28651
  if (linuxCopy === null) return;
28639
28652
  if (linuxCopy === "wl-copy") {
28640
- void execFileNoThrow("wl-copy", [], opts);
28653
+ void run("wl-copy", [], opts);
28641
28654
  return;
28642
28655
  }
28643
28656
  if (linuxCopy === "xclip") {
28644
- void execFileNoThrow("xclip", ["-selection", "clipboard"], opts);
28657
+ void run("xclip", ["-selection", "clipboard"], opts);
28645
28658
  return;
28646
28659
  }
28647
28660
  if (linuxCopy === "xsel") {
28648
- void execFileNoThrow("xsel", ["--clipboard", "--input"], opts);
28661
+ void run("xsel", ["--clipboard", "--input"], opts);
28649
28662
  return;
28650
28663
  }
28651
- void execFileNoThrow("wl-copy", [], opts).then((r) => {
28664
+ void run("wl-copy", [], opts).then((r) => {
28652
28665
  if (r.code === 0) {
28653
28666
  linuxCopy = "wl-copy";
28654
28667
  return;
28655
28668
  }
28656
- void execFileNoThrow("xclip", ["-selection", "clipboard"], opts).then(
28669
+ void run("xclip", ["-selection", "clipboard"], opts).then(
28657
28670
  (r2) => {
28658
28671
  if (r2.code === 0) {
28659
28672
  linuxCopy = "xclip";
28660
28673
  return;
28661
28674
  }
28662
- void execFileNoThrow("xsel", ["--clipboard", "--input"], opts).then(
28675
+ void run("xsel", ["--clipboard", "--input"], opts).then(
28663
28676
  (r3) => {
28664
28677
  linuxCopy = r3.code === 0 ? "xsel" : null;
28665
28678
  }
@@ -28670,7 +28683,11 @@ function copyNative(text) {
28670
28683
  return;
28671
28684
  }
28672
28685
  case "win32":
28673
- void execFileNoThrow("clip", [], opts);
28686
+ void run(
28687
+ "powershell.exe",
28688
+ ["-NoProfile", "-NonInteractive", "-STA", "-Command", WRITE_WINDOWS_CLIPBOARD_TEXT],
28689
+ opts
28690
+ );
28674
28691
  return;
28675
28692
  }
28676
28693
  }
@@ -4,7 +4,7 @@ import {
4
4
  message,
5
5
  redactErrorText,
6
6
  redactSecrets
7
- } from "./chunk-ED4R7ZCP.js";
7
+ } from "./chunk-WGYNTR4Q.js";
8
8
 
9
9
  // src/rpc/server.ts
10
10
  import { createInterface } from "readline";
@@ -9,7 +9,8 @@ function execFileNoThrow(file, args, options = {}) {
9
9
  timeout: options.timeout,
10
10
  cwd: options.useCwd === false ? void 0 : process.cwd(),
11
11
  env: options.env,
12
- encoding: "utf8"
12
+ encoding: "utf8",
13
+ windowsHide: true
13
14
  }, (error, stdout, stderr) => {
14
15
  resolve2({
15
16
  stdout,