@anthonyhaussman/opencode-agy-auth 1.5.20-test.0 → 1.5.20-test.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.
@@ -3,6 +3,12 @@ import { type AgyAcpDeps } from "./live-session";
3
3
  export type { AgyAcpDeps } from "./live-session";
4
4
  export { LiveSession, LiveTurn } from "./live-session";
5
5
  type Part = LanguageModelV3StreamPart;
6
+ /**
7
+ * Appended to the agy system prompt of side calls (title, summary, compaction).
8
+ * agy's agent otherwise tends to look up tools instead of answering, and OpenCode
9
+ * rejects a compaction reply that skips its summary template.
10
+ */
11
+ export declare const SIDE_CALL_SYSTEM_TEXT: string;
6
12
  export declare class AgyAcpLanguageModel implements LanguageModelV3 {
7
13
  readonly modelId: string;
8
14
  private readonly deps;
@@ -30,6 +30,11 @@ export interface AgyAcpDeps {
30
30
  cancelSettleTimeoutMs?: number;
31
31
  /** agy idle-kill delay (tests); defaults to IDLE_TIMEOUT_MS. */
32
32
  idleTimeoutMs?: number;
33
+ /**
34
+ * Last non-empty tool list of a primary call. Side calls advertise it so their
35
+ * agy process does not rewrite agy's shared bridge schema cache with fewer tools.
36
+ */
37
+ lastTools?: BridgeToolDef[];
33
38
  }
34
39
  export type TurnEvent = {
35
40
  kind: "part";
@@ -67,6 +72,8 @@ export interface LiveSessionConfig {
67
72
  key: string | undefined;
68
73
  fingerprint: string;
69
74
  tools: BridgeToolDef[];
75
+ /** Side call: list the tools for agy's schema cache but refuse every call; no bridge wait. */
76
+ sideCall?: boolean;
70
77
  session: NewSessionParams;
71
78
  auth: AgyAuth;
72
79
  /** agy session id stored for this OpenCode session; resumed instead of opening a new one when set. */
@@ -20,6 +20,8 @@ export type ToolOutcome = {
20
20
  isError: boolean;
21
21
  images?: ToolImage[];
22
22
  };
23
+ /** Returned when agy calls an OpenCode tool during a side call (title, summary, compaction). */
24
+ export declare const SIDE_CALL_TOOL_TEXT = "OpenCode tools are not available in this request. Answer with text only, without calling tools.";
23
25
  export declare class PendingTools {
24
26
  private readonly opts;
25
27
  private readonly entries;
@@ -63,6 +65,8 @@ export declare class McpBridge {
63
65
  tools: BridgeToolDef[];
64
66
  pending: PendingTools;
65
67
  log?: (msg: string) => void;
68
+ /** When false, the tools are listed but every call is refused (side calls). Default true. */
69
+ callable?: boolean;
66
70
  }): Promise<McpBridge>;
67
71
  private readBody;
68
72
  private handle;
@@ -1,9 +1,14 @@
1
1
  import type { AcpPermissionRequest, AcpPermissionResponse } from "./process";
2
+ /** Directory where OpenCode stores full outputs of truncated tool results. */
3
+ export declare function openCodeToolOutputDir(env?: NodeJS.ProcessEnv): string;
4
+ /** Directory where OpenCode saves the full output of truncated shell commands. */
5
+ export declare function openCodeShellOutputDir(env?: NodeJS.ProcessEnv): string;
2
6
  /**
3
- * Allows only `call_mcp_tool` aimed at the OpenCode bridge; rejects everything
4
- * else. Replies `cancelled` only when no option of the needed kind exists.
7
+ * Allows `call_mcp_tool` aimed at the OpenCode bridge and `read_file` of
8
+ * OpenCode tool-output files; rejects everything else. Replies `cancelled`
9
+ * only when no option of the needed kind exists.
5
10
  */
6
- export declare function decidePermission(req: AcpPermissionRequest): {
11
+ export declare function decidePermission(req: AcpPermissionRequest, env?: NodeJS.ProcessEnv): {
7
12
  response: AcpPermissionResponse;
8
13
  allowed: boolean;
9
14
  };
@@ -33,6 +33,12 @@ export declare class StreamMapper {
33
33
  rateLimit?: string;
34
34
  map(update: AcpSessionUpdate): MappedEvent;
35
35
  flush(): LanguageModelV3StreamPart[];
36
+ /**
37
+ * Ends the turn: closes the open text block and gives every provider-executed
38
+ * call agy never finished an error result, so OpenCode does not report a
39
+ * missing tool result (agy can drop the update after a denied or aborted call).
40
+ */
41
+ finish(): LanguageModelV3StreamPart[];
36
42
  private close;
37
43
  private chunk;
38
44
  private toolCall;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthonyhaussman/opencode-agy-auth",
3
- "version": "1.5.20-test.0",
3
+ "version": "1.5.20-test.2",
4
4
  "author": "antigravity",
5
5
  "repository": {
6
6
  "type": "git",