@framers/agentos-ext-cloud-railway 0.1.2 → 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 ADDED
@@ -0,0 +1,96 @@
1
+ # Railway cloud
2
+
3
+ This pack gives an agent tools to create or redeploy services, list projects and services, provision database plugins, and retrieve deployment or build logs through the Railway GraphQL API.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @framers/agentos-ext-cloud-railway
9
+ ```
10
+
11
+ Peer dependency: `@framers/agentos` `>=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-railway',
23
+ options: {
24
+ token: process.env.RAILWAY_TOKEN,
25
+ },
26
+ },
27
+ ],
28
+ },
29
+ });
30
+ ```
31
+
32
+ ## Configuration
33
+
34
+ | Option | Secret id | Environment variable | Required | Default |
35
+ | --- | --- | --- | --- | --- |
36
+ | `token` | `railway.token` | `RAILWAY_TOKEN` | Yes | Empty string |
37
+ | `secrets` | `railway.token` | None | No | Context `secrets`, then an empty object |
38
+
39
+ The token resolves from `options.token`, the selected secret map, then the environment variable. `options.secrets` takes precedence over context `secrets`.
40
+
41
+ ## Tools
42
+
43
+ | Tool | What it does |
44
+ | --- | --- |
45
+ | `railwayDeployService` | Creates a service from a GitHub repository or redeploys an existing service with optional environment variables. |
46
+ | `railwayListServices` | Lists projects with their environments and services, optionally filtered by project ID. |
47
+ | `railwayAddDatabase` | Provisions a PostgreSQL, Redis, MySQL, or MongoDB database plugin in a project. |
48
+ | `railwayGetLogs` | Retrieves timestamped deployment or build log entries with severity levels. |
49
+
50
+ ### `railwayDeployService`
51
+
52
+ | Parameter | Type | Required | Description |
53
+ | --- | --- | --- | --- |
54
+ | `projectId` | string | No | Project ID to deploy into; a new project is created if omitted and `projectName` is given. |
55
+ | `projectName` | string | No | Name for a new project, used only when `projectId` is omitted. |
56
+ | `repo` | string | No | GitHub repository, such as `user/repo`; described as required for new services. |
57
+ | `serviceName` | string | No | Name for the service. |
58
+ | `serviceId` | string | No | Existing service ID to redeploy and rebuild the latest commit. |
59
+ | `environmentId` | string | No | Environment ID for redeployment; the schema describes it as required with `serviceId` and defaulting to production. |
60
+ | `variables` | object | No | Environment variables as key-value pairs. |
61
+
62
+ ### `railwayListServices`
63
+
64
+ | Parameter | Type | Required | Description |
65
+ | --- | --- | --- | --- |
66
+ | `projectId` | string | No | Filter to a project ID; lists all projects if omitted. |
67
+
68
+ ### `railwayAddDatabase`
69
+
70
+ | Parameter | Type | Required | Description |
71
+ | --- | --- | --- | --- |
72
+ | `projectId` | string | Yes | Railway project ID to add the database to. |
73
+ | `plugin` | string | Yes | Database type: `postgresql`, `redis`, `mysql`, or `mongodb`. |
74
+
75
+ ### `railwayGetLogs`
76
+
77
+ | Parameter | Type | Required | Description |
78
+ | --- | --- | --- | --- |
79
+ | `deploymentId` | string | Yes | Deployment ID to retrieve logs for. |
80
+ | `type` | string | No | `deploy` for runtime logs or `build` for build logs; default: `deploy`. |
81
+
82
+ ## Notes
83
+
84
+ Activation requires a Railway API token. It queries the current user and fails if the token is missing, the request fails, or no user ID is returned.
85
+
86
+ Service creation, project creation, redeployment, database provisioning, and variable updates modify remote resources.
87
+
88
+ Redeployment requires both `serviceId` and `environmentId` in execution. There is no production environment fallback for this path. Without both fields, the tool creates a service, even if `serviceId` is supplied. If `projectId` is absent, it creates a project using `projectName` or a generated timestamp-based name. The schema has no required fields, and execution permits creating a service without `repo`.
89
+
90
+ For a new service, variables are written after service creation to the first non-ephemeral project environment, or the first environment if none is non-ephemeral. If there is no environment, the variable write is skipped. For redeployment, variables are written before triggering the redeploy.
91
+
92
+ Redeployment fetches the latest deployment without waiting for completion. If none is returned, its ID is empty and its status is `unknown`. Log retrieval returns an array from a GraphQL query.
93
+
94
+ ## License
95
+
96
+ Apache-2.0
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://agentos.sh/schemas/extension-manifest-v1.json",
3
3
  "id": "com.framers.cloud.railway",
4
4
  "name": "Railway Cloud Deployment",
5
- "version": "0.1.2",
5
+ "version": "0.1.3",
6
6
  "description": "Deploy services to Railway, manage projects and environments, provision database plugins (Postgres, Redis, MySQL, MongoDB), and stream deployment logs via the Railway GraphQL API.",
7
7
  "author": {
8
8
  "name": "Frame.dev",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framers/agentos-ext-cloud-railway",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Railway cloud deployment extension — deploy services, manage projects, provision databases, and retrieve logs via the Railway GraphQL API.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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.13.40"
55
+ "@framers/agentos": "^0.13.47"
56
56
  },
57
57
  "homepage": "https://github.com/framerslab/agentos-extensions/tree/master/registry/curated/cloud/railway#readme",
58
58
  "bugs": {