@timmyjl12/pi-agy-bridge 0.1.3 → 0.1.4

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 CHANGED
@@ -4,7 +4,7 @@ Use Google Antigravity models (Gemini, Claude, GPT-OSS) in [pi](https://github.c
4
4
 
5
5
  It follows the design of `pi-claude-code`: **pi keeps the conversation, the approvals and the tool execution; agy is only the model.** Every pi request becomes one ACP prompt turn. When the model wants a pi tool it writes a small tool-call block, pi runs the tool, and the next request carries the result. Nothing is parked between requests, so a slow tool (a long `pytest` run, a user dialog) can take as long as it needs and there is no turn time limit.
6
6
 
7
- > Status: 0.1.3. Every Pi session shutdown now recycles the outgoing runtime instead of permanently latching it shut, so a late pi-advisor retry can start a fresh ACP process; explicit terminal disposal remains terminal. The compatibility probe passed on `agy 1.5.8` and `1.5.9` (identical surface). On 2026-11-14 (agy 1.5.9) the Antigravity backend began refusing pi's default system prompt sent through the append hook with `RESOURCE_EXHAUSTED`; live `gemini-4-hydrogen` turns and pi-subagents runs succeed through the `auto` inline fallback (see `PI_AGY_SYSTEM_PROMPT`). Earlier live bridge checks passed on `agy 1.5.8`. Live turns succeeded on `gemini-3.8-flash`, `gemini-4-hydrogen` (including `xhigh`), and `gemini-pro-orchestrator-g1-pro`. A real pi surface check with the configured extensions also passed. Claude and GPT-OSS have not been exercised in a live model turn.
7
+ > Status: 0.1.4. The default bridge home now honors Pi's configured agent directory (`PI_CODING_AGENT_DIR`). Every Pi session shutdown now recycles the outgoing runtime instead of permanently latching it shut, so a late pi-advisor retry can start a fresh ACP process; explicit terminal disposal remains terminal. The compatibility probe passed on `agy 1.5.8` and `1.5.9` (identical surface). On 2026-11-14 (agy 1.5.9) the Antigravity backend began refusing pi's default system prompt sent through the append hook with `RESOURCE_EXHAUSTED`; live `gemini-4-hydrogen` turns and pi-subagents runs succeed through the `auto` inline fallback (see `PI_AGY_SYSTEM_PROMPT`). Earlier live bridge checks passed on `agy 1.5.8`. Live turns succeeded on `gemini-3.8-flash`, `gemini-4-hydrogen` (including `xhigh`), and `gemini-pro-orchestrator-g1-pro`. A real pi surface check with the configured extensions also passed. Claude and GPT-OSS have not been exercised in a live model turn.
8
8
 
9
9
  ## Requirements
10
10
 
package/compat/probe.ts CHANGED
@@ -40,7 +40,7 @@ export const PROBE_PROTOCOL_VERSION = 1;
40
40
  export const PROBE_CLIENT_INFO = {
41
41
  name: "pi-agy-bridge-compat-probe",
42
42
  title: "pi-agy-bridge zero-cost compat probe",
43
- version: "0.1.3",
43
+ version: "0.1.4",
44
44
  } as const;
45
45
 
46
46
  /** One failed probe step. `step` names the command or exchange. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timmyjl12/pi-agy-bridge",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "pi provider for Google Antigravity (agy) models over the official ACP server, modelled on pi-claude-code: pi keeps the loop, history and tool execution",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -194,7 +194,7 @@ export class AcpProcess {
194
194
  const result = await this.#rpc.request("initialize", {
195
195
  protocolVersion: 1,
196
196
  clientCapabilities: { fs: { readTextFile: false, writeTextFile: false }, terminal: false },
197
- clientInfo: { name: "pi-agy-bridge", title: "pi-agy-bridge", version: "0.1.3" },
197
+ clientInfo: { name: "pi-agy-bridge", title: "pi-agy-bridge", version: "0.1.4" },
198
198
  });
199
199
  return (result ?? {}) as AcpInitializeResult;
200
200
  }
package/src/config.ts CHANGED
@@ -4,6 +4,10 @@
4
4
  import os from "node:os";
5
5
  import path from "node:path";
6
6
 
7
+ function agentDir(env: Record<string, string | undefined>): string {
8
+ return env.PI_CODING_AGENT_DIR?.trim() || path.join(os.homedir(), ".pi", "agent");
9
+ }
10
+
7
11
  /** How pi's system prompt reaches agy. `append`: `_meta.antigravity.systemPrompt.append` on `session/new`. `inline`: at
8
12
  * the top of the first prompt (the conversation resource). `auto`: append, but when the backend answers a fresh appended
9
13
  * session with RESOURCE_EXHAUSTED before any output, retry that turn once inline and keep using inline if it worked. */
@@ -36,7 +40,7 @@ export interface AgyConfig {
36
40
 
37
41
  export const DEFAULT_CONFIG: Readonly<AgyConfig> = Object.freeze({
38
42
  command: "agy",
39
- home: path.join(os.homedir(), ".pi", "agent", "pi-agy-bridge"),
43
+ home: path.join(agentDir(process.env), "pi-agy-bridge"),
40
44
  idleExitMs: 10 * 60_000,
41
45
  sessionTtlMs: 5 * 60_000,
42
46
  toolTtlMs: 30 * 60_000,
@@ -80,7 +84,7 @@ function positiveInt(value: string | undefined, fallback: number, scale = 1): nu
80
84
  /** Resolve configuration from an environment. Pure: pass `process.env` or a test double. */
81
85
  export function loadConfig(env: Record<string, string | undefined> = process.env): AgyConfig {
82
86
  const command = env.PI_AGY_COMMAND?.trim() || env.AGY_BIN?.trim() || DEFAULT_CONFIG.command;
83
- const home = env.PI_AGY_HOME?.trim() || DEFAULT_CONFIG.home;
87
+ const home = env.PI_AGY_HOME?.trim() || path.join(agentDir(env), "pi-agy-bridge");
84
88
  return {
85
89
  command,
86
90
  home,