@agentage/cli 0.44.0 → 0.45.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/README.md +2 -1
- package/dist/commands/extension/build.d.ts +3 -1
- package/dist/commands/extension/build.js +14 -1
- package/dist/commands/extension/kit-tool.d.ts +1 -1
- package/dist/commands/extension/list.d.ts +2 -0
- package/dist/commands/extension/list.js +3 -1
- package/dist/commands/extension/release-guard.d.ts +14 -0
- package/dist/commands/extension/release-guard.js +64 -0
- package/dist/commands/extension/release.d.ts +14 -0
- package/dist/commands/extension/release.js +110 -0
- package/dist/program.d.ts +2 -0
- package/dist/program.js +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -66,8 +66,9 @@ For extensions (see below):
|
|
|
66
66
|
| `agentage extension list` | One row per extension: state, version, commands, last run |
|
|
67
67
|
| `agentage extension doctor` | Load every extension once and refresh the states |
|
|
68
68
|
| `agentage extension create <id> [part...]` | New `./extension-<id>` from the template, only the parts named |
|
|
69
|
-
| `agentage extension check [dir]`
|
|
69
|
+
| `agentage extension check [dir] [--write]` | Check that an extension package conforms (the six kit rules) |
|
|
70
70
|
| `agentage extension build [--push]` | Build the part images of a committed tree; push with digests |
|
|
71
|
+
| `agentage extension release` | Release from a tag in CI: guard, images, record, npm package |
|
|
71
72
|
| `agentage extension up` / `down` | Run an extension package on this machine with Docker, then stop |
|
|
72
73
|
| `agentage extension token --scope <scope>` | Print a token from the dev issuer `extension up` started |
|
|
73
74
|
| `agentage <command>` | Run a command an installed extension contributes |
|
|
@@ -5,8 +5,10 @@ export type ExtensionBuildOptions = Pick<BuildOptions, 'push' | 'dir' | 'registr
|
|
|
5
5
|
export type ExtensionCheckOptions = {
|
|
6
6
|
dir?: string;
|
|
7
7
|
json?: boolean;
|
|
8
|
+
write?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export
|
|
10
|
+
export type LoadWriter = () => Promise<Record<string, unknown>>;
|
|
11
|
+
export declare const runExtensionCheck: ({ dir, json, write }?: ExtensionCheckOptions, tool?: LoadKitTool, writer?: LoadWriter) => Promise<void>;
|
|
10
12
|
export type Committed = (dir: string) => Promise<void>;
|
|
11
13
|
export declare const assertCommitted: Committed;
|
|
12
14
|
export declare const runExtensionBuild: (opts?: ExtensionBuildOptions, tool?: LoadKitTool, committed?: Committed) => Promise<void>;
|
|
@@ -2,8 +2,20 @@ import { execFile } from 'node:child_process';
|
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
3
|
import {} from 'commander';
|
|
4
4
|
import { loadKitTool } from './kit-tool.js';
|
|
5
|
+
// Not in the 0.5.0 types yet: the kit lane adds it in 0.5.1.
|
|
6
|
+
const loadWriter = () => import('@agentage/extension/tool');
|
|
7
|
+
// With --json the written paths go to stderr, so stdout stays one JSON document.
|
|
8
|
+
const writeContracts = async (dir, writer, json) => {
|
|
9
|
+
const write = (await writer())['writeContracts'];
|
|
10
|
+
if (typeof write !== 'function')
|
|
11
|
+
throw new Error('check --write needs @agentage/extension >= 0.5.1');
|
|
12
|
+
for (const file of await write(dir))
|
|
13
|
+
(json ? console.error : console.log)(`wrote ${file}`);
|
|
14
|
+
};
|
|
5
15
|
// The kit's lines, or its report as JSON, on stdout; a package that does not conform exits 1.
|
|
6
|
-
export const runExtensionCheck = async ({ dir = '.', json } = {}, tool = loadKitTool) => {
|
|
16
|
+
export const runExtensionCheck = async ({ dir = '.', json, write } = {}, tool = loadKitTool, writer = loadWriter) => {
|
|
17
|
+
if (write)
|
|
18
|
+
await writeContracts(dir, writer, json);
|
|
7
19
|
const { check, checkLines } = await tool();
|
|
8
20
|
const report = await check(dir);
|
|
9
21
|
const lines = checkLines(report);
|
|
@@ -42,6 +54,7 @@ export const addBuild = (group, { check, build }) => {
|
|
|
42
54
|
.description('Check that an extension package conforms, as every build does first')
|
|
43
55
|
.argument('[dir]', 'the extension package folder (default: the current folder)')
|
|
44
56
|
.option('--json', 'machine-readable report')
|
|
57
|
+
.option('--write', 'write the committed contracts (such as {id}.mcpc.json) first, then check')
|
|
45
58
|
.action((dir, opts) => check({ dir, ...opts }));
|
|
46
59
|
group
|
|
47
60
|
.command('build')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as Kit from '@agentage/extension/tool';
|
|
2
2
|
import { type KitCheck } from '../../core/loader/load.js';
|
|
3
|
-
export type KitTool = Pick<typeof Kit, 'check' | 'checkLines' | 'build' | 'buildLines' | 'runCommand' | 'checkCli' | 'up' | 'down' | 'token'>;
|
|
3
|
+
export type KitTool = Pick<typeof Kit, 'check' | 'checkLines' | 'build' | 'buildLines' | 'runCommand' | 'checkCli' | 'up' | 'down' | 'token' | 'readManifest'>;
|
|
4
4
|
export type LoadKitTool = () => Promise<KitTool>;
|
|
5
5
|
export declare const loadKitTool: LoadKitTool;
|
|
6
6
|
export declare const kitCheck: (tool?: LoadKitTool) => KitCheck;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Command } from 'commander';
|
|
2
2
|
import { type BuildActions } from './build.js';
|
|
3
|
+
import { type ExtensionReleaseOptions } from './release.js';
|
|
3
4
|
import { type ExtensionCreateOptions } from './create.js';
|
|
4
5
|
import { type ExtensionDoctorOptions } from './doctor.js';
|
|
5
6
|
import { type ExtensionInstallOptions } from './install.js';
|
|
@@ -18,5 +19,6 @@ export interface ExtensionActions extends KitActions, BuildActions {
|
|
|
18
19
|
list: (opts: ExtensionListOptions) => Promise<void>;
|
|
19
20
|
doctor: (opts: ExtensionDoctorOptions) => Promise<void>;
|
|
20
21
|
create: (opts: ExtensionCreateOptions) => Promise<void>;
|
|
22
|
+
release: (opts: ExtensionReleaseOptions) => Promise<void>;
|
|
21
23
|
}
|
|
22
24
|
export declare const registerExtension: (program: Command, actions: ExtensionActions) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {} from 'commander';
|
|
2
2
|
import { addBuild } from './build.js';
|
|
3
|
+
import { addRelease } from './release.js';
|
|
3
4
|
import { addCreate } from './create.js';
|
|
4
5
|
import {} from './doctor.js';
|
|
5
6
|
import {} from './install.js';
|
|
@@ -98,7 +99,7 @@ const addReports = (group, { list, doctor }) => {
|
|
|
98
99
|
.addHelpText('after', DOCTOR_HELP)
|
|
99
100
|
.action(doctor);
|
|
100
101
|
};
|
|
101
|
-
// Help lists the subcommands in this order: install, remove, list, doctor, create, check, build, up, down, token.
|
|
102
|
+
// Help lists the subcommands in this order: install, remove, list, doctor, create, check, build, release, up, down, token.
|
|
102
103
|
export const registerExtension = (program, actions) => {
|
|
103
104
|
const group = program
|
|
104
105
|
.command('extension')
|
|
@@ -109,5 +110,6 @@ export const registerExtension = (program, actions) => {
|
|
|
109
110
|
addReports(group, actions);
|
|
110
111
|
addCreate(group, actions.create);
|
|
111
112
|
addBuild(group, actions);
|
|
113
|
+
addRelease(group, actions.release);
|
|
112
114
|
addKitTools(group, actions);
|
|
113
115
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuiltImage } from '@agentage/extension/tool';
|
|
2
|
+
export type Ran = {
|
|
3
|
+
ok: boolean;
|
|
4
|
+
out: string;
|
|
5
|
+
err: string;
|
|
6
|
+
};
|
|
7
|
+
export type Exec = (cmd: string, args: string[], env?: NodeJS.ProcessEnv) => Promise<Ran>;
|
|
8
|
+
export declare const execIn: (cwd: string, seconds?: number) => Exec;
|
|
9
|
+
export declare const RECORD = "agentage-extension.json";
|
|
10
|
+
export declare const IMAGE_PARTS: readonly BuiltImage['part'][];
|
|
11
|
+
export type GuardInput = Record<'dir' | 'tag' | 'sha' | 'repo' | 'id' | 'version', string> & {
|
|
12
|
+
parts: readonly BuiltImage['part'][];
|
|
13
|
+
};
|
|
14
|
+
export declare const releaseGuard: (g: GuardInput, exec: Exec) => Promise<"build" | "reuse">;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
const ran = (error, out, err) => ({ ok: !error, out, err });
|
|
5
|
+
// Bounded by SIGKILL after `seconds` (0 = unbounded); a kill reads as "cannot tell".
|
|
6
|
+
export const execIn = (cwd, seconds = 0) => (cmd, args, env) => new Promise((resolve) => {
|
|
7
|
+
const limits = {
|
|
8
|
+
timeout: seconds * 1000,
|
|
9
|
+
killSignal: 'SIGKILL',
|
|
10
|
+
maxBuffer: 1 << 26,
|
|
11
|
+
};
|
|
12
|
+
const opts = { cwd, env: { ...process.env, ...env }, ...limits };
|
|
13
|
+
const child = execFile(cmd, args, opts, (e, out, err) => {
|
|
14
|
+
const why = e?.killed ? `timed out after ${seconds} s` : err ? '' : e?.message;
|
|
15
|
+
resolve(ran(e, out, [err.trim(), why].filter(Boolean).join('\n')));
|
|
16
|
+
});
|
|
17
|
+
child.stdin?.end();
|
|
18
|
+
});
|
|
19
|
+
export const RECORD = 'agentage-extension.json';
|
|
20
|
+
export const IMAGE_PARTS = ['pages', 'ui', 'api', 'mcp', 'worker'];
|
|
21
|
+
// Only "not found" means "not released"; any other failure stops the release, never rebuilds it.
|
|
22
|
+
const notFound = (ran, pattern, what) => {
|
|
23
|
+
if (!pattern.test(ran.err))
|
|
24
|
+
throw new Error(`cannot tell whether ${what} exists: ${ran.err}`);
|
|
25
|
+
};
|
|
26
|
+
const reuse = async ({ dir, tag, sha }, json) => {
|
|
27
|
+
const { commit } = JSON.parse(json);
|
|
28
|
+
if (commit !== sha) {
|
|
29
|
+
const moved = `${tag} was released from ${String(commit)}, not ${sha}`;
|
|
30
|
+
throw new Error(`${moved}; a version's images never change: release a new version`);
|
|
31
|
+
}
|
|
32
|
+
await mkdir(join(dir, 'dist'), { recursive: true });
|
|
33
|
+
await writeFile(join(dir, 'dist', RECORD), `${json.trimEnd()}\n`);
|
|
34
|
+
return 'reuse';
|
|
35
|
+
};
|
|
36
|
+
const ensureNoImages = async (g, exec) => {
|
|
37
|
+
for (const part of g.parts) {
|
|
38
|
+
const image = `ghcr.io/agentage/${g.id}-${part}:${g.version}`;
|
|
39
|
+
const ran = await exec('docker', ['manifest', 'inspect', image]);
|
|
40
|
+
if (ran.ok)
|
|
41
|
+
throw new Error(`${image} is already pushed but ${g.tag} has no record; release a new version`);
|
|
42
|
+
// denied too: GHCR may answer it for a package that does not exist yet (a new part).
|
|
43
|
+
notFound(ran, /manifest unknown|no such manifest|denied/, image);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
// A released version is never rebuilt: its images and record stay as first pushed.
|
|
47
|
+
export const releaseGuard = async (g, exec) => {
|
|
48
|
+
const record = await exec('gh', [
|
|
49
|
+
'release',
|
|
50
|
+
'download',
|
|
51
|
+
g.tag,
|
|
52
|
+
'-R',
|
|
53
|
+
g.repo,
|
|
54
|
+
'-p',
|
|
55
|
+
RECORD,
|
|
56
|
+
'-O',
|
|
57
|
+
'-',
|
|
58
|
+
]);
|
|
59
|
+
if (record.ok)
|
|
60
|
+
return reuse(g, record.out);
|
|
61
|
+
notFound(record, /release not found|no assets match|no assets to download/, `the ${g.tag} release record`);
|
|
62
|
+
await ensureNoImages(g, exec);
|
|
63
|
+
return 'build';
|
|
64
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Command } from 'commander';
|
|
2
|
+
import { type LoadKitTool } from './kit-tool.js';
|
|
3
|
+
import { type Exec } from './release-guard.js';
|
|
4
|
+
export type ExtensionReleaseOptions = {
|
|
5
|
+
dir?: string;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
};
|
|
8
|
+
export interface ReleaseDeps {
|
|
9
|
+
exec: (cwd: string, seconds?: number) => Exec;
|
|
10
|
+
tool: LoadKitTool;
|
|
11
|
+
env: NodeJS.ProcessEnv;
|
|
12
|
+
}
|
|
13
|
+
export declare const runExtensionRelease: ({ dir, timeout }?: ExtensionReleaseOptions, deps?: ReleaseDeps) => Promise<void>;
|
|
14
|
+
export declare const addRelease: (group: Command, release: (opts: ExtensionReleaseOptions) => Promise<void>) => void;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { mkdtemp, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { tmpdir } from 'node:os';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import {} from 'commander';
|
|
5
|
+
import { runExtensionBuild } from './build.js';
|
|
6
|
+
import { loadKitTool } from './kit-tool.js';
|
|
7
|
+
import { execIn, IMAGE_PARTS, RECORD, releaseGuard } from './release-guard.js';
|
|
8
|
+
const defaultDeps = { exec: execIn, tool: loadKitTool, env: process.env };
|
|
9
|
+
const step = (line) => console.log(`PASS ${line}`);
|
|
10
|
+
const fail = (line) => {
|
|
11
|
+
throw new Error(`FAIL ${line}`);
|
|
12
|
+
};
|
|
13
|
+
// Tokens leave the environment, so docker build and npm lifecycle scripts never see them.
|
|
14
|
+
const takeSecrets = (env) => {
|
|
15
|
+
const { GH_TOKEN, GITHUB_TOKEN, NPM_TOKEN } = env;
|
|
16
|
+
for (const name of ['GH_TOKEN', 'GITHUB_TOKEN', 'NPM_TOKEN'])
|
|
17
|
+
delete env[name];
|
|
18
|
+
const gh = GH_TOKEN ?? GITHUB_TOKEN;
|
|
19
|
+
return { gh: gh ? { GH_TOKEN: gh } : {}, npm: NPM_TOKEN ? { NPM_TOKEN } : {} };
|
|
20
|
+
};
|
|
21
|
+
const scoped = (exec, secrets) => (cmd, args) => exec(cmd, args, secrets[cmd]);
|
|
22
|
+
const imageParts = (pkg) => IMAGE_PARTS.filter((part) => (pkg.agentage.parts[part] ?? false) !== false);
|
|
23
|
+
// The record by digest on the tag's release; the release is created when the tag has none.
|
|
24
|
+
const attach = async (run, tag, repo) => {
|
|
25
|
+
const file = join('dist', RECORD);
|
|
26
|
+
const exists = (await run('gh', ['release', 'view', tag, '-R', repo])).ok;
|
|
27
|
+
const notes = ['--title', tag, '--notes', `Images by digest: ${RECORD}`];
|
|
28
|
+
const args = exists ? ['upload', tag, file] : ['create', tag, file, ...notes];
|
|
29
|
+
const ran = await run('gh', ['release', ...args, '-R', repo]);
|
|
30
|
+
if (!ran.ok)
|
|
31
|
+
fail(`record: ${ran.err}`);
|
|
32
|
+
step(`record: ${RECORD} attached to release ${tag}`);
|
|
33
|
+
};
|
|
34
|
+
// Single quotes on purpose: npm expands ${NPM_TOKEN} itself, the token never lands on disk.
|
|
35
|
+
const tokenConfig = async (token) => {
|
|
36
|
+
if (!token)
|
|
37
|
+
return [];
|
|
38
|
+
const file = join(await mkdtemp(join(tmpdir(), 'agentage-npm-')), '.npmrc');
|
|
39
|
+
await writeFile(file, '//registry.npmjs.org/:_authToken=${NPM_TOKEN}\n');
|
|
40
|
+
return ['--userconfig', file];
|
|
41
|
+
};
|
|
42
|
+
// OIDC trusted publishing; a new name (NPM_TOKEN set) or an unauthorized direct publish is staged.
|
|
43
|
+
const publish = async (run, { name, version }, token) => {
|
|
44
|
+
const cfg = await tokenConfig(token);
|
|
45
|
+
const spec = `${name}@${version}`;
|
|
46
|
+
if ((await run('npm', ['view', spec, 'version', ...cfg])).out.trim())
|
|
47
|
+
return step(`npm: ${spec} is already on npm`);
|
|
48
|
+
const flags = ['--access', 'public', '--provenance', '--ignore-scripts', ...cfg];
|
|
49
|
+
const fresh = token !== undefined && !(await run('npm', ['view', name, 'name', ...cfg])).ok;
|
|
50
|
+
if (!fresh && (await run('npm', ['publish', ...flags])).ok)
|
|
51
|
+
return step(`npm: ${spec} published`);
|
|
52
|
+
const staged = await run('npm', ['stage', 'publish', ...flags]);
|
|
53
|
+
if (!staged.ok)
|
|
54
|
+
fail(`npm: ${staged.err}`);
|
|
55
|
+
const why = fresh
|
|
56
|
+
? 'a new name has no trusted publisher'
|
|
57
|
+
: 'direct publish not authorized: no validated trusted publisher';
|
|
58
|
+
step(`npm: ${spec} staged for approval (${why})`);
|
|
59
|
+
};
|
|
60
|
+
const npmVersion = async (run) => {
|
|
61
|
+
const v = (await run('npm', ['--version'])).out.trim();
|
|
62
|
+
const [major = 0, minor = 0, patch = 0] = v.split('.').map(Number);
|
|
63
|
+
if (major * 1e6 + minor * 1e3 + patch < 11_005_001)
|
|
64
|
+
fail(`npm: npm ${v} cannot publish with OIDC: needs npm >= 11.5.1`);
|
|
65
|
+
step(`npm: npm ${v}`);
|
|
66
|
+
};
|
|
67
|
+
const preflight = async (run, pkg, tag, sha) => {
|
|
68
|
+
if (pkg.agentage.id === 'template')
|
|
69
|
+
fail('id: this repo is the starting point for extensions: create one, release that');
|
|
70
|
+
step(`id: ${pkg.agentage.id} is not the template`);
|
|
71
|
+
const fetched = await run('git', ['fetch', '-q', 'origin', 'master']);
|
|
72
|
+
if (!fetched.ok || !(await run('git', ['merge-base', '--is-ancestor', sha, 'origin/master'])).ok)
|
|
73
|
+
fail(`master: ${sha} is not on master${fetched.err ? `: ${fetched.err}` : ''}`);
|
|
74
|
+
step(`master: ${sha} is on master`);
|
|
75
|
+
const v = `v${pkg.version}`;
|
|
76
|
+
if (tag !== v)
|
|
77
|
+
fail(`tag: ${tag} is not ${v}, the package.json version; tag the commit that sets it`);
|
|
78
|
+
step(`tag: ${tag} is the package.json version`);
|
|
79
|
+
await npmVersion(run);
|
|
80
|
+
};
|
|
81
|
+
// One line per step, PASS or FAIL; any refusal exits 1 before anything is pushed or published.
|
|
82
|
+
export const runExtensionRelease = async ({ dir = '.', timeout = 60 } = {}, deps = defaultDeps) => {
|
|
83
|
+
const { GITHUB_REF_NAME: tag, GITHUB_SHA: sha, GITHUB_REPOSITORY: repo } = deps.env;
|
|
84
|
+
const missing = ['GITHUB_REF_NAME', 'GITHUB_SHA', 'GITHUB_REPOSITORY'].find((n) => !deps.env[n]);
|
|
85
|
+
if (!tag || !sha || !repo)
|
|
86
|
+
return fail(`inputs: ${missing} is not set; run it on a tag push`);
|
|
87
|
+
const secrets = takeSecrets(deps.env);
|
|
88
|
+
const pkg = await (await deps.tool()).readManifest(dir);
|
|
89
|
+
const run = scoped(deps.exec(dir), secrets);
|
|
90
|
+
await preflight(run, pkg, tag, sha);
|
|
91
|
+
const { id } = pkg.agentage;
|
|
92
|
+
const g = { dir, tag, sha, repo, id, version: pkg.version, parts: imageParts(pkg) };
|
|
93
|
+
const bounded = scoped(deps.exec(dir, timeout), secrets);
|
|
94
|
+
const decision = await releaseGuard(g, bounded).catch((e) => fail(`guard: ${e.message}`));
|
|
95
|
+
const build = decision === 'build';
|
|
96
|
+
step(`guard: ${tag} ${build ? 'has no record and no image: build' : 'is released: npm only'}`);
|
|
97
|
+
if (build) {
|
|
98
|
+
await runExtensionBuild({ push: true, dir }, deps.tool);
|
|
99
|
+
await attach(run, tag, repo);
|
|
100
|
+
}
|
|
101
|
+
await publish(run, pkg, secrets['npm']?.['NPM_TOKEN']);
|
|
102
|
+
};
|
|
103
|
+
export const addRelease = (group, release) => {
|
|
104
|
+
group
|
|
105
|
+
.command('release')
|
|
106
|
+
.description('Release an extension from its v* tag in CI: guard, images, record, npm package')
|
|
107
|
+
.option('--dir <path>', 'the extension package folder (default: the current folder)')
|
|
108
|
+
.option('--timeout <seconds>', 'bound on each GitHub and registry check (default: 60)', Number)
|
|
109
|
+
.action(release);
|
|
110
|
+
};
|
package/dist/program.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { type ExtensionInstallOptions } from './commands/extension/install.js';
|
|
|
7
7
|
import { type ExtensionListOptions } from './commands/extension/list.js';
|
|
8
8
|
import { type ExtensionRemoveOptions } from './commands/extension/remove.js';
|
|
9
9
|
import { type LoadKitTool } from './commands/extension/kit-tool.js';
|
|
10
|
+
import { type ExtensionReleaseOptions } from './commands/extension/release.js';
|
|
10
11
|
import { type ExtensionDownOptions, type ExtensionTokenOptions, type ExtensionUpOptions } from './commands/extension/up.js';
|
|
11
12
|
import { type StatusOptions } from './commands/status/status.js';
|
|
12
13
|
import { type UpdateOptions } from './commands/update/update.js';
|
|
@@ -21,6 +22,7 @@ export interface ProgramDeps {
|
|
|
21
22
|
extensionCreate: (opts: ExtensionCreateOptions) => Promise<void>;
|
|
22
23
|
extensionCheck: (opts: ExtensionCheckOptions) => Promise<void>;
|
|
23
24
|
extensionBuild: (opts: ExtensionBuildOptions) => Promise<void>;
|
|
25
|
+
extensionRelease: (opts: ExtensionReleaseOptions) => Promise<void>;
|
|
24
26
|
extensionUp: (opts: ExtensionUpOptions) => Promise<void>;
|
|
25
27
|
extensionDown: (opts: ExtensionDownOptions) => Promise<void>;
|
|
26
28
|
extensionToken: (opts: ExtensionTokenOptions) => Promise<void>;
|
package/dist/program.js
CHANGED
|
@@ -11,6 +11,7 @@ import { runExtensionRemove, terminalIo, } from './commands/extension/remove.js'
|
|
|
11
11
|
import { signedInAccount } from './commands/extension/account.js';
|
|
12
12
|
import { KIT_EXIT } from './commands/extension/kit-commands.js';
|
|
13
13
|
import { loadKitTool } from './commands/extension/kit-tool.js';
|
|
14
|
+
import { runExtensionRelease } from './commands/extension/release.js';
|
|
14
15
|
import { runExtensionSetup } from './commands/extension/setup.js';
|
|
15
16
|
import { runExtensionDown, runExtensionToken, runExtensionUp, } from './commands/extension/up.js';
|
|
16
17
|
import { registerStatus, runStatus, statusDeps, } from './commands/status/status.js';
|
|
@@ -37,6 +38,7 @@ const defaultDeps = {
|
|
|
37
38
|
extensionCreate: (opts) => runExtensionCreate(opts),
|
|
38
39
|
extensionCheck: (opts) => runExtensionCheck(opts),
|
|
39
40
|
extensionBuild: (opts) => runExtensionBuild(opts),
|
|
41
|
+
extensionRelease: (opts) => runExtensionRelease(opts),
|
|
40
42
|
extensionUp: (opts) => runExtensionUp(opts),
|
|
41
43
|
extensionDown: (opts) => runExtensionDown(opts),
|
|
42
44
|
extensionToken: (opts) => runExtensionToken(opts),
|
|
@@ -82,6 +84,7 @@ const addExtensions = (program, deps, argv) => {
|
|
|
82
84
|
create: withAction(deps, deps.extensionCreate),
|
|
83
85
|
check: withAction(deps, deps.extensionCheck),
|
|
84
86
|
build: withAction(deps, deps.extensionBuild),
|
|
87
|
+
release: withAction(deps, deps.extensionRelease),
|
|
85
88
|
up: withAction(deps, deps.extensionUp),
|
|
86
89
|
down: withAction(deps, deps.extensionDown),
|
|
87
90
|
token: withAction(deps, deps.extensionToken),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentage/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "The agentage CLI - connect this machine to agentage from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"prepublishOnly": "npm run verify"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@agentage/extension": "^0.5.
|
|
58
|
+
"@agentage/extension": "^0.5.1",
|
|
59
59
|
"chalk": "^6.0.0",
|
|
60
60
|
"commander": "^15.0.0",
|
|
61
61
|
"open": "^11.0.0"
|