@jini-ai/agent-plugins 0.7.1 → 0.7.3-next.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/CHANGELOG.md +4 -4
- package/NOTICE +2 -0
- package/README.md +11 -15
- package/calendly/plugin.json +3 -3
- package/cloudflare/lib/forms.mjs +9 -10
- package/cloudflare/lib/target.mjs +1 -1
- package/cloudflare/plugin.json +3 -3
- package/cloudflare/worker/forms-receiver.mjs +9 -9
- package/composio/plugin.json +3 -3
- package/core/persistent-state.js +227 -163
- package/dist/admin-surfaces/connections/connections.d.ts +11 -6
- package/dist/admin-surfaces/connections/connections.js +102 -85
- package/dist/admin-surfaces/node.d.ts +27 -0
- package/dist/admin-surfaces/node.js +32 -0
- package/dist/admin-surfaces/plugin-state.js +21 -18
- package/dist/admin-surfaces/surface-client.d.ts +4 -0
- package/dist/admin-surfaces/surface-client.js +124 -117
- package/dist/admin-surfaces/surface-handlers.js +21 -17
- package/dist/admin-surfaces/theme.d.ts +5 -1
- package/dist/admin-surfaces/theme.js +3 -3
- package/dist/connect/access-token-tool.d.ts +3 -1
- package/dist/connect/access-token-tool.js +3 -2
- package/dist/connect/apply-connect-defaults.js +2 -2
- package/dist/connect/apply-tool-renames.js +9 -8
- package/dist/connect/connect-tool.d.ts +2 -0
- package/dist/connect/connect-tool.js +3 -2
- package/dist/connect/credential-cards.js +3 -2
- package/dist/connect/credential-save-tool.d.ts +14 -11
- package/dist/connect/credential-save-tool.js +128 -121
- package/dist/connect/enable-access.d.ts +2 -2
- package/dist/connect/enable-access.js +6 -6
- package/dist/connect/executable/register.js +40 -34
- package/dist/connect/federate-mcp.d.ts +21 -11
- package/dist/connect/federate-mcp.js +28 -21
- package/dist/connect/grant-signed-in-defaults.js +3 -3
- package/dist/connect/import-access-token.js +2 -1
- package/dist/connect/index.d.ts +1 -0
- package/dist/connect/index.js +1 -0
- package/dist/connect/plugin-credential-card.js +2 -1
- package/dist/connect/plugin-host/index.d.ts +9 -5
- package/dist/connect/plugin-host/index.js +113 -100
- package/dist/connect/ports.d.ts +1 -1
- package/dist/connect/row-update.d.ts +22 -0
- package/dist/connect/row-update.js +18 -0
- package/dist/connect/switch-on-saved-token.d.ts +4 -2
- package/dist/connect/switch-on-saved-token.js +1 -1
- package/dist/connect/token-map.d.ts +44 -0
- package/dist/connect/token-map.js +49 -0
- package/dist/core/identity-namespace.js +5 -0
- package/dist/folder-zip.d.ts +3 -1
- package/dist/folder-zip.js +2 -2
- package/dist/lifecycle/activation.d.ts +4 -4
- package/dist/lifecycle/activation.js +4 -5
- package/dist/lifecycle/automatic-use.js +236 -210
- package/dist/lifecycle/bundled-digests.d.ts +75 -12
- package/dist/lifecycle/bundled-digests.js +213 -212
- package/dist/lifecycle/bundled-source-archive.d.ts +1 -1
- package/dist/lifecycle/bundled-source-archive.js +263 -264
- package/dist/lifecycle/capability-projection.d.ts +1 -1
- package/dist/lifecycle/capability-projection.js +1 -1
- package/dist/lifecycle/credential-card-metadata.d.ts +1 -1
- package/dist/lifecycle/credential-card-metadata.js +27 -3
- package/dist/lifecycle/exports.js +9 -4
- package/dist/lifecycle/fetch-archive.d.ts +1 -1
- package/dist/lifecycle/fetch-archive.js +1 -1
- package/dist/lifecycle/host-tools/identity.js +3 -2
- package/dist/lifecycle/host-tools/ports.d.ts +2 -0
- package/dist/lifecycle/host-tools/search-tool.js +8 -8
- package/dist/lifecycle/host-tools/skill-tool.d.ts +18 -2
- package/dist/lifecycle/host-tools/skill-tool.js +16 -8
- package/dist/lifecycle/index.d.ts +118 -110
- package/dist/lifecycle/index.js +45 -12
- package/dist/lifecycle/install-errors.d.ts +1 -1
- package/dist/lifecycle/install-from-url.d.ts +1 -1
- package/dist/lifecycle/install-from-url.js +1 -1
- package/dist/lifecycle/install.d.ts +7 -2
- package/dist/lifecycle/install.js +414 -396
- package/dist/lifecycle/installed-package-index.js +45 -42
- package/dist/lifecycle/layout.d.ts +1 -1
- package/dist/lifecycle/layout.js +1 -1
- package/dist/lifecycle/mail/catalog.d.ts +8 -32
- package/dist/lifecycle/mail/catalog.js +25 -20
- package/dist/lifecycle/mail/contribution.d.ts +2 -2
- package/dist/lifecycle/mail/contribution.js +34 -34
- package/dist/lifecycle/mail/selection.js +6 -2
- package/dist/lifecycle/manifest.d.ts +3 -3
- package/dist/lifecycle/manifest.js +4 -4
- package/dist/lifecycle/mcp-provisioning.d.ts +3 -3
- package/dist/lifecycle/mcp-provisioning.js +3 -3
- package/dist/lifecycle/package-paths.d.ts +1 -1
- package/dist/lifecycle/package-paths.js +1 -1
- package/dist/lifecycle/persistent-state.js +1 -2
- package/dist/lifecycle/ports.d.ts +5 -1
- package/dist/lifecycle/resolve-agent-plugin-refs.d.ts +30 -8
- package/dist/lifecycle/resolve-agent-plugin-refs.js +227 -228
- package/dist/lifecycle/retire-bundled.d.ts +1 -52
- package/dist/lifecycle/retire-bundled.js +134 -84
- package/dist/lifecycle/search.d.ts +2 -1
- package/dist/lifecycle/search.js +1 -1
- package/dist/lifecycle/seed-bundled.d.ts +1 -1
- package/dist/lifecycle/seed-bundled.js +154 -155
- package/dist/lifecycle/set-enabled.d.ts +1 -1
- package/dist/lifecycle/set-enabled.js +1 -1
- package/dist/lifecycle/skill-file-reader.js +53 -50
- package/dist/lifecycle/tools/projection.d.ts +4 -7
- package/dist/lifecycle/tools/projection.js +109 -108
- package/dist/lifecycle/trusted-plugin-files.d.ts +2 -2
- package/dist/lifecycle/trusted-plugin-files.js +1 -1
- package/dist/lifecycle/uninstall.d.ts +1 -1
- package/dist/lifecycle/uninstall.js +237 -241
- package/dist/lifecycle/update-store.js +20 -17
- package/dist/lifecycle/update.js +287 -281
- package/dist/lifecycle/yauzl-archive-reader.d.ts +2 -2
- package/dist/lifecycle/yauzl-archive-reader.js +8 -2
- package/dist/manifest.d.ts +11 -3
- package/dist/manifest.js +9 -9
- package/fly/jini-credential-schemes.json +11 -0
- package/fly/plugin.json +3 -4
- package/github/plugin.json +3 -3
- package/github/source-control/backup-push.mjs +11 -11
- package/github/source-control/commit-site.mjs +3 -3
- package/github/source-control/github.mjs +12 -6
- package/github/source-control/write-files.mjs +27 -28
- package/github-pages/{tovu-deploy-targets.json → jini-deploy-targets.json} +22 -22
- package/github-pages/plugin.json +3 -3
- package/github-pages/targets/github-pages.mjs +3 -3
- package/google-login/plugin.json +3 -3
- package/google-workspace/README.md +14 -14
- package/google-workspace/form-destinations/README.md +3 -3
- package/google-workspace/form-destinations/dedupe.mjs +1 -1
- package/google-workspace/form-destinations/mapping.mjs +8 -9
- package/google-workspace/form-destinations/sheets.mjs +1 -1
- package/google-workspace/{tovu-admin-surfaces.json → jini-admin-surfaces.json} +2 -2
- package/google-workspace/{tovu-agent-tools.json → jini-agent-tools.json} +28 -28
- package/google-workspace/{tovu-connections.json → jini-connections.json} +2 -2
- package/google-workspace/lib/auth.mjs +2 -2
- package/google-workspace/lib/form-destination-settings.mjs +1 -1
- package/google-workspace/lib/picker-flow.mjs +2 -2
- package/google-workspace/lib/request-policy.mjs +1 -1
- package/google-workspace/lib/surface-actions.mjs +1 -1
- package/google-workspace/plugin.json +3 -3
- package/google-workspace/tools/sheets/README.md +3 -3
- package/google-workspace/tools/sheets-admin/README.md +3 -3
- package/google-workspace/ui/README.md +4 -4
- package/google-workspace/ui/connection-panel.mjs +51 -51
- package/google-workspace/ui/destination-panel.mjs +34 -34
- package/google-workspace/ui/dom.mjs +15 -16
- package/google-workspace/ui/picker-flow.mjs +2 -2
- package/google-workspace/ui/picker.mjs +19 -19
- package/google-workspace/ui/surface-client.mjs +96 -69
- package/higgsfield-media/plugin.json +3 -3
- package/jev/plugin.json +3 -3
- package/kuinetic/CHANGELOG.md +12 -0
- package/kuinetic/mcp.json +4 -0
- package/kuinetic/plugin.json +27 -0
- package/kuinetic/skills/kuinetic/SKILL.md +120 -0
- package/kuinetic/skills/kuinetic/references/effects-by-family.md +32 -0
- package/kuinetic/skills/kuinetic/references/opt-in-tiers.md +12 -0
- package/kuinetic/skills/kuinetic/references/reserved-keys.md +36 -0
- package/meilisearch/plugin.json +5 -5
- package/netlify/plugin.json +3 -3
- package/netlify/targets/netlify.mjs +14 -4
- package/opentelemetry/plugin.json +3 -3
- package/package.json +25 -20
- package/posthog/plugin.json +3 -3
- package/railway/plugin.json +3 -3
- package/render/plugin.json +3 -3
- package/resend/NOTES.md +2 -2
- package/resend/adapters/resend.mjs +1 -1
- package/resend/{tovu-mail-adapters.json → jini-mail-adapters.json} +1 -1
- package/resend/lib/domains.mjs +8 -8
- package/resend/plugin.json +3 -3
- package/s3-compatible/{tovu-deploy-targets.json → jini-deploy-targets.json} +68 -68
- package/s3-compatible/jini-object-stores.json +29 -0
- package/s3-compatible/object-stores/s3-compatible.mjs +19 -13
- package/s3-compatible/plugin.json +3 -3
- package/s3-compatible/targets/s3-compatible.mjs +25 -25
- package/sentry/plugin.json +3 -3
- package/shadcn-ui/CHANGELOG.md +7 -0
- package/shadcn-ui/LICENSE +201 -0
- package/shadcn-ui/NOTICE +10 -0
- package/shadcn-ui/mcp.json +4 -0
- package/shadcn-ui/plugin.json +26 -0
- package/shopify/plugin.json +3 -3
- package/site-compliance/plugin.json +3 -3
- package/site-import/plugin.json +3 -3
- package/supabase/mcp.json +1 -4
- package/supabase/plugin.json +3 -3
- package/ui-ux-design/CHANGELOG.md +13 -0
- package/ui-ux-design/NOTICE +2 -0
- package/ui-ux-design/README.md +17 -7
- package/ui-ux-design/plugin.json +6 -3
- package/ui-ux-design/skills/ui-ux-design/SKILL.md +38 -152
- package/ui-ux-design/skills/ui-ux-design/references/full-workflow.md +156 -0
- package/ui-ux-design/skills/ui-ux-design/references/ui-animation.md +4 -4
- package/vercel/NOTES.md +1 -1
- package/vercel/object-stores/vercel-blob.mjs +12 -2
- package/vercel/plugin.json +3 -3
- package/vercel/targets/vercel.mjs +3 -3
- package/wordpress/plugin.json +3 -3
- package/dist/lifecycle/node.d.ts +0 -11
- package/dist/lifecycle/node.js +0 -38
- package/fly/tovu-credential-schemes.json +0 -11
- package/github/deployments/github.mjs +0 -415
- package/s3-compatible/tovu-object-stores.json +0 -29
- package/ui-ux-design/skills/ui-ux-design/references/kuinetic-reference.md +0 -184
- /package/cloudflare/{tovu-consent.json → jini-consent.json} +0 -0
- /package/cloudflare/{tovu-deploy-targets.json → jini-deploy-targets.json} +0 -0
- /package/cloudflare/{tovu-form-destinations.json → jini-form-destinations.json} +0 -0
- /package/fly/{tovu-deploy-configs.json → jini-deploy-configs.json} +0 -0
- /package/fly/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
- /package/github/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
- /package/github/{tovu-source-control.json → jini-source-control.json} +0 -0
- /package/google-login/{tovu-login-providers.json → jini-login-providers.json} +0 -0
- /package/google-workspace/{tovu-form-destinations.json → jini-form-destinations.json} +0 -0
- /package/meilisearch/{tovu-search-providers.json → jini-search-providers.json} +0 -0
- /package/netlify/{tovu-consent.json → jini-consent.json} +0 -0
- /package/netlify/{tovu-deploy-targets.json → jini-deploy-targets.json} +0 -0
- /package/railway/{tovu-deploy-configs.json → jini-deploy-configs.json} +0 -0
- /package/railway/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
- /package/render/{tovu-deploy-configs.json → jini-deploy-configs.json} +0 -0
- /package/render/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/README.md +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/SKILL.md +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/examples/auth-layout.tsx +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/examples/data-table.tsx +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/examples/form-pattern.tsx +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/component-catalog.md +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/customization-guide.md +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/migration-guide.md +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/setup-guide.md +0 -0
- /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/scripts/verify-setup.sh +0 -0
- /package/vercel/{tovu-consent.json → jini-consent.json} +0 -0
- /package/vercel/{tovu-deploy-targets.json → jini-deploy-targets.json} +0 -0
- /package/vercel/{tovu-object-stores.json → jini-object-stores.json} +0 -0
package/vercel/plugin.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "vercel",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
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": "
|
|
6
|
+
"author": "Jini",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"extensions": {
|
|
9
9
|
"jini": {
|
|
10
10
|
"displayName": "Vercel",
|
|
11
11
|
"summary": "Puts your website online on Vercel. The assistant shows you a preview first.",
|
|
12
|
-
"id": "
|
|
12
|
+
"id": "jini/vercel",
|
|
13
13
|
"provides": [
|
|
14
14
|
"deploy-target:vercel"
|
|
15
15
|
],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* from the host kit the host injects (see {@link bindVercel}),
|
|
10
10
|
* bound once per target by {@link bindVercel}: an installed plugin has no npm dependencies.
|
|
11
11
|
* - `responseHeaders` (the host's security header set) is rendered into a root `vercel.json` here,
|
|
12
|
-
* which the first host
|
|
12
|
+
* which the first host used to add in its core.
|
|
13
13
|
* - Files are uploaded one per request to `POST /v2/files` (by SHA-1) and the deployment references
|
|
14
14
|
* them as `{ file, sha, size }`, the way Vercel's CLI does (2026-10-11). The devops source sent every
|
|
15
15
|
* file inline, base64, in the one `/v13/deployments` body, which Vercel refuses past 10 MB
|
|
@@ -34,7 +34,7 @@ const VERCEL_CONFIG_FILE = "vercel.json";
|
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Renders a header set as a `vercel.json` with one catch-all header rule. Byte-identical to what
|
|
37
|
-
* the first host
|
|
37
|
+
* the first host rendered in its core before this moved here.
|
|
38
38
|
*
|
|
39
39
|
* @param {Readonly<Record<string, string>>} headers
|
|
40
40
|
* @returns {string}
|
|
@@ -86,7 +86,7 @@ function vercelFileManifest(files) {
|
|
|
86
86
|
* @returns The target class (constructed with `{ token, teamId?, teamSlug? }`, as in devops) and the
|
|
87
87
|
* protected-response detector.
|
|
88
88
|
*/
|
|
89
|
-
export function bindVercel(kit) {
|
|
89
|
+
export function bindVercel(kit, _optional = {}) {
|
|
90
90
|
const { fetch: fetchWithTimeout, timeouts: FETCH_TIMEOUT_MS, sleep, DeployError, checkDeploymentUrl, normalizeDeploymentUrl, waitForReachableDeploymentUrl, safeProjectLabel, assertNotRedirected, redirectGuardInit } = kit;
|
|
91
91
|
const VERCEL_TARGET_ID = 'vercel';
|
|
92
92
|
const VERCEL_API = 'https://api.vercel.com';
|
package/wordpress/plugin.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "wordpress",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"description": "Guides publishing a site through an existing host, connecting an owned subdomain, or redirecting a free WordPress.com address. Uses existing hosting, DNS and page-reading tools. Includes WordPress.com dashboard steps and marks unconfirmed redirect pricing and host URL eligibility for dashboard confirmation.",
|
|
6
|
-
"author": "
|
|
6
|
+
"author": "Jini",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"extensions": {
|
|
9
9
|
"jini": {
|
|
10
10
|
"maturity": "soon",
|
|
11
|
-
"id": "
|
|
11
|
+
"id": "jini/wordpress",
|
|
12
12
|
"displayName": "WordPress",
|
|
13
13
|
"summary": "Connect your own subdomain to your published site, or explore redirecting your free WordPress.com address.",
|
|
14
14
|
"provides": [
|
package/dist/lifecycle/node.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AgentPluginClockPort, AgentPluginIdsPort, AgentPluginProcessPort, FilesystemPort } from './ports.js';
|
|
2
|
-
/** Opt-in native effects. Layout, fetch, guard, namespace and provisioning remain host-owned. */
|
|
3
|
-
export declare function createNodeAgentPluginEffects(_required: Record<string, never>, optional?: {
|
|
4
|
-
readonly filesystem?: FilesystemPort;
|
|
5
|
-
}): {
|
|
6
|
-
filesystem: FilesystemPort;
|
|
7
|
-
clock: AgentPluginClockPort;
|
|
8
|
-
ids: AgentPluginIdsPort;
|
|
9
|
-
process: AgentPluginProcessPort;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=node.d.ts.map
|
package/dist/lifecycle/node.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as nativeFilesystem from 'node:fs/promises';
|
|
2
|
-
import { randomInt, randomUUID } from 'node:crypto';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import { performance } from 'node:perf_hooks';
|
|
5
|
-
import { setTimeout } from 'node:timers/promises';
|
|
6
|
-
import { readBootIdentity } from '@jini-ai/platform/fs/file-lock';
|
|
7
|
-
/** Granularity of the uniform [0, 1) value: crypto.randomInt's largest exclusive bound (2^48 - 1). */
|
|
8
|
-
const RANDOM_RESOLUTION = 2 ** 48 - 1;
|
|
9
|
-
/** Opt-in native effects. Layout, fetch, guard, namespace and provisioning remain host-owned. */
|
|
10
|
-
export function createNodeAgentPluginEffects(_required, optional = {}) {
|
|
11
|
-
return {
|
|
12
|
-
filesystem: optional.filesystem ?? nativeFilesystem,
|
|
13
|
-
clock: {
|
|
14
|
-
nowMs: () => Date.now(),
|
|
15
|
-
monotonicMs: () => performance.now(),
|
|
16
|
-
sleep: ({ ms }) => setTimeout(ms),
|
|
17
|
-
},
|
|
18
|
-
ids: { newId: () => randomUUID(), random: () => randomInt(RANDOM_RESOLUTION) / RANDOM_RESOLUTION },
|
|
19
|
-
process: {
|
|
20
|
-
pid: process.pid,
|
|
21
|
-
platform: process.platform,
|
|
22
|
-
hostname: () => os.hostname(),
|
|
23
|
-
bootIdentity: () => readBootIdentity({}),
|
|
24
|
-
isAlive: ({ pid }) => {
|
|
25
|
-
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
26
|
-
return false;
|
|
27
|
-
try {
|
|
28
|
-
process.kill(pid, 0);
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
return !(typeof error === 'object' && error !== null && 'code' in error && error.code === 'ESRCH');
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=node.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"schemes": [
|
|
4
|
-
{
|
|
5
|
-
"id": "fly-io",
|
|
6
|
-
"prefix": "FlyV1",
|
|
7
|
-
"scheme": "FlyV1",
|
|
8
|
-
"note": "Fly.io tokens (e.g. FlyV1fm2_..., a macaroon) carry their own Authorization scheme word. Verified live 2026-09-03 against https://api.machines.dev/v1/apps/tovu/machines with two independently generated tokens: 'Authorization: Bearer FlyV1fm2_...' (whole token) returned 401 {\"error\":\"Authenticate: token validation error\"}; 'Authorization: FlyV1 fm2_...' (FlyV1 moved to the scheme, remainder as the value) returned 200 with real machine data. Both tokens behaved identically, so it is a scheme problem, not scope or expiry. The 401's WWW-Authenticate header (Basic realm=\"api.machines.dev\") does not name the real scheme, so it cannot be derived from the server's challenge and must be declared here."
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
import { createSign } from "node:crypto";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @file The first-party `github` deployment provider — GitHub App installation auth over the
|
|
5
|
-
* guarded ADR-038 `HttpClientPort`.
|
|
6
|
-
*
|
|
7
|
-
* Why a GitHub App and not `gh` or a stored PAT (ADS deployments debate, all three rounds, 5/5):
|
|
8
|
-
* a PAT is a long-lived, human-scoped credential with no per-workspace or per-repository boundary
|
|
9
|
-
* in a multi-tenant process; `gh` inherits whatever credential is on the host's global config and
|
|
10
|
-
* bypasses the guarded HTTP client entirely. A GitHub App installation token is narrowable to one
|
|
11
|
-
* repository and one permission (`deployments: write`) at mint time, and expires in exactly one
|
|
12
|
-
* hour regardless of caller-supplied TTL — verified against
|
|
13
|
-
* docs.github.com/en/rest/apps/apps#create-an-installation-access-token-for-an-app. The App JWT
|
|
14
|
-
* used to mint it must be RS256 with `exp` no more than ten minutes past `iat` — verified against
|
|
15
|
-
* docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app.
|
|
16
|
-
*
|
|
17
|
-
* `EgressPolicy` cannot pin a host — see the host deployment port's file header. `sendPinned` below is this
|
|
18
|
-
* file's answer: the ONLY function allowed to call `http.send`, and it refuses anything whose
|
|
19
|
-
* resolved origin is not exactly `https://api.github.com`, so a malformed URL template (or a
|
|
20
|
-
* future workspace-supplied GitHub Enterprise base URL, if that is ever added) fails closed instead
|
|
21
|
-
* of silently reaching an arbitrary host.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
export const GITHUB_DEPLOYMENT_PROVIDER_ID = "github";
|
|
25
|
-
|
|
26
|
-
const GITHUB_API_ORIGIN = "https://api.github.com";
|
|
27
|
-
const API_VERSION = "2022-11-28";
|
|
28
|
-
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
29
|
-
|
|
30
|
-
/** GitHub App JWTs: `exp` MUST be no more than 10 minutes past `iat` (verified — see file header).
|
|
31
|
-
* 9 minutes leaves margin against clock drift between signing and GitHub's verification. */
|
|
32
|
-
const APP_JWT_TTL_SECONDS = 9 * 60;
|
|
33
|
-
/** GitHub's own guidance is to back-date `iat` by up to 60s to tolerate clock skew between this
|
|
34
|
-
* process and GitHub's clock (verified — see file header). */
|
|
35
|
-
const APP_JWT_CLOCK_SKEW_SECONDS = 60;
|
|
36
|
-
|
|
37
|
-
function fail(
|
|
38
|
-
code,
|
|
39
|
-
message,
|
|
40
|
-
optional = {}
|
|
41
|
-
) {
|
|
42
|
-
return {
|
|
43
|
-
code,
|
|
44
|
-
message,
|
|
45
|
-
retryable: optional.retryable ?? false,
|
|
46
|
-
...(optional.providerStatus === undefined ? {} : { providerStatus: optional.providerStatus }),
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Reads and validates `target.config`'s three required GitHub-specific fields.
|
|
52
|
-
*
|
|
53
|
-
* @complexity O(1).
|
|
54
|
-
*/
|
|
55
|
-
function readGitHubTargetConfig(target) {
|
|
56
|
-
const { owner, repo, environmentName } = target.config;
|
|
57
|
-
if (typeof owner !== "string" || owner.length === 0) return null;
|
|
58
|
-
if (typeof repo !== "string" || repo.length === 0) return null;
|
|
59
|
-
if (typeof environmentName !== "string" || environmentName.length === 0) return null;
|
|
60
|
-
return { owner, repo, environmentName };
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The origin pin. This is the ONLY call site for `http.send` in this file — every outbound request
|
|
65
|
-
* (minting a token, creating a deployment, polling statuses) is routed through it. See the file
|
|
66
|
-
* header for why this check cannot be delegated to `EgressPolicy`.
|
|
67
|
-
*
|
|
68
|
-
* Exported so this guard can be tested directly (see `../__tests__/deployments-provider.test.mjs`'s "sendPinned
|
|
69
|
-
* refuses..." case) — every current call site builds its URL through `githubApiUrl()`, which
|
|
70
|
-
* already can only resolve under `GITHUB_API_ORIGIN`, so an adapter-level test alone cannot prove
|
|
71
|
-
* this check is load-bearing (confirmed by a mutation check: disabling it did not fail any
|
|
72
|
-
* adapter-level test). This function is the actual safety boundary for a future call site that
|
|
73
|
-
* builds a URL a different way — e.g. a workspace-supplied GitHub Enterprise base URL, if that is
|
|
74
|
-
* ever added — so it must be proven correct on its own.
|
|
75
|
-
*
|
|
76
|
-
* @complexity O(1) beyond the underlying `http.send` call.
|
|
77
|
-
*/
|
|
78
|
-
export async function sendPinned(http, request) {
|
|
79
|
-
const url = new URL(request.url);
|
|
80
|
-
if (url.origin !== GITHUB_API_ORIGIN) {
|
|
81
|
-
throw new Error(
|
|
82
|
-
`github deployment adapter refused to send to '${url.origin}' — pinned to ${GITHUB_API_ORIGIN} only`
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
return http.send(request);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/** Builds a same-origin URL from a path. Every caller-influenced path segment (owner, repo,
|
|
89
|
-
* installation id, provider run ref) MUST already be `encodeURIComponent`-encoded before reaching
|
|
90
|
-
* this function — encoding is what stops a value like `../../app/installations/1` from being
|
|
91
|
-
* interpreted as a literal dot-segment and resolving outside the intended endpoint: RFC 3986
|
|
92
|
-
* dot-segment removal only recognizes literal, unencoded `..` between `/` characters, never a
|
|
93
|
-
* percent-encoded `%2E%2E`. */
|
|
94
|
-
function githubApiUrl(path) {
|
|
95
|
-
return new URL(path, GITHUB_API_ORIGIN).toString();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function githubHeaders(token) {
|
|
99
|
-
return {
|
|
100
|
-
accept: "application/vnd.github+json",
|
|
101
|
-
authorization: `Bearer ${token}`,
|
|
102
|
-
"user-agent": "Tovu-CMS",
|
|
103
|
-
"x-github-api-version": API_VERSION,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function base64url(input) {
|
|
108
|
-
return Buffer.from(input).toString("base64url");
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Signs a GitHub App JWT locally. The private key never leaves this process.
|
|
113
|
-
*
|
|
114
|
-
* @complexity O(1) (one RSA signature over a short, fixed-shape payload).
|
|
115
|
-
*/
|
|
116
|
-
function signGitHubAppJwt(input) {
|
|
117
|
-
const header = base64url(JSON.stringify({ alg: "RS256", typ: "JWT" }));
|
|
118
|
-
const payload = base64url(JSON.stringify({ iat: input.issuedAt, exp: input.expiresAt, iss: input.appId }));
|
|
119
|
-
const signature = createSign("RSA-SHA256")
|
|
120
|
-
.update(`${header}.${payload}`)
|
|
121
|
-
.sign(input.privateKeyPem)
|
|
122
|
-
.toString("base64url");
|
|
123
|
-
return `${header}.${payload}.${signature}`;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function sanitizeMessage(value) {
|
|
127
|
-
if (typeof value !== "string") return null;
|
|
128
|
-
return value.replace(/[\r\n\0]/g, " ").slice(0, 500);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Mints a short-lived App JWT, exchanges it for an installation access token narrowed to exactly
|
|
133
|
-
* this installation's `deployments: write` permission. Minted fresh on every call rather than
|
|
134
|
-
* cached: simpler and correct, at the cost of one extra round trip per deploy action — acceptable
|
|
135
|
-
* given deploy actions are infrequent, not a hot path.
|
|
136
|
-
*
|
|
137
|
-
* @complexity One outbound HTTP request, hard-bounded by `DEFAULT_TIMEOUT_MS`.
|
|
138
|
-
*/
|
|
139
|
-
async function mintInstallationToken(
|
|
140
|
-
http,
|
|
141
|
-
credentials,
|
|
142
|
-
nowMs
|
|
143
|
-
) {
|
|
144
|
-
const now = Math.floor(nowMs() / 1000);
|
|
145
|
-
const jwt = signGitHubAppJwt({
|
|
146
|
-
appId: credentials.appId,
|
|
147
|
-
privateKeyPem: credentials.privateKeyPem,
|
|
148
|
-
issuedAt: now - APP_JWT_CLOCK_SKEW_SECONDS,
|
|
149
|
-
expiresAt: now + APP_JWT_TTL_SECONDS,
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
let response;
|
|
153
|
-
try {
|
|
154
|
-
response = await sendPinned(http, {
|
|
155
|
-
method: "POST",
|
|
156
|
-
url: githubApiUrl(`/app/installations/${encodeURIComponent(credentials.installationId)}/access_tokens`),
|
|
157
|
-
headers: { ...githubHeaders(jwt), "content-type": "application/json" },
|
|
158
|
-
body: JSON.stringify({ permissions: { deployments: "write" } }),
|
|
159
|
-
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
160
|
-
});
|
|
161
|
-
} catch (err) {
|
|
162
|
-
return { ok: false, error: fail("TRANSPORT_ERROR", err instanceof Error ? err.message : String(err), { retryable: true }) };
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (response.status >= 400) {
|
|
166
|
-
return {
|
|
167
|
-
ok: false,
|
|
168
|
-
error: fail("PROVIDER_ERROR", `GitHub installation token exchange failed: ${response.status}`, {
|
|
169
|
-
providerStatus: response.status,
|
|
170
|
-
retryable: response.status >= 500,
|
|
171
|
-
}),
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
let body;
|
|
176
|
-
try {
|
|
177
|
-
body = JSON.parse(response.bodyText);
|
|
178
|
-
} catch {
|
|
179
|
-
return { ok: false, error: fail("PROVIDER_RESPONSE_INVALID", "GitHub returned invalid JSON minting an installation token") };
|
|
180
|
-
}
|
|
181
|
-
// Token formats are opaque; do not assume a fixed prefix or length.
|
|
182
|
-
if (typeof body.token !== "string" || body.token.length === 0) {
|
|
183
|
-
return { ok: false, error: fail("PROVIDER_RESPONSE_INVALID", "GitHub returned an empty installation token") };
|
|
184
|
-
}
|
|
185
|
-
return { ok: true, token: body.token };
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function requireCredentials(
|
|
189
|
-
credentials
|
|
190
|
-
) {
|
|
191
|
-
const { appId, installationId, privateKeyPem } = credentials;
|
|
192
|
-
if (!appId || !installationId || !privateKeyPem) return null;
|
|
193
|
-
return { appId, installationId, privateKeyPem };
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Sends the `POST .../deployments` call and validates its response — split out of `startRun` so
|
|
198
|
-
* the pre-checks (target config, release shape, credentials) and the HTTP round-trip each carry
|
|
199
|
-
* only their own branches. `release` is the two fields already narrowed out of
|
|
200
|
-
* `input.release` by `startRun`'s own `kind !== "git-revision"` guard.
|
|
201
|
-
*/
|
|
202
|
-
async function createGitHubDeployment(
|
|
203
|
-
ctx,
|
|
204
|
-
token,
|
|
205
|
-
config,
|
|
206
|
-
release
|
|
207
|
-
) {
|
|
208
|
-
let response;
|
|
209
|
-
try {
|
|
210
|
-
response = await sendPinned(ctx.httpClient, {
|
|
211
|
-
method: "POST",
|
|
212
|
-
url: githubApiUrl(`/repos/${encodeURIComponent(config.owner)}/${encodeURIComponent(config.repo)}/deployments`),
|
|
213
|
-
headers: { ...githubHeaders(token), "content-type": "application/json" },
|
|
214
|
-
body: JSON.stringify({
|
|
215
|
-
ref: release.commitSha,
|
|
216
|
-
environment: config.environmentName,
|
|
217
|
-
description: `Tovu deployment of release ${release.releaseId}`,
|
|
218
|
-
auto_merge: false,
|
|
219
|
-
required_contexts: [],
|
|
220
|
-
transient_environment: false,
|
|
221
|
-
production_environment: config.environmentName === "production",
|
|
222
|
-
}),
|
|
223
|
-
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
224
|
-
});
|
|
225
|
-
} catch (err) {
|
|
226
|
-
return { ok: false, error: fail("TRANSPORT_ERROR", err instanceof Error ? err.message : String(err), { retryable: true }) };
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (response.status >= 400) {
|
|
230
|
-
return {
|
|
231
|
-
ok: false,
|
|
232
|
-
error: fail("PROVIDER_ERROR", `GitHub deployment create failed: ${response.status}`, {
|
|
233
|
-
providerStatus: response.status,
|
|
234
|
-
retryable: response.status >= 500,
|
|
235
|
-
}),
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
let body;
|
|
240
|
-
try {
|
|
241
|
-
body = JSON.parse(response.bodyText);
|
|
242
|
-
} catch {
|
|
243
|
-
return { ok: false, error: fail("PROVIDER_RESPONSE_INVALID", "GitHub returned invalid JSON creating a deployment") };
|
|
244
|
-
}
|
|
245
|
-
if (!Number.isSafeInteger(body.id) || (body.id) <= 0) {
|
|
246
|
-
return { ok: false, error: fail("PROVIDER_RESPONSE_INVALID", "GitHub returned an invalid deployment id") };
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
return { ok: true, providerRunRef: String(body.id), reconciliation: "callback" };
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Creates a GitHub Deployment for an existing commit. Does NOT wait for (or fabricate) evidence
|
|
254
|
-
* that a build or deploy has started — GitHub's own docs state it does not access or deploy to the
|
|
255
|
-
* target servers itself; creating a deployment only dispatches a `deployment` event to whatever is
|
|
256
|
-
* listening.
|
|
257
|
-
*
|
|
258
|
-
* @complexity Two outbound HTTP requests (mint token, create deployment), each hard-bounded by
|
|
259
|
-
* `DEFAULT_TIMEOUT_MS`.
|
|
260
|
-
*/
|
|
261
|
-
async function startRun(input, ctx) {
|
|
262
|
-
const config = readGitHubTargetConfig(input.target);
|
|
263
|
-
if (!config) {
|
|
264
|
-
return { ok: false, error: fail("INVALID_TARGET_CONFIG", "github target is missing owner/repo/environmentName") };
|
|
265
|
-
}
|
|
266
|
-
if (input.release.source.kind !== "git-revision") {
|
|
267
|
-
// The honesty constraint, enforced at the one place it can be: this adapter promotes an
|
|
268
|
-
// EXISTING commit. It cannot manufacture one from an "external-artifact" release — the host's CLI
|
|
269
|
-
// has no build or export command.
|
|
270
|
-
return {
|
|
271
|
-
ok: false,
|
|
272
|
-
error: fail("INVALID_RELEASE", "github deployment target requires a git-revision release (commit sha), not an external artifact"),
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
const credentials = requireCredentials(ctx.credentials);
|
|
276
|
-
if (!credentials) {
|
|
277
|
-
return { ok: false, error: fail("NO_CREDENTIALS_CONFIGURED", "github deployment target is missing appId/installationId/privateKeyPem") };
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
const token = await mintInstallationToken(ctx.httpClient, credentials, ctx.now);
|
|
281
|
-
if (!token.ok) return { ok: false, error: token.error };
|
|
282
|
-
|
|
283
|
-
return createGitHubDeployment(ctx, token.token, config, {
|
|
284
|
-
commitSha: input.release.source.commitSha,
|
|
285
|
-
releaseId: input.release.id,
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* GitHub's real deployment-status `state` enum has SEVEN values — `error`, `failure`, `inactive`,
|
|
291
|
-
* `in_progress`, `queued`, `pending`, `success` — verified against
|
|
292
|
-
* docs.github.com/en/rest/deployments/statuses. Every value is handled explicitly here; an
|
|
293
|
-
* unrecognized future value falls to `"running"` (never a terminal state), so it can never be
|
|
294
|
-
* mistaken for success or a permanent failure.
|
|
295
|
-
*
|
|
296
|
-
* GitHub never fires a `deployment_status` WEBHOOK for `inactive` (verified against
|
|
297
|
-
* docs.github.com/en/webhooks/webhook-events-and-payloads#deployment_status) — so this mapping is
|
|
298
|
-
* the only place `inactive` is ever observed, and only via `pollRun`, never a callback.
|
|
299
|
-
*
|
|
300
|
-
* @complexity O(1).
|
|
301
|
-
*/
|
|
302
|
-
export function mapGitHubDeploymentStatus(status) {
|
|
303
|
-
const providerStatusId = String(status.id);
|
|
304
|
-
const message = sanitizeMessage(status.description);
|
|
305
|
-
switch (status.state) {
|
|
306
|
-
case "success":
|
|
307
|
-
return { status: "succeeded", providerStatusId, message };
|
|
308
|
-
case "failure":
|
|
309
|
-
case "error":
|
|
310
|
-
return { status: "failed", providerStatusId, message };
|
|
311
|
-
case "inactive":
|
|
312
|
-
return { status: "cancelled", providerStatusId, message };
|
|
313
|
-
case "in_progress":
|
|
314
|
-
return { status: "running", providerStatusId, message };
|
|
315
|
-
case "queued":
|
|
316
|
-
case "pending":
|
|
317
|
-
return { status: "queued", providerStatusId, message };
|
|
318
|
-
default:
|
|
319
|
-
return { status: "running", providerStatusId, message };
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Sends the `GET .../statuses` call and resolves the latest status from it — split out of
|
|
325
|
-
* `pollRun` for the same "pre-checks vs. HTTP round-trip" reason as `createGitHubDeployment`. Does
|
|
326
|
-
* NOT assume the response is newest-first — GitHub's docs describe pagination for this endpoint but
|
|
327
|
-
* state no response order (verified against docs.github.com/en/rest/deployments/statuses). Status
|
|
328
|
-
* ids are assigned monotonically, so the correct status is the one with the greatest `id`,
|
|
329
|
-
* independent of array position.
|
|
330
|
-
*/
|
|
331
|
-
async function pollGitHubDeploymentStatuses(
|
|
332
|
-
ctx,
|
|
333
|
-
token,
|
|
334
|
-
config,
|
|
335
|
-
providerRunRef
|
|
336
|
-
) {
|
|
337
|
-
let response;
|
|
338
|
-
try {
|
|
339
|
-
response = await sendPinned(ctx.httpClient, {
|
|
340
|
-
method: "GET",
|
|
341
|
-
url: githubApiUrl(
|
|
342
|
-
`/repos/${encodeURIComponent(config.owner)}/${encodeURIComponent(config.repo)}/deployments/` +
|
|
343
|
-
`${encodeURIComponent(providerRunRef)}/statuses?per_page=100`
|
|
344
|
-
),
|
|
345
|
-
headers: githubHeaders(token),
|
|
346
|
-
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
347
|
-
});
|
|
348
|
-
} catch (err) {
|
|
349
|
-
return { ok: false, error: fail("TRANSPORT_ERROR", err instanceof Error ? err.message : String(err), { retryable: true }) };
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
if (response.status >= 400) {
|
|
353
|
-
return {
|
|
354
|
-
ok: false,
|
|
355
|
-
error: fail("PROVIDER_ERROR", `GitHub deployment status poll failed: ${response.status}`, {
|
|
356
|
-
providerStatus: response.status,
|
|
357
|
-
retryable: response.status >= 500,
|
|
358
|
-
}),
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
let statuses;
|
|
363
|
-
try {
|
|
364
|
-
const parsed = JSON.parse(response.bodyText);
|
|
365
|
-
if (!Array.isArray(parsed)) throw new Error("not an array");
|
|
366
|
-
statuses = parsed;
|
|
367
|
-
} catch {
|
|
368
|
-
return { ok: false, error: fail("PROVIDER_RESPONSE_INVALID", "GitHub returned a malformed statuses response") };
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
if (statuses.length === 0) {
|
|
372
|
-
return { ok: true, update: { status: "queued", providerStatusId: null, message: null } };
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
const latest = statuses.reduce((best, candidate) => (candidate.id > best.id ? candidate : best));
|
|
376
|
-
return { ok: true, update: mapGitHubDeploymentStatus(latest) };
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* Polls the latest deployment status.
|
|
381
|
-
*
|
|
382
|
-
* @complexity One outbound HTTP request (plus the token mint) and a single linear scan over the
|
|
383
|
-
* returned statuses (bounded by `per_page=100`), each hard-bounded by `DEFAULT_TIMEOUT_MS`.
|
|
384
|
-
*/
|
|
385
|
-
async function pollRun(input, ctx) {
|
|
386
|
-
const config = readGitHubTargetConfig(input.target);
|
|
387
|
-
if (!config) {
|
|
388
|
-
return { ok: false, error: fail("INVALID_TARGET_CONFIG", "github target is missing owner/repo/environmentName") };
|
|
389
|
-
}
|
|
390
|
-
if (!/^[1-9]\d*$/.test(input.providerRunRef)) {
|
|
391
|
-
return { ok: false, error: fail("INVALID_TARGET_CONFIG", "providerRunRef is not a github deployment id") };
|
|
392
|
-
}
|
|
393
|
-
const credentials = requireCredentials(ctx.credentials);
|
|
394
|
-
if (!credentials) {
|
|
395
|
-
return { ok: false, error: fail("NO_CREDENTIALS_CONFIGURED", "github deployment target is missing appId/installationId/privateKeyPem") };
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
const token = await mintInstallationToken(ctx.httpClient, credentials, ctx.now);
|
|
399
|
-
if (!token.ok) return { ok: false, error: token.error };
|
|
400
|
-
|
|
401
|
-
return pollGitHubDeploymentStatuses(ctx, token.token, config, input.providerRunRef);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Builds the `github` deployment provider adapter. Stateless — safe to construct once and reuse
|
|
406
|
-
* across requests; all per-call state lives in the `ctx` passed to each method.
|
|
407
|
-
*/
|
|
408
|
-
export function createGitHubDeploymentProvider() {
|
|
409
|
-
return {
|
|
410
|
-
id: GITHUB_DEPLOYMENT_PROVIDER_ID,
|
|
411
|
-
credentialKeys: ["appId", "installationId", "privateKeyPem"],
|
|
412
|
-
startRun,
|
|
413
|
-
pollRun,
|
|
414
|
-
};
|
|
415
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": 1,
|
|
3
|
-
"providers": [
|
|
4
|
-
{
|
|
5
|
-
"id": "s3_compatible",
|
|
6
|
-
"label": "S3-compatible storage",
|
|
7
|
-
"module": "object-stores/s3-compatible.mjs",
|
|
8
|
-
"env": {
|
|
9
|
-
"selector": "s3",
|
|
10
|
-
"settings": {
|
|
11
|
-
"bucket": "TOVU_S3_BUCKET",
|
|
12
|
-
"keyPrefix": "TOVU_S3_KEY_PREFIX"
|
|
13
|
-
},
|
|
14
|
-
"credentialFields": {
|
|
15
|
-
"accessKeyId": "TOVU_S3_ACCESS_KEY_ID",
|
|
16
|
-
"region": "TOVU_S3_REGION",
|
|
17
|
-
"endpoint": "TOVU_S3_ENDPOINT"
|
|
18
|
-
},
|
|
19
|
-
"secret": "TOVU_S3_SECRET_ACCESS_KEY",
|
|
20
|
-
"required": [
|
|
21
|
-
"TOVU_S3_BUCKET",
|
|
22
|
-
"TOVU_S3_REGION",
|
|
23
|
-
"TOVU_S3_ACCESS_KEY_ID",
|
|
24
|
-
"TOVU_S3_SECRET_ACCESS_KEY"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|