@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
package/dist/index.mjs CHANGED
@@ -1,4 +1,19 @@
1
- import "./chunk-2CY5HVY7.mjs";
1
+ import {
2
+ TapButton,
3
+ TapCard,
4
+ TapDialog,
5
+ TapEmptyState,
6
+ TapErrorState,
7
+ TapForm,
8
+ TapInput,
9
+ TapPageHeader,
10
+ TapSelect,
11
+ TapSkeleton,
12
+ TapStat,
13
+ TapTable,
14
+ cn,
15
+ formFields
16
+ } from "./chunk-EX3NFXDK.mjs";
2
17
  import {
3
18
  dataQueryKey,
4
19
  installPrefix,
@@ -16,21 +31,35 @@ import {
16
31
  useTapState,
17
32
  useTapStorage,
18
33
  useTapTheme
19
- } from "./chunk-SGEYDV3K.mjs";
34
+ } from "./chunk-BDCX6LRQ.mjs";
20
35
  import {
21
36
  useTap
22
- } from "./chunk-QA5AL3VZ.mjs";
37
+ } from "./chunk-QHM7XNRK.mjs";
23
38
  import {
24
39
  TAP_ERROR_CODES,
25
40
  TapError,
26
41
  TapServerError
27
- } from "./chunk-QXD7WVKK.mjs";
42
+ } from "./chunk-CSTYBKZC.mjs";
28
43
  import "./chunk-J5LGTIGS.mjs";
29
44
  export {
30
45
  TAP_ERROR_CODES,
46
+ TapButton,
47
+ TapCard,
48
+ TapDialog,
49
+ TapEmptyState,
31
50
  TapError,
51
+ TapErrorState,
52
+ TapForm,
53
+ TapInput,
54
+ TapPageHeader,
55
+ TapSelect,
32
56
  TapServerError,
57
+ TapSkeleton,
58
+ TapStat,
59
+ TapTable,
60
+ cn,
33
61
  dataQueryKey,
62
+ formFields,
34
63
  installPrefix,
35
64
  procedurePrefix,
36
65
  procedureQueryKey,
package/dist/manifest.cjs CHANGED
@@ -23,7 +23,7 @@ var _chunkNN263PGQcjs = require('./chunk-NN263PGQ.cjs');
23
23
 
24
24
 
25
25
 
26
- var _chunk7YKH4LZNcjs = require('./chunk-7YKH4LZN.cjs');
26
+ var _chunkPYJMJF44cjs = require('./chunk-PYJMJF44.cjs');
27
27
  require('./chunk-Q7SFCCGT.cjs');
28
28
 
29
29
  // src/manifest/schema.ts
@@ -84,7 +84,7 @@ var contributionId = _zod.z.string().regex(CONTRIBUTION_ID).describe(
84
84
  );
85
85
  var title = _zod.z.string().min(1).max(60).describe("The label owners read on this contribution.");
86
86
  var scopeEntry = _zod.z.object({
87
- key: _zod.z.enum(_chunk7YKH4LZNcjs.SCOPE_KEYS, {
87
+ key: _zod.z.enum(_chunkPYJMJF44cjs.SCOPE_KEYS, {
88
88
  error: "Unknown scope key; see the Scopes reference."
89
89
  }).describe("The scope key, from the scopes reference."),
90
90
  justification: _zod.z.string().min(20).max(500).describe(
@@ -94,7 +94,7 @@ var scopeEntry = _zod.z.object({
94
94
  var mobile = _zod.z.boolean().describe(
95
95
  "Whether this surface is drawn on phone layouts. Defaults to true; set false to hide it there."
96
96
  ).optional();
97
- var hostPage = (what) => _zod.z.enum(_chunk7YKH4LZNcjs.PAGE_KEYS).describe(what);
97
+ var hostPage = (what) => _zod.z.enum(_chunkPYJMJF44cjs.PAGE_KEYS).describe(what);
98
98
  var pageContribution = _zod.z.object({
99
99
  id: contributionId,
100
100
  title,
@@ -116,7 +116,7 @@ var widgetContribution = _zod.z.object({
116
116
  title,
117
117
  entry: entryPath,
118
118
  page: hostPage("The host page this widget renders on."),
119
- slot: _zod.z.enum(_chunk7YKH4LZNcjs.SLOTS).describe(
119
+ slot: _zod.z.enum(_chunkPYJMJF44cjs.SLOTS).describe(
120
120
  "The named anchor on that page. A slot that is not on the page fails validation."
121
121
  ),
122
122
  size: _zod.z.enum(["1x1", "2x1", "2x2"]).describe(
@@ -129,7 +129,7 @@ var widgetContribution = _zod.z.object({
129
129
  var seriesContribution = _zod.z.object({
130
130
  id: contributionId,
131
131
  label: title,
132
- chart: _zod.z.enum(_chunk7YKH4LZNcjs.CHARTS).describe("The host chart this line is drawn on."),
132
+ chart: _zod.z.enum(_chunkPYJMJF44cjs.CHARTS).describe("The host chart this line is drawn on."),
133
133
  metric: _zod.z.string().min(1).max(60).describe(
134
134
  "The connector metric this line plots. It has to be one the connector declares."
135
135
  )
@@ -144,13 +144,13 @@ var bannerContribution = _zod.z.object({
144
144
  var rowActionContribution = _zod.z.object({
145
145
  id: contributionId,
146
146
  title,
147
- table: _zod.z.enum(_chunk7YKH4LZNcjs.TABLE_KEYS).describe("The host table whose row menu gains this entry."),
147
+ table: _zod.z.enum(_chunkPYJMJF44cjs.TABLE_KEYS).describe("The host table whose row menu gains this entry."),
148
148
  entry: entryPath
149
149
  }).strict();
150
150
  var markerContribution = _zod.z.object({
151
151
  id: contributionId,
152
152
  label: title,
153
- chart: _zod.z.union([_zod.z.enum(_chunk7YKH4LZNcjs.CHARTS), _zod.z.literal("*")]).describe(
153
+ chart: _zod.z.union([_zod.z.enum(_chunkPYJMJF44cjs.CHARTS), _zod.z.literal("*")]).describe(
154
154
  "The host chart this marker is drawn on, or `*` for every chart."
155
155
  ),
156
156
  event: _zod.z.string().regex(DOMAIN_EVENT).describe(
@@ -198,10 +198,7 @@ var connectorContribution = _zod.z.object({
198
198
  ),
199
199
  scopes: _zod.z.array(_zod.z.string()).describe(
200
200
  "The scopes asked of the outside service. These are that service's scopes, not Tappify's."
201
- ),
202
- tokenRequestEncoding: _zod.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: _zod.z.enum(["5m", "15m", "1h", "6h", "24h"]).describe("How often Tappify asks your server to sync.").optional(),
@@ -279,7 +276,7 @@ var aiContribution = _zod.z.object({
279
276
  "Always true. An action goes through an owner approval; there is no way to opt out."
280
277
  ),
281
278
  reversible: _zod.z.boolean().describe("Whether the owner can undo it after it runs."),
282
- scope: _zod.z.enum(_chunk7YKH4LZNcjs.SCOPE_KEYS).describe(
279
+ scope: _zod.z.enum(_chunkPYJMJF44cjs.SCOPE_KEYS).describe(
283
280
  "The scope this action needs. Declare it under `scopes` as well."
284
281
  ),
285
282
  estimatesCost: _zod.z.boolean().describe(
@@ -345,7 +342,7 @@ var aiContribution = _zod.z.object({
345
342
  ).optional()
346
343
  }).strict();
347
344
  var statusNames = (stage) => _zod.z.array(_zod.z.string()).describe(`Your own status names that mean ${stage}.`);
348
- var legacyWorkContribution = _zod.z.object({
345
+ var workContribution = _zod.z.object({
349
346
  kind: _zod.z.enum(["tracker", "docs", "chat"]).describe("What kind of destination this is."),
350
347
  container: _zod.z.object({
351
348
  label: _zod.z.string().min(1).max(60).describe(
@@ -380,55 +377,6 @@ var legacyWorkContribution = _zod.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 = _zod.z.enum([
384
- "none",
385
- "to_provider",
386
- "from_provider",
387
- "two-way"
388
- ]);
389
- var workAuth = _zod.z.discriminatedUnion("method", [
390
- _zod.z.object({
391
- method: _zod.z.literal("oauth"),
392
- provider: _zod.z.string().min(1).describe("The OAuth provider identifier."),
393
- scopes: _zod.z.array(_zod.z.string()).describe("The scopes requested from the provider.")
394
- }).strict(),
395
- _zod.z.object({
396
- method: _zod.z.literal("api_key"),
397
- fields: _zod.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: _zod.z.union([
406
- _zod.z.enum(["two-way", "none"]).describe("Deprecated. Declare a comments capability object."),
407
- _zod.z.object({
408
- direction: workDirection,
409
- supportsEdits: _zod.z.literal(false),
410
- supportsDeletes: _zod.z.literal(false)
411
- }).strict()
412
- ]),
413
- status: _zod.z.object({
414
- direction: workDirection,
415
- webhook: _zod.z.string().regex(DOMAIN_EVENT).optional(),
416
- map: _zod.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 = _zod.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 = _zod.z.object({
433
381
  longDescription: _zod.z.string().min(1).max(5e3).describe("The body of your listing page, in markdown.").optional(),
434
382
  screenshots: _zod.z.array(_zod.z.string().min(1)).min(1, "A listing shows 1 to 6 screenshots.").max(6, "A listing shows 1 to 6 screenshots.").describe(
@@ -475,7 +423,7 @@ var manifestObject = _zod.z.object({
475
423
  icon: _zod.z.string().min(1).max(200).describe(
476
424
  "The icon file carried in the bundle, as a path relative to the manifest. Square png or svg, at most 512 KB."
477
425
  ),
478
- category: _zod.z.enum(_chunk7YKH4LZNcjs.CATEGORIES, {
426
+ category: _zod.z.enum(_chunkPYJMJF44cjs.CATEGORIES, {
479
427
  error: "Choose a category from the Tap Store list (see the Categories reference)."
480
428
  }).describe("The Tap Store section owners browse and filter by."),
481
429
  sdk: _zod.z.string().min(1).max(60).describe(
@@ -487,7 +435,7 @@ var manifestObject = _zod.z.object({
487
435
  installScope: _zod.z.enum(["project", "organization"]).describe(
488
436
  "Whether one install belongs to a single project or to a whole organization. An organization install contributes no pages, tabs, widgets or series, because those render on a project."
489
437
  ),
490
- scopes: _zod.z.array(scopeEntry).min(1).max(_chunk7YKH4LZNcjs.SCOPE_KEYS.length).describe(
438
+ scopes: _zod.z.array(scopeEntry).min(1).max(_chunkPYJMJF44cjs.SCOPE_KEYS.length).describe(
491
439
  "The permissions an owner grants at install. Declare only what your contributions use."
492
440
  ),
493
441
  contributes: _zod.z.object({
@@ -520,7 +468,7 @@ var manifestObject = _zod.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."
@@ -542,7 +490,7 @@ var manifestObject = _zod.z.object({
542
490
  "The procedures the host may call on your server, by name, each with its input and output schema. At most 30."
543
491
  ).optional(),
544
492
  events: _zod.z.array(
545
- _zod.z.enum(_chunk7YKH4LZNcjs.EVENTS, {
493
+ _zod.z.enum(_chunkPYJMJF44cjs.EVENTS, {
546
494
  error: (issue) => `"${String(issue.input)}" is not a Tappify event. Subscribe to a name from the event catalogue.`
547
495
  })
548
496
  ).describe(
@@ -598,7 +546,7 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
598
546
  });
599
547
  };
600
548
  for (const [index, widget] of (_nullishCoalesce(contributes.widgets, () => ( []))).entries()) {
601
- const slots = _chunk7YKH4LZNcjs.slotsForPage.call(void 0, widget.page);
549
+ const slots = _chunkPYJMJF44cjs.slotsForPage.call(void 0, widget.page);
602
550
  if (!slots.includes(widget.slot)) {
603
551
  ctx.addIssue({
604
552
  code: "custom",
@@ -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 || (_nullishCoalesce(_optionalChain([contributes, 'access', _46 => _46.webhooks, 'optionalAccess', _47 => _47.length]), () => ( 0))) > 0 || ai !== void 0 || contributes.work !== void 0 || _optionalChain([manifest, 'access', _48 => _48.server, 'optionalAccess', _49 => _49.procedures]) !== void 0;
776
704
  if (needsServer && !_optionalChain([manifest, 'access', _50 => _50.server, 'optionalAccess', _51 => _51.baseUrl])) {
@@ -789,7 +717,7 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
789
717
  });
790
718
  }
791
719
  for (const scope of manifest.scopes) {
792
- const definition = _chunk7YKH4LZNcjs.findScope.call(void 0, scope.key);
720
+ const definition = _chunkPYJMJF44cjs.findScope.call(void 0, scope.key);
793
721
  if (_optionalChain([definition, 'optionalAccess', _54 => _54.requiresJustification]) && !scope.justification) {
794
722
  ctx.addIssue({
795
723
  code: "custom",
@@ -822,11 +750,11 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
822
750
  });
823
751
  }
824
752
  }
825
- if (!sdkMajors(manifest.sdk).some((major) => _chunk7YKH4LZNcjs.SERVED_SDK_MAJORS.includes(major))) {
753
+ if (!sdkMajors(manifest.sdk).some((major) => _chunkPYJMJF44cjs.SERVED_SDK_MAJORS.includes(major))) {
826
754
  ctx.addIssue({
827
755
  code: "custom",
828
756
  path: ["sdk"],
829
- message: `The host serves SDK major ${_chunk7YKH4LZNcjs.SERVED_SDK_MAJORS.join(", ")}. Set sdk to a range that includes it, such as "^2.0.0".`
757
+ message: `The host serves SDK major ${_chunkPYJMJF44cjs.SERVED_SDK_MAJORS.join(", ")}. Set sdk to a range that includes it, such as "^2.0.0".`
830
758
  });
831
759
  }
832
760
  });
@@ -857,46 +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 (_optionalChain([work, 'access', _62 => _62.status, 'optionalAccess', _63 => _63.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
-
900
788
 
901
789
 
902
790
 
@@ -924,5 +812,5 @@ function workManifestWarnings(manifest) {
924
812
 
925
813
 
926
814
 
927
- exports.CARD_KEYS = _chunk7YKH4LZNcjs.CARD_KEYS; exports.CATEGORIES = _chunk7YKH4LZNcjs.CATEGORIES; exports.CHARTS = _chunk7YKH4LZNcjs.CHARTS; exports.EVENTS = _chunk7YKH4LZNcjs.EVENTS; exports.KINDS = _chunk7YKH4LZNcjs.KINDS; exports.PAGES = _chunk7YKH4LZNcjs.PAGES; exports.PAGE_KEYS = _chunk7YKH4LZNcjs.PAGE_KEYS; exports.QUERY_SCOPES = _chunk7YKH4LZNcjs.QUERY_SCOPES; exports.SCOPES = _chunk7YKH4LZNcjs.SCOPES; exports.SCOPE_KEYS = _chunk7YKH4LZNcjs.SCOPE_KEYS; exports.SERVED_SDK_MAJORS = _chunk7YKH4LZNcjs.SERVED_SDK_MAJORS; exports.SLOTS = _chunk7YKH4LZNcjs.SLOTS; exports.TABLES = _chunk7YKH4LZNcjs.TABLES; exports.TABLE_KEYS = _chunk7YKH4LZNcjs.TABLE_KEYS; exports.defineManifest = _chunkNN263PGQcjs.defineManifest; exports.exposeName = _chunkNN263PGQcjs.exposeName; exports.findPage = _chunk7YKH4LZNcjs.findPage; exports.findScope = _chunk7YKH4LZNcjs.findScope; exports.findTable = _chunk7YKH4LZNcjs.findTable; exports.manifestJsonSchema = manifestJsonSchema; exports.manifestSchema = manifestSchema; exports.remoteName = _chunkNN263PGQcjs.remoteName; exports.sdkMajors = sdkMajors; exports.slotsForPage = _chunk7YKH4LZNcjs.slotsForPage; exports.uiContributions = _chunkNN263PGQcjs.uiContributions; exports.validateManifest = validateManifest; exports.workManifestWarnings = workManifestWarnings;
815
+ exports.CARD_KEYS = _chunkPYJMJF44cjs.CARD_KEYS; exports.CATEGORIES = _chunkPYJMJF44cjs.CATEGORIES; exports.CHARTS = _chunkPYJMJF44cjs.CHARTS; exports.EVENTS = _chunkPYJMJF44cjs.EVENTS; exports.KINDS = _chunkPYJMJF44cjs.KINDS; exports.PAGES = _chunkPYJMJF44cjs.PAGES; exports.PAGE_KEYS = _chunkPYJMJF44cjs.PAGE_KEYS; exports.QUERY_SCOPES = _chunkPYJMJF44cjs.QUERY_SCOPES; exports.SCOPES = _chunkPYJMJF44cjs.SCOPES; exports.SCOPE_KEYS = _chunkPYJMJF44cjs.SCOPE_KEYS; exports.SERVED_SDK_MAJORS = _chunkPYJMJF44cjs.SERVED_SDK_MAJORS; exports.SLOTS = _chunkPYJMJF44cjs.SLOTS; exports.TABLES = _chunkPYJMJF44cjs.TABLES; exports.TABLE_KEYS = _chunkPYJMJF44cjs.TABLE_KEYS; exports.defineManifest = _chunkNN263PGQcjs.defineManifest; exports.exposeName = _chunkNN263PGQcjs.exposeName; exports.findPage = _chunkPYJMJF44cjs.findPage; exports.findScope = _chunkPYJMJF44cjs.findScope; exports.findTable = _chunkPYJMJF44cjs.findTable; exports.manifestJsonSchema = manifestJsonSchema; exports.manifestSchema = manifestSchema; exports.remoteName = _chunkNN263PGQcjs.remoteName; exports.sdkMajors = sdkMajors; exports.slotsForPage = _chunkPYJMJF44cjs.slotsForPage; exports.uiContributions = _chunkNN263PGQcjs.uiContributions; exports.validateManifest = validateManifest;
928
816
  //# sourceMappingURL=manifest.cjs.map