ai-fly 0.3.2 → 0.4.0-alpha.2
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/ai-fly.js +21 -5
- package/dist/app/main.js +8737 -0
- package/dist/{common-CqxqIg6D.mjs → common-BwKEJKOZ.mjs} +2 -2
- package/dist/{common-CgxCXeTt.mjs → common-Cr7D8JyX.mjs} +1 -1
- package/dist/{daemon-ZWUSWAgM.mjs → daemon-C4kj0IwL.mjs} +3 -3
- package/dist/{forget-BXL2x4Wv.mjs → forget-oMwM-SsU.mjs} +2 -2
- package/dist/{group-B96IKEDF.mjs → group-CjwGDch3.mjs} +1 -1
- package/dist/{import-rpBFh_pa.mjs → import-Zy3LL_PR.mjs} +4 -4
- package/dist/{join-CaFx5yoF.mjs → join-BJMcNGV-.mjs} +3 -3
- package/dist/{join-u1DqTU3U.mjs → join-CdKKj7QS.mjs} +2 -2
- package/dist/{key-KcUU3yhJ.mjs → key-BcNxtRJx.mjs} +3 -3
- package/dist/{key-BiEp995L.mjs → key-TP7lZeqW.mjs} +1 -1
- package/dist/{local-test-C3HGjGY3.mjs → local-test-DbpiPEsD.mjs} +1 -1
- package/dist/{models-dev-2UfQoIpQ.mjs → models-dev-7CclWuHF.mjs} +17 -1
- package/dist/{mux-CS1zhF4W.mjs → mux-BEXBL7rE.mjs} +1 -1
- package/dist/{ports-BRXd5UXh.mjs → ports-Csv91JOD.mjs} +2 -2
- package/dist/{presets-C73CAMZ6.mjs → presets-DRO5N4Vm.mjs} +2 -2
- package/dist/{revoke-CkpvK33Q.mjs → revoke-CXTcFgoT.mjs} +2 -2
- package/dist/{rewrite-xZHWnyJk.mjs → rewrite-BL3jNnFZ.mjs} +77 -7
- package/dist/{route-test-Oew0CO1U.mjs → route-test-DqKRThLp.mjs} +3 -3
- package/dist/{rpc-contract-5qyWzT5t.mjs → rpc-contract-CdiRZhUn.mjs} +4 -0
- package/dist/{run-3pdPsD8e.mjs → run-W7DBz_bR.mjs} +3 -3
- package/dist/{runtime-DNs9GtGp.mjs → runtime-CGF9Sndm.mjs} +2 -2
- package/dist/{secret-COdVHzjH.mjs → secret-DKN75Vry.mjs} +2 -2
- package/dist/secrets-BKKxR3iB.mjs +2 -0
- package/dist/{secrets-BYI6ooTJ.mjs → secrets-DFdwYE_V.mjs} +2 -2
- package/dist/{serve-DSBlodTF.mjs → serve-FjBsmK5n.mjs} +2 -2
- package/dist/{serve-Be4zdKVj.mjs → serve-GRJthOwO.mjs} +4 -4
- package/dist/{service-B5uORhl3.mjs → service-DnQhGK4m.mjs} +21 -7
- package/dist/{settings-C1Hb4zwd.mjs → settings-BAa8I7Ww.mjs} +2 -2
- package/dist/{settings-DU0YqNDt.mjs → settings-Dho5hk5Z.mjs} +1 -1
- package/dist/{share-Cug0944N.mjs → share-DpQPO1eC.mjs} +4 -4
- package/dist/{status-Bttb9aPj.mjs → status-BaRyycxh.mjs} +3 -3
- package/dist/{status-SkNsxGnk.mjs → status-Ce-lxy52.mjs} +3 -3
- package/dist/{store-CrTUwskE.mjs → store-YUMvMCBg.mjs} +1 -1
- package/dist/{store-CQShpYar.mjs → store-jmpkM28T.mjs} +1 -1
- package/dist/{test-mlaZC1y5.mjs → test-Dxkkc-KN.mjs} +2 -2
- package/package.json +5 -2
- package/resources/app-icons/app-icon.icns +0 -0
- package/resources/app-icons/app-icon.ico +0 -0
- package/resources/app-icons/app-icon.json +84 -0
- package/resources/app-icons/app-icon.png +0 -0
- package/resources/app-icons/linux/128x128/app-icon.png +0 -0
- package/resources/app-icons/linux/16x16/app-icon.png +0 -0
- package/resources/app-icons/linux/256x256/app-icon.png +0 -0
- package/resources/app-icons/linux/32x32/app-icon.png +0 -0
- package/resources/app-icons/linux/48x48/app-icon.png +0 -0
- package/resources/app-icons/linux/512x512/app-icon.png +0 -0
- package/resources/app-icons/linux/64x64/app-icon.png +0 -0
- package/resources/app-icons/tray-icon.png +0 -0
- package/webui/dist/assets/index-0TnWjNwU.js +74 -0
- package/webui/dist/assets/index-BGzZMfCg.css +2 -0
- package/webui/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/webui/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/webui/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/webui/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/webui/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/webui/dist/assets/share-tech-mono-latin-400-normal-15MgdvEM.woff +0 -0
- package/webui/dist/assets/share-tech-mono-latin-400-normal-CCqdbj5z.woff2 +0 -0
- package/webui/dist/index.html +13 -0
- package/dist/secrets-u19-8EyW.mjs +0 -2
package/dist/ai-fly.js
CHANGED
|
@@ -12,6 +12,7 @@ Daemon:
|
|
|
12
12
|
ai-fly daemon start [--detach] [--data <dir>] [--relay <url>]... [--proxy <url|env|none>]
|
|
13
13
|
ai-fly daemon stop [--force] | info | restart [--detach] | log [--lines <n>]
|
|
14
14
|
ai-fly serve alias of 'daemon start'
|
|
15
|
+
ai-fly app launch the tray GUI (desktop app)
|
|
15
16
|
|
|
16
17
|
Provider:
|
|
17
18
|
ai-fly service add <name> [--upstream <url> | --preset <id>] [--route <local>=<up>[@forms]]...
|
|
@@ -61,17 +62,32 @@ async function dispatch(command, rest) {
|
|
|
61
62
|
const lazy = (load) => {
|
|
62
63
|
return (argv, ctx) => load().then((m) => m.run([...argv], ctx));
|
|
63
64
|
};
|
|
64
|
-
return match(command).with("serve", () => lazy(() => import("./serve-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
return match(command).with("serve", () => lazy(() => import("./serve-FjBsmK5n.mjs"))(rest)).with("app", async () => {
|
|
66
|
+
const { join, dirname } = await import("node:path");
|
|
67
|
+
const { fileURLToPath } = await import("node:url");
|
|
68
|
+
const { spawn } = await import("node:child_process");
|
|
69
|
+
const entry = join(dirname(fileURLToPath(import.meta.url)), "app", "main.js");
|
|
70
|
+
const { existsSync } = await import("node:fs");
|
|
71
|
+
if (!existsSync(entry)) {
|
|
72
|
+
process.stderr.write(`error: tray GUI not included in this install (missing ${entry})\nnote: rebuild the package with webui + app entries (pnpm app:build)
|
|
73
|
+
`);
|
|
74
|
+
return 1;
|
|
75
|
+
}
|
|
76
|
+
const child = spawn(process.execPath, [entry, ...rest], { stdio: "inherit" });
|
|
77
|
+
return await new Promise((resolve) => {
|
|
78
|
+
child.once("exit", (c) => resolve(c ?? 0));
|
|
79
|
+
});
|
|
80
|
+
}).with("daemon", () => lazy(() => import("./daemon-C4kj0IwL.mjs"))(rest)).with("presets", () => lazy(() => import("./presets-DRO5N4Vm.mjs"))(rest)).with("secret", () => lazy(() => import("./secret-DKN75Vry.mjs"))(rest)).with("settings", async () => (await import("./settings-Dho5hk5Z.mjs")).runAsSettings(rest, {})).with("relay", async () => (await import("./settings-Dho5hk5Z.mjs")).runAsRelay(rest, {})).with("test", () => lazy(() => import("./test-Dxkkc-KN.mjs"))(rest)).with("service", () => lazy(() => import("./service-DnQhGK4m.mjs"))(rest)).with("group", () => lazy(() => import("./group-CjwGDch3.mjs"))(rest)).with("share", () => lazy(() => import("./share-DpQPO1eC.mjs"))(rest)).with("revoke", () => lazy(() => import("./revoke-CXTcFgoT.mjs"))(rest)).with("join", () => lazy(() => import("./join-BJMcNGV-.mjs"))(rest)).with("import", () => lazy(() => import("./import-Zy3LL_PR.mjs"))(rest)).with("run", () => lazy(() => import("./run-W7DBz_bR.mjs"))(rest)).with("ports", () => lazy(() => import("./ports-Csv91JOD.mjs"))(rest)).with("forget", () => lazy(() => import("./forget-oMwM-SsU.mjs"))(rest)).with("key", () => {
|
|
81
|
+
if (rest[0] === "add") return lazy(() => import("./key-BcNxtRJx.mjs"))(rest);
|
|
82
|
+
return lazy(() => import("./key-TP7lZeqW.mjs"))(rest);
|
|
67
83
|
}).with("status", async () => {
|
|
68
84
|
const [scope, ...tail] = rest;
|
|
69
85
|
const wantProvider = scope === "provider" || scope !== "consumer" && providerDirExists();
|
|
70
86
|
const wantConsumer = scope === "consumer" || scope !== "provider" && consumersRootExists();
|
|
71
87
|
const argv = scope === "provider" || scope === "consumer" ? tail : rest;
|
|
72
88
|
let code = 0;
|
|
73
|
-
if (wantProvider) code = Math.max(code, await lazy(() => import("./status-
|
|
74
|
-
if (wantConsumer) code = Math.max(code, await lazy(() => import("./status-
|
|
89
|
+
if (wantProvider) code = Math.max(code, await lazy(() => import("./status-Ce-lxy52.mjs"))(argv));
|
|
90
|
+
if (wantConsumer) code = Math.max(code, await lazy(() => import("./status-BaRyycxh.mjs"))(argv));
|
|
75
91
|
if (!wantProvider && !wantConsumer) process.stdout.write("nothing to report: no provider storage and no imported consumers\n");
|
|
76
92
|
return code;
|
|
77
93
|
}).otherwise(() => {
|