@swifty.js/swifty 0.0.33 → 0.0.36

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 (70) hide show
  1. package/dist/acp-ZU5LZRUP.js +14 -0
  2. package/dist/agent-YDU6HB4S.js +4 -0
  3. package/dist/{anthropic-FXRRA63E.js → anthropic-GDT73MMP.js} +1 -1
  4. package/dist/bwrap-4KOC7P3X.js +4 -0
  5. package/dist/{chunk-IKQTIDRL.js → chunk-325L2ILZ.js} +1 -1
  6. package/dist/chunk-44LPRRYU.js +60 -0
  7. package/dist/chunk-5W2TCASL.js +4 -0
  8. package/dist/{providers-WNYZUMZ3.js → chunk-EEEW3GG4.js} +3 -3
  9. package/dist/{chunk-4PQYUHSN.js → chunk-H56UQALW.js} +1 -1
  10. package/dist/chunk-IXCJZNBB.js +5 -0
  11. package/dist/chunk-JC44NVST.js +4 -0
  12. package/dist/{chunk-PXQD6GWP.js → chunk-MNP6IJ7C.js} +17 -17
  13. package/dist/chunk-MTAGHTBG.js +164 -0
  14. package/dist/chunk-NDPYUGE5.js +5 -0
  15. package/dist/chunk-PH643I2P.js +4 -0
  16. package/dist/{chunk-TNF3EHFY.js → chunk-Q3NPRV5P.js} +1 -1
  17. package/dist/chunk-RDVRYI56.js +610 -0
  18. package/dist/{chunk-4C3KJLJV.js → chunk-UJGMTIYO.js} +1 -1
  19. package/dist/{esm-4DBD7ONK.js → esm-PDXUGWFK.js} +1 -1
  20. package/dist/lib/agent-ZMIS6IH6.js +16 -0
  21. package/dist/lib/{anthropic-B33M2AVN.js → anthropic-FKIGL7NL.js} +6 -5
  22. package/dist/lib/bwrap-2OL7VPSO.js +7 -0
  23. package/dist/lib/{chunk-FODSMOWP.js → chunk-6V7RW6HA.js} +34 -16
  24. package/dist/lib/{chunk-TJLAJGG4.js → chunk-ALQHMYOZ.js} +14 -3
  25. package/dist/lib/{chunk-CFYAZWDA.js → chunk-BHSNJT6Z.js} +34 -56
  26. package/dist/lib/{chunk-XT67KGWE.js → chunk-BQFVUVLI.js} +12 -2
  27. package/dist/lib/chunk-FFM2LB4C.js +132 -0
  28. package/dist/lib/{chunk-VUD72RTY.js → chunk-FLKB4BK7.js} +16 -5
  29. package/dist/lib/{chunk-3OFLDUAW.js → chunk-HQSYRTER.js} +96 -49
  30. package/dist/lib/{chunk-LDWFI6MR.js → chunk-LRN4MOQ3.js} +25 -1
  31. package/dist/lib/chunk-MLKGABMK.js +9 -0
  32. package/dist/lib/{chunk-BCBD34D2.js → chunk-OLFXCZVH.js} +25 -7
  33. package/dist/lib/{providers-UJEWP7C7.js → chunk-PJ7354ZG.js} +46 -3
  34. package/dist/lib/chunk-YIWNQ7OA.js +47 -0
  35. package/dist/lib/{chunk-AFYPVA5C.js → chunk-YUDCYSKO.js} +958 -112
  36. package/dist/lib/{chunk-3XCGUKGJ.js → chunk-ZPIF7IJN.js} +219 -6
  37. package/dist/lib/index.d.ts +3771 -1322
  38. package/dist/lib/index.js +13714 -12463
  39. package/dist/lib/{openai-C2PZFGJ2.js → openai-ZWIYIBLC.js} +4 -3
  40. package/dist/lib/{checker-UPY4CXUL.js → permissions-77UJQITR.js} +4 -3
  41. package/dist/lib/providers-5SJFTU2G.js +9 -0
  42. package/dist/lib/sandbox-runtime-CCQ3X3SM.js +9 -0
  43. package/dist/lib/seatbelt-WO7YWKLR.js +7 -0
  44. package/dist/lib/{tool-filter-BFEINZIA.js → tool-filter-QU4LOZII.js} +2 -1
  45. package/dist/main.js +225 -191
  46. package/dist/{openai-WPEICAZ4.js → openai-7LMX5HKW.js} +1 -1
  47. package/dist/permissions-74IHQW76.js +4 -0
  48. package/dist/providers-FQCJFM3Q.js +4 -0
  49. package/dist/sandbox-runtime-RVW4BK3L.js +4 -0
  50. package/dist/seatbelt-GMQUP6SV.js +4 -0
  51. package/dist/server-C6H5ZWUG.js +4 -0
  52. package/dist/{tool-filter-X6IYME2K.js → tool-filter-U5SSL3LR.js} +1 -1
  53. package/package.json +6 -3
  54. package/dist/acp-5WRTN2LL.js +0 -14
  55. package/dist/agent-3CAPJCPD.js +0 -4
  56. package/dist/bwrap-ZTS67W2K.js +0 -4
  57. package/dist/checker-3O7QF7XV.js +0 -4
  58. package/dist/chunk-4HSQBZBI.js +0 -4
  59. package/dist/chunk-C5WLP3DH.js +0 -5
  60. package/dist/chunk-FUKVR3XO.js +0 -608
  61. package/dist/chunk-LHSUYZO5.js +0 -4
  62. package/dist/chunk-NAAAN2TD.js +0 -60
  63. package/dist/chunk-YIKI3EPG.js +0 -150
  64. package/dist/lib/agent-NNYCUIOF.js +0 -10
  65. package/dist/lib/bwrap-QRGPUP4J.js +0 -6
  66. package/dist/lib/chunk-GTHYQZRL.js +0 -31
  67. package/dist/lib/chunk-ORSYNBMM.js +0 -38
  68. package/dist/lib/seatbelt-FT5IY73W.js +0 -6
  69. package/dist/seatbelt-PSPJ5LBR.js +0 -5
  70. package/dist/server-YPBLBRDN.js +0 -4
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __swiftyCreateRequire } from "node:module";
3
3
  const require = __swiftyCreateRequire(import.meta.url);
4
- import{a as i,d as s}from"./chunk-IKQTIDRL.js";var a=10,p=2.5,E="advanced-tool-use-2025-11-20",f=new Set(["api.anthropic.com"]),d="SWIFTY_MCP_LOADING";function u(o){if(!o)return!0;try{return f.has(new URL(o).hostname.toLowerCase())}catch{return!1}}function l(o){return Math.floor(o/p)}function m(o,t,e,n=a){let r=(process.env[d]??"").trim().toLowerCase();if(r==="eager"||r==="native"||r==="dispatch")return r;if(e<=0)return"eager";let c=t*n/100;return l(e)<c?"eager":u(o)?"native":"dispatch"}function g(o){let t=0;for(let e of o.listTools())if(e.name.startsWith(i))try{t+=JSON.stringify(e.schema()).length}catch{t+=e.name.length+(e.description?.length??0)}return t}function T(o,t){o.mcpLoadingMode=t;let e=t==="eager";for(let n of o.listTools())s(n)&&typeof n.setDeferLoading=="function"&&n.setDeferLoading(!e);o.exposeToolSearch=!e,o.exposeMcpCall=t==="dispatch"}function M(o,t,e){let n=m(t,e,g(o));return T(o,n),n}export{E as a,T as b,M as c};
4
+ import{a as i,d as s}from"./chunk-325L2ILZ.js";var a=10,p=2.5,E="advanced-tool-use-2025-11-20",f=new Set(["api.anthropic.com"]),d="SWIFTY_MCP_LOADING";function u(o){if(!o)return!0;try{return f.has(new URL(o).hostname.toLowerCase())}catch{return!1}}function l(o){return Math.floor(o/p)}function m(o,t,e,n=a){let r=(process.env[d]??"").trim().toLowerCase();if(r==="eager"||r==="native"||r==="dispatch")return r;if(e<=0)return"eager";let c=t*n/100;return l(e)<c?"eager":u(o)?"native":"dispatch"}function g(o){let t=0;for(let e of o.listTools())if(e.name.startsWith(i))try{t+=JSON.stringify(e.schema()).length}catch{t+=e.name.length+(e.description?.length??0)}return t}function T(o,t){o.mcpLoadingMode=t;let e=t==="eager";for(let n of o.listTools())s(n)&&typeof n.setDeferLoading=="function"&&n.setDeferLoading(!e);o.exposeToolSearch=!e,o.exposeMcpCall=t==="dispatch"}function M(o,t,e){let n=m(t,e,g(o));return T(o,n),n}export{E as a,T as b,M as c};
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __swiftyCreateRequire } from "node:module";
3
+ const require = __swiftyCreateRequire(import.meta.url);
4
+ import{existsSync as r,statSync as l}from"fs";var n="/usr/bin/sandbox-exec",o=class{implementation="seatbelt";available(){return r(n)}prepare(e,s){return{executable:n,args:["-p",i(s),"bash","-c",e]}}};function i(t){let e=[];e.push("(version 1)"),e.push("(deny default)"),e.push("(allow process-exec)"),e.push("(allow process-fork)"),e.push("(allow sysctl-read)"),e.push('(allow file-read* (subpath "/"))');for(let s of t.allowWrite)e.push(`(allow file-write* (subpath "${s}"))`);for(let s of t.denyWrite){let a=r(s)&&l(s).isDirectory()?"subpath":"literal";e.push(`(deny file-write* (${a} "${s}"))`)}return t.networkEnabled?e.push("(allow network*)"):e.push("(deny network*)"),e.join(`
5
+ `)}export{o as a};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __swiftyCreateRequire } from "node:module";
3
+ const require = __swiftyCreateRequire(import.meta.url);
4
+ import{execFileSync as a}from"child_process";var n=class{implementation="bwrap";detected;available(){if(this.detected!==void 0)return this.detected;try{a("which",["bwrap"],{stdio:"ignore"}),this.detected=!0}catch{this.detected=!1}return this.detected}prepare(s,r){let e=["--unshare-user","--unshare-pid"];e.push("--ro-bind","/","/");for(let t of r.allowWrite)e.push("--bind",t,t);for(let t of r.denyWrite)e.push("--ro-bind",t,t);return r.networkEnabled||e.push("--unshare-net"),e.push("--proc","/proc"),e.push("--","bash","-c",s),{executable:"bwrap",args:e}}};export{n as a};