@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.
- package/dist/acp-ZU5LZRUP.js +14 -0
- package/dist/agent-YDU6HB4S.js +4 -0
- package/dist/{anthropic-FXRRA63E.js → anthropic-GDT73MMP.js} +1 -1
- package/dist/bwrap-4KOC7P3X.js +4 -0
- package/dist/{chunk-IKQTIDRL.js → chunk-325L2ILZ.js} +1 -1
- package/dist/chunk-44LPRRYU.js +60 -0
- package/dist/chunk-5W2TCASL.js +4 -0
- package/dist/{providers-WNYZUMZ3.js → chunk-EEEW3GG4.js} +3 -3
- package/dist/{chunk-4PQYUHSN.js → chunk-H56UQALW.js} +1 -1
- package/dist/chunk-IXCJZNBB.js +5 -0
- package/dist/chunk-JC44NVST.js +4 -0
- package/dist/{chunk-PXQD6GWP.js → chunk-MNP6IJ7C.js} +17 -17
- package/dist/chunk-MTAGHTBG.js +164 -0
- package/dist/chunk-NDPYUGE5.js +5 -0
- package/dist/chunk-PH643I2P.js +4 -0
- package/dist/{chunk-TNF3EHFY.js → chunk-Q3NPRV5P.js} +1 -1
- package/dist/chunk-RDVRYI56.js +610 -0
- package/dist/{chunk-4C3KJLJV.js → chunk-UJGMTIYO.js} +1 -1
- package/dist/{esm-4DBD7ONK.js → esm-PDXUGWFK.js} +1 -1
- package/dist/lib/agent-ZMIS6IH6.js +16 -0
- package/dist/lib/{anthropic-B33M2AVN.js → anthropic-FKIGL7NL.js} +6 -5
- package/dist/lib/bwrap-2OL7VPSO.js +7 -0
- package/dist/lib/{chunk-FODSMOWP.js → chunk-6V7RW6HA.js} +34 -16
- package/dist/lib/{chunk-TJLAJGG4.js → chunk-ALQHMYOZ.js} +14 -3
- package/dist/lib/{chunk-CFYAZWDA.js → chunk-BHSNJT6Z.js} +34 -56
- package/dist/lib/{chunk-XT67KGWE.js → chunk-BQFVUVLI.js} +12 -2
- package/dist/lib/chunk-FFM2LB4C.js +132 -0
- package/dist/lib/{chunk-VUD72RTY.js → chunk-FLKB4BK7.js} +16 -5
- package/dist/lib/{chunk-3OFLDUAW.js → chunk-HQSYRTER.js} +96 -49
- package/dist/lib/{chunk-LDWFI6MR.js → chunk-LRN4MOQ3.js} +25 -1
- package/dist/lib/chunk-MLKGABMK.js +9 -0
- package/dist/lib/{chunk-BCBD34D2.js → chunk-OLFXCZVH.js} +25 -7
- package/dist/lib/{providers-UJEWP7C7.js → chunk-PJ7354ZG.js} +46 -3
- package/dist/lib/chunk-YIWNQ7OA.js +47 -0
- package/dist/lib/{chunk-AFYPVA5C.js → chunk-YUDCYSKO.js} +958 -112
- package/dist/lib/{chunk-3XCGUKGJ.js → chunk-ZPIF7IJN.js} +219 -6
- package/dist/lib/index.d.ts +3771 -1322
- package/dist/lib/index.js +13714 -12463
- package/dist/lib/{openai-C2PZFGJ2.js → openai-ZWIYIBLC.js} +4 -3
- package/dist/lib/{checker-UPY4CXUL.js → permissions-77UJQITR.js} +4 -3
- package/dist/lib/providers-5SJFTU2G.js +9 -0
- package/dist/lib/sandbox-runtime-CCQ3X3SM.js +9 -0
- package/dist/lib/seatbelt-WO7YWKLR.js +7 -0
- package/dist/lib/{tool-filter-BFEINZIA.js → tool-filter-QU4LOZII.js} +2 -1
- package/dist/main.js +225 -191
- package/dist/{openai-WPEICAZ4.js → openai-7LMX5HKW.js} +1 -1
- package/dist/permissions-74IHQW76.js +4 -0
- package/dist/providers-FQCJFM3Q.js +4 -0
- package/dist/sandbox-runtime-RVW4BK3L.js +4 -0
- package/dist/seatbelt-GMQUP6SV.js +4 -0
- package/dist/server-C6H5ZWUG.js +4 -0
- package/dist/{tool-filter-X6IYME2K.js → tool-filter-U5SSL3LR.js} +1 -1
- package/package.json +6 -3
- package/dist/acp-5WRTN2LL.js +0 -14
- package/dist/agent-3CAPJCPD.js +0 -4
- package/dist/bwrap-ZTS67W2K.js +0 -4
- package/dist/checker-3O7QF7XV.js +0 -4
- package/dist/chunk-4HSQBZBI.js +0 -4
- package/dist/chunk-C5WLP3DH.js +0 -5
- package/dist/chunk-FUKVR3XO.js +0 -608
- package/dist/chunk-LHSUYZO5.js +0 -4
- package/dist/chunk-NAAAN2TD.js +0 -60
- package/dist/chunk-YIKI3EPG.js +0 -150
- package/dist/lib/agent-NNYCUIOF.js +0 -10
- package/dist/lib/bwrap-QRGPUP4J.js +0 -6
- package/dist/lib/chunk-GTHYQZRL.js +0 -31
- package/dist/lib/chunk-ORSYNBMM.js +0 -38
- package/dist/lib/seatbelt-FT5IY73W.js +0 -6
- package/dist/seatbelt-PSPJ5LBR.js +0 -5
- package/dist/server-YPBLBRDN.js +0 -4
|
@@ -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,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};
|
package/dist/server-YPBLBRDN.js
DELETED
|
@@ -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};
|