@deepseek-ai/dsh-ptc-runtime-node 0.2.1-rc.4 → 0.2.2-alpha.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.i18n.yaml +29 -29
- package/README.md +57 -25
- package/README.zh.md +56 -24
- package/lib/configuration.js +24 -0
- package/lib/index.js +655 -949
- package/lib/persistent-process.js +6151 -341
- package/lib/process.js +6160 -320
- package/lib/types/bindings.d.ts +5 -6
- package/lib/types/bootstrap.d.ts +15 -62
- package/lib/types/config.d.ts +5 -3
- package/lib/types/configuration.d.ts +10 -0
- package/lib/types/evaluators/async-function.d.ts +8 -0
- package/lib/types/evaluators/index.d.ts +11 -0
- package/lib/types/evaluators/repl.d.ts +8 -0
- package/lib/types/evaluators/types.d.ts +24 -0
- package/lib/types/evaluators/vm-script-await.d.ts +8 -0
- package/lib/types/evaluators/vm-script.d.ts +7 -0
- package/lib/types/execution.d.ts +66 -0
- package/lib/types/index.d.ts +5 -4
- package/lib/types/json-wire.d.ts +1 -1
- package/lib/types/launch.d.ts +1 -1
- package/lib/types/persistent-process.d.ts +7 -13
- package/lib/types/process.d.ts +10 -8
- package/lib/types/protocol.d.ts +51 -55
- package/lib/types/rpc.d.ts +13 -0
- package/lib/types/worker.d.ts +64 -0
- package/locale/de.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/package.json +32 -24
- package/lib/types/channel.d.ts +0 -32
- package/lib/types/persistent.d.ts +0 -44
package/locale/de.json
ADDED
package/locale/es.json
ADDED
package/locale/fr.json
ADDED
package/locale/ja.json
ADDED
package/locale/pt.json
ADDED
package/locale/ru.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-ptc-runtime-node",
|
|
3
|
-
"description": "Node PTC execution with
|
|
4
|
-
"version": "0.2.
|
|
3
|
+
"description": "Node PTC execution with async function, REPL and VM Script evaluators and optional retained state",
|
|
4
|
+
"version": "0.2.2-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./package.json": "./package.json",
|
|
22
|
+
"./configuration": {
|
|
23
|
+
"types": "./lib/types/configuration.d.ts",
|
|
24
|
+
"default": "./lib/configuration.js"
|
|
25
|
+
},
|
|
22
26
|
"./process": {
|
|
23
27
|
"types": "./lib/types/process-entry.d.ts",
|
|
24
28
|
"default": "./lib/process.js"
|
|
@@ -28,37 +32,41 @@
|
|
|
28
32
|
"files": [
|
|
29
33
|
"locale/*.json",
|
|
30
34
|
"lib/index.js",
|
|
35
|
+
"lib/configuration.js",
|
|
31
36
|
"lib/process.js",
|
|
32
37
|
"lib/persistent-process.js",
|
|
33
38
|
"lib/types/**/*.d.ts"
|
|
34
39
|
],
|
|
35
40
|
"license": "MIT",
|
|
36
41
|
"peerDependencies": {
|
|
37
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
38
|
-
"@deepseek-ai/dsh-ptc-runtime": "0.2.
|
|
39
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
40
|
-
"@deepseek-ai/dsh-timeout": "0.2.
|
|
41
|
-
"@deepseek-ai/dsh-fs": "0.2.
|
|
42
|
-
"@deepseek-ai/dsh-subprocess": "0.2.
|
|
43
|
-
"@deepseek-ai/dsh-sandbox": "0.2.
|
|
44
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.
|
|
42
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.2-alpha.2",
|
|
44
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.2",
|
|
45
|
+
"@deepseek-ai/dsh-timeout": "0.2.2-alpha.2",
|
|
46
|
+
"@deepseek-ai/dsh-fs": "0.2.2-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-subprocess": "0.2.2-alpha.2",
|
|
48
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.2"
|
|
45
50
|
},
|
|
46
51
|
"dependencies": {
|
|
47
|
-
"@deepseek-ai/dsh-util-values": "0.2.
|
|
48
|
-
"@deepseek-ai/schemastery": "~3.18.
|
|
52
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-alpha.2",
|
|
53
|
+
"@deepseek-ai/schemastery": "~3.18.6-alpha.1",
|
|
54
|
+
"acorn": "^8.18.0",
|
|
55
|
+
"acorn-walk": "^8.3.5",
|
|
56
|
+
"birpc": "4.2.0"
|
|
49
57
|
},
|
|
50
58
|
"devDependencies": {
|
|
51
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
52
|
-
"@deepseek-ai/dsh-ptc-runtime": "0.2.
|
|
53
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
54
|
-
"@deepseek-ai/dsh-timeout": "0.2.
|
|
55
|
-
"@deepseek-ai/dsh-fs": "0.2.
|
|
56
|
-
"@deepseek-ai/dsh-subprocess": "0.2.
|
|
57
|
-
"@deepseek-ai/dsh-sandbox": "0.2.
|
|
58
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.2.
|
|
59
|
-
"@deepseek-ai/dsh-fs-local": "0.2.
|
|
60
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.
|
|
61
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
62
|
-
"@deepseek-ai/dsh-sandbox-local": "0.2.
|
|
59
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.2-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-timeout": "0.2.2-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-fs": "0.2.2-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-subprocess": "0.2.2-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-fs-local": "0.2.2-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-subprocess-local": "0.2.2-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-sandbox-local": "0.2.2-alpha.2"
|
|
63
71
|
}
|
|
64
72
|
}
|
package/lib/types/channel.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Duplex } from 'node:stream';
|
|
2
|
-
/** One co-shipped process channel; the consumer owns frame validation and terminal outcomes. */
|
|
3
|
-
export declare class JsonChannel {
|
|
4
|
-
private readonly stream;
|
|
5
|
-
private readonly maxBytes;
|
|
6
|
-
private readonly receive;
|
|
7
|
-
private readonly failure;
|
|
8
|
-
private readonly header;
|
|
9
|
-
private headerBytes;
|
|
10
|
-
private payload;
|
|
11
|
-
private payloadBytes;
|
|
12
|
-
private queuedBytes;
|
|
13
|
-
private closed;
|
|
14
|
-
private readonly writes;
|
|
15
|
-
constructor(stream: Duplex, maxBytes: number, receive: (message: unknown, bytes: number) => void, failure: (error: Error, kind: 'io' | 'protocol') => void);
|
|
16
|
-
private readonly onError;
|
|
17
|
-
private readonly onClose;
|
|
18
|
-
private readonly onEnd;
|
|
19
|
-
private readonly onData;
|
|
20
|
-
/**
|
|
21
|
-
* Submit a bounded frame immediately and await the stream's write receipt.
|
|
22
|
-
* @param message - JSON-only co-shipped protocol value.
|
|
23
|
-
* @returns Resolves when this frame has been written, or rejects after transport failure.
|
|
24
|
-
*/
|
|
25
|
-
send(message: unknown): Promise<void>;
|
|
26
|
-
private finishWrites;
|
|
27
|
-
/** Stop reads and close the owned endpoint; pending writes reject on closure. */
|
|
28
|
-
close(): void;
|
|
29
|
-
/** Wait for accepted writes to finish or fail. */
|
|
30
|
-
drain(): Promise<void>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import type { PtcRunRequest, PtcRunSpec, PtcRunResult } from '@deepseek-ai/dsh-ptc-runtime';
|
|
3
|
-
import type { PolicyProcesses } from './policy-processes.ts';
|
|
4
|
-
import type { ResolvedConfig } from './config.ts';
|
|
5
|
-
/** Sandboxed, best-effort retained state; restart, disposal, and interrupted execution clear it. */
|
|
6
|
-
export declare class InMemoryExecution {
|
|
7
|
-
private readonly ctx;
|
|
8
|
-
private readonly config;
|
|
9
|
-
private readonly processes;
|
|
10
|
-
/**
|
|
11
|
-
* Model-facing rules for retained variables, authority, output, and recovery.
|
|
12
|
-
* @returns Usage guidance appended to the run_code schema.
|
|
13
|
-
*/
|
|
14
|
-
get executionInstructions(): string;
|
|
15
|
-
private readonly owners;
|
|
16
|
-
private readonly kernels;
|
|
17
|
-
private disposed;
|
|
18
|
-
/**
|
|
19
|
-
* Own retained execution resources under the existing Node provider.
|
|
20
|
-
* @param ctx - Provider lifecycle and execution services.
|
|
21
|
-
* @param config - Validated limits and selected executable.
|
|
22
|
-
* @param processes - Provider-owned policy invalidation and cleanup.
|
|
23
|
-
*/
|
|
24
|
-
constructor(ctx: Context, config: ResolvedConfig, processes: PolicyProcesses);
|
|
25
|
-
/**
|
|
26
|
-
* Resolve the file policy, directory and deadline for a retained REPL.
|
|
27
|
-
* @param request - Program, bindings, owner, directory and elapsed budget.
|
|
28
|
-
* @returns Resolved inputs with the selected file policy.
|
|
29
|
-
*/
|
|
30
|
-
resolve(request: PtcRunRequest): PtcRunSpec;
|
|
31
|
-
/**
|
|
32
|
-
* Evaluate statements using this owner's process, or a temporary process without an owner.
|
|
33
|
-
* @param spec - Resolved request; concurrent calls for one owner are rejected.
|
|
34
|
-
* @returns Logs, a final JSON expression, or a structured execution failure.
|
|
35
|
-
*/
|
|
36
|
-
run(spec: PtcRunSpec): Promise<PtcRunResult>;
|
|
37
|
-
/**
|
|
38
|
-
* Release retained state and await its process cleanup.
|
|
39
|
-
* @param owner - Exact object supplied to run.
|
|
40
|
-
* @returns Completion after the owned process and output streams stop.
|
|
41
|
-
*/
|
|
42
|
-
release(owner: object): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=persistent.d.ts.map
|