@lumi.ai/runner 0.15.21 → 0.15.23
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/cli.js +19 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1068,7 +1068,7 @@ function mcpUrl(config2) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
|
|
1070
1070
|
// src/version.ts
|
|
1071
|
-
var RUNNER_VERSION = true ? "0.15.
|
|
1071
|
+
var RUNNER_VERSION = true ? "0.15.23" : "0.0.0-dev";
|
|
1072
1072
|
|
|
1073
1073
|
// src/auth.ts
|
|
1074
1074
|
import { signInWithCustomToken } from "firebase/auth";
|
|
@@ -1087,17 +1087,17 @@ var CallableError = class extends Error {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
status;
|
|
1089
1089
|
};
|
|
1090
|
-
async function callFunction(baseUrl, idToken,
|
|
1091
|
-
return request(baseUrl,
|
|
1090
|
+
async function callFunction(baseUrl, idToken, group, op, data) {
|
|
1091
|
+
return request(baseUrl, group, op, data, { authorization: `Bearer ${idToken}` });
|
|
1092
1092
|
}
|
|
1093
|
-
async function callPublicFunction(baseUrl,
|
|
1094
|
-
return request(baseUrl,
|
|
1093
|
+
async function callPublicFunction(baseUrl, group, op, data) {
|
|
1094
|
+
return request(baseUrl, group, op, data, {});
|
|
1095
1095
|
}
|
|
1096
|
-
async function request(baseUrl,
|
|
1097
|
-
const res = await fetch(`${baseUrl}/${
|
|
1096
|
+
async function request(baseUrl, group, op, data, headers) {
|
|
1097
|
+
const res = await fetch(`${baseUrl}/${group}`, {
|
|
1098
1098
|
method: "POST",
|
|
1099
1099
|
headers: { "content-type": "application/json", ...headers },
|
|
1100
|
-
body: JSON.stringify({ data })
|
|
1100
|
+
body: JSON.stringify({ data: { op, data } })
|
|
1101
1101
|
});
|
|
1102
1102
|
const text = await res.text();
|
|
1103
1103
|
let body = {};
|
|
@@ -1108,7 +1108,7 @@ async function request(baseUrl, name, data, headers) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
if (!res.ok || body.error) {
|
|
1110
1110
|
const status = (body.error?.status || `HTTP_${res.status}`).toUpperCase();
|
|
1111
|
-
throw new CallableError(status, body.error?.message || `${
|
|
1111
|
+
throw new CallableError(status, body.error?.message || `${op} failed (${res.status}).`);
|
|
1112
1112
|
}
|
|
1113
1113
|
return body.result;
|
|
1114
1114
|
}
|
|
@@ -1128,7 +1128,7 @@ async function probeShipKey(config2, shipId) {
|
|
|
1128
1128
|
const key = config2.shipKeys?.[shipId];
|
|
1129
1129
|
if (!key) return null;
|
|
1130
1130
|
try {
|
|
1131
|
-
await callPublicFunction(functionsBaseUrl(config2), "exchangeRunnerKey", { key });
|
|
1131
|
+
await callPublicFunction(functionsBaseUrl(config2), "crewRunnerAuth", "exchangeRunnerKey", { key });
|
|
1132
1132
|
return null;
|
|
1133
1133
|
} catch (e) {
|
|
1134
1134
|
return {
|
|
@@ -1155,7 +1155,7 @@ async function signInToShip(fb, config2, shipId) {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
let session;
|
|
1157
1157
|
try {
|
|
1158
|
-
session = await callPublicFunction(functionsBaseUrl(config2), "exchangeRunnerKey", { key });
|
|
1158
|
+
session = await callPublicFunction(functionsBaseUrl(config2), "crewRunnerAuth", "exchangeRunnerKey", { key });
|
|
1159
1159
|
} catch (e) {
|
|
1160
1160
|
throw new AuthError(
|
|
1161
1161
|
`Ship ${shipId}: ${e instanceof Error ? e.message : String(e)}`,
|
|
@@ -2488,6 +2488,7 @@ async function resolveGithubToken(input) {
|
|
|
2488
2488
|
const res = await callFunction(
|
|
2489
2489
|
functionsBaseUrl(input.config),
|
|
2490
2490
|
input.idToken,
|
|
2491
|
+
"crewGithub",
|
|
2491
2492
|
"mintGithubJobToken",
|
|
2492
2493
|
{ shipId: input.shipId, jobId: input.jobId }
|
|
2493
2494
|
);
|
|
@@ -2537,6 +2538,7 @@ async function resolveMcpServers(input) {
|
|
|
2537
2538
|
res = await callFunction(
|
|
2538
2539
|
functionsBaseUrl(input.config),
|
|
2539
2540
|
input.idToken,
|
|
2541
|
+
"crewMcp",
|
|
2540
2542
|
"mintMcpJobConnections",
|
|
2541
2543
|
{
|
|
2542
2544
|
shipId: input.shipId,
|
|
@@ -2603,6 +2605,7 @@ async function probeAndReport(input) {
|
|
|
2603
2605
|
const res = await callFunction(
|
|
2604
2606
|
functionsBaseUrl(input.config),
|
|
2605
2607
|
input.idToken,
|
|
2608
|
+
"crewMcp",
|
|
2606
2609
|
"mintShipMcpProbe",
|
|
2607
2610
|
{ shipId, serverKey: server.id, runnerVersion: RUNNER_VERSION }
|
|
2608
2611
|
);
|
|
@@ -2795,6 +2798,7 @@ async function report(input, result) {
|
|
|
2795
2798
|
await callFunction(
|
|
2796
2799
|
functionsBaseUrl(input.config),
|
|
2797
2800
|
input.idToken,
|
|
2801
|
+
"crewMcp",
|
|
2798
2802
|
"reportShipMcpProbe",
|
|
2799
2803
|
{
|
|
2800
2804
|
shipId: input.shipId,
|
|
@@ -5818,7 +5822,7 @@ async function loginWithDeviceFlow(options) {
|
|
|
5818
5822
|
const projectId = options.project || existingConfig?.projectId || DEFAULT_PROJECT_ID;
|
|
5819
5823
|
const baseUrl = functionsBaseUrlFor(projectId);
|
|
5820
5824
|
const candidates = existingConfig ? configRunnerIdentities(existingConfig).map((i) => i.runnerId) : [];
|
|
5821
|
-
const start = await callPublicFunction(baseUrl, "startRunnerLogin", {
|
|
5825
|
+
const start = await callPublicFunction(baseUrl, "crewRunnerAuth", "startRunnerLogin", {
|
|
5822
5826
|
hostname: os5.hostname(),
|
|
5823
5827
|
// The singular field stays, always: it is what an older deployment reads, and dropping it
|
|
5824
5828
|
// would silently turn every re-login into a new enrolment for the length of a rollout.
|
|
@@ -5841,7 +5845,7 @@ Code: ${pc.bold(start.displayCode)}`,
|
|
|
5841
5845
|
await sleep(interval * 1e3);
|
|
5842
5846
|
let poll;
|
|
5843
5847
|
try {
|
|
5844
|
-
poll = await callPublicFunction(baseUrl, "pollRunnerLogin", {
|
|
5848
|
+
poll = await callPublicFunction(baseUrl, "crewRunnerAuth", "pollRunnerLogin", {
|
|
5845
5849
|
userCode: start.userCode,
|
|
5846
5850
|
deviceCode: start.deviceCode
|
|
5847
5851
|
});
|
|
@@ -5895,6 +5899,7 @@ Code: ${pc.bold(start.displayCode)}`,
|
|
|
5895
5899
|
async function exchange(config2, shipId) {
|
|
5896
5900
|
return callPublicFunction(
|
|
5897
5901
|
functionsBaseUrlFor(config2.projectId),
|
|
5902
|
+
"crewRunnerAuth",
|
|
5898
5903
|
"exchangeRunnerKey",
|
|
5899
5904
|
{ key: config2.shipKeys[shipId] }
|
|
5900
5905
|
);
|
|
@@ -5910,6 +5915,7 @@ async function loginWithKey(options) {
|
|
|
5910
5915
|
const existing = loadConfig();
|
|
5911
5916
|
const session = await callPublicFunction(
|
|
5912
5917
|
functionsBaseUrlFor(options.project),
|
|
5918
|
+
"crewRunnerAuth",
|
|
5913
5919
|
"exchangeRunnerKey",
|
|
5914
5920
|
{ key: options.key }
|
|
5915
5921
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumi.ai/runner",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Lumi Crew runner daemon — claims jobs from your Ships and executes them as headless Claude sessions on your own machine.",
|
|
6
6
|
"//name": "The ONLY package in this monorepo published to the public registry, so it is the one that does not follow the internal @lumi/crew-* convention: `@lumi` is not a scope we own, `@lumi.ai` is (the npm org). The workspace DIRECTORY stays packages/crew/runner — renaming the package is not renaming the folder.",
|