@vibesdotdev/integrations-digitalocean 0.0.0-stage → 1.0.0-rc.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/LICENSE +126 -0
- package/README.md +78 -2
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +4 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/inference.transport.impl.d.ts +5 -0
- package/dist/ai/inference.transport.impl.d.ts.map +1 -0
- package/dist/ai/inference.transport.impl.js +54 -0
- package/dist/ai/inference.transport.impl.js.map +1 -0
- package/dist/ai/provider.plugin.d.ts +6 -0
- package/dist/ai/provider.plugin.d.ts.map +1 -0
- package/dist/ai/provider.plugin.js +126 -0
- package/dist/ai/provider.plugin.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.d.ts +62 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.js +73 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/config/schemas/index.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.d.ts +2 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.js +2 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/index.js.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.d.ts +183 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.js +66 -0
- package/dist/ai/providers/cloud/frontier/digitalocean/provider.digitalocean.descriptor.js.map +1 -0
- package/dist/apps/api-client.d.ts +45 -0
- package/dist/apps/api-client.d.ts.map +1 -0
- package/dist/apps/api-client.js +47 -0
- package/dist/apps/api-client.js.map +1 -0
- package/dist/apps/build-spec.d.ts +44 -0
- package/dist/apps/build-spec.d.ts.map +1 -0
- package/dist/apps/build-spec.js +463 -0
- package/dist/apps/build-spec.js.map +1 -0
- package/dist/apps/deploy-client.d.ts +42 -0
- package/dist/apps/deploy-client.d.ts.map +1 -0
- package/dist/apps/deploy-client.js +300 -0
- package/dist/apps/deploy-client.js.map +1 -0
- package/dist/apps/index.d.ts +5 -0
- package/dist/apps/index.d.ts.map +1 -0
- package/dist/apps/index.js +4 -0
- package/dist/apps/index.js.map +1 -0
- package/dist/apps/types.d.ts +204 -0
- package/dist/apps/types.d.ts.map +1 -0
- package/dist/apps/types.js +13 -0
- package/dist/apps/types.js.map +1 -0
- package/dist/client/control-plane.d.ts +49 -0
- package/dist/client/control-plane.d.ts.map +1 -0
- package/dist/client/control-plane.js +85 -0
- package/dist/client/control-plane.js.map +1 -0
- package/dist/client/do-fetch.d.ts +41 -0
- package/dist/client/do-fetch.d.ts.map +1 -0
- package/dist/client/do-fetch.js +199 -0
- package/dist/client/do-fetch.js.map +1 -0
- package/dist/client/errors.d.ts +6 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +34 -0
- package/dist/client/errors.js.map +1 -0
- package/dist/client/factory.d.ts +53 -0
- package/dist/client/factory.d.ts.map +1 -0
- package/dist/client/factory.js +220 -0
- package/dist/client/factory.js.map +1 -0
- package/dist/client/helpers.d.ts +5 -0
- package/dist/client/helpers.d.ts.map +1 -0
- package/dist/client/helpers.js +8 -0
- package/dist/client/helpers.js.map +1 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +10 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/paginated.d.ts +19 -0
- package/dist/client/paginated.d.ts.map +1 -0
- package/dist/client/paginated.js +56 -0
- package/dist/client/paginated.js.map +1 -0
- package/dist/client/retry.d.ts +34 -0
- package/dist/client/retry.d.ts.map +1 -0
- package/dist/client/retry.js +53 -0
- package/dist/client/retry.js.map +1 -0
- package/dist/config/digitalocean.config.descriptor.d.ts +197 -0
- package/dist/config/digitalocean.config.descriptor.d.ts.map +1 -0
- package/dist/config/digitalocean.config.descriptor.js +59 -0
- package/dist/config/digitalocean.config.descriptor.js.map +1 -0
- package/dist/credentials/index.d.ts +38 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +56 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/databases/index.d.ts +82 -0
- package/dist/databases/index.d.ts.map +1 -0
- package/dist/databases/index.js +57 -0
- package/dist/databases/index.js.map +1 -0
- package/dist/digitalocean-friction.policy.d.ts +29 -0
- package/dist/digitalocean-friction.policy.d.ts.map +1 -0
- package/dist/digitalocean-friction.policy.js +21 -0
- package/dist/digitalocean-friction.policy.js.map +1 -0
- package/dist/digitalocean.plugin.d.ts +3 -0
- package/dist/digitalocean.plugin.d.ts.map +1 -0
- package/dist/digitalocean.plugin.js +27 -0
- package/dist/digitalocean.plugin.js.map +1 -0
- package/dist/droplets/index.d.ts +106 -0
- package/dist/droplets/index.d.ts.map +1 -0
- package/dist/droplets/index.js +227 -0
- package/dist/droplets/index.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/inference-control-plane/index.d.ts +63 -0
- package/dist/inference-control-plane/index.d.ts.map +1 -0
- package/dist/inference-control-plane/index.js +93 -0
- package/dist/inference-control-plane/index.js.map +1 -0
- package/dist/infra/billing.d.ts +26 -0
- package/dist/infra/billing.d.ts.map +1 -0
- package/dist/infra/billing.js +43 -0
- package/dist/infra/billing.js.map +1 -0
- package/dist/infra/credentials.d.ts +11 -0
- package/dist/infra/credentials.d.ts.map +1 -0
- package/dist/infra/credentials.js +15 -0
- package/dist/infra/credentials.js.map +1 -0
- package/dist/infra/deployment-provider/deploy-secrets.d.ts +10 -0
- package/dist/infra/deployment-provider/deploy-secrets.d.ts.map +1 -0
- package/dist/infra/deployment-provider/deploy-secrets.js +66 -0
- package/dist/infra/deployment-provider/deploy-secrets.js.map +1 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.d.ts +96 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.d.ts.map +1 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.js +242 -0
- package/dist/infra/deployment-provider/digitalocean-deployment-provider.impl.js.map +1 -0
- package/dist/infra/deployment-provider/image-publish.d.ts +39 -0
- package/dist/infra/deployment-provider/image-publish.d.ts.map +1 -0
- package/dist/infra/deployment-provider/image-publish.js +146 -0
- package/dist/infra/deployment-provider/image-publish.js.map +1 -0
- package/dist/infra/deployment-provider.descriptor.d.ts +34 -0
- package/dist/infra/deployment-provider.descriptor.d.ts.map +1 -0
- package/dist/infra/deployment-provider.descriptor.js +9 -0
- package/dist/infra/deployment-provider.descriptor.js.map +1 -0
- package/dist/infra/digitalocean-infra.plugin.d.ts +101 -0
- package/dist/infra/digitalocean-infra.plugin.d.ts.map +1 -0
- package/dist/infra/digitalocean-infra.plugin.js +283 -0
- package/dist/infra/digitalocean-infra.plugin.js.map +1 -0
- package/dist/infra/doks/clients.d.ts +183 -0
- package/dist/infra/doks/clients.d.ts.map +1 -0
- package/dist/infra/doks/clients.js +172 -0
- package/dist/infra/doks/clients.js.map +1 -0
- package/dist/infra/doks/digitalocean.d.ts +34 -0
- package/dist/infra/doks/digitalocean.d.ts.map +1 -0
- package/dist/infra/doks/digitalocean.js +267 -0
- package/dist/infra/doks/digitalocean.js.map +1 -0
- package/dist/infra/doks/service-release-schemas.d.ts +1037 -0
- package/dist/infra/doks/service-release-schemas.d.ts.map +1 -0
- package/dist/infra/doks/service-release-schemas.js +51 -0
- package/dist/infra/doks/service-release-schemas.js.map +1 -0
- package/dist/infra/doks/service-release.d.ts +415 -0
- package/dist/infra/doks/service-release.d.ts.map +1 -0
- package/dist/infra/doks/service-release.js +3201 -0
- package/dist/infra/doks/service-release.js.map +1 -0
- package/dist/infra/doks/worker.d.ts +14 -0
- package/dist/infra/doks/worker.d.ts.map +1 -0
- package/dist/infra/doks/worker.js +343 -0
- package/dist/infra/doks/worker.js.map +1 -0
- package/dist/infra/droplet.impl.d.ts +172 -0
- package/dist/infra/droplet.impl.d.ts.map +1 -0
- package/dist/infra/droplet.impl.js +379 -0
- package/dist/infra/droplet.impl.js.map +1 -0
- package/dist/infra/functions.impl.d.ts +123 -0
- package/dist/infra/functions.impl.d.ts.map +1 -0
- package/dist/infra/functions.impl.js +202 -0
- package/dist/infra/functions.impl.js.map +1 -0
- package/dist/infra/index.d.ts +15 -0
- package/dist/infra/index.d.ts.map +1 -0
- package/dist/infra/index.js +12 -0
- package/dist/infra/index.js.map +1 -0
- package/dist/infra/inventory.d.ts +7 -0
- package/dist/infra/inventory.d.ts.map +1 -0
- package/dist/infra/inventory.js +259 -0
- package/dist/infra/inventory.js.map +1 -0
- package/dist/infra/kubernetes-log-stream.d.ts +5 -0
- package/dist/infra/kubernetes-log-stream.d.ts.map +1 -0
- package/dist/infra/kubernetes-log-stream.js +186 -0
- package/dist/infra/kubernetes-log-stream.js.map +1 -0
- package/dist/infra/kubernetes-logs.d.ts +33 -0
- package/dist/infra/kubernetes-logs.d.ts.map +1 -0
- package/dist/infra/kubernetes-logs.descriptor.d.ts +14 -0
- package/dist/infra/kubernetes-logs.descriptor.d.ts.map +1 -0
- package/dist/infra/kubernetes-logs.descriptor.js +28 -0
- package/dist/infra/kubernetes-logs.descriptor.js.map +1 -0
- package/dist/infra/kubernetes-logs.js +196 -0
- package/dist/infra/kubernetes-logs.js.map +1 -0
- package/dist/infra/utilization.d.ts +44 -0
- package/dist/infra/utilization.d.ts.map +1 -0
- package/dist/infra/utilization.js +108 -0
- package/dist/infra/utilization.js.map +1 -0
- package/dist/kubernetes/authority.d.ts +40 -0
- package/dist/kubernetes/authority.d.ts.map +1 -0
- package/dist/kubernetes/authority.js +90 -0
- package/dist/kubernetes/authority.js.map +1 -0
- package/dist/kubernetes/encoding.d.ts +4 -0
- package/dist/kubernetes/encoding.d.ts.map +1 -0
- package/dist/kubernetes/encoding.js +8 -0
- package/dist/kubernetes/encoding.js.map +1 -0
- package/dist/kubernetes/index.d.ts +105 -0
- package/dist/kubernetes/index.d.ts.map +1 -0
- package/dist/kubernetes/index.js +99 -0
- package/dist/kubernetes/index.js.map +1 -0
- package/dist/kubernetes/transport.d.ts +11 -0
- package/dist/kubernetes/transport.d.ts.map +1 -0
- package/dist/kubernetes/transport.js +27 -0
- package/dist/kubernetes/transport.js.map +1 -0
- package/dist/network/index.d.ts +24 -0
- package/dist/network/index.d.ts.map +1 -0
- package/dist/network/index.js +16 -0
- package/dist/network/index.js.map +1 -0
- package/dist/registry/index.d.ts +39 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +20 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/schemas/app-deployment.d.ts +1472 -0
- package/dist/schemas/app-deployment.d.ts.map +1 -0
- package/dist/schemas/app-deployment.js +156 -0
- package/dist/schemas/app-deployment.js.map +1 -0
- package/dist/schemas/app-platform.d.ts +755 -0
- package/dist/schemas/app-platform.d.ts.map +1 -0
- package/dist/schemas/app-platform.js +253 -0
- package/dist/schemas/app-platform.js.map +1 -0
- package/dist/schemas/cache-database.d.ts +210 -0
- package/dist/schemas/cache-database.d.ts.map +1 -0
- package/dist/schemas/cache-database.js +105 -0
- package/dist/schemas/cache-database.js.map +1 -0
- package/dist/schemas/control-plane.d.ts +456 -0
- package/dist/schemas/control-plane.d.ts.map +1 -0
- package/dist/schemas/control-plane.js +123 -0
- package/dist/schemas/control-plane.js.map +1 -0
- package/dist/schemas/credential-use.d.ts +714 -0
- package/dist/schemas/credential-use.d.ts.map +1 -0
- package/dist/schemas/credential-use.js +73 -0
- package/dist/schemas/credential-use.js.map +1 -0
- package/dist/schemas/doks-worker.d.ts +4062 -0
- package/dist/schemas/doks-worker.d.ts.map +1 -0
- package/dist/schemas/doks-worker.js +330 -0
- package/dist/schemas/doks-worker.js.map +1 -0
- package/dist/schemas/droplet.d.ts +110 -0
- package/dist/schemas/droplet.d.ts.map +1 -0
- package/dist/schemas/droplet.js +22 -0
- package/dist/schemas/droplet.js.map +1 -0
- package/dist/schemas/functions.d.ts +22 -0
- package/dist/schemas/functions.d.ts.map +1 -0
- package/dist/schemas/functions.js +25 -0
- package/dist/schemas/functions.js.map +1 -0
- package/dist/schemas/gitea-git-hosting.d.ts +20 -0
- package/dist/schemas/gitea-git-hosting.d.ts.map +1 -0
- package/dist/schemas/gitea-git-hosting.js +26 -0
- package/dist/schemas/gitea-git-hosting.js.map +1 -0
- package/dist/schemas/http.d.ts +2594 -0
- package/dist/schemas/http.d.ts.map +1 -0
- package/dist/schemas/http.js +4548 -0
- package/dist/schemas/http.js.map +1 -0
- package/dist/schemas/infra-kinds.d.ts +113 -0
- package/dist/schemas/infra-kinds.d.ts.map +1 -0
- package/dist/schemas/infra-kinds.js +93 -0
- package/dist/schemas/infra-kinds.js.map +1 -0
- package/dist/schemas/kubernetes-responses.d.ts +457 -0
- package/dist/schemas/kubernetes-responses.d.ts.map +1 -0
- package/dist/schemas/kubernetes-responses.js +681 -0
- package/dist/schemas/kubernetes-responses.js.map +1 -0
- package/dist/schemas/kubernetes.d.ts +143 -0
- package/dist/schemas/kubernetes.d.ts.map +1 -0
- package/dist/schemas/kubernetes.js +68 -0
- package/dist/schemas/kubernetes.js.map +1 -0
- package/dist/schemas/logs.d.ts +15 -0
- package/dist/schemas/logs.d.ts.map +1 -0
- package/dist/schemas/logs.js +11 -0
- package/dist/schemas/logs.js.map +1 -0
- package/dist/schemas/object-storage.d.ts +167 -0
- package/dist/schemas/object-storage.d.ts.map +1 -0
- package/dist/schemas/object-storage.js +124 -0
- package/dist/schemas/object-storage.js.map +1 -0
- package/dist/schemas/service-settings.d.ts +9 -0
- package/dist/schemas/service-settings.d.ts.map +1 -0
- package/dist/schemas/service-settings.js +21 -0
- package/dist/schemas/service-settings.js.map +1 -0
- package/dist/schemas/utilization.d.ts +57 -0
- package/dist/schemas/utilization.d.ts.map +1 -0
- package/dist/schemas/utilization.js +58 -0
- package/dist/schemas/utilization.js.map +1 -0
- package/dist/schemas/worker-status.d.ts +22 -0
- package/dist/schemas/worker-status.d.ts.map +1 -0
- package/dist/schemas/worker-status.js +14 -0
- package/dist/schemas/worker-status.js.map +1 -0
- package/dist/schemas/worker.d.ts +125 -0
- package/dist/schemas/worker.d.ts.map +1 -0
- package/dist/schemas/worker.js +129 -0
- package/dist/schemas/worker.js.map +1 -0
- package/dist/secrets/app-platform/app-credentials.impl.d.ts +14 -0
- package/dist/secrets/app-platform/app-credentials.impl.d.ts.map +1 -0
- package/dist/secrets/app-platform/app-credentials.impl.js +237 -0
- package/dist/secrets/app-platform/app-credentials.impl.js.map +1 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.d.ts +6 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.d.ts.map +1 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.js +14 -0
- package/dist/secrets/container-registry/image-publish-settings.descriptor.js.map +1 -0
- package/dist/secrets/doks-secret.descriptor.d.ts +18 -0
- package/dist/secrets/doks-secret.descriptor.d.ts.map +1 -0
- package/dist/secrets/doks-secret.descriptor.js +35 -0
- package/dist/secrets/doks-secret.descriptor.js.map +1 -0
- package/dist/secrets/doks-secret.impl.d.ts +98 -0
- package/dist/secrets/doks-secret.impl.d.ts.map +1 -0
- package/dist/secrets/doks-secret.impl.js +451 -0
- package/dist/secrets/doks-secret.impl.js.map +1 -0
- package/dist/secrets/index.d.ts +4 -0
- package/dist/secrets/index.d.ts.map +1 -0
- package/dist/secrets/index.js +4 -0
- package/dist/secrets/index.js.map +1 -0
- package/dist/secrets/secrets-backend-doks.plugin.d.ts +3 -0
- package/dist/secrets/secrets-backend-doks.plugin.d.ts.map +1 -0
- package/dist/secrets/secrets-backend-doks.plugin.js +35 -0
- package/dist/secrets/secrets-backend-doks.plugin.js.map +1 -0
- package/dist/storage/index.d.ts +50 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +92 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/spaces-keys.d.ts +25 -0
- package/dist/storage/spaces-keys.d.ts.map +1 -0
- package/dist/storage/spaces-keys.js +32 -0
- package/dist/storage/spaces-keys.js.map +1 -0
- package/package.json +172 -4
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build and publish a Dockerfile App image through the Secrets execution owner.
|
|
3
|
+
*/
|
|
4
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
5
|
+
import { spawnWithCredentials } from '@vibesdotdev/secrets/exec';
|
|
6
|
+
export const DIGITALOCEAN_CONTAINER_REGISTRY_HOST = 'registry.digitalocean.com';
|
|
7
|
+
const REGISTRY_TOKEN_ENV_NAME = 'DOCKERCRED_REGISTRY_TOKEN';
|
|
8
|
+
const DIGITALOCEAN_IMAGE_PUBLISH_TIMEOUT_MS = 30 * 60 * 1000;
|
|
9
|
+
const CONTAINER_TOOL_ENV = ['DOCKER_HOST', 'DOCKER_CONFIG', 'DOCKER_CONTEXT', 'KUBECONFIG', 'SSH_AUTH_SOCK'];
|
|
10
|
+
const PUBLISHED_IMAGE_DIGEST_PATTERN = /\bsha256:[a-f0-9]{64}\b/gi;
|
|
11
|
+
/**
|
|
12
|
+
* Extract the immutable manifest digest (`sha256:<64-hex>`) emitted by `docker push`.
|
|
13
|
+
* Refuses when the registry push output reports no immutable digest.
|
|
14
|
+
*/
|
|
15
|
+
export function extractPublishedImageDigest(...outputs) {
|
|
16
|
+
for (const output of outputs) {
|
|
17
|
+
if (!output)
|
|
18
|
+
continue;
|
|
19
|
+
const matches = [...output.matchAll(PUBLISHED_IMAGE_DIGEST_PATTERN)];
|
|
20
|
+
const lastMatch = matches.at(-1)?.[0];
|
|
21
|
+
if (lastMatch)
|
|
22
|
+
return lastMatch.toLowerCase();
|
|
23
|
+
}
|
|
24
|
+
throw new CapabilityError('Published DigitalOcean container image did not report an immutable sha256 digest.', 'UNAVAILABLE', {
|
|
25
|
+
reason: 'digitalocean-image-digest-missing',
|
|
26
|
+
retryable: false,
|
|
27
|
+
recoveryHint: 'Ensure docker push outputs the immutable manifest digest (sha256:<64-hex>).'
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function shouldPublishDigitalOceanContainerImage(input) {
|
|
31
|
+
if (input.doGitRepo)
|
|
32
|
+
return false;
|
|
33
|
+
if (!input.appConfig?.dockerfilePath)
|
|
34
|
+
return false;
|
|
35
|
+
if (input.appConfig.containerImage)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
/** Prefer the immutable build version; fall back to the resolved source commit. */
|
|
40
|
+
export function resolveDigitalOceanImageTag(runtime, sourceCommit) {
|
|
41
|
+
if (sourceCommit)
|
|
42
|
+
return sourceCommit;
|
|
43
|
+
const fromEnv = runtime.getEnv('VIBES_BUILD_VERSION')?.trim();
|
|
44
|
+
if (fromEnv)
|
|
45
|
+
return fromEnv;
|
|
46
|
+
throw new CapabilityError('Cannot publish a DigitalOcean container image without an immutable build version.', 'INVALID_INPUT', { reason: 'digitalocean-image-tag-missing', retryable: false });
|
|
47
|
+
}
|
|
48
|
+
function imagePublishScript() {
|
|
49
|
+
return [
|
|
50
|
+
'set -eu',
|
|
51
|
+
'registry="$1"',
|
|
52
|
+
'dockerfile="$2"',
|
|
53
|
+
'image_ref="$3"',
|
|
54
|
+
'build_version="$4"',
|
|
55
|
+
'shift 4',
|
|
56
|
+
'config_dir="$(mktemp -d "${TMPDIR:-/tmp}/vibes-digitalocean-docker.XXXXXX")"',
|
|
57
|
+
'export DOCKER_CONFIG="$config_dir"',
|
|
58
|
+
'cleanup() { docker logout "$registry" >/dev/null 2>&1 || true; if [ -f "$config_dir/config.json" ]; then rm "$config_dir/config.json"; fi; rmdir "$config_dir"; }',
|
|
59
|
+
'trap cleanup EXIT',
|
|
60
|
+
"trap 'exit 129' HUP",
|
|
61
|
+
"trap 'exit 130' INT",
|
|
62
|
+
"trap 'exit 143' TERM",
|
|
63
|
+
'printf \'%s\' "$' + REGISTRY_TOKEN_ENV_NAME + '" | docker login "$registry" --username token --password-stdin || exit 42',
|
|
64
|
+
'unset ' + REGISTRY_TOKEN_ENV_NAME,
|
|
65
|
+
'docker build --file "$dockerfile" --tag "$image_ref" --build-arg "VIBES_BUILD_VERSION=$build_version" "$@" . || exit 43',
|
|
66
|
+
'docker push "$image_ref" || exit 44'
|
|
67
|
+
].join('\n');
|
|
68
|
+
}
|
|
69
|
+
function failedStep(code) {
|
|
70
|
+
if (code === 42)
|
|
71
|
+
return 'login';
|
|
72
|
+
if (code === 43)
|
|
73
|
+
return 'build';
|
|
74
|
+
if (code === 44)
|
|
75
|
+
return 'push';
|
|
76
|
+
return 'execution';
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the credential reference and spawn one supervised shell through
|
|
80
|
+
* Secrets. Docker login, build and push stay in that process tree; its config
|
|
81
|
+
* directory is temporary and removed on exit. The package never receives the
|
|
82
|
+
* token value, and every child output byte is redacted by the owner.
|
|
83
|
+
*/
|
|
84
|
+
export async function publishDigitalOceanAppImage(input) {
|
|
85
|
+
const { registry, registryCredential } = input.settings;
|
|
86
|
+
const imageRef = `${DIGITALOCEAN_CONTAINER_REGISTRY_HOST}/${registry}/${input.repository}:${input.tag}`;
|
|
87
|
+
const buildSecrets = Object.entries(input.settings.buildSecrets).map(([id, reference], index) => ({
|
|
88
|
+
id, reference, variable: `DOCKERCRED_BUILD_SECRET_${index}`
|
|
89
|
+
}));
|
|
90
|
+
const stdoutChunks = [];
|
|
91
|
+
const stderrChunks = [];
|
|
92
|
+
const child = await spawnWithCredentials(input.runtime, {
|
|
93
|
+
command: 'sh',
|
|
94
|
+
args: [
|
|
95
|
+
'-c',
|
|
96
|
+
imagePublishScript(),
|
|
97
|
+
'digitalocean-image-publish',
|
|
98
|
+
DIGITALOCEAN_CONTAINER_REGISTRY_HOST,
|
|
99
|
+
input.dockerfilePath,
|
|
100
|
+
imageRef,
|
|
101
|
+
input.tag,
|
|
102
|
+
...(input.standaloneContext ? ['--build-context', `vibes-registry-inputs=${input.standaloneContext}`] : []),
|
|
103
|
+
...buildSecrets.flatMap(secret => ['--secret', `id=${secret.id},env=${secret.variable}`])
|
|
104
|
+
],
|
|
105
|
+
cwd: input.appRepositoryRoot,
|
|
106
|
+
timeoutMs: DIGITALOCEAN_IMAGE_PUBLISH_TIMEOUT_MS,
|
|
107
|
+
pass: CONTAINER_TOOL_ENV,
|
|
108
|
+
credentials: {
|
|
109
|
+
[REGISTRY_TOKEN_ENV_NAME]: registryCredential,
|
|
110
|
+
...Object.fromEntries(buildSecrets.map(secret => [secret.variable, secret.reference]))
|
|
111
|
+
},
|
|
112
|
+
audit: { action: 'secrets.spawn', target: 'digitalocean-app-image-publish' },
|
|
113
|
+
output: {
|
|
114
|
+
stdout: (text) => {
|
|
115
|
+
stdoutChunks.push(text);
|
|
116
|
+
input.onLine?.('stdout', text);
|
|
117
|
+
},
|
|
118
|
+
stderr: (text) => {
|
|
119
|
+
stderrChunks.push(text);
|
|
120
|
+
input.onLine?.('stderr', text);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const code = await child.exited;
|
|
125
|
+
if (code !== 0) {
|
|
126
|
+
throw new CapabilityError('DigitalOcean container image publishing failed.', 'UNAVAILABLE', {
|
|
127
|
+
reason: 'digitalocean-image-publish-failed',
|
|
128
|
+
retryable: false,
|
|
129
|
+
details: { step: failedStep(code), exitCode: code }
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
const digest = extractPublishedImageDigest(stdoutChunks.join(''), stderrChunks.join(''));
|
|
133
|
+
return { registryType: 'DOCR', registry, repository: input.repository, tag: input.tag, digest };
|
|
134
|
+
}
|
|
135
|
+
/** Refuse a Dockerfile publish whose delivery settings were never composed. */
|
|
136
|
+
export function requireImagePublishSettings(settings) {
|
|
137
|
+
if (!settings) {
|
|
138
|
+
throw new CapabilityError('Cannot publish a DigitalOcean container image: no registry delivery settings are composed.', 'INVALID_INPUT', {
|
|
139
|
+
reason: 'digitalocean-image-publish-settings-missing',
|
|
140
|
+
retryable: false,
|
|
141
|
+
recoveryHint: 'Compose digitalocean.image-publish settings (registryCredential and registry) in the application descriptors.'
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return settings;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=image-publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-publish.js","sourceRoot":"","sources":["../../../src/infra/deployment-provider/image-publish.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAqB,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIjE,MAAM,CAAC,MAAM,oCAAoC,GAAG,2BAA2B,CAAC;AAChF,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAC5D,MAAM,qCAAqC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAC7D,MAAM,kBAAkB,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,CAAU,CAAC;AACtH,MAAM,8BAA8B,GAAG,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAG,OAAkC;IAChF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM;YAAE,SAAS;QACtB,MAAM,OAAO,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC,CAAC;QACrE,MAAM,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACtC,IAAI,SAAS;YAAE,OAAO,SAAS,CA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C,IAAI,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACzF,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC;AACjG,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,2BAA2B,CAC1C,QAAsD;IAEtD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,MAAM,IAAI,eAAe,CACxB,4FAA4F,EAC5F,eAAe,EACf;YACC,MAAM,EAAE,6CAA6C;YACrD,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,+GAA+G;SAC7H,CACD,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
kind: "infra/deployment-provider";
|
|
4
|
+
runtimes: ("worker" | "browser" | "edge" | "node")[];
|
|
5
|
+
pty: boolean;
|
|
6
|
+
projectionKeys: string[];
|
|
7
|
+
declarations: string[];
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
tags?: string[] | undefined;
|
|
11
|
+
enabled?: boolean | undefined;
|
|
12
|
+
priority?: number | undefined;
|
|
13
|
+
capabilityId?: string | undefined;
|
|
14
|
+
requiredContext?: string[] | undefined;
|
|
15
|
+
optionalContext?: string[] | undefined;
|
|
16
|
+
config?: unknown;
|
|
17
|
+
retention?: string | {
|
|
18
|
+
reason: string;
|
|
19
|
+
maxAgeDays?: number | undefined;
|
|
20
|
+
maxEntries?: number | undefined;
|
|
21
|
+
maxBytes?: number | undefined;
|
|
22
|
+
cascadeFrom?: string | undefined;
|
|
23
|
+
ageField?: string | undefined;
|
|
24
|
+
enforcedBy?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
hardware?: ("consumer" | "cloud")[] | undefined;
|
|
27
|
+
renderer?: {
|
|
28
|
+
module: string;
|
|
29
|
+
export: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
vendor?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
//# sourceMappingURL=deployment-provider.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment-provider.descriptor.d.ts","sourceRoot":"","sources":["../../src/infra/deployment-provider.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAMG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DeploymentProviderDescriptorSchema } from '@vibesdotdev/infra-core/kinds';
|
|
2
|
+
export default DeploymentProviderDescriptorSchema.parse({
|
|
3
|
+
id: 'digitalocean-app',
|
|
4
|
+
kind: 'infra/deployment-provider',
|
|
5
|
+
runtimes: ['node', 'worker'],
|
|
6
|
+
pty: true,
|
|
7
|
+
vendor: 'digitalocean'
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=deployment-provider.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment-provider.descriptor.js","sourceRoot":"","sources":["../../src/infra/deployment-provider.descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AAEnF,eAAe,kCAAkC,CAAC,KAAK,CAAC;IACvD,EAAE,EAAE,kBAAkB;IACtB,IAAI,EAAE,2BAA2B;IACjC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC5B,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,cAAc;CACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** CPU droplet slugs a fleet launch may request: small standard sizes; the 16 GB tier is opt-in via `--size`. */
|
|
2
|
+
export declare const DIGITALOCEAN_DROPLET_ALLOWED_SIZES: readonly ["s-1vcpu-1gb", "s-1vcpu-2gb", "s-2vcpu-2gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-8vcpu-16gb"];
|
|
3
|
+
/**
|
|
4
|
+
* GPU droplet slugs admitted only for a `--gpu` launch, as `/v2/sizes` names
|
|
5
|
+
* them (the Ada slugs measured 2026-10-24 are `gpu-4000adax1-20gb` and
|
|
6
|
+
* `gpu-6000adax1-48gb`, not the `rtx*` spellings).
|
|
7
|
+
*/
|
|
8
|
+
export declare const DIGITALOCEAN_DROPLET_ALLOWED_GPU_SIZES: readonly ["gpu-l40sx1-48gb", "gpu-4000adax1-20gb", "gpu-6000adax1-48gb", "gpu-h100x1-80gb", "gpu-h100x8-640gb", "gpu-mi300x1-192gb", "gpu-mi300x8-1536gb"];
|
|
9
|
+
export declare const DIGITALOCEAN_DROPLET_DEFAULT_SIZE = "s-2vcpu-4gb";
|
|
10
|
+
export declare const DIGITALOCEAN_DROPLET_DEFAULT_REGION = "nyc3";
|
|
11
|
+
/** Stock Ubuntu: the fleet GPU host block installs the NVIDIA driver at boot. */
|
|
12
|
+
export declare const DIGITALOCEAN_DROPLET_DEFAULT_IMAGE = "ubuntu-24-04-x64";
|
|
13
|
+
/**
|
|
14
|
+
* `/v2/sizes` on 2026-10-24 offered no GPU size in `nyc3`; `tor1` offered both
|
|
15
|
+
* L40S and H100. GPU stock moves, so `--region` stays the override.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DIGITALOCEAN_DROPLET_DEFAULT_GPU_REGION = "tor1";
|
|
18
|
+
/**
|
|
19
|
+
* Stock Ubuntu rather than DigitalOcean's driver-bearing `gpu-*-base` image,
|
|
20
|
+
* which refuses to create without an SSH key (the droplet preflight refuses
|
|
21
|
+
* that before any paid call); a fleet host is reached over the relay.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DIGITALOCEAN_DROPLET_DEFAULT_GPU_IMAGE = "ubuntu-24-04-x64";
|
|
24
|
+
/**
|
|
25
|
+
* The DigitalOcean droplet host profile. A powered-off droplet still bills its
|
|
26
|
+
* full hourly rate, so its `advancePause` snapshots the disk and deletes the
|
|
27
|
+
* droplet (`snapshot-destroy`).
|
|
28
|
+
*/
|
|
29
|
+
export declare const digitalOceanDropletSandboxDescriptor: {
|
|
30
|
+
id: string;
|
|
31
|
+
kind: "infra/sandbox";
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
description?: string | undefined;
|
|
34
|
+
tags?: string[] | undefined;
|
|
35
|
+
hardware?: string[] | undefined;
|
|
36
|
+
enabled?: boolean | undefined;
|
|
37
|
+
priority?: number | undefined;
|
|
38
|
+
capabilityId?: string | undefined;
|
|
39
|
+
requiredContext?: string[] | undefined;
|
|
40
|
+
optionalContext?: string[] | undefined;
|
|
41
|
+
retention?: string | {
|
|
42
|
+
reason: string;
|
|
43
|
+
maxAgeDays?: number | undefined;
|
|
44
|
+
maxEntries?: number | undefined;
|
|
45
|
+
maxBytes?: number | undefined;
|
|
46
|
+
cascadeFrom?: string | undefined;
|
|
47
|
+
ageField?: string | undefined;
|
|
48
|
+
enforcedBy?: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
bootstrap?: "entrypoint" | "cloud-init" | undefined;
|
|
51
|
+
hostProfile?: {
|
|
52
|
+
provider: string;
|
|
53
|
+
aliases: string[];
|
|
54
|
+
gpuSizes: string[];
|
|
55
|
+
defaults: {
|
|
56
|
+
size?: string | undefined;
|
|
57
|
+
region?: string | undefined;
|
|
58
|
+
image?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
gpuDefaults: {
|
|
61
|
+
image?: string | undefined;
|
|
62
|
+
region?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
sizes?: string[] | undefined;
|
|
65
|
+
pause?: "snapshot-destroy" | "power-off" | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
entrypoint?: string | undefined;
|
|
68
|
+
image?: string | undefined;
|
|
69
|
+
limits?: {
|
|
70
|
+
cpu?: string | undefined;
|
|
71
|
+
memory?: string | undefined;
|
|
72
|
+
disk?: string | undefined;
|
|
73
|
+
maxSubprocesses?: number | undefined;
|
|
74
|
+
timeoutSeconds?: number | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
outboundProxy?: {
|
|
77
|
+
binding: string;
|
|
78
|
+
allowedHosts: string[];
|
|
79
|
+
workerPath?: string | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
liveView?: boolean | undefined;
|
|
82
|
+
persistent?: boolean | undefined;
|
|
83
|
+
env?: {
|
|
84
|
+
name: string;
|
|
85
|
+
public?: boolean | undefined;
|
|
86
|
+
required?: boolean | undefined;
|
|
87
|
+
value?: string | undefined;
|
|
88
|
+
secret?: boolean | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
storeKey?: string | undefined;
|
|
91
|
+
storeBinding?: boolean | undefined;
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
config?: {
|
|
94
|
+
[x: string]: unknown;
|
|
95
|
+
adapter: string;
|
|
96
|
+
} | undefined;
|
|
97
|
+
};
|
|
98
|
+
/** DigitalOcean API-backed infra implementations; pure infra planning stays in framework owners. */
|
|
99
|
+
declare const digitalOceanInfraPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
|
|
100
|
+
export default digitalOceanInfraPlugin;
|
|
101
|
+
//# sourceMappingURL=digitalocean-infra.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digitalocean-infra.plugin.d.ts","sourceRoot":"","sources":["../../src/infra/digitalocean-infra.plugin.ts"],"names":[],"mappings":"AAqCA,iHAAiH;AACjH,eAAO,MAAM,kCAAkC,sGAOrC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,4JAQzC,CAAC;AAEX,eAAO,MAAM,iCAAiC,gBAAgB,CAAC;AAC/D,eAAO,MAAM,mCAAmC,SAAS,CAAC;AAC1D,iFAAiF;AACjF,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AACrE;;;GAGG;AACH,eAAO,MAAM,uCAAuC,SAAS,CAAC;AAC9D;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,qBAAqB,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB/C,CAAC;AAwBH,oGAAoG;AACpG,QAAA,MAAM,uBAAuB,6CAuP3B,CAAC;AAEH,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import deploymentProviderDescriptor from "./deployment-provider.descriptor.js";
|
|
2
|
+
import { CapabilityError, createRuntimeAsset, createRuntimeImplementation, createRuntimePlugin, loader } from '@vibesdotdev/kernel';
|
|
3
|
+
import { getVibesClient } from '@vibesdotdev/kernel/client';
|
|
4
|
+
import { DigitalOceanDoksWorkerAdapterSchema, DigitalOceanDoksWorkerCreateOptionsSchema } from "../schemas/doks-worker.js";
|
|
5
|
+
import { digitalOceanCredentialSettingsDescriptor, digitalOceanServiceSettingsDescriptor } from "../config/digitalocean.config.descriptor.js";
|
|
6
|
+
import { InfraLogsDescriptorSchema, SandboxDescriptorSchema } from '@vibesdotdev/infra-core/kinds';
|
|
7
|
+
import { kubernetesTransportKind } from "../kubernetes/transport.js";
|
|
8
|
+
import kubernetesLogsDescriptor from "./kubernetes-logs.descriptor.js";
|
|
9
|
+
import { DIGITALOCEAN_IMAGE_PUBLISH_SETTINGS_MANIFEST_ID } from "../secrets/container-registry/image-publish-settings.descriptor.js";
|
|
10
|
+
import { DigitalOceanImagePublishSettingsSchema } from "../schemas/app-deployment.js";
|
|
11
|
+
/** Bind implementation state to the runtime that resolves the descriptor. */
|
|
12
|
+
function bindRuntime(factory) {
|
|
13
|
+
return class RuntimeBoundImplementation {
|
|
14
|
+
constructor(descriptor, context) {
|
|
15
|
+
return factory(context.runtime, descriptor);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** CPU droplet slugs a fleet launch may request: small standard sizes; the 16 GB tier is opt-in via `--size`. */
|
|
20
|
+
export const DIGITALOCEAN_DROPLET_ALLOWED_SIZES = [
|
|
21
|
+
's-1vcpu-1gb',
|
|
22
|
+
's-1vcpu-2gb',
|
|
23
|
+
's-2vcpu-2gb',
|
|
24
|
+
's-2vcpu-4gb',
|
|
25
|
+
's-4vcpu-8gb',
|
|
26
|
+
's-8vcpu-16gb'
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* GPU droplet slugs admitted only for a `--gpu` launch, as `/v2/sizes` names
|
|
30
|
+
* them (the Ada slugs measured 2026-10-24 are `gpu-4000adax1-20gb` and
|
|
31
|
+
* `gpu-6000adax1-48gb`, not the `rtx*` spellings).
|
|
32
|
+
*/
|
|
33
|
+
export const DIGITALOCEAN_DROPLET_ALLOWED_GPU_SIZES = [
|
|
34
|
+
'gpu-l40sx1-48gb',
|
|
35
|
+
'gpu-4000adax1-20gb',
|
|
36
|
+
'gpu-6000adax1-48gb',
|
|
37
|
+
'gpu-h100x1-80gb',
|
|
38
|
+
'gpu-h100x8-640gb',
|
|
39
|
+
'gpu-mi300x1-192gb',
|
|
40
|
+
'gpu-mi300x8-1536gb'
|
|
41
|
+
];
|
|
42
|
+
export const DIGITALOCEAN_DROPLET_DEFAULT_SIZE = 's-2vcpu-4gb';
|
|
43
|
+
export const DIGITALOCEAN_DROPLET_DEFAULT_REGION = 'nyc3';
|
|
44
|
+
/** Stock Ubuntu: the fleet GPU host block installs the NVIDIA driver at boot. */
|
|
45
|
+
export const DIGITALOCEAN_DROPLET_DEFAULT_IMAGE = 'ubuntu-24-04-x64';
|
|
46
|
+
/**
|
|
47
|
+
* `/v2/sizes` on 2026-10-24 offered no GPU size in `nyc3`; `tor1` offered both
|
|
48
|
+
* L40S and H100. GPU stock moves, so `--region` stays the override.
|
|
49
|
+
*/
|
|
50
|
+
export const DIGITALOCEAN_DROPLET_DEFAULT_GPU_REGION = 'tor1';
|
|
51
|
+
/**
|
|
52
|
+
* Stock Ubuntu rather than DigitalOcean's driver-bearing `gpu-*-base` image,
|
|
53
|
+
* which refuses to create without an SSH key (the droplet preflight refuses
|
|
54
|
+
* that before any paid call); a fleet host is reached over the relay.
|
|
55
|
+
*/
|
|
56
|
+
export const DIGITALOCEAN_DROPLET_DEFAULT_GPU_IMAGE = 'ubuntu-24-04-x64';
|
|
57
|
+
/**
|
|
58
|
+
* The DigitalOcean droplet host profile. A powered-off droplet still bills its
|
|
59
|
+
* full hourly rate, so its `advancePause` snapshots the disk and deletes the
|
|
60
|
+
* droplet (`snapshot-destroy`).
|
|
61
|
+
*/
|
|
62
|
+
export const digitalOceanDropletSandboxDescriptor = SandboxDescriptorSchema.parse({
|
|
63
|
+
id: 'digitalocean-droplet',
|
|
64
|
+
kind: 'infra/sandbox',
|
|
65
|
+
name: 'DigitalOcean Droplet Sandbox',
|
|
66
|
+
description: 'Provision an on-demand DigitalOcean Droplet for platform hosts.',
|
|
67
|
+
env: [{ name: 'DIGITALOCEAN_API_TOKEN', required: true, secret: true }],
|
|
68
|
+
config: { adapter: 'digitalocean-droplet' },
|
|
69
|
+
hostProfile: {
|
|
70
|
+
provider: 'do',
|
|
71
|
+
aliases: ['digitalocean'],
|
|
72
|
+
sizes: [...DIGITALOCEAN_DROPLET_ALLOWED_SIZES],
|
|
73
|
+
gpuSizes: [...DIGITALOCEAN_DROPLET_ALLOWED_GPU_SIZES],
|
|
74
|
+
defaults: {
|
|
75
|
+
size: DIGITALOCEAN_DROPLET_DEFAULT_SIZE,
|
|
76
|
+
region: DIGITALOCEAN_DROPLET_DEFAULT_REGION,
|
|
77
|
+
image: DIGITALOCEAN_DROPLET_DEFAULT_IMAGE
|
|
78
|
+
},
|
|
79
|
+
// No GPU size default: a paid GPU host starts only from a declared size.
|
|
80
|
+
gpuDefaults: {
|
|
81
|
+
region: DIGITALOCEAN_DROPLET_DEFAULT_GPU_REGION,
|
|
82
|
+
image: DIGITALOCEAN_DROPLET_DEFAULT_GPU_IMAGE
|
|
83
|
+
},
|
|
84
|
+
pause: 'snapshot-destroy'
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const digitalOceanImagePublishSettingsDescriptor = createRuntimeAsset({
|
|
88
|
+
kind: 'config/manifest',
|
|
89
|
+
id: DIGITALOCEAN_IMAGE_PUBLISH_SETTINGS_MANIFEST_ID,
|
|
90
|
+
name: 'DigitalOcean image publish settings',
|
|
91
|
+
namespace: DIGITALOCEAN_IMAGE_PUBLISH_SETTINGS_MANIFEST_ID,
|
|
92
|
+
description: 'Registry identity and credential reference for Dockerfile image publishing.',
|
|
93
|
+
tier: 'user',
|
|
94
|
+
category: 'integrations',
|
|
95
|
+
schema: DigitalOceanImagePublishSettingsSchema,
|
|
96
|
+
fields: {
|
|
97
|
+
registryCredential: { ui: { label: 'Registry credential reference', component: 'text' } },
|
|
98
|
+
registry: { ui: { label: 'Container registry', component: 'text' } }
|
|
99
|
+
},
|
|
100
|
+
allowedAdapters: ['storage.localdb', 'storage.json'],
|
|
101
|
+
defaultAdapter: 'storage.localdb',
|
|
102
|
+
scope: 'auto',
|
|
103
|
+
customTables: false,
|
|
104
|
+
version: 1,
|
|
105
|
+
internal: false,
|
|
106
|
+
enabled: true
|
|
107
|
+
});
|
|
108
|
+
/** DigitalOcean API-backed infra implementations; pure infra planning stays in framework owners. */
|
|
109
|
+
const digitalOceanInfraPlugin = createRuntimePlugin({
|
|
110
|
+
id: 'integrations-digitalocean/infra',
|
|
111
|
+
name: 'DigitalOcean Infrastructure Vendor Overlay',
|
|
112
|
+
dependencies: ['infra'],
|
|
113
|
+
descriptors: [deploymentProviderDescriptor],
|
|
114
|
+
loaders: [
|
|
115
|
+
loader(deploymentProviderDescriptor.id, { kind: 'infra/deployment-provider' }, () => import("./deployment-provider/digitalocean-deployment-provider.impl.js"))
|
|
116
|
+
],
|
|
117
|
+
onActivate: async (runtime) => {
|
|
118
|
+
if (!runtime.hasKind(kubernetesTransportKind.id))
|
|
119
|
+
runtime.registerKind(kubernetesTransportKind);
|
|
120
|
+
if (runtime.hasKind('config/manifest')) {
|
|
121
|
+
runtime.registerDescriptor('config/manifest', digitalOceanServiceSettingsDescriptor);
|
|
122
|
+
runtime.registerDescriptor('config/manifest', digitalOceanCredentialSettingsDescriptor);
|
|
123
|
+
runtime.registerDescriptor('config/manifest', digitalOceanImagePublishSettingsDescriptor);
|
|
124
|
+
}
|
|
125
|
+
runtime.registerDescriptor('infra/cloud-provider', {
|
|
126
|
+
id: 'digitalocean',
|
|
127
|
+
kind: 'infra/cloud-provider',
|
|
128
|
+
name: 'DigitalOcean cloud provider'
|
|
129
|
+
});
|
|
130
|
+
runtime.registerLoader('infra/cloud-provider', 'digitalocean', async () => {
|
|
131
|
+
const { DigitalOceanProvider } = await import("./doks/digitalocean.js");
|
|
132
|
+
return createRuntimeImplementation({
|
|
133
|
+
id: 'digitalocean',
|
|
134
|
+
kind: 'infra/cloud-provider',
|
|
135
|
+
implementation: bindRuntime((_runtime) => ({
|
|
136
|
+
create: (factoryRuntime, credentials, region) => new DigitalOceanProvider(factoryRuntime, credentials, region)
|
|
137
|
+
}))
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
runtime.registerDescriptor('infra/logs', {
|
|
141
|
+
...kubernetesLogsDescriptor
|
|
142
|
+
});
|
|
143
|
+
runtime.registerLoader('infra/logs', 'doks-logs', async () => {
|
|
144
|
+
const { createDigitalOceanKubernetesLogsImplementation } = await import("./kubernetes-logs.js");
|
|
145
|
+
return createRuntimeImplementation({
|
|
146
|
+
id: 'doks-logs',
|
|
147
|
+
kind: 'infra/logs',
|
|
148
|
+
priority: 10,
|
|
149
|
+
// Passed directly rather than behind a `create` factory: the CLI
|
|
150
|
+
// reports a source's status by probing the implementation for
|
|
151
|
+
// its methods, so a factory reads as a broken adapter.
|
|
152
|
+
implementation: bindRuntime((runtime, descriptor) => createDigitalOceanKubernetesLogsImplementation(runtime, InfraLogsDescriptorSchema.parse(descriptor)))
|
|
153
|
+
});
|
|
154
|
+
}, { priority: 10, origin: 'integrations-digitalocean/infra' });
|
|
155
|
+
runtime.registerDescriptor('infra/inventory', {
|
|
156
|
+
id: 'digitalocean',
|
|
157
|
+
kind: 'infra/inventory',
|
|
158
|
+
name: 'DigitalOcean account inventory',
|
|
159
|
+
description: 'Read-only DigitalOcean account inventory: Kubernetes clusters, droplets, load balancers, ' +
|
|
160
|
+
'volumes, snapshots, App Platform apps, the container registry, and Spaces access-key grants.'
|
|
161
|
+
});
|
|
162
|
+
runtime.registerLoader('infra/inventory', 'digitalocean', async () => {
|
|
163
|
+
const { createDigitalOceanInventoryImplementation } = await import("./inventory.js");
|
|
164
|
+
return createRuntimeImplementation({
|
|
165
|
+
id: 'digitalocean',
|
|
166
|
+
kind: 'infra/inventory',
|
|
167
|
+
priority: 20,
|
|
168
|
+
implementation: bindRuntime((runtime) => ({
|
|
169
|
+
create: (options) => createDigitalOceanInventoryImplementation(runtime, options)
|
|
170
|
+
}))
|
|
171
|
+
});
|
|
172
|
+
}, { priority: 20, origin: 'integrations-digitalocean/infra' });
|
|
173
|
+
runtime.registerDescriptor('runtime/client', {
|
|
174
|
+
id: 'doks-deployment',
|
|
175
|
+
kind: 'runtime/client',
|
|
176
|
+
description: 'Plans and applies workers selected through the open infra/worker adapter descriptor.'
|
|
177
|
+
});
|
|
178
|
+
runtime.registerLoader('runtime/client', 'doks-deployment', async () => ({
|
|
179
|
+
impl: (await import("./doks/clients.js")).DigitalOceanDoksWorkerRuntimeClient
|
|
180
|
+
}));
|
|
181
|
+
runtime.registerDescriptor('runtime/client', {
|
|
182
|
+
id: 'digitalocean-doks-worker',
|
|
183
|
+
kind: 'runtime/client',
|
|
184
|
+
description: 'Plans and applies source-revision-bound DOKS queue workers and image builds.'
|
|
185
|
+
});
|
|
186
|
+
runtime.registerLoader('runtime/client', 'digitalocean-doks-worker', async () => ({
|
|
187
|
+
impl: (await import("./doks/clients.js")).DigitalOceanDoksWorkerRuntimeClient
|
|
188
|
+
}));
|
|
189
|
+
runtime.registerDescriptor('runtime/client', {
|
|
190
|
+
id: 'digitalocean-kubernetes-service-release',
|
|
191
|
+
kind: 'runtime/client',
|
|
192
|
+
description: 'Plans and reconciles allowlisted service-release resources through the DOKS Kubernetes API.'
|
|
193
|
+
});
|
|
194
|
+
runtime.registerLoader('runtime/client', 'digitalocean-kubernetes-service-release', async () => ({
|
|
195
|
+
impl: (await import("./doks/clients.js")).DigitalOceanServiceReleaseRuntimeClient
|
|
196
|
+
}));
|
|
197
|
+
runtime.registerDescriptor('infra/utilization', {
|
|
198
|
+
id: 'digitalocean',
|
|
199
|
+
kind: 'infra/utilization'
|
|
200
|
+
});
|
|
201
|
+
runtime.registerLoader('infra/utilization', 'digitalocean', async () => {
|
|
202
|
+
const { DigitalOceanUtilizationClient } = await import("./utilization.js");
|
|
203
|
+
const { createDigitalOceanProviderControlPlaneClient } = await import("./credentials.js");
|
|
204
|
+
return createRuntimeImplementation({
|
|
205
|
+
id: 'digitalocean',
|
|
206
|
+
kind: 'infra/utilization',
|
|
207
|
+
priority: 20,
|
|
208
|
+
implementation: bindRuntime((runtime) => ({
|
|
209
|
+
// The execution owner takes no options: what mutates the
|
|
210
|
+
// cluster comes from the descriptor the runtime selects, so
|
|
211
|
+
// there is nothing here for a caller to configure.
|
|
212
|
+
create: async () => new DigitalOceanUtilizationClient(await createDigitalOceanProviderControlPlaneClient(runtime))
|
|
213
|
+
}))
|
|
214
|
+
});
|
|
215
|
+
}, { priority: 20, origin: 'integrations-digitalocean/infra' });
|
|
216
|
+
runtime.registerDescriptor('infra/billing', { id: 'digitalocean', kind: 'infra/billing' });
|
|
217
|
+
runtime.registerLoader('infra/billing', 'digitalocean', async () => {
|
|
218
|
+
const { DigitalOceanBillingClient } = await import("./billing.js");
|
|
219
|
+
const { createDigitalOceanProviderControlPlaneClient } = await import("./credentials.js");
|
|
220
|
+
return createRuntimeImplementation({
|
|
221
|
+
id: 'digitalocean',
|
|
222
|
+
kind: 'infra/billing',
|
|
223
|
+
priority: 20,
|
|
224
|
+
implementation: bindRuntime((runtime) => ({
|
|
225
|
+
create: async () => new DigitalOceanBillingClient(await createDigitalOceanProviderControlPlaneClient(runtime))
|
|
226
|
+
}))
|
|
227
|
+
});
|
|
228
|
+
}, { priority: 20, origin: 'integrations-digitalocean/infra' });
|
|
229
|
+
runtime.registerDescriptor('infra/sandbox', digitalOceanDropletSandboxDescriptor);
|
|
230
|
+
runtime.registerLoader('infra/sandbox', 'digitalocean-droplet', async () => {
|
|
231
|
+
const { createDoDropletImpl } = await import("./droplet.impl.js");
|
|
232
|
+
return createRuntimeImplementation({
|
|
233
|
+
id: 'digitalocean-droplet',
|
|
234
|
+
kind: 'infra/sandbox',
|
|
235
|
+
priority: 40,
|
|
236
|
+
implementation: bindRuntime((runtime) => createDoDropletImpl({ runtime }))
|
|
237
|
+
});
|
|
238
|
+
}, { priority: 40, origin: 'integrations-digitalocean/infra' });
|
|
239
|
+
runtime.registerLoader('infra/worker', 'doks-deployment', async () => {
|
|
240
|
+
return createRuntimeImplementation({
|
|
241
|
+
id: 'doks-deployment',
|
|
242
|
+
kind: 'infra/worker',
|
|
243
|
+
priority: 40,
|
|
244
|
+
implementation: bindRuntime((runtime) => ({
|
|
245
|
+
planApply: (...args) => getVibesClient('digitalocean-doks-worker', runtime).then((client) => client.planApply(...args)),
|
|
246
|
+
planBuild: (...args) => getVibesClient('digitalocean-doks-worker', runtime).then((client) => client.planBuild(...args)),
|
|
247
|
+
create: async (input) => {
|
|
248
|
+
const options = DigitalOceanDoksWorkerCreateOptionsSchema.safeParse(input ?? {});
|
|
249
|
+
if (!options.success) {
|
|
250
|
+
throw new CapabilityError('DOKS worker create options are invalid.', 'INVALID_INPUT', {
|
|
251
|
+
reason: 'doks-worker-create-options-invalid',
|
|
252
|
+
cause: options.error
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
const adapter = await getVibesClient('digitalocean-doks-worker', runtime).then((client) => client.create(options.data));
|
|
256
|
+
const adapterContract = DigitalOceanDoksWorkerAdapterSchema.safeParse(adapter);
|
|
257
|
+
if (!adapterContract.success) {
|
|
258
|
+
throw new CapabilityError('DOKS worker adapter did not satisfy its registered contract.', 'INTERNAL', {
|
|
259
|
+
reason: 'doks-worker-adapter-invalid',
|
|
260
|
+
cause: adapterContract.error
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return adapter;
|
|
264
|
+
}
|
|
265
|
+
}))
|
|
266
|
+
});
|
|
267
|
+
}, { priority: 40, origin: 'integrations-digitalocean/infra' });
|
|
268
|
+
runtime.registerLoader('infra/worker', 'digitalocean-functions', async () => {
|
|
269
|
+
const { planDigitalOceanFunctions, reconcileDigitalOceanFunctions } = await import("./functions.impl.js");
|
|
270
|
+
return createRuntimeImplementation({
|
|
271
|
+
id: 'digitalocean-functions',
|
|
272
|
+
kind: 'infra/worker',
|
|
273
|
+
priority: 30,
|
|
274
|
+
implementation: bindRuntime((_runtime) => ({
|
|
275
|
+
plan: planDigitalOceanFunctions,
|
|
276
|
+
reconcile: reconcileDigitalOceanFunctions
|
|
277
|
+
}))
|
|
278
|
+
});
|
|
279
|
+
}, { priority: 30, origin: 'integrations-digitalocean/infra' });
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
export default digitalOceanInfraPlugin;
|
|
283
|
+
//# sourceMappingURL=digitalocean-infra.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digitalocean-infra.plugin.js","sourceRoot":"","sources":["../../src/infra/digitalocean-infra.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EACN,eAAe,EACf,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,MAAM,EAIN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EACN,mCAAmC,EACnC,yCAAyC,EACzC,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