clisponsor 1.0.8 → 1.0.9

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.
@@ -15,7 +15,7 @@ const DEFAULT_SERVE_BASE_URL =
15
15
  const DEFAULT_BACKEND_BASE_URL = process.env.CLISPONSOR_BACKEND_BASE_URL || "https://backend.clisponsor.com";
16
16
  const HOOK_VERSION = "1.0.0";
17
17
  const NETWORK_TIMEOUT_MS = 3000;
18
- const ANTIGRAVITY_EVENTS = ["PreInvocation", "Stop"];
18
+ const ANTIGRAVITY_EVENTS = ["PreInvocation"];
19
19
 
20
20
  function argValue(name) {
21
21
  const prefix = `${name}=`;
@@ -434,10 +434,6 @@ try {
434
434
  console.log(JSON.stringify({}));
435
435
  process.exit(0);
436
436
  }
437
- if (event === "Stop" && hookInput.fullyIdle === false) {
438
- console.log(JSON.stringify({ decision: "allow" }));
439
- process.exit(0);
440
- }
441
437
  }
442
438
  const placement = placements[event] || event;
443
439
  const body = { user_id: cfg.userId, device_code: cfg.deviceCode, client: ${JSON.stringify(client)}, hook_event: event, placement, idempotency_key: crypto.randomUUID(), metadata: { hookVersion: ${JSON.stringify(HOOK_VERSION)}, antigravity: outputMode === "antigravity" ? { invocationNum: hookInput.invocationNum, initialNumSteps: hookInput.initialNumSteps, executionNum: hookInput.executionNum, terminationReason: hookInput.terminationReason, fullyIdle: hookInput.fullyIdle } : undefined } };
@@ -453,8 +449,8 @@ try {
453
449
  if (res.ok) {
454
450
  const ad = await res.json();
455
451
  if (outputMode === "antigravity") {
456
- const payload = { decision: "allow" };
457
- if (ad.display_line) payload.systemMessage = sponsoredLine(ad.display_line);
452
+ const payload = {};
453
+ if (ad.display_line) payload.injectSteps = [{ ephemeralMessage: sponsoredLine(ad.display_line) }];
458
454
  console.log(JSON.stringify(payload));
459
455
  } else if (ad.display_line) {
460
456
  console.log(JSON.stringify({ systemMessage: sponsoredLine(ad.display_line) }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clisponsor",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "CLIsponsor installer for Codex, Claude Code, and Gemini sponsored CLI placements.",
5
5
  "type": "module",
6
6
  "engines": {