@eddyskywalker/dsh-chatgpt-subscription 0.68.1 → 0.70.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 (119) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +5 -7
  3. package/lib/client.js +338 -1357
  4. package/lib/client.js.map +1 -1
  5. package/lib/codemode.js +440 -18
  6. package/lib/{entry-plan-mode-gqE4UeU5.js → entry-plan-mode-5DBZA4Il.js} +38 -11
  7. package/lib/index.js +2900 -7157
  8. package/lib/plan-mode-pipeline.js +20 -6
  9. package/lib/plan-mode.js +1 -1
  10. package/lib/types/client/CodexImageToolView.d.ts.map +1 -1
  11. package/lib/types/client/claude/locales.d.ts +2 -2
  12. package/lib/types/client/codemode/CodeRunToolView.d.ts.map +1 -1
  13. package/lib/types/client/command-code/locales.d.ts +2 -2
  14. package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -1
  15. package/lib/types/client/common/account-pool-labels.d.ts +1 -1
  16. package/lib/types/client/common/account-pool-labels.d.ts.map +1 -1
  17. package/lib/types/client/common/format.d.ts +1 -1
  18. package/lib/types/client/glm-coding-plan/locales.d.ts +2 -2
  19. package/lib/types/client/hub/brand-icons.d.ts +1 -1
  20. package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
  21. package/lib/types/client/hub/providers.d.ts.map +1 -1
  22. package/lib/types/client/index.d.ts +0 -2
  23. package/lib/types/client/index.d.ts.map +1 -1
  24. package/lib/types/client/kimi-code/locales.d.ts +2 -2
  25. package/lib/types/client/locales-ru/hub.d.ts.map +1 -1
  26. package/lib/types/client/locales-ru/index.d.ts.map +1 -1
  27. package/lib/types/client/locales.d.ts +1 -3
  28. package/lib/types/client/locales.d.ts.map +1 -1
  29. package/lib/types/client/minimax-code/locales.d.ts +2 -2
  30. package/lib/types/client/progress-updates/locales.d.ts +3 -3
  31. package/lib/types/client/progress-updates/styles.d.ts +1 -1
  32. package/lib/types/client/qoder/locales.d.ts +1 -1
  33. package/lib/types/client/step-code/StepCodeComposerQuota.d.ts +3 -5
  34. package/lib/types/client/step-code/StepCodeComposerQuota.d.ts.map +1 -1
  35. package/lib/types/client/step-code/locales.d.ts +2 -2
  36. package/lib/types/compat.d.ts +1 -10
  37. package/lib/types/compat.d.ts.map +1 -1
  38. package/lib/types/entry-codemode.d.ts.map +1 -1
  39. package/lib/types/entry-plan-mode-pipeline.d.ts.map +1 -1
  40. package/lib/types/host/agent-preset.d.ts +5 -3
  41. package/lib/types/host/agent-preset.d.ts.map +1 -1
  42. package/lib/types/host/codemode/transport.d.ts +61 -5
  43. package/lib/types/host/codemode/transport.d.ts.map +1 -1
  44. package/lib/types/host/common/capabilities.d.ts.map +1 -1
  45. package/lib/types/host/common/i18n/en.d.ts.map +1 -1
  46. package/lib/types/host/common/i18n/ru.d.ts.map +1 -1
  47. package/lib/types/host/common/i18n/zh.d.ts +0 -2
  48. package/lib/types/host/common/i18n/zh.d.ts.map +1 -1
  49. package/lib/types/host/common/idle-watchdog.d.ts +10 -2
  50. package/lib/types/host/common/idle-watchdog.d.ts.map +1 -1
  51. package/lib/types/host/common/model-request-control.d.ts +1 -1
  52. package/lib/types/host/common/model-request-control.d.ts.map +1 -1
  53. package/lib/types/host/common/prompt-cache-policy.d.ts.map +1 -1
  54. package/lib/types/host/common/request-diagnostics.d.ts +1 -1
  55. package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
  56. package/lib/types/host/credential-store-secret-service.d.ts +3 -5
  57. package/lib/types/host/credential-store-secret-service.d.ts.map +1 -1
  58. package/lib/types/host/dispatch-execution-guard.d.ts.map +1 -1
  59. package/lib/types/host/glm-coding-plan/oauth.d.ts +1 -1
  60. package/lib/types/host/kimi-code/adapter.d.ts +6 -2
  61. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  62. package/lib/types/host/kimi-code/types.d.ts +14 -0
  63. package/lib/types/host/kimi-code/types.d.ts.map +1 -1
  64. package/lib/types/host/opendesign/types.d.ts +1 -2
  65. package/lib/types/host/opendesign/types.d.ts.map +1 -1
  66. package/lib/types/host/preset-sync.d.ts +2 -2
  67. package/lib/types/host/preset-sync.d.ts.map +1 -1
  68. package/lib/types/host/proxy-manager.d.ts +10 -10
  69. package/lib/types/host/proxy-manager.d.ts.map +1 -1
  70. package/lib/types/host/widget-board/line-contracts.d.ts +1 -1
  71. package/lib/types/host/widget-board/line-quota.d.ts +1 -16
  72. package/lib/types/host/widget-board/line-quota.d.ts.map +1 -1
  73. package/lib/types/host/widget-board/line-registry.d.ts.map +1 -1
  74. package/lib/types/index.d.ts +2 -8
  75. package/lib/types/index.d.ts.map +1 -1
  76. package/lib/types/shared/minimax-code-contracts.d.ts +1 -1
  77. package/package.json +26 -24
  78. package/widgets/line-flip/widget.json +2 -7
  79. package/bin/antigravity-login.mjs +0 -47
  80. package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts +0 -32
  81. package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts.map +0 -1
  82. package/lib/types/client/antigravity/AntigravitySection.d.ts +0 -8
  83. package/lib/types/client/antigravity/AntigravitySection.d.ts.map +0 -1
  84. package/lib/types/client/antigravity/locales.d.ts +0 -290
  85. package/lib/types/client/antigravity/locales.d.ts.map +0 -1
  86. package/lib/types/client/antigravity/styles.d.ts +0 -3
  87. package/lib/types/client/antigravity/styles.d.ts.map +0 -1
  88. package/lib/types/client/locales-ru/antigravity.d.ts +0 -10
  89. package/lib/types/client/locales-ru/antigravity.d.ts.map +0 -1
  90. package/lib/types/host/antigravity/account-pool.d.ts +0 -158
  91. package/lib/types/host/antigravity/account-pool.d.ts.map +0 -1
  92. package/lib/types/host/antigravity/adapter.d.ts +0 -71
  93. package/lib/types/host/antigravity/adapter.d.ts.map +0 -1
  94. package/lib/types/host/antigravity/cache-stats.d.ts +0 -166
  95. package/lib/types/host/antigravity/cache-stats.d.ts.map +0 -1
  96. package/lib/types/host/antigravity/catalog-limits.d.ts +0 -23
  97. package/lib/types/host/antigravity/catalog-limits.d.ts.map +0 -1
  98. package/lib/types/host/antigravity/client-version.d.ts +0 -55
  99. package/lib/types/host/antigravity/client-version.d.ts.map +0 -1
  100. package/lib/types/host/antigravity/client.d.ts +0 -74
  101. package/lib/types/host/antigravity/client.d.ts.map +0 -1
  102. package/lib/types/host/antigravity/image-tool.d.ts +0 -73
  103. package/lib/types/host/antigravity/image-tool.d.ts.map +0 -1
  104. package/lib/types/host/antigravity/mapper.d.ts +0 -165
  105. package/lib/types/host/antigravity/mapper.d.ts.map +0 -1
  106. package/lib/types/host/antigravity/oauth.d.ts +0 -98
  107. package/lib/types/host/antigravity/oauth.d.ts.map +0 -1
  108. package/lib/types/host/antigravity/port-constants.d.ts +0 -33
  109. package/lib/types/host/antigravity/port-constants.d.ts.map +0 -1
  110. package/lib/types/host/antigravity/routes.d.ts +0 -7
  111. package/lib/types/host/antigravity/routes.d.ts.map +0 -1
  112. package/lib/types/host/antigravity/token-store.d.ts +0 -76
  113. package/lib/types/host/antigravity/token-store.d.ts.map +0 -1
  114. package/lib/types/host/antigravity/tool-schema.d.ts +0 -14
  115. package/lib/types/host/antigravity/tool-schema.d.ts.map +0 -1
  116. package/lib/types/host/antigravity/types.d.ts +0 -119
  117. package/lib/types/host/antigravity/types.d.ts.map +0 -1
  118. package/lib/types/shared/antigravity-contracts.d.ts +0 -175
  119. package/lib/types/shared/antigravity-contracts.d.ts.map +0 -1
@@ -202,19 +202,28 @@ function isDelegatedCaller(agent, ctx) {
202
202
  if (isRecord(header) && header["origin"] === "subagent") return true;
203
203
  }
204
204
  const agents = readService(ctx, "agents");
205
+ if (isRecord(agents)) {
206
+ const id = idOf(agent);
207
+ if (typeof id === "string" && typeof agents["get"] === "function") {
208
+ let live;
209
+ try {
210
+ live = agents["get"].call(agents, id);
211
+ } catch {
212
+ live = void 0;
213
+ }
214
+ if (live !== agent) return false;
215
+ }
216
+ }
217
+ const subagents = readService(ctx, "subagents");
218
+ if (isRecord(subagents) && typeof subagents["rootOf"] === "function") try {
219
+ const root = subagents["rootOf"].call(subagents, agent);
220
+ if (root !== void 0 && root !== agent) return true;
221
+ } catch (error) {
222
+ if (isRecord(error) && error["code"] === "UNAUTHORIZED") return true;
223
+ }
205
224
  if (!isRecord(agents)) return false;
206
225
  const roots = rootsOf(agents);
207
226
  if (roots === void 0) return false;
208
- const id = idOf(agent);
209
- if (typeof id === "string" && typeof agents["get"] === "function") {
210
- let live;
211
- try {
212
- live = agents["get"].call(agents, id);
213
- } catch {
214
- live = void 0;
215
- }
216
- if (live !== agent) return false;
217
- }
218
227
  return !roots.includes(agent);
219
228
  }
220
229
  /**
@@ -306,7 +315,25 @@ function hasRunningChildSubagent(agent, ctx) {
306
315
  if (ownId !== void 0) parentIds.add(ownId);
307
316
  const headerId = sessionIdOf(agent);
308
317
  if (headerId !== void 0) parentIds.add(headerId);
309
- if (entriesOf(listed).some((entry) => entry["status"] === "running" && typeof entry["parent"] === "string" && parentIds.has(entry["parent"]))) return true;
318
+ const rootOfFn = isRecord(subagents) && typeof subagents["rootOf"] === "function" ? subagents["rootOf"] : void 0;
319
+ const isOwnedByFn = typeof agents["isOwnedBy"] === "function" ? agents["isOwnedBy"] : void 0;
320
+ if (entriesOf(listed).some((entry) => {
321
+ if (entry === agent || entry["status"] !== "running") return false;
322
+ if (typeof entry["parent"] === "string" && parentIds.has(entry["parent"])) return true;
323
+ const session = entry["session"];
324
+ const header = isRecord(session) ? session["header"] : void 0;
325
+ if (isRecord(header) && typeof header["parentSession"] === "string" && parentIds.has(header["parentSession"]) && (header["origin"] === "subagent" || header["isSeeded"] !== true)) return true;
326
+ if (rootOfFn !== void 0) try {
327
+ if (rootOfFn.call(subagents, entry) === agent) return true;
328
+ } catch {}
329
+ if (isOwnedByFn !== void 0) {
330
+ const entryId = idOf(entry);
331
+ if (entryId !== void 0) try {
332
+ if (isOwnedByFn.call(agents, entryId, agent) === true) return true;
333
+ } catch {}
334
+ }
335
+ return false;
336
+ })) return true;
310
337
  }
311
338
  return false;
312
339
  }