@deepseek-ai/dsh-client-ui-plugin-recommendations 0.0.0-stage → 0.2.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js ADDED
@@ -0,0 +1,6 @@
1
+ //#region lib/types/index.js
2
+ /** Browser registration is discovered through the package client declaration. */
3
+ /** Register the browser-only contribution without Host state. */
4
+ function apply() {}
5
+ //#endregion
6
+ export { apply };
@@ -0,0 +1,37 @@
1
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
2
+ import type { LocalizedText } from '@deepseek-ai/dsh-package-manifest';
3
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
4
+ import type { ToolCallId } from '@deepseek-ai/dsh-llm/brand';
5
+ import type { ActionCardBodyProps } from '@deepseek-ai/dsh-client-ui-action-cards/client';
6
+ import type { RecommendationDetails } from '@deepseek-ai/dsh-plugin-recommendations/types';
7
+ /** Catalog text the Host returned for an available plugin. */
8
+ export type CatalogDetails = Extract<RecommendationDetails, {
9
+ readonly status: 'available';
10
+ }>;
11
+ /** Plugin-lifetime services the body uses besides the frame's props. */
12
+ export interface PluginCardServices {
13
+ /** Catalog text by plugin name, kept for this plugin's lifetime so later cards of the same plugin render it at once. */
14
+ readonly catalog: SnapshotStore<Readonly<Record<string, CatalogDetails>>>;
15
+ /**
16
+ * Read the current catalog text of a card's plugin.
17
+ * @param sessionId - the displayed Session.
18
+ * @param callId - the card's call id.
19
+ * @returns the Host's answer, or undefined when the reply was lost.
20
+ */
21
+ readonly describe: (sessionId: SessionId, callId: ToolCallId) => Promise<RecommendationDetails | undefined>;
22
+ /** Open the plugin's details page without enabling it. */
23
+ readonly openDetails: (packageName: string) => void;
24
+ /** Pick the interface language's text. */
25
+ readonly resolveText: (text: LocalizedText) => string;
26
+ }
27
+ /** Body props: the frame's card props plus the plugin-lifetime services. */
28
+ export type PluginCardProps = ActionCardBodyProps<'pluginRecommendations'> & PluginCardServices;
29
+ /**
30
+ * Display one plugin card: its current catalog title and description, the user's choice and its outcome.
31
+ * Until the plugin's first catalog lookup returns, a placeholder line and the disabled actions hold the final layout.
32
+ * A refused or lost lookup leaves Not now and a retry of the lookup, but not Enable.
33
+ * @param props - card, state, actions and plugin-lifetime services.
34
+ * @returns the card body.
35
+ */
36
+ export declare function PluginCardBody({ proposal, decision, sessionId, summary, act, catalog, describe, openDetails, resolveText, t, }: PluginCardProps): import("react").JSX.Element;
37
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1,9 @@
1
+ /** Bind the generated Remote contribution to the source-tested browser lifecycle. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ export { inject } from './mount.ts';
4
+ /** Mount recommendation UI and its optional Remote.
5
+ * @param ctx - Client plugin context.
6
+ * @returns disposer for both contributions.
7
+ */
8
+ export declare function apply(ctx: Context): Promise<() => Promise<void>>;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,227 @@
1
+ /** Typed product copy for recommendation cards. */
2
+ export declare const zh: {
3
+ heading: string;
4
+ official: string;
5
+ detailsFor: string;
6
+ 'version-error': string;
7
+ 'management-error': string;
8
+ enable: string;
9
+ dismiss: string;
10
+ working: string;
11
+ scope: string;
12
+ enabled: string;
13
+ 'already-enabled': string;
14
+ dismissed: string;
15
+ replaced: string;
16
+ 'restart-required': string;
17
+ failed: string;
18
+ retry: string;
19
+ unconfirmed: string;
20
+ 'lookup-failed': string;
21
+ retryLookup: string;
22
+ unavailable: string;
23
+ unknown: string;
24
+ 'access-denied': string;
25
+ 'not-live-root': string;
26
+ closing: string;
27
+ transport: string;
28
+ };
29
+ /** Keys shared by every card dictionary. */
30
+ export type RecommendationKey = keyof typeof zh;
31
+ /** English card copy. */
32
+ export declare const en: {
33
+ heading: string;
34
+ official: string;
35
+ detailsFor: string;
36
+ 'version-error': string;
37
+ 'management-error': string;
38
+ enable: string;
39
+ dismiss: string;
40
+ working: string;
41
+ scope: string;
42
+ enabled: string;
43
+ 'already-enabled': string;
44
+ dismissed: string;
45
+ replaced: string;
46
+ 'restart-required': string;
47
+ failed: string;
48
+ retry: string;
49
+ unconfirmed: string;
50
+ 'lookup-failed': string;
51
+ retryLookup: string;
52
+ unavailable: string;
53
+ unknown: string;
54
+ 'access-denied': string;
55
+ 'not-live-root': string;
56
+ closing: string;
57
+ transport: string;
58
+ };
59
+ /** Japanese card copy. */
60
+ export declare const ja: {
61
+ heading: string;
62
+ official: string;
63
+ detailsFor: string;
64
+ 'version-error': string;
65
+ 'management-error': string;
66
+ enable: string;
67
+ dismiss: string;
68
+ working: string;
69
+ scope: string;
70
+ enabled: string;
71
+ 'already-enabled': string;
72
+ dismissed: string;
73
+ replaced: string;
74
+ 'restart-required': string;
75
+ failed: string;
76
+ retry: string;
77
+ unconfirmed: string;
78
+ 'lookup-failed': string;
79
+ retryLookup: string;
80
+ unavailable: string;
81
+ unknown: string;
82
+ 'access-denied': string;
83
+ 'not-live-root': string;
84
+ closing: string;
85
+ transport: string;
86
+ };
87
+ /** Spanish card copy. */
88
+ export declare const es: {
89
+ heading: string;
90
+ official: string;
91
+ detailsFor: string;
92
+ 'version-error': string;
93
+ 'management-error': string;
94
+ enable: string;
95
+ dismiss: string;
96
+ working: string;
97
+ scope: string;
98
+ enabled: string;
99
+ 'already-enabled': string;
100
+ dismissed: string;
101
+ replaced: string;
102
+ 'restart-required': string;
103
+ failed: string;
104
+ retry: string;
105
+ unconfirmed: string;
106
+ 'lookup-failed': string;
107
+ retryLookup: string;
108
+ unavailable: string;
109
+ unknown: string;
110
+ 'access-denied': string;
111
+ 'not-live-root': string;
112
+ closing: string;
113
+ transport: string;
114
+ };
115
+ /** French card copy. */
116
+ export declare const fr: {
117
+ heading: string;
118
+ official: string;
119
+ detailsFor: string;
120
+ 'version-error': string;
121
+ 'management-error': string;
122
+ enable: string;
123
+ dismiss: string;
124
+ working: string;
125
+ scope: string;
126
+ enabled: string;
127
+ 'already-enabled': string;
128
+ dismissed: string;
129
+ replaced: string;
130
+ 'restart-required': string;
131
+ failed: string;
132
+ retry: string;
133
+ unconfirmed: string;
134
+ 'lookup-failed': string;
135
+ retryLookup: string;
136
+ unavailable: string;
137
+ unknown: string;
138
+ 'access-denied': string;
139
+ 'not-live-root': string;
140
+ closing: string;
141
+ transport: string;
142
+ };
143
+ /** German card copy. */
144
+ export declare const de: {
145
+ heading: string;
146
+ official: string;
147
+ detailsFor: string;
148
+ 'version-error': string;
149
+ 'management-error': string;
150
+ enable: string;
151
+ dismiss: string;
152
+ working: string;
153
+ scope: string;
154
+ enabled: string;
155
+ 'already-enabled': string;
156
+ dismissed: string;
157
+ replaced: string;
158
+ 'restart-required': string;
159
+ failed: string;
160
+ retry: string;
161
+ unconfirmed: string;
162
+ 'lookup-failed': string;
163
+ retryLookup: string;
164
+ unavailable: string;
165
+ unknown: string;
166
+ 'access-denied': string;
167
+ 'not-live-root': string;
168
+ closing: string;
169
+ transport: string;
170
+ };
171
+ /** Russian card copy. */
172
+ export declare const ru: {
173
+ heading: string;
174
+ official: string;
175
+ detailsFor: string;
176
+ 'version-error': string;
177
+ 'management-error': string;
178
+ enable: string;
179
+ dismiss: string;
180
+ working: string;
181
+ scope: string;
182
+ enabled: string;
183
+ 'already-enabled': string;
184
+ dismissed: string;
185
+ replaced: string;
186
+ 'restart-required': string;
187
+ failed: string;
188
+ retry: string;
189
+ unconfirmed: string;
190
+ 'lookup-failed': string;
191
+ retryLookup: string;
192
+ unavailable: string;
193
+ unknown: string;
194
+ 'access-denied': string;
195
+ 'not-live-root': string;
196
+ closing: string;
197
+ transport: string;
198
+ };
199
+ /** Portuguese card copy. */
200
+ export declare const pt: {
201
+ heading: string;
202
+ official: string;
203
+ detailsFor: string;
204
+ 'version-error': string;
205
+ 'management-error': string;
206
+ enable: string;
207
+ dismiss: string;
208
+ working: string;
209
+ scope: string;
210
+ enabled: string;
211
+ 'already-enabled': string;
212
+ dismissed: string;
213
+ replaced: string;
214
+ 'restart-required': string;
215
+ failed: string;
216
+ retry: string;
217
+ unconfirmed: string;
218
+ 'lookup-failed': string;
219
+ retryLookup: string;
220
+ unavailable: string;
221
+ unknown: string;
222
+ 'access-denied': string;
223
+ 'not-live-root': string;
224
+ closing: string;
225
+ transport: string;
226
+ };
227
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
3
+ import { type RecommendationKey } from './locales.ts';
4
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
5
+ interface LocaleNamespaceMap {
6
+ pluginRecommendations: RecommendationKey;
7
+ }
8
+ }
9
+ /** Services the body needs; the shared card plugin provides `actionCards`. */
10
+ export declare const inject: string[];
11
+ /** Mount the catalog-text Remote, then register the body for the same plugin lifetime.
12
+ * @param ctx - Client plugin context.
13
+ * @param contribution - Generated Remote descriptors supplied by the built entry.
14
+ * @returns disposer removing the body before the Remote contribution.
15
+ */
16
+ export declare function mountRecommendations(ctx: Context, contribution: TypertRemoteContribution): Promise<() => Promise<void>>;
17
+ //# sourceMappingURL=mount.d.ts.map
@@ -0,0 +1,4 @@
1
+ /** Browser registration is discovered through the package client declaration. */
2
+ /** Register the browser-only contribution without Host state. */
3
+ export declare function apply(): void;
4
+ //# sourceMappingURL=index.d.ts.map
package/locale/de.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Karten für Plugin-Empfehlungen",
4
+ "description": "Zeigt nach einer Antwort die Karte zum Aktivieren eines empfohlenen offiziellen Plugins mit seinen Details und Ihrer Auswahl an."
5
+ }
6
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Plugin recommendation cards",
4
+ "description": "Show the Enable card for a recommended official plugin after an answer, with its details and your choice."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Tarjetas de recomendación de complementos",
4
+ "description": "Muestra después de una respuesta la tarjeta Habilitar de un complemento oficial recomendado, con sus detalles y tu elección."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cartes de recommandation de plugins",
4
+ "description": "Affiche après une réponse la carte Activer d’un plugin officiel recommandé, avec ses détails et votre choix."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "プラグイン推薦カード",
4
+ "description": "回答の末尾に推薦された公式プラグインの有効化カードを表示し、詳細とあなたの選択を扱います。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Cartões de recomendação de plug-ins",
4
+ "description": "Mostra após uma resposta o cartão Ativar de um plug-in oficial recomendado, com seus detalhes e sua escolha."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Карточки рекомендаций плагинов",
4
+ "description": "Показывает после ответа карточку «Включить» для рекомендованного официального плагина с его подробностями и вашим выбором."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "插件推荐卡片",
4
+ "description": "在回答末尾显示推荐官方插件的启用卡片,含插件详情和你的选择。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,69 @@
1
1
  {
2
+ "version": "0.2.2-alpha.2",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "type": "module",
7
+ "main": "lib/index.js",
8
+ "types": "lib/types/index.d.ts",
9
+ "license": "MIT",
2
10
  "name": "@deepseek-ai/dsh-client-ui-plugin-recommendations",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
11
+ "description": "Official plugin card body with catalog text and enabling",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
15
+ "directory": "packages/experimental/client-ui-plugin-recommendations"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./lib/types/index.d.ts",
20
+ "default": "./lib/index.js"
21
+ },
22
+ "./src/*": "./src/*",
23
+ "./package.json": "./package.json",
24
+ "./client": {
25
+ "types": "./lib/types/client/index.d.ts",
26
+ "default": "./lib/client.js"
27
+ },
28
+ "./locale/*.json": "./locale/*.json"
29
+ },
30
+ "dsh": {
31
+ "client": {
32
+ "platform": "web",
33
+ "inject": [
34
+ "@deepseek-ai/dsh-api-remotes",
35
+ "@deepseek-ai/dsh-client-locale",
36
+ "@deepseek-ai/dsh-client-ui-plugin-manager",
37
+ "@deepseek-ai/dsh-client-ui-action-cards"
38
+ ]
39
+ }
40
+ },
41
+ "peerDependencies": {
42
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1"
43
+ },
44
+ "devDependencies": {
45
+ "@deepseek-ai/cordis": "~4.0.6-alpha.1",
46
+ "@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
47
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
48
+ "@deepseek-ai/dsh-api-remotes": "0.2.2-alpha.2",
49
+ "@deepseek-ai/dsh-client-locale": "0.2.2-alpha.2",
50
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.2-alpha.2",
51
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.2-alpha.2",
52
+ "react": "^18.2.0",
53
+ "@deepseek-ai/dsh-plugin-recommendations": "0.2.2-alpha.2",
54
+ "@deepseek-ai/dsh-client-store": "0.2.2-alpha.2",
55
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-alpha.2",
56
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.2",
57
+ "@deepseek-ai/dsh-package-manifest": "0.2.2-alpha.2",
58
+ "@deepseek-ai/dsh-client-ui-action-cards": "0.2.2-alpha.2",
59
+ "@deepseek-ai/dsh-action-cards": "0.2.2-alpha.2",
60
+ "zod": "4.4.3",
61
+ "@deepseek-ai/dsh-client-test-runtime": "0.2.2-alpha.2"
62
+ },
63
+ "files": [
64
+ "locale/*.json",
65
+ "lib/index.js",
66
+ "lib/client.js",
67
+ "lib/types/**/*.d.ts"
68
+ ]
6
69
  }