@descryy/runtime-orchestrator 0.3.0 → 0.4.0

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.
Files changed (46) hide show
  1. package/LICENSE +6 -0
  2. package/dist/attach-to-running-jvm-process.d.ts +45 -98
  3. package/dist/attach-to-running-jvm-process.d.ts.map +1 -1
  4. package/dist/attach-to-running-jvm-process.js +206 -136
  5. package/dist/attach-to-running-jvm-process.js.map +1 -1
  6. package/dist/attach-to-running-node-process.d.ts +45 -103
  7. package/dist/attach-to-running-node-process.d.ts.map +1 -1
  8. package/dist/attach-to-running-node-process.js +90 -115
  9. package/dist/attach-to-running-node-process.js.map +1 -1
  10. package/dist/attach-to-running-process.d.ts +32 -70
  11. package/dist/attach-to-running-process.d.ts.map +1 -1
  12. package/dist/attach-to-running-process.js +26 -54
  13. package/dist/attach-to-running-process.js.map +1 -1
  14. package/dist/cdp-client.d.ts +8 -18
  15. package/dist/cdp-client.d.ts.map +1 -1
  16. package/dist/cdp-client.js +9 -22
  17. package/dist/cdp-client.js.map +1 -1
  18. package/dist/cgroup-partial-restriction.d.ts +42 -89
  19. package/dist/cgroup-partial-restriction.d.ts.map +1 -1
  20. package/dist/cgroup-partial-restriction.js +44 -91
  21. package/dist/cgroup-partial-restriction.js.map +1 -1
  22. package/dist/collector-version.d.ts +3 -8
  23. package/dist/collector-version.d.ts.map +1 -1
  24. package/dist/collector-version.js +3 -8
  25. package/dist/collector-version.js.map +1 -1
  26. package/dist/instrumented-execution.d.ts +30 -73
  27. package/dist/instrumented-execution.d.ts.map +1 -1
  28. package/dist/instrumented-execution.js +103 -251
  29. package/dist/instrumented-execution.js.map +1 -1
  30. package/dist/jvm-agent/build.d.ts +29 -53
  31. package/dist/jvm-agent/build.d.ts.map +1 -1
  32. package/dist/jvm-agent/build.js +34 -61
  33. package/dist/jvm-agent/build.js.map +1 -1
  34. package/dist/polling-output-source.d.ts +8 -19
  35. package/dist/polling-output-source.d.ts.map +1 -1
  36. package/dist/polling-output-source.js +14 -31
  37. package/dist/polling-output-source.js.map +1 -1
  38. package/dist/profile-backend-observation.d.ts +26 -53
  39. package/dist/profile-backend-observation.d.ts.map +1 -1
  40. package/dist/profile-backend-observation.js +26 -55
  41. package/dist/profile-backend-observation.js.map +1 -1
  42. package/dist/respawn-and-supervise.d.ts +39 -72
  43. package/dist/respawn-and-supervise.d.ts.map +1 -1
  44. package/dist/respawn-and-supervise.js +43 -84
  45. package/dist/respawn-and-supervise.js.map +1 -1
  46. package/package.json +14 -9
@@ -1,85 +1,41 @@
1
1
  /**
2
- * Retroactive attach to an already-running **Node** process, via its own
3
- * inspector protocol the specific, buildable slice
4
- * `documents/decisions-inbox/RT-attach-to-running-process-scope.md`
5
- * deliberately did not build. That entry's own "deliberately not built"
6
- * list names it directly: "Node's `SIGUSR1` inspector activation + a CDP
7
- * WebSocket client — real, but Node-only and a new protocol surface, not
8
- * built this pass." This is that pass, for Node only — the other two items
9
- * on that list (JVM Attach API, ptrace) remain out of scope, unchanged.
2
+ * Retroactive attach to an already-running **Node** process, via its own inspector
3
+ * protocol (JVM Attach API and ptrace remain out of scope, per
4
+ * `documents/decisions-inbox/RT-attach-to-running-process-scope.md`).
10
5
  *
11
- * **What makes this genuinely retroactive, unlike `attachToRunningProcess`
12
- * (the file-based sibling in this same package).** That one needs the
13
- * target to have already been told, at its own launch time, to write
14
- * output somewhere reachable (`> server.log 2>&1`) — narrower than "attach
15
- * to anything already running." This one needs nothing declared at launch:
16
- * `SIGUSR1` (POSIX only; Node's own signal handler, not something this
17
- * process installs) turns on the target's inspector **after the fact**, on
18
- * a process that was never started with `--inspect` and never expected to
19
- * be debugged. From that moment its debugger discovery endpoint is
20
- * reachable at `http://127.0.0.1:<port>/json`, by the target itself, not by
21
- * anything this collector primed in advance.
6
+ * Unlike the file-based `attachToRunningProcess`, this needs nothing declared at
7
+ * launch: `SIGUSR1` (POSIX only) turns on the target's inspector after the fact,
8
+ * making `http://127.0.0.1:<port>/json` reachable even on a process never started
9
+ * with `--inspect`.
22
10
  *
23
- * **The one real limit, disclosed rather than hidden.** `SIGUSR1` does not
24
- * report back which port the inspector actually bound Node prints
25
- * `Debugger listening on ws://host:port/<uuid>` to the target's own
26
- * *stderr*, which is exactly the channel this module's own doc (and RT-024
27
- * before it) says cannot be read for a process we did not spawn. So
28
- * discovery is: try the default port (9229, Node's own default and the one
29
- * `SIGUSR1` binds to when nothing else is already listening there), and if
30
- * a caller already knows the target was configured for a different port
31
- * (`--inspect-port`, `NODE_OPTIONS`), they supply it. **If the port is
32
- * genuinely unknown and is not 9229, this module cannot discover it** — not
33
- * attempted, not guessed at by scanning a port range, which would risk
34
- * attaching to the wrong process's inspector entirely.
11
+ * **Disclosed limit:** `SIGUSR1` doesn't report which port the inspector bound
12
+ * Node prints that to the target's own stderr, unreadable for a process we didn't
13
+ * spawn (RT-024). So discovery tries the default port (9229) unless the caller
14
+ * supplies `discoveryPort`; a genuinely unknown non-default port cannot be
15
+ * discovered (not guessed at by port-scanning, which risks attaching to the wrong
16
+ * process).
35
17
  *
36
- * **CDP client: written here, not reused, because nothing reusable
37
- * exists.** `packages/browser`'s console collector speaks CDP only through
38
- * Playwright's own browser-automation abstraction (`page.on("console")`),
39
- * which assumes a `Target`/`Page`-domain browser session — a Node inspector
40
- * session has neither domain, being a single top-level `Runtime` session
41
- * instead. `cdp-client.ts` in this package is the actual reusable piece:
42
- * protocol-family-generic, so a future browser-side raw-CDP need could
43
- * reuse it too, instead of a third client getting written.
18
+ * CDP client is `cdp-client.ts`, not Playwright's console API, which assumes a
19
+ * Target/Page-domain session a Node inspector doesn't have (see that file).
44
20
  *
45
- * **Measured: a freshly-spawned target has a brief window, sometimes under
46
- * 100ms, before Node installs its own `SIGUSR1` handler** a signal sent
47
- * inside that window hits POSIX's default action for an unhandled
48
- * `SIGUSR1` (terminate) instead of toggling the inspector, killing the
49
- * target rather than attaching to it. Irrelevant to this module's actual
50
- * purpose — attaching to something genuinely already running, which by
51
- * definition has been alive far longer than that window — but real, and
52
- * worth naming for a caller tempted to attach immediately after spawning
53
- * something themselves.
21
+ * **Measured:** a freshly-spawned target has a brief window (sometimes under
22
+ * 100ms) before Node installs its `SIGUSR1` handler; a signal sent inside it hits
23
+ * POSIX's default terminate action instead of toggling the inspector. Irrelevant
24
+ * to attaching to something already running, but real for a caller attaching
25
+ * right after spawning.
54
26
  *
55
- * **Measured side effect: attaching changes the target's crash behaviour.**
56
- * Once a CDP client is connected, V8 no longer terminates the process
57
- * immediately on an uncaught exception it prints "Waiting for the
58
- * debugger to disconnect..." to stderr and blocks, exactly as it would
59
- * under a launched `--inspect-brk` session, so a human debugger gets to
60
- * inspect the paused, crashed state before the process actually exits.
61
- * Measured directly (a naive test that waited for the child's own `exit`
62
- * event after attach hung indefinitely) rather than assumed from docs. This
63
- * is standard CDP/V8 behaviour, not a defect this collector introduces, and
64
- * not silently worked around: the process resumes its exit exactly when
65
- * `stop()` closes the CDP session, which is also when the exception's own
66
- * evidence has already been captured, so nothing about the timing costs a
67
- * caller the evidence. A caller relying on "did the target exit yet?" as a
68
- * signal must call `stop()` first.
27
+ * **Measured side effect:** once CDP connects, V8 no longer terminates on an
28
+ * uncaught exception it blocks ("Waiting for the debugger to disconnect...")
29
+ * exactly as under `--inspect-brk`, until `stop()` closes the session. Standard
30
+ * CDP/V8 behaviour, not worked around; a caller checking "did the target exit
31
+ * yet?" must call `stop()` first.
69
32
  *
70
- * **What is captured, and under which vocabulary.** `Runtime.consoleAPICalled`
71
- * `CONSOLE_MESSAGE`, `Runtime.exceptionThrown` `EXCEPTION` — the same
72
- * two `RuntimeEventType`s `browser-console-collector.ts` already claims for
73
- * the analogous browser-page concepts, because they are the same concepts
74
- * (console output; an uncaught exception), observed on a different kind of
75
- * process. `source: "backend-process"`, not a new source value — this is a
76
- * backend process being observed, and `EvidenceSource` already names what
77
- * was observed rather than which mechanism did it (`inbound-proxy.ts`'s own
78
- * precedent, restated there for exactly this reason). `capabilities()`
79
- * reports `backendLogAccess`, not `consoleObservation` — `consoleObservation`
80
- * is `browser-console-collector`'s claim on a *browser page's* console,
81
- * kept apart from a backend process's console the same way `LogCollector`
82
- * already keeps them apart for its own text-based capture.
33
+ * **Vocabulary:** `Runtime.consoleAPICalled`→`CONSOLE_MESSAGE`,
34
+ * `Runtime.exceptionThrown`→`EXCEPTION`, same `RuntimeEventType`s
35
+ * `browser-console-collector.ts` uses for the browser-page analogues.
36
+ * `source: "backend-process"` (not a new value `EvidenceSource` names what was
37
+ * observed, not the mechanism). `capabilities()` reports `backendLogAccess`, not
38
+ * `consoleObservation` (reserved for a browser page's console).
83
39
  */
84
40
  import type { Collector } from "@descryy/runtime-contracts";
85
41
  export interface AttachToRunningNodeProcessOptions {
@@ -89,28 +45,19 @@ export interface AttachToRunningNodeProcessOptions {
89
45
  readonly service?: string;
90
46
  /** Node's own default inspector bind address. Overridable for a target known to bind elsewhere. */
91
47
  readonly discoveryHost?: string;
92
- /**
93
- * Node's own default inspector port, and the only one `SIGUSR1` reliably
94
- * produces on an unmodified target. See this file's own module doc for
95
- * why a non-default port cannot be discovered from outside and must be
96
- * supplied here when known.
97
- */
48
+ /** Node's default inspector port — the only one `SIGUSR1` reliably produces on an unmodified target. See module doc: a non-default port must be supplied here. */
98
49
  readonly discoveryPort?: number;
99
50
  /** How long to poll the discovery endpoint after sending SIGUSR1 before giving up. The inspector does not bind instantaneously. */
100
51
  readonly discoveryTimeoutMs?: number;
101
52
  }
102
53
  /**
103
54
  * Sends `SIGUSR1` to `pid`, then polls `http://<host>:<port>/json` until the
104
- * target's inspector answers or `timeoutMs` elapses. Resolves with the
105
- * `webSocketDebuggerUrl` of the first entry an already-running Node
106
- * process presents exactly one inspectable target for its main thread,
107
- * unlike a browser's `/json`, which lists one entry per open tab.
55
+ * inspector answers or `timeoutMs` elapses. Resolves with the first entry's
56
+ * `webSocketDebuggerUrl` a Node process presents exactly one inspectable
57
+ * target, unlike a browser's `/json` (one per tab).
108
58
  *
109
- * Rejects, naming the exact blocker, rather than hanging or guessing: a pid
110
- * that was never alive, a POSIX-only signal on a non-POSIX platform, or a
111
- * port that never answers (most often because the real inspector bound
112
- * somewhere other than `port`, which this function has no way to learn —
113
- * see the module doc).
59
+ * Rejects naming the exact blocker rather than hanging or guessing: dead pid,
60
+ * non-POSIX platform, or a port that never answers (see module doc).
114
61
  */
115
62
  export declare function discoverNodeInspectorUrl(pid: number, options?: {
116
63
  readonly host?: string;
@@ -118,21 +65,16 @@ export declare function discoverNodeInspectorUrl(pid: number, options?: {
118
65
  readonly timeoutMs?: number;
119
66
  }): Promise<string>;
120
67
  /**
121
- * Attach to an already-running Node process via `SIGUSR1` + CDP, and start
122
- * capturing `CONSOLE_MESSAGE`/`EXCEPTION` evidence from that moment forward.
68
+ * Attach to an already-running Node process via `SIGUSR1` + CDP, capturing
69
+ * `CONSOLE_MESSAGE`/`EXCEPTION` evidence from that moment forward.
123
70
  *
124
- * **Retroactive, not historical.** Anything the target logged or threw
125
- * *before* this attaches is gone `SIGUSR1` turns the inspector on, it
126
- * does not hand over a backlog. `attachToRunningProcess` (the file-based
127
- * sibling) is the one that can recover pre-attach lines, and only because a
128
- * file on disk already held them; nothing analogous exists for CDP, which
129
- * is a live event stream with no buffer of its own.
71
+ * **Retroactive, not historical.** Anything logged or thrown before attach is
72
+ * gone CDP is a live event stream with no buffer of its own (unlike the
73
+ * file-based `attachToRunningProcess`, which recovers pre-attach lines from disk).
130
74
  *
131
- * Discovery and connection happen inside `start()`, not here matching
132
- * every other `Collector` in this repo (`createBrowserConsoleCollector`,
133
- * `createTestRunnerCollector`): a routine failure to attach resolves as
134
- * `{ available: false, reason }`, never a thrown exception a caller has to
135
- * remember to catch.
75
+ * Discovery/connection happen inside `start()`, matching every other `Collector`
76
+ * here: a routine failure resolves as `{ available: false, reason }`, never a
77
+ * thrown exception.
136
78
  */
137
79
  export declare function attachToRunningNodeProcess(options: AttachToRunningNodeProcessOptions): Collector;
138
80
  //# sourceMappingURL=attach-to-running-node-process.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attach-to-running-node-process.d.ts","sourceRoot":"","sources":["../src/attach-to-running-node-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAyG,MAAM,4BAA4B,CAAC;AAMnK,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uIAAuI;IACvI,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,mGAAmG;IACnG,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,mIAAmI;IACnI,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAOD;;;;;;;;;;;;GAYG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5F,OAAO,CAAC,MAAM,CAAC,CAyCjB;AA6ED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iCAAiC,GAAG,SAAS,CAqHhG"}
1
+ {"version":3,"file":"attach-to-running-node-process.d.ts","sourceRoot":"","sources":["../src/attach-to-running-node-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAyG,MAAM,4BAA4B,CAAC;AAsCnK,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uIAAuI;IACvI,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,mGAAmG;IACnG,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,kKAAkK;IAClK,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,mIAAmI;IACnI,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC;AAOD;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5F,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAsED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iCAAiC,GAAG,SAAS,CAmHhG"}
@@ -1,101 +1,85 @@
1
1
  /**
2
- * Retroactive attach to an already-running **Node** process, via its own
3
- * inspector protocol the specific, buildable slice
4
- * `documents/decisions-inbox/RT-attach-to-running-process-scope.md`
5
- * deliberately did not build. That entry's own "deliberately not built"
6
- * list names it directly: "Node's `SIGUSR1` inspector activation + a CDP
7
- * WebSocket client — real, but Node-only and a new protocol surface, not
8
- * built this pass." This is that pass, for Node only — the other two items
9
- * on that list (JVM Attach API, ptrace) remain out of scope, unchanged.
2
+ * Retroactive attach to an already-running **Node** process, via its own inspector
3
+ * protocol (JVM Attach API and ptrace remain out of scope, per
4
+ * `documents/decisions-inbox/RT-attach-to-running-process-scope.md`).
10
5
  *
11
- * **What makes this genuinely retroactive, unlike `attachToRunningProcess`
12
- * (the file-based sibling in this same package).** That one needs the
13
- * target to have already been told, at its own launch time, to write
14
- * output somewhere reachable (`> server.log 2>&1`) — narrower than "attach
15
- * to anything already running." This one needs nothing declared at launch:
16
- * `SIGUSR1` (POSIX only; Node's own signal handler, not something this
17
- * process installs) turns on the target's inspector **after the fact**, on
18
- * a process that was never started with `--inspect` and never expected to
19
- * be debugged. From that moment its debugger discovery endpoint is
20
- * reachable at `http://127.0.0.1:<port>/json`, by the target itself, not by
21
- * anything this collector primed in advance.
6
+ * Unlike the file-based `attachToRunningProcess`, this needs nothing declared at
7
+ * launch: `SIGUSR1` (POSIX only) turns on the target's inspector after the fact,
8
+ * making `http://127.0.0.1:<port>/json` reachable even on a process never started
9
+ * with `--inspect`.
22
10
  *
23
- * **The one real limit, disclosed rather than hidden.** `SIGUSR1` does not
24
- * report back which port the inspector actually bound Node prints
25
- * `Debugger listening on ws://host:port/<uuid>` to the target's own
26
- * *stderr*, which is exactly the channel this module's own doc (and RT-024
27
- * before it) says cannot be read for a process we did not spawn. So
28
- * discovery is: try the default port (9229, Node's own default and the one
29
- * `SIGUSR1` binds to when nothing else is already listening there), and if
30
- * a caller already knows the target was configured for a different port
31
- * (`--inspect-port`, `NODE_OPTIONS`), they supply it. **If the port is
32
- * genuinely unknown and is not 9229, this module cannot discover it** — not
33
- * attempted, not guessed at by scanning a port range, which would risk
34
- * attaching to the wrong process's inspector entirely.
11
+ * **Disclosed limit:** `SIGUSR1` doesn't report which port the inspector bound
12
+ * Node prints that to the target's own stderr, unreadable for a process we didn't
13
+ * spawn (RT-024). So discovery tries the default port (9229) unless the caller
14
+ * supplies `discoveryPort`; a genuinely unknown non-default port cannot be
15
+ * discovered (not guessed at by port-scanning, which risks attaching to the wrong
16
+ * process).
35
17
  *
36
- * **CDP client: written here, not reused, because nothing reusable
37
- * exists.** `packages/browser`'s console collector speaks CDP only through
38
- * Playwright's own browser-automation abstraction (`page.on("console")`),
39
- * which assumes a `Target`/`Page`-domain browser session — a Node inspector
40
- * session has neither domain, being a single top-level `Runtime` session
41
- * instead. `cdp-client.ts` in this package is the actual reusable piece:
42
- * protocol-family-generic, so a future browser-side raw-CDP need could
43
- * reuse it too, instead of a third client getting written.
18
+ * CDP client is `cdp-client.ts`, not Playwright's console API, which assumes a
19
+ * Target/Page-domain session a Node inspector doesn't have (see that file).
44
20
  *
45
- * **Measured: a freshly-spawned target has a brief window, sometimes under
46
- * 100ms, before Node installs its own `SIGUSR1` handler** a signal sent
47
- * inside that window hits POSIX's default action for an unhandled
48
- * `SIGUSR1` (terminate) instead of toggling the inspector, killing the
49
- * target rather than attaching to it. Irrelevant to this module's actual
50
- * purpose — attaching to something genuinely already running, which by
51
- * definition has been alive far longer than that window — but real, and
52
- * worth naming for a caller tempted to attach immediately after spawning
53
- * something themselves.
21
+ * **Measured:** a freshly-spawned target has a brief window (sometimes under
22
+ * 100ms) before Node installs its `SIGUSR1` handler; a signal sent inside it hits
23
+ * POSIX's default terminate action instead of toggling the inspector. Irrelevant
24
+ * to attaching to something already running, but real for a caller attaching
25
+ * right after spawning.
54
26
  *
55
- * **Measured side effect: attaching changes the target's crash behaviour.**
56
- * Once a CDP client is connected, V8 no longer terminates the process
57
- * immediately on an uncaught exception it prints "Waiting for the
58
- * debugger to disconnect..." to stderr and blocks, exactly as it would
59
- * under a launched `--inspect-brk` session, so a human debugger gets to
60
- * inspect the paused, crashed state before the process actually exits.
61
- * Measured directly (a naive test that waited for the child's own `exit`
62
- * event after attach hung indefinitely) rather than assumed from docs. This
63
- * is standard CDP/V8 behaviour, not a defect this collector introduces, and
64
- * not silently worked around: the process resumes its exit exactly when
65
- * `stop()` closes the CDP session, which is also when the exception's own
66
- * evidence has already been captured, so nothing about the timing costs a
67
- * caller the evidence. A caller relying on "did the target exit yet?" as a
68
- * signal must call `stop()` first.
27
+ * **Measured side effect:** once CDP connects, V8 no longer terminates on an
28
+ * uncaught exception it blocks ("Waiting for the debugger to disconnect...")
29
+ * exactly as under `--inspect-brk`, until `stop()` closes the session. Standard
30
+ * CDP/V8 behaviour, not worked around; a caller checking "did the target exit
31
+ * yet?" must call `stop()` first.
69
32
  *
70
- * **What is captured, and under which vocabulary.** `Runtime.consoleAPICalled`
71
- * `CONSOLE_MESSAGE`, `Runtime.exceptionThrown` `EXCEPTION` — the same
72
- * two `RuntimeEventType`s `browser-console-collector.ts` already claims for
73
- * the analogous browser-page concepts, because they are the same concepts
74
- * (console output; an uncaught exception), observed on a different kind of
75
- * process. `source: "backend-process"`, not a new source value — this is a
76
- * backend process being observed, and `EvidenceSource` already names what
77
- * was observed rather than which mechanism did it (`inbound-proxy.ts`'s own
78
- * precedent, restated there for exactly this reason). `capabilities()`
79
- * reports `backendLogAccess`, not `consoleObservation` — `consoleObservation`
80
- * is `browser-console-collector`'s claim on a *browser page's* console,
81
- * kept apart from a backend process's console the same way `LogCollector`
82
- * already keeps them apart for its own text-based capture.
33
+ * **Vocabulary:** `Runtime.consoleAPICalled`→`CONSOLE_MESSAGE`,
34
+ * `Runtime.exceptionThrown`→`EXCEPTION`, same `RuntimeEventType`s
35
+ * `browser-console-collector.ts` uses for the browser-page analogues.
36
+ * `source: "backend-process"` (not a new value `EvidenceSource` names what was
37
+ * observed, not the mechanism). `capabilities()` reports `backendLogAccess`, not
38
+ * `consoleObservation` (reserved for a browser page's console).
83
39
  */
40
+ import { spawnSync } from "node:child_process";
84
41
  import { connectCdp } from "./cdp-client.js";
85
42
  import { isProcessAlive } from "./attach-to-running-process.js";
86
43
  import { COLLECTOR_VERSION } from "./collector-version.js";
44
+ /**
45
+ * A-F10: verifies `pid` is owned by this process's own user AND looks like a
46
+ * Node process, BEFORE `SIGUSR1` is sent — a wrong-kind pid with no handler hits
47
+ * POSIX's default terminate action; `isProcessAlive` alone doesn't rule that out.
48
+ *
49
+ * Uses `ps -o uid=,comm= -p <pid>` rather than `/proc/<pid>` since this module is
50
+ * POSIX-only and `ps` works on both Linux and macOS. Refuses rather than guesses
51
+ * when `ps` itself can't answer.
52
+ *
53
+ * Same-user, not same-session: the kernel lets any same-user process signal any
54
+ * other, so this check is the only backstop for `SIGUSR1` — unlike HotSpot's
55
+ * attach socket (the JVM sibling), which enforces uid at the OS level itself.
56
+ */
57
+ function verifyLikelyNodeProcessOwnedBySelf(pid) {
58
+ const result = spawnSync("ps", ["-o", "uid=,comm=", "-p", String(pid)], { encoding: "utf8" });
59
+ const line = (result.stdout ?? "").trim().split("\n")[0]?.trim();
60
+ if (result.status !== 0 || line === undefined || line === "") {
61
+ return { ok: false, reason: `could not verify pid ${String(pid)}'s owner/command via ps (exit ${String(result.status)}) — refusing to signal a process this module cannot confirm the identity of` };
62
+ }
63
+ const [uidField, ...commFields] = line.split(/\s+/);
64
+ const uid = Number(uidField);
65
+ const comm = commFields.join(" ").toLowerCase();
66
+ const ownUid = process.getuid?.();
67
+ if (ownUid !== undefined && uid !== ownUid) {
68
+ return { ok: false, reason: `pid ${String(pid)} is owned by uid ${String(uid)}, not this process's own uid ${String(ownUid)} — refusing to signal a process this session does not own` };
69
+ }
70
+ if (!comm.includes("node")) {
71
+ return { ok: false, reason: `pid ${String(pid)}'s command is "${comm}", which does not look like a Node process — refusing to send SIGUSR1 to a process that may not handle it` };
72
+ }
73
+ return { ok: true };
74
+ }
87
75
  /**
88
76
  * Sends `SIGUSR1` to `pid`, then polls `http://<host>:<port>/json` until the
89
- * target's inspector answers or `timeoutMs` elapses. Resolves with the
90
- * `webSocketDebuggerUrl` of the first entry an already-running Node
91
- * process presents exactly one inspectable target for its main thread,
92
- * unlike a browser's `/json`, which lists one entry per open tab.
77
+ * inspector answers or `timeoutMs` elapses. Resolves with the first entry's
78
+ * `webSocketDebuggerUrl` a Node process presents exactly one inspectable
79
+ * target, unlike a browser's `/json` (one per tab).
93
80
  *
94
- * Rejects, naming the exact blocker, rather than hanging or guessing: a pid
95
- * that was never alive, a POSIX-only signal on a non-POSIX platform, or a
96
- * port that never answers (most often because the real inspector bound
97
- * somewhere other than `port`, which this function has no way to learn —
98
- * see the module doc).
81
+ * Rejects naming the exact blocker rather than hanging or guessing: dead pid,
82
+ * non-POSIX platform, or a port that never answers (see module doc).
99
83
  */
100
84
  export async function discoverNodeInspectorUrl(pid, options = {}) {
101
85
  if (!isProcessAlive(pid)) {
@@ -104,6 +88,11 @@ export async function discoverNodeInspectorUrl(pid, options = {}) {
104
88
  if (process.platform === "win32") {
105
89
  throw new Error("discoverNodeInspectorUrl: SIGUSR1 inspector activation is POSIX-only; not available on win32.");
106
90
  }
91
+ // A-F10: verified BEFORE the signal — a wrong pid must never reach process.kill
92
+ const identity = verifyLikelyNodeProcessOwnedBySelf(pid);
93
+ if (!identity.ok) {
94
+ throw new Error(`discoverNodeInspectorUrl: ${identity.reason}.`);
95
+ }
107
96
  const host = options.host ?? "127.0.0.1";
108
97
  const port = options.port ?? 9229;
109
98
  const timeoutMs = options.timeoutMs ?? 5000;
@@ -135,7 +124,7 @@ export async function discoverNodeInspectorUrl(pid, options = {}) {
135
124
  "process, or the target was itself configured with --inspect-port/NODE_OPTIONS) — this module cannot discover a " +
136
125
  "non-default port from outside; a caller who knows the real port must supply discoveryPort.");
137
126
  }
138
- /** A `file://` URL is decoded to a plain filesystem path every other adapter in this repo reports a path, never a URL, and CDP is the only source in this file that starts with one. Anything else (`node:internal/timers`, a bare module specifier) is passed through verbatim, the same "kept, not filtered" treatment `adapter-rust`'s std/core frames get. */
127
+ /** Decodes a `file://` URL to a plain filesystem path, matching every other adapter's convention. Anything else is passed through verbatim. */
139
128
  function pathFromCdpUrl(url) {
140
129
  if (url === undefined || url === "")
141
130
  return null;
@@ -148,16 +137,14 @@ function pathFromCdpUrl(url) {
148
137
  return url;
149
138
  }
150
139
  }
151
- /** CDP reports 0-based line/column; every other location in this codebase is 1-based (source lines as an editor shows them). Converted here, once, rather than left for a reader to notice CDP is the one odd source. */
140
+ /** CDP reports 0-based line/column; converted to this codebase's 1-based convention here, once. */
152
141
  function locationFromCallFrame(frame) {
153
142
  return {
154
143
  file: pathFromCdpUrl(frame.url),
155
144
  line: typeof frame.lineNumber === "number" ? frame.lineNumber + 1 : null,
156
145
  column: typeof frame.columnNumber === "number" ? frame.columnNumber + 1 : null,
157
146
  functionName: frame.functionName !== undefined && frame.functionName !== "" ? frame.functionName : null,
158
- // V8's own reported state, captured live off the running process the
159
- // same class a Python traceback or Ruby backtrace gets, never a side
160
- // artifact this collector resolved through.
147
+ // V8's own reported state, captured live -- never a side artifact resolved through
161
148
  reliability: "self-contained",
162
149
  resolvedVia: null,
163
150
  };
@@ -178,19 +165,14 @@ function notThisCollectorsJob(what) {
178
165
  }
179
166
  const CAPABILITIES = {
180
167
  domObservation: notThisCollectorsJob("DOM inspection"),
181
- // Reserved for a browser page's console (browser-console-collector.ts's
182
- // own claim); this observes a backend process's, reported under
183
- // backendLogAccess instead, matching LogCollector's own split.
168
+ // reserved for a browser page's console; this is a backend process's, reported
169
+ // under backendLogAccess instead, matching LogCollector's own split
184
170
  consoleObservation: notThisCollectorsJob("a browser page's console"),
185
171
  networkObservation: notThisCollectorsJob("network traffic"),
186
172
  backendLogAccess: { availability: "available", reason: null },
187
173
  distributedTrace: notThisCollectorsJob("trace-id/request-id correlation — CDP's Runtime domain carries no such fields to extract"),
188
- // Self-contained, from V8's own reported call-frame state, the same
189
- // standing Go's/Rust's/Ruby's own rows already have never a side
190
- // artifact this collector resolved through. A target running compiled or
191
- // bundled output would still report positions in that output verbatim,
192
- // the same honest limit every self-contained-reliability adapter in this
193
- // repo carries, not something specific to Node inspector observation.
174
+ // self-contained reliability: a bundled/compiled target still reports positions
175
+ // in that output verbatim, same limit every self-contained adapter carries
194
176
  sourceMapping: { availability: "available", reason: null },
195
177
  stackCapture: { availability: "available", reason: null },
196
178
  processLifecycle: notThisCollectorsJob("process lifecycle — spawn/ready/exit are ProcessCollector's to observe"),
@@ -198,21 +180,16 @@ const CAPABILITIES = {
198
180
  externalServiceObservation: notThisCollectorsJob("outbound external requests"),
199
181
  };
200
182
  /**
201
- * Attach to an already-running Node process via `SIGUSR1` + CDP, and start
202
- * capturing `CONSOLE_MESSAGE`/`EXCEPTION` evidence from that moment forward.
183
+ * Attach to an already-running Node process via `SIGUSR1` + CDP, capturing
184
+ * `CONSOLE_MESSAGE`/`EXCEPTION` evidence from that moment forward.
203
185
  *
204
- * **Retroactive, not historical.** Anything the target logged or threw
205
- * *before* this attaches is gone `SIGUSR1` turns the inspector on, it
206
- * does not hand over a backlog. `attachToRunningProcess` (the file-based
207
- * sibling) is the one that can recover pre-attach lines, and only because a
208
- * file on disk already held them; nothing analogous exists for CDP, which
209
- * is a live event stream with no buffer of its own.
186
+ * **Retroactive, not historical.** Anything logged or thrown before attach is
187
+ * gone CDP is a live event stream with no buffer of its own (unlike the
188
+ * file-based `attachToRunningProcess`, which recovers pre-attach lines from disk).
210
189
  *
211
- * Discovery and connection happen inside `start()`, not here matching
212
- * every other `Collector` in this repo (`createBrowserConsoleCollector`,
213
- * `createTestRunnerCollector`): a routine failure to attach resolves as
214
- * `{ available: false, reason }`, never a thrown exception a caller has to
215
- * remember to catch.
190
+ * Discovery/connection happen inside `start()`, matching every other `Collector`
191
+ * here: a routine failure resolves as `{ available: false, reason }`, never a
192
+ * thrown exception.
216
193
  */
217
194
  export function attachToRunningNodeProcess(options) {
218
195
  let session = null;
@@ -271,10 +248,8 @@ export function attachToRunningNodeProcess(options) {
271
248
  : (details.text ?? "Uncaught exception");
272
249
  const callFrames = details.stackTrace?.callFrames ?? [];
273
250
  const frames = callFrames.map((frame) => ({ location: locationFromCallFrame(frame), raw: `${frame.functionName ?? "<anonymous>"} (${frame.url ?? ""}:${String(frame.lineNumber)}:${String(frame.columnNumber)})` }));
274
- // No frames from CDP means the throw site itself (url/lineNumber
275
- // directly on exceptionDetails) is the only location available —
276
- // still real, so it becomes a synthetic one-frame trace rather than
277
- // being discarded.
251
+ // no frames from CDP: fall back to the throw site itself as a synthetic
252
+ // one-frame trace rather than discarding it
278
253
  const stackTrace = frames.length > 0
279
254
  ? { fidelity: "synchronous", frames, primaryFrameIndex: 0 }
280
255
  : {
@@ -1 +1 @@
1
- {"version":3,"file":"attach-to-running-node-process.js","sourceRoot":"","sources":["../src/attach-to-running-node-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkFG;AAIH,OAAO,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAyB3D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,GAAW,EACX,UAA2F,EAAE;IAE7F,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAC;IAClI,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;IACnH,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,WAAW,CAAC;IACzC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC;IAC5C,MAAM,YAAY,GAAG,UAAU,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;IAE3D,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE7B,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IACxC,IAAI,SAAS,GAAY,IAAI,CAAC;IAC9B,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,CAA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