@ycodium-ai/agent-antigravity 0.2.4351 → 0.2.4372

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -13
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1387,7 +1387,7 @@ var require_yauzl = __commonJS({
1387
1387
  import { definePlugin } from "@ycodium-ai/plugin-api";
1388
1388
 
1389
1389
  // ../../packages/plugin-api/src/version.ts
1390
- var PLUGIN_API_VERSION = 110;
1390
+ var PLUGIN_API_VERSION = 112;
1391
1391
 
1392
1392
  // src/index.ts
1393
1393
  import {
@@ -29391,24 +29391,40 @@ function createExecutorUpdates({
29391
29391
  return;
29392
29392
  }
29393
29393
  };
29394
- const emitTaskEvents = (taskEvents) => {
29395
- for (const taskEvent of taskEvents ?? []) {
29394
+ const emitHookEvents = (hookEvents) => {
29395
+ for (const hookEvent of hookEvents ?? []) {
29396
+ if (hookEvent.type === "runtime.warning") {
29397
+ const message = hookEvent.payload.message.trim();
29398
+ if (message.length === 0) continue;
29399
+ emit({
29400
+ type: "runtime.warning",
29401
+ ...stamp(),
29402
+ provider: options2.provider,
29403
+ threadId: options2.threadId,
29404
+ ...hookEvent.turnId !== void 0 ? { turnId: hookEvent.turnId } : {},
29405
+ payload: {
29406
+ message,
29407
+ ...hookEvent.payload.detail !== void 0 ? { detail: hookEvent.payload.detail } : {}
29408
+ }
29409
+ });
29410
+ continue;
29411
+ }
29396
29412
  emit({
29397
- type: taskEvent.type,
29413
+ type: hookEvent.type,
29398
29414
  ...stamp(),
29399
29415
  provider: options2.provider,
29400
29416
  threadId: options2.threadId,
29401
- ...taskEvent.turnId !== void 0 ? { turnId: taskEvent.turnId } : {},
29402
- payload: taskEvent.payload
29417
+ ...hookEvent.turnId !== void 0 ? { turnId: hookEvent.turnId } : {},
29418
+ payload: hookEvent.payload
29403
29419
  });
29404
29420
  }
29405
29421
  };
29406
29422
  const toolSubagents = hooks.toolSubagents === void 0 ? void 0 : createToolSubagentTracker(hooks.toolSubagents);
29407
- const settleToolSubagents = (settlement, turnId) => emitTaskEvents(toolSubagents?.settle(settlement, turnId));
29423
+ const settleToolSubagents = (settlement, turnId) => emitHookEvents(toolSubagents?.settle(settlement, turnId));
29408
29424
  const settleSessionEnded = () => {
29409
29425
  settleToolSubagents("session-ended");
29410
- emitTaskEvents(subagentSessions?.settleSessionEnded());
29411
- emitTaskEvents(hooks.onSessionEnded?.());
29426
+ emitHookEvents(subagentSessions?.settleSessionEnded());
29427
+ emitHookEvents(hooks.onSessionEnded?.());
29412
29428
  };
29413
29429
  const observeContext = () => ({
29414
29430
  turnId: shared.activeTurnId,
@@ -29470,7 +29486,7 @@ function createExecutorUpdates({
29470
29486
  };
29471
29487
  const hookResult = call === void 0 ? void 0 : toolSubagents?.onToolCallUpdated(call) ?? hooks.onToolCallUpdated?.(call);
29472
29488
  const handledByHook = hookResult !== void 0 && "events" in hookResult && hookResult.handled === true;
29473
- emitTaskEvents(
29489
+ emitHookEvents(
29474
29490
  hookResult === void 0 ? [] : "events" in hookResult ? hookResult.events : hookResult
29475
29491
  );
29476
29492
  if (nextToolCall.status === "completed" && hookResult && "artifacts" in hookResult)
@@ -29567,7 +29583,7 @@ function createExecutorUpdates({
29567
29583
  };
29568
29584
  const receiveSessionUpdate = (params) => {
29569
29585
  const foreign = !shared.ownSessionIds.has(params.sessionId) && (shared.childSessions.has(params.sessionId) || shared.sessionOpensInFlight === 0 && shared.ownSessionIds.size > 0);
29570
- emitTaskEvents(
29586
+ emitHookEvents(
29571
29587
  subagentSessions?.observe(params, {
29572
29588
  turnId: shared.activeTurnId,
29573
29589
  foreign,
@@ -29577,7 +29593,7 @@ function createExecutorUpdates({
29577
29593
  );
29578
29594
  if (!shared.sessionLoadInFlight) {
29579
29595
  if (hooks.onSessionUpdate) {
29580
- emitTaskEvents(hooks.onSessionUpdate(params, { ...observeContext(), foreign }));
29596
+ emitHookEvents(hooks.onSessionUpdate(params, { ...observeContext(), foreign }));
29581
29597
  }
29582
29598
  }
29583
29599
  if (!foreign) handleSessionUpdate(params);
@@ -29585,7 +29601,7 @@ function createExecutorUpdates({
29585
29601
  const receiveExtensionNotification = (method, params) => {
29586
29602
  if (shared.sessionLoadInFlight || !hooks.onExtensionNotification) return;
29587
29603
  const result = hooks.onExtensionNotification(method, params, observeContext());
29588
- if (Array.isArray(result)) emitTaskEvents(result);
29604
+ if (Array.isArray(result)) emitHookEvents(result);
29589
29605
  };
29590
29606
  return {
29591
29607
  emitCompactionState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-antigravity",
3
- "version": "0.2.4351",
3
+ "version": "0.2.4372",
4
4
  "description": "Google Antigravity executor: runs the Antigravity agent over Agent Client Protocol stdio.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -31,9 +31,9 @@
31
31
  "typescript": "~6.0.3",
32
32
  "vite-plus": "0.2.2",
33
33
  "yauzl": "^3.4.0",
34
- "@ycodium-ai/plugin-api": "0.2.4351",
35
- "ycodium-acp-executor": "0.2.4351",
36
- "ycodium-executor-testing": "0.0.0"
34
+ "ycodium-acp-executor": "0.2.4372",
35
+ "ycodium-executor-testing": "0.0.0",
36
+ "@ycodium-ai/plugin-api": "0.2.4372"
37
37
  },
38
38
  "ycodium": {
39
39
  "plugin": "./dist/index.js",