ai-fly 0.4.0-alpha.3 → 0.4.0-alpha.5
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 +8 -7
- package/dist/app/main.js +362 -147
- package/dist/{common-BwKEJKOZ.mjs → common-B6U1vLFw.mjs} +17 -6
- package/dist/{common-Cr7D8JyX.mjs → common-CwlJNk3L.mjs} +1 -1
- package/dist/{daemon-CuxLimRD.mjs → daemon-iqO29D7K.mjs} +3 -3
- package/dist/{forget-oMwM-SsU.mjs → forget-BIorc8Rx.mjs} +2 -2
- package/dist/{frames-BDqvhB2Y.mjs → frames-BDz8buix.mjs} +1 -0
- package/dist/{group-CjwGDch3.mjs → group-C13I2bCR.mjs} +1 -1
- package/dist/hook-CvAMGts4.mjs +228 -0
- package/dist/hooks-BeBzkBL-.mjs +142 -0
- package/dist/{import-Zy3LL_PR.mjs → import-BhasJTGS.mjs} +4 -4
- package/dist/{join-BJMcNGV-.mjs → join-BHhCLh9B.mjs} +3 -3
- package/dist/{join-CdKKj7QS.mjs → join-DiVTFi59.mjs} +3 -3
- package/dist/{key-TP7lZeqW.mjs → key-DYeTZ7MI.mjs} +1 -1
- package/dist/{key-BcNxtRJx.mjs → key-DdZsNmo_.mjs} +3 -3
- package/dist/{local-test-DbpiPEsD.mjs → local-test-B1ys1pNo.mjs} +1 -1
- package/dist/{models-dev-7CclWuHF.mjs → models-dev-DPT_BK_V.mjs} +7 -3
- package/dist/{mux-BEXBL7rE.mjs → mux-DlwEK4Tt.mjs} +2 -2
- package/dist/{ports-Csv91JOD.mjs → ports-DDM5bbJg.mjs} +2 -2
- package/dist/{presets-DRO5N4Vm.mjs → presets-Do5DWXfQ.mjs} +2 -2
- package/dist/{revoke-h1X8Xr_T.mjs → revoke-6lrZkjN4.mjs} +2 -2
- package/dist/{rewrite-WI8Ly8RX.mjs → rewrite-vGrkDZx8.mjs} +41 -142
- package/dist/{route-test-D9Y4QmJn.mjs → route-test-DfGzFjKw.mjs} +4 -4
- package/dist/{rpc-contract-CdiRZhUn.mjs → rpc-contract-BXviZUtF.mjs} +47 -6
- package/dist/{run-W7DBz_bR.mjs → run-BLxeLngt.mjs} +3 -3
- package/dist/{runtime-CGF9Sndm.mjs → runtime-D8P29hIl.mjs} +3 -3
- package/dist/{secret-DKN75Vry.mjs → secret-Ds6pIoLP.mjs} +2 -2
- package/dist/secrets-G2HTT66T.mjs +2 -0
- package/dist/{secrets-DFdwYE_V.mjs → secrets-bHJBznMX.mjs} +2 -2
- package/dist/{serve-CRcqQR0j.mjs → serve-B4f79Eqq.mjs} +2 -2
- package/dist/{serve-B61VHcLi.mjs → serve-C8VRRJrt.mjs} +6 -6
- package/dist/{service-CJq7aSR0.mjs → service-CYkpuJuc.mjs} +19 -6
- package/dist/{settings-Dho5hk5Z.mjs → settings-CSran7QD.mjs} +1 -1
- package/dist/{settings-BAa8I7Ww.mjs → settings-CY-bC0MJ.mjs} +2 -2
- package/dist/{share-D7ChVNte.mjs → share-B94HhX_b.mjs} +5 -5
- package/dist/{status-0NYOen8x.mjs → status-BFpr-LHB.mjs} +3 -3
- package/dist/{status-BaRyycxh.mjs → status-C_EI8-b9.mjs} +3 -3
- package/dist/{store-jmpkM28T.mjs → store-DCLn0Df-.mjs} +2 -2
- package/dist/{store-YUMvMCBg.mjs → store-DxU0bd_u.mjs} +9 -2
- package/dist/{test-Dxkkc-KN.mjs → test-BERWIlFb.mjs} +2 -2
- package/package.json +1 -1
- package/webui/dist/assets/{index-BGzZMfCg.css → index-CfTIXjnj.css} +1 -1
- package/webui/dist/assets/index-DhMNFq4g.js +77 -0
- package/webui/dist/icons/presets/anthropic.svg +1 -0
- package/webui/dist/icons/presets/codex.svg +1 -0
- package/webui/dist/icons/presets/deepseek.svg +1 -0
- package/webui/dist/icons/presets/openai.svg +3 -0
- package/webui/dist/index.html +2 -2
- package/dist/secrets-BKKxR3iB.mjs +0 -2
- package/webui/dist/assets/index-0TnWjNwU.js +0 -74
package/dist/ai-fly.js
CHANGED
|
@@ -15,7 +15,7 @@ Daemon:
|
|
|
15
15
|
ai-fly app launch the tray GUI (desktop app)
|
|
16
16
|
|
|
17
17
|
Provider:
|
|
18
|
-
ai-fly service add <name> [--upstream <url> | --preset <id>] [--
|
|
18
|
+
ai-fly service add <name> [--upstream <url> | --preset <id>] [--hooks <script>] [--route ...]...
|
|
19
19
|
[--route-pattern <match>=<template>]... [--secret <name>]
|
|
20
20
|
[--port <n>] [--match <type>:<value>]... [--data <dir>]
|
|
21
21
|
ai-fly service list|get|remove <name> [--data <dir>]
|
|
@@ -26,6 +26,7 @@ Provider:
|
|
|
26
26
|
ai-fly share --group <name> [--ttl <dur>] mint a share link (token + key)
|
|
27
27
|
ai-fly revoke <endpointId> eject a device (fabric-level)
|
|
28
28
|
ai-fly presets [search] [--json] featured + models.dev long tail
|
|
29
|
+
ai-fly hooks list|get|add|remove|run hook scripts (builtin + ~/.aifly/hooks)
|
|
29
30
|
|
|
30
31
|
Consumer:
|
|
31
32
|
ai-fly join <dweb1-token> [--data <dir>] [--proxy …] admit this device (fabric layer)
|
|
@@ -62,7 +63,7 @@ async function dispatch(command, rest) {
|
|
|
62
63
|
const lazy = (load) => {
|
|
63
64
|
return (argv, ctx) => load().then((m) => m.run([...argv], ctx));
|
|
64
65
|
};
|
|
65
|
-
return match(command).with("serve", () => lazy(() => import("./serve-
|
|
66
|
+
return match(command).with("serve", () => lazy(() => import("./serve-B4f79Eqq.mjs"))(rest)).with("app", async () => {
|
|
66
67
|
const { join, dirname } = await import("node:path");
|
|
67
68
|
const { fileURLToPath } = await import("node:url");
|
|
68
69
|
const { spawn } = await import("node:child_process");
|
|
@@ -77,17 +78,17 @@ async function dispatch(command, rest) {
|
|
|
77
78
|
return await new Promise((resolve) => {
|
|
78
79
|
child.once("exit", (c) => resolve(c ?? 0));
|
|
79
80
|
});
|
|
80
|
-
}).with("daemon", () => lazy(() => import("./daemon-
|
|
81
|
-
if (rest[0] === "add") return lazy(() => import("./key-
|
|
82
|
-
return lazy(() => import("./key-
|
|
81
|
+
}).with("daemon", () => lazy(() => import("./daemon-iqO29D7K.mjs"))(rest)).with("presets", () => lazy(() => import("./presets-Do5DWXfQ.mjs"))(rest)).with("hooks", () => lazy(() => import("./hooks-BeBzkBL-.mjs"))(rest)).with("secret", () => lazy(() => import("./secret-Ds6pIoLP.mjs"))(rest)).with("settings", async () => (await import("./settings-CSran7QD.mjs")).runAsSettings(rest, {})).with("relay", async () => (await import("./settings-CSran7QD.mjs")).runAsRelay(rest, {})).with("test", () => lazy(() => import("./test-BERWIlFb.mjs"))(rest)).with("service", () => lazy(() => import("./service-CYkpuJuc.mjs"))(rest)).with("group", () => lazy(() => import("./group-C13I2bCR.mjs"))(rest)).with("share", () => lazy(() => import("./share-B94HhX_b.mjs"))(rest)).with("revoke", () => lazy(() => import("./revoke-6lrZkjN4.mjs"))(rest)).with("join", () => lazy(() => import("./join-BHhCLh9B.mjs"))(rest)).with("import", () => lazy(() => import("./import-BhasJTGS.mjs"))(rest)).with("run", () => lazy(() => import("./run-BLxeLngt.mjs"))(rest)).with("ports", () => lazy(() => import("./ports-DDM5bbJg.mjs"))(rest)).with("forget", () => lazy(() => import("./forget-BIorc8Rx.mjs"))(rest)).with("key", () => {
|
|
82
|
+
if (rest[0] === "add") return lazy(() => import("./key-DdZsNmo_.mjs"))(rest);
|
|
83
|
+
return lazy(() => import("./key-DYeTZ7MI.mjs"))(rest);
|
|
83
84
|
}).with("status", async () => {
|
|
84
85
|
const [scope, ...tail] = rest;
|
|
85
86
|
const wantProvider = scope === "provider" || scope !== "consumer" && providerDirExists();
|
|
86
87
|
const wantConsumer = scope === "consumer" || scope !== "provider" && consumersRootExists();
|
|
87
88
|
const argv = scope === "provider" || scope === "consumer" ? tail : rest;
|
|
88
89
|
let code = 0;
|
|
89
|
-
if (wantProvider) code = Math.max(code, await lazy(() => import("./status-
|
|
90
|
-
if (wantConsumer) code = Math.max(code, await lazy(() => import("./status-
|
|
90
|
+
if (wantProvider) code = Math.max(code, await lazy(() => import("./status-BFpr-LHB.mjs"))(argv));
|
|
91
|
+
if (wantConsumer) code = Math.max(code, await lazy(() => import("./status-C_EI8-b9.mjs"))(argv));
|
|
91
92
|
if (!wantProvider && !wantConsumer) process.stdout.write("nothing to report: no provider storage and no imported consumers\n");
|
|
92
93
|
return code;
|
|
93
94
|
}).otherwise(() => {
|