@tappify/extension-sdk 2.0.0 → 2.1.0-beta.1
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/README.md +208 -0
- package/dist/chunk-2CY5HVY7.mjs +59 -0
- package/dist/chunk-2CY5HVY7.mjs.map +1 -0
- package/dist/{chunk-2DBSVKAU.cjs → chunk-6HETNZJY.cjs} +1 -1
- package/dist/chunk-6HETNZJY.cjs.map +1 -0
- package/dist/{chunk-PYJMJF44.cjs → chunk-7YKH4LZN.cjs} +9 -2
- package/dist/chunk-7YKH4LZN.cjs.map +1 -0
- package/dist/{chunk-RMUWRESK.cjs → chunk-A74HCO6T.cjs} +31 -18
- package/dist/chunk-A74HCO6T.cjs.map +1 -0
- package/dist/chunk-BPCGXXMD.cjs +781 -0
- package/dist/chunk-BPCGXXMD.cjs.map +1 -0
- package/dist/chunk-EB5XWQAU.cjs +132 -0
- package/dist/chunk-EB5XWQAU.cjs.map +1 -0
- package/dist/{chunk-5AAPD5WV.cjs → chunk-GAUZYBXE.cjs} +11 -11
- package/dist/chunk-GAUZYBXE.cjs.map +1 -0
- package/dist/chunk-J5LGTIGS.mjs +10 -0
- package/dist/chunk-J5LGTIGS.mjs.map +1 -0
- package/dist/{chunk-ZT35X7KL.mjs → chunk-KZ5NGFUP.mjs} +22 -9
- package/dist/chunk-KZ5NGFUP.mjs.map +1 -0
- package/dist/chunk-NN263PGQ.cjs +70 -0
- package/dist/chunk-NN263PGQ.cjs.map +1 -0
- package/dist/{chunk-3YWVYA42.cjs → chunk-O357OJXL.cjs} +14 -18
- package/dist/chunk-O357OJXL.cjs.map +1 -0
- package/dist/chunk-ONJMPO3P.cjs +59 -0
- package/dist/chunk-ONJMPO3P.cjs.map +1 -0
- package/dist/{chunk-OPPYEA7F.cjs → chunk-PRCZMOLD.cjs} +3 -3
- package/dist/chunk-PRCZMOLD.cjs.map +1 -0
- package/dist/chunk-Q7SFCCGT.cjs +10 -0
- package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
- package/dist/{chunk-QHM7XNRK.mjs → chunk-QA5AL3VZ.mjs} +2 -2
- package/dist/{chunk-QHM7XNRK.mjs.map → chunk-QA5AL3VZ.mjs.map} +1 -1
- package/dist/chunk-QJMZRV7A.mjs +132 -0
- package/dist/chunk-QJMZRV7A.mjs.map +1 -0
- package/dist/{chunk-CSTYBKZC.mjs → chunk-QXD7WVKK.mjs} +1 -1
- package/dist/chunk-QXD7WVKK.mjs.map +1 -0
- package/dist/{chunk-4C5Z3CIK.mjs → chunk-RBIQT75L.mjs} +2 -2
- package/dist/chunk-RBIQT75L.mjs.map +1 -0
- package/dist/{chunk-MNDVYPEP.mjs → chunk-SGCYEEXD.mjs} +9 -2
- package/dist/chunk-SGCYEEXD.mjs.map +1 -0
- package/dist/{chunk-BDCX6LRQ.mjs → chunk-SGEYDV3K.mjs} +3 -3
- package/dist/chunk-SGEYDV3K.mjs.map +1 -0
- package/dist/{chunk-IGK2AP6J.mjs → chunk-SLGOHIBL.mjs} +13 -17
- package/dist/chunk-SLGOHIBL.mjs.map +1 -0
- package/dist/chunk-SWG7CNTZ.mjs +781 -0
- package/dist/chunk-SWG7CNTZ.mjs.map +1 -0
- package/dist/{chunk-7KIKOH5H.cjs → chunk-VV7ELNRW.cjs} +3 -3
- package/dist/chunk-VV7ELNRW.cjs.map +1 -0
- package/dist/chunk-Z43DPNZ6.mjs +70 -0
- package/dist/chunk-Z43DPNZ6.mjs.map +1 -0
- package/dist/client-CV1qzQgx.d.cts +25 -0
- package/dist/client-CnlSHDWE.d.ts +25 -0
- package/dist/codegen.cjs.map +1 -1
- package/dist/codegen.d.cts +40 -7
- package/dist/codegen.d.ts +40 -7
- package/dist/codegen.mjs.map +1 -1
- package/dist/{constants-DJ_KgZpN.d.cts → constants-BAimnqOK.d.cts} +41 -8
- package/dist/{constants-DJ_KgZpN.d.ts → constants-BAimnqOK.d.ts} +41 -8
- package/dist/{context-Ml7k_V14.d.ts → context-Cr93B05o.d.ts} +5 -4
- package/dist/{context-Dt6xh_5t.d.cts → context-DJ3REtdT.d.cts} +5 -4
- package/dist/{errors-COsBh7kd.d.cts → errors-Cqh0wrqt.d.cts} +3 -2
- package/dist/{errors-COsBh7kd.d.ts → errors-Cqh0wrqt.d.ts} +3 -2
- package/dist/host.cjs +5 -4
- package/dist/host.cjs.map +1 -1
- package/dist/host.d.cts +5 -5
- package/dist/host.d.ts +5 -5
- package/dist/host.mjs +4 -3
- package/dist/host.mjs.map +1 -1
- package/dist/index.cjs +9 -656
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -627
- package/dist/index.d.ts +69 -627
- package/dist/index.mjs +5 -652
- package/dist/index.mjs.map +1 -1
- package/dist/manifest.cjs +138 -85
- package/dist/manifest.cjs.map +1 -1
- package/dist/manifest.d.cts +93 -12
- package/dist/manifest.d.ts +93 -12
- package/dist/manifest.mjs +125 -72
- package/dist/manifest.mjs.map +1 -1
- package/dist/server.cjs +15 -66
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/server.mjs +10 -61
- package/dist/server.mjs.map +1 -1
- package/dist/testing/index.cjs +73 -750
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +30 -11
- package/dist/testing/index.d.ts +30 -11
- package/dist/testing/index.mjs +89 -766
- package/dist/testing/index.mjs.map +1 -1
- package/dist/testing/jest.cjs +6 -5
- package/dist/testing/jest.cjs.map +1 -1
- package/dist/testing/jest.mjs +3 -2
- package/dist/testing/jest.mjs.map +1 -1
- package/dist/testing/vitest.cjs +6 -5
- package/dist/testing/vitest.cjs.map +1 -1
- package/dist/testing/vitest.d.cts +10 -0
- package/dist/testing/vitest.d.ts +10 -0
- package/dist/testing/vitest.mjs +3 -2
- package/dist/testing/vitest.mjs.map +1 -1
- package/dist/{types-DrpQSv_2.d.cts → types-BYGcp5pZ.d.ts} +4 -3
- package/dist/{types-DDAGLpov.d.ts → types-I1JOZyI_.d.cts} +4 -3
- package/dist/ui/styles.css +740 -0
- package/dist/ui.cjs +1018 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.cts +231 -0
- package/dist/ui.d.ts +231 -0
- package/dist/ui.mjs +1018 -0
- package/dist/ui.mjs.map +1 -0
- package/dist/vite-preview-bootstrap.cjs +66 -0
- package/dist/vite-preview-bootstrap.cjs.map +1 -0
- package/dist/vite-preview-bootstrap.d.cts +15 -0
- package/dist/vite-preview-bootstrap.d.ts +15 -0
- package/dist/vite-preview-bootstrap.mjs +66 -0
- package/dist/vite-preview-bootstrap.mjs.map +1 -0
- package/dist/vite-preview.cjs +876 -0
- package/dist/vite-preview.cjs.map +1 -0
- package/dist/vite-preview.d.cts +9 -0
- package/dist/vite-preview.d.ts +9 -0
- package/dist/vite-preview.mjs +876 -0
- package/dist/vite-preview.mjs.map +1 -0
- package/dist/vite.cjs +316 -59
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.cts +51 -8
- package/dist/vite.d.ts +51 -8
- package/dist/vite.mjs +308 -53
- package/dist/vite.mjs.map +1 -1
- package/dist/work-events-DB3WR468.d.ts +547 -0
- package/dist/work-events-Dxe7Djdy.d.cts +547 -0
- package/package.json +19 -2
- package/schema/extension-v2.json +432 -121
- package/dist/chunk-2DBSVKAU.cjs.map +0 -1
- package/dist/chunk-3YWVYA42.cjs.map +0 -1
- package/dist/chunk-4C5Z3CIK.mjs.map +0 -1
- package/dist/chunk-5AAPD5WV.cjs.map +0 -1
- package/dist/chunk-7KIKOH5H.cjs.map +0 -1
- package/dist/chunk-BDCX6LRQ.mjs.map +0 -1
- package/dist/chunk-CSTYBKZC.mjs.map +0 -1
- package/dist/chunk-IGK2AP6J.mjs.map +0 -1
- package/dist/chunk-MNDVYPEP.mjs.map +0 -1
- package/dist/chunk-OPPYEA7F.cjs.map +0 -1
- package/dist/chunk-PYJMJF44.cjs.map +0 -1
- package/dist/chunk-RMUWRESK.cjs.map +0 -1
- package/dist/chunk-ZT35X7KL.mjs.map +0 -1
- package/dist/handler-CZIlZ5vu.d.ts +0 -227
- package/dist/handler-kU9Jf36K.d.cts +0 -227
- package/dist/styles.css +0 -367
package/dist/manifest.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ExtensionManifest, c as ExposableKind, U as UiContributionRef, M as ManifestValidation } from './constants-
|
|
2
|
-
export { A as ActionDeclaration,
|
|
1
|
+
import { E as ExtensionManifest, c as ExposableKind, U as UiContributionRef, M as ManifestValidation, d as ManifestIssue } from './constants-BAimnqOK.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, 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, O as SCOPE_KEYS, T as SERVED_SDK_MAJORS, V as SLOTS, W as ScopeDefinition, X as ScopeEntry, S as ScopeKey, Y as SeriesContribution, Z as SettingsContribution, _ as SkillDeclaration, b as SlotId, $ as StorageCollection, a0 as TABLES, a1 as TABLE_KEYS, a2 as TabContribution, a3 as TableDefinition, a4 as ToolDeclaration, a5 as WebhookContribution, a6 as WidgetContribution, a7 as WorkAuth, a8 as WorkContribution, a9 as WorkDirection, aa as findPage, ab as findScope, ac as findTable, ad as slotsForPage } from './constants-BAimnqOK.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare function defineManifest(manifest: ExtensionManifest): ExtensionManifest;
|
|
@@ -52,6 +52,7 @@ 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";
|
|
55
56
|
"crashes:read": "crashes:read";
|
|
56
57
|
"revenue:read": "revenue:read";
|
|
57
58
|
"metrics:write": "metrics:write";
|
|
@@ -180,10 +181,10 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
180
181
|
label: z.ZodString;
|
|
181
182
|
type: z.ZodEnum<{
|
|
182
183
|
text: "text";
|
|
183
|
-
|
|
184
|
+
select: "select";
|
|
184
185
|
textarea: "textarea";
|
|
186
|
+
password: "password";
|
|
185
187
|
file: "file";
|
|
186
|
-
select: "select";
|
|
187
188
|
}>;
|
|
188
189
|
required: z.ZodBoolean;
|
|
189
190
|
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -238,11 +239,11 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
238
239
|
description: z.ZodString;
|
|
239
240
|
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
240
241
|
returns: z.ZodEnum<{
|
|
241
|
-
|
|
242
|
+
value: "value";
|
|
243
|
+
list: "list";
|
|
242
244
|
table: "table";
|
|
245
|
+
comparison: "comparison";
|
|
243
246
|
series: "series";
|
|
244
|
-
list: "list";
|
|
245
|
-
value: "value";
|
|
246
247
|
}>;
|
|
247
248
|
cost: z.ZodEnum<{
|
|
248
249
|
low: "low";
|
|
@@ -272,6 +273,7 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
272
273
|
"analytics:read": "analytics:read";
|
|
273
274
|
"store.metadata:read": "store.metadata:read";
|
|
274
275
|
"reviews:read": "reviews:read";
|
|
276
|
+
"review.threads:read": "review.threads:read";
|
|
275
277
|
"crashes:read": "crashes:read";
|
|
276
278
|
"revenue:read": "revenue:read";
|
|
277
279
|
"metrics:write": "metrics:write";
|
|
@@ -310,9 +312,9 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
310
312
|
title: z.ZodString;
|
|
311
313
|
template: z.ZodString;
|
|
312
314
|
surfaces: z.ZodArray<z.ZodEnum<{
|
|
315
|
+
page: "page";
|
|
313
316
|
chat_suggestion: "chat_suggestion";
|
|
314
317
|
widget: "widget";
|
|
315
|
-
page: "page";
|
|
316
318
|
result_card: "result_card";
|
|
317
319
|
}>>;
|
|
318
320
|
after: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -332,7 +334,84 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
332
334
|
}>>;
|
|
333
335
|
}, z.core.$strict>>>;
|
|
334
336
|
}, z.core.$strict>>;
|
|
335
|
-
work: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
work: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
338
|
+
kind: z.ZodEnum<{
|
|
339
|
+
chat: "chat";
|
|
340
|
+
tracker: "tracker";
|
|
341
|
+
docs: "docs";
|
|
342
|
+
}>;
|
|
343
|
+
creates: z.ZodArray<z.ZodEnum<{
|
|
344
|
+
page: "page";
|
|
345
|
+
issue: "issue";
|
|
346
|
+
message: "message";
|
|
347
|
+
}>>;
|
|
348
|
+
attachments: z.ZodArray<z.ZodEnum<{
|
|
349
|
+
link: "link";
|
|
350
|
+
image: "image";
|
|
351
|
+
}>>;
|
|
352
|
+
identity: z.ZodEnum<{
|
|
353
|
+
user: "user";
|
|
354
|
+
install: "install";
|
|
355
|
+
}>;
|
|
356
|
+
container: z.ZodOptional<z.ZodObject<{
|
|
357
|
+
label: z.ZodString;
|
|
358
|
+
list: z.ZodString;
|
|
359
|
+
}, z.core.$strict>>;
|
|
360
|
+
fields: z.ZodOptional<z.ZodObject<{
|
|
361
|
+
priority: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
362
|
+
labels: z.ZodOptional<z.ZodBoolean>;
|
|
363
|
+
assignee: z.ZodOptional<z.ZodBoolean>;
|
|
364
|
+
required: z.ZodArray<z.ZodString>;
|
|
365
|
+
}, z.core.$strict>>;
|
|
366
|
+
comments: z.ZodUnion<readonly [z.ZodEnum<{
|
|
367
|
+
none: "none";
|
|
368
|
+
"two-way": "two-way";
|
|
369
|
+
}>, z.ZodObject<{
|
|
370
|
+
direction: z.ZodEnum<{
|
|
371
|
+
none: "none";
|
|
372
|
+
to_provider: "to_provider";
|
|
373
|
+
from_provider: "from_provider";
|
|
374
|
+
"two-way": "two-way";
|
|
375
|
+
}>;
|
|
376
|
+
supportsEdits: z.ZodLiteral<false>;
|
|
377
|
+
supportsDeletes: z.ZodLiteral<false>;
|
|
378
|
+
}, z.core.$strict>]>;
|
|
379
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
380
|
+
direction: z.ZodEnum<{
|
|
381
|
+
none: "none";
|
|
382
|
+
to_provider: "to_provider";
|
|
383
|
+
from_provider: "from_provider";
|
|
384
|
+
"two-way": "two-way";
|
|
385
|
+
}>;
|
|
386
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
387
|
+
map: z.ZodOptional<z.ZodObject<{
|
|
388
|
+
open: z.ZodArray<z.ZodString>;
|
|
389
|
+
in_progress: z.ZodArray<z.ZodString>;
|
|
390
|
+
done: z.ZodArray<z.ZodString>;
|
|
391
|
+
}, z.core.$strict>>;
|
|
392
|
+
}, z.core.$strict>>;
|
|
393
|
+
auth: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
394
|
+
method: z.ZodLiteral<"oauth">;
|
|
395
|
+
provider: z.ZodString;
|
|
396
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
397
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
398
|
+
method: z.ZodLiteral<"api_key">;
|
|
399
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
400
|
+
name: z.ZodString;
|
|
401
|
+
label: z.ZodString;
|
|
402
|
+
type: z.ZodEnum<{
|
|
403
|
+
text: "text";
|
|
404
|
+
select: "select";
|
|
405
|
+
textarea: "textarea";
|
|
406
|
+
password: "password";
|
|
407
|
+
file: "file";
|
|
408
|
+
}>;
|
|
409
|
+
required: z.ZodBoolean;
|
|
410
|
+
options: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
411
|
+
help: z.ZodOptional<z.ZodString>;
|
|
412
|
+
}, z.core.$strict>>;
|
|
413
|
+
}, z.core.$strict>], "method">;
|
|
414
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
336
415
|
kind: z.ZodEnum<{
|
|
337
416
|
chat: "chat";
|
|
338
417
|
tracker: "tracker";
|
|
@@ -354,8 +433,8 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
354
433
|
required: z.ZodArray<z.ZodString>;
|
|
355
434
|
}, z.core.$strict>;
|
|
356
435
|
attachments: z.ZodArray<z.ZodEnum<{
|
|
357
|
-
image: "image";
|
|
358
436
|
link: "link";
|
|
437
|
+
image: "image";
|
|
359
438
|
}>>;
|
|
360
439
|
comments: z.ZodEnum<{
|
|
361
440
|
none: "none";
|
|
@@ -373,7 +452,7 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
373
452
|
user: "user";
|
|
374
453
|
install: "install";
|
|
375
454
|
}>;
|
|
376
|
-
}, z.core.$strict>>;
|
|
455
|
+
}, z.core.$strict>]>>;
|
|
377
456
|
}, z.core.$strict>;
|
|
378
457
|
server: z.ZodOptional<z.ZodObject<{
|
|
379
458
|
baseUrl: z.ZodURL;
|
|
@@ -428,5 +507,7 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
428
507
|
}, z.core.$strict>;
|
|
429
508
|
declare function manifestJsonSchema(): Record<string, unknown>;
|
|
430
509
|
declare function validateManifest(value: unknown): ManifestValidation;
|
|
510
|
+
/** Migration warnings are separate from validation during SDK v2 compatibility. */
|
|
511
|
+
declare function workManifestWarnings(manifest: ExtensionManifest): ManifestIssue[];
|
|
431
512
|
|
|
432
|
-
export { ExposableKind, ExtensionManifest, ManifestValidation, UiContributionRef, defineManifest, exposeName, manifestJsonSchema, manifestSchema, remoteName, sdkMajors, uiContributions, validateManifest };
|
|
513
|
+
export { ExposableKind, ExtensionManifest, ManifestIssue, ManifestValidation, UiContributionRef, defineManifest, exposeName, manifestJsonSchema, manifestSchema, remoteName, sdkMajors, uiContributions, validateManifest, workManifestWarnings };
|
package/dist/manifest.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineManifest,
|
|
3
|
+
exposeName,
|
|
4
|
+
remoteName,
|
|
5
|
+
uiContributions
|
|
6
|
+
} from "./chunk-Z43DPNZ6.mjs";
|
|
1
7
|
import {
|
|
2
8
|
CARD_KEYS,
|
|
3
9
|
CATEGORIES,
|
|
@@ -17,70 +23,8 @@ import {
|
|
|
17
23
|
findScope,
|
|
18
24
|
findTable,
|
|
19
25
|
slotsForPage
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
|
|
22
|
-
// src/manifest/define.ts
|
|
23
|
-
var EXPOSE_FOLDER = {
|
|
24
|
-
page: "pages",
|
|
25
|
-
tab: "tabs",
|
|
26
|
-
widget: "widgets",
|
|
27
|
-
rowAction: "rowActions"
|
|
28
|
-
};
|
|
29
|
-
function defineManifest(manifest) {
|
|
30
|
-
return manifest;
|
|
31
|
-
}
|
|
32
|
-
function exposeName(kind, id) {
|
|
33
|
-
if (kind === "settings") return "./settings";
|
|
34
|
-
return `./${EXPOSE_FOLDER[kind]}/${id ?? ""}`;
|
|
35
|
-
}
|
|
36
|
-
function remoteName(extensionId) {
|
|
37
|
-
return `ext_${extensionId.replace(/-/g, "_")}`;
|
|
38
|
-
}
|
|
39
|
-
function uiContributions(manifest) {
|
|
40
|
-
const contributes = manifest.contributes;
|
|
41
|
-
const refs = [];
|
|
42
|
-
for (const page of contributes.pages ?? []) {
|
|
43
|
-
refs.push({
|
|
44
|
-
kind: "page",
|
|
45
|
-
id: page.id,
|
|
46
|
-
entry: page.entry,
|
|
47
|
-
expose: exposeName("page", page.id)
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
for (const tab of contributes.tabs ?? []) {
|
|
51
|
-
refs.push({
|
|
52
|
-
kind: "tab",
|
|
53
|
-
id: tab.id,
|
|
54
|
-
entry: tab.entry,
|
|
55
|
-
expose: exposeName("tab", tab.id)
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
for (const widget of contributes.widgets ?? []) {
|
|
59
|
-
refs.push({
|
|
60
|
-
kind: "widget",
|
|
61
|
-
id: widget.id,
|
|
62
|
-
entry: widget.entry,
|
|
63
|
-
expose: exposeName("widget", widget.id)
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
for (const rowAction of contributes.rowActions ?? []) {
|
|
67
|
-
refs.push({
|
|
68
|
-
kind: "rowAction",
|
|
69
|
-
id: rowAction.id,
|
|
70
|
-
entry: rowAction.entry,
|
|
71
|
-
expose: exposeName("rowAction", rowAction.id)
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (contributes.settings) {
|
|
75
|
-
refs.push({
|
|
76
|
-
kind: "settings",
|
|
77
|
-
id: "settings",
|
|
78
|
-
entry: contributes.settings.entry,
|
|
79
|
-
expose: exposeName("settings")
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return refs;
|
|
83
|
-
}
|
|
26
|
+
} from "./chunk-SGCYEEXD.mjs";
|
|
27
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
84
28
|
|
|
85
29
|
// src/manifest/schema.ts
|
|
86
30
|
import { z } from "zod";
|
|
@@ -398,7 +342,7 @@ var aiContribution = z.object({
|
|
|
398
342
|
).optional()
|
|
399
343
|
}).strict();
|
|
400
344
|
var statusNames = (stage) => z.array(z.string()).describe(`Your own status names that mean ${stage}.`);
|
|
401
|
-
var
|
|
345
|
+
var legacyWorkContribution = z.object({
|
|
402
346
|
kind: z.enum(["tracker", "docs", "chat"]).describe("What kind of destination this is."),
|
|
403
347
|
container: z.object({
|
|
404
348
|
label: z.string().min(1).max(60).describe(
|
|
@@ -433,6 +377,55 @@ var workContribution = z.object({
|
|
|
433
377
|
"Whether items are created as the owner who asked (`user`) or as the install itself."
|
|
434
378
|
)
|
|
435
379
|
}).strict();
|
|
380
|
+
var workDirection = z.enum([
|
|
381
|
+
"none",
|
|
382
|
+
"to_provider",
|
|
383
|
+
"from_provider",
|
|
384
|
+
"two-way"
|
|
385
|
+
]);
|
|
386
|
+
var workAuth = z.discriminatedUnion("method", [
|
|
387
|
+
z.object({
|
|
388
|
+
method: z.literal("oauth"),
|
|
389
|
+
provider: z.string().min(1).describe("The OAuth provider identifier."),
|
|
390
|
+
scopes: z.array(z.string()).describe("The scopes requested from the provider.")
|
|
391
|
+
}).strict(),
|
|
392
|
+
z.object({
|
|
393
|
+
method: z.literal("api_key"),
|
|
394
|
+
fields: z.array(credentialField).max(20)
|
|
395
|
+
}).strict()
|
|
396
|
+
]);
|
|
397
|
+
var currentWorkContribution = legacyWorkContribution.extend({
|
|
398
|
+
container: legacyWorkContribution.shape.container.describe(
|
|
399
|
+
"Deprecated. Resolve containers dynamically with describe_container."
|
|
400
|
+
).optional(),
|
|
401
|
+
fields: legacyWorkContribution.shape.fields.describe("Deprecated. Resolve fields dynamically with describe_container.").optional(),
|
|
402
|
+
comments: z.union([
|
|
403
|
+
z.enum(["two-way", "none"]).describe("Deprecated. Declare a comments capability object."),
|
|
404
|
+
z.object({
|
|
405
|
+
direction: workDirection,
|
|
406
|
+
supportsEdits: z.literal(false),
|
|
407
|
+
supportsDeletes: z.literal(false)
|
|
408
|
+
}).strict()
|
|
409
|
+
]),
|
|
410
|
+
status: z.object({
|
|
411
|
+
direction: workDirection,
|
|
412
|
+
webhook: z.string().regex(DOMAIN_EVENT).optional(),
|
|
413
|
+
map: z.object({
|
|
414
|
+
open: statusNames("not started"),
|
|
415
|
+
in_progress: statusNames("under way"),
|
|
416
|
+
done: statusNames("finished")
|
|
417
|
+
}).strict().describe(
|
|
418
|
+
"Deprecated. Resolve statuses dynamically with describe_container."
|
|
419
|
+
).optional()
|
|
420
|
+
}).strict().optional(),
|
|
421
|
+
auth: workAuth.describe("How owners authenticate the work destination.")
|
|
422
|
+
});
|
|
423
|
+
var workContribution = z.union([
|
|
424
|
+
currentWorkContribution,
|
|
425
|
+
legacyWorkContribution.describe(
|
|
426
|
+
"Deprecated SDK v2 work declaration. Migrate to work capabilities and auth."
|
|
427
|
+
)
|
|
428
|
+
]);
|
|
436
429
|
var listing = z.object({
|
|
437
430
|
longDescription: z.string().min(1).max(5e3).describe("The body of your listing page, in markdown.").optional(),
|
|
438
431
|
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(
|
|
@@ -524,7 +517,7 @@ var manifestObject = z.object({
|
|
|
524
517
|
"What this extension offers the assistant: tools, mentions, actions, knowledge, skills, prompts and context providers."
|
|
525
518
|
).optional(),
|
|
526
519
|
work: workContribution.describe(
|
|
527
|
-
"The work destination this extension creates issues, pages or messages in. Needs
|
|
520
|
+
"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`."
|
|
528
521
|
).optional()
|
|
529
522
|
}).strict().describe(
|
|
530
523
|
"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."
|
|
@@ -745,16 +738,36 @@ var manifestSchema = manifestObject.superRefine((manifest, ctx) => {
|
|
|
745
738
|
}
|
|
746
739
|
}
|
|
747
740
|
if (contributes.work) {
|
|
741
|
+
const work = contributes.work;
|
|
742
|
+
const legacy = isLegacyWork(work);
|
|
743
|
+
if (!legacy || !granted.has("reviews:read")) {
|
|
744
|
+
requireScope(
|
|
745
|
+
"review.threads:read",
|
|
746
|
+
["scopes"],
|
|
747
|
+
"the work destination reads Review threads."
|
|
748
|
+
);
|
|
749
|
+
}
|
|
748
750
|
requireScope(
|
|
749
751
|
"work:create",
|
|
750
752
|
["scopes"],
|
|
751
753
|
"the work destination creates items."
|
|
752
754
|
);
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
755
|
+
const comments = typeof work.comments === "string" ? work.comments : work.comments.direction;
|
|
756
|
+
const status = work.status ? "direction" in work.status ? work.status.direction : "from_provider" : "none";
|
|
757
|
+
if (comments !== "none" || status !== "none") {
|
|
758
|
+
requireScope(
|
|
759
|
+
"work:sync",
|
|
760
|
+
["scopes"],
|
|
761
|
+
"the work destination syncs comments or status."
|
|
762
|
+
);
|
|
763
|
+
}
|
|
764
|
+
if (work.identity === "user") {
|
|
765
|
+
ctx.addIssue({
|
|
766
|
+
code: "custom",
|
|
767
|
+
path: ["contributes", "work", "identity"],
|
|
768
|
+
message: 'Per-user work identity is not supported. Set identity to "install".'
|
|
769
|
+
});
|
|
770
|
+
}
|
|
758
771
|
}
|
|
759
772
|
const needsServer = contributes.connector !== void 0 || (contributes.webhooks?.length ?? 0) > 0 || ai !== void 0 || contributes.work !== void 0 || manifest.server?.procedures !== void 0;
|
|
760
773
|
if (needsServer && !manifest.server?.baseUrl) {
|
|
@@ -841,6 +854,45 @@ function validateManifest(value) {
|
|
|
841
854
|
}));
|
|
842
855
|
return { ok: false, issues };
|
|
843
856
|
}
|
|
857
|
+
function isLegacyWork(work) {
|
|
858
|
+
return !("auth" in work);
|
|
859
|
+
}
|
|
860
|
+
function workManifestWarnings(manifest) {
|
|
861
|
+
const work = manifest.contributes.work;
|
|
862
|
+
if (!work) return [];
|
|
863
|
+
const warnings = [];
|
|
864
|
+
if (work.container) {
|
|
865
|
+
warnings.push({
|
|
866
|
+
path: "contributes.work.container",
|
|
867
|
+
message: "Static work containers are deprecated. Resolve containers dynamically with describe_container."
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
if (work.fields) {
|
|
871
|
+
warnings.push({
|
|
872
|
+
path: "contributes.work.fields",
|
|
873
|
+
message: "Static work fields are deprecated. Resolve fields dynamically with describe_container."
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
if (typeof work.comments === "string") {
|
|
877
|
+
warnings.push({
|
|
878
|
+
path: "contributes.work.comments",
|
|
879
|
+
message: "String work comments are deprecated. Declare direction, supportsEdits: false and supportsDeletes: false."
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
if (work.status?.map) {
|
|
883
|
+
warnings.push({
|
|
884
|
+
path: "contributes.work.status.map",
|
|
885
|
+
message: "Static work status maps are deprecated. Resolve statuses dynamically with describe_container."
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
if (isLegacyWork(work) && manifest.scopes.some((scope) => scope.key === "reviews:read") && !manifest.scopes.some((scope) => scope.key === "review.threads:read")) {
|
|
889
|
+
warnings.push({
|
|
890
|
+
path: "scopes",
|
|
891
|
+
message: "Using reviews:read for work is deprecated. Add review.threads:read for Review threads; reviews:read grants store-review access."
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
return warnings;
|
|
895
|
+
}
|
|
844
896
|
export {
|
|
845
897
|
CARD_KEYS,
|
|
846
898
|
CATEGORIES,
|
|
@@ -867,6 +919,7 @@ export {
|
|
|
867
919
|
sdkMajors,
|
|
868
920
|
slotsForPage,
|
|
869
921
|
uiContributions,
|
|
870
|
-
validateManifest
|
|
922
|
+
validateManifest,
|
|
923
|
+
workManifestWarnings
|
|
871
924
|
};
|
|
872
925
|
//# sourceMappingURL=manifest.mjs.map
|