@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linzumi/cli",
3
- "version": "1.0.179",
3
+ "version": "1.0.181",
4
4
  "description": "Linzumi CLI \u2014 point a Codex agent at the real code on your laptop, with your team watching and steering from shared threads.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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
  }