@swifty.js/swifty 0.0.33 → 0.0.35

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 (71) hide show
  1. package/dist/acp-A4KRKOHD.js +14 -0
  2. package/dist/agent-VDWIGFIV.js +4 -0
  3. package/dist/{anthropic-FXRRA63E.js → anthropic-AR2Y4FBR.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-4B4SGVJH.js +164 -0
  8. package/dist/chunk-5W2TCASL.js +4 -0
  9. package/dist/{chunk-FUKVR3XO.js → chunk-F4FOFPKL.js} +126 -123
  10. package/dist/{chunk-4PQYUHSN.js → chunk-H56UQALW.js} +1 -1
  11. package/dist/{providers-WNYZUMZ3.js → chunk-IOLGXPUQ.js} +3 -3
  12. package/dist/chunk-IXCJZNBB.js +5 -0
  13. package/dist/chunk-JC44NVST.js +4 -0
  14. package/dist/chunk-NDPYUGE5.js +5 -0
  15. package/dist/chunk-PH643I2P.js +4 -0
  16. package/dist/{chunk-PXQD6GWP.js → chunk-TOM34LJB.js} +7 -7
  17. package/dist/{chunk-4C3KJLJV.js → chunk-UJGMTIYO.js} +1 -1
  18. package/dist/chunk-YBS5ATGZ.js +4 -0
  19. package/dist/esm-VBV56AO5.js +229 -0
  20. package/dist/lib/agent-TC4HSVMS.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-XT67KGWE.js → chunk-BQFVUVLI.js} +12 -2
  26. package/dist/lib/chunk-FFM2LB4C.js +132 -0
  27. package/dist/lib/{chunk-VUD72RTY.js → chunk-FLKB4BK7.js} +16 -5
  28. package/dist/lib/{chunk-3OFLDUAW.js → chunk-HQSYRTER.js} +96 -49
  29. package/dist/lib/{chunk-LDWFI6MR.js → chunk-LRN4MOQ3.js} +25 -1
  30. package/dist/lib/chunk-MLKGABMK.js +9 -0
  31. package/dist/lib/{providers-UJEWP7C7.js → chunk-OJTISIYU.js} +46 -3
  32. package/dist/lib/{chunk-BCBD34D2.js → chunk-OLFXCZVH.js} +25 -7
  33. package/dist/lib/{chunk-CFYAZWDA.js → chunk-RUDYC7OS.js} +33 -55
  34. package/dist/lib/{chunk-AFYPVA5C.js → chunk-S5VWPTME.js} +940 -109
  35. package/dist/lib/chunk-YIWNQ7OA.js +47 -0
  36. package/dist/lib/{chunk-3XCGUKGJ.js → chunk-ZPIF7IJN.js} +219 -6
  37. package/dist/lib/index.d.ts +3427 -1380
  38. package/dist/lib/index.js +12767 -12281
  39. package/dist/lib/{openai-C2PZFGJ2.js → openai-ZWIYIBLC.js} +4 -3
  40. package/dist/lib/{checker-UPY4CXUL.js → permissions-BW4QPZXV.js} +4 -3
  41. package/dist/lib/providers-ROWSB6ND.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 +227 -194
  46. package/dist/{openai-WPEICAZ4.js → openai-7LMX5HKW.js} +1 -1
  47. package/dist/permissions-74IHQW76.js +4 -0
  48. package/dist/providers-2J4JJYQD.js +4 -0
  49. package/dist/sandbox-runtime-RVW4BK3L.js +4 -0
  50. package/dist/seatbelt-GMQUP6SV.js +4 -0
  51. package/dist/server-ZYK4L22D.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-I7XJSLRI.js +0 -4
  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/esm-4DBD7ONK.js +0 -229
  65. package/dist/lib/agent-NNYCUIOF.js +0 -10
  66. package/dist/lib/bwrap-QRGPUP4J.js +0 -6
  67. package/dist/lib/chunk-GTHYQZRL.js +0 -31
  68. package/dist/lib/chunk-ORSYNBMM.js +0 -38
  69. package/dist/lib/seatbelt-FT5IY73W.js +0 -6
  70. package/dist/seatbelt-PSPJ5LBR.js +0 -5
  71. package/dist/server-YPBLBRDN.js +0 -4
@@ -1,10 +0,0 @@
1
- import {
2
- Agent
3
- } from "./chunk-AFYPVA5C.js";
4
- import "./chunk-XT67KGWE.js";
5
- import "./chunk-BCBD34D2.js";
6
- import "./chunk-3OFLDUAW.js";
7
- import "./chunk-3XCGUKGJ.js";
8
- export {
9
- Agent
10
- };
@@ -1,6 +0,0 @@
1
- import {
2
- BwrapSandbox
3
- } from "./chunk-ORSYNBMM.js";
4
- export {
5
- BwrapSandbox
6
- };
@@ -1,31 +0,0 @@
1
- // src/version.ts
2
- import { readFileSync } from "fs";
3
- import path from "path";
4
- import { fileURLToPath } from "url";
5
- import { z } from "zod";
6
- var PackageJsonSchema = z.object({
7
- version: z.string()
8
- });
9
- function resolveVersion() {
10
- if (true) {
11
- return "0.0.33";
12
- }
13
- const here = path.dirname(fileURLToPath(import.meta.url));
14
- for (const levels of ["..", "../.."]) {
15
- const candidate = path.resolve(here, levels, "package.json");
16
- try {
17
- const raw = JSON.parse(readFileSync(candidate, "utf-8"));
18
- const parsed = PackageJsonSchema.safeParse(raw);
19
- if (parsed.success) {
20
- return parsed.data.version;
21
- }
22
- } catch {
23
- }
24
- }
25
- throw new Error("Could not resolve package version");
26
- }
27
- var version = resolveVersion();
28
-
29
- export {
30
- version
31
- };
@@ -1,38 +0,0 @@
1
- // src/sandbox/bwrap.ts
2
- import { execSync } from "child_process";
3
- var BwrapSandbox = class {
4
- available() {
5
- try {
6
- execSync("which bwrap", { stdio: "ignore" });
7
- return true;
8
- } catch {
9
- return false;
10
- }
11
- }
12
- wrap(command, config) {
13
- const args = [];
14
- args.push("bwrap", "--unshare-user", "--unshare-pid");
15
- args.push("--ro-bind", "/", "/");
16
- for (const path of config.allowWrite) {
17
- args.push("--bind", path, path);
18
- }
19
- for (const path of config.denyWrite) {
20
- args.push("--ro-bind", path, path);
21
- }
22
- if (!config.networkEnabled) {
23
- args.push("--unshare-net");
24
- }
25
- args.push("--proc", "/proc");
26
- args.push("--", "bash", "-c", command);
27
- return args.map((arg) => {
28
- if (/[ \t\n"'\\$`!]/.test(arg)) {
29
- return `'${arg.replace(/'/g, "'\\''")}'`;
30
- }
31
- return arg;
32
- }).join(" ");
33
- }
34
- };
35
-
36
- export {
37
- BwrapSandbox
38
- };
@@ -1,6 +0,0 @@
1
- import {
2
- SeatbeltSandbox
3
- } from "./chunk-VUD72RTY.js";
4
- export {
5
- SeatbeltSandbox
6
- };
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __swiftyCreateRequire } from "node:module";
3
- const require = __swiftyCreateRequire(import.meta.url);
4
- import"./chunk-IZ7QOBSB.js";import{existsSync as a,statSync as i}from"fs";var r="/usr/bin/sandbox-exec",t=class{available(){return a(r)}wrap(s,e){let n=p(e),l=s.replace(/'/g,"'\\''");return`${r} -p '${n}' bash -c '${l}'`}};function p(o){let s=[];s.push("(version 1)"),s.push("(deny default)"),s.push("(allow process-exec)"),s.push("(allow process-fork)"),s.push("(allow sysctl-read)"),s.push('(allow file-read* (subpath "/"))');for(let e of o.allowWrite)s.push(`(allow file-write* (subpath "${e}"))`);for(let e of o.denyWrite){let n=a(e)&&i(e).isDirectory()?"subpath":"literal";s.push(`(deny file-write* (${n} "${e}"))`)}return o.networkEnabled?s.push("(allow network*)"):s.push("(deny network*)"),s.join(`
5
- `)}export{t as SeatbeltSandbox};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as __swiftyCreateRequire } from "node:module";
3
- const require = __swiftyCreateRequire(import.meta.url);
4
- import{b as a,c as b}from"./chunk-PXQD6GWP.js";import"./chunk-FUKVR3XO.js";import"./chunk-4C3KJLJV.js";import"./chunk-LHSUYZO5.js";import"./chunk-YIKI3EPG.js";import"./chunk-4PQYUHSN.js";import"./chunk-TNF3EHFY.js";import"./chunk-C5WLP3DH.js";import"./chunk-4HSQBZBI.js";import"./chunk-IKQTIDRL.js";import"./chunk-NAAAN2TD.js";import"./chunk-NCZR3AGA.js";import"./chunk-QQVDL4QT.js";import"./chunk-IZ7QOBSB.js";export{b as RemoteServer,a as createRemoteAgent};