@crouton-kit/capture 1.4.25 → 1.4.26
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/bin/capture +6 -5
- package/package.json +1 -1
- package/src/cdp/args.ts +4 -1
- package/src/cdp/commands/tab/list.ts +1 -1
package/bin/capture
CHANGED
|
@@ -10174,7 +10174,8 @@ function resolveCliContext(parsed) {
|
|
|
10174
10174
|
parsed.target = session.targetId;
|
|
10175
10175
|
parsed.targetSource = "session";
|
|
10176
10176
|
}
|
|
10177
|
-
|
|
10177
|
+
const discoveringEndpoints = parsed.command === "tab" && parsed.positional[0] === "list";
|
|
10178
|
+
if (parsed.port === void 0 && !discoveringEndpoints && session.port !== void 0 && session.port !== null) {
|
|
10178
10179
|
parsed.port = session.port;
|
|
10179
10180
|
parsed.portSource = "session";
|
|
10180
10181
|
}
|
|
@@ -10944,7 +10945,7 @@ function validateHarAppendBatch(value, source) {
|
|
|
10944
10945
|
return { entries, incompleteLifecycles };
|
|
10945
10946
|
}
|
|
10946
10947
|
function captureVersion() {
|
|
10947
|
-
const version = "1.4.
|
|
10948
|
+
const version = "1.4.26";
|
|
10948
10949
|
return typeof version === "string" && version.length > 0 ? version : "development";
|
|
10949
10950
|
}
|
|
10950
10951
|
function token() {
|
|
@@ -13046,7 +13047,7 @@ function wallTime(value) {
|
|
|
13046
13047
|
}
|
|
13047
13048
|
}
|
|
13048
13049
|
function captureVersion2() {
|
|
13049
|
-
const version = "1.4.
|
|
13050
|
+
const version = "1.4.26";
|
|
13050
13051
|
return typeof version === "string" && version.length > 0 ? version : "development";
|
|
13051
13052
|
}
|
|
13052
13053
|
function deepFreeze(value) {
|
|
@@ -230583,7 +230584,7 @@ var init_list = __esm({
|
|
|
230583
230584
|
USAGE11 = `capture tab list \u2014 discover CDP endpoints and list the page tabs on each.
|
|
230584
230585
|
|
|
230585
230586
|
input:
|
|
230586
|
-
--port <port> probe one endpoint only, instead of discovering every localhost CDP endpoint
|
|
230587
|
+
--port <port> probe one endpoint only, instead of discovering every localhost CDP endpoint; an active session's endpoint does not narrow it (CDP_PORT still pins one endpoint)
|
|
230587
230588
|
|
|
230588
230589
|
output: <tabs endpoints=\u2026 tabs=\u2026> \u2014 one section per reachable endpoint (port, app, page-tab count, preferred marker, and a capture-owned pid marker on any browser \`tab launch\` started) listing each page tab's target id (first 8 chars, enough for --target), title, and url; an endpoint that failed the tab fetch is an endpoints-unreachable fact, never a silent omission.
|
|
230589
230590
|
effects: probes local CDP endpoints over HTTP/WebSocket; no page-observable writes. Also sweeps capture-launched browsers, stopping any that have exited, stopped answering CDP, or gone idle \u2014 browsers capture did not start are never signalled.`;
|
|
@@ -267595,7 +267596,7 @@ I/O contract: flags and positionals on input; one rendered prose block on stdout
|
|
|
267595
267596
|
A CDP-enabled browser must be running; \`capture tab list\` is the probe, and \`capture tab launch\` starts one capture owns and reaps when nothing is (never hand-roll a detached browser \u2014 nothing reaps that). Capture never signals a browser it did not start, so attaching to your own with --port is unchanged. CDP_PORT / CDP_TARGET pin the browser + tab for target-selecting commands \u2014 precedence: explicit flag > active session > env. \`session start\` adopts only an explicit --target. When CRTR_NODE_ID is set (a crtr agent node), a browser command with no --port, no --target and no active session of that node is refused instead of falling back to CDP_PORT, CDP_TARGET or localhost discovery, because the browser found could belong to another node: run \`capture session start --url <url>\`, or pass --port or --target. \`capture tab list\` and commands that only read a recorded artifact are not refused.`;
|
|
267596
267597
|
}
|
|
267597
267598
|
function printVersion() {
|
|
267598
|
-
const declared = "1.4.
|
|
267599
|
+
const declared = "1.4.26";
|
|
267599
267600
|
if (declared) {
|
|
267600
267601
|
console.log(declared);
|
|
267601
267602
|
return;
|
package/package.json
CHANGED
package/src/cdp/args.ts
CHANGED
|
@@ -625,7 +625,10 @@ export function resolveCliContext(parsed: ParsedArgs): ParsedArgs {
|
|
|
625
625
|
// A session target is inseparable from the endpoint that created it.
|
|
626
626
|
// Prefer that endpoint over ambient CDP_PORT, but retain an explicit
|
|
627
627
|
// --port override for deliberate multi-browser work.
|
|
628
|
-
|
|
628
|
+
// `tab list` is the discovery probe: without --port it lists every
|
|
629
|
+
// localhost endpoint, so the session's endpoint must not narrow it.
|
|
630
|
+
const discoveringEndpoints = parsed.command === 'tab' && parsed.positional[0] === 'list';
|
|
631
|
+
if (parsed.port === undefined && !discoveringEndpoints && session.port !== undefined && session.port !== null) { parsed.port = session.port; parsed.portSource = 'session'; }
|
|
629
632
|
}
|
|
630
633
|
refuseUnownedEndpoint(parsed, sessionStart);
|
|
631
634
|
if (parsed.port === undefined && process.env.CDP_PORT !== undefined) {
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
const USAGE = `capture tab list — discover CDP endpoints and list the page tabs on each.
|
|
31
31
|
|
|
32
32
|
input:
|
|
33
|
-
--port <port> probe one endpoint only, instead of discovering every localhost CDP endpoint
|
|
33
|
+
--port <port> probe one endpoint only, instead of discovering every localhost CDP endpoint; an active session's endpoint does not narrow it (CDP_PORT still pins one endpoint)
|
|
34
34
|
|
|
35
35
|
output: <tabs endpoints=… tabs=…> — one section per reachable endpoint (port, app, page-tab count, preferred marker, and a capture-owned pid marker on any browser \`tab launch\` started) listing each page tab's target id (first 8 chars, enough for --target), title, and url; an endpoint that failed the tab fetch is an endpoints-unreachable fact, never a silent omission.
|
|
36
36
|
effects: probes local CDP endpoints over HTTP/WebSocket; no page-observable writes. Also sweeps capture-launched browsers, stopping any that have exited, stopped answering CDP, or gone idle — browsers capture did not start are never signalled.`;
|