@trama-dev/session 0.2.1 → 0.3.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.
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -4
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,11 @@ export interface SpawnOptions {
|
|
|
9
9
|
projectDir: string;
|
|
10
10
|
/** Arguments passed to the program via ctx.input.args. */
|
|
11
11
|
args?: Record<string, unknown>;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Per-phase timeout in ms, for each run and each repair attempt of this
|
|
14
|
+
* participant. While the participant runs, the clock of the program that
|
|
15
|
+
* spawned it is stopped: this timeout is what limits that time.
|
|
16
|
+
*/
|
|
13
17
|
timeout?: number;
|
|
14
18
|
/** Max repair attempts. */
|
|
15
19
|
maxRepairAttempts?: number;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mkdtempSync } from "fs";
|
|
2
2
|
import { join, resolve } from "path";
|
|
3
3
|
import { homedir, tmpdir } from "os";
|
|
4
4
|
import { createWorkspace, runProgram } from "@trama-dev/runtime/runner";
|
|
@@ -48,9 +48,6 @@ export class Session {
|
|
|
48
48
|
const { args, timeout, maxRepairAttempts } = options;
|
|
49
49
|
const projectDir = toAbsolute(options.projectDir);
|
|
50
50
|
const workspaceDir = this.workspaceDir;
|
|
51
|
-
if (!existsSync(projectDir)) {
|
|
52
|
-
throw new Error(`Project directory not found: ${projectDir}`);
|
|
53
|
-
}
|
|
54
51
|
// Where the participant is in its lifecycle, and the args of its latest run —
|
|
55
52
|
// a resume merges new args over them, so they accumulate across yields.
|
|
56
53
|
let state = "running";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trama-dev/session",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"node": ">=22.19.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@trama-dev/runtime": "0.
|
|
36
|
+
"@trama-dev/runtime": "0.3.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "
|
|
39
|
+
"@types/node": "26.6.6"
|
|
40
40
|
}
|
|
41
41
|
}
|