@deepseek-harness-tui/dsh-tui 0.19.0 → 0.20.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 (166) hide show
  1. package/README.md +63 -57
  2. package/cordis.patch.yml +5 -3
  3. package/cordis.yml +3 -2
  4. package/guide/dsh-tui-guide/configuration.en.md +1 -1
  5. package/guide/dsh-tui-guide/configuration.md +1 -1
  6. package/guide/dsh-tui-guide/getting-started.en.md +2 -2
  7. package/guide/dsh-tui-guide/getting-started.md +2 -2
  8. package/guide/dsh-tui-guide/user-guide.en.md +7 -2
  9. package/guide/dsh-tui-guide/user-guide.md +7 -2
  10. package/lib/settings.json +24 -8
  11. package/lib/types/adapter/ports/channel-view.d.ts +39 -3
  12. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  13. package/lib/types/agent/events.d.ts +3 -1
  14. package/lib/types/agent/events.d.ts.map +1 -1
  15. package/lib/types/backends/claude/tools.d.ts.map +1 -1
  16. package/lib/types/backends/claude/tools.js +8 -3
  17. package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -1
  18. package/lib/types/backends/codex/translate/presentation.js +5 -2
  19. package/lib/types/channel/interaction.d.ts.map +1 -1
  20. package/lib/types/channel/interaction.js +1 -0
  21. package/lib/types/channel/permissions.d.ts +15 -0
  22. package/lib/types/channel/permissions.d.ts.map +1 -1
  23. package/lib/types/channel/permissions.js +28 -0
  24. package/lib/types/channel/projection.d.ts.map +1 -1
  25. package/lib/types/channel/projection.js +11 -1
  26. package/lib/types/channel/questions.d.ts +26 -0
  27. package/lib/types/channel/questions.d.ts.map +1 -1
  28. package/lib/types/channel/questions.js +43 -0
  29. package/lib/types/commands.js +1 -1
  30. package/lib/types/components/MessageList.d.ts.map +1 -1
  31. package/lib/types/components/MessageList.js +3 -3
  32. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  33. package/lib/types/components/SplitDiffView.js +3 -2
  34. package/lib/types/components/StarPrompt.d.ts +5 -3
  35. package/lib/types/components/StarPrompt.d.ts.map +1 -1
  36. package/lib/types/components/StarPrompt.js +56 -6
  37. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  38. package/lib/types/components/SubagentCard.js +1 -1
  39. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  40. package/lib/types/components/SubagentDashboard.js +3 -2
  41. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  42. package/lib/types/components/SubagentDetailScene.js +1 -1
  43. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  44. package/lib/types/components/messages/AssistantToolUseMessage.js +121 -23
  45. package/lib/types/components/teamRoster.d.ts +6 -3
  46. package/lib/types/components/teamRoster.d.ts.map +1 -1
  47. package/lib/types/dsh-adapter/approvals.d.ts +19 -0
  48. package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
  49. package/lib/types/dsh-adapter/approvals.js +17 -1
  50. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  51. package/lib/types/dsh-adapter/backend/translate.js +15 -3
  52. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  53. package/lib/types/dsh-adapter/channel/extensions.js +7 -4
  54. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  55. package/lib/types/dsh-adapter/channel/local-actions.js +7 -3
  56. package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
  57. package/lib/types/dsh-adapter/channel/projection-helpers.js +4 -2
  58. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  59. package/lib/types/dsh-adapter/channel/settings-host.js +179 -33
  60. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +55 -4
  61. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  62. package/lib/types/dsh-adapter/channel/subagent-projection.js +80 -16
  63. package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +1 -1
  64. package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -1
  65. package/lib/types/dsh-adapter/channel/subagent-transcript.js +6 -5
  66. package/lib/types/dsh-adapter/channel/task-completion.js +2 -10
  67. package/lib/types/dsh-adapter/compat/compaction-previews.d.ts +11 -0
  68. package/lib/types/dsh-adapter/compat/compaction-previews.d.ts.map +1 -0
  69. package/lib/types/dsh-adapter/compat/compaction-previews.js +38 -0
  70. package/lib/types/dsh-adapter/compat/messages.d.ts +1 -1
  71. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
  72. package/lib/types/dsh-adapter/compat/messages.js +2 -2
  73. package/lib/types/dsh-adapter/contract.d.ts +7 -4
  74. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  75. package/lib/types/dsh-adapter/contract.js +8 -4
  76. package/lib/types/dsh-adapter/experimental-bundles.d.ts +5 -0
  77. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
  78. package/lib/types/dsh-adapter/experimental-bundles.js +0 -2
  79. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  80. package/lib/types/dsh-adapter/host-contract.js +2 -2
  81. package/lib/types/dsh-adapter/host-dsh.d.ts +2 -0
  82. package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
  83. package/lib/types/dsh-adapter/host-dsh.js +3 -0
  84. package/lib/types/dsh-adapter/index.d.ts +9 -1
  85. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  86. package/lib/types/dsh-adapter/index.js +5 -0
  87. package/lib/types/dsh-adapter/oauth/account-notifications.d.ts +73 -0
  88. package/lib/types/dsh-adapter/oauth/account-notifications.d.ts.map +1 -0
  89. package/lib/types/dsh-adapter/oauth/account-notifications.js +250 -0
  90. package/lib/types/dsh-adapter/oauth/bonus.d.ts +34 -9
  91. package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -1
  92. package/lib/types/dsh-adapter/oauth/bonus.js +47 -5
  93. package/lib/types/dsh-adapter/oauth/deepseek.d.ts +7 -2
  94. package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -1
  95. package/lib/types/dsh-adapter/oauth/deepseek.js +6 -1
  96. package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -1
  97. package/lib/types/dsh-adapter/oauth/index.js +44 -0
  98. package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -1
  99. package/lib/types/dsh-adapter/oauth/service.js +5 -6
  100. package/lib/types/dsh-adapter/plugin-manage.d.ts +6 -4
  101. package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
  102. package/lib/types/dsh-adapter/plugin-manage.js +3 -2
  103. package/lib/types/dsh-adapter/plugin.d.ts +237 -6
  104. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  105. package/lib/types/dsh-adapter/plugin.js +608 -23
  106. package/lib/types/dsh-adapter/session-projection-store.d.ts +1 -1
  107. package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -1
  108. package/lib/types/dsh-adapter/session-projection-store.js +30 -23
  109. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
  110. package/lib/types/dsh-adapter/sessionTree.js +4 -1
  111. package/lib/types/dsh-adapter/subagents.d.ts +1 -0
  112. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  113. package/lib/types/dsh-adapter/subagents.js +10 -2
  114. package/lib/types/dsh-adapter/team-mode.d.ts +29 -17
  115. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  116. package/lib/types/dsh-adapter/team-mode.js +138 -17
  117. package/lib/types/dsh-adapter/team-roster.d.ts +53 -18
  118. package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -1
  119. package/lib/types/dsh-adapter/team-roster.js +206 -39
  120. package/lib/types/dsh-adapter/team-tools.d.ts +25 -12
  121. package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -1
  122. package/lib/types/dsh-adapter/team-tools.js +81 -26
  123. package/lib/types/i18n.d.ts +65 -9
  124. package/lib/types/i18n.d.ts.map +1 -1
  125. package/lib/types/i18n.js +29 -8
  126. package/lib/types/ink/dom.d.ts.map +1 -1
  127. package/lib/types/ink/dom.js +13 -3
  128. package/lib/types/ink/flush-tick.d.ts +6 -0
  129. package/lib/types/ink/flush-tick.d.ts.map +1 -1
  130. package/lib/types/ink/flush-tick.js +31 -0
  131. package/lib/types/ink/hooks/use-terminal-title.d.ts +15 -0
  132. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -1
  133. package/lib/types/ink/hooks/use-terminal-title.js +23 -3
  134. package/lib/types/ink/ink.js +2 -2
  135. package/lib/types/ink/jumpback-state.d.ts +33 -0
  136. package/lib/types/ink/jumpback-state.d.ts.map +1 -0
  137. package/lib/types/ink/jumpback-state.js +51 -0
  138. package/lib/types/ink/jumpback.d.ts +78 -0
  139. package/lib/types/ink/jumpback.d.ts.map +1 -0
  140. package/lib/types/ink/jumpback.js +515 -0
  141. package/lib/types/ink/log-update.js +37 -14
  142. package/lib/types/ink/notify-helper/activate.cs +836 -0
  143. package/lib/types/ink/notify-helper/compile.d.ts +30 -0
  144. package/lib/types/ink/notify-helper/compile.d.ts.map +1 -0
  145. package/lib/types/ink/notify-helper/compile.js +235 -0
  146. package/lib/types/ink/terminal-notification-windows.d.ts +8 -4
  147. package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -1
  148. package/lib/types/ink/terminal-notification-windows.js +14 -21
  149. package/lib/types/ink/terminal-notification.d.ts +31 -2
  150. package/lib/types/ink/terminal-notification.d.ts.map +1 -1
  151. package/lib/types/ink/terminal-notification.js +51 -0
  152. package/lib/types/ink/terminal.d.ts +2 -1
  153. package/lib/types/ink/terminal.d.ts.map +1 -1
  154. package/lib/types/ink/terminal.js +9 -4
  155. package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
  156. package/lib/types/screens/AgentTranscriptScene.js +1 -1
  157. package/lib/types/screens/Chat.d.ts +4 -3
  158. package/lib/types/screens/Chat.d.ts.map +1 -1
  159. package/lib/types/screens/Chat.js +38 -9
  160. package/lib/types/settings/definitions.d.ts +12 -0
  161. package/lib/types/settings/definitions.d.ts.map +1 -1
  162. package/lib/types/settings/definitions.js +15 -7
  163. package/package.json +112 -112
  164. package/presets/liangshen/agent.cordis.yml +4 -0
  165. package/tui-profile/feed/README.md +1 -1
  166. package/tui-profile/feed/first-party.json +1 -1
@@ -0,0 +1,73 @@
1
+ import type { AccountClientMetadata } from '@deepseek-ai/dsh-deepseek-account';
2
+ /** Structural public rc.2 protocol; older hosts do not export its types. */
3
+ export interface AccountNotificationNotice {
4
+ readonly kind: 'account-notification';
5
+ readonly orderId: string;
6
+ readonly title: string;
7
+ readonly body: string;
8
+ readonly displayUntil: string | null;
9
+ readonly amount?: string;
10
+ readonly currency?: 'CNY' | 'USD';
11
+ readonly expiresAt?: string;
12
+ readonly actions: readonly {
13
+ readonly label: string;
14
+ readonly style: 'primary' | 'secondary';
15
+ readonly target: {
16
+ readonly type: 'dismiss';
17
+ } | {
18
+ readonly type: 'app_route';
19
+ readonly name: 'account';
20
+ };
21
+ }[];
22
+ }
23
+ interface NotificationContent extends Omit<AccountNotificationNotice, 'kind' | 'orderId'> {
24
+ readonly id: string;
25
+ readonly data?: unknown;
26
+ }
27
+ export interface AccountNotifications {
28
+ getNotifications(client: AccountClientMetadata): Promise<{
29
+ readonly nextPollAfterSeconds: number;
30
+ readonly notifications: readonly NotificationContent[];
31
+ } | null>;
32
+ getNotificationContent(id: string, client: AccountClientMetadata): Promise<NotificationContent | null>;
33
+ reportNotificationEvent(id: string, event: 'displayed' | 'cta_clicked' | 'dismissed', client: AccountClientMetadata): Promise<boolean>;
34
+ }
35
+ export declare function accountNotificationsOf(account: unknown): AccountNotifications | undefined;
36
+ /** Account-owned cards: reads never acknowledge; only the presented card reports display. */
37
+ export declare class AccountNotificationStore {
38
+ private readonly changed;
39
+ private readonly diagnose;
40
+ private account;
41
+ private generation;
42
+ private pollEpoch;
43
+ private localeGeneration;
44
+ private timer;
45
+ private expiryTimer;
46
+ private intervalMs;
47
+ private cards;
48
+ private readonly displayed;
49
+ private readonly pendingDismissals;
50
+ private localeRefresh;
51
+ constructor(changed: () => void, diagnose?: (operation: 'read' | 'content' | 'report') => void);
52
+ getSnapshot(): AccountNotificationNotice | null;
53
+ begin(account: AccountNotifications): void;
54
+ /** Explicit refresh uses the same generation fence and server-paced poll. */
55
+ refresh(account: AccountNotifications): Promise<void>;
56
+ clear(): void;
57
+ /** A language change refreshes content without consuming it or changing card order. */
58
+ localeChanged(): Promise<void>;
59
+ /** A poll finished with copy from before a language change: reuse an
60
+ * in-flight refresh instead of invalidating its successful request. */
61
+ private staleLocaleRefresh;
62
+ private startLocaleRefresh;
63
+ private refreshLocale;
64
+ shown(id: string): void;
65
+ dismiss(id: string): void;
66
+ private report;
67
+ private dropExpired;
68
+ private publish;
69
+ private scheduleExpiry;
70
+ private poll;
71
+ }
72
+ export {};
73
+ //# sourceMappingURL=account-notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-notifications.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/oauth/account-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAG9E,4EAA4E;AAC5E,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAA;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS;QACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;QACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,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AK,CAA2C;IACxD,OAAO,CAAC,WAAW,CAA2C;IAC9D,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoB;IAC9C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,aAAa,CAA2B;gBAEnB,OAAO,EAAE,MAAM,IAAI,EAAmB,QAAQ,GAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,KAAK,IAAe;IAE1I,WAAW,IAAI,yBAAyB,GAAG,IAAI;IAE/C,KAAK,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAO1C,6EAA6E;IACvE,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D,KAAK,IAAI,IAAI;IAeb,uFAAuF;IACvF,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAM9B;2EACuE;IACvE,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,kBAAkB;YAQZ,aAAa;IAkB3B,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAOvB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAoBzB,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,WAAW;IAEnB,OAAO,CAAC,OAAO;IAef,OAAO,CAAC,cAAc;YAkBR,IAAI;CAmDnB"}
@@ -0,0 +1,250 @@
1
+ import { deepSeekClientMetadata } from './deepseek.js';
2
+ export function accountNotificationsOf(account) {
3
+ const value = account;
4
+ return typeof value?.getNotifications === 'function'
5
+ && typeof value.getNotificationContent === 'function'
6
+ && typeof value.reportNotificationEvent === 'function' ? value : undefined;
7
+ }
8
+ const expired = (notice) => notice.displayUntil !== null
9
+ && Date.parse(notice.displayUntil) <= Date.now();
10
+ // Preserve the existing coupon presentation only for explicit complete data.
11
+ // These optional business fields are not inferred from localized server copy.
12
+ function couponFields(data) {
13
+ if (data === null || typeof data !== 'object' || Array.isArray(data))
14
+ return {};
15
+ const value = data;
16
+ const expiresAt = value.expiresAt ?? value.expires_at;
17
+ return value.campaign === 'dsh_login_bonus' && typeof value.amount === 'string'
18
+ && (value.currency === 'CNY' || value.currency === 'USD') && typeof expiresAt === 'string'
19
+ && (Number.isNaN(Date.parse(expiresAt)) || Date.parse(expiresAt) > Date.now())
20
+ ? { amount: value.amount, currency: value.currency, expiresAt } : {};
21
+ }
22
+ const noticeOf = (content) => ({
23
+ kind: 'account-notification', orderId: content.id, title: content.title,
24
+ body: content.body, displayUntil: content.displayUntil, actions: content.actions,
25
+ ...couponFields(content.data),
26
+ });
27
+ /** Account-owned cards: reads never acknowledge; only the presented card reports display. */
28
+ export class AccountNotificationStore {
29
+ changed;
30
+ diagnose;
31
+ account;
32
+ generation = 0;
33
+ pollEpoch = 0;
34
+ localeGeneration = 0;
35
+ timer;
36
+ expiryTimer;
37
+ intervalMs = 600_000;
38
+ cards = [];
39
+ displayed = new Set();
40
+ pendingDismissals = new Map();
41
+ localeRefresh;
42
+ constructor(changed, diagnose = () => { }) {
43
+ this.changed = changed;
44
+ this.diagnose = diagnose;
45
+ }
46
+ getSnapshot() { return this.cards[0] ?? null; }
47
+ begin(account) {
48
+ if (this.account === account)
49
+ return;
50
+ this.clear();
51
+ this.account = account;
52
+ void this.poll(this.generation);
53
+ }
54
+ /** Explicit refresh uses the same generation fence and server-paced poll. */
55
+ async refresh(account) {
56
+ if (this.account !== account) {
57
+ this.clear();
58
+ this.account = account;
59
+ }
60
+ else {
61
+ this.generation++;
62
+ if (this.timer !== undefined)
63
+ clearTimeout(this.timer);
64
+ this.timer = undefined;
65
+ }
66
+ await this.poll(this.generation);
67
+ }
68
+ clear() {
69
+ this.generation++;
70
+ this.localeGeneration++;
71
+ if (this.timer !== undefined)
72
+ clearTimeout(this.timer);
73
+ if (this.expiryTimer !== undefined)
74
+ clearTimeout(this.expiryTimer);
75
+ this.timer = undefined;
76
+ this.expiryTimer = undefined;
77
+ this.account = undefined;
78
+ this.intervalMs = 600_000;
79
+ this.displayed.clear();
80
+ this.pendingDismissals.clear();
81
+ this.localeRefresh = undefined;
82
+ this.publish([]);
83
+ }
84
+ /** A language change refreshes content without consuming it or changing card order. */
85
+ localeChanged() {
86
+ // An explicit language change always fetches again: a rapid second switch
87
+ // must not reuse copy fetched for the previous language.
88
+ return this.startLocaleRefresh();
89
+ }
90
+ /** A poll finished with copy from before a language change: reuse an
91
+ * in-flight refresh instead of invalidating its successful request. */
92
+ staleLocaleRefresh() {
93
+ return this.localeRefresh ?? this.startLocaleRefresh();
94
+ }
95
+ startLocaleRefresh() {
96
+ const run = this.refreshLocale();
97
+ this.localeRefresh = run;
98
+ const settle = () => { if (this.localeRefresh === run)
99
+ this.localeRefresh = undefined; };
100
+ void run.then(settle, settle);
101
+ return run;
102
+ }
103
+ async refreshLocale() {
104
+ const account = this.account;
105
+ if (account === undefined)
106
+ return;
107
+ const generation = this.generation;
108
+ const localeGeneration = ++this.localeGeneration;
109
+ const updates = await Promise.allSettled(this.cards.map(card => account.getNotificationContent(card.orderId, deepSeekClientMetadata())));
110
+ if (generation !== this.generation || localeGeneration !== this.localeGeneration)
111
+ return;
112
+ if (updates.some(update => update.status === 'rejected'))
113
+ this.diagnose('content');
114
+ const byId = new Map(updates.flatMap(update => update.status === 'fulfilled' && update.value !== null
115
+ ? [[update.value.id, noticeOf(update.value)]] : []));
116
+ this.publish(this.cards.map(card => {
117
+ const content = byId.get(card.orderId);
118
+ // Like the public controller, content refresh changes localized copy
119
+ // only. The list owns deadlines and optional business metadata.
120
+ return content === undefined ? card : { ...card, title: content.title, body: content.body, actions: content.actions };
121
+ }).filter(card => !expired(card)));
122
+ }
123
+ shown(id) {
124
+ this.dropExpired();
125
+ if (this.cards[0]?.orderId !== id || this.displayed.has(id))
126
+ return;
127
+ this.displayed.add(id);
128
+ void this.report(id, 'displayed');
129
+ }
130
+ dismiss(id) {
131
+ this.dropExpired();
132
+ if (this.cards[0]?.orderId !== id)
133
+ return;
134
+ // A poll issued before this dismissal must not publish its stale reply:
135
+ // the closed card would reappear and report `displayed` again. Expiry and
136
+ // account cleanup fence polls through `generation`; a dismissal keeps the
137
+ // same account lifetime, so it needs its own fence.
138
+ this.pollEpoch++;
139
+ // Until the server processes the dismissal it may keep offering the id;
140
+ // suppress that id so a fast poll cannot reopen the closed card. Fence
141
+ // cleanup to this report: an older report that finishes after a newer
142
+ // dismissal of the same id must not clear the newer fence.
143
+ const token = Symbol(id);
144
+ this.pendingDismissals.set(id, token);
145
+ void this.report(id, 'dismissed').finally(() => {
146
+ if (this.pendingDismissals.get(id) === token)
147
+ this.pendingDismissals.delete(id);
148
+ });
149
+ this.publish(this.cards.slice(1));
150
+ }
151
+ report(id, event) {
152
+ // Server acceptance controls consumption; a failed report never fabricates success.
153
+ return this.account?.reportNotificationEvent(id, event, deepSeekClientMetadata())
154
+ .catch(() => { this.diagnose('report'); return false; }) ?? Promise.resolve(false);
155
+ }
156
+ dropExpired() { this.publish(this.cards.filter(card => !expired(card))); }
157
+ publish(cards) {
158
+ // Preserve React external-store snapshot identity for unchanged server copies.
159
+ const previous = new Map(this.cards.map(card => [card.orderId, card]));
160
+ cards = cards.map(card => {
161
+ const old = previous.get(card.orderId);
162
+ return old !== undefined && JSON.stringify(old) === JSON.stringify(card) ? old : card;
163
+ });
164
+ if (cards.length === this.cards.length && cards.every((card, index) => card === this.cards[index]))
165
+ return;
166
+ const ids = new Set(cards.map(card => card.orderId));
167
+ for (const id of this.displayed)
168
+ if (!ids.has(id))
169
+ this.displayed.delete(id);
170
+ this.cards = cards;
171
+ this.scheduleExpiry();
172
+ this.changed();
173
+ }
174
+ scheduleExpiry() {
175
+ if (this.expiryTimer !== undefined)
176
+ clearTimeout(this.expiryTimer);
177
+ this.expiryTimer = undefined;
178
+ const deadlines = this.cards.flatMap(card => {
179
+ const at = card.displayUntil === null ? NaN : Date.parse(card.displayUntil);
180
+ return Number.isFinite(at) ? [at] : [];
181
+ });
182
+ if (deadlines.length > 0) {
183
+ this.expiryTimer = setTimeout(() => {
184
+ this.expiryTimer = undefined;
185
+ this.dropExpired();
186
+ // A capped timer can wake before the deadline while polling is pending.
187
+ this.scheduleExpiry();
188
+ }, Math.min(2_147_483_647, Math.max(1, Math.min(...deadlines) - Date.now())));
189
+ this.expiryTimer.unref?.();
190
+ }
191
+ }
192
+ async poll(generation) {
193
+ const account = this.account;
194
+ if (account === undefined || generation !== this.generation)
195
+ return;
196
+ const localeGeneration = this.localeGeneration;
197
+ const epoch = this.pollEpoch;
198
+ try {
199
+ const batch = await account.getNotifications(deepSeekClientMetadata());
200
+ if (generation !== this.generation)
201
+ return;
202
+ if (batch !== null) {
203
+ // The server owns the cadence even when a dismissal retires the card
204
+ // content below; honour a changed interval before the epoch gate.
205
+ const requestedDelay = batch.nextPollAfterSeconds * 1000;
206
+ if (Number.isFinite(requestedDelay) && requestedDelay > 0)
207
+ this.intervalMs = Math.min(requestedDelay, 2_147_483_647);
208
+ // A dismissal during the read retires this reply; keep polling on the
209
+ // server-provided interval instead of resurrecting the closed card.
210
+ if (epoch === this.pollEpoch) {
211
+ const current = new Map(this.cards.map(card => [card.orderId, card]));
212
+ const offered = batch.notifications.map(content => {
213
+ const card = noticeOf(content);
214
+ const translated = current.get(card.orderId);
215
+ // An in-flight poll carries its original locale. Keep newer copy even
216
+ // if the follow-up content refresh fails; server expiry remains current.
217
+ return localeGeneration !== this.localeGeneration && translated !== undefined
218
+ ? { ...card, title: translated.title, body: translated.body, actions: translated.actions }
219
+ : card;
220
+ }).filter(card => !this.pendingDismissals.has(card.orderId));
221
+ const candidates = offered.filter(card => !expired(card));
222
+ const foreground = this.cards[0];
223
+ // The backend may consume on displayed. Keep the already-presented card
224
+ // until explicit dismissal or expiry, not until the next polling reply.
225
+ // A same-ID response can explicitly shorten its deadline. Only an
226
+ // omitted card keeps its old metadata; an expired offer must retire it.
227
+ const refreshed = foreground === undefined ? undefined
228
+ : offered.find(card => card.orderId === foreground.orderId) ?? foreground;
229
+ const retained = refreshed !== undefined && this.displayed.has(refreshed.orderId) && !expired(refreshed)
230
+ ? refreshed : undefined;
231
+ this.publish(retained === undefined ? candidates : [retained, ...candidates.filter(card => card.orderId !== retained.orderId)]);
232
+ // Never make the next poll wait for localized copy: a pending
233
+ // content request must not stall notification delivery.
234
+ if (localeGeneration !== this.localeGeneration)
235
+ void this.staleLocaleRefresh();
236
+ }
237
+ }
238
+ }
239
+ catch {
240
+ if (generation === this.generation)
241
+ this.diagnose('read');
242
+ // Keep visible content; retry only at the server-provided interval.
243
+ }
244
+ if (generation !== this.generation)
245
+ return;
246
+ this.dropExpired();
247
+ this.timer = setTimeout(() => { void this.poll(generation); }, this.intervalMs);
248
+ this.timer.unref?.();
249
+ }
250
+ }
@@ -1,12 +1,27 @@
1
- import type { DeepSeekAccount, AccountBonusOrderId, AccountUserId } from '@deepseek-ai/dsh-deepseek-account';
1
+ import type { AccountClientMetadata, AccountUserId } from '@deepseek-ai/dsh-deepseek-account';
2
+ import { type AccountNotificationNotice, type AccountNotifications } from './account-notifications.js';
2
3
  export interface WhaleCouponNotice {
3
- readonly accountId: AccountUserId;
4
- readonly orderId: AccountBonusOrderId;
4
+ readonly kind?: undefined;
5
+ readonly accountId?: AccountUserId;
6
+ readonly orderId: string;
5
7
  readonly amount: string;
6
8
  readonly currency: 'CNY' | 'USD';
7
9
  readonly expiresAt: string;
8
10
  }
9
- type BonusAccount = Pick<DeepSeekAccount, 'getUnnotifiedBonuses' | 'ackBonusNotified'>;
11
+ /** The pre-0.2.2-rc.2 bonus API; newer hosts expose a different notification protocol. */
12
+ export interface LegacyBonusAccount {
13
+ getUnnotifiedBonuses(client: AccountClientMetadata): Promise<{
14
+ readonly accountId: AccountUserId;
15
+ readonly bonuses: readonly {
16
+ readonly orderId: string;
17
+ readonly campaign?: unknown;
18
+ readonly amount?: unknown;
19
+ readonly currency?: unknown;
20
+ readonly expiresAt: string;
21
+ }[];
22
+ } | null>;
23
+ ackBonusNotified(accountId: AccountUserId, orderId: string, client: AccountClientMetadata): Promise<boolean>;
24
+ }
10
25
  /** TUI-only presentation of a Platform-confirmed login grant. */
11
26
  export declare class WhaleCouponStore {
12
27
  private readonly listeners;
@@ -14,14 +29,24 @@ export declare class WhaleCouponStore {
14
29
  private notice;
15
30
  private account;
16
31
  private generation;
32
+ private notificationOwner;
33
+ private readonly notifications;
34
+ constructor(diagnose?: (operation: 'read' | 'content' | 'report') => void);
17
35
  readonly subscribe: (listener: () => void) => (() => void);
18
- readonly getSnapshot: () => WhaleCouponNotice | null;
19
- refresh(account: BonusAccount): Promise<void>;
36
+ readonly getSnapshot: () => WhaleCouponNotice | AccountNotificationNotice | null;
37
+ /** New hosts provide server-authored cards instead of structured login bonuses. */
38
+ refreshNotifications(account: AccountNotifications): void;
39
+ /** An obsolete injected plugin must not clear or publish for its successor. */
40
+ claimNotificationOwner(): {
41
+ current: () => boolean;
42
+ dispose: () => void;
43
+ };
44
+ notificationLocaleChanged(): Promise<void>;
45
+ refresh(value: unknown): Promise<void>;
20
46
  /** Called only after the modal has painted; a read alone never acknowledges. */
21
- shown(orderId: AccountBonusOrderId): void;
22
- dismiss(orderId: AccountBonusOrderId): void;
47
+ shown(orderId: string, expected?: WhaleCouponNotice | AccountNotificationNotice): void;
48
+ dismiss(orderId: string, expected?: WhaleCouponNotice | AccountNotificationNotice): void;
23
49
  clear(): void;
24
50
  private emit;
25
51
  }
26
- export {};
27
52
  //# sourceMappingURL=bonus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bonus.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/oauth/bonus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AAG5G,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,mBAAmB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M,IAAI,CAAC,CAGxD;IAED,QAAQ,CAAC,WAAW,QAAO,iBAAiB,GAAG,yBAAyB,GAAG,IAAI,CAAmD;IAElI,mFAAmF;IACnF,oBAAoB,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAEzD,+EAA+E;IAC/E,sBAAsB,IAAI;QAAE,OAAO,EAAE,MAAM,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE;IAQzE,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC;IAEpC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB5C,gFAAgF;IAChF,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,yBAAyB,GAAG,IAAI;IActF,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,yBAAyB,GAAG,IAAI;IAcxF,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,IAAI;CACb"}
@@ -1,4 +1,5 @@
1
1
  import { deepSeekClientMetadata } from './deepseek.js';
2
+ import { accountNotificationsOf, AccountNotificationStore } from './account-notifications.js';
2
3
  /** TUI-only presentation of a Platform-confirmed login grant. */
3
4
  export class WhaleCouponStore {
4
5
  listeners = new Set();
@@ -6,12 +7,39 @@ export class WhaleCouponStore {
6
7
  notice = null;
7
8
  account;
8
9
  generation = 0;
10
+ notificationOwner;
11
+ notifications;
12
+ constructor(diagnose) {
13
+ this.notifications = new AccountNotificationStore(() => this.emit(), diagnose);
14
+ }
9
15
  subscribe = (listener) => {
10
16
  this.listeners.add(listener);
11
17
  return () => { this.listeners.delete(listener); };
12
18
  };
13
- getSnapshot = () => this.notice;
14
- async refresh(account) {
19
+ getSnapshot = () => this.notice ?? this.notifications.getSnapshot();
20
+ /** New hosts provide server-authored cards instead of structured login bonuses. */
21
+ refreshNotifications(account) { this.notifications.begin(account); }
22
+ /** An obsolete injected plugin must not clear or publish for its successor. */
23
+ claimNotificationOwner() {
24
+ const owner = {};
25
+ this.notificationOwner = owner;
26
+ this.clear();
27
+ const current = () => this.notificationOwner === owner;
28
+ return { current, dispose: () => { if (current()) {
29
+ this.notificationOwner = undefined;
30
+ this.clear();
31
+ } } };
32
+ }
33
+ notificationLocaleChanged() { return this.notifications.localeChanged(); }
34
+ async refresh(value) {
35
+ const notifications = accountNotificationsOf(value);
36
+ if (notifications !== undefined) {
37
+ await this.notifications.refresh(notifications);
38
+ return;
39
+ }
40
+ const account = value;
41
+ if (typeof account?.getUnnotifiedBonuses !== 'function' || typeof account.ackBonusNotified !== 'function')
42
+ return;
15
43
  const generation = ++this.generation;
16
44
  if (this.listeners.size === 0)
17
45
  return;
@@ -27,7 +55,8 @@ export class WhaleCouponStore {
27
55
  const granted = batch.bonuses.find(bonus => bonus.campaign === 'dsh_login_bonus'
28
56
  && !this.seen.has(`${batch.accountId}:${bonus.orderId}`)
29
57
  && (Number.isNaN(Date.parse(bonus.expiresAt)) || Date.parse(bonus.expiresAt) > Date.now()));
30
- if (granted === undefined)
58
+ if (granted === undefined || typeof granted.amount !== 'string'
59
+ || (granted.currency !== 'CNY' && granted.currency !== 'USD'))
31
60
  return;
32
61
  this.account = account;
33
62
  this.notice = {
@@ -37,7 +66,13 @@ export class WhaleCouponStore {
37
66
  this.emit();
38
67
  }
39
68
  /** Called only after the modal has painted; a read alone never acknowledges. */
40
- shown(orderId) {
69
+ shown(orderId, expected) {
70
+ if (expected !== undefined && expected !== this.getSnapshot())
71
+ return;
72
+ if (this.notifications.getSnapshot()?.orderId === orderId) {
73
+ this.notifications.shown(orderId);
74
+ return;
75
+ }
41
76
  const notice = this.notice;
42
77
  if (notice?.orderId !== orderId || this.account === undefined)
43
78
  return;
@@ -47,7 +82,13 @@ export class WhaleCouponStore {
47
82
  this.seen.add(key);
48
83
  void this.account.ackBonusNotified(notice.accountId, orderId, deepSeekClientMetadata()).catch(() => false);
49
84
  }
50
- dismiss(orderId) {
85
+ dismiss(orderId, expected) {
86
+ if (expected !== undefined && expected !== this.getSnapshot())
87
+ return;
88
+ if (this.notifications.getSnapshot()?.orderId === orderId) {
89
+ this.notifications.dismiss(orderId);
90
+ return;
91
+ }
51
92
  if (this.notice?.orderId !== orderId)
52
93
  return;
53
94
  this.shown(orderId);
@@ -59,6 +100,7 @@ export class WhaleCouponStore {
59
100
  }
60
101
  clear() {
61
102
  this.generation++;
103
+ this.notifications.clear();
62
104
  this.notice = null;
63
105
  this.account = undefined;
64
106
  this.seen.clear();
@@ -8,11 +8,15 @@
8
8
  * panel. It never reads or writes the account grant.
9
9
  */
10
10
  import type { Context } from '@deepseek-ai/cordis';
11
- import type { AccountClientMetadata, DeepSeekAccount } from '@deepseek-ai/dsh-deepseek-account';
11
+ import type { AccountClientMetadata, AccountUpdate, AccountView, DeepSeekAccount } from '@deepseek-ai/dsh-deepseek-account';
12
12
  import { type AskFn, type QuestionBridgeHelpers } from './interaction.js';
13
13
  export declare const DEEPSEEK_ACCOUNT_PROVIDER = "deepseek-account";
14
+ /** One account-stream item: 0.2.2-rc.2 wraps the state, older hosts yield it directly. */
15
+ type AccountWatchItem = AccountView | AccountUpdate;
14
16
  /** Only the account operations this interaction surface consumes. */
15
- export type DeepSeekAccountAuth = Pick<DeepSeekAccount, 'getState' | 'startSignIn' | 'cancelSignIn' | 'signOut' | 'watch'> & Partial<Pick<DeepSeekAccount, 'getUnnotifiedBonuses' | 'ackBonusNotified'>>;
17
+ export type DeepSeekAccountAuth = Pick<DeepSeekAccount, 'getState' | 'startSignIn' | 'cancelSignIn' | 'signOut'> & Partial<Pick<DeepSeekAccount, 'getNotifications' | 'getNotificationContent' | 'reportNotificationEvent'>> & {
18
+ watch(signal: AbortSignal): AsyncIterable<AccountWatchItem>;
19
+ };
16
20
  /** Resolve late: the account provider is absent on older DSH hosts. */
17
21
  export declare function deepSeekAccountFrom(ctx: Context): DeepSeekAccountAuth | undefined;
18
22
  /** The Host webServer may be shared, supplied by the TUI row, or mounted as a fallback. */
@@ -36,4 +40,5 @@ export declare function deepSeekClientMetadata(): AccountClientMetadata;
36
40
  * cancellation. The question panel is always retired before returning.
37
41
  */
38
42
  export declare function loginDeepSeekAccount(account: DeepSeekAccountAuth, callbackOrigin: string, ask: AskFn, signal?: AbortSignal, helpers?: QuestionBridgeHelpers): Promise<void>;
43
+ export {};
39
44
  //# sourceMappingURL=deepseek.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deepseek.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/oauth/deepseek.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAe,eAAe,EAAmB,MAAM,mCAAmC,CAAA;AAG7H,OAAO,EAAkB,KAAK,KAAK,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAEzF,eAAO,MAAM,yBAAyB,qBAAqB,CAAA;AAE3D,qEAAqE;AACrE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC,GACtH,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,sBAAsB,GAAG,kBAAkB,CAAC,CAAC,CAAA;AAE/E,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAEjF;AAED,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAO3D;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAAC,GAAG,EAAE,OAAO,GAAG;IAClE,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC1B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB,CA0DA;AAWD,wFAAwF;AACxF,w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AAE,OAAO,GAAG;IAClE,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAC1B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB,CA0DA;AAWD,wFAAwF;AACxF,wBAAgB,sBAAsB,IAAI,qBAAqB,CAM9D;AAWD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,mBAAmB,EAC5B,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,KAAK,EACV,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CA0Df"}
@@ -109,6 +109,10 @@ export function deepSeekClientMetadata() {
109
109
  timezoneOffsetSeconds: -new Date().getTimezoneOffset() * 60,
110
110
  };
111
111
  }
112
+ /** Read the state from either stream shape (rc.2 wraps it in an AccountUpdate). */
113
+ function accountState(item) {
114
+ return 'state' in item ? item.state : item;
115
+ }
112
116
  function succeeded(state, id) {
113
117
  return state.attempt?.id === id && state.attempt.phase === 'succeeded' && state.status === 'credential-stored';
114
118
  }
@@ -141,7 +145,8 @@ export async function loginDeepSeekAccount(account, callbackOrigin, ask, signal,
141
145
  runAbort.signal.throwIfAborted();
142
146
  let shownUrl;
143
147
  try {
144
- for await (const state of account.watch(runAbort.signal)) {
148
+ for await (const item of account.watch(runAbort.signal)) {
149
+ const state = accountState(item);
145
150
  const attempt = state.attempt;
146
151
  if (attempt?.id !== id)
147
152
  throw new Error('DeepSeek sign-in attempt was replaced');
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/oauth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,OAAO,KAAK,EAAc,YAAY,EAAE,MAAM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h-tui/oauth
40
40
  */
41
+ import { accountNotificationsOf } from './account-notifications.js';
42
+ import { subscribeLang } from '../../i18n.js';
41
43
  import { existsSync } from 'node:fs';
42
44
  import { homedir } from 'node:os';
43
45
  import { join } from 'node:path';
@@ -177,6 +179,48 @@ export function apply(ctx, config) {
177
179
  },
178
180
  });
179
181
  service.api = api;
182
+ // Optional runtime binding: old hosts retain login-triggered bonus reads.
183
+ // Credential replacement retires pending notifications before the next read.
184
+ ctx.inject(['deepseekAccount'], ((accountCtx) => {
185
+ const account = deepSeekAccountFrom(accountCtx);
186
+ const notifications = accountNotificationsOf(account);
187
+ if (account === undefined || notifications === undefined)
188
+ return;
189
+ const owner = service.coupons.claimNotificationOwner();
190
+ const cancellation = new AbortController();
191
+ const offLocale = subscribeLang(() => { if (owner.current())
192
+ void service.coupons.notificationLocaleChanged(); });
193
+ accountCtx.effect(() => () => {
194
+ cancellation.abort();
195
+ offLocale();
196
+ owner.dispose();
197
+ }, 'dsh-auth account notifications');
198
+ void (async () => {
199
+ try {
200
+ for await (const update of account.watch(cancellation.signal)) {
201
+ if (cancellation.signal.aborted || !owner.current())
202
+ return;
203
+ const wrapped = 'state' in update;
204
+ const state = wrapped ? update.state : update;
205
+ if (wrapped && update.type === 'credentials-changed')
206
+ service.coupons.clear();
207
+ if (state.status === 'credential-stored')
208
+ service.coupons.refreshNotifications(notifications);
209
+ else
210
+ service.coupons.clear();
211
+ }
212
+ }
213
+ catch {
214
+ if (!cancellation.signal.aborted && owner.current()) {
215
+ accountCtx.logger.warn('dsh-auth: account notification state stream stopped');
216
+ }
217
+ }
218
+ finally {
219
+ if (!cancellation.signal.aborted && owner.current())
220
+ service.coupons.clear();
221
+ }
222
+ })();
223
+ }));
180
224
  ctx.effect(function* () {
181
225
  // LIFO disposal: release command registration, drain started logins, then
182
226
  // close a fallback callback listener only this module mounted.
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/oauth/service.ts"],"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