@polderlabs/bizar-omp 0.7.9 → 0.7.10
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/README.md +35 -4
- package/dist/cli/agents.d.ts.map +1 -1
- package/dist/cli/agents.js +46 -23
- package/dist/cli/agents.js.map +1 -1
- package/dist/cli/doctor.d.ts +4 -4
- package/dist/cli/install.d.ts +126 -9
- package/dist/cli/install.d.ts.map +1 -1
- package/dist/cli/install.js +19 -4
- package/dist/cli/install.js.map +1 -1
- package/dist/cli/mobile-claim.d.ts +143 -0
- package/dist/cli/mobile-claim.d.ts.map +1 -0
- package/dist/cli/mobile-claim.js +399 -0
- package/dist/cli/mobile-claim.js.map +1 -0
- package/dist/cli/omb-commands.d.ts +1 -1
- package/dist/cli/omb-commands.d.ts.map +1 -1
- package/dist/cli/omb-commands.js +22 -1
- package/dist/cli/omb-commands.js.map +1 -1
- package/dist/cli/omb-mobile.d.ts +47 -0
- package/dist/cli/omb-mobile.d.ts.map +1 -0
- package/dist/cli/omb-mobile.js +307 -0
- package/dist/cli/omb-mobile.js.map +1 -0
- package/dist/cli/omb-sessions.d.ts +64 -0
- package/dist/cli/omb-sessions.d.ts.map +1 -0
- package/dist/cli/omb-sessions.js +231 -0
- package/dist/cli/omb-sessions.js.map +1 -0
- package/dist/cli/omb.js +20 -15
- package/dist/cli/omb.js.map +1 -1
- package/dist/cli/omp-mobile-dispatch.d.ts +10 -0
- package/dist/cli/omp-mobile-dispatch.d.ts.map +1 -0
- package/dist/cli/omp-mobile-dispatch.js +148 -0
- package/dist/cli/omp-mobile-dispatch.js.map +1 -0
- package/dist/omp/compatibility-receipt.d.ts +69 -0
- package/dist/omp/compatibility-receipt.d.ts.map +1 -0
- package/dist/omp/compatibility-receipt.js +60 -0
- package/dist/omp/compatibility-receipt.js.map +1 -0
- package/dist/omp/compatibility.d.ts +5 -5
- package/dist/omp/compatibility.d.ts.map +1 -1
- package/dist/omp/compatibility.js +2 -2
- package/dist/omp/compatibility.js.map +1 -1
- package/dist/omp/daemon-service.d.ts +4 -0
- package/dist/omp/daemon-service.d.ts.map +1 -1
- package/dist/omp/daemon-service.js +418 -8
- package/dist/omp/daemon-service.js.map +1 -1
- package/dist/omp/omb-sessions.d.ts +10 -0
- package/dist/omp/omb-sessions.d.ts.map +1 -1
- package/dist/omp/omb-sessions.js +8 -6
- package/dist/omp/omb-sessions.js.map +1 -1
- package/dist/omp/tmux.d.ts +6 -0
- package/dist/omp/tmux.d.ts.map +1 -1
- package/dist/omp/tmux.js +11 -0
- package/dist/omp/tmux.js.map +1 -1
- package/dist/scripts/emit-compatibility-receipt.d.ts +2 -0
- package/dist/scripts/emit-compatibility-receipt.d.ts.map +1 -0
- package/dist/scripts/emit-compatibility-receipt.js +33 -0
- package/dist/scripts/emit-compatibility-receipt.js.map +1 -0
- package/docs/07-bizarharness-integration.md +44 -0
- package/docs/compatibility/baseline.json +9 -8
- package/docs/compatibility/supported-surfaces.json +2 -1
- package/docs/releases/0.7.10.md +27 -0
- package/docs/releases/support-matrix.md +8 -1
- package/package.json +6 -4
- package/skills/omp-native-development/SKILL.md +1 -1
- package/skills/omp-native-development/references/accuracy-and-versioning.md +1 -1
- package/skills/omp-native-development/references/source-manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omb-commands.js","sourceRoot":"","sources":["../../src/cli/omb-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AA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EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;KAC/D;CACF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `omb mobile` — the command surface for the in-repo mobile host.
|
|
3
|
+
*
|
|
4
|
+
* The design rule from docs/07-bizarharness-integration.md is that this command
|
|
5
|
+
* must not grow a second tunnel, pairing or session engine. BizarHarness owns
|
|
6
|
+
* the terminal runtime; the mobile host owns the phone transport. This file
|
|
7
|
+
* exists so every operator-facing mobile action belongs to `omb mobile`.
|
|
8
|
+
* OMB's dispatch for this command is internal, and the host CLI is not a
|
|
9
|
+
* separately installed command.
|
|
10
|
+
*
|
|
11
|
+
* Registering `mobile` here also fixes a real footgun: unmatched tokens fall
|
|
12
|
+
* through to OMP, so before this command existed `omb mobile` silently started
|
|
13
|
+
* an OMP session with the literal argument `mobile`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PAIR_USAGE = "omb pair\n\n Pair the Android app with this OMB host. The OMB daemon keeps the gateway\n and tunnel running after the QR is printed, so this terminal can be closed.\n";
|
|
16
|
+
export declare function runPairCommand(args: string[], env: NodeJS.ProcessEnv): Promise<number>;
|
|
17
|
+
export declare const MOBILE_USAGE = "omb mobile <command> [options]\n\n Runs the BizarOMP Mobile host on this machine, which lets the Android app\n control native OMP sessions started here.\n\n Host operations run through this command family. Mobile ownership controls\n are handled by OMB under \"omb mobile sessions\".\n\n OMP remains the runtime. omb mobile supervises the omp you already have\n installed; it does not run a second one.\n\n Source checkout commands:\n omb mobile workspace install|check\n omb mobile build\n omb mobile app start|android|android:release\n";
|
|
18
|
+
/** Map source-workspace tasks to their implementation without exposing another CLI. */
|
|
19
|
+
export declare function mobileDevelopmentInvocation(args: readonly string[]): {
|
|
20
|
+
command: string;
|
|
21
|
+
args: string[];
|
|
22
|
+
} | undefined;
|
|
23
|
+
/** The host contract Bizar negotiates against. */
|
|
24
|
+
export interface MobileHostCapabilities {
|
|
25
|
+
readonly schemaVersion: number;
|
|
26
|
+
readonly hostVersion: string;
|
|
27
|
+
readonly protocol: number;
|
|
28
|
+
readonly commands: readonly string[];
|
|
29
|
+
readonly capabilities: readonly string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Reads the in-repo host capability contract.
|
|
33
|
+
*
|
|
34
|
+
* Returns undefined for a host too old to answer. That is a supported state, not
|
|
35
|
+
* an error: the host is executable and may work perfectly well, so presence is
|
|
36
|
+
* not evidence of a contract and the caller decides what to do about it.
|
|
37
|
+
*/
|
|
38
|
+
export declare function readHostCapabilities(binary: string, env?: NodeJS.ProcessEnv): MobileHostCapabilities | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Help that only claims what the integrated host can do.
|
|
41
|
+
*
|
|
42
|
+
* Keep this capability-aware so a mismatched local build never advertises
|
|
43
|
+
* commands its internal host cannot serve.
|
|
44
|
+
*/
|
|
45
|
+
export declare function renderUsage(capabilities: MobileHostCapabilities | undefined): string;
|
|
46
|
+
export declare function runMobileCommand(args: string[], env: NodeJS.ProcessEnv): Promise<number>;
|
|
47
|
+
//# sourceMappingURL=omb-mobile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omb-mobile.d.ts","sourceRoot":"","sources":["../../src/cli/omb-mobile.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,UAAU,6KAItB,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAU5F;AAED,eAAO,MAAM,YAAY,8iBAexB,CAAC;AAKF,uFAAuF;AACvF,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAepH;AAqCD,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAcD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,sBAAsB,GAAG,SAAS,CAmBpC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,sBAAsB,GAAG,SAAS,GAAG,MAAM,CAyBpF;AAoBD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CA8E9F"}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { execFileSync, spawn } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { readDaemonStatus, startDaemon } from "../omp/daemon.js";
|
|
5
|
+
import { MOBILE_SESSIONS_USAGE, runMobileSessionsCommand } from "./omb-sessions.js";
|
|
6
|
+
/**
|
|
7
|
+
* `omb mobile` — the command surface for the in-repo mobile host.
|
|
8
|
+
*
|
|
9
|
+
* The design rule from docs/07-bizarharness-integration.md is that this command
|
|
10
|
+
* must not grow a second tunnel, pairing or session engine. BizarHarness owns
|
|
11
|
+
* the terminal runtime; the mobile host owns the phone transport. This file
|
|
12
|
+
* exists so every operator-facing mobile action belongs to `omb mobile`.
|
|
13
|
+
* OMB's dispatch for this command is internal, and the host CLI is not a
|
|
14
|
+
* separately installed command.
|
|
15
|
+
*
|
|
16
|
+
* Registering `mobile` here also fixes a real footgun: unmatched tokens fall
|
|
17
|
+
* through to OMP, so before this command existed `omb mobile` silently started
|
|
18
|
+
* an OMP session with the literal argument `mobile`.
|
|
19
|
+
*/
|
|
20
|
+
export const PAIR_USAGE = `omb pair
|
|
21
|
+
|
|
22
|
+
Pair the Android app with this OMB host. The OMB daemon keeps the gateway
|
|
23
|
+
and tunnel running after the QR is printed, so this terminal can be closed.
|
|
24
|
+
`;
|
|
25
|
+
export async function runPairCommand(args, env) {
|
|
26
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
27
|
+
process.stdout.write(`${PAIR_USAGE}\n`);
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
if (args.length > 0) {
|
|
31
|
+
process.stderr.write(`omb pair: unexpected argument "${args[0]}"\n\n${PAIR_USAGE}\n`);
|
|
32
|
+
return 2;
|
|
33
|
+
}
|
|
34
|
+
return await runMobileCommand(["pair"], env);
|
|
35
|
+
}
|
|
36
|
+
export const MOBILE_USAGE = `omb mobile <command> [options]
|
|
37
|
+
|
|
38
|
+
Runs the BizarOMP Mobile host on this machine, which lets the Android app
|
|
39
|
+
control native OMP sessions started here.
|
|
40
|
+
|
|
41
|
+
Host operations run through this command family. Mobile ownership controls
|
|
42
|
+
are handled by OMB under "omb mobile sessions".
|
|
43
|
+
|
|
44
|
+
OMP remains the runtime. omb mobile supervises the omp you already have
|
|
45
|
+
installed; it does not run a second one.
|
|
46
|
+
|
|
47
|
+
Source checkout commands:
|
|
48
|
+
omb mobile workspace install|check
|
|
49
|
+
omb mobile build
|
|
50
|
+
omb mobile app start|android|android:release
|
|
51
|
+
`;
|
|
52
|
+
const HOST_ENTRY = fileURLToPath(new URL("../../mobile/packages/host/dist/cli/main.js", import.meta.url));
|
|
53
|
+
const MOBILE_WORKSPACE = fileURLToPath(new URL("../../mobile/", import.meta.url));
|
|
54
|
+
/** Map source-workspace tasks to their implementation without exposing another CLI. */
|
|
55
|
+
export function mobileDevelopmentInvocation(args) {
|
|
56
|
+
const [group, action, ...extra] = args;
|
|
57
|
+
if (group === "workspace" && action === "install") {
|
|
58
|
+
return { command: "pnpm", args: ["install", "--frozen-lockfile", ...extra] };
|
|
59
|
+
}
|
|
60
|
+
if (group === "workspace" && action === "check") {
|
|
61
|
+
return { command: "pnpm", args: ["check", ...extra] };
|
|
62
|
+
}
|
|
63
|
+
if (group === "build" && action === undefined) {
|
|
64
|
+
return { command: "pnpm", args: ["--filter", "@polderlabs/bizaromp-mobile-host...", "build", ...extra] };
|
|
65
|
+
}
|
|
66
|
+
if (group === "app" && action !== undefined && ["start", "android", "android:release"].includes(action)) {
|
|
67
|
+
return { command: "pnpm", args: ["--filter", "@polderlabs/bizaromp-mobile", action, ...extra] };
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
async function runMobileDevelopmentCommand(args, env) {
|
|
72
|
+
const invocation = mobileDevelopmentInvocation(args);
|
|
73
|
+
if (invocation === undefined)
|
|
74
|
+
return undefined;
|
|
75
|
+
if (!existsSync(MOBILE_WORKSPACE)) {
|
|
76
|
+
process.stderr.write("omb mobile: source workspace is unavailable in this installation; run this command from a BizarOMP checkout.\n");
|
|
77
|
+
return 2;
|
|
78
|
+
}
|
|
79
|
+
return await new Promise((resolve) => {
|
|
80
|
+
const child = spawn(invocation.command, invocation.args, { cwd: MOBILE_WORKSPACE, env, stdio: "inherit" });
|
|
81
|
+
child.once("error", (error) => {
|
|
82
|
+
process.stderr.write(`omb mobile: could not start ${invocation.command}: ${error.message}\n`);
|
|
83
|
+
resolve(127);
|
|
84
|
+
});
|
|
85
|
+
child.once("close", (code) => resolve(code ?? 1));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** How a missing host is reported, kept identical in shape across the CLI. */
|
|
89
|
+
function hostMissing() {
|
|
90
|
+
process.stderr.write("omb mobile: the in-repo mobile host has not been built.\n" +
|
|
91
|
+
" From the BizarOMP checkout, run `omb mobile build`, then retry.\n");
|
|
92
|
+
process.exit(127);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Locate the in-repo host entrypoint.
|
|
96
|
+
*/
|
|
97
|
+
function resolveHost(env) {
|
|
98
|
+
const entry = env.BIZAROMP_MOBILE_ENTRY || HOST_ENTRY;
|
|
99
|
+
if (!existsSync(entry))
|
|
100
|
+
hostMissing();
|
|
101
|
+
return entry;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The highest host contract schema this build understands.
|
|
105
|
+
*
|
|
106
|
+
* A newer host may add commands; it must not change the shape of this one
|
|
107
|
+
* without a new schema, because Bizar would then be reading fields it does not
|
|
108
|
+
* understand and could conclude the wrong thing.
|
|
109
|
+
*/
|
|
110
|
+
const MAX_HOST_SCHEMA_VERSION = 1;
|
|
111
|
+
/** Subcommands this front end advertises and forwards. */
|
|
112
|
+
const ADVERTISED_COMMANDS = ["setup", "pair", "start", "status", "stop", "doctor", "devices", "sessions", "tunnel"];
|
|
113
|
+
/**
|
|
114
|
+
* Reads the in-repo host capability contract.
|
|
115
|
+
*
|
|
116
|
+
* Returns undefined for a host too old to answer. That is a supported state, not
|
|
117
|
+
* an error: the host is executable and may work perfectly well, so presence is
|
|
118
|
+
* not evidence of a contract and the caller decides what to do about it.
|
|
119
|
+
*/
|
|
120
|
+
export function readHostCapabilities(binary, env = process.env) {
|
|
121
|
+
try {
|
|
122
|
+
const stdout = execFileSync(process.execPath, [binary, "capabilities", "--json"], { encoding: "utf8", env, timeout: 20_000, stdio: ["ignore", "pipe", "pipe"] });
|
|
123
|
+
const parsed = JSON.parse(stdout);
|
|
124
|
+
if (typeof parsed !== "object" || parsed === null)
|
|
125
|
+
return undefined;
|
|
126
|
+
const record = parsed;
|
|
127
|
+
if (typeof record.schemaVersion !== "number" || record.schemaVersion > MAX_HOST_SCHEMA_VERSION)
|
|
128
|
+
return undefined;
|
|
129
|
+
if (typeof record.hostVersion !== "string" || typeof record.protocol !== "number")
|
|
130
|
+
return undefined;
|
|
131
|
+
if (!Array.isArray(record.commands) || !record.commands.every((entry) => typeof entry === "string"))
|
|
132
|
+
return undefined;
|
|
133
|
+
return {
|
|
134
|
+
schemaVersion: record.schemaVersion,
|
|
135
|
+
hostVersion: record.hostVersion,
|
|
136
|
+
protocol: record.protocol,
|
|
137
|
+
commands: record.commands,
|
|
138
|
+
capabilities: Array.isArray(record.capabilities) ? record.capabilities.filter((entry) => typeof entry === "string") : [],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Help that only claims what the integrated host can do.
|
|
147
|
+
*
|
|
148
|
+
* Keep this capability-aware so a mismatched local build never advertises
|
|
149
|
+
* commands its internal host cannot serve.
|
|
150
|
+
*/
|
|
151
|
+
export function renderUsage(capabilities) {
|
|
152
|
+
const supported = capabilities === undefined ? undefined : new Set(capabilities.commands);
|
|
153
|
+
const line = (command, description) => supported === undefined || supported.has(command) ? ` ${command.padEnd(10)}${description}\n` : "";
|
|
154
|
+
return [
|
|
155
|
+
MOBILE_USAGE.split("Any argument not listed")[0] ?? MOBILE_USAGE,
|
|
156
|
+
"\n",
|
|
157
|
+
line("setup", "Install or repair the host's verified cloudflared binary."),
|
|
158
|
+
" pair Print a one-time QR; the OMB daemon keeps the host running.\n",
|
|
159
|
+
line("start", "Start the mobile host in this terminal."),
|
|
160
|
+
line("status", "Report host identity, paired devices and tunnel state."),
|
|
161
|
+
line("stop", "Stop the gateway and any tunnel it owns."),
|
|
162
|
+
line("doctor", "Report versions, permissions and RPC probe results as JSON."),
|
|
163
|
+
line("devices", "List, rename or revoke paired devices."),
|
|
164
|
+
line("sessions", "List sessions and manage mobile ownership claims."),
|
|
165
|
+
line("tunnel", "Configure or inspect the Cloudflare tunnel."),
|
|
166
|
+
" workspace Manage mobile workspace dependencies and checks (source checkout).\n",
|
|
167
|
+
" build Build the integrated mobile host (source checkout).\n",
|
|
168
|
+
" app Start Expo or build/install the Android app (source checkout).\n",
|
|
169
|
+
`\n${MOBILE_SESSIONS_USAGE}\n`,
|
|
170
|
+
"",
|
|
171
|
+
capabilities === undefined
|
|
172
|
+
? " The integrated host did not report a capability contract.\n"
|
|
173
|
+
: ` Mobile host ${capabilities.hostVersion}, protocol ${capabilities.protocol}.\n`,
|
|
174
|
+
].join("");
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Probes a host without failing when there is none.
|
|
178
|
+
*
|
|
179
|
+
* `resolveHost` exits 127, which is right for running a subcommand and wrong
|
|
180
|
+
* for rendering help: `omb mobile --help` has to work on a machine where the
|
|
181
|
+
* host is not installed, because that is exactly when a user is reading it.
|
|
182
|
+
*/
|
|
183
|
+
function probeHost(env) {
|
|
184
|
+
try {
|
|
185
|
+
const binary = env.BIZAROMP_MOBILE_ENTRY || HOST_ENTRY;
|
|
186
|
+
if (!existsSync(binary))
|
|
187
|
+
return undefined;
|
|
188
|
+
execFileSync(process.execPath, [binary, "--help"], { stdio: "ignore", timeout: 10_000, env });
|
|
189
|
+
return binary;
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
export async function runMobileCommand(args, env) {
|
|
196
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
197
|
+
// Probe without failing: help that overstates the installed host's abilities
|
|
198
|
+
// is the problem this command exists to avoid, and help that cannot be read
|
|
199
|
+
// at all is the one way to guarantee someone relies on the overstated form.
|
|
200
|
+
const probe = probeHost(env);
|
|
201
|
+
process.stdout.write(`${renderUsage(probe === undefined ? undefined : readHostCapabilities(probe, env))}\n`);
|
|
202
|
+
return 0;
|
|
203
|
+
}
|
|
204
|
+
const developmentResult = await runMobileDevelopmentCommand(args, env);
|
|
205
|
+
if (developmentResult !== undefined)
|
|
206
|
+
return developmentResult;
|
|
207
|
+
const requested = args[0];
|
|
208
|
+
if (requested === "sessions" && args[1] !== undefined && args[1] !== "list" && !args.includes("--help") && !args.includes("-h")) {
|
|
209
|
+
return await runMobileSessionsCommand(process.cwd(), args.slice(1), env);
|
|
210
|
+
}
|
|
211
|
+
if (requested?.startsWith("--internal-") === true) {
|
|
212
|
+
process.stderr.write("omb mobile: internal host modes cannot be invoked as operator commands.\n");
|
|
213
|
+
return 2;
|
|
214
|
+
}
|
|
215
|
+
const host = resolveHost(env);
|
|
216
|
+
const capabilities = readHostCapabilities(host, env);
|
|
217
|
+
if (requested !== undefined && ADVERTISED_COMMANDS.includes(requested)) {
|
|
218
|
+
if (capabilities !== undefined && !capabilities.commands.includes(requested)) {
|
|
219
|
+
process.stderr.write(`omb mobile: this build's mobile host ${capabilities.hostVersion} does not support "${requested}".\n` +
|
|
220
|
+
" Run `omb mobile --help` to see what this host actually provides.\n");
|
|
221
|
+
return 1;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if (requested === "pair") {
|
|
225
|
+
let daemon = readDaemonStatus(env).daemon;
|
|
226
|
+
if (!daemon) {
|
|
227
|
+
try {
|
|
228
|
+
daemon = await startDaemon(env);
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
daemon = readDaemonStatus(env).daemon;
|
|
232
|
+
if (!daemon)
|
|
233
|
+
throw error;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
const response = await fetch(`http://127.0.0.1:${daemon.port}/mobile/pair`, {
|
|
237
|
+
method: "POST", headers: { authorization: `Bearer ${daemon.token}` }, signal: AbortSignal.timeout(70_000),
|
|
238
|
+
});
|
|
239
|
+
const pair = await response.json();
|
|
240
|
+
if (!response.ok || typeof pair.deepLink !== "string") {
|
|
241
|
+
process.stderr.write(`omb mobile: ${typeof pair.error === "string" ? pair.error : "daemon could not start pairing"}\n`);
|
|
242
|
+
return 1;
|
|
243
|
+
}
|
|
244
|
+
const deepLink = pair.deepLink;
|
|
245
|
+
const qr = execFileSync(process.execPath, [host, "--internal-render-pairing-qr", "--stdin"], { input: deepLink, encoding: "utf8", env, timeout: 10_000 });
|
|
246
|
+
const hostname = new URL(String(pair.endpoint)).hostname;
|
|
247
|
+
process.stdout.write(`\n Host ${hostname}\n Fingerprint ${pair.hostKeyFingerprint}\n Endpoint ${pair.endpoint}\n Pairing expires at ${new Date(Number(pair.expiresAt)).toLocaleTimeString()}\n\n${qr}\n The OMB daemon now owns the gateway and tunnel. You can close this terminal.\n`);
|
|
248
|
+
return 0;
|
|
249
|
+
}
|
|
250
|
+
if (requested === "status" || requested === "stop") {
|
|
251
|
+
const daemon = readDaemonStatus(env).daemon;
|
|
252
|
+
if (daemon) {
|
|
253
|
+
const path = requested === "status" ? "/mobile/status" : "/mobile/stop";
|
|
254
|
+
const response = await fetch(`http://127.0.0.1:${daemon.port}${path}`, {
|
|
255
|
+
method: requested === "stop" ? "POST" : "GET", headers: { authorization: `Bearer ${daemon.token}` }, signal: AbortSignal.timeout(5_000),
|
|
256
|
+
});
|
|
257
|
+
if (response.ok) {
|
|
258
|
+
const value = await response.json();
|
|
259
|
+
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
260
|
+
return 0;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// Inherit stdio: the host renders a terminal QR and progress, so a pipe would
|
|
265
|
+
// strip exactly the output the user is here to see.
|
|
266
|
+
//
|
|
267
|
+
// Spawned rather than run synchronously. `pair` is the one subcommand that
|
|
268
|
+
// stays alive for minutes — it prints a QR and then waits for a scan, writing
|
|
269
|
+
// progress the whole time. A synchronous child blocks this process's event
|
|
270
|
+
// loop, so SIGINT could not be observed or handed on: pressing Ctrl-C left
|
|
271
|
+
// the tunnel and the pairing window running with nobody to stop them. The
|
|
272
|
+
// child now shares our process group and receives the signal directly, and
|
|
273
|
+
// this process stays able to report how it ended.
|
|
274
|
+
return await runHost(host, args, env);
|
|
275
|
+
}
|
|
276
|
+
/** Runs the host as a long-lived passthrough and resolves with its exit code. */
|
|
277
|
+
async function runHost(host, args, env) {
|
|
278
|
+
return await new Promise((resolve) => {
|
|
279
|
+
const child = spawn(process.execPath, [host, ...args], { stdio: "inherit", env });
|
|
280
|
+
// A signal the child did not handle is reported the way a shell would, so
|
|
281
|
+
// "Ctrl-C" and "exited 130" do not look like two different failures.
|
|
282
|
+
const settle = (code) => {
|
|
283
|
+
child.removeAllListeners();
|
|
284
|
+
resolve(code);
|
|
285
|
+
};
|
|
286
|
+
child.on("error", (error) => {
|
|
287
|
+
// A spawn failure is not the host "exiting abnormally": the host never ran.
|
|
288
|
+
// Saying so plainly is the difference between an install problem and a
|
|
289
|
+
// runtime problem for whoever is reading the terminal.
|
|
290
|
+
const cause = error.code === "EACCES"
|
|
291
|
+
? `${host} is not executable. Reinstall the host, or run it with "node dist/cli/main.js".`
|
|
292
|
+
: error.code === "ENOENT"
|
|
293
|
+
? `${host} disappeared from PATH between the check and the run.`
|
|
294
|
+
: `could not run ${host}: ${error.message}`;
|
|
295
|
+
process.stderr.write(`omb mobile: ${cause}\n`);
|
|
296
|
+
settle(1);
|
|
297
|
+
});
|
|
298
|
+
child.on("exit", (code, signal) => {
|
|
299
|
+
if (code !== null) {
|
|
300
|
+
settle(code);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
settle(signal === "SIGINT" ? 130 : signal === "SIGTERM" ? 143 : 1);
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=omb-mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omb-mobile.js","sourceRoot":"","sources":["../../src/cli/omb-mobile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,M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AC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { OmbSessionActivity } from "../omp/session-activity.js";
|
|
2
|
+
/**
|
|
3
|
+
* `omb sessions list --json` — a machine-readable session inventory.
|
|
4
|
+
*
|
|
5
|
+
* Until this existed there was no stable way for another tool to learn what
|
|
6
|
+
* sessions Bizar owns. The dashboard's `GET /sessions` is the only other
|
|
7
|
+
* machine-readable surface, and it is deliberately gated behind a loopback
|
|
8
|
+
* bearer token; a companion process on the same host has no way to reach it
|
|
9
|
+
* without minting one.
|
|
10
|
+
*
|
|
11
|
+
* Two properties are load-bearing and must not be relaxed:
|
|
12
|
+
*
|
|
13
|
+
* - **Scan authority travels with the data.** An empty list is ambiguous with
|
|
14
|
+
* "the multiplexer did not answer", and a consumer that treats it as
|
|
15
|
+
* authoritative blanks every row on a transient tmux restart. `authority.known`
|
|
16
|
+
* is what lets a caller tell those apart.
|
|
17
|
+
* - **Liveness is never inferred.** `processObserved`, `authorityKnown` and
|
|
18
|
+
* `uncertainLiveness` are three separate observations, reported as three
|
|
19
|
+
* separate fields. Collapsing them would turn "we could not tell" into "no".
|
|
20
|
+
*/
|
|
21
|
+
export declare const SESSIONS_USAGE = "omb sessions list [--all] [--json]\n\n Lists the Bizar-owned sessions for this project; --all selects every project.\n\n --json print machine-readable output for other tools.\n --all include sessions from every project known to this OMB host.\n\n Fields are observations, not inferences. authority.known is false when the\n multiplexer did not answer, and an empty sessions list in that state means\n \"unknown\", not \"none\". uncertainLiveness and processObserved are reported\n separately for the same reason: unknown liveness is never downgraded to\n absent.";
|
|
22
|
+
export interface SessionsInventorySession {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly displayName: string;
|
|
25
|
+
readonly state: string;
|
|
26
|
+
readonly generation: string;
|
|
27
|
+
readonly project: string;
|
|
28
|
+
readonly cwd: string;
|
|
29
|
+
readonly hosted: boolean;
|
|
30
|
+
readonly attached: boolean;
|
|
31
|
+
readonly authorityKnown: boolean;
|
|
32
|
+
readonly processObserved: boolean;
|
|
33
|
+
readonly uncertainLiveness: boolean;
|
|
34
|
+
/** Journal-derived, privacy-safe activity; never includes the process id. */
|
|
35
|
+
readonly activity?: Omit<OmbSessionActivity, "pid">;
|
|
36
|
+
readonly nativeId?: string;
|
|
37
|
+
/** OMP session pids are strings in `OmbSessionInfo`; keep that shape. */
|
|
38
|
+
readonly pid?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SessionsInventory {
|
|
41
|
+
readonly authority: {
|
|
42
|
+
readonly known: boolean;
|
|
43
|
+
readonly reason?: string;
|
|
44
|
+
};
|
|
45
|
+
readonly sessions: readonly SessionsInventorySession[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* One scan, one authority value.
|
|
49
|
+
*
|
|
50
|
+
* An earlier version probed authority and then listed sessions separately. That
|
|
51
|
+
* is wrong: if the multiplexer changes state between the two probes, the
|
|
52
|
+
* payload can claim `authority.known: true` alongside an empty list, which is
|
|
53
|
+
* exactly the "blank every row on a transient restart" failure the field
|
|
54
|
+
* exists to prevent. `requireMultiplexer` makes the listing itself fail
|
|
55
|
+
* closed, so authority and data are always the same observation.
|
|
56
|
+
*/
|
|
57
|
+
export declare function collectSessionsInventory(cwd?: string, env?: NodeJS.ProcessEnv, options?: {
|
|
58
|
+
readonly scope?: "project" | "all";
|
|
59
|
+
}): Promise<SessionsInventory>;
|
|
60
|
+
export declare function runSessionsCommand(cwd: string, args: string[], env: NodeJS.ProcessEnv): Promise<number>;
|
|
61
|
+
/** Mobile ownership controls live under the mobile command family. */
|
|
62
|
+
export declare function runMobileSessionsCommand(cwd: string, args: string[], env: NodeJS.ProcessEnv): Promise<number>;
|
|
63
|
+
export declare const MOBILE_SESSIONS_USAGE = "omb mobile sessions <list|claims|claim|release> [options]\n\n list List OMB sessions across projects (add --project for this directory only).\n claims List outstanding mobile ownership claims.\n claim <name> <generation> [--owner <label>] [--holder-pid <pid>] [--json]\n Claim one stopped session generation for the mobile host.\n release <claim-id> [--json]\n Release a mobile ownership claim.\n\n Claims require an exact generation and confirmed stopped, unattached session.\n A session with a live local owner is refused.\n";
|
|
64
|
+
//# sourceMappingURL=omb-sessions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omb-sessions.d.ts","sourceRoot":"","sources":["../../src/cli/omb-sessions.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,cAAc,slBAWjB,CAAC;AAEX,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WA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