start-command 0.42.0 → 0.44.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/.changeset/README.md +1 -1
- package/CHANGELOG.md +26 -0
- package/README.md +2 -0
- package/package.json +6 -6
- package/src/lib/args-parser-queries.js +64 -3
- package/src/lib/docker-inspect-batch.js +3 -0
- package/src/lib/execution-attach.js +10 -1
- package/src/lib/execution-cleanup.js +8 -0
- package/src/lib/execution-control.js +14 -3
- package/src/lib/execution-pause.js +701 -0
- package/src/lib/execution-recovery.js +6 -0
- package/src/lib/execution-resume-all.js +14 -0
- package/src/lib/execution-resume.js +16 -1
- package/src/lib/execution-store.js +5 -1
- package/src/lib/formal-ai-client.js +8 -5
- package/src/lib/formal-ai-files.js +474 -61
- package/src/lib/formal-ai.js +170 -7
- package/src/lib/log-sanitizer.js +5 -0
- package/src/lib/query-commands.js +33 -1
- package/src/lib/session-probe.js +27 -1
- package/src/lib/status-formatter.js +13 -3
- package/src/lib/status-probe.js +19 -5
- package/src/lib/usage.js +8 -1
- package/test/args-parser-attach-resume.js +1 -1
- package/test/args-parser-control.js +3 -3
- package/test/args-parser.js +1 -1
- package/test/fixtures/formal-ai/receipts-258.json +27 -9
- package/test/fixtures/formal-ai/receipts-261.json +589 -0
- package/test/fixtures/formal-ai/replay.cjs +4 -1
- package/test/fixtures/pause-golden.cjs +142 -0
- package/test/regression-243.js +4 -1
- package/test/regression-258-files.js +27 -5
- package/test/regression-258.js +22 -9
- package/test/regression-261.js +856 -0
- package/test/regression-263.js +867 -0
- package/test/shared-golden.js +28 -3
package/test/shared-golden.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
const { describe, it } = require('node:test');
|
|
2
2
|
const assert = require('node:assert/strict');
|
|
3
|
-
const { readFileSync } = require('node:fs');
|
|
4
|
-
const {
|
|
3
|
+
const { mkdtempSync, readFileSync, rmSync } = require('node:fs');
|
|
4
|
+
const { tmpdir } = require('node:os');
|
|
5
|
+
const { join, resolve } = require('node:path');
|
|
5
6
|
const { parseArgs } = require('../src/lib/args-parser');
|
|
6
7
|
const { buildDockerRuntimeArgs } = require('../src/lib/docker-runtime-args');
|
|
7
|
-
const {
|
|
8
|
+
const {
|
|
9
|
+
ExecutionRecord,
|
|
10
|
+
ExecutionStore,
|
|
11
|
+
} = require('../src/lib/execution-store');
|
|
12
|
+
const pause = require('../src/lib/execution-pause');
|
|
13
|
+
const { runPauseCase } = require('./fixtures/pause-golden.cjs');
|
|
8
14
|
const {
|
|
9
15
|
formatRecord,
|
|
10
16
|
enrichDetachedStatus,
|
|
@@ -125,6 +131,25 @@ describe('shared JavaScript and Rust golden contracts', () => {
|
|
|
125
131
|
fixture.text
|
|
126
132
|
);
|
|
127
133
|
});
|
|
134
|
+
for (const fixture of fixtures['pause-control'].cases) {
|
|
135
|
+
it(`pause control (issue #263): ${fixture.name}`, () => {
|
|
136
|
+
const appFolder = mkdtempSync(join(tmpdir(), 'start-263-golden-'));
|
|
137
|
+
try {
|
|
138
|
+
const store = new ExecutionStore({ appFolder, useLinks: false });
|
|
139
|
+
assert.deepEqual(
|
|
140
|
+
runPauseCase(
|
|
141
|
+
{ ExecutionRecord, pause },
|
|
142
|
+
store,
|
|
143
|
+
fixtures['pause-control'],
|
|
144
|
+
fixture
|
|
145
|
+
),
|
|
146
|
+
fixture.expected
|
|
147
|
+
);
|
|
148
|
+
} finally {
|
|
149
|
+
rmSync(appFolder, { recursive: true, force: true });
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
128
153
|
for (const fixture of fixtures['execution-record-format']) {
|
|
129
154
|
it(`preserves the complete execution record format (exit ${fixture.exitCode})`, () => {
|
|
130
155
|
assert.deepEqual(ExecutionRecord.fromObject(fixture).toObject(), fixture);
|