@rosthq/cli 0.7.171 → 0.7.172
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/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/index.js +61 -11
- package/dist/index.js.map +2 -2
- package/dist/redact.d.ts.map +1 -1
- package/dist/runner-login.d.ts.map +1 -1
- package/dist/runner-serve.d.ts.map +1 -1
- package/dist/runner-service.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -30,5 +30,18 @@ export declare function resolveAppUrl(value: string, env?: NodeJS.ProcessEnv): {
|
|
|
30
30
|
warning: string | null;
|
|
31
31
|
};
|
|
32
32
|
export declare function inspectAppUrlPolicy(value: string, env?: NodeJS.ProcessEnv): AppUrlPolicyInspection;
|
|
33
|
+
/** Shown in place of an app_url with no usable origin. */
|
|
34
|
+
export declare const withheldAppUrlDisplay = "(withheld: app_url is not a valid URL)";
|
|
35
|
+
/**
|
|
36
|
+
* Render a configured app_url for display: scheme, host, port and base path,
|
|
37
|
+
* with no trailing slash. Fails closed to {@link withheldAppUrlDisplay}.
|
|
38
|
+
*/
|
|
39
|
+
export declare function displayAppUrl(value: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Compose a known in-app route onto a configured app_url's credential-free
|
|
42
|
+
* display base. `route` is a codebase-owned literal (never caller data) and
|
|
43
|
+
* is relative so a base path survives. Strips a leading slash defensively.
|
|
44
|
+
*/
|
|
45
|
+
export declare function appUrlLink(value: string, route: string): string;
|
|
33
46
|
export {};
|
|
34
47
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eA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AwB,GAAG,sBAAsB,CA8H/G;AAED,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,2CAA2C,CAAC;AAyB9E;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUnD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/D"}
|
package/dist/index.js
CHANGED
|
@@ -43713,7 +43713,7 @@ var eventEnvelopeReaderSchema = external_exports.discriminatedUnion("type", [
|
|
|
43713
43713
|
var KEYED_SECRET_PATTERN = /((?:authorization|token|secret|password|api[_-]?key|connection[_-]?string|database[_-]?url)["']?\s*[:=]\s*["']?)([^\s"',}]+)/gi;
|
|
43714
43714
|
var ROST_TOKEN_PATTERN2 = rostTokenPattern("replace");
|
|
43715
43715
|
function redactSecrets(value) {
|
|
43716
|
-
return value.replace(/(Bearer\s+)([A-Za-z0-9._~+/=-]+)/gi, "$1[redacted]").replace(ROST_TOKEN_PATTERN2, "[redacted]").replace(KEYED_SECRET_PATTERN, "$1[redacted]").replace(/([a-z][a-z0-9+.-]*:\/\/
|
|
43716
|
+
return value.replace(/(Bearer\s+)([A-Za-z0-9._~+/=-]+)/gi, "$1[redacted]").replace(ROST_TOKEN_PATTERN2, "[redacted]").replace(KEYED_SECRET_PATTERN, "$1[redacted]").replace(/([a-z][a-z0-9+.-]*:\/\/)([^@/\s]+@)/gi, "$1[redacted]@");
|
|
43717
43717
|
}
|
|
43718
43718
|
function redactForLog(value) {
|
|
43719
43719
|
return redactSecrets(typeof value === "string" ? value : JSON.stringify(value, null, 2));
|
|
@@ -43918,19 +43918,32 @@ function inspectAppUrlPolicy(value, env = process.env) {
|
|
|
43918
43918
|
try {
|
|
43919
43919
|
parsed = new URL(normalized);
|
|
43920
43920
|
} catch {
|
|
43921
|
+
const withheld = normalized.length > 0 ? withheldAppUrlDisplay : "(empty)";
|
|
43921
43922
|
return {
|
|
43922
43923
|
input: value,
|
|
43923
43924
|
normalized,
|
|
43924
|
-
displayUrl:
|
|
43925
|
+
displayUrl: withheld,
|
|
43925
43926
|
kind: "development",
|
|
43926
43927
|
status: "error",
|
|
43927
43928
|
allowDevelopmentOptIn: allowDevelopmentAppUrl,
|
|
43928
43929
|
warning: null,
|
|
43929
|
-
error: `Configured app_url ${
|
|
43930
|
+
error: `Configured app_url ${withheld} is not a valid URL. Use ${canonicalAppUrl} for production, http://localhost or http://127.0.0.1 for local development, or set ${allowInsecureAppUrlEnv}=1 only for explicit development.`
|
|
43930
43931
|
};
|
|
43931
43932
|
}
|
|
43932
43933
|
const displayUrl = `${parsed.protocol}//${parsed.host}`;
|
|
43933
43934
|
const isLocalHttpHost = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1";
|
|
43935
|
+
if (parsed.username !== "" || parsed.password !== "") {
|
|
43936
|
+
return {
|
|
43937
|
+
input: value,
|
|
43938
|
+
normalized,
|
|
43939
|
+
displayUrl,
|
|
43940
|
+
kind: "development",
|
|
43941
|
+
status: "error",
|
|
43942
|
+
allowDevelopmentOptIn: allowDevelopmentAppUrl,
|
|
43943
|
+
warning: null,
|
|
43944
|
+
error: `Refusing app_url ${displayUrl}: it embeds credentials in the URL. Remove the "user:password@" prefix from ${brandEnvKey("APP_URL")} (or NEXT_PUBLIC_APP_URL, or the ${brandEnvKey("APP_URL")} entry in the runner service plist) and authenticate with a supported mechanism \u2014 \`${cliBrand.binName} login\` for a CLI session, or \`${cliBrand.binName} runner serve --user-code <code>\` for a runner.`
|
|
43945
|
+
};
|
|
43946
|
+
}
|
|
43934
43947
|
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
|
|
43935
43948
|
return {
|
|
43936
43949
|
input: value,
|
|
@@ -44003,6 +44016,41 @@ function inspectAppUrlPolicy(value, env = process.env) {
|
|
|
44003
44016
|
error: null
|
|
44004
44017
|
};
|
|
44005
44018
|
}
|
|
44019
|
+
var withheldAppUrlDisplay = "(withheld: app_url is not a valid URL)";
|
|
44020
|
+
function appUrlDisplayBase(value) {
|
|
44021
|
+
let parsed;
|
|
44022
|
+
try {
|
|
44023
|
+
parsed = new URL(value.trim());
|
|
44024
|
+
} catch {
|
|
44025
|
+
return null;
|
|
44026
|
+
}
|
|
44027
|
+
if (parsed.origin === "null") {
|
|
44028
|
+
return null;
|
|
44029
|
+
}
|
|
44030
|
+
const base = new URL(parsed.pathname, parsed.origin);
|
|
44031
|
+
if (!base.pathname.endsWith("/")) {
|
|
44032
|
+
base.pathname = `${base.pathname}/`;
|
|
44033
|
+
}
|
|
44034
|
+
return base;
|
|
44035
|
+
}
|
|
44036
|
+
function displayAppUrl(value) {
|
|
44037
|
+
if (value.trim().length === 0) {
|
|
44038
|
+
return "(empty)";
|
|
44039
|
+
}
|
|
44040
|
+
const base = appUrlDisplayBase(value);
|
|
44041
|
+
if (base === null) {
|
|
44042
|
+
return withheldAppUrlDisplay;
|
|
44043
|
+
}
|
|
44044
|
+
const rendered = base.toString();
|
|
44045
|
+
return rendered.endsWith("/") ? rendered.slice(0, -1) : rendered;
|
|
44046
|
+
}
|
|
44047
|
+
function appUrlLink(value, route) {
|
|
44048
|
+
const base = appUrlDisplayBase(value);
|
|
44049
|
+
if (base === null) {
|
|
44050
|
+
return displayAppUrl(value);
|
|
44051
|
+
}
|
|
44052
|
+
return new URL(route.replace(/^\/+/, ""), base).toString();
|
|
44053
|
+
}
|
|
44006
44054
|
function brandEnvKey(suffix) {
|
|
44007
44055
|
return `${cliBrand.envPrefix}_${suffix}`;
|
|
44008
44056
|
}
|
|
@@ -59738,7 +59786,9 @@ Every notification should include the seat, cause, evidence, and requested decis
|
|
|
59738
59786
|
// service (a foreground `runner serve` on the same state file authenticates
|
|
59739
59787
|
// as the same runner id); runner health is reported as unattributed
|
|
59740
59788
|
// information only. Server-observed, service-attributed readiness is DER-3322.
|
|
59741
|
-
|
|
59789
|
+
// DER-3774: .8 names Settings > Connections > Connected machines and the
|
|
59790
|
+
// working `/settings?section=runners` deep link (the previous Runners settings page 404s).
|
|
59791
|
+
version: "2026-08-09.8",
|
|
59742
59792
|
public: true,
|
|
59743
59793
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
59744
59794
|
stages: ["staffing", "operating_rhythm"],
|
|
@@ -59766,7 +59816,7 @@ The local runner is for human-controlled local agent work. It should retrieve {{
|
|
|
59766
59816
|
|
|
59767
59817
|
## Install a local Runner
|
|
59768
59818
|
|
|
59769
|
-
Use Local Runner when a Seat should run on a machine you control. Install it from the public CLI \u2014 no repository checkout and no desktop app are required. A signed desktop app is planned; until verified installers ship, Settings >
|
|
59819
|
+
Use Local Runner when a Seat should run on a machine you control. Install it from the public CLI \u2014 no repository checkout and no desktop app are required. A signed desktop app is planned; until verified installers ship, Settings > Connections > Connected machines (\`/settings?section=runners\`) shows no desktop download link.
|
|
59770
59820
|
|
|
59771
59821
|
Recommended paths:
|
|
59772
59822
|
|
|
@@ -59776,7 +59826,7 @@ Recommended paths:
|
|
|
59776
59826
|
Two ways to authenticate and pair \u2014 both first-class, an agent can drive either entirely from the terminal:
|
|
59777
59827
|
|
|
59778
59828
|
- **CLI-native (agent):** \`{{cli}} login --device\` prints a code for one human OAuth approval; after that the session is stored locally and the agent runs unattended ("approve once, then autonomous"). Then \`{{cli}} runner serve\`/\`install-service\` pairs against your active company \u2014 an authenticated CLI can also self-issue a pairing code with \`runner.pairing.start\` and claim it.
|
|
59779
|
-
- **Web-guided (human):** issue a pairing code from Settings >
|
|
59829
|
+
- **Web-guided (human):** issue a pairing code from Settings > Connections > Connected machines (\`/settings?section=runners\`) > Add a runner, then on the host run \`{{cli}} runner serve --user-code <code>\`. An explicit user code always claims that code, even if the host has an older local runner state file, so the browser and terminal do not accidentally point at different runner ids. The host stores only the runner bearer secret in an owner-only file and never logs in.
|
|
59780
59830
|
|
|
59781
59831
|
Headless and service accounts are supported first-class: when no usable OS keychain exists (for example a service or SSH account), the CLI stores the session in an owner-only file (directory 0700, file 0600) automatically \u2014 no development flag. That file holds only the CLI session token, never tenant secrets, API keys, or vault refs.
|
|
59782
59832
|
|
|
@@ -69654,7 +69704,7 @@ async function pairIfNeeded(client, fetchImpl, appUrl2, config2, io) {
|
|
|
69654
69704
|
userCode = await startPairing(client, config2);
|
|
69655
69705
|
} else {
|
|
69656
69706
|
throw new Error(
|
|
69657
|
-
`No paired runner state at ${config2.stateFile}. Provide --user-code <code> from Settings >
|
|
69707
|
+
`No paired runner state at ${config2.stateFile}. Provide --user-code <code> from Settings > Connections > Connected machines (${appUrlLink(appUrl2, "settings?section=runners")}), or run \`${cliBrand.binName} login --device\` once to pair this runner.`
|
|
69658
69708
|
);
|
|
69659
69709
|
}
|
|
69660
69710
|
const serviceKey = runnerServiceKeyPairForState(priorState);
|
|
@@ -72672,7 +72722,7 @@ async function installService(options) {
|
|
|
72672
72722
|
` : `Loaded runner service in launchd domain ${result.domain}.
|
|
72673
72723
|
`
|
|
72674
72724
|
);
|
|
72675
|
-
const pairingLine = options.userCode !== void 0 ? `Paired with the supplied user code; the bearer secret is stored locally and never printed.` : `Pair it once so it can claim work: \`${cliBrand.binName} runner serve --once --user-code <code> --name ${safeName} --state-file "${paths.stateFile}"\` (get a code from Settings >
|
|
72725
|
+
const pairingLine = options.userCode !== void 0 ? `Paired with the supplied user code; the bearer secret is stored locally and never printed.` : `Pair it once so it can claim work: \`${cliBrand.binName} runner serve --once --user-code <code> --name ${safeName} --state-file "${paths.stateFile}"\` (get a code from Settings > Connections > Connected machines (${appUrlLink(options.appUrl, "settings?section=runners")})), or re-run install-service with --user-code <code>. The bearer secret is stored locally and never printed.`;
|
|
72676
72726
|
options.io.stdout.write(
|
|
72677
72727
|
`${[
|
|
72678
72728
|
`Installed runner service ${label}.`,
|
|
@@ -73655,7 +73705,7 @@ async function runRunnerLogin(options) {
|
|
|
73655
73705
|
const state = await loadState(resolvedStateFile);
|
|
73656
73706
|
if (state === null || typeof state.runner_id !== "string") {
|
|
73657
73707
|
io.stderr.write(
|
|
73658
|
-
`No paired runner state at ${resolvedStateFile}. Pair this runner first (Settings >
|
|
73708
|
+
`No paired runner state at ${resolvedStateFile}. Pair this runner first (Settings > Connections > Connected machines (${appUrlLink(appUrl2, "settings?section=runners")}), or \`${cliBrand.binName} runner serve --user-code <code>\`).
|
|
73659
73709
|
`
|
|
73660
73710
|
);
|
|
73661
73711
|
return 1;
|
|
@@ -76025,7 +76075,7 @@ async function runStart2(options) {
|
|
|
76025
76075
|
};
|
|
76026
76076
|
return finishVerb("start", options, parsed, sidecar.setup_id, progress, null);
|
|
76027
76077
|
}
|
|
76028
|
-
return renderError(io, parsed.json, "start", 1,
|
|
76078
|
+
return renderError(io, parsed.json, "start", 1, `No paired runner state found. Provide --user-code <code> from Settings > Connections > Connected machines (${appUrlLink(appUrl2, "settings?section=runners")}).`);
|
|
76029
76079
|
}
|
|
76030
76080
|
if (advance.kind === "claim_failed" || advance.kind === "login_failed") {
|
|
76031
76081
|
return renderError(io, parsed.json, "start", advance.exitCode, advance.message ?? "");
|
|
@@ -76240,7 +76290,7 @@ async function runResume(options) {
|
|
|
76240
76290
|
expectedTenantId ?? void 0
|
|
76241
76291
|
);
|
|
76242
76292
|
if (advance.kind === "needs_user_code") {
|
|
76243
|
-
return renderError(io, parsed.json, "resume", 1,
|
|
76293
|
+
return renderError(io, parsed.json, "resume", 1, `No paired runner state found. Provide --user-code <code> from Settings > Connections > Connected machines (${appUrlLink(appUrl2, "settings?section=runners")}).`);
|
|
76244
76294
|
}
|
|
76245
76295
|
if (advance.kind === "claim_failed" || advance.kind === "login_failed") {
|
|
76246
76296
|
return renderError(io, parsed.json, "resume", advance.exitCode, advance.message ?? "");
|