@framers/agentos-ext-cloud-digitalocean 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -0
- package/manifest.json +3 -3
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# DigitalOcean cloud
|
|
2
|
+
|
|
3
|
+
This pack gives agents tools to create App Platform apps and Droplets, trigger deployments, list or delete resources, and manage domains and DNS records. It uses the DigitalOcean REST API with bearer-token authentication.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @framers/agentos-ext-cloud-digitalocean
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependency: `@framers/agentos` with range `>=0.10.40`.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AgentOS } from '@framers/agentos';
|
|
17
|
+
|
|
18
|
+
const agentos = await AgentOS.create({
|
|
19
|
+
extensionManifest: {
|
|
20
|
+
packs: [
|
|
21
|
+
{
|
|
22
|
+
package: '@framers/agentos-ext-cloud-digitalocean',
|
|
23
|
+
options: {
|
|
24
|
+
token: process.env.DIGITALOCEAN_TOKEN ?? process.env.DO_API_TOKEN,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
| Option | Secret id | Environment variable | Required | Default |
|
|
35
|
+
| --- | --- | --- | --- | --- |
|
|
36
|
+
| `token` | `digitalocean.token` | `DIGITALOCEAN_TOKEN`, then `DO_API_TOKEN` | Yes | Empty string |
|
|
37
|
+
| `secrets` | | | No | `context.secrets`, then `{}` |
|
|
38
|
+
|
|
39
|
+
Explicit options take precedence over secrets, then environment variables. `options.secrets` takes precedence over `context.secrets`.
|
|
40
|
+
|
|
41
|
+
## Tools
|
|
42
|
+
|
|
43
|
+
| Tool | What it does |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `doCreateApp` | Creates an App Platform service or static site from a Git repository. |
|
|
46
|
+
| `doCreateDroplet` | Creates a Droplet with a specified region, size, OS image, and optional setup fields. |
|
|
47
|
+
| `doListResources` | Lists apps, Droplets, or both, with an optional Droplet tag filter. |
|
|
48
|
+
| `doDeployApp` | Triggers a deployment on an existing app with an optional full rebuild. |
|
|
49
|
+
| `doManageDns` | Lists or adds domains and creates, reads, updates, or deletes DNS records. |
|
|
50
|
+
| `doDeleteResource` | Permanently deletes an App Platform app or Droplet. |
|
|
51
|
+
|
|
52
|
+
### `doCreateApp`
|
|
53
|
+
|
|
54
|
+
| Parameter | Type | Required | Description |
|
|
55
|
+
| --- | --- | --- | --- |
|
|
56
|
+
| `name` | string | Yes | App name using lowercase alphanumeric characters and hyphens. |
|
|
57
|
+
| `gitUrl` | string | Yes | Git repository clone URL. |
|
|
58
|
+
| `branch` | string | No | Git branch to deploy, default `main`. |
|
|
59
|
+
| `region` | string | No | Region slug, default `nyc`. |
|
|
60
|
+
| `buildCommand` | string | No | Build command override. |
|
|
61
|
+
| `runCommand` | string | No | Run command for services. |
|
|
62
|
+
| `outputDir` | string | No | Output directory for static sites. |
|
|
63
|
+
| `isStatic` | boolean | No | Deploy as a static site, default `false`, which deploys a service. |
|
|
64
|
+
| `envVars` | object | No | Environment variables as key-value pairs. |
|
|
65
|
+
| `instanceSizeSlug` | string | No | Instance size slug. |
|
|
66
|
+
|
|
67
|
+
### `doCreateDroplet`
|
|
68
|
+
|
|
69
|
+
| Parameter | Type | Required | Description |
|
|
70
|
+
| --- | --- | --- | --- |
|
|
71
|
+
| `name` | string | Yes | Droplet hostname. |
|
|
72
|
+
| `region` | string | Yes | Region slug. |
|
|
73
|
+
| `size` | string | Yes | Size slug. |
|
|
74
|
+
| `image` | string | Yes | Image slug or ID. |
|
|
75
|
+
| `sshKeys` | (string or number)[] | No | SSH key IDs or fingerprints to embed in the Droplet. |
|
|
76
|
+
| `userData` | string | No | Cloud-init user data script for automated setup. |
|
|
77
|
+
| `backups` | boolean | No | Enable weekly backups, default `false`. |
|
|
78
|
+
| `ipv6` | boolean | No | Enable IPv6 networking, default `false`. |
|
|
79
|
+
| `tags` | string[] | No | Tags for organization and filtering. |
|
|
80
|
+
|
|
81
|
+
### `doListResources`
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Required | Description |
|
|
84
|
+
| --- | --- | --- | --- |
|
|
85
|
+
| `resourceType` | string: `apps`, `droplets`, `all` | No | Resource type to list, default `all`. |
|
|
86
|
+
| `page` | number | No | Page number, default 1. |
|
|
87
|
+
| `perPage` | number | No | Items per page, default 20, schema description maximum 200. |
|
|
88
|
+
| `tag` | string | No | Filter Droplets by tag name. |
|
|
89
|
+
|
|
90
|
+
### `doDeployApp`
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Required | Description |
|
|
93
|
+
| --- | --- | --- | --- |
|
|
94
|
+
| `appId` | string | Yes | App ID to deploy, available from `doListResources`. |
|
|
95
|
+
| `forceBuild` | boolean | No | Force a complete rebuild instead of an incremental build, default `false`. |
|
|
96
|
+
|
|
97
|
+
### `doManageDns`
|
|
98
|
+
|
|
99
|
+
| Parameter | Type | Required | Description |
|
|
100
|
+
| --- | --- | --- | --- |
|
|
101
|
+
| `action` | string: `list-domains`, `add-domain`, `list`, `add`, `update`, `delete` | Yes | Action to perform on DNS. |
|
|
102
|
+
| `domain` | string | No | Domain name, required except for `list-domains`. |
|
|
103
|
+
| `recordId` | number | No | Record ID, required for update and delete. |
|
|
104
|
+
| `recordType` | string | No | DNS record type, such as `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `NS`, or `CAA`. |
|
|
105
|
+
| `name` | string | No | Record name or hostname. |
|
|
106
|
+
| `data` | string | No | Record data or value, such as an IP address, CNAME target, or MX server. |
|
|
107
|
+
| `ttl` | number | No | Time-to-live in seconds, schema description default 1800. |
|
|
108
|
+
| `priority` | number | No | Priority for MX and SRV records. |
|
|
109
|
+
| `port` | number | No | Port for SRV records. |
|
|
110
|
+
| `weight` | number | No | Weight for SRV records. |
|
|
111
|
+
|
|
112
|
+
### `doDeleteResource`
|
|
113
|
+
|
|
114
|
+
| Parameter | Type | Required | Description |
|
|
115
|
+
| --- | --- | --- | --- |
|
|
116
|
+
| `resourceType` | string: `app`, `droplet` | Yes | Resource type to delete. |
|
|
117
|
+
| `resourceId` | string | Yes | App UUID or numeric Droplet ID to delete. |
|
|
118
|
+
|
|
119
|
+
## Notes
|
|
120
|
+
|
|
121
|
+
Activation fails when the token is missing and validates supplied tokens by fetching account information.
|
|
122
|
+
|
|
123
|
+
App and Droplet creation provision remote resources. Service apps use the fixed environment slug `node-js` and default size `basic-xxs`. Static sites default `outputDir` to `build`. App variables use type `GENERAL` with scope `RUN_AND_BUILD_TIME`.
|
|
124
|
+
|
|
125
|
+
Deployment triggers a remote build and returns its phase without waiting for completion. Resource deletion is permanent and destroys associated data according to the deletion tool's description. A Droplet ID that cannot be parsed as a number returns an error.
|
|
126
|
+
|
|
127
|
+
DNS actions add domains and add, update, or delete records. All actions except `list-domains` require `domain`; adding a record also requires `recordType`, `name`, and `data`; updating or deleting requires `recordId`. The request code omits `ttl` when it is absent; the response mapping uses the schema description's default when the response omits it.
|
|
128
|
+
|
|
129
|
+
Resource listing fetches the requested page and does not enforce the schema description's `perPage` maximum. Domain and record listing do not follow pagination.
|
|
130
|
+
|
|
131
|
+
## License
|
|
132
|
+
|
|
133
|
+
Apache-2.0
|
package/manifest.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
|
|
3
3
|
"id": "com.framers.cloud.digitalocean",
|
|
4
4
|
"name": "DigitalOcean Cloud Management",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.3",
|
|
6
6
|
"description": "Manage DigitalOcean App Platform apps, Droplets, DNS records, and deployments. Supports creating and deploying PaaS apps from Git, provisioning VPS droplets, and full DNS record management.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Frame.dev",
|
|
9
9
|
"email": "support@frame.dev",
|
|
10
10
|
"url": "https://github.com/framerslab"
|
|
11
11
|
},
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
13
|
"keywords": ["cloud", "digitalocean", "droplet", "app-platform", "dns", "vps", "paas"],
|
|
14
|
-
"agentosVersion": "
|
|
14
|
+
"agentosVersion": ">=0.10.40",
|
|
15
15
|
"categories": ["tool", "cloud"],
|
|
16
16
|
"platforms": [],
|
|
17
17
|
"sdk": "none",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@framers/agentos-ext-cloud-digitalocean",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "DigitalOcean cloud extension — manage App Platform apps, Droplets, DNS records, and deployments via the DigitalOcean REST API.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/jddunn"
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
|
-
"license": "
|
|
38
|
+
"license": "Apache-2.0",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
41
|
"url": "git+https://github.com/framerslab/agentos-extensions.git",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"rimraf": "^5.0.7",
|
|
53
53
|
"typescript": "^5.4.5",
|
|
54
54
|
"vitest": "^3.2.7",
|
|
55
|
-
"@framers/agentos": "^0.
|
|
55
|
+
"@framers/agentos": "^0.13.47"
|
|
56
56
|
},
|
|
57
57
|
"homepage": "https://github.com/framerslab/agentos-extensions/tree/master/registry/curated/cloud/digitalocean#readme",
|
|
58
58
|
"bugs": {
|