@firespoon/pi-antigravity-bridge 1.10.7 → 1.10.8
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/provider.ts +16 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.10.8] - 2026-11-15
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Pi default identity prompt compatibility with `agy` turns.** When `systemPrompt` is enabled, `agy` turns triggered repeated `RESOURCE_EXHAUSTED` (429) responses when sent Pi's unmodified default leading identity sentence (`You are a coding assistant running inside pi, a coding agent harness.`). Both the ACP carrier path and the `stream-json` path (staged carrier and inline fallback) now replace only that exact leading sentence with `You are a coding assistant.`, preserving all subsequent system instructions, `AGENTS.md` context, skills, and the live MCP tool catalog unchanged. Custom system prompts without that exact leading sentence and `systemPrompt: false` behavior are unaffected.
|
|
10
|
+
|
|
5
11
|
## [1.10.7] - 2026-11-15
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ If `agy models` fails at load (binary missing, auth not done, network stall), a
|
|
|
120
120
|
| `webTools` | `off` (no web tools), `on` (register `agy_web_search` + `agy_read_url` as Pi tools, usable by ANY provider's model). Each call spawns a one-shot search-only `agy` agent (plan mode, bridge MCP inheritance off), gates the answer on an observed native `search_web`/`read_url_content` step, and spends Antigravity quota. Off by default: Antigravity `stream-json` sessions already have native web tools (and `agy_web_search`/`agy_read_url` remain excluded from the MCP bridge catalog); these serve other providers | `off` |
|
|
121
121
|
| `bridgeTools` | `none` (bridge off — on the restricted ACP agent, no Pi file/shell/extension tools are exposed, leaving only agy's retained foundational runtime tools; on `stream-json`, agy still uses its own native tools), `all` (every active pi tool, including active pi builtins such as `read`/`write`/`edit`/`bash`, extensions, `pi-mcp-adapter` tools, and other `Ask*` delegations, excluding the bridge's own internal tools), `mcp` (active `pi-mcp-adapter` tools + skills bridge only — no pi builtins or non-adapter extensions; on restricted ACP this limits Pi-bridged tools to adapter tools + skills) | `all` |
|
|
122
122
|
| `digest` | `off` (stable prompts; agy's prompt cache hits) or `on` (inject a delta of pi-side context - compaction summaries, other-provider turns - into each agy prompt; the delta changes every turn, so agy re-bills the full context). Enable for mixed-provider sessions where agy must see pi-side context | `off` |
|
|
123
|
-
| `systemPrompt` | `on` (send pi's system prompt - operating instructions plus the global agent-dir `AGENTS.md` and ancestor `AGENTS.md`/`CLAUDE.md` - plus a Pi Bridge tool-priority note. Delivery: **acp** carries it in the generated restricted custom agent's body via `--agent generated` and `--include-default-customizations=false` (`excludeDefaultComponents: true`, `tools: []`, `inheritMcp: true`, `inheritCustomizations: false`, empty `skills`/`rules`/`agents`/`hooks`/`plugins`), with the current `pi-bridge` MCP spec in frontmatter and the live MCP tool catalog + JSON Schemas + `call_mcp_tool` calling convention in the body, not in the first ACP user message; **stream-json** stages it as an agy agent file via `--agent` off the ~25KB prompt line, declaring the productive native toolset explicitly per issue #13 plus `subagent: false` + `agents: []`, or honors `/agy agent`, which remains stream-json only) or `off` (on **acp**, omits Pi system prompt text only while still keeping the bridge protocol, live tool catalog, and restricted agent profile; on **stream-json**, uses agy-native behavior). ACP uses a new versioned session key so old conversations are preserved and not reused automatically — start a new Pi conversation to use the new profile | `on` |
|
|
123
|
+
| `systemPrompt` | `on` (send pi's system prompt - operating instructions plus the global agent-dir `AGENTS.md` and ancestor `AGENTS.md`/`CLAUDE.md` (adapting only Pi's exact leading default identity sentence to neutral wording for `agy` compatibility while preserving all remaining instructions and context) - plus a Pi Bridge tool-priority note. Delivery: **acp** carries it in the generated restricted custom agent's body via `--agent generated` and `--include-default-customizations=false` (`excludeDefaultComponents: true`, `tools: []`, `inheritMcp: true`, `inheritCustomizations: false`, empty `skills`/`rules`/`agents`/`hooks`/`plugins`), with the current `pi-bridge` MCP spec in frontmatter and the live MCP tool catalog + JSON Schemas + `call_mcp_tool` calling convention in the body, not in the first ACP user message; **stream-json** stages it as an agy agent file via `--agent` off the ~25KB prompt line, declaring the productive native toolset explicitly per issue #13 plus `subagent: false` + `agents: []`, or honors `/agy agent`, which remains stream-json only) or `off` (on **acp**, omits Pi system prompt text only while still keeping the bridge protocol, live tool catalog, and restricted agent profile; on **stream-json**, uses agy-native behavior). ACP uses a new versioned session key so old conversations are preserved and not reused automatically — start a new Pi conversation to use the new profile | `on` |
|
|
124
124
|
| `turnTimeoutMin` | Overall cap on ONE agy turn, minutes, both engines. Parked time (pi-tool round-trips, escalated calls, human-gated approvals) does not count against it on either engine: the cap pauses with remaining-budget semantics and resumes on unpark. When it fires, the bridge kills the agy process mid-task ("ACP turn exceeded the 10m deadline" / "agy exceeded the 10m turn timeout") - it is a bridge cap, not a Google server limit. Default is TTY-aware: `0` (no cap) on an interactive pi - you are the backstop with Esc; `20` headless, where nobody can abort and one runaway turn blocks the serialized turn queue. Opt into a gate with 1-1440 (free type via `config.json` or `/agy timeout <1-1440|off>`, or the `/agy` picker's preset list); `0` disables explicitly; anything else falls back to the TTY-aware default. The 5m inactivity stall guard always still bounds a hung server | `0` TTY / `20` headless |
|
|
125
125
|
| `inactivityTimeoutMin` | Silence cap, minutes, both engines: no stream-json stdout / no ACP session/update for this long fails the turn as a stall. `0` disables the guard. Parks (bridge calls, escalated calls, ACP permission dialogs) pause it; agy-native long steps such as builds do not. A false kill costs the whole turn, and on stream-json a stall kill with no result frame clears the conversation binding. Keep `5`; use `2`-`3` only when native steps are known to be short; do not use `1` | `5` |
|
|
126
126
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firespoon/pi-antigravity-bridge",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.8",
|
|
4
4
|
"description": "Gemini provider and AskAntigravity tool for Pi on the Antigravity ACP server (restricted custom agent with Pi tools via MCP) or the stream-json agy CLI fallback. Use antigravity/* models in Pi with /model picker support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
package/src/provider.ts
CHANGED
|
@@ -170,6 +170,16 @@ export const SYSTEM_PROMPT_PREAMBLE =
|
|
|
170
170
|
|
|
171
171
|
export const SYSTEM_PROMPT_END = "[END SYSTEM PROMPT]";
|
|
172
172
|
|
|
173
|
+
const PI_DEFAULT_IDENTITY_RE = /^You are a coding assistant running inside pi, a coding agent harness\./;
|
|
174
|
+
|
|
175
|
+
/** Replace Pi's exact leading default identity sentence with neutral wording
|
|
176
|
+
* when present; sending the unmodified leading sentence triggers repeated
|
|
177
|
+
* RESOURCE_EXHAUSTED 429 responses on agy. Preserves all subsequent text and
|
|
178
|
+
* leaves custom prompts untouched. */
|
|
179
|
+
function adaptPiSystemPrompt(systemPrompt: string): string {
|
|
180
|
+
return systemPrompt.replace(PI_DEFAULT_IDENTITY_RE, "You are a coding assistant.");
|
|
181
|
+
}
|
|
182
|
+
|
|
173
183
|
/** Brief tool-priority note appended inside every system prompt block: agy
|
|
174
184
|
* runs embedded in pi, so its native interactive tools never reach the
|
|
175
185
|
* user. Equivalent Pi Bridge tools must win. Concrete clashes observed
|
|
@@ -1509,7 +1519,9 @@ async function runTurnDriver(
|
|
|
1509
1519
|
// conversation id, so later gate-closed turns pass the same agent.
|
|
1510
1520
|
let stagedAgentName: string | undefined;
|
|
1511
1521
|
const resolveAcpAgent = (): string | null => {
|
|
1512
|
-
const acpSysPrompt = config.systemPrompt
|
|
1522
|
+
const acpSysPrompt = config.systemPrompt
|
|
1523
|
+
? adaptPiSystemPrompt(getCurrentSystemPrompt(context.messages)) || undefined
|
|
1524
|
+
: undefined;
|
|
1513
1525
|
const body = buildAcpAgentBody(acpSysPrompt, deps.bridgeCatalog?.());
|
|
1514
1526
|
return stageSyspromptAgent(body, { acp: true });
|
|
1515
1527
|
};
|
|
@@ -1607,7 +1619,9 @@ async function runTurnDriver(
|
|
|
1607
1619
|
stagedAgentName = stagedName;
|
|
1608
1620
|
} else {
|
|
1609
1621
|
const gateOpen = config.systemPrompt && !existing?.conversationId;
|
|
1610
|
-
const rawSysPrompt = gateOpen
|
|
1622
|
+
const rawSysPrompt = gateOpen
|
|
1623
|
+
? adaptPiSystemPrompt(getCurrentSystemPrompt(context.messages)) || undefined
|
|
1624
|
+
: undefined;
|
|
1611
1625
|
sysPrompt = rawSysPrompt;
|
|
1612
1626
|
agent = config.agent;
|
|
1613
1627
|
if (rawSysPrompt && !config.agent) {
|