@linzumi/cli 1.0.179 → 1.0.181
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 +1 -1
- package/dist/impl-res/cloud-supervisor.mjs +10 -10
- package/dist/impl-res/index.js +123 -123
- package/dist/impl-res/mcp-server.mjs +41 -41
- package/dist/impl-ts/cloud-supervisor.mjs +10 -10
- package/dist/impl-ts/index.js +436 -436
- package/dist/impl-ts/mcp-server.mjs +35 -35
- package/dist/mcp-server.mjs +35 -35
- package/package.json +1 -1
- package/scripts/build-core-reconnect-resume-parity-oracle.mjs +42 -0
package/package.json
CHANGED
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
fetchThreadTranscriptForRehydrationForTest,
|
|
55
55
|
resumeCodexThreadForReconnect,
|
|
56
56
|
} from './src/runner';
|
|
57
|
+
import { withCodexCompletionSnapshotRequestTimeout } from './src/channelSession';
|
|
57
58
|
|
|
58
59
|
// Scripted codex JSON-RPC request seam: replies are consumed in call
|
|
59
60
|
// order; every call is traced with its params. An exhausted script
|
|
@@ -179,6 +180,45 @@ async function runFetchTranscriptCase(input) {
|
|
|
179
180
|
return { trace };
|
|
180
181
|
}
|
|
181
182
|
|
|
183
|
+
// The completion-snapshot bound (channelSession.ts
|
|
184
|
+
// withCodexCompletionSnapshotRequestTimeout - the 2026-07-28 impl-res
|
|
185
|
+
// silent-wedge law): the REAL wrapper runs against a scripted request
|
|
186
|
+
// (result / rejection / never-settle hang). When the case carries an
|
|
187
|
+
// explicit boundMs, it is passed as the third argument (the non-positive
|
|
188
|
+
// unbounded guard); otherwise the wrapper resolves its bound through the
|
|
189
|
+
// SAME LINZUMI_CODEX_START_REQUEST_TIMEOUT_MS knob as the start bound
|
|
190
|
+
// (codexCompletionSnapshotRequestTimeoutMs delegates to it), set per case
|
|
191
|
+
// - a hang genuinely waits the (small) bound out.
|
|
192
|
+
async function runSnapshotTimeoutCase(input) {
|
|
193
|
+
process.env.LINZUMI_CODEX_START_REQUEST_TIMEOUT_MS = String(
|
|
194
|
+
input.timeoutMs
|
|
195
|
+
);
|
|
196
|
+
const trace = [];
|
|
197
|
+
const step = input.requestStep ?? {};
|
|
198
|
+
const request =
|
|
199
|
+
step.hang === true
|
|
200
|
+
? new Promise(() => {})
|
|
201
|
+
: step.reject !== undefined
|
|
202
|
+
? Promise.reject(new Error(step.reject))
|
|
203
|
+
: Promise.resolve({ result: step.result ?? {} });
|
|
204
|
+
const outcome = await (input.boundMs === undefined
|
|
205
|
+
? withCodexCompletionSnapshotRequestTimeout(input.method, request)
|
|
206
|
+
: withCodexCompletionSnapshotRequestTimeout(
|
|
207
|
+
input.method,
|
|
208
|
+
request,
|
|
209
|
+
input.boundMs
|
|
210
|
+
)
|
|
211
|
+
).then(
|
|
212
|
+
(value) => ({ ok: true, value }),
|
|
213
|
+
(error) => ({
|
|
214
|
+
ok: false,
|
|
215
|
+
message: error instanceof Error ? error.message : String(error),
|
|
216
|
+
})
|
|
217
|
+
);
|
|
218
|
+
trace.push({ t: 'outcome', outcome });
|
|
219
|
+
return { trace };
|
|
220
|
+
}
|
|
221
|
+
|
|
182
222
|
async function runCase(input) {
|
|
183
223
|
switch (input.kind) {
|
|
184
224
|
case 'resumeRun':
|
|
@@ -187,6 +227,8 @@ async function runCase(input) {
|
|
|
187
227
|
return runFetchMessagesCase(input);
|
|
188
228
|
case 'fetchTranscriptRun':
|
|
189
229
|
return runFetchTranscriptCase(input);
|
|
230
|
+
case 'snapshotTimeoutRun':
|
|
231
|
+
return runSnapshotTimeoutCase(input);
|
|
190
232
|
default:
|
|
191
233
|
return { error: 'unknown case kind ' + String(input.kind) };
|
|
192
234
|
}
|