@tappify/extension-sdk 2.1.0-beta.2 → 2.1.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 (137) hide show
  1. package/README.md +18 -54
  2. package/dist/{chunk-6HETNZJY.cjs → chunk-2DBSVKAU.cjs} +1 -1
  3. package/dist/{chunk-6HETNZJY.cjs.map → chunk-2DBSVKAU.cjs.map} +1 -1
  4. package/dist/{chunk-O357OJXL.cjs → chunk-3YWVYA42.cjs} +18 -14
  5. package/dist/chunk-3YWVYA42.cjs.map +1 -0
  6. package/dist/{chunk-GAUZYBXE.cjs → chunk-5AAPD5WV.cjs} +11 -11
  7. package/dist/chunk-5AAPD5WV.cjs.map +1 -0
  8. package/dist/{chunk-SGEYDV3K.mjs → chunk-BDCX6LRQ.mjs} +3 -3
  9. package/dist/chunk-BDCX6LRQ.mjs.map +1 -0
  10. package/dist/{chunk-KZ5NGFUP.mjs → chunk-C3YNVHBP.mjs} +7 -20
  11. package/dist/chunk-C3YNVHBP.mjs.map +1 -0
  12. package/dist/{chunk-QXD7WVKK.mjs → chunk-CSTYBKZC.mjs} +1 -1
  13. package/dist/chunk-CSTYBKZC.mjs.map +1 -0
  14. package/dist/{chunk-SWG7CNTZ.mjs → chunk-CTSZ5D7S.mjs} +5 -9
  15. package/dist/chunk-CTSZ5D7S.mjs.map +1 -0
  16. package/dist/chunk-EW54H7CR.cjs +722 -0
  17. package/dist/chunk-EW54H7CR.cjs.map +1 -0
  18. package/dist/chunk-EX3NFXDK.mjs +722 -0
  19. package/dist/chunk-EX3NFXDK.mjs.map +1 -0
  20. package/dist/{chunk-A74HCO6T.cjs → chunk-G7XZSN2Q.cjs} +18 -31
  21. package/dist/chunk-G7XZSN2Q.cjs.map +1 -0
  22. package/dist/{chunk-RBIQT75L.mjs → chunk-GG3IX52W.mjs} +2 -2
  23. package/dist/{chunk-SLGOHIBL.mjs → chunk-IGK2AP6J.mjs} +17 -13
  24. package/dist/chunk-IGK2AP6J.mjs.map +1 -0
  25. package/dist/{chunk-VV7ELNRW.cjs → chunk-JMUK3K47.cjs} +3 -3
  26. package/dist/{chunk-VV7ELNRW.cjs.map → chunk-JMUK3K47.cjs.map} +1 -1
  27. package/dist/{chunk-SGCYEEXD.mjs → chunk-MNDVYPEP.mjs} +2 -9
  28. package/dist/chunk-MNDVYPEP.mjs.map +1 -0
  29. package/dist/{chunk-BPCGXXMD.cjs → chunk-NFUPPCX4.cjs} +18 -22
  30. package/dist/chunk-NFUPPCX4.cjs.map +1 -0
  31. package/dist/{chunk-PRCZMOLD.cjs → chunk-OPPYEA7F.cjs} +3 -3
  32. package/dist/{chunk-PRCZMOLD.cjs.map → chunk-OPPYEA7F.cjs.map} +1 -1
  33. package/dist/{chunk-7YKH4LZN.cjs → chunk-PYJMJF44.cjs} +2 -9
  34. package/dist/chunk-PYJMJF44.cjs.map +1 -0
  35. package/dist/{chunk-QA5AL3VZ.mjs → chunk-QHM7XNRK.mjs} +2 -2
  36. package/dist/{chunk-QA5AL3VZ.mjs.map → chunk-QHM7XNRK.mjs.map} +1 -1
  37. package/dist/codegen.cjs.map +1 -1
  38. package/dist/codegen.d.cts +7 -43
  39. package/dist/codegen.d.ts +7 -43
  40. package/dist/codegen.mjs.map +1 -1
  41. package/dist/{constants-Bh759FUI.d.cts → constants-DJ_KgZpN.d.cts} +8 -44
  42. package/dist/{constants-Bh759FUI.d.ts → constants-DJ_KgZpN.d.ts} +8 -44
  43. package/dist/{context-mr8R5CNt.d.ts → context-Dt6xh_5t.d.cts} +4 -5
  44. package/dist/{context-DI0EJCRD.d.cts → context-Ml7k_V14.d.ts} +4 -5
  45. package/dist/{errors-Cqh0wrqt.d.ts → errors-COsBh7kd.d.cts} +2 -3
  46. package/dist/{errors-Cqh0wrqt.d.cts → errors-COsBh7kd.d.ts} +2 -3
  47. package/dist/handler-CZIlZ5vu.d.ts +227 -0
  48. package/dist/handler-kU9Jf36K.d.cts +227 -0
  49. package/dist/host.cjs +4 -4
  50. package/dist/host.d.cts +4 -4
  51. package/dist/host.d.ts +4 -4
  52. package/dist/host.mjs +3 -3
  53. package/dist/index.cjs +34 -5
  54. package/dist/index.cjs.map +1 -1
  55. package/dist/index.d.cts +627 -69
  56. package/dist/index.d.ts +627 -69
  57. package/dist/index.mjs +33 -4
  58. package/dist/manifest.cjs +24 -136
  59. package/dist/manifest.cjs.map +1 -1
  60. package/dist/manifest.d.cts +12 -97
  61. package/dist/manifest.d.ts +12 -97
  62. package/dist/manifest.mjs +10 -122
  63. package/dist/manifest.mjs.map +1 -1
  64. package/dist/server.cjs +66 -14
  65. package/dist/server.cjs.map +1 -1
  66. package/dist/server.d.cts +6 -6
  67. package/dist/server.d.ts +6 -6
  68. package/dist/server.mjs +61 -9
  69. package/dist/server.mjs.map +1 -1
  70. package/dist/styles.css +367 -0
  71. package/dist/testing/index.cjs +13 -72
  72. package/dist/testing/index.cjs.map +1 -1
  73. package/dist/testing/index.d.cts +10 -29
  74. package/dist/testing/index.d.ts +10 -29
  75. package/dist/testing/index.mjs +13 -72
  76. package/dist/testing/index.mjs.map +1 -1
  77. package/dist/testing/jest.cjs +5 -5
  78. package/dist/testing/jest.mjs +2 -2
  79. package/dist/testing/vitest.cjs +5 -5
  80. package/dist/testing/vitest.cjs.map +1 -1
  81. package/dist/testing/vitest.d.cts +0 -10
  82. package/dist/testing/vitest.d.ts +0 -10
  83. package/dist/testing/vitest.mjs +2 -2
  84. package/dist/testing/vitest.mjs.map +1 -1
  85. package/dist/{types-uGHrRaOj.d.ts → types-DDAGLpov.d.ts} +3 -4
  86. package/dist/{types-BdDaLnqs.d.cts → types-DrpQSv_2.d.cts} +3 -4
  87. package/dist/vite-preview.cjs +125 -294
  88. package/dist/vite-preview.cjs.map +1 -1
  89. package/dist/vite-preview.d.cts +24 -6
  90. package/dist/vite-preview.d.ts +24 -6
  91. package/dist/vite-preview.mjs +118 -287
  92. package/dist/vite-preview.mjs.map +1 -1
  93. package/dist/vite.cjs +24 -137
  94. package/dist/vite.cjs.map +1 -1
  95. package/dist/vite.d.cts +7 -43
  96. package/dist/vite.d.ts +7 -43
  97. package/dist/vite.mjs +18 -131
  98. package/dist/vite.mjs.map +1 -1
  99. package/package.json +2 -12
  100. package/schema/extension-v2.json +121 -440
  101. package/dist/chunk-2CY5HVY7.mjs +0 -59
  102. package/dist/chunk-2CY5HVY7.mjs.map +0 -1
  103. package/dist/chunk-7YKH4LZN.cjs.map +0 -1
  104. package/dist/chunk-A74HCO6T.cjs.map +0 -1
  105. package/dist/chunk-BPCGXXMD.cjs.map +0 -1
  106. package/dist/chunk-EB5XWQAU.cjs +0 -132
  107. package/dist/chunk-EB5XWQAU.cjs.map +0 -1
  108. package/dist/chunk-GAUZYBXE.cjs.map +0 -1
  109. package/dist/chunk-KZ5NGFUP.mjs.map +0 -1
  110. package/dist/chunk-O357OJXL.cjs.map +0 -1
  111. package/dist/chunk-ONJMPO3P.cjs +0 -59
  112. package/dist/chunk-ONJMPO3P.cjs.map +0 -1
  113. package/dist/chunk-QJMZRV7A.mjs +0 -132
  114. package/dist/chunk-QJMZRV7A.mjs.map +0 -1
  115. package/dist/chunk-QXD7WVKK.mjs.map +0 -1
  116. package/dist/chunk-SGCYEEXD.mjs.map +0 -1
  117. package/dist/chunk-SGEYDV3K.mjs.map +0 -1
  118. package/dist/chunk-SLGOHIBL.mjs.map +0 -1
  119. package/dist/chunk-SWG7CNTZ.mjs.map +0 -1
  120. package/dist/client-BO3kavn0.d.ts +0 -25
  121. package/dist/client-DE-vMgdO.d.cts +0 -25
  122. package/dist/ui/styles.css +0 -740
  123. package/dist/ui.cjs +0 -1018
  124. package/dist/ui.cjs.map +0 -1
  125. package/dist/ui.d.cts +0 -231
  126. package/dist/ui.d.ts +0 -231
  127. package/dist/ui.mjs +0 -1018
  128. package/dist/ui.mjs.map +0 -1
  129. package/dist/vite-preview-bootstrap.cjs +0 -66
  130. package/dist/vite-preview-bootstrap.cjs.map +0 -1
  131. package/dist/vite-preview-bootstrap.d.cts +0 -15
  132. package/dist/vite-preview-bootstrap.d.ts +0 -15
  133. package/dist/vite-preview-bootstrap.mjs +0 -66
  134. package/dist/vite-preview-bootstrap.mjs.map +0 -1
  135. package/dist/work-events-BlOVpK0k.d.ts +0 -547
  136. package/dist/work-events-D97EoqvS.d.cts +0 -547
  137. /package/dist/{chunk-RBIQT75L.mjs.map → chunk-GG3IX52W.mjs.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { E as ExtensionManifest, c as ExposableKind, U as UiContributionRef, M as ManifestValidation, d as ManifestIssue } from './constants-Bh759FUI.js';
2
- export { A as ActionDeclaration, e as AiContribution, B as BannerContribution, C as CARD_KEYS, f as CATEGORIES, g as CHARTS, h as ConnectorAuth, i as ConnectorContribution, j as ContextDeclaration, k as ContributionKind, l as CredentialField, D as DataQueryKind, m as DimensionDeclaration, n as EVENTS, o as ExtensionCategory, p as ExtensionInstallScope, q as ExtensionListing, r as ExtensionVisibility, s as HostChart, H as HostEventName, a as HostPage, t as HostTable, J as JsonSchema, K as KINDS, u as KnowledgeDeclaration, L as LegacyWorkContribution, v as MarkerContribution, w as MentionDeclaration, x as MetricDeclaration, O as OAuthTokenRequestEncoding, P as PAGES, y as PAGE_KEYS, z as PageContribution, F as PageDefinition, G as ProcedureDeclaration, I as PromptDeclaration, Q as QUERY_SCOPES, R as RowActionContribution, N as SCOPES, T as SCOPE_KEYS, V as SERVED_SDK_MAJORS, W as SLOTS, X as ScopeDefinition, Y as ScopeEntry, S as ScopeKey, Z as SeriesContribution, _ as SettingsContribution, $ as SkillDeclaration, b as SlotId, a0 as StorageCollection, a1 as TABLES, a2 as TABLE_KEYS, a3 as TabContribution, a4 as TableDefinition, a5 as ToolDeclaration, a6 as WebhookContribution, a7 as WidgetContribution, a8 as WorkAuth, a9 as WorkContribution, aa as WorkDirection, ab as findPage, ac as findScope, ad as findTable, ae as slotsForPage } from './constants-Bh759FUI.js';
1
+ import { E as ExtensionManifest, c as ExposableKind, U as UiContributionRef, M as ManifestValidation } from './constants-DJ_KgZpN.js';
2
+ export { A as ActionDeclaration, d as AiContribution, B as BannerContribution, C as CARD_KEYS, e as CATEGORIES, f as CHARTS, g as ConnectorAuth, h as ConnectorContribution, i as ContextDeclaration, j as ContributionKind, k as CredentialField, D as DataQueryKind, l as DimensionDeclaration, m as EVENTS, n as ExtensionCategory, o as ExtensionInstallScope, p as ExtensionListing, q as ExtensionVisibility, r as HostChart, H as HostEventName, a as HostPage, s as HostTable, J as JsonSchema, K as KINDS, t as KnowledgeDeclaration, u as ManifestIssue, v as MarkerContribution, w as MentionDeclaration, x as MetricDeclaration, P as PAGES, y as PAGE_KEYS, z as PageContribution, F as PageDefinition, G as ProcedureDeclaration, I as PromptDeclaration, Q as QUERY_SCOPES, R as RowActionContribution, L as SCOPES, N as SCOPE_KEYS, O as SERVED_SDK_MAJORS, T as SLOTS, V as ScopeDefinition, W as ScopeEntry, S as ScopeKey, X as SeriesContribution, Y as SettingsContribution, Z as SkillDeclaration, b as SlotId, _ as StorageCollection, $ as TABLES, a0 as TABLE_KEYS, a1 as TabContribution, a2 as TableDefinition, a3 as ToolDeclaration, a4 as WebhookContribution, a5 as WidgetContribution, a6 as WorkContribution, a7 as findPage, a8 as findScope, a9 as findTable, aa as slotsForPage } from './constants-DJ_KgZpN.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare function defineManifest(manifest: ExtensionManifest): ExtensionManifest;
@@ -52,7 +52,6 @@ declare const manifestSchema: z.ZodObject<{
52
52
  "analytics:read": "analytics:read";
53
53
  "store.metadata:read": "store.metadata:read";
54
54
  "reviews:read": "reviews:read";
55
- "review.threads:read": "review.threads:read";
56
55
  "crashes:read": "crashes:read";
57
56
  "revenue:read": "revenue:read";
58
57
  "metrics:write": "metrics:write";
@@ -181,10 +180,10 @@ declare const manifestSchema: z.ZodObject<{
181
180
  label: z.ZodString;
182
181
  type: z.ZodEnum<{
183
182
  text: "text";
184
- select: "select";
185
- textarea: "textarea";
186
183
  password: "password";
184
+ textarea: "textarea";
187
185
  file: "file";
186
+ select: "select";
188
187
  }>;
189
188
  required: z.ZodBoolean;
190
189
  options: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -194,10 +193,6 @@ declare const manifestSchema: z.ZodObject<{
194
193
  authorizationUrl: z.ZodURL;
195
194
  tokenUrl: z.ZodURL;
196
195
  scopes: z.ZodArray<z.ZodString>;
197
- tokenRequestEncoding: z.ZodOptional<z.ZodEnum<{
198
- form: "form";
199
- json: "json";
200
- }>>;
201
196
  }, z.core.$strict>>;
202
197
  }, z.core.$strict>>;
203
198
  sync: z.ZodOptional<z.ZodEnum<{
@@ -243,11 +238,11 @@ declare const manifestSchema: z.ZodObject<{
243
238
  description: z.ZodString;
244
239
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
245
240
  returns: z.ZodEnum<{
246
- value: "value";
247
- list: "list";
248
- table: "table";
249
241
  comparison: "comparison";
242
+ table: "table";
250
243
  series: "series";
244
+ list: "list";
245
+ value: "value";
251
246
  }>;
252
247
  cost: z.ZodEnum<{
253
248
  low: "low";
@@ -277,7 +272,6 @@ declare const manifestSchema: z.ZodObject<{
277
272
  "analytics:read": "analytics:read";
278
273
  "store.metadata:read": "store.metadata:read";
279
274
  "reviews:read": "reviews:read";
280
- "review.threads:read": "review.threads:read";
281
275
  "crashes:read": "crashes:read";
282
276
  "revenue:read": "revenue:read";
283
277
  "metrics:write": "metrics:write";
@@ -316,9 +310,9 @@ declare const manifestSchema: z.ZodObject<{
316
310
  title: z.ZodString;
317
311
  template: z.ZodString;
318
312
  surfaces: z.ZodArray<z.ZodEnum<{
319
- page: "page";
320
313
  chat_suggestion: "chat_suggestion";
321
314
  widget: "widget";
315
+ page: "page";
322
316
  result_card: "result_card";
323
317
  }>>;
324
318
  after: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -338,84 +332,7 @@ declare const manifestSchema: z.ZodObject<{
338
332
  }>>;
339
333
  }, z.core.$strict>>>;
340
334
  }, z.core.$strict>>;
341
- work: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
342
- kind: z.ZodEnum<{
343
- chat: "chat";
344
- tracker: "tracker";
345
- docs: "docs";
346
- }>;
347
- creates: z.ZodArray<z.ZodEnum<{
348
- page: "page";
349
- issue: "issue";
350
- message: "message";
351
- }>>;
352
- attachments: z.ZodArray<z.ZodEnum<{
353
- link: "link";
354
- image: "image";
355
- }>>;
356
- identity: z.ZodEnum<{
357
- user: "user";
358
- install: "install";
359
- }>;
360
- container: z.ZodOptional<z.ZodObject<{
361
- label: z.ZodString;
362
- list: z.ZodString;
363
- }, z.core.$strict>>;
364
- fields: z.ZodOptional<z.ZodObject<{
365
- priority: z.ZodOptional<z.ZodArray<z.ZodString>>;
366
- labels: z.ZodOptional<z.ZodBoolean>;
367
- assignee: z.ZodOptional<z.ZodBoolean>;
368
- required: z.ZodArray<z.ZodString>;
369
- }, z.core.$strict>>;
370
- comments: z.ZodUnion<readonly [z.ZodEnum<{
371
- none: "none";
372
- "two-way": "two-way";
373
- }>, z.ZodObject<{
374
- direction: z.ZodEnum<{
375
- none: "none";
376
- to_provider: "to_provider";
377
- from_provider: "from_provider";
378
- "two-way": "two-way";
379
- }>;
380
- supportsEdits: z.ZodLiteral<false>;
381
- supportsDeletes: z.ZodLiteral<false>;
382
- }, z.core.$strict>]>;
383
- status: z.ZodOptional<z.ZodObject<{
384
- direction: z.ZodEnum<{
385
- none: "none";
386
- to_provider: "to_provider";
387
- from_provider: "from_provider";
388
- "two-way": "two-way";
389
- }>;
390
- webhook: z.ZodOptional<z.ZodString>;
391
- map: z.ZodOptional<z.ZodObject<{
392
- open: z.ZodArray<z.ZodString>;
393
- in_progress: z.ZodArray<z.ZodString>;
394
- done: z.ZodArray<z.ZodString>;
395
- }, z.core.$strict>>;
396
- }, z.core.$strict>>;
397
- auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
398
- method: z.ZodLiteral<"oauth">;
399
- provider: z.ZodString;
400
- scopes: z.ZodArray<z.ZodString>;
401
- }, z.core.$strict>, z.ZodObject<{
402
- method: z.ZodLiteral<"api_key">;
403
- fields: z.ZodArray<z.ZodObject<{
404
- name: z.ZodString;
405
- label: z.ZodString;
406
- type: z.ZodEnum<{
407
- text: "text";
408
- select: "select";
409
- textarea: "textarea";
410
- password: "password";
411
- file: "file";
412
- }>;
413
- required: z.ZodBoolean;
414
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
415
- help: z.ZodOptional<z.ZodString>;
416
- }, z.core.$strict>>;
417
- }, z.core.$strict>], "method">;
418
- }, z.core.$strict>, z.ZodObject<{
335
+ work: z.ZodOptional<z.ZodObject<{
419
336
  kind: z.ZodEnum<{
420
337
  chat: "chat";
421
338
  tracker: "tracker";
@@ -437,8 +354,8 @@ declare const manifestSchema: z.ZodObject<{
437
354
  required: z.ZodArray<z.ZodString>;
438
355
  }, z.core.$strict>;
439
356
  attachments: z.ZodArray<z.ZodEnum<{
440
- link: "link";
441
357
  image: "image";
358
+ link: "link";
442
359
  }>>;
443
360
  comments: z.ZodEnum<{
444
361
  none: "none";
@@ -456,7 +373,7 @@ declare const manifestSchema: z.ZodObject<{
456
373
  user: "user";
457
374
  install: "install";
458
375
  }>;
459
- }, z.core.$strict>]>>;
376
+ }, z.core.$strict>>;
460
377
  }, z.core.$strict>;
461
378
  server: z.ZodOptional<z.ZodObject<{
462
379
  baseUrl: z.ZodURL;
@@ -511,7 +428,5 @@ declare const manifestSchema: z.ZodObject<{
511
428
  }, z.core.$strict>;
512
429
  declare function manifestJsonSchema(): Record<string, unknown>;
513
430
  declare function validateManifest(value: unknown): ManifestValidation;
514
- /** Migration warnings are separate from validation during SDK v2 compatibility. */
515
- declare function workManifestWarnings(manifest: ExtensionManifest): ManifestIssue[];
516
431
 
517
- export { ExposableKind, ExtensionManifest, ManifestIssue, ManifestValidation, UiContributionRef, defineManifest, exposeName, manifestJsonSchema, manifestSchema, remoteName, sdkMajors, uiContributions, validateManifest, workManifestWarnings };
432
+ export { ExposableKind, ExtensionManifest, ManifestValidation, UiContributionRef, defineManifest, exposeName, manifestJsonSchema, manifestSchema, remoteName, sdkMajors, uiContributions, validateManifest };
package/dist/manifest.mjs CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  findScope,
24
24
  findTable,
25
25
  slotsForPage
26
- } from "./chunk-SGCYEEXD.mjs";
26
+ } from "./chunk-MNDVYPEP.mjs";
27
27
  import "./chunk-J5LGTIGS.mjs";
28
28
 
29
29
  // src/manifest/schema.ts
@@ -198,10 +198,7 @@ var connectorContribution = z.object({
198
198
  ),
199
199
  scopes: z.array(z.string()).describe(
200
200
  "The scopes asked of the outside service. These are that service's scopes, not Tappify's."
201
- ),
202
- tokenRequestEncoding: z.enum(["form", "json"]).describe(
203
- "The request body encoding for authorization-code and refresh token exchanges. When omitted, uses form encoding (application/x-www-form-urlencoded); json uses application/json."
204
- ).optional()
201
+ )
205
202
  }).strict().describe('The endpoints, for `method: "oauth"`.').optional()
206
203
  }).strict().describe("How owners authenticate this connector.").optional(),
207
204
  sync: z.enum(["5m", "15m", "1h", "6h", "24h"]).describe("How often Tappify asks your server to sync.").optional(),
@@ -345,7 +342,7 @@ var aiContribution = z.object({
345
342
  ).optional()
346
343
  }).strict();
347
344
  var statusNames = (stage) => z.array(z.string()).describe(`Your own status names that mean ${stage}.`);
348
- var legacyWorkContribution = z.object({
345
+ var workContribution = z.object({
349
346
  kind: z.enum(["tracker", "docs", "chat"]).describe("What kind of destination this is."),
350
347
  container: z.object({
351
348
  label: z.string().min(1).max(60).describe(
@@ -380,55 +377,6 @@ var legacyWorkContribution = z.object({
380
377
  "Whether items are created as the owner who asked (`user`) or as the install itself."
381
378
  )
382
379
  }).strict();
383
- var workDirection = z.enum([
384
- "none",
385
- "to_provider",
386
- "from_provider",
387
- "two-way"
388
- ]);
389
- var workAuth = z.discriminatedUnion("method", [
390
- z.object({
391
- method: z.literal("oauth"),
392
- provider: z.string().min(1).describe("The OAuth provider identifier."),
393
- scopes: z.array(z.string()).describe("The scopes requested from the provider.")
394
- }).strict(),
395
- z.object({
396
- method: z.literal("api_key"),
397
- fields: z.array(credentialField).max(20)
398
- }).strict()
399
- ]);
400
- var currentWorkContribution = legacyWorkContribution.extend({
401
- container: legacyWorkContribution.shape.container.describe(
402
- "Deprecated. Resolve containers dynamically with describe_container."
403
- ).optional(),
404
- fields: legacyWorkContribution.shape.fields.describe("Deprecated. Resolve fields dynamically with describe_container.").optional(),
405
- comments: z.union([
406
- z.enum(["two-way", "none"]).describe("Deprecated. Declare a comments capability object."),
407
- z.object({
408
- direction: workDirection,
409
- supportsEdits: z.literal(false),
410
- supportsDeletes: z.literal(false)
411
- }).strict()
412
- ]),
413
- status: z.object({
414
- direction: workDirection,
415
- webhook: z.string().regex(DOMAIN_EVENT).optional(),
416
- map: z.object({
417
- open: statusNames("not started"),
418
- in_progress: statusNames("under way"),
419
- done: statusNames("finished")
420
- }).strict().describe(
421
- "Deprecated. Resolve statuses dynamically with describe_container."
422
- ).optional()
423
- }).strict().optional(),
424
- auth: workAuth.describe("How owners authenticate the work destination.")
425
- });
426
- var workContribution = z.union([
427
- currentWorkContribution,
428
- legacyWorkContribution.describe(
429
- "Deprecated SDK v2 work declaration. Migrate to work capabilities and auth."
430
- )
431
- ]);
432
380
  var listing = z.object({
433
381
  longDescription: z.string().min(1).max(5e3).describe("The body of your listing page, in markdown.").optional(),
434
382
  screenshots: z.array(z.string().min(1)).min(1, "A listing shows 1 to 6 screenshots.").max(6, "A listing shows 1 to 6 screenshots.").describe(
@@ -520,7 +468,7 @@ var manifestObject = z.object({
520
468
  "What this extension offers the assistant: tools, mentions, actions, knowledge, skills, prompts and context providers."
521
469
  ).optional(),
522
470
  work: workContribution.describe(
523
- "The work destination this extension creates issues, pages or messages in. Needs `review.threads:read` and `work:create`; active comment or status sync also needs `work:sync`."
471
+ "The work destination this extension creates issues, pages or messages in. Needs the `work:create` and `work:sync` scopes."
524
472
  ).optional()
525
473
  }).strict().describe(
526
474
  "What this extension adds to the host. At most 20 UI contributions in total, and a page, tab, widget, row action, marker or settings panel needs the `ui:render` scope."
@@ -741,36 +689,16 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
741
689
  }
742
690
  }
743
691
  if (contributes.work) {
744
- const work = contributes.work;
745
- const legacy = isLegacyWork(work);
746
- if (!legacy || !granted.has("reviews:read")) {
747
- requireScope(
748
- "review.threads:read",
749
- ["scopes"],
750
- "the work destination reads Review threads."
751
- );
752
- }
753
692
  requireScope(
754
693
  "work:create",
755
694
  ["scopes"],
756
695
  "the work destination creates items."
757
696
  );
758
- const comments = typeof work.comments === "string" ? work.comments : work.comments.direction;
759
- const status = work.status ? "direction" in work.status ? work.status.direction : "from_provider" : "none";
760
- if (comments !== "none" || status !== "none") {
761
- requireScope(
762
- "work:sync",
763
- ["scopes"],
764
- "the work destination syncs comments or status."
765
- );
766
- }
767
- if (work.identity === "user") {
768
- ctx.addIssue({
769
- code: "custom",
770
- path: ["contributes", "work", "identity"],
771
- message: 'Per-user work identity is not supported. Set identity to "install".'
772
- });
773
- }
697
+ requireScope(
698
+ "work:sync",
699
+ ["scopes"],
700
+ "the work destination syncs comments and status."
701
+ );
774
702
  }
775
703
  const needsServer = contributes.connector !== void 0 || (contributes.webhooks?.length ?? 0) > 0 || ai !== void 0 || contributes.work !== void 0 || manifest.server?.procedures !== void 0;
776
704
  if (needsServer && !manifest.server?.baseUrl) {
@@ -857,45 +785,6 @@ function validateManifest(value) {
857
785
  }));
858
786
  return { ok: false, issues };
859
787
  }
860
- function isLegacyWork(work) {
861
- return !("auth" in work);
862
- }
863
- function workManifestWarnings(manifest) {
864
- const work = manifest.contributes.work;
865
- if (!work) return [];
866
- const warnings = [];
867
- if (work.container) {
868
- warnings.push({
869
- path: "contributes.work.container",
870
- message: "Static work containers are deprecated. Resolve containers dynamically with describe_container."
871
- });
872
- }
873
- if (work.fields) {
874
- warnings.push({
875
- path: "contributes.work.fields",
876
- message: "Static work fields are deprecated. Resolve fields dynamically with describe_container."
877
- });
878
- }
879
- if (typeof work.comments === "string") {
880
- warnings.push({
881
- path: "contributes.work.comments",
882
- message: "String work comments are deprecated. Declare direction, supportsEdits: false and supportsDeletes: false."
883
- });
884
- }
885
- if (work.status?.map) {
886
- warnings.push({
887
- path: "contributes.work.status.map",
888
- message: "Static work status maps are deprecated. Resolve statuses dynamically with describe_container."
889
- });
890
- }
891
- if (isLegacyWork(work) && manifest.scopes.some((scope) => scope.key === "reviews:read") && !manifest.scopes.some((scope) => scope.key === "review.threads:read")) {
892
- warnings.push({
893
- path: "scopes",
894
- message: "Using reviews:read for work is deprecated. Add review.threads:read for Review threads; reviews:read grants store-review access."
895
- });
896
- }
897
- return warnings;
898
- }
899
788
  export {
900
789
  CARD_KEYS,
901
790
  CATEGORIES,
@@ -922,7 +811,6 @@ export {
922
811
  sdkMajors,
923
812
  slotsForPage,
924
813
  uiContributions,
925
- validateManifest,
926
- workManifestWarnings
814
+ validateManifest
927
815
  };
928
816
  //# sourceMappingURL=manifest.mjs.map