@llmnative/runner 0.0.0-stage → 1.0.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/LICENSE +201 -0
- package/README.md +95 -2
- package/bin/runner.mjs +99 -0
- package/bin/setup-server.mjs +160 -0
- package/bin/ssh-keys.mjs +15 -0
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -0
- package/dist/client.mjs +183 -0
- package/dist/client.mjs.map +1 -0
- package/dist/setup-app/assets/NetworkCanvasImpl-DIYuzg6x-CVEzQpWc.js +7 -0
- package/dist/setup-app/assets/dist-9W_fpPLL.js +11 -0
- package/dist/setup-app/assets/index-BAksVWhQ.js +32 -0
- package/dist/setup-app/assets/index-CmPc3Q2I.css +2 -0
- package/dist/setup-app/assets/index.es-DFOx5a43.js +1 -0
- package/dist/setup-app/assets/index.esm-7HxyOcz9.js +9 -0
- package/dist/setup-app/assets/index.esm-Bo_uP467.js +1 -0
- package/dist/setup-app/assets/index.esm-D6oehhSQ.js +1 -0
- package/dist/setup-app/assets/index.esm-D983b7TD.js +1 -0
- package/dist/setup-app/assets/index.esm-H_whZvB-.js +4 -0
- package/dist/setup-app/assets/index.esm-NAFJB7JL.js +31 -0
- package/dist/setup-app/assets/lucide-react-DpJIOtaQ.js +1 -0
- package/dist/setup-app/assets/prism-BjaHQ1lq.js +2 -0
- package/dist/setup-app/assets/prism-bash-D6zCJ74D.js +1 -0
- package/dist/setup-app/assets/prism-c-04YixN25.js +1 -0
- package/dist/setup-app/assets/prism-clike-DapgWyxx.js +1 -0
- package/dist/setup-app/assets/prism-cpp-C-lJbC-6.js +1 -0
- package/dist/setup-app/assets/prism-csharp-XPn2bw0d.js +1 -0
- package/dist/setup-app/assets/prism-css-CPgOzxXp.js +1 -0
- package/dist/setup-app/assets/prism-docker-DkT6yOFj.js +1 -0
- package/dist/setup-app/assets/prism-git-BZB8f0uj.js +1 -0
- package/dist/setup-app/assets/prism-go-C_8qAH5n.js +1 -0
- package/dist/setup-app/assets/prism-graphql-XjvHrdQl.js +1 -0
- package/dist/setup-app/assets/prism-ini-BESK3y0r.js +1 -0
- package/dist/setup-app/assets/prism-java-6wtusvIl.js +1 -0
- package/dist/setup-app/assets/prism-javascript-BnO-swvr.js +1 -0
- package/dist/setup-app/assets/prism-json-Dp_-W-Hv.js +1 -0
- package/dist/setup-app/assets/prism-jsx-D-D0NWtC.js +1 -0
- package/dist/setup-app/assets/prism-markup-Cp04rIa1.js +1 -0
- package/dist/setup-app/assets/prism-php-Co4fM40K.js +1 -0
- package/dist/setup-app/assets/prism-powershell-Cvud8pPk.js +1 -0
- package/dist/setup-app/assets/prism-python-CfiSVtM6.js +1 -0
- package/dist/setup-app/assets/prism-ruby-Cb5nlQRI.js +1 -0
- package/dist/setup-app/assets/prism-sql-CYhVDMEE.js +1 -0
- package/dist/setup-app/assets/prism-tsx-p6J2Kc_4.js +1 -0
- package/dist/setup-app/assets/prism-typescript-BMqONzxf.js +1 -0
- package/dist/setup-app/assets/prism-yaml-C0JHu8gr.js +1 -0
- package/dist/setup-app/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/setup-app/assets/style-DLioOiRN.css +1 -0
- package/dist/setup-app/index.html +15 -0
- package/dist/setup.js +3 -0
- package/dist/setup.js.map +1 -0
- package/dist/setup.mjs +104 -0
- package/dist/setup.mjs.map +1 -0
- package/dist/steps.js +2 -0
- package/dist/steps.js.map +1 -0
- package/dist/steps.mjs +98 -0
- package/dist/steps.mjs.map +1 -0
- package/dist/types/client/index.d.ts +249 -0
- package/dist/types/setup/index.d.ts +58 -0
- package/dist/types/setup/steps.d.ts +68 -0
- package/dist/types/ui/InstallGuide.d.ts +18 -0
- package/dist/types/ui/RunnerAccounts.d.ts +13 -0
- package/dist/types/ui/RunnerConsole.d.ts +10 -0
- package/dist/types/ui/RunnersSettings.d.ts +66 -0
- package/dist/types/ui/index.d.ts +5 -0
- package/dist/types/ui/texts.d.ts +354 -0
- package/dist/ui.js +4 -0
- package/dist/ui.js.map +1 -0
- package/dist/ui.mjs +1385 -0
- package/dist/ui.mjs.map +1 -0
- package/install/compose.yaml +50 -0
- package/install/coolify.yaml +16 -0
- package/install/install.sh +206 -0
- package/llms.txt +17 -0
- package/openapi/v1.yaml +188 -0
- package/package.json +116 -4
package/dist/steps.mjs
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// src/setup/steps.ts
|
|
2
|
+
var e = "1.0.2", t = "sherpadvisorylab/llmnative-runner", n = {
|
|
3
|
+
systems: ["Ubuntu 22.04 or newer", "Debian 12 or newer"],
|
|
4
|
+
architectures: ["x86_64", "arm64"],
|
|
5
|
+
cpus: 2,
|
|
6
|
+
memoryGb: 4,
|
|
7
|
+
diskGb: 20,
|
|
8
|
+
ports: [
|
|
9
|
+
22,
|
|
10
|
+
80,
|
|
11
|
+
443
|
|
12
|
+
]
|
|
13
|
+
}, r = /^(?=.{4,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/, i = (e) => r.test(e.trim().toLowerCase()), a = (n = e) => `https://github.com/${t}/releases/download/v${n}/install.sh`, o = (t = e) => `${a(t)}.sha256`;
|
|
14
|
+
function s({ domain: e, maxChats: t }) {
|
|
15
|
+
return [
|
|
16
|
+
"--domain",
|
|
17
|
+
((e) => `'${e.replace(/'/g, "'\\''")}'`)(e.trim().toLowerCase()),
|
|
18
|
+
...t ? ["--max-chats", String(t)] : []
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
function c(e) {
|
|
22
|
+
return `curl -fsSL ${a(e.version)} | sudo sh -s -- ${s(e).join(" ")}`;
|
|
23
|
+
}
|
|
24
|
+
function l(e) {
|
|
25
|
+
let t = e.version ?? "1.0.2";
|
|
26
|
+
return [
|
|
27
|
+
`curl -fsSLO ${a(t)}`,
|
|
28
|
+
`curl -fsSL ${o(t)} | sha256sum -c -`,
|
|
29
|
+
`sudo sh install.sh ${s(e).join(" ")}`
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
var u = [
|
|
33
|
+
{ id: "server" },
|
|
34
|
+
{
|
|
35
|
+
id: "dns",
|
|
36
|
+
check: "dns"
|
|
37
|
+
},
|
|
38
|
+
{ id: "access" },
|
|
39
|
+
{ id: "install" },
|
|
40
|
+
{
|
|
41
|
+
id: "pair",
|
|
42
|
+
check: "health"
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
function d(e) {
|
|
46
|
+
let t = (t) => RegExp(`^${t}=(.+)$`, "m").exec(e)?.[1]?.trim(), n = t("RUNNER_URL"), r = t("PAIRING_CODE"), i = t("RUNNER_ERROR");
|
|
47
|
+
return {
|
|
48
|
+
...n ? { url: n } : {},
|
|
49
|
+
...r ? { pairingCode: r } : {},
|
|
50
|
+
...i ? { error: i } : {}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
var f = [
|
|
54
|
+
"check",
|
|
55
|
+
"docker",
|
|
56
|
+
"files",
|
|
57
|
+
"start",
|
|
58
|
+
"agent",
|
|
59
|
+
"health",
|
|
60
|
+
"pair",
|
|
61
|
+
"tls",
|
|
62
|
+
"done"
|
|
63
|
+
], p = (e) => {
|
|
64
|
+
let t = /^STEP=([a-z]+)$/.exec(e.trim());
|
|
65
|
+
return t && f.includes(t[1]) ? t[1] : void 0;
|
|
66
|
+
};
|
|
67
|
+
async function m(e, t = {}) {
|
|
68
|
+
let n = t.resolver ?? "https://cloudflare-dns.com/dns-query", r = async (r) => {
|
|
69
|
+
let i = await (t.fetch ?? fetch)(`${n}?name=${encodeURIComponent(e)}&type=${r}`, { headers: { accept: "application/dns-json" } });
|
|
70
|
+
return i.ok ? ((await i.json()).Answer ?? []).filter((e) => e.type === (r === "A" ? 1 : 28)).map((e) => e.data) : [];
|
|
71
|
+
}, [i, a] = await Promise.all([r("A"), r("AAAA")]);
|
|
72
|
+
return [...i, ...a];
|
|
73
|
+
}
|
|
74
|
+
async function h(e, t = fetch) {
|
|
75
|
+
try {
|
|
76
|
+
let n = await t(`${e.replace(/\/+$/, "")}/health`);
|
|
77
|
+
if (!n.ok) return {
|
|
78
|
+
ok: !1,
|
|
79
|
+
reason: "not-a-runner"
|
|
80
|
+
};
|
|
81
|
+
let r = await n.json();
|
|
82
|
+
return r.ok && typeof r.version == "string" ? {
|
|
83
|
+
ok: !0,
|
|
84
|
+
version: r.version
|
|
85
|
+
} : {
|
|
86
|
+
ok: !1,
|
|
87
|
+
reason: "not-a-runner"
|
|
88
|
+
};
|
|
89
|
+
} catch {
|
|
90
|
+
return {
|
|
91
|
+
ok: !1,
|
|
92
|
+
reason: "unreachable"
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
export { r as DOMAIN_PATTERN, u as GUIDE_STEPS, f as INSTALL_PHASES, t as RUNNER_REPOSITORY, n as RUNNER_REQUIREMENTS, e as RUNNER_VERSION, h as checkRunner, o as checksumUrl, s as installArguments, c as installCommand, a as installScriptUrl, i as isDomain, m as lookupDomain, d as parseInstallOutput, p as phaseOf, l as verifiedInstallCommands };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=steps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.mjs","names":["RUNNER_VERSION","RUNNER_REPOSITORY","RUNNER_REQUIREMENTS","DOMAIN_PATTERN","isDomain","value","installScriptUrl","version","checksumUrl","installArguments","domain","maxChats","installCommand","options","verifiedInstallCommands","GUIDE_STEPS","parseInstallOutput","name","text","url","pairingCode","error","INSTALL_PHASES","phaseOf","match","line","lookupDomain","resolver","ask","response","type","answer","v4","v6","checkRunner","fetchImpl","data"],"sources":["../src/setup/steps.ts"],"sourcesContent":["// @llmnative/runner/steps — how a runner is installed, said once: the requirements, the command, the steps of the\n// guide and what the installer prints. The installer over SSH (`/setup`), the command line and the guide of the UI\n// all read it, so they never drift apart. Pure: browser and Node.\n\n/** Set by the build from package.json. */\ndeclare const __RUNNER_VERSION__: string;\n\n/** The release these steps install: the version of this package (images and package share it). */\nexport const RUNNER_VERSION: string = typeof __RUNNER_VERSION__ === 'string' ? __RUNNER_VERSION__ : '0.0.0';\nexport const RUNNER_REPOSITORY = 'sherpadvisorylab/llmnative-runner';\n\nexport const RUNNER_REQUIREMENTS = {\n systems: ['Ubuntu 22.04 or newer', 'Debian 12 or newer'],\n architectures: ['x86_64', 'arm64'],\n cpus: 2,\n memoryGb: 4,\n diskGb: 20,\n ports: [22, 80, 443],\n} as const;\n\n/** The domain of a runner: a host name of its own (`runner.example.com`), pointed at the VPS. */\nexport const DOMAIN_PATTERN = /^(?=.{4,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$/;\nexport const isDomain = (value: string) => DOMAIN_PATTERN.test(value.trim().toLowerCase());\n\nexport const installScriptUrl = (version = RUNNER_VERSION) => `https://github.com/${RUNNER_REPOSITORY}/releases/download/v${version}/install.sh`;\nexport const checksumUrl = (version = RUNNER_VERSION) => `${installScriptUrl(version)}.sha256`;\n\nexport type InstallOptions = { domain: string; version?: string; maxChats?: number };\n\n/** The arguments of install.sh, each quoted for a shell. */\nexport function installArguments({ domain, maxChats }: InstallOptions): string[] {\n const quote = (value: string) => `'${value.replace(/'/g, `'\\\\''`)}'`;\n return ['--domain', quote(domain.trim().toLowerCase()), ...(maxChats ? ['--max-chats', String(maxChats)] : [])];\n}\n\n/** The command to paste on the VPS (as root, or with sudo). */\nexport function installCommand(options: InstallOptions): string {\n return `curl -fsSL ${installScriptUrl(options.version)} | sudo sh -s -- ${installArguments(options).join(' ')}`;\n}\n\n/** The same, for who checks the script before running it. */\nexport function verifiedInstallCommands(options: InstallOptions): string[] {\n const version = options.version ?? RUNNER_VERSION;\n return [\n `curl -fsSLO ${installScriptUrl(version)}`,\n `curl -fsSL ${checksumUrl(version)} | sha256sum -c -`,\n `sudo sh install.sh ${installArguments(options).join(' ')}`,\n ];\n}\n\n/** The steps of the guide, in order; `check` says what the guide can verify by itself at that step. */\nexport const GUIDE_STEPS = [\n { id: 'server' },\n { id: 'dns', check: 'dns' },\n { id: 'access' },\n { id: 'install' },\n { id: 'pair', check: 'health' },\n] as const;\nexport type GuideStepId = (typeof GUIDE_STEPS)[number]['id'];\n\n/** What install.sh prints for a machine to read: `RUNNER_URL=…`, `PAIRING_CODE=…`, `RUNNER_ERROR=…`. */\nexport function parseInstallOutput(text: string): { url?: string; pairingCode?: string; error?: string } {\n const value = (name: string) => new RegExp(`^${name}=(.+)$`, 'm').exec(text)?.[1]?.trim();\n const url = value('RUNNER_URL');\n const pairingCode = value('PAIRING_CODE');\n const error = value('RUNNER_ERROR');\n return { ...(url ? { url } : {}), ...(pairingCode ? { pairingCode } : {}), ...(error ? { error } : {}) };\n}\n\n/** The steps install.sh announces (`STEP=<id>`), for a progress shown while it runs. */\nexport const INSTALL_PHASES = ['check', 'docker', 'files', 'start', 'agent', 'health', 'pair', 'tls', 'done'] as const;\nexport type InstallPhase = (typeof INSTALL_PHASES)[number];\nexport const phaseOf = (line: string): InstallPhase | undefined => {\n const match = /^STEP=([a-z]+)$/.exec(line.trim());\n return match && (INSTALL_PHASES as readonly string[]).includes(match[1]) ? match[1] as InstallPhase : undefined;\n};\n\n/**\n * The addresses a domain points to, asked over DNS-over-HTTPS (no DNS from a browser otherwise). `resolver`: a\n * service that answers `application/dns-json` (by default Cloudflare's; any other can be given).\n */\nexport async function lookupDomain(domain: string, options: { fetch?: typeof fetch; resolver?: string } = {}): Promise<string[]> {\n const resolver = options.resolver ?? 'https://cloudflare-dns.com/dns-query';\n const ask = async (type: 'A' | 'AAAA') => {\n const response = await (options.fetch ?? fetch)(`${resolver}?name=${encodeURIComponent(domain)}&type=${type}`, { headers: { accept: 'application/dns-json' } });\n if (!response.ok) return [];\n const data = await response.json() as { Answer?: Array<{ type: number; data: string }> };\n return (data.Answer ?? []).filter((answer) => answer.type === (type === 'A' ? 1 : 28)).map((answer) => answer.data);\n };\n const [v4, v6] = await Promise.all([ask('A'), ask('AAAA')]);\n return [...v4, ...v6];\n}\n\n/** Whether a runner answers at its address, over HTTPS: its version, or why not. */\nexport async function checkRunner(url: string, fetchImpl: typeof fetch = fetch): Promise<{ ok: true; version: string } | { ok: false; reason: 'unreachable' | 'not-a-runner' }> {\n try {\n const response = await fetchImpl(`${url.replace(/\\/+$/, '')}/health`);\n if (!response.ok) return { ok: false, reason: 'not-a-runner' };\n const data = await response.json() as { ok?: boolean; version?: string };\n return data.ok && typeof data.version === 'string' ? { ok: true, version: data.version } : { ok: false, reason: 'not-a-runner' };\n } catch {\n return { ok: false, reason: 'unreachable' };\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
export type RunnerProvider = 'claude-code' | 'opencode-go' | 'opencode';
|
|
2
|
+
export type RunnerPermission = 'complete' | 'chat' | 'chat:tools' | 'accounts' | 'accounts:tenant' | 'act-as-user' | 'keys';
|
|
3
|
+
export type RunnerAccount = {
|
|
4
|
+
provider: RunnerProvider;
|
|
5
|
+
id: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
/** When it was connected. */
|
|
8
|
+
at: string;
|
|
9
|
+
scope: 'user' | 'tenant';
|
|
10
|
+
/** Out of credit until then (the limit of a subscription); absent when it has credit. */
|
|
11
|
+
noCreditUntil?: string;
|
|
12
|
+
};
|
|
13
|
+
export type RunnerModels = {
|
|
14
|
+
providers: Array<{
|
|
15
|
+
id: 'claude-code' | 'opencode-go';
|
|
16
|
+
models: string[];
|
|
17
|
+
accounts: number;
|
|
18
|
+
available: number;
|
|
19
|
+
yours: number;
|
|
20
|
+
tenant: number;
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
export type RunnerTenant = {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
usersWithAccounts?: number;
|
|
28
|
+
};
|
|
29
|
+
export type RunnerKey = {
|
|
30
|
+
id: string;
|
|
31
|
+
kind: 'platform' | 'project';
|
|
32
|
+
tenant?: string;
|
|
33
|
+
name: string;
|
|
34
|
+
permissions: RunnerPermission[];
|
|
35
|
+
createdAt: string;
|
|
36
|
+
expiresAt: string | null;
|
|
37
|
+
};
|
|
38
|
+
export type RunnerStatus = {
|
|
39
|
+
version: string;
|
|
40
|
+
agentImage: string;
|
|
41
|
+
url?: string;
|
|
42
|
+
load: {
|
|
43
|
+
chats: number;
|
|
44
|
+
answering: number;
|
|
45
|
+
completions: number;
|
|
46
|
+
maxChats: number;
|
|
47
|
+
};
|
|
48
|
+
machine: {
|
|
49
|
+
totalBytes: number;
|
|
50
|
+
availableBytes: number;
|
|
51
|
+
cpus: number;
|
|
52
|
+
};
|
|
53
|
+
tenants: RunnerTenant[];
|
|
54
|
+
};
|
|
55
|
+
export type RunnerHealth = {
|
|
56
|
+
ok: boolean;
|
|
57
|
+
version: string;
|
|
58
|
+
chats: number;
|
|
59
|
+
answering: number;
|
|
60
|
+
completions: number;
|
|
61
|
+
maxChats: number;
|
|
62
|
+
};
|
|
63
|
+
export type RunnerCompletionRequest = {
|
|
64
|
+
provider: 'claude-code' | 'opencode-go';
|
|
65
|
+
model: string;
|
|
66
|
+
prompt: string;
|
|
67
|
+
effort?: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
68
|
+
};
|
|
69
|
+
export type RunnerCompletion = {
|
|
70
|
+
text: string;
|
|
71
|
+
usage?: {
|
|
72
|
+
inputTokens: number;
|
|
73
|
+
outputTokens: number;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export type RunnerChatTool = {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
inputSchema: Record<string, unknown>;
|
|
80
|
+
endsTurn?: boolean;
|
|
81
|
+
};
|
|
82
|
+
export type RunnerChatModel = {
|
|
83
|
+
provider: string;
|
|
84
|
+
model: string;
|
|
85
|
+
variant?: string;
|
|
86
|
+
name?: string;
|
|
87
|
+
effort?: string;
|
|
88
|
+
};
|
|
89
|
+
export type RunnerChatEvent = {
|
|
90
|
+
type: 'text';
|
|
91
|
+
text: string;
|
|
92
|
+
} | {
|
|
93
|
+
type: 'reasoning';
|
|
94
|
+
text: string;
|
|
95
|
+
} | {
|
|
96
|
+
type: 'step';
|
|
97
|
+
id: string;
|
|
98
|
+
label: string;
|
|
99
|
+
status: 'running' | 'done';
|
|
100
|
+
} | {
|
|
101
|
+
type: 'tool-call';
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
input: Record<string, unknown>;
|
|
105
|
+
} | {
|
|
106
|
+
type: 'done';
|
|
107
|
+
} | {
|
|
108
|
+
type: 'error';
|
|
109
|
+
message: string;
|
|
110
|
+
};
|
|
111
|
+
/** An error of the runner: its status and code (`no-credit`, `busy`…), and for `no-credit` until when. */
|
|
112
|
+
export declare class RunnerError extends Error {
|
|
113
|
+
readonly status: number;
|
|
114
|
+
readonly code: string;
|
|
115
|
+
readonly until?: string;
|
|
116
|
+
readonly detail?: string;
|
|
117
|
+
constructor(status: number, code: string, extra?: {
|
|
118
|
+
until?: string;
|
|
119
|
+
detail?: string;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/** When a chat event says the accounts ran out of credit: until when (`no-credit:<iso>`). */
|
|
123
|
+
export declare const noCreditUntil: (event: RunnerChatEvent) => string | undefined;
|
|
124
|
+
export type RunnerClientOptions = {
|
|
125
|
+
/** The address of the runner (`https://runner.example.com`), or of the backend of the host that forwards to it. */
|
|
126
|
+
url: string;
|
|
127
|
+
/** A key of the runner (or the admin token in the console); none when the backend of the host adds it. */
|
|
128
|
+
key?: string;
|
|
129
|
+
/** With a platform key or the admin token: the tenant the requests are for. */
|
|
130
|
+
tenant?: string;
|
|
131
|
+
/** The person the requests are for (needs `act-as-user` with a project key). */
|
|
132
|
+
user?: string;
|
|
133
|
+
fetch?: typeof fetch;
|
|
134
|
+
/** More headers for each request (the session of the host, for its backend). */
|
|
135
|
+
headers?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
136
|
+
};
|
|
137
|
+
export declare class RunnerClient {
|
|
138
|
+
readonly options: RunnerClientOptions;
|
|
139
|
+
constructor(options: RunnerClientOptions);
|
|
140
|
+
/** The same runner for another tenant or person. */
|
|
141
|
+
as(scope: {
|
|
142
|
+
tenant?: string;
|
|
143
|
+
user?: string;
|
|
144
|
+
}): RunnerClient;
|
|
145
|
+
private headers;
|
|
146
|
+
/** One request; its JSON, or a RunnerError. */
|
|
147
|
+
request<T>(method: string, path: string, body?: unknown): Promise<T>;
|
|
148
|
+
health(): Promise<RunnerHealth>;
|
|
149
|
+
/** A pairing code (printed by the installer) → a platform key, seen once. */
|
|
150
|
+
pair(code: string, name?: string): Promise<{
|
|
151
|
+
key: string;
|
|
152
|
+
record: RunnerKey;
|
|
153
|
+
version: string;
|
|
154
|
+
}>;
|
|
155
|
+
info(): Promise<{
|
|
156
|
+
version: string;
|
|
157
|
+
harnesses: string[];
|
|
158
|
+
capabilities: Record<string, boolean>;
|
|
159
|
+
permissions: RunnerPermission[];
|
|
160
|
+
tenant?: string;
|
|
161
|
+
}>;
|
|
162
|
+
createPairing(): Promise<{
|
|
163
|
+
code: string;
|
|
164
|
+
expiresAt: string;
|
|
165
|
+
}>;
|
|
166
|
+
readonly platform: {
|
|
167
|
+
status: () => Promise<RunnerStatus>;
|
|
168
|
+
tenants: () => Promise<RunnerTenant[]>;
|
|
169
|
+
/** A tenant, with its first project key unless `key: false` (seen once: keep it in the backend). */
|
|
170
|
+
createTenant: (id: string, options?: {
|
|
171
|
+
name?: string;
|
|
172
|
+
key?: boolean;
|
|
173
|
+
keyPermissions?: RunnerPermission[];
|
|
174
|
+
}) => Promise<{
|
|
175
|
+
tenant: RunnerTenant;
|
|
176
|
+
key?: string;
|
|
177
|
+
keyRecord?: RunnerKey;
|
|
178
|
+
}>;
|
|
179
|
+
removeTenant: (id: string) => Promise<boolean>;
|
|
180
|
+
keys: (tenant: string) => Promise<RunnerKey[]>;
|
|
181
|
+
createKey: (tenant: string, input?: {
|
|
182
|
+
name?: string;
|
|
183
|
+
permissions?: RunnerPermission[];
|
|
184
|
+
expiresAt?: string | null;
|
|
185
|
+
}) => Promise<{
|
|
186
|
+
key: string;
|
|
187
|
+
record: RunnerKey;
|
|
188
|
+
}>;
|
|
189
|
+
revokeKey: (tenant: string, id: string) => Promise<boolean>;
|
|
190
|
+
platformKeys: () => Promise<RunnerKey[]>;
|
|
191
|
+
revokePlatformKey: (id: string) => Promise<boolean>;
|
|
192
|
+
};
|
|
193
|
+
readonly accounts: {
|
|
194
|
+
list: () => Promise<{
|
|
195
|
+
scope: 'user' | 'tenant';
|
|
196
|
+
accounts: RunnerAccount[];
|
|
197
|
+
}>;
|
|
198
|
+
/** The sign-in of a Claude subscription: open `url`, then give the code Anthropic shows to `finishClaudeLogin`. */
|
|
199
|
+
startClaudeLogin: () => Promise<{
|
|
200
|
+
url: string;
|
|
201
|
+
}>;
|
|
202
|
+
finishClaudeLogin: (code: string, label?: string) => Promise<RunnerAccount>;
|
|
203
|
+
/** A token made elsewhere with `claude setup-token`. */
|
|
204
|
+
addClaudeToken: (token: string, label?: string) => Promise<RunnerAccount>;
|
|
205
|
+
addKey: (provider: 'opencode-go' | 'opencode', key: string, label?: string) => Promise<RunnerAccount>;
|
|
206
|
+
remove: (provider: RunnerProvider, id: string) => Promise<boolean>;
|
|
207
|
+
order: (provider: RunnerProvider, ids: string[]) => Promise<RunnerAccount[]>;
|
|
208
|
+
};
|
|
209
|
+
models(): Promise<RunnerModels>;
|
|
210
|
+
complete(request: RunnerCompletionRequest): Promise<RunnerCompletion>;
|
|
211
|
+
readonly chats: {
|
|
212
|
+
/** A chat (id: 8 hex characters, chosen by the client), with the tools the harness may call. */
|
|
213
|
+
start: (id: string, tools?: RunnerChatTool[]) => Promise<{
|
|
214
|
+
id: string;
|
|
215
|
+
}>;
|
|
216
|
+
/** A message: its events as they come. Aborting the signal stops the harness. */
|
|
217
|
+
send: (id: string, message: {
|
|
218
|
+
text: string;
|
|
219
|
+
model: RunnerChatModel;
|
|
220
|
+
attachments?: Array<{
|
|
221
|
+
name: string;
|
|
222
|
+
mimeType: string;
|
|
223
|
+
base64: string;
|
|
224
|
+
}>;
|
|
225
|
+
}, signal?: AbortSignal) => AsyncIterable<RunnerChatEvent>;
|
|
226
|
+
answerCall: (id: string, callId: string, answer: {
|
|
227
|
+
result?: unknown;
|
|
228
|
+
isError?: boolean;
|
|
229
|
+
}) => Promise<boolean>;
|
|
230
|
+
stop: (id: string) => Promise<boolean>;
|
|
231
|
+
close: (id: string) => Promise<boolean>;
|
|
232
|
+
};
|
|
233
|
+
private stream;
|
|
234
|
+
}
|
|
235
|
+
export type RunnerProxyTarget = {
|
|
236
|
+
/** The address of the runner of this tenant. */
|
|
237
|
+
url: string;
|
|
238
|
+
/** A project key of the tenant (with `act-as-user`), or a platform key with `tenant`. */
|
|
239
|
+
key: string;
|
|
240
|
+
tenant?: string;
|
|
241
|
+
/** The signed-in person, verified by the host. */
|
|
242
|
+
user: string;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Forwards a request of a signed-in person to their runner: only the routes of a person, with the key, tenant and
|
|
246
|
+
* person added by the host (whatever the browser sent for them is dropped). Streams answers (chat replies) as they
|
|
247
|
+
* come. `path` is the path of the runner, e.g. `/v1/models` (the host strips its own prefix).
|
|
248
|
+
*/
|
|
249
|
+
export declare function forwardToRunner(request: Request, path: string, target: RunnerProxyTarget, fetchImpl?: typeof fetch): Promise<Response>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type InstallOptions, type InstallPhase } from './steps';
|
|
2
|
+
export * from './steps';
|
|
3
|
+
export type SshTarget = {
|
|
4
|
+
host: string;
|
|
5
|
+
port?: number;
|
|
6
|
+
username: string;
|
|
7
|
+
/** A private key (PEM/OpenSSH), or a password. */
|
|
8
|
+
privateKey?: string;
|
|
9
|
+
passphrase?: string;
|
|
10
|
+
password?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The fingerprint the server must have (`SHA256:…`, as `ssh-keygen -lf` prints it); none: the first one is taken
|
|
13
|
+
* and given back in the result, to be kept for the next time.
|
|
14
|
+
*/
|
|
15
|
+
hostFingerprint?: string;
|
|
16
|
+
};
|
|
17
|
+
export type InstallProgress = {
|
|
18
|
+
line: string;
|
|
19
|
+
phase?: InstallPhase;
|
|
20
|
+
};
|
|
21
|
+
export type InstallResult = {
|
|
22
|
+
url: string;
|
|
23
|
+
pairingCode: string;
|
|
24
|
+
hostFingerprint: string;
|
|
25
|
+
};
|
|
26
|
+
export declare class InstallError extends Error {
|
|
27
|
+
readonly code: string;
|
|
28
|
+
readonly output: string;
|
|
29
|
+
constructor(code: string, message: string, output?: string);
|
|
30
|
+
}
|
|
31
|
+
/** The command run on the VPS: the script of the release, with sudo unless the user is root. */
|
|
32
|
+
export declare function remoteInstallCommand(options: InstallOptions & {
|
|
33
|
+
root: boolean;
|
|
34
|
+
}): string;
|
|
35
|
+
/** Installs a runner over SSH; `onProgress` gets every line it prints (and the phase when one starts). */
|
|
36
|
+
export declare function installOverSsh(target: SshTarget, options: InstallOptions & {
|
|
37
|
+
onProgress?: (progress: InstallProgress) => void;
|
|
38
|
+
timeoutMs?: number;
|
|
39
|
+
}): Promise<InstallResult>;
|
|
40
|
+
/** Installs and pairs at once: the platform key, seen once, to keep in the backend of the host. */
|
|
41
|
+
export declare function installAndPair(target: SshTarget, options: InstallOptions & {
|
|
42
|
+
name?: string;
|
|
43
|
+
onProgress?: (progress: InstallProgress) => void;
|
|
44
|
+
fetch?: typeof fetch;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
url: string;
|
|
47
|
+
hostFingerprint: string;
|
|
48
|
+
platformKey: string;
|
|
49
|
+
version: string;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* What ~/.ssh/config says for a host: its user and its key files, in the order ssh tries them (first match of each
|
|
53
|
+
* option wins, as ssh does). `~` left as is: the caller resolves it.
|
|
54
|
+
*/
|
|
55
|
+
export declare function sshConfigFor(configText: string, host: string): {
|
|
56
|
+
user?: string;
|
|
57
|
+
identityFiles: string[];
|
|
58
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/** The release these steps install: the version of this package (images and package share it). */
|
|
2
|
+
export declare const RUNNER_VERSION: string;
|
|
3
|
+
export declare const RUNNER_REPOSITORY = "sherpadvisorylab/llmnative-runner";
|
|
4
|
+
export declare const RUNNER_REQUIREMENTS: {
|
|
5
|
+
readonly systems: readonly ['Ubuntu 22.04 or newer', 'Debian 12 or newer'];
|
|
6
|
+
readonly architectures: readonly ['x86_64', 'arm64'];
|
|
7
|
+
readonly cpus: 2;
|
|
8
|
+
readonly memoryGb: 4;
|
|
9
|
+
readonly diskGb: 20;
|
|
10
|
+
readonly ports: readonly [22, 80, 443];
|
|
11
|
+
};
|
|
12
|
+
/** The domain of a runner: a host name of its own (`runner.example.com`), pointed at the VPS. */
|
|
13
|
+
export declare const DOMAIN_PATTERN: RegExp;
|
|
14
|
+
export declare const isDomain: (value: string) => boolean;
|
|
15
|
+
export declare const installScriptUrl: (version?: string) => string;
|
|
16
|
+
export declare const checksumUrl: (version?: string) => string;
|
|
17
|
+
export type InstallOptions = {
|
|
18
|
+
domain: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
maxChats?: number;
|
|
21
|
+
};
|
|
22
|
+
/** The arguments of install.sh, each quoted for a shell. */
|
|
23
|
+
export declare function installArguments({ domain, maxChats }: InstallOptions): string[];
|
|
24
|
+
/** The command to paste on the VPS (as root, or with sudo). */
|
|
25
|
+
export declare function installCommand(options: InstallOptions): string;
|
|
26
|
+
/** The same, for who checks the script before running it. */
|
|
27
|
+
export declare function verifiedInstallCommands(options: InstallOptions): string[];
|
|
28
|
+
/** The steps of the guide, in order; `check` says what the guide can verify by itself at that step. */
|
|
29
|
+
export declare const GUIDE_STEPS: readonly [{
|
|
30
|
+
readonly id: 'server';
|
|
31
|
+
}, {
|
|
32
|
+
readonly id: 'dns';
|
|
33
|
+
readonly check: 'dns';
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: 'access';
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: 'install';
|
|
38
|
+
}, {
|
|
39
|
+
readonly id: 'pair';
|
|
40
|
+
readonly check: 'health';
|
|
41
|
+
}];
|
|
42
|
+
export type GuideStepId = (typeof GUIDE_STEPS)[number]['id'];
|
|
43
|
+
/** What install.sh prints for a machine to read: `RUNNER_URL=…`, `PAIRING_CODE=…`, `RUNNER_ERROR=…`. */
|
|
44
|
+
export declare function parseInstallOutput(text: string): {
|
|
45
|
+
url?: string;
|
|
46
|
+
pairingCode?: string;
|
|
47
|
+
error?: string;
|
|
48
|
+
};
|
|
49
|
+
/** The steps install.sh announces (`STEP=<id>`), for a progress shown while it runs. */
|
|
50
|
+
export declare const INSTALL_PHASES: readonly ['check', 'docker', 'files', 'start', 'agent', 'health', 'pair', 'tls', 'done'];
|
|
51
|
+
export type InstallPhase = (typeof INSTALL_PHASES)[number];
|
|
52
|
+
export declare const phaseOf: (line: string) => InstallPhase | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The addresses a domain points to, asked over DNS-over-HTTPS (no DNS from a browser otherwise). `resolver`: a
|
|
55
|
+
* service that answers `application/dns-json` (by default Cloudflare's; any other can be given).
|
|
56
|
+
*/
|
|
57
|
+
export declare function lookupDomain(domain: string, options?: {
|
|
58
|
+
fetch?: typeof fetch;
|
|
59
|
+
resolver?: string;
|
|
60
|
+
}): Promise<string[]>;
|
|
61
|
+
/** Whether a runner answers at its address, over HTTPS: its version, or why not. */
|
|
62
|
+
export declare function checkRunner(url: string, fetchImpl?: typeof fetch): Promise<{
|
|
63
|
+
ok: true;
|
|
64
|
+
version: string;
|
|
65
|
+
} | {
|
|
66
|
+
ok: false;
|
|
67
|
+
reason: 'unreachable' | 'not-a-runner';
|
|
68
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { checkRunner } from '../setup/steps';
|
|
3
|
+
import { type RunnerUiTexts } from './texts';
|
|
4
|
+
export type InstallGuideProps = {
|
|
5
|
+
locale?: string;
|
|
6
|
+
texts?: Partial<RunnerUiTexts>;
|
|
7
|
+
/** The pairing code given back, with the address of the runner: the host connects it. */
|
|
8
|
+
onPair: (input: {
|
|
9
|
+
url: string;
|
|
10
|
+
code: string;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
/** How a domain is looked up; by default DNS-over-HTTPS. */
|
|
13
|
+
lookup?: (domain: string) => Promise<string[]>;
|
|
14
|
+
/** How the runner is checked; by default its /health. */
|
|
15
|
+
check?: typeof checkRunner;
|
|
16
|
+
version?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function InstallGuide({ locale, texts, onPair, lookup, check, version }: InstallGuideProps): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type RunnerAccount, type RunnerClient } from '../client';
|
|
3
|
+
import { type RunnerUiTexts } from './texts';
|
|
4
|
+
export type RunnerAccountsProps = {
|
|
5
|
+
/** A client for this scope: through the backend of the host for a person, with the admin token in the console. */
|
|
6
|
+
client: RunnerClient;
|
|
7
|
+
scope: 'user' | 'tenant';
|
|
8
|
+
locale?: string;
|
|
9
|
+
texts?: Partial<RunnerUiTexts>;
|
|
10
|
+
/** Called after an account was added or removed (the host refreshes its list of models). */
|
|
11
|
+
onChange?: (accounts: RunnerAccount[]) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function RunnerAccounts({ client, scope, locale, texts, onChange }: RunnerAccountsProps): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type RunnerClient } from '../client';
|
|
3
|
+
import { type RunnerUiTexts } from './texts';
|
|
4
|
+
export type RunnerConsoleProps = {
|
|
5
|
+
client: RunnerClient;
|
|
6
|
+
locale?: string;
|
|
7
|
+
texts?: Partial<RunnerUiTexts>;
|
|
8
|
+
onSignOut?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare function RunnerConsole({ client, locale, texts, onSignOut }: RunnerConsoleProps): React.JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RunnerStatus } from '../client';
|
|
3
|
+
import type { InstallPhase } from '../setup/steps';
|
|
4
|
+
import { type RunnerUiTexts } from './texts';
|
|
5
|
+
export type RunnerEntry = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
isDefault?: boolean;
|
|
10
|
+
draining?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type RunnerSshAccess = {
|
|
13
|
+
host: string;
|
|
14
|
+
port?: number;
|
|
15
|
+
username: string;
|
|
16
|
+
privateKey?: string;
|
|
17
|
+
password?: string;
|
|
18
|
+
};
|
|
19
|
+
/** What the platform does for this page, in its backend (where the platform keys are). */
|
|
20
|
+
export interface RunnerFleet {
|
|
21
|
+
list(): Promise<RunnerEntry[]>;
|
|
22
|
+
/** Connects a runner: with a pairing code (the backend pairs and keeps the platform key), or a key made before. */
|
|
23
|
+
add(input: {
|
|
24
|
+
name: string;
|
|
25
|
+
url: string;
|
|
26
|
+
code?: string;
|
|
27
|
+
key?: string;
|
|
28
|
+
}): Promise<RunnerEntry>;
|
|
29
|
+
update(id: string, patch: Partial<Pick<RunnerEntry, 'name' | 'isDefault' | 'draining'>>): Promise<void>;
|
|
30
|
+
remove(id: string): Promise<void>;
|
|
31
|
+
status(id: string): Promise<RunnerStatus>;
|
|
32
|
+
/** Installs and connects a runner over SSH (`@llmnative/runner/setup` in the backend); none: only by hand. */
|
|
33
|
+
install?(input: {
|
|
34
|
+
name: string;
|
|
35
|
+
domain: string;
|
|
36
|
+
access: RunnerSshAccess;
|
|
37
|
+
}, onProgress: (progress: {
|
|
38
|
+
line: string;
|
|
39
|
+
phase?: InstallPhase;
|
|
40
|
+
}) => void): Promise<RunnerEntry>;
|
|
41
|
+
/** The backend runs on the computer of the person (`npx @llmnative/runner setup`): it can use its SSH keys. */
|
|
42
|
+
localKeys?: boolean;
|
|
43
|
+
/** The tenants of the platform and their runner; none: no distribution on this page. */
|
|
44
|
+
tenants?: {
|
|
45
|
+
list(): Promise<Array<{
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
runnerId?: string;
|
|
49
|
+
}>>;
|
|
50
|
+
assign(tenantId: string, runnerId: string): Promise<void>;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export type RunnersSettingsProps = {
|
|
54
|
+
fleet: RunnerFleet;
|
|
55
|
+
locale?: string;
|
|
56
|
+
texts?: Partial<RunnerUiTexts>;
|
|
57
|
+
};
|
|
58
|
+
export declare function RunnersSettings({ fleet, locale, texts }: RunnersSettingsProps): React.JSX.Element;
|
|
59
|
+
/** Adding a runner: the three ways, in one modal. */
|
|
60
|
+
export declare function AddRunner({ fleet, t, locale, onClose, onAdded }: {
|
|
61
|
+
fleet: RunnerFleet;
|
|
62
|
+
t: RunnerUiTexts;
|
|
63
|
+
locale?: string;
|
|
64
|
+
onClose: () => void;
|
|
65
|
+
onAdded: (entry: RunnerEntry) => void | Promise<void>;
|
|
66
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { RunnerAccounts, type RunnerAccountsProps } from './RunnerAccounts';
|
|
2
|
+
export { InstallGuide, type InstallGuideProps } from './InstallGuide';
|
|
3
|
+
export { RunnersSettings, AddRunner, type RunnerFleet, type RunnerEntry, type RunnerSshAccess, type RunnersSettingsProps } from './RunnersSettings';
|
|
4
|
+
export { RunnerConsole, type RunnerConsoleProps } from './RunnerConsole';
|
|
5
|
+
export { runnerTexts, textsFor, fill, type RunnerUiTexts, type RunnerLocale } from './texts';
|