@openge/forge-process-control 0.1.0-rc.1 → 0.1.0-rc.2
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 +3 -2
- package/dist/contracts.d.ts +17 -1
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,8 +17,9 @@ const selected = selectTcpListeners(discoveredListeners, { ports: [3000, 5173] }
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
The Core package defines process identities using both PID and a stable start
|
|
20
|
-
token, TCP listener records, explicit
|
|
21
|
-
|
|
20
|
+
token, process descriptors, TCP listener records, explicit single-process and
|
|
21
|
+
process-tree termination policies, Provider contracts, stable selection, and
|
|
22
|
+
structured errors. It performs no operating-system I/O.
|
|
22
23
|
|
|
23
24
|
Process launch, service ownership, platform selection, recovery policy, and
|
|
24
25
|
user-facing diagnostics remain with the consumer.
|
package/dist/contracts.d.ts
CHANGED
|
@@ -3,10 +3,19 @@ export interface ProcessIdentity {
|
|
|
3
3
|
readonly pid: number;
|
|
4
4
|
readonly startToken: string;
|
|
5
5
|
}
|
|
6
|
+
export interface ProcessDescriptor extends ProcessIdentity {
|
|
7
|
+
readonly commandLine?: string;
|
|
8
|
+
readonly name?: string;
|
|
9
|
+
readonly parentPid?: number;
|
|
10
|
+
}
|
|
6
11
|
export interface TcpListener {
|
|
7
12
|
readonly address: string;
|
|
8
13
|
readonly port: number;
|
|
9
|
-
readonly process:
|
|
14
|
+
readonly process: ProcessDescriptor;
|
|
15
|
+
}
|
|
16
|
+
export interface ListProcessesRequest {
|
|
17
|
+
readonly pids?: readonly number[];
|
|
18
|
+
readonly signal?: AbortSignal;
|
|
10
19
|
}
|
|
11
20
|
export interface SelectTcpListenersOptions {
|
|
12
21
|
readonly ports: readonly number[];
|
|
@@ -29,12 +38,19 @@ export interface TerminateProcessTreeRequest {
|
|
|
29
38
|
readonly policy: ProcessTerminationPolicy;
|
|
30
39
|
readonly signal?: AbortSignal;
|
|
31
40
|
}
|
|
41
|
+
export interface TerminateProcessRequest {
|
|
42
|
+
readonly process: ProcessIdentity;
|
|
43
|
+
readonly policy: ProcessTerminationPolicy;
|
|
44
|
+
readonly signal?: AbortSignal;
|
|
45
|
+
}
|
|
32
46
|
export interface ProcessTerminationResult {
|
|
33
47
|
readonly forced: boolean;
|
|
34
48
|
readonly pid: number;
|
|
35
49
|
}
|
|
36
50
|
export interface ProcessControlProvider {
|
|
51
|
+
listProcesses(request?: ListProcessesRequest): Promise<readonly ProcessDescriptor[]>;
|
|
37
52
|
listTcpListeners(request?: ListTcpListenersRequest): Promise<readonly TcpListener[]>;
|
|
53
|
+
terminateProcess(request: TerminateProcessRequest): Promise<ProcessTerminationResult>;
|
|
38
54
|
terminateProcessTree(request: TerminateProcessTreeRequest): Promise<ProcessTerminationResult>;
|
|
39
55
|
}
|
|
40
56
|
export declare const processControlErrorCodes: {
|
package/dist/contracts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,O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C,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAAC;IACrF,gBAAgB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC;IACrF,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACtF,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC/F;AAED,eAAO,MAAM,wBAAwB;;;;;;;CAO3B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,OAAO,wBAAwB,CACnE,MAAM,OAAO,wBAAwB,CACtC,CAAC"}
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAiEA,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,aAAa,EAAE,gBAAgB;IAC/B,YAAY,EAAE,eAAe;IAC7B,gBAAgB,EAAE,mBAAmB;IACrC,sBAAsB,EAAE,0BAA0B;IAClD,0BAA0B,EAAE,8BAA8B;IAC1D,kBAAkB,EAAE,qBAAqB;CACjC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { processControlErrorCodes, type ListTcpListenersRequest, type ProcessControlErrorCode, type ProcessControlProvider, type ProcessIdentity, type ProcessTerminationPolicy, type ProcessTerminationResult, type SelectTcpListenersOptions, type TcpListener, type TerminateProcessTreeRequest, } from './contracts.js';
|
|
1
|
+
export { processControlErrorCodes, type ListProcessesRequest, type ListTcpListenersRequest, type ProcessControlErrorCode, type ProcessControlProvider, type ProcessDescriptor, type ProcessIdentity, type ProcessTerminationPolicy, type ProcessTerminationResult, type SelectTcpListenersOptions, type TcpListener, type TerminateProcessRequest, type TerminateProcessTreeRequest, } from './contracts.js';
|
|
2
2
|
export { ProcessControlError } from './errors.js';
|
|
3
3
|
export { selectTcpListeners } from './listeners.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAazB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED