omp-antigravity-acp-provider 0.1.34 → 0.1.35

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
@@ -109,10 +109,14 @@ The installation runbook is in [AGENT_INSTALL.md](AGENT_INSTALL.md). Hand that f
109
109
  | `/antigravity-acp debug on\|off` | ACP tool-status lines |
110
110
  | `/antigravity-acp permissions default\|auto-edit\|yolo` | Permission mode |
111
111
 
112
+ Supplemental `/usage` queries are off by default. Context occupancy still comes from ACP `usage_update`. Run `/antigravity-acp usage auto` to opt into the extra query.
113
+
112
114
  ## Steering and queued messages
113
115
 
114
116
  By default a new user message waits for the active ACP turn to finish (`OMP_ACP_STEER_MODE=queue`) and then continues on the warm session, avoiding a full replay and OMP auto-compaction. Set `OMP_ACP_STEER_MODE=steer` to restore immediate interruption. At tool/permission boundaries the adapter falls back to steer and waits for the ACP terminal response; `OMP_ACP_STEER_GRACE_MS` (default 60000) and `OMP_ACP_STEER_GRACE_MAX_MS` (default 300000) bound that wait.
115
117
 
118
+ ACP runtimes stay warm for 15 minutes by default. Set `OMP_ACP_IDLE_TIMEOUT_MS=0` to keep them until OMP exits, or lower the value to reclaim memory sooner.
119
+
116
120
  Inference and `/antigravity-acp refresh` refuse to start ACP when no local Google login is available; run `/login` (or `/antigravity-acp login`) first instead of waiting for an interactive consent flow inside `session/new`.
117
121
 
118
122
  ## Limitations vs direct OAuth
@@ -2,7 +2,7 @@ import { describeCredentialStorage, inspectAntigravityAuth, savePermissionMode }
2
2
  import { antigravityAccountEmail, authReady, formatLogoutSummary, keychain, ompCredentialSummary, type OmpAuthCoordinator, type OmpCommandContext } from "./auth-sync.ts";
3
3
  import { parseNativeToolMode, type NativeToolMode } from "./tool-routing.ts";
4
4
  import { saveToolPolicy, type ToolPolicy } from "./tool-policy.ts";
5
- import { updateContextSettings, resolveContextOptions, saveContextSettings, type ContextSettings } from "./context-settings.ts";
5
+ import { DEFAULT_USAGE_MODE, updateContextSettings, resolveContextOptions, saveContextSettings, type ContextSettings } from "./context-settings.ts";
6
6
  import type { CatalogStore, ConfiguredCatalogModel } from "./catalog-store.ts";
7
7
  import type { SessionCleanup, CleanupMode } from "./session-cleanup.ts";
8
8
  import type { Diagnostics } from "./diagnostics.ts";
@@ -254,8 +254,8 @@ export function createAntigravityCommandHandler(deps: CommandControllerDeps) {
254
254
  if (command === "usage") {
255
255
  const currentSettings = deps.getContextSettings();
256
256
  ctx.ui.notify(JSON.stringify({
257
- configured: currentSettings.defaults.usageMode ?? "auto",
258
- effective: process.env.OMP_ACP_USAGE === "off" ? "off" : currentSettings.defaults.usageMode ?? "auto",
257
+ configured: currentSettings.defaults.usageMode ?? DEFAULT_USAGE_MODE,
258
+ effective: process.env.OMP_ACP_USAGE === "off" ? "off" : currentSettings.defaults.usageMode ?? DEFAULT_USAGE_MODE,
259
259
  connections: [...deps.connections].map(connection => ({
260
260
  context: [...connection.contextUsage].map(([sessionId, usage]) => ({
261
261
  sessionId,
@@ -12,6 +12,7 @@ export interface ContextSettings {
12
12
  defaults: ContextOptions & { usageMode?: "auto" | "off" };
13
13
  models: Record<string, ContextOptions>;
14
14
  }
15
+ export const DEFAULT_USAGE_MODE: "auto" | "off" = "off";
15
16
  const ranges: Record<keyof ContextOptions, [number, number]> = {
16
17
  contextWindow: [4096, 16_777_216], maxTokens: [1, 1_048_576], inputTokenBudget: [1, 16_777_216],
17
18
  reserveTokens: [0, 1_048_576], maxTransferBytes: [65_536, 134_217_728], maxImageBytes: [0, 100_663_296],
@@ -10,7 +10,7 @@ import { Diagnostics, instrumentRuntime } from "./diagnostics.ts";
10
10
  import { stableTools } from "./tool-order.ts";
11
11
  import { toolDeclarations, normalizeOmpSystemDeltas, type OmpToolDeclaration } from "./omp-context.ts";
12
12
  import { OmpSessionLifecycle, type OmpProviderSessionState } from "./omp-session-lifecycle.ts";
13
- import { loadContextSettings } from "./context-settings.ts";
13
+ import { DEFAULT_USAGE_MODE, loadContextSettings } from "./context-settings.ts";
14
14
  import { selectRuntimeModel, type PublicCatalogModel } from "./model-catalog.ts";
15
15
  import { TOOL_ROUTING } from "./tool-routing.ts";
16
16
  import { TranscriptRouting } from "./transcript-routing.ts";
@@ -111,7 +111,7 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string,
111
111
  }
112
112
 
113
113
  const connections = new Set<TierConnection>();
114
- const idleTimeoutMs = Number(process.env.OMP_ACP_IDLE_TIMEOUT_MS ?? 300_000);
114
+ const idleTimeoutMs = Number(process.env.OMP_ACP_IDLE_TIMEOUT_MS ?? 900_000);
115
115
  if (!Number.isSafeInteger(idleTimeoutMs) || idleTimeoutMs < 0 || idleTimeoutMs > 2_147_483_647 || (idleTimeoutMs > 0 && idleTimeoutMs < 1000)) {
116
116
  throw new Error("OMP_ACP_IDLE_TIMEOUT_MS must be 0 (disabled) or an integer between 1000 and 2147483647");
117
117
  }
@@ -138,7 +138,7 @@ export async function registerOmpAdapter(pi: OmpHostApi, stateDir: string,
138
138
  ...options,
139
139
  ompNativeTools: toolPolicy.nativeTools,
140
140
  ompDebugToolUpdates: toolPolicy.debugToolUpdates,
141
- ompUsageMode: contextSettings.defaults.usageMode ?? "auto",
141
+ ompUsageMode: contextSettings.defaults.usageMode ?? DEFAULT_USAGE_MODE,
142
142
  ompCleanup: cleanup,
143
143
  ompDiagnostics: diagnostics,
144
144
  });
@@ -19468,17 +19468,9 @@ function createStructuredFingerprintMemo() {
19468
19468
  }
19469
19469
 
19470
19470
  // extension/tool-routing.ts
19471
- var TOOL_ROUTING = `
19472
- OMP tool routing:
19473
- The supplied OMP tools are exposed by the authenticated pi-bridge MCP server with pi_ prefixes. When eagerly registered, call these tools directly using their advertised names.
19474
- For workspace reads, searches, edits, command execution, and other user tasks, choose an appropriate supplied pi_ MCP tool before considering an Antigravity-native tool. Their results return through the OMP tool loop.
19475
- You may use Antigravity's normal MCP discovery mechanism to inspect the pi-bridge tool manifests if required. Do not search unrelated directories or configuration files to locate MCP tools.
19476
- If an OMP tool fails, inspect the error and correct its arguments when appropriate. Do not switch to a native tool merely because the OMP call failed.
19477
- If no suitable OMP tool is available, explain the missing capability. Before substituting an Antigravity-native tool for a user task, state the proposed tool and reason and obtain the user's explicit approval. Without approval, stop that operation and report the limitation.
19478
- This exception does not require approval for normal pi-bridge MCP manifest discovery; it applies to performing the user's task with native tools.
19479
- `;
19471
+ var TOOL_ROUTING = "Supplied OMP tools are exposed by the authenticated pi-bridge MCP server with pi_ prefixes. Call them directly for user tasks. If no OMP tool fits, report the missing capability and obtain explicit approval before using an Antigravity-native tool.";
19480
19472
  function systemRouting(mode) {
19481
- return TOOL_ROUTING + (mode === "disabled" ? "\nNative built-in tools are disabled for this session. Use the supplied OMP MCP tools and report missing capabilities instead of substituting a native tool." : "");
19473
+ return TOOL_ROUTING + (mode === "disabled" ? "\nAntigravity-native tools are disabled for this session. Report a missing capability instead of substituting one." : "");
19482
19474
  }
19483
19475
  function supportsSessionRouting(initialize) {
19484
19476
  const version2 = initialize?.agentInfo?.version?.match(/^(\d+)\.(\d+)\.(\d+)$/);
@@ -59537,6 +59529,7 @@ function writeJsonAtomic(file2, value, pretty = true) {
59537
59529
  }
59538
59530
 
59539
59531
  // extension/context-settings.ts
59532
+ var DEFAULT_USAGE_MODE = "off";
59540
59533
  function resolveContextOptions(model, settings2) {
59541
59534
  const options = { ...settings2.defaults, ...settings2.models[model.id] };
59542
59535
  const contextWindow = options.contextWindow ?? model.contextWindow;
@@ -61175,7 +61168,6 @@ var AntigravityRuntime = class {
61175
61168
  for (const activity of mapSessionUpdate(notification)) {
61176
61169
  if (activity.type === "text") binding.writer.text(activity.delta);
61177
61170
  else if (activity.type === "thought") binding.writer.thinking(activity.delta);
61178
- else if (activity.type === "tool" || activity.type === "plan") binding.writer.thinking(activity.text);
61179
61171
  }
61180
61172
  }
61181
61173
  async ompRemoveSaved(piSessionId, acpSessionId) {
@@ -61695,7 +61687,7 @@ var TierConnection = class extends AntigravityAcpConnection {
61695
61687
  void this.process.exited.then(() => this.releaseCleanupLeases()).catch(() => {
61696
61688
  });
61697
61689
  this.debugToolUpdates = options.ompDebugToolUpdates ?? false;
61698
- this.usageMode = options.ompUsageMode ?? "auto";
61690
+ this.usageMode = options.ompUsageMode ?? DEFAULT_USAGE_MODE;
61699
61691
  this.steerMode = options.ompSteerMode ?? steerMode();
61700
61692
  this.steerTimings = options.ompSteerTimings ?? steerTimings();
61701
61693
  this.setHandlers({ ...options.handlers, onUpdate: async (notification) => {
@@ -6,6 +6,7 @@ import { installSessionRouting, type NativeToolMode } from "./tool-routing.ts";
6
6
  import { showAcpUpdate } from "./activity-presentation.ts";
7
7
  import { alignContextTokens, applyCompactionChunk, applyCompactionUpdate, isTerminalCompaction, type AcpCompactionNotice, type AcpCompactionRecord } from "./acp-compaction.ts";
8
8
  import { parseSessionUsage, usageDelta, type SessionUsage } from "./usage-accounting.ts";
9
+ import { DEFAULT_USAGE_MODE } from "./context-settings.ts";
9
10
  import type { SessionCleanup } from "./session-cleanup.ts";
10
11
  import type { Diagnostics } from "./diagnostics.ts";
11
12
  import { deferredAbortSignal, isSteerAbort, steerMode as resolveSteerMode, steerTimings as resolveSteerTimings, type SteerMode, type SteerTimings } from "./turn-cancellation.ts";
@@ -46,7 +47,7 @@ export class TierConnection extends AntigravityAcpConnection {
46
47
  this.cleanup?.start();
47
48
  void this.process.exited.then(() => this.releaseCleanupLeases()).catch(() => {});
48
49
  this.debugToolUpdates = options.ompDebugToolUpdates ?? false;
49
- this.usageMode = options.ompUsageMode ?? "auto";
50
+ this.usageMode = options.ompUsageMode ?? DEFAULT_USAGE_MODE;
50
51
  this.steerMode = options.ompSteerMode ?? resolveSteerMode();
51
52
  this.steerTimings = options.ompSteerTimings ?? resolveSteerTimings();
52
53
  this.setHandlers({ ...options.handlers, onUpdate: async notification => {
@@ -1,18 +1,11 @@
1
1
  export type NativeToolMode = "prefer" | "disabled";
2
2
 
3
- export const TOOL_ROUTING = `
4
- OMP tool routing:
5
- The supplied OMP tools are exposed by the authenticated pi-bridge MCP server with pi_ prefixes. When eagerly registered, call these tools directly using their advertised names.
6
- For workspace reads, searches, edits, command execution, and other user tasks, choose an appropriate supplied pi_ MCP tool before considering an Antigravity-native tool. Their results return through the OMP tool loop.
7
- You may use Antigravity's normal MCP discovery mechanism to inspect the pi-bridge tool manifests if required. Do not search unrelated directories or configuration files to locate MCP tools.
8
- If an OMP tool fails, inspect the error and correct its arguments when appropriate. Do not switch to a native tool merely because the OMP call failed.
9
- If no suitable OMP tool is available, explain the missing capability. Before substituting an Antigravity-native tool for a user task, state the proposed tool and reason and obtain the user's explicit approval. Without approval, stop that operation and report the limitation.
10
- This exception does not require approval for normal pi-bridge MCP manifest discovery; it applies to performing the user's task with native tools.
11
- `;
3
+ export const TOOL_ROUTING =
4
+ "Supplied OMP tools are exposed by the authenticated pi-bridge MCP server with pi_ prefixes. Call them directly for user tasks. If no OMP tool fits, report the missing capability and obtain explicit approval before using an Antigravity-native tool.";
12
5
 
13
6
  export function systemRouting(mode: NativeToolMode): string {
14
7
  return TOOL_ROUTING + (mode === "disabled"
15
- ? "\nNative built-in tools are disabled for this session. Use the supplied OMP MCP tools and report missing capabilities instead of substituting a native tool."
8
+ ? "\nAntigravity-native tools are disabled for this session. Report a missing capability instead of substituting one."
16
9
  : "");
17
10
  }
18
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-antigravity-acp-provider",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "ompAcpBundle": 1,
5
5
  "description": "Google Antigravity ACP provider for Oh My Pi (OMP), with tool bridging and per-model thinking; derived from zacbemis/pi-antigravity-acp-provider",
6
6
  "type": "module",