@eddyskywalker/dsh-chatgpt-subscription 0.70.1 → 0.72.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 (86) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +4 -2
  3. package/lib/client.js +1188 -226
  4. package/lib/client.js.map +1 -1
  5. package/lib/{entry-progress-updates-DpzbX1GP.js → entry-progress-updates-DMLVID9V.js} +10 -23
  6. package/lib/index.js +6516 -3205
  7. package/lib/plan-mode-pipeline.js +3 -3
  8. package/lib/progress-updates.js +1 -1
  9. package/lib/types/client/antigravity-acp/AntigravityAcpComposerBadge.d.ts +35 -0
  10. package/lib/types/client/antigravity-acp/AntigravityAcpComposerBadge.d.ts.map +1 -0
  11. package/lib/types/client/antigravity-acp/AntigravityAcpSection.d.ts +20 -0
  12. package/lib/types/client/antigravity-acp/AntigravityAcpSection.d.ts.map +1 -0
  13. package/lib/types/client/antigravity-acp/api.d.ts +36 -0
  14. package/lib/types/client/antigravity-acp/api.d.ts.map +1 -0
  15. package/lib/types/client/antigravity-acp/locales.d.ts +521 -0
  16. package/lib/types/client/antigravity-acp/locales.d.ts.map +1 -0
  17. package/lib/types/client/antigravity-acp/route.d.ts +3 -0
  18. package/lib/types/client/antigravity-acp/route.d.ts.map +1 -0
  19. package/lib/types/client/antigravity-acp/styles.d.ts +15 -0
  20. package/lib/types/client/antigravity-acp/styles.d.ts.map +1 -0
  21. package/lib/types/client/command-code/locales.d.ts +2 -2
  22. package/lib/types/client/hub/brand-icons.d.ts +1 -1
  23. package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
  24. package/lib/types/client/hub/providers.d.ts.map +1 -1
  25. package/lib/types/client/index.d.ts +2 -0
  26. package/lib/types/client/index.d.ts.map +1 -1
  27. package/lib/types/client/locales-ru/antigravity-acp.d.ts +10 -0
  28. package/lib/types/client/locales-ru/antigravity-acp.d.ts.map +1 -0
  29. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  30. package/lib/types/client/locales-ru/index.d.ts.map +1 -1
  31. package/lib/types/client/locales.d.ts +3 -1
  32. package/lib/types/client/locales.d.ts.map +1 -1
  33. package/lib/types/compat.d.ts +1 -1
  34. package/lib/types/entry-plan-mode-pipeline.d.ts +3 -3
  35. package/lib/types/entry-plan-mode-pipeline.d.ts.map +1 -1
  36. package/lib/types/host/agent-preset.d.ts.map +1 -1
  37. package/lib/types/host/antigravity-acp/acp-client.d.ts +136 -0
  38. package/lib/types/host/antigravity-acp/acp-client.d.ts.map +1 -0
  39. package/lib/types/host/antigravity-acp/adapter.d.ts +191 -0
  40. package/lib/types/host/antigravity-acp/adapter.d.ts.map +1 -0
  41. package/lib/types/host/antigravity-acp/auth-cache.d.ts +50 -0
  42. package/lib/types/host/antigravity-acp/auth-cache.d.ts.map +1 -0
  43. package/lib/types/host/antigravity-acp/binary.d.ts +122 -0
  44. package/lib/types/host/antigravity-acp/binary.d.ts.map +1 -0
  45. package/lib/types/host/antigravity-acp/catalog.d.ts +95 -0
  46. package/lib/types/host/antigravity-acp/catalog.d.ts.map +1 -0
  47. package/lib/types/host/antigravity-acp/doctor.d.ts +73 -0
  48. package/lib/types/host/antigravity-acp/doctor.d.ts.map +1 -0
  49. package/lib/types/host/antigravity-acp/errors.d.ts +59 -0
  50. package/lib/types/host/antigravity-acp/errors.d.ts.map +1 -0
  51. package/lib/types/host/antigravity-acp/history.d.ts +76 -0
  52. package/lib/types/host/antigravity-acp/history.d.ts.map +1 -0
  53. package/lib/types/host/antigravity-acp/login.d.ts +59 -0
  54. package/lib/types/host/antigravity-acp/login.d.ts.map +1 -0
  55. package/lib/types/host/antigravity-acp/mcp-bridge.d.ts +115 -0
  56. package/lib/types/host/antigravity-acp/mcp-bridge.d.ts.map +1 -0
  57. package/lib/types/host/antigravity-acp/routes.d.ts +81 -0
  58. package/lib/types/host/antigravity-acp/routes.d.ts.map +1 -0
  59. package/lib/types/host/antigravity-acp/settings.d.ts +70 -0
  60. package/lib/types/host/antigravity-acp/settings.d.ts.map +1 -0
  61. package/lib/types/host/antigravity-acp/subagent.d.ts +96 -0
  62. package/lib/types/host/antigravity-acp/subagent.d.ts.map +1 -0
  63. package/lib/types/host/antigravity-acp/types.d.ts +113 -0
  64. package/lib/types/host/antigravity-acp/types.d.ts.map +1 -0
  65. package/lib/types/host/common/i18n/en.d.ts.map +1 -1
  66. package/lib/types/host/common/i18n/provider-name.d.ts.map +1 -1
  67. package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
  68. package/lib/types/host/common/i18n/zh.d.ts +3 -0
  69. package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
  70. package/lib/types/host/common/model-request-control.d.ts +1 -1
  71. package/lib/types/host/common/model-request-control.d.ts.map +1 -1
  72. package/lib/types/host/common/request-diagnostics.d.ts +2 -2
  73. package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
  74. package/lib/types/host/dispatch-ledger/protocol.d.ts.map +1 -1
  75. package/lib/types/host/progress-updates/prompt.d.ts +2 -2
  76. package/lib/types/host/progress-updates/prompt.d.ts.map +1 -1
  77. package/lib/types/host/widget-board/line-quota.d.ts +10 -0
  78. package/lib/types/host/widget-board/line-quota.d.ts.map +1 -1
  79. package/lib/types/host/widget-board/line-registry.d.ts.map +1 -1
  80. package/lib/types/index.d.ts.map +1 -1
  81. package/lib/types/shared/antigravity-acp-contracts.d.ts +132 -0
  82. package/lib/types/shared/antigravity-acp-contracts.d.ts.map +1 -0
  83. package/package.json +1 -1
  84. package/presets/dispatch/README.md +27 -21
  85. package/presets/dispatch/agent.cordis.yml +64 -74
  86. package/presets/dispatch/preset.yml +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../../src/client/hub/providers.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,C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;IACvB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,gFAAgF;IAChF,OAAO,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAA;CAC1C;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,aAAa,CAAA;IACjB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;;OAOG;IACH,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;IACxD,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAAA;CACxD;AA4BD,6DAA6D;AAC7D;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,qBAAqB,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAIjG;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,qBAAqB,EA0FzD,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAEnF"}
@@ -6,6 +6,7 @@ import { type KimiCodeLocaleKey } from './kimi-code/locales.ts';
6
6
  import { type MinimaxCodeLocaleKey } from './minimax-code/locales.ts';
7
7
  import { type GlmCodingPlanLocaleKey } from './glm-coding-plan/locales.ts';
8
8
  import { type OllamaLocaleKey } from './ollama/locales.ts';
9
+ import { type AntigravityAcpLocaleKey } from './antigravity-acp/locales.ts';
9
10
  import { type StepCodeLocaleKey } from './step-code/locales.ts';
10
11
  import { type ClinePassLocaleKey } from './cline-pass/locales.ts';
11
12
  import { type QoderLocaleKey } from './qoder/locales.ts';
@@ -31,6 +32,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
31
32
  'dsh-minimax-code': MinimaxCodeLocaleKey;
32
33
  'dsh-glm-coding-plan': GlmCodingPlanLocaleKey;
33
34
  'dsh-ollama': OllamaLocaleKey;
35
+ 'dsh-antigravity-acp': AntigravityAcpLocaleKey;
34
36
  'dsh-step-code': StepCodeLocaleKey;
35
37
  'dsh-cline-pass': ClinePassLocaleKey;
36
38
  'dsh-qoder': QoderLocaleKey;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAenE,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAS/D,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAGlG,OAAO,EAAqD,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAExH,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAM5G,OAAO,EAAqD,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAKxH,OAAO,EAA0D,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAElI,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAElG,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG5G,OAAO,EAAiD,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAGhH,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAG9F,OAAO,EAAkD,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAMlH,OAAO,EAA6D,KAAK,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAExI,OAAO,EAAgD,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAI9G,OAAO,EAA8C,KAAK,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAG1G,OAAO,EAA2D,KAAK,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAKpI,OAAO,QAAQ,kCAAkC,CAAC;IAChD;;;;;;;O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AI,CA2Q9C"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Russian wording for the Antigravity (ACP) namespace.
3
+ *
4
+ * Key set and order follow the `zh` object key for key; the meaning is taken
5
+ * from `en`. No shared account-pool labels are repeated here: this line owns no
6
+ * account pool, so the shared card's vocabulary never reaches this page.
7
+ */
8
+ import type { AntigravityAcpLocaleKey } from '../antigravity-acp/locales.ts';
9
+ export declare const dictionary: Record<AntigravityAcpLocaleKey, string>;
10
+ //# sourceMappingURL=antigravity-acp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antigravity-acp.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/antigravity-acp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAE5E,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,CA8F9D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/hub.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAuOhD,CAAA"}
1
+ {"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/hub.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAwOhD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AA+BnE,yEAAyE;AACzE,eAAO,MAAM,SAAS,OAAO,CAAA;AAE7B;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAsD7D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/client/locales-ru/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAiCnE,yEAAyE;AACzE,eAAO,MAAM,SAAS,OAAO,CAAA;AAE7B;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAwD7D"}
@@ -205,6 +205,7 @@ export declare const zh: {
205
205
  readonly 'cardName.qoder': "Qoder(订阅)";
206
206
  readonly 'cardName.opendesign': "OpenDesign";
207
207
  readonly 'cardName.workbuddy': "WorkBuddy";
208
+ readonly 'cardName.antigravity-acp': "Antigravity(ACP)";
208
209
  readonly modelChecklistCount: "已启用 {count}/{total}";
209
210
  readonly codeRunTitle: "代码";
210
211
  readonly codeRunOutput: "输出";
@@ -457,6 +458,7 @@ export declare const dictionaries: {
457
458
  readonly 'cardName.qoder': "Qoder(订阅)";
458
459
  readonly 'cardName.opendesign': "OpenDesign";
459
460
  readonly 'cardName.workbuddy': "WorkBuddy";
461
+ readonly 'cardName.antigravity-acp': "Antigravity(ACP)";
460
462
  readonly modelChecklistCount: "已启用 {count}/{total}";
461
463
  readonly codeRunTitle: "代码";
462
464
  readonly codeRunOutput: "输出";
@@ -500,6 +502,6 @@ export declare const dictionaries: {
500
502
  readonly quotaFactsScope: string;
501
503
  readonly composerLabel: string;
502
504
  };
503
- en: Record<"stale" | "image" | "quota" | "account" | "rotationStrategy" | "pending" | "accountId" | "relogin" | "used" | "tokens" | "title" | "hubTitle" | "intro" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "cancel" | "signOut" | "refreshToken" | "popupBlocked" | "continueLogin" | "loading" | "connection" | "testConnection" | "testing" | "latency" | "selectAll" | "unselectAll" | "models" | "modelsHint" | "proxySettings" | "proxyMode" | "proxyModeHint" | "proxyModeAuto" | "proxyModeCustom" | "proxyModeDirect" | "customProxyUrl" | "customProxyUrlHint" | "customProxyUrlPlaceholder" | "saveProxyUrl" | "proxyDetected" | "proxyDetectedEffective" | "proxyNoneDetected" | "proxyDirectHint" | "poolStorageTitle" | "poolStorageKeyring" | "poolStorageCredentials" | "poolStorageKeyringHint" | "poolStorageCredentialsHint" | "poolStorageEffective" | "poolStorageBackendKeyring" | "poolStorageBackendDpapi" | "poolStorageBackendKeychain" | "poolStorageBackendCredentials" | "poolStorageSwitchWarning" | "poolStorageUnavailableKeyring" | "poolStorageUnavailableCredentials" | "poolStorageUnavailableStore" | "enhancements" | "fastMode" | "fastModeHint" | "outputVerbosity" | "outputVerbosityHint" | "verbosityLow" | "verbosityMedium" | "verbosityHigh" | "reasoningSummary" | "reasoningSummaryHint" | "summaryAuto" | "summaryConcise" | "summaryDetailed" | "summaryNone" | "searchProvider" | "searchProviderHint" | "searchProviderDsh" | "searchProviderCodex" | "fetchStatus" | "fetchStatusHint" | "fetchConfiguredProvider" | "fetchProviderDshDefault" | "switcherState" | "switcherStateIdle" | "switcherStateApplying" | "switcherStateApplied" | "switcherStateMissing" | "switcherStateFailed" | "fetchMode" | "fetchModeAuto" | "fetchModePlugin" | "fetchModeDsh" | "fetchMaxBodyChars" | "fetchMaxResponseBytes" | "characters" | "bytes" | "fetchLimitsInactive" | "fetchConfigSource" | "providerDefault" | "contextWindows" | "contextWindowsHint" | "contextWindow" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "contextWindowsNoneEnabled" | "saveContextWindow" | "save" | "quickQuota" | "quickQuotaHint" | "quotaIntro" | "refreshQuota" | "refreshing" | "noQuota" | "quotaSignedOut" | "updated" | "primary" | "secondary" | "limitWindow" | "remaining" | "available" | "unavailable" | "unlimited" | "credits" | "monthlySpend" | "resetCredits" | "resetCreditExpires" | "useResetCredit" | "usingResetCredit" | "useResetCreditConfirm" | "resetCreditUsed" | "spendControlReached" | "limit" | "exhausted" | "resets" | "quickQuotaLabel" | "quickQuotaLoading" | "imageToolRunning" | "imageToolDone" | "imageToolFailed" | "openImage" | "openNamedImage" | "imageLoading" | "imageLoadFailed" | "imagePreviewClose" | "imagePreviewOpenOriginal" | "retry" | "unknown" | "hubBack" | "hubOverviewHint" | "hubAccountCount" | "hubNoAccounts" | "hubStateEnabled" | "hubStateDisabled" | "hubModelsEnabled" | "hubModelsEnabledOfTotal" | "hubStatusFailed" | "hubSwitchOn" | "hubSwitchOff" | "hubCardLabel" | "hubUpdateCheck" | "hubUpdateChecking" | "hubUpdateApply" | "hubUpdateApplying" | "hubUpdateUpToDate" | "hubUpdateLatestWithUnknownCurrent" | "hubUpdateAvailable" | "hubUpdateInstalled" | "hubUpdateInstalledReplaced" | "hubUpdateInstalledLive" | "hubUpdateInstalledReplacedLive" | "hubUpdateFailedRestored" | "hubUpdateFailedRollbackFailed" | "hubUpdateFailedRollbackSkipped" | "hubUpdateDevelopmentInstall" | "hubUpdatePluginManagerMissing" | "hubUpdateManualOnly" | "hubUpdateCheckFailed" | "hubUpdateCommandLabel" | "localCodexLoginImport" | "localCodexLoginImporting" | "deviceCodeLogin" | "deviceCodeLoginStarting" | "deviceCodeLoginDetail" | "deviceCodeHint" | "deviceCodeLabel" | "deviceCodeOpen" | "deviceCodeCopy" | "deviceCodeWaiting" | "stopImporting" | "stopImportingLabel" | "stopImportingBusy" | "stopImportingHint" | "cardName.chatgpt" | "cardName.command-code" | "cardName.kimi-code" | "cardName.minimax-code" | "cardName.glm-coding-plan" | "cardName.claude" | "cardName.ollama" | "cardName.step-code" | "cardName.cline-pass" | "cardName.qoder" | "cardName.opendesign" | "cardName.workbuddy" | "modelChecklistCount" | "codeRunTitle" | "codeRunOutput" | "codeRunCopy" | "codeRunCopied" | "codeRunWrap" | "codeRunUnwrap" | "codeRunInspect" | "codeRunPreparing" | "codeRunRunning" | "codeRunFailed" | "codeRunStopped" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "cooldownRemaining" | "cooldownRemainingSeconds" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel", string>;
505
+ en: Record<"stale" | "image" | "quota" | "account" | "rotationStrategy" | "pending" | "accountId" | "relogin" | "used" | "tokens" | "title" | "hubTitle" | "intro" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "cancel" | "signOut" | "refreshToken" | "popupBlocked" | "continueLogin" | "loading" | "connection" | "testConnection" | "testing" | "latency" | "selectAll" | "unselectAll" | "models" | "modelsHint" | "proxySettings" | "proxyMode" | "proxyModeHint" | "proxyModeAuto" | "proxyModeCustom" | "proxyModeDirect" | "customProxyUrl" | "customProxyUrlHint" | "customProxyUrlPlaceholder" | "saveProxyUrl" | "proxyDetected" | "proxyDetectedEffective" | "proxyNoneDetected" | "proxyDirectHint" | "poolStorageTitle" | "poolStorageKeyring" | "poolStorageCredentials" | "poolStorageKeyringHint" | "poolStorageCredentialsHint" | "poolStorageEffective" | "poolStorageBackendKeyring" | "poolStorageBackendDpapi" | "poolStorageBackendKeychain" | "poolStorageBackendCredentials" | "poolStorageSwitchWarning" | "poolStorageUnavailableKeyring" | "poolStorageUnavailableCredentials" | "poolStorageUnavailableStore" | "enhancements" | "fastMode" | "fastModeHint" | "outputVerbosity" | "outputVerbosityHint" | "verbosityLow" | "verbosityMedium" | "verbosityHigh" | "reasoningSummary" | "reasoningSummaryHint" | "summaryAuto" | "summaryConcise" | "summaryDetailed" | "summaryNone" | "searchProvider" | "searchProviderHint" | "searchProviderDsh" | "searchProviderCodex" | "fetchStatus" | "fetchStatusHint" | "fetchConfiguredProvider" | "fetchProviderDshDefault" | "switcherState" | "switcherStateIdle" | "switcherStateApplying" | "switcherStateApplied" | "switcherStateMissing" | "switcherStateFailed" | "fetchMode" | "fetchModeAuto" | "fetchModePlugin" | "fetchModeDsh" | "fetchMaxBodyChars" | "fetchMaxResponseBytes" | "characters" | "bytes" | "fetchLimitsInactive" | "fetchConfigSource" | "providerDefault" | "contextWindows" | "contextWindowsHint" | "contextWindow" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "contextWindowsNoneEnabled" | "saveContextWindow" | "save" | "quickQuota" | "quickQuotaHint" | "quotaIntro" | "refreshQuota" | "refreshing" | "noQuota" | "quotaSignedOut" | "updated" | "primary" | "secondary" | "limitWindow" | "remaining" | "available" | "unavailable" | "unlimited" | "credits" | "monthlySpend" | "resetCredits" | "resetCreditExpires" | "useResetCredit" | "usingResetCredit" | "useResetCreditConfirm" | "resetCreditUsed" | "spendControlReached" | "limit" | "exhausted" | "resets" | "quickQuotaLabel" | "quickQuotaLoading" | "imageToolRunning" | "imageToolDone" | "imageToolFailed" | "openImage" | "openNamedImage" | "imageLoading" | "imageLoadFailed" | "imagePreviewClose" | "imagePreviewOpenOriginal" | "retry" | "unknown" | "hubBack" | "hubOverviewHint" | "hubAccountCount" | "hubNoAccounts" | "hubStateEnabled" | "hubStateDisabled" | "hubModelsEnabled" | "hubModelsEnabledOfTotal" | "hubStatusFailed" | "hubSwitchOn" | "hubSwitchOff" | "hubCardLabel" | "hubUpdateCheck" | "hubUpdateChecking" | "hubUpdateApply" | "hubUpdateApplying" | "hubUpdateUpToDate" | "hubUpdateLatestWithUnknownCurrent" | "hubUpdateAvailable" | "hubUpdateInstalled" | "hubUpdateInstalledReplaced" | "hubUpdateInstalledLive" | "hubUpdateInstalledReplacedLive" | "hubUpdateFailedRestored" | "hubUpdateFailedRollbackFailed" | "hubUpdateFailedRollbackSkipped" | "hubUpdateDevelopmentInstall" | "hubUpdatePluginManagerMissing" | "hubUpdateManualOnly" | "hubUpdateCheckFailed" | "hubUpdateCommandLabel" | "localCodexLoginImport" | "localCodexLoginImporting" | "deviceCodeLogin" | "deviceCodeLoginStarting" | "deviceCodeLoginDetail" | "deviceCodeHint" | "deviceCodeLabel" | "deviceCodeOpen" | "deviceCodeCopy" | "deviceCodeWaiting" | "stopImporting" | "stopImportingLabel" | "stopImportingBusy" | "stopImportingHint" | "cardName.chatgpt" | "cardName.command-code" | "cardName.kimi-code" | "cardName.minimax-code" | "cardName.glm-coding-plan" | "cardName.claude" | "cardName.ollama" | "cardName.step-code" | "cardName.cline-pass" | "cardName.qoder" | "cardName.opendesign" | "cardName.workbuddy" | "cardName.antigravity-acp" | "modelChecklistCount" | "codeRunTitle" | "codeRunOutput" | "codeRunCopy" | "codeRunCopied" | "codeRunWrap" | "codeRunUnwrap" | "codeRunInspect" | "codeRunPreparing" | "codeRunRunning" | "codeRunFailed" | "codeRunStopped" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "cooldownRemaining" | "cooldownRemainingSeconds" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel", string>;
504
506
  };
505
507
  //# sourceMappingURL=locales.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE,EAAG,0BAAmC,CAAA;AAIrD,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAA;AACvC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAA"}
@@ -76,7 +76,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
76
76
  * `test/responses-client.test.ts` asserts the two agree, so a release that
77
77
  * forgets this constant fails the suite instead of shipping quietly.
78
78
  */
79
- export declare const PLUGIN_VERSION: "0.70.1";
79
+ export declare const PLUGIN_VERSION: "0.72.0";
80
80
  export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
81
81
  export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
82
82
  export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 「计划模式管线」的宿主入口 —— 本包**第三个** loader 行(组件)。
3
3
  *
4
- * 调度模式(dispatch preset)的接线顺序是「R-G 澄清访谈收敛 → 规划 → 派发」。
4
+ * 调度模式(dispatch preset)的治理路径接线顺序是「L2-Governed → R-G 澄清访谈收敛 → 规划 → 派发」。
5
5
  * 澄清访谈收敛之后,主代理需要**显式进入**计划模式,把「只是进入」与「下一步
6
6
  * 才开始探索并出计划」分开,否则模型会把进入与出计划压在同一步里,计划就变成
7
7
  * 了没有探索的猜测。放弃规划时同样需要一个明确的出口。
@@ -145,8 +145,8 @@ export declare function resolvePlanModePipelineEnabled(config?: PlanModePipeline
145
145
  * **刻意压到 380 字符以内。** 工具描述与 system 段一样,每一步都随请求重发,是计划
146
146
  * 模式期间**每一步都在付**的常驻开销(Kimi 线路按内容前缀命中,进入计划模式那一步
147
147
  * 工具表一变,前缀必然重建一次;但重建之后,每一步还要为这些字节付输入费)。所以
148
- * 这里只留「能不能调用」的四条判定:只有调度模式用;只有 L2 且 R-G 访谈收敛后才可
149
- * 调用;进入这一步**只完成进入**;L0/L1 或访谈未收敛时不得调用。
148
+ * 这里只留「能不能调用」的四条判定:只有调度模式用;只有 L2-Governed 且 R-G 访谈收敛后才可
149
+ * 调用;进入这一步**只完成进入**;L0/L1/L2-Clear 或访谈未收敛时不得调用。
150
150
  *
151
151
  * 探索纪律、决策完备清单、`exit_plan_mode` 唯一最后调用、打回循环都搬到
152
152
  * `enterResultText()` 的工具返回里:工具结果是**末尾追加**,不破坏前缀,且比描述便宜。
@@ -1 +1 @@
1
- {"version":3,"file":"entry-plan-mode-pipeline.d.ts","sourceRoot":"","sources":["../../src/entry-plan-mode-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,oDAAoD;AACpD,eAAO,MAAM,IAAI,gDAAgD,CAAA;AAEjE;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,EAAO,CAAA;AAElC,gCAAgC;AAChC,eAAO,MAAM,oBAAoB,oBAAoB,CAAA;AAErD,oCAAoC;AACpC,eAAO,MAAM,oBAAoB,oBAAoB,CAAA;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,mBAAmB,CAAA;AAElD,4CAA4C;AAC5C,eAAO,MAAM,YAAY,qBAAqB,CAAA;AAE9C,iBAAiB;AACjB,MAAM,MAAM,yBAAyB;AACnC,qDAAqD;AACnD,gBAAgB;AAClB,8CAA8C;GAC5C,iBAAiB;AACnB,uCAAuC;GACr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MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;AAE9D,mDAAmD;AACnD,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,QAAQ,CAAA;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,gBA8R7B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,iBAAoC,GAAG,gBAAgB,CAyBtG;AAUD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,UAAU,EAChB,QAAQ,GAAE,iBAAoC,GAC7C,aAAa,CAuBf"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Minimal ACP v1 client over stdio JSON-RPC.
3
+ *
4
+ * Why hand-written: the protocol surface this line needs is small and stable
5
+ * (initialize / session\/* / a handful of notifications), and this repository's
6
+ * rule is that a provider line adds no runtime dependency it cannot justify. The
7
+ * official SDK would be a second protocol implementation inside a bundle that
8
+ * already ships one transport per line; the frames below are transcribed from
9
+ * the running server's own output, not from a specification draft.
10
+ *
11
+ * Two invariants shape this file:
12
+ *
13
+ * 1. **stdout carries protocol only.** Anything this process wants to say goes to
14
+ * stderr or nowhere. A stray `console.log` in a caller would corrupt the
15
+ * stream, so nothing here writes to stdout either.
16
+ * 2. **A frame is a complete line.** NDJSON split across chunk boundaries is
17
+ * normal on a pipe; splitting on the newline is therefore not "good enough",
18
+ * it is the only correct rule, and a decoder must carry its remainder.
19
+ *
20
+ * @module dsh-chatgpt-subscription/host/antigravity-acp/acp-client
21
+ */
22
+ /** One JSON-RPC request id. */
23
+ export type AcpRequestId = number;
24
+ /** One decoded protocol message. Unknown shapes stay opaque on purpose. */
25
+ export interface AcpMessage {
26
+ jsonrpc?: string;
27
+ id?: AcpRequestId | string;
28
+ method?: string;
29
+ params?: unknown;
30
+ result?: unknown;
31
+ error?: {
32
+ code?: number;
33
+ message?: string;
34
+ data?: unknown;
35
+ };
36
+ }
37
+ /** How the client reaches the agent process. */
38
+ export interface AcpSpawnOptions {
39
+ /** Absolute path to the executable. */
40
+ command: string;
41
+ /** Arguments after the executable; `acp` is added by the caller. */
42
+ args?: readonly string[];
43
+ /** Working directory for the agent process. */
44
+ cwd: string;
45
+ /** Extra environment entries layered over a scrubbed copy of this process's environment. */
46
+ env?: Readonly<Record<string, string>>;
47
+ /** Grace after stdin EOF before the process is killed. */
48
+ disposeEofGraceMs?: number;
49
+ /** Grace between the kill signal and a forced termination. */
50
+ disposeGraceMs?: number;
51
+ }
52
+ /** Handlers the session layers install on one connection. */
53
+ export interface AcpClientHandlers {
54
+ /** A `session/update` notification, already unwrapped to its `update` payload. */
55
+ onSessionUpdate?(sessionId: string, update: Record<string, unknown>): void;
56
+ /** A `session/request_permission` request; return the chosen option id or undefined to cancel. */
57
+ onPermissionRequest?(sessionId: string, params: Record<string, unknown>): Promise<string | undefined> | string | undefined;
58
+ /** Called once when the child exits, with the reason it will be reported as. */
59
+ onExit?(detail: AcpExitDetail): void;
60
+ /** Called whenever bytes arrive, so a watchdog can tell a slow model from a dead pipe. */
61
+ onActivity?(): void;
62
+ }
63
+ /** Why the agent process is gone. */
64
+ export interface AcpExitDetail {
65
+ /** Exit code when the process exited normally. */
66
+ code?: number | null;
67
+ /** Signal when it was terminated. */
68
+ signal?: string | null;
69
+ /** A bounded, human-readable tail of stderr; never contains a protocol frame. */
70
+ stderrTail?: string;
71
+ }
72
+ /** One ACP method failure, classified for the adapter's error mapping. */
73
+ export declare class AcpError extends Error {
74
+ readonly code: number | undefined;
75
+ constructor(message: string, code?: number);
76
+ }
77
+ /**
78
+ * One live ACP connection.
79
+ *
80
+ * A connection is not reentrant: the adapter owns turn sequencing, and this class
81
+ * only guarantees that a response settles its own request and that a notification
82
+ * reaches its handler in arrival order.
83
+ */
84
+ export declare class AcpClient {
85
+ private readonly child;
86
+ private readonly decoder;
87
+ private readonly pending;
88
+ private remainder;
89
+ private nextId;
90
+ private closed;
91
+ private stderrTail;
92
+ private handlers;
93
+ private readonly disposeEofGraceMs;
94
+ private readonly disposeGraceMs;
95
+ private exitDetail;
96
+ constructor(options: AcpSpawnOptions, handlers?: AcpClientHandlers);
97
+ /** Whether the underlying process is still running. */
98
+ get alive(): boolean;
99
+ /**
100
+ * Replace the handlers for the next turn.
101
+ *
102
+ * A warm process outlives the turn that started it, and every turn owns its own
103
+ * update queue and bridge. Re-binding is how a pooled connection is handed to
104
+ * the next turn without leaking the previous turn's queue into it.
105
+ *
106
+ * @param handlers - the next turn's callbacks.
107
+ */
108
+ rebind(handlers: AcpClientHandlers): void;
109
+ /** The exit facts, once the process is gone. */
110
+ get exit(): AcpExitDetail | undefined;
111
+ /**
112
+ * Send one request and resolve with its `result`.
113
+ *
114
+ * @param method - ACP method name.
115
+ * @param params - Method parameters.
116
+ * @param signal - Caller cancellation; aborting rejects this request only.
117
+ * @returns The `result` payload, opaque to this class.
118
+ */
119
+ request(method: string, params: unknown, signal?: AbortSignal): Promise<unknown>;
120
+ /** Send one notification (no response expected). */
121
+ notify(method: string, params: unknown): void;
122
+ /**
123
+ * Stop the process.
124
+ *
125
+ * Closing stdin first gives the agent its documented shutdown path; only a
126
+ * process that does not exit inside the grace is signalled. Both graces are
127
+ * bounded so a wedged child cannot hold a turn forever.
128
+ */
129
+ dispose(): Promise<void>;
130
+ private write;
131
+ private consume;
132
+ private dispatch;
133
+ private handleServerRequest;
134
+ private failAll;
135
+ }
136
+ //# sourceMappingURL=acp-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acp-client.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/acp-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,+BAA+B;AAC/B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAA;AAEjC,2EAA2E;AAC3E,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAA;IA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AAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAK7C;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAwB9B,OAAO,CAAC,KAAK;IAQb,OAAO,CAAC,OAAO;IAsBf,OAAO,CAAC,QAAQ;YA0BF,mBAAmB;IAsBjC,OAAO,CAAC,OAAO;CAKhB"}
@@ -0,0 +1,191 @@
1
+ /**
2
+ * The Antigravity (ACP) LLM adapter: one DSH model call, translated into one ACP
3
+ * turn on the official `agy` process.
4
+ *
5
+ * The shape of a turn
6
+ * -------------------
7
+ * A DSH generation that needs no tool is a single `stream()` call: prompt the
8
+ * agent, forward its text, finish. A generation that needs a tool spans *two*
9
+ * `stream()` calls, and the second one must not start a new agent turn - the
10
+ * agent is still sitting inside the first, waiting on the MCP request it made.
11
+ * This class therefore keeps a *live turn* per DSH session: the ACP session, the
12
+ * bridge, and how much history that turn has already been told about.
13
+ *
14
+ * Every other generation starts a fresh ACP session fed the complete DSH
15
+ * history. That is deliberately conservative: ACP sessions are stateful and
16
+ * resuming one would save a prefill, but the harness may compact or rewrite
17
+ * history at any point, and a resumed session whose transcript no longer matches
18
+ * the harness's would be a conversation the user cannot audit. The history module
19
+ * can tell the two apart; a fresh session is the honest default.
20
+ *
21
+ * Where the tool calls come from
22
+ * ------------------------------
23
+ * The bridge (see `mcp-bridge.ts`) parks the agent's MCP `tools/call` and this
24
+ * adapter surfaces it as an ordinary DSH tool call. The harness executes it with
25
+ * its own permissions and records the result; the next generation hands that
26
+ * result back here, which answers the parked request. The agent then continues
27
+ * inside the *same* ACP prompt.
28
+ *
29
+ * @module dsh-chatgpt-subscription/host/antigravity-acp/adapter
30
+ */
31
+ import { LlmAdapter, type GenerateOptions as HarnessGenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
32
+ import { type AttachmentImageReader } from '../common/request-images.ts';
33
+ import type { AntigravityAcpModelDto, AntigravityAcpUsageDto } from '../../shared/antigravity-acp-contracts.ts';
34
+ import { AcpClient, type AcpClientHandlers } from './acp-client.ts';
35
+ import type { AntigravityAcpSettingsStore } from './settings.ts';
36
+ import { PROVIDER_ID } from './types.ts';
37
+ /**
38
+ * First-output budget.
39
+ *
40
+ * The agent may think for minutes before its first byte: the live probe on a
41
+ * thinking model showed the prompt accepted and then silence, and this repository
42
+ * already carries the same lesson on its Kimi line. 240 s is the value the
43
+ * previous Antigravity line measured as safe for a thinking model.
44
+ */
45
+ export declare const ACP_FIRST_OUTPUT_TIMEOUT_MS = 240000;
46
+ /** Idle budget between protocol messages once the agent has started answering. */
47
+ export declare const ACP_STREAM_IDLE_TIMEOUT_MS = 120000;
48
+ /** How many finished processes stay warm for the next turn. */
49
+ export declare const DEFAULT_IDLE_PROCESS_LIMIT = 2;
50
+ /** How long a warm process may sit unused. */
51
+ export declare const DEFAULT_IDLE_PROCESS_TIMEOUT_MS = 300000;
52
+ /** How many turns may be in flight at once before this line refuses rather than queueing forever. */
53
+ export declare const DEFAULT_MAX_ACTIVE_TURNS = 4;
54
+ /**
55
+ * How many ACP sessions one agent process may open before it is recycled.
56
+ *
57
+ * Every generation creates a fresh ACP session, so a warm process that is reused
58
+ * indefinitely accumulates sessions and whatever the agent keeps beside each of
59
+ * them. The reference implementation caps this at 100 and recycles; the same
60
+ * number is used here so the two behave alike under a long session.
61
+ */
62
+ export declare const DEFAULT_MAX_SESSIONS_PER_PROCESS = 100;
63
+ /** Where the executable comes from. */
64
+ export interface AcpLaunch {
65
+ /** Absolute path of the executable. */
66
+ command: string;
67
+ /** Arguments that select ACP stdio mode (`acp` plus any flags). */
68
+ args: string[];
69
+ /** Version string when the resolver could read one. */
70
+ version?: string;
71
+ }
72
+ /** The catalog view this adapter advertises. */
73
+ export interface AcpCatalogView {
74
+ models: AntigravityAcpModelDto[];
75
+ /** True when this is a rehydrated snapshot rather than a live read. */
76
+ synced: boolean;
77
+ }
78
+ /** Options this adapter is constructed with. */
79
+ export interface AntigravityAcpAdapterOptions {
80
+ /** This line's own preferences. */
81
+ settings: AntigravityAcpSettingsStore;
82
+ /** Resolve the executable; rejects with a user-readable message when none is usable. */
83
+ resolveLaunch(): Promise<AcpLaunch>;
84
+ /** Read the live catalogue, or undefined while the line cannot reach the agent. */
85
+ loadCatalog(options?: {
86
+ signal?: AbortSignal;
87
+ }): Promise<AcpCatalogView | undefined>;
88
+ /** Durable image reader for prompt images. */
89
+ attachments?: AttachmentImageReader;
90
+ /** Working directory each ACP session is created in. */
91
+ cwd?(): string;
92
+ /** Test seam: construct the protocol client for one process. */
93
+ spawnClient?(launch: AcpLaunch, cwd: string, handlers: AcpClientHandlers): AcpClient;
94
+ /** Idle warm processes to keep for the next turn. */
95
+ idleProcessLimit?: number;
96
+ /** How long one warm process may sit idle. */
97
+ idleProcessTimeoutMs?: number;
98
+ /** Turns allowed in flight at once. */
99
+ maxActiveTurns?: number;
100
+ /** ACP sessions one warm process may open before it is recycled. */
101
+ maxSessionsPerProcess?: number;
102
+ /** Clock seam. */
103
+ now?(): number;
104
+ }
105
+ /** The adapter itself. */
106
+ export declare class AntigravityAcpAdapter extends LlmAdapter {
107
+ private readonly options;
108
+ private readonly live;
109
+ private readonly idle;
110
+ private activeTurns;
111
+ private lastUsage;
112
+ /**
113
+ * Context occupancy reported by `usage_update`, when the server sends it.
114
+ *
115
+ * Kept apart from {@link lastUsage} on purpose: occupancy is how full the
116
+ * context window is, not how many tokens a turn billed, and collapsing the two
117
+ * is how a card ends up showing a fabricated cost.
118
+ */
119
+ private lastOccupancy;
120
+ constructor(options: AntigravityAcpAdapterOptions);
121
+ providerInfo(provider: string): LlmProviderInfo;
122
+ providerRetryPolicy(): ResolvedRetryPolicy;
123
+ /** Token counts of the last completed turn, for the status card. */
124
+ usage(): AntigravityAcpUsageDto | undefined;
125
+ /** Context occupancy of the live turn, when the server reported it. */
126
+ occupancy(): {
127
+ used: number;
128
+ size: number;
129
+ at: number;
130
+ } | undefined;
131
+ listModels(provider: string): Promise<readonly LlmModelInfo[]>;
132
+ resolveModel(provider: string, model: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
133
+ prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
134
+ stream(options: HarnessGenerateOptions): AsyncIterable<StreamChunk>;
135
+ /** Close every process this adapter owns. */
136
+ dispose(): Promise<void>;
137
+ /**
138
+ * Resolve which turn this generation belongs to, then hand back its stream.
139
+ *
140
+ * Setup is `await`ed before the first chunk on purpose: a failure to resolve
141
+ * the executable or create the ACP session must surface as a rejected stream,
142
+ * not as an empty answer.
143
+ */
144
+ private runAsIterable;
145
+ private run;
146
+ /** Start a fresh ACP session for one generation and stream its answer. */
147
+ private startTurn;
148
+ /** Continue the live turn after the harness executed its tools. */
149
+ private continueTurn;
150
+ /** Drain one turn's updates, yielding harness chunks as they arrive. */
151
+ private pump;
152
+ private spawn;
153
+ private cwd;
154
+ private openSession;
155
+ private applyConfig;
156
+ private applyConfigQuietly;
157
+ private sendPrompt;
158
+ private closeTurn;
159
+ /**
160
+ * Take one warm process out of the pool.
161
+ *
162
+ * A process that has opened its session budget is disposed here rather than
163
+ * handed back: the cap exists so a long-lived process does not accumulate
164
+ * agent-side session state forever.
165
+ *
166
+ * @returns the client and the sessions it already opened, or undefined.
167
+ */
168
+ private checkoutIdle;
169
+ /** Re-install per-turn handlers on a reused client. */
170
+ private attachHandlers;
171
+ private release;
172
+ private visibleModels;
173
+ private now;
174
+ }
175
+ /**
176
+ * The instruction prepended to every prompt while a bridge is attached.
177
+ *
178
+ * ACP gives the agent its own tools, and a native `write_file` would modify the
179
+ * workspace without passing through this harness at all - no permission prompt,
180
+ * no sandbox policy, no durable tool-result record. The bridge cannot unload
181
+ * them, so the only defence that costs nothing is to say so: the agent is told
182
+ * that its own filesystem and terminal tools are unavailable for this turn and
183
+ * that every action must go through the provided tool.
184
+ *
185
+ * This is a protocol-level guardrail, not an OS sandbox: an agent that ignores
186
+ * it can still act. The adapter detects that case separately (see
187
+ * `assertNoNativeTool`) and cancels the turn rather than letting it continue.
188
+ */
189
+ export declare const BRIDGE_ONLY_INSTRUCTION: string;
190
+ export { PROVIDER_ID };
191
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EACL,UAAU,EAGV,KAAK,eAAe,IAAI,sBAAsB,EAC9C,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAA;AAU7B,OAAO,EAGL,KAAK,qBAAqB,EAE3B,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAA;AAC/G,OAAO,EAAE,SAAS,EAAY,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAI7E,OAAO,KAAK,EAA0B,2BAA2B,EAAE,MAAM,eAAe,CAAA;AACxF,OAAO,EAGL,WAAW,EAKZ,MAAM,YAAY,CAAA;AAcnB;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,SAAU,CAAA;AAElD,kFAAkF;AAClF,eAAO,MAAM,0BAA0B,SAAyB,CAAA;AAEhE,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,IAAI,CAAA;AAE3C,8CAA8C;AAC9C,eAAO,MAAM,+BAA+B,SAAU,CAAA;AAEtD,qGAAqG;AACrG,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC,MAAM,CAAA;AAEnD,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,OAA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AO,CAAC,aAAa;IAUrB,OAAO,CAAC,GAAG;CAGZ;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,QAKzB,CAAA;AA6LX,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * A cached answer to "is the agent signed in?".
3
+ *
4
+ * The only truthful way to answer that question is to ask the agent - there is
5
+ * no local state this plugin may read - and asking costs a whole process spawn
6
+ * plus a session creation. The settings card polls, the hub overview polls, and
7
+ * every one of those reads used to spawn its own process: three cards on one
8
+ * screen meant three `agy` launches, and the slowest one decided when the page
9
+ * rendered.
10
+ *
11
+ * So the answer is cached for a short window. The window is short because a user
12
+ * who just signed in must not have to wait a minute to see it; it is non-zero
13
+ * because a poll must not be a process launch. `login/start` and the explicit
14
+ * refresh route invalidate it, which is exactly when the answer is known to have
15
+ * changed.
16
+ *
17
+ * @module dsh-chatgpt-subscription/host/antigravity-acp/auth-cache
18
+ */
19
+ import type { AntigravityAcpAuthDto } from '../../shared/antigravity-acp-contracts.ts';
20
+ /** How long one probe answers for. */
21
+ export declare const AUTH_CACHE_TTL_MS = 60000;
22
+ /** The cache itself. */
23
+ export declare class AcpAuthCache {
24
+ private readonly probe;
25
+ private readonly now;
26
+ private readonly ttlMs;
27
+ private value;
28
+ private fetchedAt;
29
+ private inflight;
30
+ /**
31
+ * @param probe - Reads the real state; called at most once per window.
32
+ * @param now - Clock seam.
33
+ * @param ttlMs - How long one answer stays valid.
34
+ */
35
+ constructor(probe: () => Promise<AntigravityAcpAuthDto>, now?: () => number, ttlMs?: number);
36
+ /** The cached answer, when one is still valid. */
37
+ peek(): AntigravityAcpAuthDto | undefined;
38
+ /**
39
+ * Read the state, reusing a valid answer or one in-flight probe.
40
+ *
41
+ * @param options - `force` bypasses the window (after a sign-in, after a refresh click).
42
+ * @returns The auth state; a failed probe answers "not signed in" rather than throwing.
43
+ */
44
+ read(options?: {
45
+ force?: boolean;
46
+ }): Promise<AntigravityAcpAuthDto>;
47
+ /** Forget the answer, e.g. because a sign-in was just started. */
48
+ invalidate(): void;
49
+ }
50
+ //# sourceMappingURL=auth-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-cache.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/auth-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AAEtF,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,QAAS,CAAA;AAEvC,wBAAwB;AACxB,qBAAa,YAAY;IAWrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAZxB,OAAO,CAAC,KAAK,CAAmC;IAChD,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,QAAQ,CAA4C;IAE5D;;;;OAIG;gBAEgB,KAAK,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,EAC3C,GAAG,GAAE,MAAM,MAAiB,EAC5B,KAAK,GAAE,MAA0B;IAGpD,kDAAkD;IAClD,IAAI,IAAI,qBAAqB,GAAG,SAAS;IAKzC;;;;;OAKG;IACG,IAAI,CAAC,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAmB7E,kEAAkE;IAClE,UAAU,IAAI,IAAI;CAInB"}