@justin06lee/yagami 0.8.1 → 0.8.2

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.
@@ -10,7 +10,7 @@ import {
10
10
  toApiError,
11
11
  toChatCompletion,
12
12
  yagamiConfigDir
13
- } from "./chunk-U3RFT7QV.js";
13
+ } from "./chunk-EKN223KD.js";
14
14
 
15
15
  // src/server.ts
16
16
  import { serve } from "@hono/node-server";
@@ -374,4 +374,4 @@ export {
374
374
  maskKey,
375
375
  startYagami
376
376
  };
377
- //# sourceMappingURL=chunk-4S5QNDQK.js.map
377
+ //# sourceMappingURL=chunk-UGIJV6FZ.js.map
package/dist/cli.js CHANGED
@@ -13,13 +13,13 @@ import {
13
13
  sessionCachePath,
14
14
  startYagami,
15
15
  writeServerState
16
- } from "./chunk-4S5QNDQK.js";
16
+ } from "./chunk-UGIJV6FZ.js";
17
17
  import {
18
18
  VERSION,
19
19
  YagamiEngine,
20
20
  createProvider,
21
21
  detectProviders
22
- } from "./chunk-U3RFT7QV.js";
22
+ } from "./chunk-EKN223KD.js";
23
23
 
24
24
  // src/cli.ts
25
25
  import { spawn } from "child_process";
package/dist/index.d.ts CHANGED
@@ -474,6 +474,12 @@ interface AcpProviderOptions {
474
474
  installHint?: string;
475
475
  /** Test seam: replaces process spawning. */
476
476
  connect?: (cwd: string) => Promise<AcpConnection>;
477
+ /** How long a spawned agent gets to finish the ACP handshake before it is
478
+ * killed (default 30 s). */
479
+ handshakeTimeoutMs?: number;
480
+ /** How long a model-list or version probe may take end to end before the
481
+ * agent is closed and the probe fails (default 20 s). */
482
+ probeTimeoutMs?: number;
477
483
  }
478
484
  /**
479
485
  * Any agent speaking the Agent Client Protocol over stdio — OpenCode,
@@ -495,6 +501,8 @@ declare class AcpProvider implements SessionProvider {
495
501
  private readonly appName;
496
502
  private readonly modelConfigId;
497
503
  private readonly connectImpl;
504
+ private readonly handshakeTimeoutMs;
505
+ private readonly probeTimeoutMs;
498
506
  constructor(options: AcpProviderOptions);
499
507
  private spawnConnection;
500
508
  private classify;
@@ -508,6 +516,14 @@ declare class AcpProvider implements SessionProvider {
508
516
  openSession(options: ProviderSessionOptions): ProviderSession;
509
517
  private selectModel;
510
518
  private selectEffort;
519
+ /**
520
+ * Run a short question against a fresh agent and close it, whatever
521
+ * happens. The deadline covers the whole exchange: an agent that answers
522
+ * the handshake and then sits on newSession forever (Gemini, signed out
523
+ * or mid-update) used to hold the probe open — and its process alive —
524
+ * for as long as the host ran.
525
+ */
526
+ private probe;
511
527
  listModels(): Promise<EngineModel[]>;
512
528
  /**
513
529
  * The agent's self-reported name/version from the ACP handshake. When the
@@ -538,6 +554,6 @@ declare function resolveExecutable(providerId: string, name: string, installHint
538
554
  */
539
555
  declare function resolveClaudeExecutable(explicit?: string): string;
540
556
 
541
- declare const VERSION = "0.8.1";
557
+ declare const VERSION = "0.8.2";
542
558
 
543
559
  export { type AcpConnection, AcpProvider, type AcpProviderOptions, AgentSession, type AgentSessionOptions, ApiError, AuthRequiredError, ChatChunkTranslator, type ChatCompletion, type ChatCompletionChunk, type ChatCompletionsRequest, type ChatMessageParam, ClaudeProvider, type ClaudeProviderOptions, type ClaudeSessionOptions, EngineModel, EngineOptions, type MessageStreamEvent, MessagesRequest, MessagesResponse, type OpenAiUsage, type Parity, PermissionAdapter, type PermissionAdapterOptions, type PermissionDecision, type PermissionHandler, type PermissionRequest, Provider, ProviderCapabilities, ProviderError, ProviderNotInstalledError, ProviderSession, ProviderSessionOptions, SessionProvider, SseEvent, type TranslatedChatRequest, TurnEvent, TurnRequest, VERSION, type VersionSkew, Yagami, type YagamiChatCompletions, YagamiEngine, YagamiError, type YagamiMessages, type YagamiOptions, chatToMessagesRequest, claudeCodeSession, findExecutable, modelListBody, openAiErrorBody, resolveClaudeExecutable, resolveExecutable, settingSourcesFor, startAgentSession, toApiError, toChatCompletion };
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import {
31
31
  toApiError,
32
32
  toChatCompletion,
33
33
  yagamiConfigDir
34
- } from "./chunk-U3RFT7QV.js";
34
+ } from "./chunk-EKN223KD.js";
35
35
 
36
36
  // src/core/client.ts
37
37
  var Yagami = class {
package/dist/server.js CHANGED
@@ -13,10 +13,10 @@ import {
13
13
  sessionCachePath,
14
14
  startYagami,
15
15
  writeServerState
16
- } from "./chunk-4S5QNDQK.js";
16
+ } from "./chunk-UGIJV6FZ.js";
17
17
  import {
18
18
  yagamiConfigDir
19
- } from "./chunk-U3RFT7QV.js";
19
+ } from "./chunk-EKN223KD.js";
20
20
  export {
21
21
  clearServerState,
22
22
  configFilePath,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justin06lee/yagami",
3
- "version": "0.8.1",
4
- "description": "Self-hosted Anthropic- and OpenAI-compatible API backed by your signed-in coding-agent CLIs, plus a zero-config library for driving them from your own apps \u2014 no API keys needed.",
3
+ "version": "0.8.2",
4
+ "description": "Self-hosted Anthropic- and OpenAI-compatible API backed by your signed-in coding-agent CLIs, plus a zero-config library for driving them from your own apps no API keys needed.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "justin06lee",