dsh-antigravity-auth 0.1.0

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 (114) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +21 -0
  3. package/README.md +168 -0
  4. package/README.zh.md +159 -0
  5. package/cordis.patch.yml +12 -0
  6. package/lib/capability-lifecycle--tgGKajs.js +1896 -0
  7. package/lib/client.cjs +2123 -0
  8. package/lib/client.cjs.map +1 -0
  9. package/lib/image.js +564 -0
  10. package/lib/index.js +176 -0
  11. package/lib/invariant.js +2 -0
  12. package/lib/live-gate-runner.js +542 -0
  13. package/lib/live-gates.js +97 -0
  14. package/lib/llm-adapter.js +916 -0
  15. package/lib/media-admission.js +206 -0
  16. package/lib/private-failure-B9vzUkQ7.js +23 -0
  17. package/lib/private-transport-urF138qW.js +641 -0
  18. package/lib/private-transport.js +2 -0
  19. package/lib/project-context.js +133 -0
  20. package/lib/quota.js +283 -0
  21. package/lib/replay.js +156 -0
  22. package/lib/rpc-contract-BFWfdKKs.js +491 -0
  23. package/lib/rpc-contract.js +2 -0
  24. package/lib/safe-text-AlEyN8q_.js +12 -0
  25. package/lib/search.js +259 -0
  26. package/lib/status-D0-em3Ru.js +125 -0
  27. package/lib/types/auth-service.d.ts +64 -0
  28. package/lib/types/auth-service.d.ts.map +1 -0
  29. package/lib/types/auth-store.d.ts +45 -0
  30. package/lib/types/auth-store.d.ts.map +1 -0
  31. package/lib/types/bootstrap-service.d.ts +6 -0
  32. package/lib/types/bootstrap-service.d.ts.map +1 -0
  33. package/lib/types/capability-gates.d.ts +19 -0
  34. package/lib/types/capability-gates.d.ts.map +1 -0
  35. package/lib/types/capability-lifecycle.d.ts +26 -0
  36. package/lib/types/capability-lifecycle.d.ts.map +1 -0
  37. package/lib/types/client/AntigravityAuthSettings.d.ts +19 -0
  38. package/lib/types/client/AntigravityAuthSettings.d.ts.map +1 -0
  39. package/lib/types/client/index.d.ts +18 -0
  40. package/lib/types/client/index.d.ts.map +1 -0
  41. package/lib/types/client/locales.d.ts +121 -0
  42. package/lib/types/client/locales.d.ts.map +1 -0
  43. package/lib/types/client/styles.d.ts +4 -0
  44. package/lib/types/client/styles.d.ts.map +1 -0
  45. package/lib/types/credential-coordinator.d.ts +84 -0
  46. package/lib/types/credential-coordinator.d.ts.map +1 -0
  47. package/lib/types/image.d.ts +39 -0
  48. package/lib/types/image.d.ts.map +1 -0
  49. package/lib/types/index.d.ts +21 -0
  50. package/lib/types/index.d.ts.map +1 -0
  51. package/lib/types/invariant.d.ts +3 -0
  52. package/lib/types/invariant.d.ts.map +1 -0
  53. package/lib/types/live-gate-attachments.d.ts +6 -0
  54. package/lib/types/live-gate-attachments.d.ts.map +1 -0
  55. package/lib/types/live-gate-auth.d.ts +5 -0
  56. package/lib/types/live-gate-auth.d.ts.map +1 -0
  57. package/lib/types/live-gate-image.d.ts +5 -0
  58. package/lib/types/live-gate-image.d.ts.map +1 -0
  59. package/lib/types/live-gate-llm.d.ts +10 -0
  60. package/lib/types/live-gate-llm.d.ts.map +1 -0
  61. package/lib/types/live-gate-outcome.d.ts +8 -0
  62. package/lib/types/live-gate-outcome.d.ts.map +1 -0
  63. package/lib/types/live-gate-runner.d.ts +15 -0
  64. package/lib/types/live-gate-runner.d.ts.map +1 -0
  65. package/lib/types/live-gate-search.d.ts +5 -0
  66. package/lib/types/live-gate-search.d.ts.map +1 -0
  67. package/lib/types/live-gate-video.d.ts +8 -0
  68. package/lib/types/live-gate-video.d.ts.map +1 -0
  69. package/lib/types/live-gates.d.ts +25 -0
  70. package/lib/types/live-gates.d.ts.map +1 -0
  71. package/lib/types/llm-adapter.d.ts +65 -0
  72. package/lib/types/llm-adapter.d.ts.map +1 -0
  73. package/lib/types/login-types.d.ts +36 -0
  74. package/lib/types/login-types.d.ts.map +1 -0
  75. package/lib/types/media-admission.d.ts +54 -0
  76. package/lib/types/media-admission.d.ts.map +1 -0
  77. package/lib/types/model-catalog.d.ts +19 -0
  78. package/lib/types/model-catalog.d.ts.map +1 -0
  79. package/lib/types/oauth-flow.d.ts +87 -0
  80. package/lib/types/oauth-flow.d.ts.map +1 -0
  81. package/lib/types/private-failure.d.ts +6 -0
  82. package/lib/types/private-failure.d.ts.map +1 -0
  83. package/lib/types/private-transport-error.d.ts +13 -0
  84. package/lib/types/private-transport-error.d.ts.map +1 -0
  85. package/lib/types/private-transport.d.ts +48 -0
  86. package/lib/types/private-transport.d.ts.map +1 -0
  87. package/lib/types/project-context.d.ts +30 -0
  88. package/lib/types/project-context.d.ts.map +1 -0
  89. package/lib/types/quota.d.ts +43 -0
  90. package/lib/types/quota.d.ts.map +1 -0
  91. package/lib/types/raw-http.d.ts +11 -0
  92. package/lib/types/raw-http.d.ts.map +1 -0
  93. package/lib/types/replay.d.ts +30 -0
  94. package/lib/types/replay.d.ts.map +1 -0
  95. package/lib/types/rpc-contract.d.ts +33 -0
  96. package/lib/types/rpc-contract.d.ts.map +1 -0
  97. package/lib/types/rpc-vocabulary.d.ts +7 -0
  98. package/lib/types/rpc-vocabulary.d.ts.map +1 -0
  99. package/lib/types/rpc.d.ts +11 -0
  100. package/lib/types/rpc.d.ts.map +1 -0
  101. package/lib/types/safe-text.d.ts +3 -0
  102. package/lib/types/safe-text.d.ts.map +1 -0
  103. package/lib/types/search.d.ts +42 -0
  104. package/lib/types/search.d.ts.map +1 -0
  105. package/lib/types/status.d.ts +62 -0
  106. package/lib/types/status.d.ts.map +1 -0
  107. package/lib/types/video.d.ts +42 -0
  108. package/lib/types/video.d.ts.map +1 -0
  109. package/lib/types/wire-identity.d.ts +49 -0
  110. package/lib/types/wire-identity.d.ts.map +1 -0
  111. package/lib/video.js +320 -0
  112. package/lib/wire-identity.js +162 -0
  113. package/package.json +189 -0
  114. package/scripts/live-gates.mjs +4 -0
@@ -0,0 +1,121 @@
1
+ /** English and Chinese copy for the private bootstrap settings section. */
2
+ export declare const en: {
3
+ readonly nav: "Antigravity";
4
+ readonly title: "Antigravity Auth";
5
+ readonly intro: "使用 Antigravity Auth 登录接入 Antigravity 的 LLM、文生图、Websearch、视频理解能力。";
6
+ readonly riskTitle: "Before you continue";
7
+ readonly risk: "Google does not support third-party Antigravity login tools. Your account may be suspended or terminated.";
8
+ readonly terms: "Review the Google FAQ before continuing.";
9
+ readonly additionalTerms: "Review the Additional Terms.";
10
+ readonly singleAccount: "Single-account only. This bundle does not provide an account pool.";
11
+ readonly riskAcknowledgement: "I understand the unofficial third-party login risk and want to continue.";
12
+ readonly acknowledgeBusy: "Saving acknowledgement…";
13
+ readonly acknowledgeFailed: "The risk acknowledgement could not be recorded.";
14
+ readonly login: "Start Antigravity login";
15
+ readonly startingLogin: "Starting login…";
16
+ readonly cancelLogin: "Cancel login";
17
+ readonly cancelLoginFailed: "The login cancellation failed.";
18
+ readonly openAuthorization: "Open the Google authorization page";
19
+ readonly loginReady: "Login is ready to start.";
20
+ readonly loginRequiresAck: "Acknowledge the risk before login can begin.";
21
+ readonly loginPending: "Login is waiting for the browser authorization callback.";
22
+ readonly loginSuccess: "Login completed successfully.";
23
+ readonly loginCancelled: "Login was cancelled.";
24
+ readonly loginExpired: "The login expired. Start again to receive a new authorization link.";
25
+ readonly loginPortConflict: "The fixed callback port is already in use. Close the conflicting process and try again.";
26
+ readonly loginFailed: "The login could not be completed safely.";
27
+ readonly credentialLoggedIn: "The Antigravity account is ready.";
28
+ readonly credentialRefreshing: "Refreshing the Antigravity access token…";
29
+ readonly credentialRefreshFailed: "The access token could not be refreshed. No fallback account or endpoint was used.";
30
+ readonly credentialReloginRequired: "The Antigravity grant requires login again.";
31
+ readonly credentialLoggedOut: "The Antigravity account is logged out on this Host.";
32
+ readonly logout: "Log out locally";
33
+ readonly logoutFailed: "The local logout could not be completed.";
34
+ readonly revoke: "Revoke Google grant";
35
+ readonly revokeConfirm: "Revoke this Google grant? This is separate from local logout.";
36
+ readonly revokePending: "Revoking the Google grant…";
37
+ readonly revokeSuccess: "The Google grant was revoked and local state was cleared.";
38
+ readonly revokeFailed: "The Google grant could not be revoked. Local state was retained.";
39
+ readonly revokeSuperseded: "The account changed before revocation completed. No newer account was cleared.";
40
+ readonly revokeConfirmationRequired: "Confirm revocation before contacting Google.";
41
+ readonly account: "Account";
42
+ readonly projectAvailable: "Read-only project validation is available.";
43
+ readonly projectUnavailable: "No usable project is available.";
44
+ readonly projectAuthenticationFailed: "Project discovery requires a fresh authenticated grant.";
45
+ readonly projectForbidden: "This account is not allowed to use the discovered project.";
46
+ readonly projectRateLimited: "Project discovery was rate-limited. No fallback project was used.";
47
+ readonly projectOffline: "Project discovery is temporarily offline. No fallback project was used.";
48
+ readonly projectMalformed: "Project discovery returned a malformed response.";
49
+ readonly projectProtocolDrift: "Project discovery no longer matches the audited protocol.";
50
+ readonly expiresAt: "Authorization link expires";
51
+ readonly statusLoading: "Loading capability status…";
52
+ readonly statusFailed: "Capability status is unavailable.";
53
+ readonly retry: "Retry";
54
+ readonly capabilityTitle: "Capability gates";
55
+ readonly authLlm: "Auth / LLM";
56
+ readonly search: "Web Search";
57
+ readonly image: "Image";
58
+ readonly video: "Video";
59
+ readonly available: "Available";
60
+ readonly disabled: "Disabled";
61
+ readonly pocPending: "POC pending";
62
+ readonly protocolDrift: "Protocol drift";
63
+ readonly gateNotRun: "This capability gate has not been run.";
64
+ readonly gateUnauthenticated: "This gate requires a fresh authenticated grant.";
65
+ readonly gateRateLimited: "This gate was rate-limited; no fallback was attempted.";
66
+ readonly gateCancelled: "This gate run was cancelled.";
67
+ readonly gate0Failed: "The fixed Wire Identity was rejected by Gate 0.";
68
+ readonly gateFailed: "This capability gate failed safely.";
69
+ readonly unsupportedVideo: "The private endpoint rejected native video input.";
70
+ readonly acknowledged: "Risk acknowledged for this Host session.";
71
+ readonly settingsTitle: "Capability settings";
72
+ readonly toggleSearch: "Enable grounded Web Search";
73
+ readonly toggleImage: "Enable image generation and editing";
74
+ readonly toggleVideo: "Enable video understanding POC";
75
+ readonly settingsUnavailable: "Unavailable until login, project validation, the live gate, and a writable Host settings scope are ready.";
76
+ readonly modelsTitle: "Models";
77
+ readonly modelsSnapshot: "Showing the pinned audited snapshot; live availability has not been refreshed.";
78
+ readonly modelsLiveAvailable: "Live account availability was intersected with the pinned snapshot.";
79
+ readonly modelsRefreshFailed: "Live availability refresh failed safely; the pinned snapshot remains advisory.";
80
+ readonly modelsProtocolDrift: "Live model discovery no longer matches the audited protocol.";
81
+ readonly modelsSnapshotEntry: "Snapshot";
82
+ readonly modelsAvailableEntry: "Live available";
83
+ readonly modelsUnavailableEntry: "Unavailable to this account";
84
+ readonly modelsFailed: "Model availability could not be loaded safely.";
85
+ readonly modelsLoading: "Refreshing models…";
86
+ readonly modelsRefresh: "Refresh model availability";
87
+ readonly quotaTitle: "Usage and quota";
88
+ readonly quotaAvailable: "Quota is available from the current account.";
89
+ readonly quotaUnknown: "Quota has not been queried.";
90
+ readonly quotaUnauthenticated: "Log in to query quota.";
91
+ readonly quotaForbidden: "This account is not allowed to query quota.";
92
+ readonly quotaRateLimited: "Quota is rate-limited; try again later.";
93
+ readonly quotaOffline: "Quota is temporarily unavailable.";
94
+ readonly quotaProtocolDrift: "Quota protocol drift was detected; raw provider data was discarded.";
95
+ readonly quotaFailed: "Quota could not be loaded safely.";
96
+ readonly quotaLoading: "Refreshing quota…";
97
+ readonly quotaRefresh: "Refresh quota";
98
+ readonly quotaFiveHour: "Five-hour window";
99
+ readonly quotaWeekly: "Weekly window";
100
+ readonly searchCardIntro: "Google Antigravity Search Provider used by the stock web_search tool.";
101
+ readonly imageCardIntro: "Durable image generation tools for image-capable models (gemini-3.1-flash-image).";
102
+ readonly videoCardIntro: "Workspace MP4 video understanding tools for multimodal models (gemini-3.7-flash).";
103
+ readonly privacyNotice: "共享Antigravity 登录态与Antigravity模型路由。";
104
+ readonly relogin: "Log in again with Google";
105
+ readonly authCardTitle: "Login";
106
+ readonly authCardIntro: "Share Antigravity session and Antigravity model routing.";
107
+ readonly queryingQuota: "Querying quota…";
108
+ readonly geminiGroupTitle: "GEMINI MODELS";
109
+ readonly geminiGroupDesc: "Models within this group: Gemini Flash, Gemini Pro";
110
+ readonly claudeGptGroupTitle: "CLAUDE AND GPT MODELS";
111
+ readonly claudeGptGroupDesc: "Models within this group: Claude Opus, Claude Sonnet, GPT-OSS";
112
+ readonly window5hTitle: "Five Hour Limit Remaining";
113
+ readonly windowWeeklyTitle: "Weekly Limit Remaining";
114
+ readonly quotaFooterNotice: "No token value is ever sent to the Web client, settings, logs, events, or tool metadata.";
115
+ readonly refreshStatus: "Refresh status";
116
+ readonly remaining: "remaining";
117
+ readonly refreshesIn: "Refreshes in";
118
+ };
119
+ export type AntigravityAuthKey = keyof typeof en;
120
+ export declare const zh: Record<AntigravityAuthKey, string>;
121
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoHL,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,EAAE,CAAA;AAEhD,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAoHjD,CAAA"}
@@ -0,0 +1,4 @@
1
+ /** Embedded CSS stylesheet for value-safe Antigravity settings UI. */
2
+ export declare const SETTINGS_CSS = "\n.agy-settings {\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: 100%;\n max-width: 820px;\n margin: 0 auto;\n padding: 4px 0 32px;\n color: var(--dsw-alias-label-primary, #e6edf3);\n font-family: var(--dsw-font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif);\n font-size: 13px;\n line-height: 1.5;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n}\n\n.agy-settings *,\n.agy-settings *::before,\n.agy-settings *::after {\n box-sizing: border-box;\n}\n\n.agy-bundle-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 20px;\n}\n\n.agy-title-line {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.agy-bundle-title {\n margin: 0;\n font-size: 20px;\n line-height: 28px;\n font-weight: 600;\n letter-spacing: -0.015em;\n color: var(--dsw-alias-label-primary, #e6edf3);\n}\n\n.agy-status-dot {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #10b981;\n box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);\n flex: none;\n}\n\n.agy-bundle-intro,\n.agy-card-intro {\n margin: 4px 0 0;\n color: var(--dsw-alias-label-tertiary, #8b949e);\n font-size: 13px;\n line-height: 20px;\n}\n\n.agy-cards {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.agy-card {\n display: flex;\n flex-direction: column;\n gap: 14px;\n padding: 18px 20px;\n border-radius: 16px;\n background: var(--dsw-alias-bg-layer-2, rgba(255, 255, 255, 0.03));\n border: 1px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.08));\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n}\n\n.agy-card-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n}\n\n.agy-card-identity {\n min-width: 0;\n flex: 1;\n}\n\n.agy-card-title-line {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.agy-card-title {\n margin: 0;\n font-size: 15px;\n line-height: 22px;\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #e6edf3);\n}\n\n.agy-card-action {\n flex: none;\n display: flex;\n align-items: center;\n}\n\n.agy-risk-card {\n background: rgba(234, 179, 8, 0.04);\n border: 1px solid rgba(234, 179, 8, 0.2);\n border-radius: 14px;\n padding: 16px 18px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.agy-risk-text {\n color: var(--dsw-alias-label-secondary, #9ca3af);\n font-size: 13px;\n line-height: 19px;\n margin: 0;\n}\n\n.agy-link-group {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 12px;\n margin: 0;\n}\n\n.agy-link {\n color: var(--dsw-alias-interactive-text, #38bdf8);\n font-size: 12px;\n text-decoration: none;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.agy-link:hover {\n text-decoration: underline;\n color: #7dd3fc;\n}\n\n.agy-ack-row {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n background: var(--dsw-alias-bg-layer-1, rgba(0, 0, 0, 0.2));\n border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.06));\n border-radius: 8px;\n cursor: pointer;\n user-select: none;\n font-size: 13px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary, #e6edf3);\n}\n\n.agy-checkbox {\n flex: none;\n width: 16px;\n height: 16px;\n margin: 0;\n accent-color: var(--dsw-alias-button-primary-fill, #3b82f6);\n cursor: pointer;\n}\n\n.agy-checkbox:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.agy-facts {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 12px 16px;\n margin: 0;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--dsw-alias-bg-layer-3, rgba(255, 255, 255, 0.02));\n border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.05));\n}\n\n.agy-fact {\n min-width: 0;\n}\n\n.agy-fact dt {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #8b949e);\n}\n\n.agy-fact dd {\n margin: 2px 0 0;\n font-size: 13px;\n line-height: 18px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary, #e6edf3);\n overflow-wrap: anywhere;\n font-variant-numeric: tabular-nums;\n}\n\n/* Quota Section */\n.agy-quota-section {\n display: flex;\n flex-direction: column;\n gap: 14px;\n margin-top: 4px;\n}\n\n.agy-quota-group {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--dsw-alias-bg-layer-1, rgba(0, 0, 0, 0.15));\n border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.05));\n box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.03));\n}\n\n.agy-quota-group-header {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.agy-quota-group-title {\n margin: 0;\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n color: var(--dsw-alias-label-secondary, #a1a1aa);\n}\n\n.agy-quota-group-desc {\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #71717a);\n}\n\n.agy-quota-buckets {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 4px;\n}\n\n.agy-quota-bucket {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.agy-quota-bucket-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 12px;\n line-height: 18px;\n}\n\n.agy-quota-bucket-name {\n font-weight: 500;\n color: var(--dsw-alias-label-secondary, #d4d4d8);\n}\n\n.agy-quota-bucket-val {\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n font-family: var(--dsw-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);\n color: var(--dsw-alias-label-primary, #ffffff);\n animation: agy-fade-in 250ms ease;\n}\n\n.agy-quota-bucket-val[data-tone='normal'] {\n color: var(--dsw-alias-state-success-label, #10b981);\n}\n\n.agy-quota-bucket-val[data-tone='warning'] {\n color: var(--dsw-alias-state-warn-label, #f59e0b);\n}\n\n.agy-quota-bucket-val[data-tone='error'] {\n color: var(--dsw-alias-state-error-label, #ef4444);\n}\n\n.agy-quota-querying {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n color: var(--dsw-alias-label-tertiary, #71717a);\n font-size: 12px;\n line-height: 18px;\n animation: agy-fade-in 200ms ease;\n}\n\n.agy-querying-spinner {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n border: 1.5px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.15));\n border-top-color: var(--dsw-alias-brand-primary, #4f6ef7);\n animation: agy-spin 0.8s linear infinite;\n display: inline-block;\n flex: none;\n}\n\n.agy-progress-track {\n position: relative;\n height: 6px;\n width: 100%;\n border-radius: 999px;\n background: var(--dsw-alias-bg-layer-1, rgba(0, 0, 0, 0.2));\n box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.08));\n overflow: hidden;\n}\n\n@keyframes agy-fill-progress {\n from {\n transform: scaleX(0);\n opacity: 0.7;\n }\n to {\n transform: scaleX(1);\n opacity: 1;\n }\n}\n\n.agy-progress-bar {\n height: 100%;\n border-radius: 999px;\n transform-origin: left center;\n animation: agy-fill-progress 650ms cubic-bezier(0.16, 1, 0.3, 1) forwards;\n transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1), background 400ms ease;\n}\n\n.agy-progress-bar[data-tone='normal'] {\n background: linear-gradient(90deg, #f59e0b 0%, #10b981 35%, #059669 100%);\n}\n\n.agy-progress-bar[data-tone='warning'] {\n background: linear-gradient(90deg, #ef4444 0%, #f97316 40%, #f59e0b 100%);\n}\n\n.agy-progress-bar[data-tone='error'] {\n background: linear-gradient(90deg, #f87171 0%, #ef4444 50%, #dc2626 100%);\n}\n\n.agy-shimmer-track {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n border-radius: 999px;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n var(--dsw-alias-fill-tertiary, rgba(255, 255, 255, 0.06)) 25%,\n var(--dsw-alias-fill-secondary, rgba(255, 255, 255, 0.14)) 50%,\n var(--dsw-alias-fill-tertiary, rgba(255, 255, 255, 0.06)) 75%,\n transparent 100%\n );\n background-size: 200% 100%;\n animation: agy-shimmer-stream 1.6s ease-in-out infinite;\n}\n\n@keyframes agy-shimmer-stream {\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n}\n\n@keyframes agy-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.agy-quota-subtext {\n font-size: 11px;\n line-height: 16px;\n color: var(--dsw-alias-label-tertiary, #71717a);\n font-variant-numeric: tabular-nums;\n}\n\n/* Actions */\n.agy-action-row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n margin-top: 4px;\n}\n\n.agy-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 32px;\n padding: 0 14px;\n border-radius: 999px;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n cursor: pointer;\n border: 1px solid transparent;\n background: var(--dsw-alias-bg-layer-3, rgba(255, 255, 255, 0.08));\n color: var(--dsw-alias-label-primary, #e6edf3);\n text-decoration: none;\n transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;\n}\n\n.agy-btn:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(255, 255, 255, 0.12));\n}\n\n.agy-btn:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.agy-btn-primary {\n background: var(--dsw-alias-button-primary-fill, #18181b);\n color: var(--dsw-alias-label-primary-foreground, #ffffff);\n border: 1px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.15));\n}\n\n.agy-btn-primary:hover:not(:disabled) {\n background: var(--dsw-alias-button-primary-hover, #27272a);\n}\n\n.agy-btn-outline {\n background: transparent;\n border: 1px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.15));\n color: var(--dsw-alias-label-primary, #e6edf3);\n}\n\n.agy-btn-outline:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(255, 255, 255, 0.08));\n}\n\n.agy-btn-ghost {\n background: transparent !important;\n border-color: transparent !important;\n color: var(--dsw-alias-label-secondary, #a1a1aa) !important;\n padding: 0 10px !important;\n border-radius: 6px !important;\n}\n\n.agy-btn-ghost:hover:not(:disabled) {\n background: var(--dsw-alias-fill-tertiary, rgba(255, 255, 255, 0.06)) !important;\n color: var(--dsw-alias-label-primary, #ffffff) !important;\n}\n\n.agy-refresh-btn {\n margin-left: auto;\n}\n\n.agy-footer-notice {\n margin: 6px 0 0;\n color: var(--dsw-alias-label-tertiary, #71717a);\n font-size: 11px;\n line-height: 17px;\n}\n\n.agy-privacy {\n font-size: 11px;\n line-height: 16px;\n color: var(--dsw-alias-label-tertiary, #6e7681);\n margin: 4px 0 0;\n}\n\n.agy-alert {\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 18px;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n background: rgba(239, 68, 68, 0.1);\n border: 1px solid rgba(239, 68, 68, 0.25);\n color: #fca5a5;\n}\n\n.agy-item-list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.agy-item-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 10px 14px;\n background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.02));\n border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.05));\n border-radius: 8px;\n}\n\n.agy-item-title {\n font-size: 13px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary, #e6edf3);\n}\n\n.agy-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 500;\n line-height: 16px;\n white-space: nowrap;\n flex: none;\n}\n\n.agy-badge-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n flex: none;\n}\n\n.agy-badge-available {\n background: rgba(34, 197, 94, 0.12);\n color: #4ade80;\n border: 1px solid rgba(34, 197, 94, 0.25);\n}\n\n.agy-badge-available .agy-badge-dot {\n background: #22c55e;\n}\n\n.agy-badge-disabled {\n background: rgba(148, 163, 184, 0.1);\n color: #94a3b8;\n border: 1px solid rgba(148, 163, 184, 0.2);\n}\n\n.agy-badge-disabled .agy-badge-dot {\n background: #64748b;\n}\n\n.agy-badge-warning {\n background: rgba(234, 179, 8, 0.12);\n color: #facc15;\n border: 1px solid rgba(234, 179, 8, 0.25);\n}\n\n.agy-badge-warning .agy-badge-dot {\n background: #eab308;\n}\n\n.agy-badge-error {\n background: rgba(239, 68, 68, 0.12);\n color: #f87171;\n border: 1px solid rgba(239, 68, 68, 0.25);\n}\n\n.agy-badge-error .agy-badge-dot {\n background: #ef4444;\n}\n\n/* Switch Component */\n.agy-switch {\n position: relative;\n display: inline-flex;\n align-items: center;\n width: 36px;\n height: 20px;\n cursor: pointer;\n user-select: none;\n}\n\n.agy-switch input {\n opacity: 0;\n width: 0;\n height: 0;\n position: absolute;\n}\n\n.agy-switch-slider {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--dsw-alias-bg-layer-4, rgba(255, 255, 255, 0.15));\n border-radius: 20px;\n transition: 0.2s ease;\n}\n\n.agy-switch-slider::before {\n position: absolute;\n content: \"\";\n height: 14px;\n width: 14px;\n left: 3px;\n bottom: 3px;\n background-color: #ffffff;\n border-radius: 50%;\n transition: 0.2s ease;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);\n}\n\n.agy-switch input:checked + .agy-switch-slider {\n background-color: var(--dsw-alias-button-primary-fill, #2563eb);\n}\n\n.agy-switch input:checked + .agy-switch-slider::before {\n transform: translateX(16px);\n}\n\n.agy-switch input:disabled + .agy-switch-slider {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.agy-spin-icon {\n display: inline-flex;\n animation: agy-spin 1s linear infinite;\n}\n\n@keyframes agy-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n";
3
+ export declare function ensureSettingsStyles(): void;
4
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/client/styles.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,eAAO,MAAM,YAAY,00bAgpBxB,CAAA;AAID,wBAAgB,oBAAoB,IAAI,IAAI,CAO3C"}
@@ -0,0 +1,84 @@
1
+ /** Host-only access-token cache, refresh single-flight, logout, and grant revocation. */
2
+ import type { AntigravityAuthRecord, AntigravityAuthStore } from './auth-store.ts';
3
+ export declare const ANTIGRAVITY_TOKEN_ENDPOINT: "https://oauth2.googleapis.com/token";
4
+ export declare const ANTIGRAVITY_REVOKE_ENDPOINT: "https://oauth2.googleapis.com/revoke";
5
+ export type CredentialState = 'logged-out' | 'logged-in' | 'refreshing' | 'refresh-failed' | 're-login-required';
6
+ export type CredentialErrorCode = 'invalid-grant' | 'network' | 'timeout' | 'rate-limited' | 'server-error' | 'http-error' | 'invalid-response' | 'conflict' | 'storage' | 'cancelled';
7
+ export interface HostCredential {
8
+ readonly accessToken: string;
9
+ readonly refreshToken: string;
10
+ readonly expiresAt: number;
11
+ readonly projectId: string;
12
+ }
13
+ export interface RefreshAccessTokenResult {
14
+ readonly accessToken: string;
15
+ readonly refreshToken?: string;
16
+ readonly expiresAt: number;
17
+ }
18
+ export interface RefreshAccessTokenInput {
19
+ readonly refreshToken: string;
20
+ readonly signal: AbortSignal;
21
+ }
22
+ export type RefreshAccessToken = (input: RefreshAccessTokenInput) => Promise<RefreshAccessTokenResult>;
23
+ export interface RevokeGrantInput {
24
+ readonly token: string;
25
+ readonly signal: AbortSignal;
26
+ }
27
+ export type RevokeGrant = (input: RevokeGrantInput) => Promise<void>;
28
+ export interface CredentialStatusView {
29
+ readonly state: CredentialState;
30
+ readonly configured: boolean;
31
+ readonly expiresAt?: string;
32
+ readonly lastRefreshAt?: string;
33
+ readonly errorCode?: CredentialErrorCode;
34
+ }
35
+ export type RevokeState = 'idle' | 'pending' | 'confirmation-required' | 'revoked' | 'logged-out' | 'failed' | 'superseded';
36
+ export type RevokeErrorCode = Exclude<CredentialErrorCode, 'invalid-grant' | 'conflict' | 'cancelled'>;
37
+ export interface RevokeStatusView {
38
+ readonly state: RevokeState;
39
+ readonly errorCode?: RevokeErrorCode;
40
+ }
41
+ export type RevokeActionResult = {
42
+ readonly state: 'confirmation-required';
43
+ } | {
44
+ readonly state: 'revoked';
45
+ } | {
46
+ readonly state: 'logged-out';
47
+ } | {
48
+ readonly state: 'failed';
49
+ readonly errorCode: RevokeErrorCode;
50
+ } | {
51
+ readonly state: 'superseded';
52
+ };
53
+ export interface LogoutResult {
54
+ readonly state: 'logged-out';
55
+ }
56
+ export interface CredentialCoordinatorOptions {
57
+ readonly store: AntigravityAuthStore;
58
+ readonly now?: () => number;
59
+ readonly refreshLeadMs?: number;
60
+ readonly operationTimeoutMs?: number;
61
+ readonly refreshToken?: RefreshAccessToken;
62
+ readonly revokeGrant?: RevokeGrant;
63
+ readonly fetchImpl?: typeof fetch;
64
+ }
65
+ export interface CredentialCoordinator {
66
+ credential(signal?: AbortSignal, options?: {
67
+ readonly forceRefresh?: boolean;
68
+ }): Promise<HostCredential | undefined>;
69
+ replaceFromLogin(credential: HostCredential, record: AntigravityAuthRecord): void;
70
+ status(): Promise<CredentialStatusView>;
71
+ revokeStatus(): RevokeStatusView;
72
+ logout(): Promise<LogoutResult>;
73
+ revoke(confirmed: boolean, signal?: AbortSignal): Promise<RevokeActionResult>;
74
+ dispose(): Promise<void>;
75
+ }
76
+ export declare class CredentialOperationError extends Error {
77
+ readonly code: CredentialErrorCode;
78
+ constructor(code: CredentialErrorCode, message?: string);
79
+ }
80
+ export declare function createCredentialCoordinator(options: CredentialCoordinatorOptions): CredentialCoordinator;
81
+ export declare function createGoogleRefreshTransport(fetchImpl?: typeof fetch, now?: () => number): RefreshAccessToken;
82
+ export declare function createGoogleRevokeTransport(fetchImpl?: typeof fetch): RevokeGrant;
83
+ export declare function credentialErrorMessage(code: string): string | undefined;
84
+ //# sourceMappingURL=credential-coordinator.d.ts.map
@@ -0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AAS,GAAE,OAAO,KAAwB,GAAG,WAAW,CAgBnG;AA8GD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAcvE"}
@@ -0,0 +1,39 @@
1
+ /** Antigravity image generation/editing tools and session-authorized image catalog. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import z from '@deepseek-ai/schemastery';
4
+ import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
5
+ import type { FileSystem } from '@deepseek-ai/dsh-fs';
6
+ import { HarnessError } from '@deepseek-ai/dsh-llm';
7
+ import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
8
+ import type { CredentialCoordinator, HostCredential } from './credential-coordinator.ts';
9
+ import { type PrivateTransport } from './private-transport.ts';
10
+ export declare const name = "antigravity-image";
11
+ export declare const inject: string[];
12
+ export declare const GENERATE_IMAGE_TOOL_NAME = "generate_image";
13
+ export declare const LIST_IMAGES_TOOL_NAME = "list_images";
14
+ export declare const ANTIGRAVITY_IMAGE_ENDPOINT: `${string}/v1internal:generateContent`;
15
+ export declare const ANTIGRAVITY_IMAGE_MODEL = "antigravity-gemini-3.1-flash-image";
16
+ export declare const ANTIGRAVITY_IMAGE_SETTINGS_NAMESPACE: import("@deepseek-ai/dsh-settings").SettingsNamespace;
17
+ export interface Config extends AntigravityImageSettings {
18
+ }
19
+ export declare const Config: z<Config>;
20
+ export interface AntigravityImageSettings {
21
+ readonly enabled: boolean;
22
+ readonly model: string;
23
+ readonly n: number;
24
+ }
25
+ export interface AntigravityImageToolOptions {
26
+ readonly auth: Pick<CredentialCoordinator, 'credential'> | {
27
+ credential(signal?: AbortSignal): Promise<HostCredential | undefined>;
28
+ };
29
+ readonly attachments: Pick<AttachmentStore, 'imageLimits' | 'validateImage' | 'saveImage' | 'readImage'>;
30
+ readonly fs: Pick<FileSystem, 'resolve' | 'contains' | 'readBytes' | 'lstat' | 'stat'>;
31
+ readonly settings?: () => AntigravityImageSettings;
32
+ readonly transport?: PrivateTransport;
33
+ }
34
+ export declare class AntigravityImageError extends HarnessError {
35
+ }
36
+ export declare function createAntigravityImageTools(options: AntigravityImageToolOptions): readonly ToolDefinition[];
37
+ /** Mount tools when a ToolRuntime is available; the tool bodies recheck the credential gate. */
38
+ export declare function apply(ctx?: Context, config?: Config): void;
39
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/image.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAGvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAGxC,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,6BAA6B,CAAA;AACtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAkB,cAAc,EAAkB,MAAM,wBAAwB,CAAA;AAG5F,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAc/B,eAAO,MAAM,IAAI,sBAAsB,CAAA;AACvC,eAAO,MAAM,MAAM,UAAoD,CAAA;AACvE,eAAO,MAAM,wBAAwB,mBAAmB,CAAA;AACxD,eAAO,MAAM,qBAAqB,gBAAgB,CAAA;AAClD,eAAO,MAAM,0BAA0B,wCAAmE,CAAA;AAC1G,eAAO,MAAM,uBAAuB,uCAAuC,CAAA;AAC3E,eAAO,MAAM,oCAAoC,uDAAyC,CAAA;AAE1F,MAAM,WAAW,MAAO,SAAQ,wBAAwB;CAAG;AAE3D,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAI3B,CAAA;AA6BF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,GAAG;QAAE,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAA;KAAE,CAAA;IACpI,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,eAAe,GAAG,WAAW,GAAG,WAAW,CAAC,CAAA;IACxG,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC,CAAA;IACtF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAA;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAA;CACtC;AAED,qBAAa,qBAAsB,SAAQ,YAAY;CAAG;AAqB1D,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,2BAA2B,GAAG,SAAS,cAAc,EAAE,CAG3G;AA4ND,gGAAgG;AAChG,wBAAgB,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,GAAE,MAAgE,GAAG,IAAI,CA8BnH"}
@@ -0,0 +1,21 @@
1
+ /** Host half of the private Antigravity bootstrap capability bundle. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ export declare const name = "antigravity-auth";
4
+ export declare const inject: string[];
5
+ /** Mount the Host-only OAuth service and its loopback RPC channel. */
6
+ export declare function apply(ctx: Context): void;
7
+ export * from './auth-service.ts';
8
+ export * from './credential-coordinator.ts';
9
+ export * from './rpc-contract.ts';
10
+ export * from './status.ts';
11
+ export * from './project-context.ts';
12
+ export * from './wire-identity.ts';
13
+ export * from './llm-adapter.ts';
14
+ export * from './private-transport.ts';
15
+ export * from './replay.ts';
16
+ export * from './quota.ts';
17
+ export * from './media-admission.ts';
18
+ export * from './model-catalog.ts';
19
+ export * from './capability-gates.ts';
20
+ export * from './live-gates.ts';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAUlD,eAAO,MAAM,IAAI,qBAAqB,CAAA;AACtC,eAAO,MAAM,MAAM,UAAuC,CAAA;AAE1D,sEAAsE;AACtE,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAwCxC;AAED,cAAc,mBAAmB,CAAA;AACjC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,3 @@
1
+ /** Public companion export for the single Wire Identity invariant module. */
2
+ export { assertWireIdentityInvariant } from './wire-identity.ts';
3
+ //# sourceMappingURL=invariant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invariant.d.ts","sourceRoot":"","sources":["../../src/invariant.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,6 @@
1
+ /** Durable, content-addressed AttachmentStore seam used only by explicitly run Gate I. */
2
+ import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
3
+ export type DurableLiveAttachmentStore = Pick<AttachmentStore, 'imageLimits' | 'validateImage' | 'saveImage' | 'saveImages' | 'readImage'>;
4
+ /** Create a persistent, owner-only PNG store for controlled live image fixtures. */
5
+ export declare function createDurableLiveAttachmentStore(root: string): DurableLiveAttachmentStore;
6
+ //# sourceMappingURL=live-gate-attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-attachments.d.ts","sourceRoot":"","sources":["../../src/live-gate-attachments.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAO1F,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,6BAA6B,CAAA;AAUpC,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,eAAe,EACf,aAAa,GAAG,eAAe,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,CAC3E,CAAA;AAED,oFAAoF;AACpF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,0BAA0B,CAsEzF"}
@@ -0,0 +1,5 @@
1
+ /** Interactive OAuth/project validation implementation for explicit live Gate A. */
2
+ import type { AntigravityAuthService } from './auth-service.ts';
3
+ import type { LiveGateResult } from './live-gates.ts';
4
+ export declare function runAuthGate(auth: AntigravityAuthService, output: (line: string) => void): Promise<LiveGateResult>;
5
+ //# sourceMappingURL=live-gate-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-auth.d.ts","sourceRoot":"","sources":["../../src/live-gate-auth.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAEpF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAKrD,wBAAsB,WAAW,CAC/B,IAAI,EAAE,sBAAsB,EAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAC7B,OAAO,CAAC,cAAc,CAAC,CAkBzB"}
@@ -0,0 +1,5 @@
1
+ /** Durable generation/edit verification for explicit live Gate I. */
2
+ import type { AntigravityAuthService } from './auth-service.ts';
3
+ import type { LiveGateResult } from './live-gates.ts';
4
+ export declare function runImageGate(auth: AntigravityAuthService, attachmentRoot: string): Promise<LiveGateResult>;
5
+ //# sourceMappingURL=live-gate-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-image.d.ts","sourceRoot":"","sources":["../../src/live-gate-image.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAKrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAOrD,wBAAsB,YAAY,CAChC,IAAI,EAAE,sBAAsB,EAC5B,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,cAAc,CAAC,CAwBzB"}
@@ -0,0 +1,10 @@
1
+ /** One-request Gate 0 and independently selectable LLM-family live fixtures. */
2
+ import type { AntigravityAuthService } from './auth-service.ts';
3
+ import type { CapabilityGateRegistry } from './capability-gates.ts';
4
+ import { AntigravityAdapter } from './llm-adapter.ts';
5
+ import type { LiveGateResult } from './live-gates.ts';
6
+ import type { LlmFamilyId } from './status.ts';
7
+ export declare const LIVE_TEXT_MODEL: "antigravity-gemini-3.7-flash";
8
+ export declare const LIVE_TEXT_MODEL_BY_FAMILY: Readonly<Record<LlmFamilyId, string>>;
9
+ export declare function runLlmGate(auth: AntigravityAuthService, gates: CapabilityGateRegistry, family?: LlmFamilyId, adapter?: Pick<AntigravityAdapter, 'stream'>): Promise<LiveGateResult>;
10
+ //# sourceMappingURL=live-gate-llm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-llm.d.ts","sourceRoot":"","sources":["../../src/live-gate-llm.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAGhF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAwB,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,eAAO,MAAM,eAAe,EAAG,8BAAuC,CAAA;AACtE,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAI1E,CAAA;AAEF,wBAAsB,UAAU,CAC9B,IAAI,EAAE,sBAAsB,EAC5B,KAAK,EAAE,sBAAsB,EAC7B,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,GAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAoC,GAC7E,OAAO,CAAC,cAAc,CAAC,CAwBzB"}
@@ -0,0 +1,8 @@
1
+ /** Closed failure classification and persistence shared by live gate dispatch. */
2
+ import type { AntigravityAuthService } from './auth-service.ts';
3
+ import type { LiveGateId } from './live-gates.ts';
4
+ import type { CapabilityGateOutcome, LlmFamilyId } from './status.ts';
5
+ export declare function recordGateFailure(auth: AntigravityAuthService, gate: LiveGateId, outcome: Exclude<CapabilityGateOutcome, 'passed'>, family?: LlmFamilyId): Promise<void>;
6
+ export declare function classifyGate0Outcome(error: unknown): Exclude<CapabilityGateOutcome, 'passed'>;
7
+ export declare function classifyOutcome(error: unknown): Exclude<CapabilityGateOutcome, 'passed'>;
8
+ //# sourceMappingURL=live-gate-outcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-outcome.d.ts","sourceRoot":"","sources":["../../src/live-gate-outcome.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAElF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAmB,WAAW,EAAE,MAAM,aAAa,CAAA;AAQtF,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,sBAAsB,EAC5B,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,OAAO,CAAC,qBAAqB,EAAE,QAAQ,CAAC,EACjD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAI7F;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CASxF"}
@@ -0,0 +1,15 @@
1
+ /** Small production dispatcher for explicitly authorized, one-at-a-time live gates. */
2
+ import { type AntigravityAuthService } from './auth-service.ts';
3
+ import { type CapabilityGateRegistry } from './capability-gates.ts';
4
+ import type { LiveGateRunner } from './live-gates.ts';
5
+ export { LIVE_TEXT_MODEL, LIVE_TEXT_MODEL_BY_FAMILY, runLlmGate } from './live-gate-llm.ts';
6
+ export { classifyGate0Outcome } from './live-gate-outcome.ts';
7
+ export { LIVE_VIDEO_EXPECTED_ANSWER, LIVE_VIDEO_QUESTION, isDeterministicVideoAnswer, } from './live-gate-video.ts';
8
+ export interface ProductionLiveGateRunnerOptions {
9
+ readonly output?: (line: string) => void;
10
+ readonly auth?: AntigravityAuthService;
11
+ readonly gates?: CapabilityGateRegistry;
12
+ readonly attachmentRoot?: string;
13
+ }
14
+ export declare function createProductionLiveGateRunner(options?: ProductionLiveGateRunnerOptions): LiveGateRunner;
15
+ //# sourceMappingURL=live-gate-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-runner.d.ts","sourceRoot":"","sources":["../../src/live-gate-runner.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAGvF,OAAO,EAAgC,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE7F,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,uBAAuB,CAAA;AAO9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAA;AAE7B,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,sBAAsB,CAAA;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,CAAA;IACvC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CACjC;AAED,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,+BAAoC,GAAG,cAAc,CA+B5G"}
@@ -0,0 +1,5 @@
1
+ /** Grounding-source verification for explicit live Gate S. */
2
+ import type { AntigravityAuthService } from './auth-service.ts';
3
+ import type { LiveGateResult } from './live-gates.ts';
4
+ export declare function runSearchGate(auth: AntigravityAuthService): Promise<LiveGateResult>;
5
+ //# sourceMappingURL=live-gate-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-search.d.ts","sourceRoot":"","sources":["../../src/live-gate-search.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAGrD,wBAAsB,aAAa,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CASzF"}
@@ -0,0 +1,8 @@
1
+ /** Controlled pixel-fact verification for explicit live Gate V. */
2
+ import type { AntigravityAuthService } from './auth-service.ts';
3
+ import type { LiveGateResult, LiveGateRunOptions } from './live-gates.ts';
4
+ export declare const LIVE_VIDEO_QUESTION: "What exact uppercase word is visibly shown in the center of the video? Reply with that word only.";
5
+ export declare const LIVE_VIDEO_EXPECTED_ANSWER: "KUMQUAT";
6
+ export declare function runVideoGate(auth: AntigravityAuthService, options: LiveGateRunOptions): Promise<LiveGateResult>;
7
+ export declare function isDeterministicVideoAnswer(value: unknown): boolean;
8
+ //# sourceMappingURL=live-gate-video.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gate-video.d.ts","sourceRoot":"","sources":["../../src/live-gate-video.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAOnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAIzE,eAAO,MAAM,mBAAmB,EAAG,mGAA4G,CAAA;AAC/I,eAAO,MAAM,0BAA0B,EAAG,SAAkB,CAAA;AAE5D,wBAAsB,YAAY,CAChC,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,cAAc,CAAC,CAiBzB;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAElE"}
@@ -0,0 +1,25 @@
1
+ /** Explicit, one-gate-at-a-time CLI boundary for live private endpoint verification. */
2
+ import { type CapabilityGateOutcome, type LlmFamilyId } from './status.ts';
3
+ export declare const LIVE_ACKNOWLEDGEMENT: "I_ACKNOWLEDGE_UNOFFICIAL_ANTIGRAVITY_PRIVATE_ENDPOINT_RISK";
4
+ export declare const LIVE_GATE_IDS: readonly ["A", "0L", "S", "I", "V"];
5
+ export type LiveGateId = (typeof LIVE_GATE_IDS)[number];
6
+ export interface LiveGateRunOptions {
7
+ readonly videoFile?: string;
8
+ readonly llmFamily?: LlmFamilyId;
9
+ }
10
+ export interface LiveGateResult {
11
+ readonly gate: LiveGateId;
12
+ readonly outcome: CapabilityGateOutcome;
13
+ }
14
+ export interface LiveGateRunner {
15
+ run(gate: LiveGateId, options: LiveGateRunOptions): Promise<LiveGateResult>;
16
+ dispose(): Promise<void>;
17
+ }
18
+ export interface LiveGateCliDependencies {
19
+ readonly createRunner?: () => LiveGateRunner | Promise<LiveGateRunner>;
20
+ readonly output?: (line: string) => void;
21
+ readonly error?: (line: string) => void;
22
+ }
23
+ /** Parse and enforce opt-in before constructing anything that can read credentials or use the network. */
24
+ export declare function runLiveGateCli(argv: readonly string[], env?: Readonly<Record<string, string | undefined>>, dependencies?: LiveGateCliDependencies): Promise<number>;
25
+ //# sourceMappingURL=live-gates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-gates.d.ts","sourceRoot":"","sources":["../../src/live-gates.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAAkB,KAAK,qBAAqB,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAE1F,eAAO,MAAM,oBAAoB,EAAG,4DAAqE,CAAA;AACzG,eAAO,MAAM,aAAa,qCAAsC,CAAA;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,CAAA;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IAC3E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACtE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,0GAA0G;AAC1G,wBAAsB,cAAc,CAClC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAe,EAC/D,YAAY,GAAE,uBAA4B,GACzC,OAAO,CAAC,MAAM,CAAC,CA4BjB"}
@@ -0,0 +1,65 @@
1
+ /** Public DSH LLM adapter for the single Antigravity provider route. */
2
+ import { LlmAdapter, resolveRetryPolicy } from '@deepseek-ai/dsh-llm';
3
+ import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
4
+ import type { GenerateOptions, LlmModelInfo, LlmProviderInfo, LlmResolvedModelInfo, StreamChunk } from '@deepseek-ai/dsh-llm';
5
+ import type { CredentialCoordinator, HostCredential } from './credential-coordinator.ts';
6
+ import { type PrivateTransport } from './private-transport.ts';
7
+ import type { AntigravityModelCatalogView } from './model-catalog.ts';
8
+ export declare const ANTIGRAVITY_PROVIDER: "google-antigravity";
9
+ export declare const ANTIGRAVITY_STREAM_ENDPOINT: `${string}/v1internal:streamGenerateContent?alt=sse`;
10
+ export declare const ANTIGRAVITY_GENERATE_ENDPOINT: `${string}/v1internal:generateContent`;
11
+ export declare const ANTIGRAVITY_AVAILABLE_MODELS_ENDPOINT: `${string}/v1internal:fetchAvailableModels`;
12
+ export declare const ANTIGRAVITY_LLM_ROUTE: "google-antigravity";
13
+ export interface AntigravityAuthCredentialSource {
14
+ credential(signal?: AbortSignal, options?: {
15
+ readonly forceRefresh?: boolean;
16
+ }): Promise<HostCredential | undefined>;
17
+ }
18
+ export interface AntigravityAdapterOptions {
19
+ readonly auth: Pick<CredentialCoordinator, 'credential'> | AntigravityAuthCredentialSource;
20
+ /** Whole-transport injection is the only private-request test seam. */
21
+ readonly transport?: PrivateTransport;
22
+ readonly responseHeaderTimeoutMs?: number;
23
+ readonly idleTimeoutMs?: number;
24
+ readonly totalTimeoutMs?: number;
25
+ readonly maxResponseBytes?: number;
26
+ readonly maxFrameBytes?: number;
27
+ readonly attachments?: Pick<AttachmentStore, 'readImage'>;
28
+ }
29
+ export interface AntigravityRequestMetadata {
30
+ readonly requestId: string;
31
+ readonly sessionId: string;
32
+ readonly labels: Record<string, string>;
33
+ readonly lastStepIndex: number;
34
+ }
35
+ /** Adapter that owns exactly one provider route and no fallback route. */
36
+ export declare class AntigravityAdapter extends LlmAdapter {
37
+ private readonly adapterOptions;
38
+ private readonly transport;
39
+ private readonly sessions;
40
+ private readonly options;
41
+ private readonly definitions;
42
+ private catalogProjectId;
43
+ private catalogExpiresAt;
44
+ private catalogModelIds;
45
+ private catalogFailureCode;
46
+ private catalogView;
47
+ constructor(adapterOptions: AntigravityAdapterOptions);
48
+ providerInfo(provider: string): LlmProviderInfo;
49
+ providerRetryPolicy(): ReturnType<typeof resolveRetryPolicy>;
50
+ /** Forget account-bound availability when Gate 0 or the credential is replaced. */
51
+ invalidateModelCatalog(): void;
52
+ /** Return the pinned catalog without performing credential or network work. */
53
+ catalogSnapshot(): AntigravityModelCatalogView;
54
+ /** Refresh the advisory catalog and collapse failures into browser-safe state. */
55
+ modelCatalog(signal?: AbortSignal, forceRefresh?: boolean): Promise<AntigravityModelCatalogView>;
56
+ listModels(provider: string, signal?: AbortSignal): Promise<readonly LlmModelInfo[]>;
57
+ resolveModel(provider: string, model: string, _signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
58
+ stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
59
+ private streamResponse;
60
+ private readLiveModelIds;
61
+ private rememberCatalogFailure;
62
+ private readCredential;
63
+ }
64
+ export declare function buildAntigravityGeneratePayload(options: GenerateOptions, credential: HostCredential): Record<string, unknown>;
65
+ //# sourceMappingURL=llm-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-adapter.d.ts","sourceRoot":"","sources":["../../src/llm-adapter.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAaxE,OAAO,EAEL,UAAU,EAGV,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAEV,eAAe,EACf,YAAY,EACZ,eAAe,EACf,oBAAoB,EAGpB,WAAW,EAEZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,EAWL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAU/B,OAAO,KAAK,EAAgC,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAEnG,eAAO,MAAM,oBAAoB,EAAG,oBAA6B,CAAA;AACjE,eAAO,MAAM,2BAA2B,sDAAiF,CAAA;AACzH,eAAO,MAAM,6BAA6B,wCAAmE,CAAA;AAC7G,eAAO,MAAM,qCAAqC,6CAAwE,CAAA;AAC1H,eAAO,MAAM,qBAAqB,sBAAuB,CAAA;AAKzD,MAAM,WAAW,+BAA+B;IAC9C,UAAU,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAAA;CACrH;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,GAAG,+BAA+B,CAAA;IAC1F,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,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,eAAe,IAAI,2BAA2B;IAI9C,kFAAkF;IAC5E,YAAY,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,YAAY,UAAQ,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAWrF,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAqBpF,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAqBlG,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YA+D7D,cAAc;YAkFf,gBAAgB;IAmF9B,OAAO,CAAC,sBAAsB;YAQhB,cAAc;CAO7B;AA8MD,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM7H"}
@@ -0,0 +1,36 @@
1
+ /** Browser-safe login state shared by the Host OAuth flow and settings RPC. */
2
+ export declare const LOGIN_PHASES: readonly ["idle", "pending", "success", "cancelled", "expired", "port-conflict", "failed"];
3
+ export type LoginPhase = (typeof LOGIN_PHASES)[number];
4
+ export declare const LOGIN_ERROR_CODES: readonly ["invalid-method", "invalid-path", "invalid-host", "duplicate-parameter", "invalid-parameters", "missing-state", "state-mismatch", "missing-code", "oauth-error", "no-pending-flow", "expired", "cancelled", "port-conflict", "token-exchange-failed", "project-unavailable", "project-authentication-failed", "project-forbidden", "project-rate-limited", "project-offline", "project-malformed", "project-protocol-drift", "project-validation-failed", "persistence-failed", "credential-conflict", "invalid-callback-url", "risk-acknowledgement-required", "internal"];
5
+ export type LoginErrorCode = (typeof LOGIN_ERROR_CODES)[number];
6
+ export declare function isLoginPhase(value: unknown): value is LoginPhase;
7
+ export declare function isLoginErrorCode(value: unknown): value is LoginErrorCode;
8
+ export interface LoginStatusView {
9
+ readonly phase: LoginPhase;
10
+ readonly configured: boolean;
11
+ readonly projectAvailable: boolean;
12
+ readonly authorizationUrl?: string;
13
+ readonly expiresAt?: string;
14
+ readonly maskedEmail?: string;
15
+ readonly errorCode?: LoginErrorCode;
16
+ }
17
+ export interface LoginStartResult {
18
+ readonly started: true;
19
+ readonly phase: 'pending';
20
+ readonly authorizationUrl: string;
21
+ readonly expiresAt: string;
22
+ }
23
+ export interface LoginActionResult {
24
+ readonly phase: LoginPhase;
25
+ readonly errorCode?: LoginErrorCode;
26
+ }
27
+ export type LoginCompletionResult = {
28
+ readonly completed: true;
29
+ readonly phase: 'success';
30
+ } | {
31
+ readonly completed: false;
32
+ readonly phase: 'failed' | 'cancelled';
33
+ readonly errorCode: LoginErrorCode;
34
+ };
35
+ export type { LoginStatusView as AntigravityLoginStatusView };
36
+ //# sourceMappingURL=login-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-types.d.ts","sourceRoot":"","sources":["../../src/login-types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,eAAO,MAAM,YAAY,4FAQf,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtD,eAAO,MAAM,iBAAiB,ujBA4BpB,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;IAClC,QAAQ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