@assemblyline-agents/fly 0.1.0
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 +21 -0
- package/README.md +19 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +337 -0
- package/dist/index.js.map +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenEve contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @assemblyline-agents/fly
|
|
2
|
+
|
|
3
|
+
Official Assembly Line Fly.io deployment plugin.
|
|
4
|
+
|
|
5
|
+
It implements Assembly Line's deploy provider contract for Fly.io: turning a compiled deploy artifact into a Fly app deployment via `flyctl`, using `FLY_API_TOKEN` for authentication. The Assembly Line CLI uses this provider when a project targets Fly.io.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @assemblyline-agents/fly
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Part of Assembly Line
|
|
14
|
+
|
|
15
|
+
This package is part of [Assembly Line](https://github.com/jasonbadeaux/openeve), a vendor-neutral, filesystem-first framework for durable AI agents. See the developer documentation in [docs/developers/](https://github.com/jasonbadeaux/openeve/tree/main/docs/developers) for setup, agent authoring, and deployment guides.
|
|
16
|
+
|
|
17
|
+
## License
|
|
18
|
+
|
|
19
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type AdapterDefinition, type AdapterProviderMetadata, type DeployArtifact, type DeployPublisher, type JsonObject, type ProviderModule, type RunDeployCommand } from "@assemblyline-agents/core";
|
|
2
|
+
/** Metadata owned by this package; the core registry mirrors it as an offline default. */
|
|
3
|
+
export declare const FLY_DEPLOY_PROVIDER_METADATA: AdapterProviderMetadata;
|
|
4
|
+
export declare const openeveProvider: ProviderModule;
|
|
5
|
+
export type { DeployArtifact as DeployArtifactLike, DeployCommandOptions, DeployCommandResult, DeployPlan as DeployPlanLike } from "@assemblyline-agents/core";
|
|
6
|
+
export interface FlyDeployAdapter extends AdapterDefinition {
|
|
7
|
+
kind: "fly";
|
|
8
|
+
}
|
|
9
|
+
export interface FlyDeployOptions extends JsonObject {
|
|
10
|
+
app?: string;
|
|
11
|
+
org?: string;
|
|
12
|
+
region?: string;
|
|
13
|
+
internalPort?: number;
|
|
14
|
+
memory?: string;
|
|
15
|
+
vmSize?: string;
|
|
16
|
+
volumeName?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface FlyDeployPublisherOptions {
|
|
19
|
+
flyBin?: string;
|
|
20
|
+
app: string;
|
|
21
|
+
org?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
internalPort?: number;
|
|
24
|
+
detach?: boolean;
|
|
25
|
+
cwd?: string;
|
|
26
|
+
env?: Record<string, string | undefined>;
|
|
27
|
+
runCommand: RunDeployCommand;
|
|
28
|
+
runInteractiveCommand?: RunDeployCommand;
|
|
29
|
+
volumeName?: string;
|
|
30
|
+
memory?: string;
|
|
31
|
+
vmSize?: string;
|
|
32
|
+
now?: () => Date;
|
|
33
|
+
}
|
|
34
|
+
export declare function flyDeploy(options?: FlyDeployOptions): FlyDeployAdapter;
|
|
35
|
+
/**
|
|
36
|
+
* `flyctl secrets set K=V ...` args for one secret sync (app-scoped, single
|
|
37
|
+
* atomic call). Exported for unit coverage; live behavior is smoke-gated.
|
|
38
|
+
*/
|
|
39
|
+
export declare function flySecretsArgs(keys: string[], secrets: Record<string, string>, options: FlyDeployPublisherOptions): string[];
|
|
40
|
+
export interface FlyVolumeSummary {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
region?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const FLY_RUNTIME_VOLUME_NAME = "openeve_data";
|
|
46
|
+
export declare function createFlyDeployPublisher(options: FlyDeployPublisherOptions): DeployPublisher;
|
|
47
|
+
export declare function flyDeployArgs(artifact: DeployArtifact, options: FlyDeployPublisherOptions): string[];
|
|
48
|
+
export declare function writeFlyConfig(artifact: DeployArtifact, options: Pick<FlyDeployPublisherOptions, "app" | "region" | "internalPort" | "volumeName" | "memory" | "vmSize">): void;
|
|
49
|
+
export declare function inspectFlyRuntimeVolume(options: FlyDeployPublisherOptions): Promise<FlyVolumeSummary | undefined>;
|
|
50
|
+
export declare function ensureFlyRuntimeVolume(artifact: DeployArtifact, options: FlyDeployPublisherOptions): Promise<FlyVolumeSummary | undefined>;
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0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
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import { adapter, shellQuote } from "@assemblyline-agents/core";
|
|
5
|
+
/** Metadata owned by this package; the core registry mirrors it as an offline default. */
|
|
6
|
+
export const FLY_DEPLOY_PROVIDER_METADATA = {
|
|
7
|
+
kind: "fly",
|
|
8
|
+
role: "deploy",
|
|
9
|
+
packageName: "@assemblyline-agents/fly",
|
|
10
|
+
requiredEnv: ["FLY_API_TOKEN"],
|
|
11
|
+
optionalEnv: ["FLY_APP_NAME", "FLY_ORG", "FLY_REGION"],
|
|
12
|
+
capabilities: ["hosted-container-runtime", "persistent-storage", "remote-exec"],
|
|
13
|
+
setup: [
|
|
14
|
+
{
|
|
15
|
+
kind: "deploy",
|
|
16
|
+
name: "fly-app",
|
|
17
|
+
required: true,
|
|
18
|
+
message: "Configure a Fly app name through gateway options, --fly-app, FLY_APP_NAME, or package config before publishing."
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
export const openeveProvider = {
|
|
23
|
+
providers: [
|
|
24
|
+
{
|
|
25
|
+
metadata: FLY_DEPLOY_PROVIDER_METADATA,
|
|
26
|
+
create(ctx) {
|
|
27
|
+
const app = stringOption(ctx.options, "app") ?? ctx.env.FLY_APP_NAME;
|
|
28
|
+
if (!app)
|
|
29
|
+
throw new Error("Fly deploys require an app name through gateway options or FLY_APP_NAME.");
|
|
30
|
+
const region = stringOption(ctx.options, "region") ?? ctx.env.FLY_REGION;
|
|
31
|
+
const flyBin = stringOption(ctx.options, "flyBin");
|
|
32
|
+
const org = stringOption(ctx.options, "org") ?? ctx.env.FLY_ORG;
|
|
33
|
+
const internalPort = numberOption(ctx.options, "internalPort");
|
|
34
|
+
const detach = booleanOption(ctx.options, "detach");
|
|
35
|
+
const cwd = stringOption(ctx.options, "cwd");
|
|
36
|
+
const volumeName = stringOption(ctx.options, "volumeName");
|
|
37
|
+
const memory = stringOption(ctx.options, "memory");
|
|
38
|
+
const vmSize = stringOption(ctx.options, "vmSize");
|
|
39
|
+
return createFlyDeployPublisher({
|
|
40
|
+
...(flyBin ? { flyBin } : {}),
|
|
41
|
+
app,
|
|
42
|
+
...(org ? { org } : {}),
|
|
43
|
+
...(region ? { region } : {}),
|
|
44
|
+
...(internalPort !== undefined ? { internalPort } : {}),
|
|
45
|
+
...(detach !== undefined ? { detach } : {}),
|
|
46
|
+
...(cwd ? { cwd } : {}),
|
|
47
|
+
...(volumeName ? { volumeName } : {}),
|
|
48
|
+
...(memory ? { memory } : {}),
|
|
49
|
+
...(vmSize ? { vmSize } : {}),
|
|
50
|
+
env: ctx.env,
|
|
51
|
+
runCommand: spawnDeployCommand,
|
|
52
|
+
runInteractiveCommand: spawnInteractiveDeployCommand
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
const spawnDeployCommand = (executable, args, options = {}) => {
|
|
59
|
+
return new Promise((resolvePromise, reject) => {
|
|
60
|
+
const child = spawn(executable, args, {
|
|
61
|
+
cwd: options.cwd ?? process.cwd(),
|
|
62
|
+
env: (options.env ?? process.env),
|
|
63
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
64
|
+
});
|
|
65
|
+
let stdout = "";
|
|
66
|
+
let stderr = "";
|
|
67
|
+
child.stdout.on("data", (chunk) => {
|
|
68
|
+
stdout += chunk.toString("utf8");
|
|
69
|
+
});
|
|
70
|
+
child.stderr.on("data", (chunk) => {
|
|
71
|
+
stderr += chunk.toString("utf8");
|
|
72
|
+
});
|
|
73
|
+
child.on("error", reject);
|
|
74
|
+
child.on("close", (code) => {
|
|
75
|
+
resolvePromise({ exitCode: code ?? 1, stdout, stderr });
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const spawnInteractiveDeployCommand = (executable, args, options = {}) => {
|
|
80
|
+
return new Promise((resolvePromise, reject) => {
|
|
81
|
+
const child = spawn(executable, args, {
|
|
82
|
+
cwd: options.cwd ?? process.cwd(),
|
|
83
|
+
env: (options.env ?? process.env),
|
|
84
|
+
stdio: "inherit"
|
|
85
|
+
});
|
|
86
|
+
child.on("error", reject);
|
|
87
|
+
child.on("close", (code) => resolvePromise({ exitCode: code ?? 1, stdout: "", stderr: "" }));
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
export function flyDeploy(options = {}) {
|
|
91
|
+
const metadata = FLY_DEPLOY_PROVIDER_METADATA;
|
|
92
|
+
const definition = { ...adapter("fly", options), kind: "fly" };
|
|
93
|
+
if (metadata.requiredEnv)
|
|
94
|
+
definition.requiredEnv = metadata.requiredEnv;
|
|
95
|
+
if (metadata.capabilities)
|
|
96
|
+
definition.capabilities = metadata.capabilities;
|
|
97
|
+
return definition;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `flyctl secrets set K=V ...` args for one secret sync (app-scoped, single
|
|
101
|
+
* atomic call). Exported for unit coverage; live behavior is smoke-gated.
|
|
102
|
+
*/
|
|
103
|
+
export function flySecretsArgs(keys, secrets, options) {
|
|
104
|
+
const args = ["secrets", "set"];
|
|
105
|
+
for (const key of keys)
|
|
106
|
+
args.push(`${key}=${secrets[key]}`);
|
|
107
|
+
args.push("--app", options.app);
|
|
108
|
+
if (options.detach)
|
|
109
|
+
args.push("--detach");
|
|
110
|
+
return args;
|
|
111
|
+
}
|
|
112
|
+
export const FLY_RUNTIME_VOLUME_NAME = "openeve_data";
|
|
113
|
+
export function createFlyDeployPublisher(options) {
|
|
114
|
+
return {
|
|
115
|
+
target: "fly",
|
|
116
|
+
async syncSecrets(secrets) {
|
|
117
|
+
const flyBin = options.flyBin ?? "flyctl";
|
|
118
|
+
const syncedKeys = [];
|
|
119
|
+
const skippedKeys = [];
|
|
120
|
+
for (const [key, value] of Object.entries(secrets)) {
|
|
121
|
+
(value ? syncedKeys : skippedKeys).push(key);
|
|
122
|
+
}
|
|
123
|
+
if (syncedKeys.length > 0) {
|
|
124
|
+
const commandOptions = {};
|
|
125
|
+
if (options.cwd)
|
|
126
|
+
commandOptions.cwd = options.cwd;
|
|
127
|
+
if (options.env)
|
|
128
|
+
commandOptions.env = options.env;
|
|
129
|
+
const result = await options.runCommand(flyBin, flySecretsArgs(syncedKeys, secrets, options), commandOptions);
|
|
130
|
+
if (result.exitCode !== 0)
|
|
131
|
+
throw new Error(`Fly secret sync failed with exit code ${result.exitCode}.`);
|
|
132
|
+
}
|
|
133
|
+
return { target: "fly", syncedKeys, skippedKeys };
|
|
134
|
+
},
|
|
135
|
+
async runRemoteCommand(artifact, _plan, command, remoteOptions = {}) {
|
|
136
|
+
const flyBin = options.flyBin ?? "flyctl";
|
|
137
|
+
await assertFlySingleMachine(options, true);
|
|
138
|
+
if (artifactRequiresPersistentPath(artifact, "/data")) {
|
|
139
|
+
const volume = await inspectFlyRuntimeVolume(options);
|
|
140
|
+
if (!volume)
|
|
141
|
+
throw new Error("Fly persistent storage is not provisioned. Deploy the agent before running hosted authentication.");
|
|
142
|
+
}
|
|
143
|
+
const args = ["ssh", "console", "--app", options.app];
|
|
144
|
+
if (options.org)
|
|
145
|
+
args.push("--org", options.org);
|
|
146
|
+
if (options.region)
|
|
147
|
+
args.push("--region", options.region);
|
|
148
|
+
if (remoteOptions.interactive)
|
|
149
|
+
args.push("--pty");
|
|
150
|
+
args.push("--command", command.map((part) => shellQuote(part)).join(" "));
|
|
151
|
+
const runner = remoteOptions.interactive && options.runInteractiveCommand
|
|
152
|
+
? options.runInteractiveCommand
|
|
153
|
+
: options.runCommand;
|
|
154
|
+
return runner(flyBin, args, deployCommandOptions(options, remoteOptions.silent));
|
|
155
|
+
},
|
|
156
|
+
async publish(artifact, plan) {
|
|
157
|
+
const volume = await ensureFlyRuntimeVolume(artifact, options);
|
|
158
|
+
if (volume)
|
|
159
|
+
await assertFlySingleMachine(options);
|
|
160
|
+
writeFlyConfig(artifact, options);
|
|
161
|
+
const flyBin = options.flyBin ?? "flyctl";
|
|
162
|
+
const args = flyDeployArgs(artifact, options);
|
|
163
|
+
const commandOptions = {};
|
|
164
|
+
if (options.cwd)
|
|
165
|
+
commandOptions.cwd = options.cwd;
|
|
166
|
+
if (options.env)
|
|
167
|
+
commandOptions.env = options.env;
|
|
168
|
+
const result = await options.runCommand(flyBin, args, commandOptions);
|
|
169
|
+
if (result.exitCode !== 0)
|
|
170
|
+
throw new Error(`Fly deploy failed with exit code ${result.exitCode}.`);
|
|
171
|
+
const receipt = {
|
|
172
|
+
target: "fly",
|
|
173
|
+
status: "published",
|
|
174
|
+
environment: plan.environment,
|
|
175
|
+
agentRevision: plan.agentRevision,
|
|
176
|
+
artifactRoot: artifact.root,
|
|
177
|
+
app: options.app,
|
|
178
|
+
deploymentUrl: flyDeploymentUrl(result.stdout) ?? `https://${options.app}.fly.dev`,
|
|
179
|
+
dashboardUrl: `https://fly.io/apps/${options.app}`,
|
|
180
|
+
...(volume ? { persistentStorage: { mountPath: "/data", volume } } : {}),
|
|
181
|
+
command: { executable: flyBin, args },
|
|
182
|
+
completedAt: (options.now?.() ?? new Date()).toISOString()
|
|
183
|
+
};
|
|
184
|
+
return receipt;
|
|
185
|
+
},
|
|
186
|
+
async destroy(_artifact, plan, destroyOptions = {}) {
|
|
187
|
+
// Destroying a Fly app removes its volumes with it — Fly has no
|
|
188
|
+
// keep-data teardown. Require the explicit data confirmation instead of
|
|
189
|
+
// silently deleting durable state.
|
|
190
|
+
if (!destroyOptions.purgeData) {
|
|
191
|
+
throw new Error(`Fly destroy removes app "${options.app}" including its volumes. Pass --purge-data to confirm.`);
|
|
192
|
+
}
|
|
193
|
+
const flyBin = options.flyBin ?? "flyctl";
|
|
194
|
+
const args = ["apps", "destroy", options.app, "--yes"];
|
|
195
|
+
const result = await options.runCommand(flyBin, args, deployCommandOptions(options));
|
|
196
|
+
if (result.exitCode !== 0)
|
|
197
|
+
throw new Error(`Fly app destroy failed with exit code ${result.exitCode}.`);
|
|
198
|
+
return {
|
|
199
|
+
target: "fly",
|
|
200
|
+
status: "destroyed",
|
|
201
|
+
environment: plan.environment,
|
|
202
|
+
app: options.app,
|
|
203
|
+
dataPurged: true,
|
|
204
|
+
completedAt: (options.now?.() ?? new Date()).toISOString()
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export function flyDeployArgs(artifact, options) {
|
|
210
|
+
const args = ["deploy", artifact.root, "--app", options.app, "--dockerfile", join(artifact.root, "Dockerfile")];
|
|
211
|
+
if (options.region)
|
|
212
|
+
args.push("--primary-region", options.region);
|
|
213
|
+
if (artifactRequiresPersistentPath(artifact, "/data"))
|
|
214
|
+
args.push("--ha=false");
|
|
215
|
+
if (options.detach)
|
|
216
|
+
args.push("--detach");
|
|
217
|
+
return args;
|
|
218
|
+
}
|
|
219
|
+
export function writeFlyConfig(artifact, options) {
|
|
220
|
+
const internalPort = options.internalPort ?? 3000;
|
|
221
|
+
const region = options.region ?? "iad";
|
|
222
|
+
writeFileSync(resolve(artifact.root, "fly.toml"), [
|
|
223
|
+
`app = "${options.app}"`,
|
|
224
|
+
`primary_region = "${region}"`,
|
|
225
|
+
"",
|
|
226
|
+
"[http_service]",
|
|
227
|
+
` internal_port = ${internalPort}`,
|
|
228
|
+
' force_https = true',
|
|
229
|
+
' auto_stop_machines = "stop"',
|
|
230
|
+
" auto_start_machines = true",
|
|
231
|
+
" min_machines_running = 0",
|
|
232
|
+
...(artifactRequiresPersistentPath(artifact, "/data") ? [
|
|
233
|
+
"",
|
|
234
|
+
"[[mounts]]",
|
|
235
|
+
` source = "${options.volumeName ?? FLY_RUNTIME_VOLUME_NAME}"`,
|
|
236
|
+
' destination = "/data"'
|
|
237
|
+
] : []),
|
|
238
|
+
...(options.memory || options.vmSize ? [
|
|
239
|
+
"",
|
|
240
|
+
"[vm]",
|
|
241
|
+
...(options.vmSize ? [` size = "${options.vmSize}"`] : []),
|
|
242
|
+
...(options.memory ? [` memory = "${options.memory}"`] : [])
|
|
243
|
+
] : []),
|
|
244
|
+
"",
|
|
245
|
+
""
|
|
246
|
+
].join("\n"));
|
|
247
|
+
}
|
|
248
|
+
export async function inspectFlyRuntimeVolume(options) {
|
|
249
|
+
const result = await options.runCommand(options.flyBin ?? "flyctl", ["volumes", "list", "--app", options.app, "--json"], deployCommandOptions(options));
|
|
250
|
+
if (result.exitCode !== 0)
|
|
251
|
+
throw new Error(`Fly volume preflight failed with exit code ${result.exitCode}.`);
|
|
252
|
+
const parsed = JSON.parse(result.stdout || "[]");
|
|
253
|
+
const entries = Array.isArray(parsed) ? parsed : isRecord(parsed) && Array.isArray(parsed.volumes) ? parsed.volumes : [];
|
|
254
|
+
const name = options.volumeName ?? FLY_RUNTIME_VOLUME_NAME;
|
|
255
|
+
const region = options.region ?? "iad";
|
|
256
|
+
for (const entry of entries) {
|
|
257
|
+
if (!isRecord(entry))
|
|
258
|
+
continue;
|
|
259
|
+
const entryName = typeof entry.name === "string" ? entry.name : undefined;
|
|
260
|
+
const id = typeof entry.id === "string" ? entry.id : undefined;
|
|
261
|
+
const entryRegion = typeof entry.region === "string" ? entry.region : undefined;
|
|
262
|
+
if (entryName !== name || !id || (entryRegion && entryRegion !== region))
|
|
263
|
+
continue;
|
|
264
|
+
return { id, name: entryName, ...(entryRegion ? { region: entryRegion } : {}) };
|
|
265
|
+
}
|
|
266
|
+
return undefined;
|
|
267
|
+
}
|
|
268
|
+
export async function ensureFlyRuntimeVolume(artifact, options) {
|
|
269
|
+
if (!artifactRequiresPersistentPath(artifact, "/data"))
|
|
270
|
+
return undefined;
|
|
271
|
+
const existing = await inspectFlyRuntimeVolume(options);
|
|
272
|
+
if (existing)
|
|
273
|
+
return existing;
|
|
274
|
+
const name = options.volumeName ?? FLY_RUNTIME_VOLUME_NAME;
|
|
275
|
+
const args = ["volumes", "create", name, "--app", options.app, "--region", options.region ?? "iad", "--yes", "--json"];
|
|
276
|
+
const result = await options.runCommand(options.flyBin ?? "flyctl", args, deployCommandOptions(options));
|
|
277
|
+
if (result.exitCode !== 0)
|
|
278
|
+
throw new Error(`Fly volume provisioning failed with exit code ${result.exitCode}.`);
|
|
279
|
+
return { id: firstJsonString(result.stdout, "id") ?? name, name, region: options.region ?? "iad" };
|
|
280
|
+
}
|
|
281
|
+
async function assertFlySingleMachine(options, requireDeployed = false) {
|
|
282
|
+
const result = await options.runCommand(options.flyBin ?? "flyctl", ["machine", "list", "--app", options.app, "--json"], deployCommandOptions(options));
|
|
283
|
+
if (result.exitCode !== 0) {
|
|
284
|
+
if (requireDeployed)
|
|
285
|
+
throw new Error(`Fly app ${options.app} is not deployed or its Machines could not be inspected.`);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const parsed = JSON.parse(result.stdout || "[]");
|
|
289
|
+
const machines = Array.isArray(parsed) ? parsed : [];
|
|
290
|
+
if (requireDeployed && machines.length === 0) {
|
|
291
|
+
throw new Error(`Fly app ${options.app} is not deployed. Deploy the agent before running hosted authentication.`);
|
|
292
|
+
}
|
|
293
|
+
if (machines.length > 1) {
|
|
294
|
+
throw new Error("Fly Codex OAuth currently supports a single Machine because Fly volumes are Machine-local. Scale the app to one Machine before deploying this artifact.");
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
function artifactRequiresPersistentPath(artifact, path) {
|
|
298
|
+
return artifact.manifest?.deploymentRequirements?.persistentDirectories.some((entry) => entry.path === path) ?? false;
|
|
299
|
+
}
|
|
300
|
+
function deployCommandOptions(options, silent) {
|
|
301
|
+
const commandOptions = {};
|
|
302
|
+
if (options.cwd)
|
|
303
|
+
commandOptions.cwd = options.cwd;
|
|
304
|
+
if (options.env)
|
|
305
|
+
commandOptions.env = options.env;
|
|
306
|
+
if (silent !== undefined)
|
|
307
|
+
commandOptions.silent = silent;
|
|
308
|
+
return commandOptions;
|
|
309
|
+
}
|
|
310
|
+
function firstJsonString(text, key) {
|
|
311
|
+
try {
|
|
312
|
+
const value = JSON.parse(text);
|
|
313
|
+
return isRecord(value) && typeof value[key] === "string" ? value[key] : undefined;
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
return undefined;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function isRecord(value) {
|
|
320
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
321
|
+
}
|
|
322
|
+
function stringOption(options, name) {
|
|
323
|
+
const value = options[name];
|
|
324
|
+
return typeof value === "string" ? value : undefined;
|
|
325
|
+
}
|
|
326
|
+
function numberOption(options, name) {
|
|
327
|
+
const value = options[name];
|
|
328
|
+
return typeof value === "number" ? value : undefined;
|
|
329
|
+
}
|
|
330
|
+
function booleanOption(options, name) {
|
|
331
|
+
const value = options[name];
|
|
332
|
+
return typeof value === "boolean" ? value : undefined;
|
|
333
|
+
}
|
|
334
|
+
function flyDeploymentUrl(text) {
|
|
335
|
+
return /https:\/\/[a-z0-9-]+\.fly\.dev(?:\/\S*)?/iu.exec(text)?.[0]?.replace(/[),.]+$/u, "");
|
|
336
|
+
}
|
|
337
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,OAAO,EACP,UAAU,EAWX,MAAM,2BAA2B,CAAC;AAEnC,0FAA0F;AAC1F,MAAM,CAAC,MAAM,4BAA4B,GAA4B;IACnE,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,CAAC,eAAe,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,YAAY,CAAC;IACtD,YAAY,EAAE,CAAC,0BAA0B,EAAE,oBAAoB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,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,YAAY,CAAC,OAAmB,EAAE,IAAY;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,YAAY,CAAC,OAAmB,EAAE,IAAY;IACrD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,aAAa,CAAC,OAAmB,EAAE,IAAY;IACtD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO,4CAA4C,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC/F,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@assemblyline-agents/fly",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@assemblyline-agents/core": "0.1.0"
|
|
13
|
+
},
|
|
14
|
+
"description": "Official OpenEve Fly.io deployment plugin.",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.19.0"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/jasonbadeaux/openeve.git",
|
|
25
|
+
"directory": "packages/fly"
|
|
26
|
+
},
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/jasonbadeaux/openeve/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/jasonbadeaux/openeve#readme",
|
|
31
|
+
"author": "OpenEve contributors",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"openeve",
|
|
34
|
+
"ai",
|
|
35
|
+
"agents",
|
|
36
|
+
"fly",
|
|
37
|
+
"deployment",
|
|
38
|
+
"hosting",
|
|
39
|
+
"plugin"
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"check": "tsc -p tsconfig.json --noEmit"
|
|
47
|
+
}
|
|
48
|
+
}
|