@jini-ai/agent-plugins 0.6.17 → 0.6.19
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/CHANGELOG.md +29 -1
- package/NOTICE +14 -0
- package/README.md +35 -14
- package/charts-echarts/plugin.json +39 -0
- package/charts-echarts/skills/charts-echarts/SKILL.md +110 -0
- package/charts-recharts/plugin.json +32 -0
- package/charts-recharts/skills/charts-recharts/SKILL.md +108 -0
- package/cloudflare/NOTES.md +16 -0
- package/cloudflare/form-destinations/cloudflare-d1.mjs +9 -0
- package/cloudflare/lib/api.mjs +96 -0
- package/cloudflare/lib/assets.mjs +65 -0
- package/cloudflare/lib/dns.mjs +32 -0
- package/cloudflare/lib/domain-inventory.mjs +61 -0
- package/cloudflare/lib/domain-status.mjs +48 -0
- package/cloudflare/lib/domains.mjs +95 -0
- package/cloudflare/lib/forms.mjs +254 -0
- package/cloudflare/lib/pages-upload.mjs +51 -0
- package/cloudflare/lib/target.mjs +165 -0
- package/cloudflare/lib/workers-upload.mjs +48 -0
- package/cloudflare/lib/zones.mjs +25 -0
- package/cloudflare/mcp.json +4 -0
- package/cloudflare/plugin.json +96 -0
- package/cloudflare/skills/cloudflare/SKILL.md +57 -0
- package/cloudflare/skills/cloudflare/references/domains.md +31 -0
- package/cloudflare/skills/cloudflare/references/pages.md +18 -0
- package/cloudflare/skills/cloudflare/references/permissions.md +29 -0
- package/cloudflare/skills/cloudflare/references/troubleshooting.md +20 -0
- package/cloudflare/skills/cloudflare/references/workers.md +42 -0
- package/cloudflare/targets/cloudflare-pages.mjs +12 -0
- package/cloudflare/targets/cloudflare-workers.mjs +17 -0
- package/cloudflare/tovu-consent.json +6 -0
- package/cloudflare/tovu-deploy-targets.json +630 -0
- package/cloudflare/tovu-form-destinations.json +12 -0
- package/cloudflare/worker/forms-receiver.mjs +249 -0
- package/composio/mcp.json +10 -0
- package/composio/plugin.json +68 -0
- package/composio/skills/composio/SKILL.md +85 -0
- package/dist/core/identity-namespace.d.ts +12 -0
- package/dist/core/identity-namespace.js +20 -0
- package/dist/folder-zip-node.js +29 -7
- package/dist/lifecycle/bundled-digests.js +4 -3
- package/dist/lifecycle/install.d.ts +7 -0
- package/dist/lifecycle/install.js +45 -3
- package/dist/lifecycle/manifest.d.ts +2 -2
- package/dist/lifecycle/manifest.js +5 -3
- package/dist/lifecycle/node.js +2 -0
- package/dist/lifecycle/persistent-state.js +1 -1
- package/dist/lifecycle/ports.d.ts +8 -0
- package/dist/lifecycle/seed-bundled.js +4 -1
- package/dist/manifest.d.ts +1 -1
- package/dist/manifest.js +3 -2
- package/fly/deploy-configs/fly.mjs +115 -0
- package/fly/deploy-ops/fly.mjs +102 -0
- package/fly/mcp.json +4 -0
- package/fly/plugin.json +81 -0
- package/fly/scripts/render-deploy-workflow.mjs +150 -0
- package/fly/skills/fly/SKILL.md +43 -0
- package/fly/skills/fly/references/fly-deploy.template.yml +117 -0
- package/fly/skills/fly/references/fly.template.toml +81 -0
- package/fly/tovu-credential-schemes.json +11 -0
- package/fly/tovu-deploy-configs.json +21 -0
- package/fly/tovu-deploy-ops.json +14 -0
- package/github/deploy-ops/github-actions.mjs +164 -0
- package/github/deployments/github.mjs +415 -0
- package/github/mcp.json +4 -0
- package/github/plugin.json +105 -0
- package/github/skills/github/SKILL.md +249 -0
- package/github/skills/github/references/actions.md +224 -0
- package/github/skills/github/references/auth-and-tokens.md +140 -0
- package/github/skills/github/references/repo-files.md +135 -0
- package/github/skills/github/references/site-backup.md +159 -0
- package/github/skills/github/references/source-control.md +123 -0
- package/github/source-control/backup-push.mjs +242 -0
- package/github/source-control/commit-site.mjs +459 -0
- package/github/source-control/github.mjs +93 -0
- package/github/source-control/write-files.mjs +468 -0
- package/github/tovu-deploy-ops.json +13 -0
- package/github/tovu-source-control.json +117 -0
- package/github-pages/NOTES.md +19 -0
- package/github-pages/mcp.json +4 -0
- package/github-pages/plugin.json +48 -0
- package/github-pages/skills/github-pages/SKILL.md +44 -0
- package/github-pages/targets/github-pages.mjs +543 -0
- package/github-pages/tovu-deploy-targets.json +327 -0
- package/google-login/exports/google-g.svg +1 -0
- package/google-login/exports/sign-in-button.css +68 -0
- package/google-login/exports/sign-in-button.html +4 -0
- package/google-login/mcp.json +4 -0
- package/google-login/plugin.json +59 -0
- package/google-login/skills/google-login/SKILL.md +96 -0
- package/google-login/tovu-login-providers.json +21 -0
- package/google-workspace/README.md +132 -0
- package/google-workspace/form-destinations/README.md +87 -0
- package/google-workspace/form-destinations/dedupe.mjs +43 -0
- package/google-workspace/form-destinations/delivery-result.mjs +69 -0
- package/google-workspace/form-destinations/mapping.mjs +152 -0
- package/google-workspace/form-destinations/sheets.mjs +202 -0
- package/google-workspace/lib/auth.mjs +81 -0
- package/google-workspace/lib/drive-files.mjs +54 -0
- package/google-workspace/lib/form-destination-settings.mjs +72 -0
- package/google-workspace/lib/http.mjs +168 -0
- package/google-workspace/lib/picker-flow.mjs +171 -0
- package/google-workspace/lib/picker-selection.mjs +107 -0
- package/google-workspace/lib/product-state.mjs +93 -0
- package/google-workspace/lib/request-policy.mjs +163 -0
- package/google-workspace/lib/sheets-a1.mjs +79 -0
- package/google-workspace/lib/sheets-admin-csv.mjs +82 -0
- package/google-workspace/lib/sheets-admin-request-kinds.mjs +183 -0
- package/google-workspace/lib/sheets-client.mjs +286 -0
- package/google-workspace/lib/surface-actions.mjs +107 -0
- package/google-workspace/mcp.json +4 -0
- package/google-workspace/plugin.json +77 -0
- package/google-workspace/products.json +12 -0
- package/google-workspace/skills/google-workspace/SKILL.md +82 -0
- package/google-workspace/skills/google-workspace/references/connection.md +102 -0
- package/google-workspace/skills/google-workspace/references/form-delivery.md +50 -0
- package/google-workspace/skills/google-workspace/references/sheets.md +149 -0
- package/google-workspace/skills/google-workspace/references/troubleshooting.md +31 -0
- package/google-workspace/tools/account-info.mjs +18 -0
- package/google-workspace/tools/sheets/README.md +54 -0
- package/google-workspace/tools/sheets/copy-tab.mjs +23 -0
- package/google-workspace/tools/sheets/copy.mjs +23 -0
- package/google-workspace/tools/sheets/create.mjs +35 -0
- package/google-workspace/tools/sheets/find-replace.mjs +38 -0
- package/google-workspace/tools/sheets/find.mjs +52 -0
- package/google-workspace/tools/sheets/get-by-data-filter.mjs +23 -0
- package/google-workspace/tools/sheets/get.mjs +22 -0
- package/google-workspace/tools/sheets/values-append.mjs +27 -0
- package/google-workspace/tools/sheets/values-batch-clear.mjs +20 -0
- package/google-workspace/tools/sheets/values-batch-get.mjs +20 -0
- package/google-workspace/tools/sheets/values-batch-update.mjs +29 -0
- package/google-workspace/tools/sheets/values-by-data-filter.mjs +62 -0
- package/google-workspace/tools/sheets/values-clear.mjs +20 -0
- package/google-workspace/tools/sheets/values-get.mjs +21 -0
- package/google-workspace/tools/sheets/values-update.mjs +26 -0
- package/google-workspace/tools/sheets-admin/README.md +45 -0
- package/google-workspace/tools/sheets-admin/basic-filter.mjs +32 -0
- package/google-workspace/tools/sheets-admin/batch-update.mjs +25 -0
- package/google-workspace/tools/sheets-admin/developer-metadata.mjs +28 -0
- package/google-workspace/tools/sheets-admin/export-csv.mjs +67 -0
- package/google-workspace/tools/sheets-admin/filter-views.mjs +38 -0
- package/google-workspace/tools/sheets-admin/format.mjs +70 -0
- package/google-workspace/tools/sheets-admin/named-ranges.mjs +42 -0
- package/google-workspace/tools/sheets-admin/open-existing.mjs +34 -0
- package/google-workspace/tools/sheets-admin/protected-ranges-get.mjs +18 -0
- package/google-workspace/tools/sheets-admin/sort.mjs +18 -0
- package/google-workspace/tools/sheets-admin/tab-modify.mjs +36 -0
- package/google-workspace/tovu-admin-surfaces.json +63 -0
- package/google-workspace/tovu-agent-tools.json +1178 -0
- package/google-workspace/tovu-connections.json +35 -0
- package/google-workspace/tovu-form-destinations.json +10 -0
- package/google-workspace/ui/README.md +73 -0
- package/google-workspace/ui/connection-panel.handler.mjs +167 -0
- package/google-workspace/ui/connection-panel.html +17 -0
- package/google-workspace/ui/connection-panel.mjs +189 -0
- package/google-workspace/ui/connection-view.mjs +120 -0
- package/google-workspace/ui/destination-panel.handler.mjs +106 -0
- package/google-workspace/ui/destination-panel.html +17 -0
- package/google-workspace/ui/destination-panel.mjs +150 -0
- package/google-workspace/ui/dom.mjs +140 -0
- package/google-workspace/ui/panel.css +170 -0
- package/google-workspace/ui/picker-flow.mjs +87 -0
- package/google-workspace/ui/picker-view.mjs +44 -0
- package/google-workspace/ui/picker.handler.mjs +56 -0
- package/google-workspace/ui/picker.html +17 -0
- package/google-workspace/ui/picker.mjs +88 -0
- package/google-workspace/ui/surface-client.mjs +227 -0
- package/higgsfield-media/mcp.json +9 -0
- package/higgsfield-media/plugin.json +109 -0
- package/higgsfield-media/skills/higgsfield-media/SKILL.md +325 -0
- package/higgsfield-media/skills/higgsfield-media/references/failure-modes.md +116 -0
- package/higgsfield-media/skills/higgsfield-media/references/models-and-plan-gates.md +142 -0
- package/jev/mcp.json +4 -0
- package/jev/plugin.json +44 -0
- package/jev/skills/jev/SKILL.md +308 -0
- package/jev/skills/jev/references/cookbooks.md +197 -0
- package/jev/skills/jev/references/jaggedness.md +135 -0
- package/jev/skills/jev/references/javascript-sdk.md +146 -0
- package/jev/skills/jev/references/patterns.md +123 -0
- package/jev/skills/jev/references/primitives-reference.md +187 -0
- package/langfuse/plugin.json +22 -0
- package/meilisearch/mcp.json +4 -0
- package/meilisearch/plugin.json +54 -0
- package/meilisearch/providers/meilisearch.mjs +651 -0
- package/meilisearch/skills/meilisearch/SKILL.md +43 -0
- package/meilisearch/tovu-search-providers.json +10 -0
- package/netlify/NOTES.md +13 -0
- package/netlify/mcp.json +4 -0
- package/netlify/plugin.json +47 -0
- package/netlify/skills/netlify/SKILL.md +39 -0
- package/netlify/targets/netlify.mjs +384 -0
- package/netlify/tovu-consent.json +6 -0
- package/netlify/tovu-deploy-targets.json +163 -0
- package/opentelemetry/mcp.json +4 -0
- package/opentelemetry/plugin.json +52 -0
- package/opentelemetry/skills/opentelemetry/SKILL.md +39 -0
- package/package.json +161 -6
- package/posthog/mcp.json +4 -0
- package/posthog/plugin.json +46 -0
- package/posthog/skills/posthog/SKILL.md +36 -0
- package/railway/deploy-configs/railway.mjs +135 -0
- package/railway/deploy-ops/railway.mjs +167 -0
- package/railway/mcp.json +4 -0
- package/railway/plugin.json +45 -0
- package/railway/skills/railway/SKILL.md +66 -0
- package/railway/tovu-deploy-configs.json +16 -0
- package/railway/tovu-deploy-ops.json +11 -0
- package/render/deploy-configs/render.mjs +141 -0
- package/render/deploy-ops/render.mjs +152 -0
- package/render/mcp.json +4 -0
- package/render/plugin.json +47 -0
- package/render/skills/render/SKILL.md +63 -0
- package/render/tovu-deploy-configs.json +16 -0
- package/render/tovu-deploy-ops.json +11 -0
- package/resend/NOTES.md +52 -0
- package/resend/adapters/resend.mjs +161 -0
- package/resend/lib/domains.mjs +137 -0
- package/resend/lib/errors.mjs +25 -0
- package/resend/lib/feedback.mjs +118 -0
- package/resend/mcp.json +13 -0
- package/resend/plugin.json +192 -0
- package/resend/skills/resend/SKILL.md +107 -0
- package/resend/tovu-mail-adapters.json +22 -0
- package/s3-compatible/NOTES.md +11 -0
- package/s3-compatible/mcp.json +4 -0
- package/s3-compatible/object-stores/s3-compatible.mjs +287 -0
- package/s3-compatible/plugin.json +56 -0
- package/s3-compatible/skills/s3-compatible/SKILL.md +39 -0
- package/s3-compatible/targets/s3-compatible.mjs +1054 -0
- package/s3-compatible/tovu-deploy-targets.json +432 -0
- package/s3-compatible/tovu-object-stores.json +29 -0
- package/sentry/mcp.json +4 -0
- package/sentry/plugin.json +49 -0
- package/sentry/skills/sentry/SKILL.md +34 -0
- package/shopify/mcp.json +4 -0
- package/shopify/plugin.json +22 -0
- package/shopify/skills/shopify/SKILL.md +103 -0
- package/shopify/skills/shopify/references/catalog-sync.md +74 -0
- package/shopify/skills/shopify/references/domains.md +26 -0
- package/shopify/skills/shopify/references/live-storefront.md +34 -0
- package/shopify/skills/shopify/references/storefront-snippets.md +21 -0
- package/site-compliance/mcp.json +4 -0
- package/site-compliance/plugin.json +34 -0
- package/site-compliance/skills/site-compliance/SKILL.md +220 -0
- package/site-compliance/skills/site-compliance/references/ccpa-cpra.md +115 -0
- package/site-compliance/skills/site-compliance/references/gdpr-eu-uk.md +143 -0
- package/site-compliance/skills/site-compliance/references/wcag-2-2.md +129 -0
- package/site-import/mcp.json +4 -0
- package/site-import/plugin.json +41 -0
- package/site-import/skills/site-import/SKILL.md +232 -0
- package/site-import/skills/site-import/references/content-mapping.md +166 -0
- package/site-import/skills/site-import/references/discovery-and-classification.md +117 -0
- package/site-import/skills/site-import/references/theme-extraction.md +34 -0
- package/slide-design/com.anthropic.claude-code/hooks/hooks.json +4 -0
- package/slide-design/mcp.json +4 -0
- package/slide-design/plugin.json +26 -0
- package/slide-design/skills/slide-design/SKILL.md +103 -0
- package/slide-design/skills/slide-design/references/charts-and-exhibits.md +100 -0
- package/slide-design/skills/slide-design/references/html-deck.md +175 -0
- package/slide-design/skills/slide-design/references/layout-and-style.md +131 -0
- package/slide-design/skills/slide-design/references/review.md +93 -0
- package/slide-design/skills/slide-design/references/storyline.md +118 -0
- package/stripe/plugin.json +22 -0
- package/supabase/mcp.json +26 -0
- package/supabase/plugin.json +78 -0
- package/supabase/skills/supabase/SKILL.md +169 -0
- package/supabase/skills/supabase/references/failure-modes.md +101 -0
- package/ui-ux-design/CHANGELOG.md +28 -0
- package/ui-ux-design/LICENSE +201 -0
- package/ui-ux-design/NOTICE +14 -0
- package/ui-ux-design/README.md +62 -0
- package/ui-ux-design/com.anthropic.claude-code/hooks/hooks.json +4 -0
- package/ui-ux-design/mcp.json +4 -0
- package/ui-ux-design/plugin.json +26 -0
- package/ui-ux-design/skills/frontend-accessibility/SKILL.md +60 -0
- package/ui-ux-design/skills/gstack-design/SKILL.md +53 -0
- package/ui-ux-design/skills/gstack-design/references/consultation.md +30 -0
- package/ui-ux-design/skills/gstack-design/references/html.md +29 -0
- package/ui-ux-design/skills/gstack-design/references/review.md +28 -0
- package/ui-ux-design/skills/gstack-design/references/shotgun.md +33 -0
- package/ui-ux-design/skills/gstack-design/references/upstream-notes.md +23 -0
- package/ui-ux-design/skills/interface-design/ORIGINAL.md +16 -0
- package/ui-ux-design/skills/interface-design/SKILL.md +41 -0
- package/ui-ux-design/skills/interface-design/references/commands/audit.md +40 -0
- package/ui-ux-design/skills/interface-design/references/commands/critique.md +21 -0
- package/ui-ux-design/skills/interface-design/references/commands/extract.md +34 -0
- package/ui-ux-design/skills/interface-design/references/commands/init.md +31 -0
- package/ui-ux-design/skills/interface-design/references/commands/status.md +22 -0
- package/ui-ux-design/skills/interface-design/references/examples/system-precision.md +29 -0
- package/ui-ux-design/skills/interface-design/references/examples/system-warmth.md +29 -0
- package/ui-ux-design/skills/interface-design/references/system-template.md +57 -0
- package/ui-ux-design/skills/shadcn-ui/README.md +244 -0
- package/ui-ux-design/skills/shadcn-ui/SKILL.md +333 -0
- package/ui-ux-design/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/ui-ux-design/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/ui-ux-design/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/ui-ux-design/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/ui-ux-design/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/ui-ux-design/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/ui-ux-design/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/ui-ux-design/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/ui-ux-design/skills/ui-ux-design/SKILL.md +171 -0
- package/ui-ux-design/skills/ui-ux-design/references/brand-and-voice.md +78 -0
- package/ui-ux-design/skills/ui-ux-design/references/chrome-mobile-test-matrix.md +137 -0
- package/ui-ux-design/skills/ui-ux-design/references/components-and-states.md +112 -0
- package/ui-ux-design/skills/ui-ux-design/references/delight-and-motion.md +54 -0
- package/ui-ux-design/skills/ui-ux-design/references/foundations.md +145 -0
- package/ui-ux-design/skills/ui-ux-design/references/inclusive-ai-imagery.md +57 -0
- package/ui-ux-design/skills/ui-ux-design/references/kole-jain-uiux-concepts.md +104 -0
- package/ui-ux-design/skills/ui-ux-design/references/kuinetic-reference.md +184 -0
- package/ui-ux-design/skills/ui-ux-design/references/openai-frontend-skill.md +139 -0
- package/ui-ux-design/skills/ui-ux-design/references/premium-ui.md +55 -0
- package/ui-ux-design/skills/ui-ux-design/references/research-and-validation.md +88 -0
- package/ui-ux-design/skills/ui-ux-design/references/sam-crawford-premium-websites.md +103 -0
- package/ui-ux-design/skills/ui-ux-design/references/self-made-web-designer-core-skills.md +119 -0
- package/ui-ux-design/skills/ui-ux-design/references/ui-animation.md +173 -0
- package/ui-ux-design/skills/ui-ux-design/references/ui-loop.md +234 -0
- package/ui-ux-design/skills/ui-ux-design/references/visual-storytelling.md +54 -0
- package/ui-ux-design/skills/vercel-web-design-guidelines/SKILL.md +39 -0
- package/ui-ux-design/skills/web-compliance/SKILL.md +134 -0
- package/ui-ux-design/skills/web-compliance/references/audit-evidence.md +59 -0
- package/vercel/NOTES.md +23 -0
- package/vercel/mcp.json +4 -0
- package/vercel/object-stores/vercel-blob.mjs +147 -0
- package/vercel/plugin.json +47 -0
- package/vercel/skills/vercel/SKILL.md +48 -0
- package/vercel/targets/vercel.mjs +586 -0
- package/vercel/tovu-consent.json +6 -0
- package/vercel/tovu-deploy-targets.json +219 -0
- package/vercel/tovu-object-stores.json +10 -0
- package/wordpress/NOTES.md +33 -0
- package/wordpress/plugin.json +30 -0
- package/wordpress/skills/wordpress/SKILL.md +43 -0
- package/wordpress/skills/wordpress/references/free-site-redirect.md +46 -0
- package/wordpress/skills/wordpress/references/subdomain.md +66 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Vercel Blob share-link store: the Vercel plugin's `ObjectStoreProvider` (provider id `vercel`,
|
|
3
|
+
* so the share path resolves the saved `vercel` connection), contributing only `createArtifactStore`.
|
|
4
|
+
* A site owner whose only host is Vercel gets a share download link without setting up S3.
|
|
5
|
+
*
|
|
6
|
+
* Wire format mirrors `@vercel/blob`'s `put()` and `del()` (an installed plugin has no npm
|
|
7
|
+
* dependencies): `PUT {BLOB_API}/?pathname=<key>` and `POST {BLOB_API}/delete { urls }`, both with the
|
|
8
|
+
* Blob store's read-write token. Every request goes through `kit.fetch` with the redirect guard, so
|
|
9
|
+
* the token is never forwarded to another host.
|
|
10
|
+
*
|
|
11
|
+
* Unguessable without a random suffix: the key already carries the share's 16-letter (~91-bit) token
|
|
12
|
+
* (`_share/<token>/<name>.tovu.zip`) and anonymous readers cannot list a Blob store. A suffix would
|
|
13
|
+
* also make the URL underivable from the key, and `delete` (revoke) receives only the key.
|
|
14
|
+
*
|
|
15
|
+
* Plain JS by owner decision (2026-09-29), like `targets/vercel.mjs`.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const BLOB_API = "https://vercel.com/api/blob";
|
|
19
|
+
/** Matches `@vercel/blob` 2.8.2 (`BLOB_API_VERSION = 13`, sent on every API call). */
|
|
20
|
+
const BLOB_API_VERSION = "13";
|
|
21
|
+
/** The smallest edge cache Blob allows, so a revoked link stops serving within about a minute. */
|
|
22
|
+
const BLOB_CACHE_MAX_AGE_SECONDS = "60";
|
|
23
|
+
/** The token is 16 ASCII letters, the shape core's `SHARE_TOKEN` mints (a plugin cannot import core). */
|
|
24
|
+
const SHARE_KEY = /^_share\/[A-Za-z]{16}\/[a-z0-9][a-z0-9-]{0,79}\.tovu\.zip$/;
|
|
25
|
+
/** `vercel_blob_rw_<storeId>_<secret>`: the store id names the public host, as `@vercel/blob` reads it. */
|
|
26
|
+
const BLOB_TOKEN = /^vercel_blob_rw_([A-Za-z0-9]+)_\w+$/;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The Blob store's public origin. `new URL` lowercases the host, as Blob serves it.
|
|
30
|
+
* @param {{ blobToken: string | undefined, kit: any }} required
|
|
31
|
+
* @throws {DeployError} The token is missing or not a Blob read-write token; the message never echoes it.
|
|
32
|
+
* @complexity O(token length).
|
|
33
|
+
*/
|
|
34
|
+
function storeOrigin(required) {
|
|
35
|
+
const match = BLOB_TOKEN.exec(required.blobToken ?? "");
|
|
36
|
+
if (!match) throw new required.kit.DeployError("Add a Vercel Blob read-write token to the Vercel connection to get share links.", 400);
|
|
37
|
+
return new URL(`https://${match[1]}.public.blob.vercel-storage.com`).origin;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* One authenticated Blob API call. Errors carry only the operation and HTTP status, never the token,
|
|
42
|
+
* key or a response body (which may echo either).
|
|
43
|
+
* @param {{ kit: any, blobToken: string, path: string, op: string, init: RequestInit }} required
|
|
44
|
+
* @complexity One request.
|
|
45
|
+
*/
|
|
46
|
+
async function blobApi(required) {
|
|
47
|
+
const { kit, blobToken, path, op, init } = required;
|
|
48
|
+
const headers = { ...init.headers, authorization: `Bearer ${blobToken}`, "x-api-version": BLOB_API_VERSION };
|
|
49
|
+
const response = await kit.fetch(`${BLOB_API}${path}`, kit.redirectGuardInit({ ...init, headers }), { timeoutMs: kit.timeouts.UPLOAD });
|
|
50
|
+
kit.assertNotRedirected(response, "Vercel Blob");
|
|
51
|
+
if (!response.ok) throw new kit.DeployError(`Vercel Blob ${op} failed (HTTP ${response.status}).`, 502);
|
|
52
|
+
return response;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @param {{ key: string, kit: any }} required
|
|
57
|
+
* @throws {DeployError} Not a share artifact key.
|
|
58
|
+
*/
|
|
59
|
+
function requireKey(required) {
|
|
60
|
+
if (!SHARE_KEY.test(required.key)) throw new required.kit.DeployError("Invalid share artifact key.", 400);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* True when Blob stored the object at exactly `origin/key`: no suffix, no other store.
|
|
65
|
+
* @param {{ returned: unknown, origin: string, key: string }} required
|
|
66
|
+
*/
|
|
67
|
+
function isExactBlobUrl(required) {
|
|
68
|
+
if (typeof required.returned !== "string") return false;
|
|
69
|
+
const url = URL.canParse(required.returned) ? new URL(required.returned) : undefined;
|
|
70
|
+
return url?.origin === required.origin && url.pathname === `/${required.key}` && !url.search;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The share-facing artifact store over one Blob store.
|
|
75
|
+
* @param {{ blobToken: string, kit: any }} required
|
|
76
|
+
* @returns {import("@jini-ai/devops/deploy").ArtifactStorePort & { binding: string }}
|
|
77
|
+
* @complexity O(1) to build; each call is one request.
|
|
78
|
+
*/
|
|
79
|
+
function createBlobArtifactStore(required) {
|
|
80
|
+
const { blobToken, kit } = required;
|
|
81
|
+
const origin = storeOrigin(required);
|
|
82
|
+
// `?download=1` is Blob's attachment URL, so the browser saves the ZIP instead of opening it.
|
|
83
|
+
const shareUrl = (key) => `${origin}/${key}?download=1`;
|
|
84
|
+
return {
|
|
85
|
+
/** Core records this so revoke only deletes through the same Blob store the share was put in. */
|
|
86
|
+
binding: origin,
|
|
87
|
+
async upload({ key, bytes }, options = {}) {
|
|
88
|
+
requireKey({ key, kit });
|
|
89
|
+
options.signal?.throwIfAborted();
|
|
90
|
+
const response = await blobApi({ kit, blobToken, op: "upload", path: `/?pathname=${encodeURIComponent(key)}`, init: {
|
|
91
|
+
method: "PUT", body: bytes, signal: options.signal,
|
|
92
|
+
// `@vercel/blob` 2.8.2 `put()` always sends the access header; shares are public by design.
|
|
93
|
+
headers: { "x-vercel-blob-access": "public", "x-content-type": "application/zip", "x-add-random-suffix": "0", "x-allow-overwrite": "1", "x-cache-control-max-age": BLOB_CACHE_MAX_AGE_SECONDS },
|
|
94
|
+
} });
|
|
95
|
+
const stored = await response.json().catch(() => ({}));
|
|
96
|
+
if (!isExactBlobUrl({ returned: stored.url, origin, key })) throw new kit.DeployError("Vercel Blob stored the share under an unexpected address.", 502);
|
|
97
|
+
return { url: shareUrl(key) };
|
|
98
|
+
},
|
|
99
|
+
/** Revoke. Blob's delete is idempotent: an already-absent URL still answers 200. */
|
|
100
|
+
async delete({ key }, options = {}) {
|
|
101
|
+
requireKey({ key, kit });
|
|
102
|
+
await blobApi({ kit, blobToken, op: "delete", path: "/delete", init: {
|
|
103
|
+
method: "POST", signal: options.signal, headers: { "content-type": "application/json" }, body: JSON.stringify({ urls: [`${origin}/${key}`] }),
|
|
104
|
+
} });
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* Anonymous HEAD of the public URL. Blob does not serve the no-store/robots headers the Tovu
|
|
108
|
+
* delivery contract checks, so this checks what Blob does guarantee: exact size and ZIP type.
|
|
109
|
+
*/
|
|
110
|
+
async verify({ key, url, present, bytes }, options = {}) {
|
|
111
|
+
requireKey({ key, kit });
|
|
112
|
+
if (url !== shareUrl(key)) return false;
|
|
113
|
+
const response = await kit.fetch(url, { method: "HEAD", redirect: "error", signal: options.signal }, { timeoutMs: kit.timeouts.QUICK });
|
|
114
|
+
if (!present) return response.status === 404 || response.status === 410;
|
|
115
|
+
return response.status === 200 && Number(response.headers.get("content-length")) === bytes && /^application\/zip(?:;|$)/i.test(response.headers.get("content-type") ?? "");
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** The module contract the host's object-store registry loads (`ObjectStoreProvider`). */
|
|
121
|
+
export default {
|
|
122
|
+
/** Publishing needs only an API token; sharing requires the separate Blob token.
|
|
123
|
+
* @param {{ credential: any }} required
|
|
124
|
+
* @returns {boolean} Whether this connection can supply a Blob artifact store, without I/O.
|
|
125
|
+
* @complexity O(token length).
|
|
126
|
+
*/
|
|
127
|
+
acceptsArtifactCredential({ credential }, _optional = {}) {
|
|
128
|
+
return typeof credential?.blobToken === "string" && BLOB_TOKEN.test(credential.blobToken);
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* Blob holds share links only; site media stays on its configured store.
|
|
132
|
+
* @returns {{ status: "rejected", error: { code: "not_configured", message: string } }}
|
|
133
|
+
*/
|
|
134
|
+
create(_required, _optional = {}) {
|
|
135
|
+
return { status: "rejected", error: { code: "not_configured", message: "Vercel Blob is used for share links only, not site media." } };
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @param {{ credential: Record<string, string | undefined> & { token: string }, kit: any }} required
|
|
140
|
+
* `credential.blobToken`: the optional Blob read-write token on the Vercel connection.
|
|
141
|
+
* @param {Record<string, never>} [_optional]
|
|
142
|
+
* @throws {DeployError} No usable Blob token; the share path then falls back to download-only.
|
|
143
|
+
*/
|
|
144
|
+
createArtifactStore(required, _optional = {}) {
|
|
145
|
+
return createBlobArtifactStore({ blobToken: required.credential.blobToken, kit: required.kit });
|
|
146
|
+
},
|
|
147
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
|
+
"name": "vercel",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Publishes the site's static export to Vercel with the workspace's own saved token. Ships the host code itself (a host loads it only because that host chose to ship this plugin) and the know-how an agent needs: where to get a token, the optional team, Deployment Protection, and what each failure means in plain words.",
|
|
6
|
+
"author": "Tovu",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"extensions": {
|
|
9
|
+
"tovu": {
|
|
10
|
+
"displayName": "Vercel",
|
|
11
|
+
"summary": "Puts your website online on Vercel. The assistant shows you a preview first.",
|
|
12
|
+
"id": "tovu/vercel",
|
|
13
|
+
"provides": [
|
|
14
|
+
"deploy-target:vercel"
|
|
15
|
+
],
|
|
16
|
+
"credentialCards": [
|
|
17
|
+
{
|
|
18
|
+
"target": "vercel",
|
|
19
|
+
"title": "Connect Vercel",
|
|
20
|
+
"label": "Vercel connection",
|
|
21
|
+
"category": "hosting",
|
|
22
|
+
"intro": "Connect Vercel to publish this site as a production deployment.",
|
|
23
|
+
"usedFor": [
|
|
24
|
+
"Publishes and updates your live website on Vercel",
|
|
25
|
+
"Optional: shares site exports as download links from your Vercel Blob store"
|
|
26
|
+
],
|
|
27
|
+
"keyHint": "Create an access token for the personal account or team that owns the project, with permission to create projects and production deployments. Select that team as the token scope when publishing to a team. For share links, also add the read-write token of a Vercel Blob store (optional).",
|
|
28
|
+
"saveKind": "publish-host",
|
|
29
|
+
"helpUrl": "https://vercel.com/account/tokens",
|
|
30
|
+
"helpLabel": "Create a token",
|
|
31
|
+
"baseUrl": "https://api.vercel.com"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"vercel",
|
|
38
|
+
"deploy",
|
|
39
|
+
"publish",
|
|
40
|
+
"hosting",
|
|
41
|
+
"static-site",
|
|
42
|
+
"static-export",
|
|
43
|
+
"go-live",
|
|
44
|
+
"website",
|
|
45
|
+
"deploy-target:vercel"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel
|
|
3
|
+
description: Publish the site's static export to Vercel with the workspace's own saved token. Covers the token, the optional team, the project name, how a publish reaches the live address, Deployment Protection, and what each failure means in plain words.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Vercel
|
|
7
|
+
|
|
8
|
+
## Connection card
|
|
9
|
+
|
|
10
|
+
Choose the card yourself from its `usedFor` list. Reuse a saved key or working sign-in for that
|
|
11
|
+
task. Never offer a replacement unless the person asks.
|
|
12
|
+
|
|
13
|
+
Open the plugin’s **Connect Vercel** card with `credential_save {kind:"plugin-provider",target:"vercel"}`. It links to token creation and explains account/team access. The hosting save flow verifies and seals the token.
|
|
14
|
+
|
|
15
|
+
The steps are the same for every host: `deployment_get_static_publish_capabilities` shows whether a
|
|
16
|
+
token is saved, `deployment_preview_static_publish` comes first, and `deployment_execute_static_publish`
|
|
17
|
+
publishes once the person confirms. `ok: "partial"` means not reachable yet: never call it failed or live.
|
|
18
|
+
This file is what is particular to Vercel.
|
|
19
|
+
|
|
20
|
+
- **Token:** an access token from https://vercel.com/account/tokens. Save it with the plugin card above.
|
|
21
|
+
- **Share links (optional):** to share a site export as a download link with no S3, the person adds a
|
|
22
|
+
Vercel Blob store's read-write token (Vercel > Storage > Blob store > `BLOB_READ_WRITE_TOKEN`) in the
|
|
23
|
+
card's optional **Blob read-write token** field. They type it into the card, never into the chat.
|
|
24
|
+
Without it, a share is a private download only. A revoked link can keep serving for up to a minute
|
|
25
|
+
(Blob's edge cache); if revoke says deletion is not verified yet, retry it after a minute.
|
|
26
|
+
- **Team (optional):** the publish config's `teamId` puts the project under a Vercel team instead of the
|
|
27
|
+
personal account. Leave it out for a personal account; a blank one is refused.
|
|
28
|
+
- **Project name:** the project name, lowercased with hyphens (up to 80 characters). Publishing again
|
|
29
|
+
updates the same project.
|
|
30
|
+
- **Security headers:** this plugin writes them into a root `vercel.json`; a `vercel.json` in the site
|
|
31
|
+
itself is replaced.
|
|
32
|
+
- **Production, every time:** each publish is a production deployment, so it updates the live
|
|
33
|
+
`<project>.vercel.app` address, not a preview.
|
|
34
|
+
- **Only changed files upload.** Files go up one by one, keyed by their fingerprint. If Vercel says some
|
|
35
|
+
are missing when the deployment is created, the host sends exactly those and tries once more.
|
|
36
|
+
- **Deployment Protection:** new Vercel projects often require a Vercel login to view. The host detects that
|
|
37
|
+
and reports the link as protected rather than live.
|
|
38
|
+
|
|
39
|
+
## Failure messages and what to tell the person
|
|
40
|
+
|
|
41
|
+
| Message | Meaning | Next step |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `Vercel token is required.` | No token in the saved credential. | Open the plugin card above. |
|
|
44
|
+
| `You don't have permission to create a project.` | The token cannot create projects (often the wrong team). | Check the token's scope or the `teamId`. |
|
|
45
|
+
| `Deployment is protected by Vercel. ...` | The site is up but behind Vercel's login. | In Vercel, turn off Deployment Protection for the project, or add a custom domain. |
|
|
46
|
+
| `Vercel deployment failed.` | Vercel refused the build after upload. | Retry once; if it repeats, check the deployment log in the Vercel dashboard. |
|
|
47
|
+
| `... attempted to redirect an authenticated request ...` | Something between the host and Vercel redirected the call; the host refused to send the token on. | Retry later; if it repeats, check the server's network or proxy. |
|
|
48
|
+
| `Vercel returned a non-JSON response.` / `fetch timed out after ...` | Vercel or the network had a hiccup. | Retry in a minute. |
|