@cline/core 0.0.74-nightly.1786676845 → 0.0.75
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/extensions/plugin/plugin-sandbox.d.ts +8 -0
- package/dist/extensions/plugin-sandbox-bootstrap.js +1 -1
- package/dist/hub/daemon/entry.js +168 -168
- package/dist/hub/index.js +168 -168
- package/dist/index.js +173 -173
- package/dist/runtime/tools/subprocess-sandbox-lifecycle.d.ts +9 -0
- package/dist/runtime/tools/subprocess-sandbox.d.ts +19 -0
- package/package.json +4 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const MAX_NODE_TIMER_DELAY_MS = 2147483647;
|
|
2
|
+
type ParentProcess = {
|
|
3
|
+
once(event: "disconnect", listener: () => void): unknown;
|
|
4
|
+
exit(code: number): unknown;
|
|
5
|
+
};
|
|
6
|
+
export declare function normalizeIdleTimeoutMs(timeoutMs: number | undefined): number | undefined;
|
|
7
|
+
/** Ensure an IPC child cannot survive the process that owns it. */
|
|
8
|
+
export declare function installParentDisconnectGuard(target?: ParentProcess): void;
|
|
9
|
+
export {};
|
|
@@ -5,6 +5,11 @@ export interface SubprocessSandboxOptions {
|
|
|
5
5
|
bootstrapFile?: string;
|
|
6
6
|
/** Runtime executable for internal JavaScript helpers. Defaults to node/bun instead of packaged CLI binaries. */
|
|
7
7
|
runtimeExecutable?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Shut down the child after this many milliseconds with no calls in flight.
|
|
10
|
+
* The next call starts a fresh child transparently. Disabled when omitted.
|
|
11
|
+
*/
|
|
12
|
+
idleTimeoutMs?: number;
|
|
8
13
|
name?: string;
|
|
9
14
|
onEvent?: (event: {
|
|
10
15
|
name: string;
|
|
@@ -29,15 +34,29 @@ export declare function buildSubprocessSandboxCommand(args: string[], options?:
|
|
|
29
34
|
}): string[];
|
|
30
35
|
export declare class SubprocessSandbox {
|
|
31
36
|
private readonly options;
|
|
37
|
+
private readonly idleTimeoutMs;
|
|
32
38
|
private process;
|
|
33
39
|
private requestCounter;
|
|
34
40
|
private readonly pending;
|
|
41
|
+
private idleTimer;
|
|
42
|
+
private readonly shutdowns;
|
|
35
43
|
constructor(options: SubprocessSandboxOptions);
|
|
36
44
|
private get processLabel();
|
|
37
45
|
private clearPendingRequest;
|
|
46
|
+
private clearIdleTimer;
|
|
47
|
+
private hasPendingRequests;
|
|
48
|
+
/**
|
|
49
|
+
* The parent is the sole idle-lifecycle authority. A matching child-side
|
|
50
|
+
* deadline can fire just before this timer and drop a newly dispatched RPC.
|
|
51
|
+
* Children should independently handle only parent IPC disconnection.
|
|
52
|
+
*/
|
|
53
|
+
private armIdleTimer;
|
|
38
54
|
start(): void;
|
|
39
55
|
call<TResult = unknown>(method: string, args: unknown, options?: SandboxCallOptions): Promise<TResult>;
|
|
40
56
|
shutdown(): Promise<void>;
|
|
57
|
+
private shutdownProcess;
|
|
58
|
+
private terminateProcess;
|
|
41
59
|
private onMessage;
|
|
60
|
+
private failPendingForProcess;
|
|
42
61
|
private failPending;
|
|
43
62
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cline/core",
|
|
3
3
|
"description": "Cline Core SDK for Node Runtime",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.75",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/cline/cline",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"test:watch": "vitest --config vitest.config.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@cline/agents": "0.0.
|
|
53
|
-
"@cline/shared": "0.0.
|
|
54
|
-
"@cline/llms": "0.0.
|
|
52
|
+
"@cline/agents": "0.0.75",
|
|
53
|
+
"@cline/shared": "0.0.75",
|
|
54
|
+
"@cline/llms": "0.0.75",
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
56
|
"@opentelemetry/api": "^1.9.0",
|
|
57
57
|
"@opentelemetry/api-logs": "^0.214.0",
|