@bjoernrochel/sevro 0.1.0-rc.13 → 0.1.0-rc.14

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.
@@ -148,6 +148,10 @@ Codex route, including semantic and advisory roles, and to both `exec` and
148
148
  `app-server` entrypoints. For a 20-minute app-server evaluation, add
149
149
  `--codex-entrypoint app-server --codex-timeout-ms 1200000` to the Codex command
150
150
  above. The option requires a Codex host route; invalid values fail before a run.
151
+ For `app-server`, this is the only deadline for the whole session, including
152
+ startup requests such as `thread/start`. If it expires while a request is
153
+ unanswered, the failure names that request, for example
154
+ `App-server evaluation time bound reached awaiting thread/start`.
151
155
 
152
156
  ### Retain native host diagnostics
153
157
 
@@ -23,10 +23,10 @@ Local installation records the selected version in the project lockfile.
23
23
 
24
24
  ## Current release
25
25
 
26
- The current release is `0.1.0-rc.13`. Install this exact version:
26
+ The current release is `0.1.0-rc.14`. Install this exact version:
27
27
 
28
28
  ```sh
29
- bun add --exact @bjoernrochel/sevro@0.1.0-rc.13
29
+ bun add --exact @bjoernrochel/sevro@0.1.0-rc.14
30
30
  ```
31
31
 
32
32
  <!-- sevro-current-release:end -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjoernrochel/sevro",
3
- "version": "0.1.0-rc.13",
3
+ "version": "0.1.0-rc.14",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "A standalone evaluation runner for agentic coding capabilities",
6
6
  "type": "module",
@@ -149,7 +149,7 @@ class AppServerRpc {
149
149
  {
150
150
  resolve: (value: RecordValue) => void;
151
151
  reject: (error: Error) => void;
152
- timer: ReturnType<typeof setTimeout>;
152
+ method: string;
153
153
  }
154
154
  >();
155
155
  private wake?: () => void;
@@ -210,10 +210,7 @@ class AppServerRpc {
210
210
 
211
211
  fail(error: unknown): void {
212
212
  this.failure ??= error instanceof Error ? error : new Error(String(error));
213
- for (const pending of this.pending.values()) {
214
- clearTimeout(pending.timer);
215
- pending.reject(this.failure);
216
- }
213
+ for (const pending of this.pending.values()) pending.reject(this.failure);
217
214
  this.pending.clear();
218
215
  this.wake?.();
219
216
  }
@@ -278,7 +275,6 @@ class AppServerRpc {
278
275
  // Validate before removing the waiter so malformed responses reject it.
279
276
  const value = record(message.error ?? message.result);
280
277
  this.pending.delete(id);
281
- clearTimeout(pending.timer);
282
278
  if (message.error)
283
279
  pending.reject(
284
280
  new Error(`App-server RPC failed (${String(value.code)})`),
@@ -308,14 +304,12 @@ class AppServerRpc {
308
304
  this.wake?.();
309
305
  }
310
306
 
307
+ /** The session's configured time bound is the only deadline, including startup. */
311
308
  async call(method: string, params: RecordValue): Promise<RecordValue> {
312
309
  if (this.failure) throw this.failure;
313
310
  const id = this.nextId++;
314
311
  return new Promise((resolve, reject) => {
315
- const timer = setTimeout(() => {
316
- this.fail(new Error(`App-server RPC timeout: ${method}`));
317
- }, 45000);
318
- this.pending.set(id, { resolve, reject, timer });
312
+ this.pending.set(id, { resolve, reject, method });
319
313
  try {
320
314
  this.send({ id, method, params });
321
315
  } catch (error) {
@@ -324,6 +318,10 @@ class AppServerRpc {
324
318
  });
325
319
  }
326
320
 
321
+ pendingMethods(): string[] {
322
+ return Array.from(this.pending.values(), (pending) => pending.method);
323
+ }
324
+
327
325
  async initialize(): Promise<void> {
328
326
  await this.call("initialize", {
329
327
  clientInfo: { name: "sevro_eval", version: "0.1.0" },
@@ -882,6 +880,11 @@ function sessionFailure(session: AppServerSession, error: unknown): void {
882
880
  error instanceof Error ? error.message : String(error);
883
881
  session.emit({ type: "turn.failed" });
884
882
  }
883
+ /** Name an unanswered request so a stalled startup stays distinguishable. */
884
+ function timeBoundFailure(pending: string[]): string {
885
+ const reached = "App-server evaluation time bound reached";
886
+ return pending.length ? `${reached} awaiting ${pending.join(", ")}` : reached;
887
+ }
885
888
  async function completeSession(
886
889
  session: AppServerSession,
887
890
  rpc: AppServerRpc,
@@ -893,7 +896,7 @@ async function completeSession(
893
896
  };
894
897
  request.signal?.addEventListener("abort", cancel, { once: true });
895
898
  const deadline = setTimeout(() => {
896
- rpc.fail(new Error("App-server evaluation time bound reached"));
899
+ rpc.fail(new Error(timeBoundFailure(rpc.pendingMethods())));
897
900
  }, bound);
898
901
  try {
899
902
  await session.run();