@quantiya/codevibe-antigravity-plugin 2.0.53 → 2.0.55

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/dist/server.js CHANGED
@@ -32,6 +32,7 @@ var server_exports = {};
32
32
  __export(server_exports, {
33
33
  McpServer: () => McpServer,
34
34
  SessionNotFoundError: () => SessionNotFoundError,
35
+ StoredAuthFailureError: () => StoredAuthFailureError,
35
36
  TERMINAL_SHUTDOWN_SIGNALS: () => TERMINAL_SHUTDOWN_SIGNALS,
36
37
  __testing: () => __testing,
37
38
  classifyEntrypoint: () => classifyEntrypoint,
@@ -3750,6 +3751,13 @@ var AgyToolActivityIntegration = class {
3750
3751
  };
3751
3752
 
3752
3753
  // src/server.ts
3754
+ var StoredAuthFailureError = class extends Error {
3755
+ constructor(message, exitCode) {
3756
+ super(message);
3757
+ this.exitCode = exitCode;
3758
+ this.name = "StoredAuthFailureError";
3759
+ }
3760
+ };
3753
3761
  var MOBILE_PROMPT_FLOOR_RECENCY_MS = 12e4;
3754
3762
  var LAUNCH_SETTLE_TIMEOUT_MS = 3e3;
3755
3763
  var TMUX_LIFECYCLE_POLL_MS = 1e3;
@@ -3996,13 +4004,19 @@ var McpServer = class _McpServer {
3996
4004
  });
3997
4005
  const authed = await this.appSyncClient.authenticateWithStoredTokens();
3998
4006
  if (!authed) {
4007
+ const kind = this.appSyncClient.getLastAuthFailureKind();
4008
+ const failure = (0, import_codevibe_core5.describeStoredAuthFailure)(
4009
+ kind,
4010
+ this.appSyncClient.getLastAuthFailureDetail()
4011
+ );
3999
4012
  await fireDaemonBeacon("daemon_init_step", {
4000
4013
  step: "auth",
4001
4014
  outcome: "fail",
4002
- error_message: "no stored OAuth tokens"
4015
+ error_message: kind === "credential_storage_unavailable" ? "credential storage unavailable" : kind === "refresh_network" ? "token refresh network failure" : kind === "refresh_auth_rejected" ? "token refresh rejected" : "no stored OAuth tokens"
4003
4016
  });
4004
- throw new Error(
4005
- "codevibe-antigravity-plugin: no OAuth tokens \u2014 run `codevibe login` first"
4017
+ throw new StoredAuthFailureError(
4018
+ `codevibe-antigravity-plugin: ${failure.message}`,
4019
+ failure.exitCode
4006
4020
  );
4007
4021
  }
4008
4022
  this.started = true;
@@ -6019,6 +6033,10 @@ async function main() {
6019
6033
  const { httpPort } = await server.start();
6020
6034
  logger.info("codevibe-antigravity-plugin ready", { httpPort });
6021
6035
  } catch (err) {
6036
+ if (err instanceof StoredAuthFailureError) {
6037
+ console.error(err.message);
6038
+ process.exit(err.exitCode);
6039
+ }
6022
6040
  console.error("startup failed:", err);
6023
6041
  process.exit(1);
6024
6042
  }
@@ -6137,6 +6155,7 @@ var __testing = {
6137
6155
  0 && (module.exports = {
6138
6156
  McpServer,
6139
6157
  SessionNotFoundError,
6158
+ StoredAuthFailureError,
6140
6159
  TERMINAL_SHUTDOWN_SIGNALS,
6141
6160
  __testing,
6142
6161
  classifyEntrypoint,
@@ -538,16 +538,30 @@ log "MCP server PID: $MCP_PID"
538
538
  # but-eventually-up server is fine here. (Codex Stage 2 HIGH 2026-05-20.)
539
539
  sleep 1
540
540
  if ! kill -0 "$MCP_PID" 2>/dev/null; then
541
- log "MCP server died on startup"
541
+ # Our child: its exit code says why (78 = stored credentials unreadable, which
542
+ # signing in again does not fix). set -e: collect it without aborting.
543
+ MCP_RC=0
544
+ wait "$MCP_PID" 2>/dev/null || MCP_RC=$?
545
+ log "MCP server died on startup (exit $MCP_RC)"
542
546
  echo ""
543
- tail -3 "$MCP_LOG_FILE" 2>/dev/null | grep -v '^\[' | head -3
544
- echo ""
545
- echo "Server failed to start. Check $MCP_LOG_FILE for details."
546
- echo "Common causes: not signed in (\`codevibe login\`), port in use, ENV mismatch."
547
+ if [ "$MCP_RC" = "78" ]; then
548
+ awk '/CodeVibe could not read its stored credentials/ { block = ""; on = 1 } on && !/^\[/ { block = block $0 "\n" } END { printf "%s", block }' "$MCP_LOG_FILE" 2>/dev/null
549
+ echo ""
550
+ echo "Server failed to start. Full log: $MCP_LOG_FILE"
551
+ else
552
+ tail -3 "$MCP_LOG_FILE" 2>/dev/null | grep -v '^\[' | head -3
553
+ echo ""
554
+ echo "Server failed to start. Check $MCP_LOG_FILE for details."
555
+ echo "Common causes: not signed in (\`codevibe login\`), port in use, ENV mismatch."
556
+ fi
547
557
  # tmux session is already created — destroy it so the user doesn't
548
558
  # attach to a degraded session that will time-out waiting for conn.json.
549
559
  tmux kill-session -t "$SESSION_NAME" 2>/dev/null || true
550
- cv_failed "server_died_on_startup"
560
+ if [ "$MCP_RC" = "78" ]; then
561
+ cv_failed "credential_storage_unavailable"
562
+ else
563
+ cv_failed "server_died_on_startup"
564
+ fi
551
565
  sleep 1
552
566
  exit 1
553
567
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantiya/codevibe-antigravity-plugin",
3
- "version": "2.0.53",
3
+ "version": "2.0.55",
4
4
  "description": "Control Antigravity CLI from your iPhone and Android — real-time sync, approve file edits, send prompts by voice. Part of CodeVibe.",
5
5
  "main": "dist/server.js",
6
6
  "codevibe": {
@@ -46,7 +46,7 @@
46
46
  "node": ">=22.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@quantiya/codevibe-core": "^2.0.49",
49
+ "@quantiya/codevibe-core": "^2.0.51",
50
50
  "chokidar": "^5.0.0",
51
51
  "dotenv": "^16.6.1",
52
52
  "express": "^5.1.0",