@nekro-nxt/contracts 0.2.0 → 0.4.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.
@@ -16,18 +16,58 @@ export declare const CommunityReviewStatusSchema: z.ZodEnum<{
16
16
  incomplete: "incomplete";
17
17
  }>;
18
18
  export type CommunityReviewStatus = z.output<typeof CommunityReviewStatusSchema>;
19
- export declare const CommunityGradeSchema: z.ZodEnum<{
20
- A: "A";
21
- B: "B";
22
- C: "C";
23
- D: "D";
19
+ /** 社区评级的六个维度(审查标准 v1),从正上方顺时针排列成六边形。 */
20
+ export declare const COMMUNITY_RATING_DIMENSIONS: readonly ["security", "openness", "reliability", "lightweight", "usability", "craft"];
21
+ export type CommunityRatingDimension = (typeof COMMUNITY_RATING_DIMENSIONS)[number];
22
+ export declare const COMMUNITY_RATING_DIMENSION_LABELS: Readonly<Record<CommunityRatingDimension, string>>;
23
+ /** 社区的审查员,评级与审查记录以她署名。 */
24
+ export declare const COMMUNITY_REVIEWER_NAME = "\u5C0F\u6F84";
25
+ /** 社区判定的达成标签;不认识的标签不显示。扩展页面最多显示 {@link COMMUNITY_RATING_BADGE_LIMIT} 个。 */
26
+ export declare const COMMUNITY_RATING_BADGES: Readonly<Record<string, {
27
+ readonly label: string;
28
+ readonly description: string;
29
+ }>>;
30
+ export declare const COMMUNITY_RATING_BADGE_LIMIT = 4;
31
+ /** 一次发布的评级:六维星级、综合评分(各维度平均,保留一位小数)与达成标签。 */
32
+ export declare const CommunityRatingSchema: z.ZodObject<{
33
+ standard: z.ZodString;
34
+ score: z.ZodNumber;
35
+ dimensions: z.ZodArray<z.ZodObject<{
36
+ key: z.ZodString;
37
+ stars: z.ZodNumber;
38
+ headline: z.ZodString;
39
+ cap: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>>;
41
+ badges: z.ZodArray<z.ZodString>;
42
+ }, z.core.$strip>;
43
+ export type CommunityRating = z.output<typeof CommunityRatingSchema>;
44
+ /** 市场的排序方式。 */
45
+ export declare const COMMUNITY_EXTENSION_SORTS: readonly [{
46
+ readonly key: "updated";
47
+ readonly label: "最近更新";
48
+ }, {
49
+ readonly key: "score";
50
+ readonly label: "综合评分";
51
+ }, {
52
+ readonly key: "downloads";
53
+ readonly label: "下载最多";
54
+ }, {
55
+ readonly key: "newest";
56
+ readonly label: "最新上架";
57
+ }];
58
+ export type CommunityExtensionSort = (typeof COMMUNITY_EXTENSION_SORTS)[number]['key'];
59
+ export declare const CommunityExtensionSortSchema: z.ZodEnum<{
60
+ score: "score";
61
+ updated: "updated";
62
+ downloads: "downloads";
63
+ newest: "newest";
24
64
  }>;
25
65
  export declare const CommunityReleaseIdSchema: z.ZodString;
26
66
  export declare const CommunityAccountSchema: z.ZodObject<{
27
67
  handle: z.ZodString;
28
68
  displayName: z.ZodString;
29
69
  avatarUrl: z.ZodNullable<z.ZodString>;
30
- }, z.core.$strict>;
70
+ }, z.core.$strip>;
31
71
  export type CommunityAccount = z.output<typeof CommunityAccountSchema>;
32
72
  export declare const CommunityEnvironmentSchema: z.ZodEnum<{
33
73
  production: "production";
@@ -46,10 +86,10 @@ export declare const CommunityStatusSchema: z.ZodObject<{
46
86
  handle: z.ZodString;
47
87
  displayName: z.ZodString;
48
88
  avatarUrl: z.ZodNullable<z.ZodString>;
49
- }, z.core.$strict>>;
89
+ }, z.core.$strip>>;
50
90
  signedInAt: z.ZodNullable<z.ZodNumber>;
51
91
  updatesAvailable: z.ZodNumber;
52
- }, z.core.$strict>;
92
+ }, z.core.$strip>;
53
93
  export type CommunityStatus = z.output<typeof CommunityStatusSchema>;
54
94
  export declare const CommunityPermissionItemSchema: z.ZodObject<{
55
95
  key: z.ZodString;
@@ -60,7 +100,11 @@ export declare const CommunityPermissionItemSchema: z.ZodObject<{
60
100
  }>;
61
101
  label: z.ZodString;
62
102
  detail: z.ZodOptional<z.ZodString>;
63
- }, z.core.$strict>;
103
+ layer: z.ZodOptional<z.ZodEnum<{
104
+ host: "host";
105
+ agent: "agent";
106
+ }>>;
107
+ }, z.core.$strip>;
64
108
  export type CommunityPermissionItem = z.output<typeof CommunityPermissionItemSchema>;
65
109
  export declare const CommunityReleaseSchema: z.ZodObject<{
66
110
  id: z.ZodString;
@@ -75,12 +119,17 @@ export declare const CommunityReleaseSchema: z.ZodObject<{
75
119
  rejected: "rejected";
76
120
  incomplete: "incomplete";
77
121
  }>;
78
- grade: z.ZodNullable<z.ZodEnum<{
79
- A: "A";
80
- B: "B";
81
- C: "C";
82
- D: "D";
83
- }>>;
122
+ rating: z.ZodNullable<z.ZodObject<{
123
+ standard: z.ZodString;
124
+ score: z.ZodNumber;
125
+ dimensions: z.ZodArray<z.ZodObject<{
126
+ key: z.ZodString;
127
+ stars: z.ZodNumber;
128
+ headline: z.ZodString;
129
+ cap: z.ZodOptional<z.ZodString>;
130
+ }, z.core.$strip>>;
131
+ badges: z.ZodArray<z.ZodString>;
132
+ }, z.core.$strip>>;
84
133
  permissions: z.ZodArray<z.ZodObject<{
85
134
  key: z.ZodString;
86
135
  level: z.ZodEnum<{
@@ -90,12 +139,16 @@ export declare const CommunityReleaseSchema: z.ZodObject<{
90
139
  }>;
91
140
  label: z.ZodString;
92
141
  detail: z.ZodOptional<z.ZodString>;
93
- }, z.core.$strict>>;
142
+ layer: z.ZodOptional<z.ZodEnum<{
143
+ host: "host";
144
+ agent: "agent";
145
+ }>>;
146
+ }, z.core.$strip>>;
94
147
  packageSize: z.ZodNumber;
95
148
  requiresSdk: z.ZodNullable<z.ZodNumber>;
96
149
  notes: z.ZodString;
97
150
  createdAt: z.ZodNumber;
98
- }, z.core.$strict>;
151
+ }, z.core.$strip>;
99
152
  export type CommunityRelease = z.output<typeof CommunityReleaseSchema>;
100
153
  /** 社区为官方扩展保留的发布者标识:官方扩展由多位官方成员维护,对外不显示个人账号。 */
101
154
  export declare const COMMUNITY_OFFICIAL_HANDLE = "nekro-nxt";
@@ -103,20 +156,17 @@ export declare const COMMUNITY_OFFICIAL_HANDLE = "nekro-nxt";
103
156
  export declare const communityPublisherLabel: (handle: string) => string;
104
157
  export declare const CommunityExtensionSummarySchema: z.ZodObject<{
105
158
  id: z.core.$ZodBranded<z.ZodString, "ExtensionId", "out">;
106
- scope: z.ZodEnum<{
107
- agent: "agent";
108
- "host-adapter": "host-adapter";
109
- "host-ui": "host-ui";
110
- }>;
159
+ provides: z.ZodArray<z.ZodString>;
111
160
  displayName: z.ZodString;
112
161
  summary: z.ZodString;
113
162
  tags: z.ZodArray<z.ZodString>;
163
+ iconUrl: z.ZodNullable<z.ZodString>;
114
164
  official: z.ZodBoolean;
115
165
  publisher: z.ZodObject<{
116
166
  handle: z.ZodString;
117
167
  displayName: z.ZodString;
118
168
  avatarUrl: z.ZodNullable<z.ZodString>;
119
- }, z.core.$strict>;
169
+ }, z.core.$strip>;
120
170
  latest: z.ZodNullable<z.ZodObject<{
121
171
  id: z.ZodString;
122
172
  reviewStatus: z.ZodEnum<{
@@ -130,12 +180,17 @@ export declare const CommunityExtensionSummarySchema: z.ZodObject<{
130
180
  rejected: "rejected";
131
181
  incomplete: "incomplete";
132
182
  }>;
133
- grade: z.ZodNullable<z.ZodEnum<{
134
- A: "A";
135
- B: "B";
136
- C: "C";
137
- D: "D";
138
- }>>;
183
+ rating: z.ZodNullable<z.ZodObject<{
184
+ standard: z.ZodString;
185
+ score: z.ZodNumber;
186
+ dimensions: z.ZodArray<z.ZodObject<{
187
+ key: z.ZodString;
188
+ stars: z.ZodNumber;
189
+ headline: z.ZodString;
190
+ cap: z.ZodOptional<z.ZodString>;
191
+ }, z.core.$strip>>;
192
+ badges: z.ZodArray<z.ZodString>;
193
+ }, z.core.$strip>>;
139
194
  permissions: z.ZodArray<z.ZodObject<{
140
195
  key: z.ZodString;
141
196
  level: z.ZodEnum<{
@@ -145,33 +200,34 @@ export declare const CommunityExtensionSummarySchema: z.ZodObject<{
145
200
  }>;
146
201
  label: z.ZodString;
147
202
  detail: z.ZodOptional<z.ZodString>;
148
- }, z.core.$strict>>;
203
+ layer: z.ZodOptional<z.ZodEnum<{
204
+ host: "host";
205
+ agent: "agent";
206
+ }>>;
207
+ }, z.core.$strip>>;
149
208
  packageSize: z.ZodNumber;
150
209
  requiresSdk: z.ZodNullable<z.ZodNumber>;
151
210
  notes: z.ZodString;
152
211
  createdAt: z.ZodNumber;
153
- }, z.core.$strict>>;
212
+ }, z.core.$strip>>;
154
213
  downloads: z.ZodNumber;
155
214
  updatedAt: z.ZodNumber;
156
215
  pageUrl: z.ZodString;
157
- }, z.core.$strict>;
216
+ }, z.core.$strip>;
158
217
  export type CommunityExtensionSummary = z.output<typeof CommunityExtensionSummarySchema>;
159
218
  export declare const CommunityExtensionDetailSchema: z.ZodObject<{
160
219
  id: z.core.$ZodBranded<z.ZodString, "ExtensionId", "out">;
161
- scope: z.ZodEnum<{
162
- agent: "agent";
163
- "host-adapter": "host-adapter";
164
- "host-ui": "host-ui";
165
- }>;
220
+ provides: z.ZodArray<z.ZodString>;
166
221
  displayName: z.ZodString;
167
222
  summary: z.ZodString;
168
223
  tags: z.ZodArray<z.ZodString>;
224
+ iconUrl: z.ZodNullable<z.ZodString>;
169
225
  official: z.ZodBoolean;
170
226
  publisher: z.ZodObject<{
171
227
  handle: z.ZodString;
172
228
  displayName: z.ZodString;
173
229
  avatarUrl: z.ZodNullable<z.ZodString>;
174
- }, z.core.$strict>;
230
+ }, z.core.$strip>;
175
231
  latest: z.ZodNullable<z.ZodObject<{
176
232
  id: z.ZodString;
177
233
  reviewStatus: z.ZodEnum<{
@@ -185,12 +241,17 @@ export declare const CommunityExtensionDetailSchema: z.ZodObject<{
185
241
  rejected: "rejected";
186
242
  incomplete: "incomplete";
187
243
  }>;
188
- grade: z.ZodNullable<z.ZodEnum<{
189
- A: "A";
190
- B: "B";
191
- C: "C";
192
- D: "D";
193
- }>>;
244
+ rating: z.ZodNullable<z.ZodObject<{
245
+ standard: z.ZodString;
246
+ score: z.ZodNumber;
247
+ dimensions: z.ZodArray<z.ZodObject<{
248
+ key: z.ZodString;
249
+ stars: z.ZodNumber;
250
+ headline: z.ZodString;
251
+ cap: z.ZodOptional<z.ZodString>;
252
+ }, z.core.$strip>>;
253
+ badges: z.ZodArray<z.ZodString>;
254
+ }, z.core.$strip>>;
194
255
  permissions: z.ZodArray<z.ZodObject<{
195
256
  key: z.ZodString;
196
257
  level: z.ZodEnum<{
@@ -200,12 +261,16 @@ export declare const CommunityExtensionDetailSchema: z.ZodObject<{
200
261
  }>;
201
262
  label: z.ZodString;
202
263
  detail: z.ZodOptional<z.ZodString>;
203
- }, z.core.$strict>>;
264
+ layer: z.ZodOptional<z.ZodEnum<{
265
+ host: "host";
266
+ agent: "agent";
267
+ }>>;
268
+ }, z.core.$strip>>;
204
269
  packageSize: z.ZodNumber;
205
270
  requiresSdk: z.ZodNullable<z.ZodNumber>;
206
271
  notes: z.ZodString;
207
272
  createdAt: z.ZodNumber;
208
- }, z.core.$strict>>;
273
+ }, z.core.$strip>>;
209
274
  downloads: z.ZodNumber;
210
275
  updatedAt: z.ZodNumber;
211
276
  pageUrl: z.ZodString;
@@ -223,20 +288,51 @@ export declare const CommunityExtensionDetailSchema: z.ZodObject<{
223
288
  rejected: "rejected";
224
289
  incomplete: "incomplete";
225
290
  }>;
226
- grade: z.ZodNullable<z.ZodEnum<{
227
- A: "A";
228
- B: "B";
229
- C: "C";
230
- D: "D";
231
- }>>;
291
+ rating: z.ZodNullable<z.ZodObject<{
292
+ standard: z.ZodString;
293
+ score: z.ZodNumber;
294
+ dimensions: z.ZodArray<z.ZodObject<{
295
+ key: z.ZodString;
296
+ stars: z.ZodNumber;
297
+ headline: z.ZodString;
298
+ cap: z.ZodOptional<z.ZodString>;
299
+ }, z.core.$strip>>;
300
+ badges: z.ZodArray<z.ZodString>;
301
+ }, z.core.$strip>>;
232
302
  summary: z.ZodNullable<z.ZodString>;
233
- highlights: z.ZodArray<z.ZodObject<{
303
+ dimensions: z.ZodArray<z.ZodObject<{
304
+ key: z.ZodString;
305
+ notes: z.ZodString;
306
+ }, z.core.$strip>>;
307
+ findings: z.ZodArray<z.ZodObject<{
308
+ dimension: z.ZodString;
309
+ severity: z.ZodString;
310
+ title: z.ZodString;
311
+ }, z.core.$strip>>;
312
+ checks: z.ZodArray<z.ZodObject<{
234
313
  severity: z.ZodString;
235
314
  title: z.ZodString;
236
- }, z.core.$strict>>;
237
- }, z.core.$strict>>;
238
- }, z.core.$strict>;
315
+ }, z.core.$strip>>;
316
+ reviewedAt: z.ZodNullable<z.ZodNumber>;
317
+ }, z.core.$strip>>;
318
+ }, z.core.$strip>;
239
319
  export type CommunityExtensionDetail = z.output<typeof CommunityExtensionDetailSchema>;
320
+ /**
321
+ * 发布时随包提交的条目信息(作者自己写的介绍)。首次发布用于建条目;之后提供了哪项就覆盖哪项,未提供的保持不变。
322
+ */
323
+ export declare const COMMUNITY_LISTING_LIMITS: {
324
+ readonly summary: 160;
325
+ readonly description: 20000;
326
+ readonly tags: 8;
327
+ readonly tag: 40;
328
+ };
329
+ export declare const CommunityListingInputSchema: z.ZodObject<{
330
+ summary: z.ZodOptional<z.ZodString>;
331
+ description: z.ZodOptional<z.ZodString>;
332
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
333
+ sourceUrl: z.ZodOptional<z.ZodString>;
334
+ }, z.core.$strip>;
335
+ export type CommunityListingInput = z.output<typeof CommunityListingInputSchema>;
240
336
  export declare const CommunityEndpointSchema: z.ZodObject<{
241
337
  url: z.ZodString;
242
338
  source: z.ZodEnum<{
@@ -247,7 +343,7 @@ export declare const CommunityEndpointSchema: z.ZodObject<{
247
343
  defaultUrl: z.ZodString;
248
344
  environmentUrl: z.ZodNullable<z.ZodString>;
249
345
  insecure: z.ZodBoolean;
250
- }, z.core.$strict>;
346
+ }, z.core.$strip>;
251
347
  export type CommunityEndpoint = z.output<typeof CommunityEndpointSchema>;
252
348
  export declare const CommunitySourceSchema: z.ZodObject<{
253
349
  kind: z.ZodLiteral<"community">;
@@ -255,7 +351,7 @@ export declare const CommunitySourceSchema: z.ZodObject<{
255
351
  releaseId: z.ZodString;
256
352
  publisherHandle: z.ZodString;
257
353
  installedAt: z.ZodNumber;
258
- }, z.core.$strict>;
354
+ }, z.core.$strip>;
259
355
  export type CommunitySource = z.output<typeof CommunitySourceSchema>;
260
356
  export declare const CommunityInstalledItemSchema: z.ZodObject<{
261
357
  extensionId: z.core.$ZodBranded<z.ZodString, "ExtensionId", "out">;
@@ -267,7 +363,7 @@ export declare const CommunityInstalledItemSchema: z.ZodObject<{
267
363
  releaseId: z.ZodString;
268
364
  publisherHandle: z.ZodString;
269
365
  installedAt: z.ZodNumber;
270
- }, z.core.$strict>;
366
+ }, z.core.$strip>;
271
367
  sameCommunity: z.ZodBoolean;
272
368
  found: z.ZodBoolean;
273
369
  delisted: z.ZodBoolean;
@@ -286,12 +382,17 @@ export declare const CommunityInstalledItemSchema: z.ZodObject<{
286
382
  rejected: "rejected";
287
383
  incomplete: "incomplete";
288
384
  }>;
289
- grade: z.ZodNullable<z.ZodEnum<{
290
- A: "A";
291
- B: "B";
292
- C: "C";
293
- D: "D";
294
- }>>;
385
+ rating: z.ZodNullable<z.ZodObject<{
386
+ standard: z.ZodString;
387
+ score: z.ZodNumber;
388
+ dimensions: z.ZodArray<z.ZodObject<{
389
+ key: z.ZodString;
390
+ stars: z.ZodNumber;
391
+ headline: z.ZodString;
392
+ cap: z.ZodOptional<z.ZodString>;
393
+ }, z.core.$strip>>;
394
+ badges: z.ZodArray<z.ZodString>;
395
+ }, z.core.$strip>>;
295
396
  permissions: z.ZodArray<z.ZodObject<{
296
397
  key: z.ZodString;
297
398
  level: z.ZodEnum<{
@@ -301,12 +402,16 @@ export declare const CommunityInstalledItemSchema: z.ZodObject<{
301
402
  }>;
302
403
  label: z.ZodString;
303
404
  detail: z.ZodOptional<z.ZodString>;
304
- }, z.core.$strict>>;
405
+ layer: z.ZodOptional<z.ZodEnum<{
406
+ host: "host";
407
+ agent: "agent";
408
+ }>>;
409
+ }, z.core.$strip>>;
305
410
  packageSize: z.ZodNumber;
306
411
  requiresSdk: z.ZodNullable<z.ZodNumber>;
307
412
  notes: z.ZodString;
308
413
  createdAt: z.ZodNumber;
309
- }, z.core.$strict>>;
414
+ }, z.core.$strip>>;
310
415
  updateAvailable: z.ZodBoolean;
311
416
  addedPermissions: z.ZodArray<z.ZodObject<{
312
417
  key: z.ZodString;
@@ -317,8 +422,12 @@ export declare const CommunityInstalledItemSchema: z.ZodObject<{
317
422
  }>;
318
423
  label: z.ZodString;
319
424
  detail: z.ZodOptional<z.ZodString>;
320
- }, z.core.$strict>>;
321
- }, z.core.$strict>;
425
+ layer: z.ZodOptional<z.ZodEnum<{
426
+ host: "host";
427
+ agent: "agent";
428
+ }>>;
429
+ }, z.core.$strip>>;
430
+ }, z.core.$strip>;
322
431
  export type CommunityInstalledItem = z.output<typeof CommunityInstalledItemSchema>;
323
432
  export declare const CommunityInstalledSchema: z.ZodObject<{
324
433
  checkedAt: z.ZodNullable<z.ZodNumber>;
@@ -332,7 +441,7 @@ export declare const CommunityInstalledSchema: z.ZodObject<{
332
441
  releaseId: z.ZodString;
333
442
  publisherHandle: z.ZodString;
334
443
  installedAt: z.ZodNumber;
335
- }, z.core.$strict>;
444
+ }, z.core.$strip>;
336
445
  sameCommunity: z.ZodBoolean;
337
446
  found: z.ZodBoolean;
338
447
  delisted: z.ZodBoolean;
@@ -351,12 +460,17 @@ export declare const CommunityInstalledSchema: z.ZodObject<{
351
460
  rejected: "rejected";
352
461
  incomplete: "incomplete";
353
462
  }>;
354
- grade: z.ZodNullable<z.ZodEnum<{
355
- A: "A";
356
- B: "B";
357
- C: "C";
358
- D: "D";
359
- }>>;
463
+ rating: z.ZodNullable<z.ZodObject<{
464
+ standard: z.ZodString;
465
+ score: z.ZodNumber;
466
+ dimensions: z.ZodArray<z.ZodObject<{
467
+ key: z.ZodString;
468
+ stars: z.ZodNumber;
469
+ headline: z.ZodString;
470
+ cap: z.ZodOptional<z.ZodString>;
471
+ }, z.core.$strip>>;
472
+ badges: z.ZodArray<z.ZodString>;
473
+ }, z.core.$strip>>;
360
474
  permissions: z.ZodArray<z.ZodObject<{
361
475
  key: z.ZodString;
362
476
  level: z.ZodEnum<{
@@ -366,12 +480,16 @@ export declare const CommunityInstalledSchema: z.ZodObject<{
366
480
  }>;
367
481
  label: z.ZodString;
368
482
  detail: z.ZodOptional<z.ZodString>;
369
- }, z.core.$strict>>;
483
+ layer: z.ZodOptional<z.ZodEnum<{
484
+ host: "host";
485
+ agent: "agent";
486
+ }>>;
487
+ }, z.core.$strip>>;
370
488
  packageSize: z.ZodNumber;
371
489
  requiresSdk: z.ZodNullable<z.ZodNumber>;
372
490
  notes: z.ZodString;
373
491
  createdAt: z.ZodNumber;
374
- }, z.core.$strict>>;
492
+ }, z.core.$strip>>;
375
493
  updateAvailable: z.ZodBoolean;
376
494
  addedPermissions: z.ZodArray<z.ZodObject<{
377
495
  key: z.ZodString;
@@ -382,25 +500,26 @@ export declare const CommunityInstalledSchema: z.ZodObject<{
382
500
  }>;
383
501
  label: z.ZodString;
384
502
  detail: z.ZodOptional<z.ZodString>;
385
- }, z.core.$strict>>;
386
- }, z.core.$strict>>;
387
- }, z.core.$strict>;
503
+ layer: z.ZodOptional<z.ZodEnum<{
504
+ host: "host";
505
+ agent: "agent";
506
+ }>>;
507
+ }, z.core.$strip>>;
508
+ }, z.core.$strip>>;
509
+ }, z.core.$strip>;
388
510
  export declare const CommunityMyExtensionSchema: z.ZodObject<{
389
511
  id: z.core.$ZodBranded<z.ZodString, "ExtensionId", "out">;
390
- scope: z.ZodEnum<{
391
- agent: "agent";
392
- "host-adapter": "host-adapter";
393
- "host-ui": "host-ui";
394
- }>;
512
+ provides: z.ZodArray<z.ZodString>;
395
513
  displayName: z.ZodString;
396
514
  summary: z.ZodString;
397
515
  tags: z.ZodArray<z.ZodString>;
516
+ iconUrl: z.ZodNullable<z.ZodString>;
398
517
  official: z.ZodBoolean;
399
518
  publisher: z.ZodObject<{
400
519
  handle: z.ZodString;
401
520
  displayName: z.ZodString;
402
521
  avatarUrl: z.ZodNullable<z.ZodString>;
403
- }, z.core.$strict>;
522
+ }, z.core.$strip>;
404
523
  latest: z.ZodNullable<z.ZodObject<{
405
524
  id: z.ZodString;
406
525
  reviewStatus: z.ZodEnum<{
@@ -414,12 +533,17 @@ export declare const CommunityMyExtensionSchema: z.ZodObject<{
414
533
  rejected: "rejected";
415
534
  incomplete: "incomplete";
416
535
  }>;
417
- grade: z.ZodNullable<z.ZodEnum<{
418
- A: "A";
419
- B: "B";
420
- C: "C";
421
- D: "D";
422
- }>>;
536
+ rating: z.ZodNullable<z.ZodObject<{
537
+ standard: z.ZodString;
538
+ score: z.ZodNumber;
539
+ dimensions: z.ZodArray<z.ZodObject<{
540
+ key: z.ZodString;
541
+ stars: z.ZodNumber;
542
+ headline: z.ZodString;
543
+ cap: z.ZodOptional<z.ZodString>;
544
+ }, z.core.$strip>>;
545
+ badges: z.ZodArray<z.ZodString>;
546
+ }, z.core.$strip>>;
423
547
  permissions: z.ZodArray<z.ZodObject<{
424
548
  key: z.ZodString;
425
549
  level: z.ZodEnum<{
@@ -429,12 +553,16 @@ export declare const CommunityMyExtensionSchema: z.ZodObject<{
429
553
  }>;
430
554
  label: z.ZodString;
431
555
  detail: z.ZodOptional<z.ZodString>;
432
- }, z.core.$strict>>;
556
+ layer: z.ZodOptional<z.ZodEnum<{
557
+ host: "host";
558
+ agent: "agent";
559
+ }>>;
560
+ }, z.core.$strip>>;
433
561
  packageSize: z.ZodNumber;
434
562
  requiresSdk: z.ZodNullable<z.ZodNumber>;
435
563
  notes: z.ZodString;
436
564
  createdAt: z.ZodNumber;
437
- }, z.core.$strict>>;
565
+ }, z.core.$strip>>;
438
566
  downloads: z.ZodNumber;
439
567
  updatedAt: z.ZodNumber;
440
568
  pageUrl: z.ZodString;
@@ -451,12 +579,17 @@ export declare const CommunityMyExtensionSchema: z.ZodObject<{
451
579
  rejected: "rejected";
452
580
  incomplete: "incomplete";
453
581
  }>;
454
- grade: z.ZodNullable<z.ZodEnum<{
455
- A: "A";
456
- B: "B";
457
- C: "C";
458
- D: "D";
459
- }>>;
582
+ rating: z.ZodNullable<z.ZodObject<{
583
+ standard: z.ZodString;
584
+ score: z.ZodNumber;
585
+ dimensions: z.ZodArray<z.ZodObject<{
586
+ key: z.ZodString;
587
+ stars: z.ZodNumber;
588
+ headline: z.ZodString;
589
+ cap: z.ZodOptional<z.ZodString>;
590
+ }, z.core.$strip>>;
591
+ badges: z.ZodArray<z.ZodString>;
592
+ }, z.core.$strip>>;
460
593
  permissions: z.ZodArray<z.ZodObject<{
461
594
  key: z.ZodString;
462
595
  level: z.ZodEnum<{
@@ -466,19 +599,23 @@ export declare const CommunityMyExtensionSchema: z.ZodObject<{
466
599
  }>;
467
600
  label: z.ZodString;
468
601
  detail: z.ZodOptional<z.ZodString>;
469
- }, z.core.$strict>>;
602
+ layer: z.ZodOptional<z.ZodEnum<{
603
+ host: "host";
604
+ agent: "agent";
605
+ }>>;
606
+ }, z.core.$strip>>;
470
607
  packageSize: z.ZodNumber;
471
608
  requiresSdk: z.ZodNullable<z.ZodNumber>;
472
609
  notes: z.ZodString;
473
610
  createdAt: z.ZodNumber;
474
611
  withdrawn: z.ZodBoolean;
475
- }, z.core.$strict>>;
612
+ }, z.core.$strip>>;
476
613
  delisted: z.ZodBoolean;
477
614
  delistedReason: z.ZodNullable<z.ZodString>;
478
- }, z.core.$strict>;
615
+ }, z.core.$strip>;
479
616
  export type CommunityMyExtension = z.output<typeof CommunityMyExtensionSchema>;
480
- export declare const COMMUNITY_REVIEW_DIMENSIONS: readonly ["security", "transparency", "reliability", "context_cost", "usability", "maintainability", "compliance"];
481
- export declare const COMMUNITY_REVIEW_DIMENSION_LABELS: Readonly<Record<(typeof COMMUNITY_REVIEW_DIMENSIONS)[number], string>>;
617
+ /** 审查发现可归属的维度:六个评级维度加合规。 */
618
+ export declare const COMMUNITY_REVIEW_DIMENSION_LABELS: Readonly<Record<string, string>>;
482
619
  /** 作者看到的完整审查报告。 */
483
620
  export declare const CommunityReviewReportSchema: z.ZodObject<{
484
621
  releaseId: z.ZodString;
@@ -493,12 +630,17 @@ export declare const CommunityReviewReportSchema: z.ZodObject<{
493
630
  rejected: "rejected";
494
631
  incomplete: "incomplete";
495
632
  }>;
496
- grade: z.ZodNullable<z.ZodEnum<{
497
- A: "A";
498
- B: "B";
499
- C: "C";
500
- D: "D";
501
- }>>;
633
+ rating: z.ZodNullable<z.ZodObject<{
634
+ standard: z.ZodString;
635
+ score: z.ZodNumber;
636
+ dimensions: z.ZodArray<z.ZodObject<{
637
+ key: z.ZodString;
638
+ stars: z.ZodNumber;
639
+ headline: z.ZodString;
640
+ cap: z.ZodOptional<z.ZodString>;
641
+ }, z.core.$strip>>;
642
+ badges: z.ZodArray<z.ZodString>;
643
+ }, z.core.$strip>>;
502
644
  deterministic: z.ZodArray<z.ZodObject<{
503
645
  severity: z.ZodEnum<{
504
646
  info: "info";
@@ -510,44 +652,23 @@ export declare const CommunityReviewReportSchema: z.ZodObject<{
510
652
  detail: z.ZodString;
511
653
  file: z.ZodOptional<z.ZodString>;
512
654
  line: z.ZodOptional<z.ZodNumber>;
513
- }, z.core.$strict>>;
655
+ }, z.core.$strip>>;
514
656
  ai: z.ZodNullable<z.ZodObject<{
515
657
  summary: z.ZodString;
516
658
  verdict: z.ZodString;
517
- grade: z.ZodEnum<{
518
- A: "A";
519
- B: "B";
520
- C: "C";
521
- D: "D";
522
- }>;
659
+ compliance: z.ZodNullable<z.ZodObject<{
660
+ ok: z.ZodBoolean;
661
+ notes: z.ZodString;
662
+ }, z.core.$strip>>;
523
663
  dimensions: z.ZodArray<z.ZodObject<{
524
- key: z.ZodEnum<{
525
- security: "security";
526
- transparency: "transparency";
527
- reliability: "reliability";
528
- context_cost: "context_cost";
529
- usability: "usability";
530
- maintainability: "maintainability";
531
- compliance: "compliance";
532
- }>;
533
- grade: z.ZodEnum<{
534
- A: "A";
535
- B: "B";
536
- C: "C";
537
- D: "D";
538
- }>;
664
+ key: z.ZodString;
665
+ stars: z.ZodNumber;
666
+ headline: z.ZodString;
539
667
  notes: z.ZodString;
540
- }, z.core.$strict>>;
668
+ nextStar: z.ZodOptional<z.ZodString>;
669
+ }, z.core.$strip>>;
541
670
  findings: z.ZodArray<z.ZodObject<{
542
- dimension: z.ZodEnum<{
543
- security: "security";
544
- transparency: "transparency";
545
- reliability: "reliability";
546
- context_cost: "context_cost";
547
- usability: "usability";
548
- maintainability: "maintainability";
549
- compliance: "compliance";
550
- }>;
671
+ dimension: z.ZodString;
551
672
  severity: z.ZodEnum<{
552
673
  info: "info";
553
674
  warning: "warning";
@@ -560,9 +681,9 @@ export declare const CommunityReviewReportSchema: z.ZodObject<{
560
681
  file: z.ZodOptional<z.ZodString>;
561
682
  line: z.ZodOptional<z.ZodNumber>;
562
683
  suggestion: z.ZodOptional<z.ZodString>;
563
- }, z.core.$strict>>;
684
+ }, z.core.$strip>>;
564
685
  exploitability: z.ZodOptional<z.ZodString>;
565
- }, z.core.$strict>>;
686
+ }, z.core.$strip>>;
566
687
  model: z.ZodNullable<z.ZodString>;
567
688
  error: z.ZodNullable<z.ZodString>;
568
689
  decisions: z.ZodArray<z.ZodObject<{
@@ -570,10 +691,10 @@ export declare const CommunityReviewReportSchema: z.ZodObject<{
570
691
  note: z.ZodString;
571
692
  by: z.ZodString;
572
693
  createdAt: z.ZodNumber;
573
- }, z.core.$strict>>;
694
+ }, z.core.$strip>>;
574
695
  finishedAt: z.ZodNullable<z.ZodNumber>;
575
696
  reportUrl: z.ZodString;
576
- }, z.core.$strict>;
697
+ }, z.core.$strip>;
577
698
  export type CommunityReviewReport = z.output<typeof CommunityReviewReportSchema>;
578
699
  /** 安装者看到的审查标签:只描述审查发现,不做「安全」担保。 */
579
700
  export declare const communityReviewLabel: (status: CommunityReviewStatus) => {