@agentage/cli 0.81.3 → 0.82.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/README.md CHANGED
@@ -83,23 +83,10 @@ the GitHub release. A change only in a root `*.md` file, `docs/` or `.github/` r
83
83
  A `.release-ignore` file adds more patterns. The new package is private: it goes to npm only when
84
84
  you remove `"private": true`. The rule in full: [docs/reference.md](docs/reference.md#extension-release).
85
85
 
86
- ## How to work on this repo
87
-
88
- ```bash
89
- npm ci
90
- npm run verify # type-check, lint, format, test, build
91
- npm run build && npm run test:e2e -- --grep @offline # e2e with a loopback npm registry
92
- ```
93
-
94
- ## How a change is released
95
-
96
- A merge of a normal change releases nothing. The `chore(release): X.Y.Z` PR from
97
- `prepare-release.yml` changes `package.json`; its merge runs `release.yml`, which publishes to npm
98
- with OIDC trusted publishing and pushes the tag `vX.Y.Z`. Details: [docs/release.md](docs/release.md).
99
-
100
86
  ## For agents
101
87
 
102
88
  - Read [AGENTS.md](AGENTS.md) (the same file as `CLAUDE.md`): commands, layout and where each fact lives.
89
+ - Work on this repo: `npm ci`, then `npm run verify`. A release is described in [docs/release.md](docs/release.md): a normal merge releases nothing.
103
90
  - Never run `setup`, `update`, `extension up` or `extension install` on a shared machine, and always add `--no-install` to `extension create`.
104
91
  - Never publish to npm by hand: only `release.yml` publishes.
105
92
 
@@ -0,0 +1,2 @@
1
+ export declare const BLANK = "blank";
2
+ export declare const applyBlank: (dir: string, blank: boolean | undefined) => void;
@@ -0,0 +1,36 @@
1
+ import { cpSync, existsSync, readFileSync, rmSync } from 'node:fs';
2
+ import { isAbsolute, join, relative, resolve } from 'node:path';
3
+ import { CliError } from '../../lib/json-output.js';
4
+ export const BLANK = 'blank';
5
+ const REMOVE = 'remove.json';
6
+ const inside = (dir, path) => {
7
+ const rel = relative(resolve(dir), resolve(dir, path));
8
+ return rel !== '' && !rel.startsWith('..') && !isAbsolute(path) && !isAbsolute(rel);
9
+ };
10
+ // A JSON list of template paths; an unreadable list or a path outside the folder stops the run.
11
+ const removals = (overlay) => {
12
+ const file = join(overlay, REMOVE);
13
+ if (!existsSync(file))
14
+ return [];
15
+ const list = JSON.parse(readFileSync(file, 'utf8'));
16
+ if (!Array.isArray(list) || list.some((item) => typeof item !== 'string'))
17
+ throw new Error(`${BLANK}/${REMOVE}: expected a list of paths`);
18
+ return list;
19
+ };
20
+ // Runs first: blank/ is a template overlay, never part of the extension that is made.
21
+ export const applyBlank = (dir, blank) => {
22
+ const overlay = join(dir, BLANK);
23
+ const found = existsSync(overlay);
24
+ if (blank && !found)
25
+ throw new CliError('invalid_argument', '--blank: this template has no blank variant');
26
+ if (blank) {
27
+ for (const path of removals(overlay)) {
28
+ if (!inside(dir, path))
29
+ throw new Error(`${BLANK}/${REMOVE}: ${path} is outside the template`);
30
+ rmSync(join(dir, path), { recursive: true, force: true });
31
+ }
32
+ rmSync(join(overlay, REMOVE), { force: true });
33
+ cpSync(overlay, dir, { recursive: true, force: true });
34
+ }
35
+ rmSync(overlay, { recursive: true, force: true });
36
+ };
@@ -0,0 +1,3 @@
1
+ import { type Command } from 'commander';
2
+ import { type ExtensionCreateOptions } from './create.js';
3
+ export declare const addCreate: (group: Command, create: (o: ExtensionCreateOptions) => Promise<void>) => Command;
@@ -0,0 +1,14 @@
1
+ import {} from 'commander';
2
+ import { addJson } from '../../lib/json-output.js';
3
+ import { PARTS, TEMPLATE } from './create.js';
4
+ export const addCreate = (group, create) => addJson(group
5
+ .command('create')
6
+ .description('Create ./extension-<id> from the extension template with the parts named')
7
+ .argument('<id>', 'the extension id, also its host and contract name')
8
+ .argument('[parts...]', `parts to keep (default: all eight): ${PARTS.join(', ')}`)
9
+ .option('--from <owner/repo[#branch][:folder]>', `the template repo and folder (default: ${TEMPLATE})`)
10
+ .option('--no-install', 'build the folder, but do not give it to the daemon')
11
+ .option('--blank', 'keep the parts but not the notes example (the template needs a blank/ folder)')
12
+ .option('--into <dir>', 'write <dir>/<id> for a shared repo (no repo files of its own); <dir> is its extensions folder')
13
+ .option('--yes', 'run code from another --from repo or branch without asking')
14
+ .addHelpText('after', '\nExample:\n agentage extension create my-ext app api (parts may also be app,api)')).action((id, parts, o) => create({ id, parts, ...o }));
@@ -0,0 +1 @@
1
+ export declare const lowerFloor: (dir: string, kept: string[], all: number) => string | undefined;
@@ -0,0 +1,17 @@
1
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ const CI = join('.github', 'workflows', 'ci.yml');
4
+ const FLOOR = /MIN_EXECUTED: '\d+'/;
5
+ const LOWERED = " ci MIN_EXECUTED is 1: after the first green run, set it to the gate's count";
6
+ const BY_HAND = ` ci no MIN_EXECUTED line found in ${CI}: set it by hand to the gate's count`;
7
+ // The template's floor counts the gate's tests for all eight parts; a subset's count is unknown.
8
+ export const lowerFloor = (dir, kept, all) => {
9
+ if (kept.length === all)
10
+ return undefined;
11
+ const file = join(dir, CI);
12
+ const text = existsSync(file) ? readFileSync(file, 'utf8') : '';
13
+ if (!FLOOR.test(text))
14
+ return BY_HAND;
15
+ writeFileSync(file, text.replace(FLOOR, "MIN_EXECUTED: '1'"));
16
+ return LOWERED;
17
+ };
@@ -6,7 +6,7 @@ import { hostClient } from '../../lib/daemon/host-client.js';
6
6
  import { CliError } from '../../lib/json-output.js';
7
7
  import { loadKitTool } from './kit-tool.js';
8
8
  import { confirmed, report, summaryOf, terminalIo } from './lifecycle.js';
9
- import { OWN_TEMPLATES } from './create-source.js';
9
+ import { TEMPLATE } from './create-source.js';
10
10
  import { ignoreLocal } from './up-local.js';
11
11
  import { buildPackage, newerKitLine, npmIn } from './package-build.js';
12
12
  export const createInstallDeps = {
@@ -70,7 +70,7 @@ export const installCreated = async (folder, install, deps = createInstallDeps)
70
70
  };
71
71
  // Another repo, or a branch of ours, is code nobody reviewed for you: its build script runs here.
72
72
  export const trustFrom = async (from, opts, io = terminalIo()) => {
73
- if (OWN_TEMPLATES.includes(from))
73
+ if (from === TEMPLATE)
74
74
  return;
75
75
  console.error(`template ${from}: code from that repo will be built and run on this machine`);
76
76
  if (opts.yes)
@@ -0,0 +1,3 @@
1
+ export declare const intoRefusal: (into: string, id: string) => string;
2
+ export declare const shapeShared: (dir: string, into: string, id: string) => string | undefined;
3
+ export declare const rootEdits: (id: string) => string[];
@@ -0,0 +1,46 @@
1
+ import { execFileSync } from 'node:child_process';
2
+ import { existsSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs';
3
+ import { join } from 'node:path';
4
+ // What the template has for a repo of its own: workflows, dependabot and the repo-class files.
5
+ const OWN_REPO = ['.github', '.repo-class', '.repo-doctor.yml'];
6
+ export const intoRefusal = (into, id) => {
7
+ if (!existsSync(into) || !statSync(into).isDirectory())
8
+ return `--into ${into}: not a folder (the extensions folder of the shared repo)`;
9
+ return existsSync(join(into, id)) ? `${join(into, id)} exists: pick another id or remove it` : '';
10
+ };
11
+ const git = (dir, ...args) => {
12
+ try {
13
+ return execFileSync('git', ['-C', dir, ...args], { encoding: 'utf8', stdio: 'pipe' }).trim();
14
+ }
15
+ catch {
16
+ return '';
17
+ }
18
+ };
19
+ // The shared repo: its GitHub owner/repo from origin, and where the folder sits in it.
20
+ const sharedRepo = (into, id) => {
21
+ const slug = /github\.com[:/]([\w.-]+\/[\w.-]+?)(?:\.git)?$/.exec(git(into, 'remote', 'get-url', 'origin'))?.[1];
22
+ return slug ? { slug, directory: `${git(into, 'rev-parse', '--show-prefix')}${id}` } : undefined;
23
+ };
24
+ // The shape of host-core, host-platform and examples: no repo files of its own, the repo points at the shared repo.
25
+ export const shapeShared = (dir, into, id) => {
26
+ for (const name of OWN_REPO)
27
+ rmSync(join(dir, name), { recursive: true, force: true });
28
+ const repo = sharedRepo(into, id);
29
+ if (!repo)
30
+ return ' package no github origin found: set repository and bugs in package.json by hand';
31
+ const file = join(dir, 'package.json');
32
+ const pkg = JSON.parse(readFileSync(file, 'utf8'));
33
+ pkg['repository'] = {
34
+ type: 'git',
35
+ url: `git+https://github.com/${repo.slug}.git`,
36
+ directory: repo.directory,
37
+ };
38
+ pkg['bugs'] = { url: `https://github.com/${repo.slug}/issues` };
39
+ writeFileSync(file, `${JSON.stringify(pkg, null, 2)}\n`);
40
+ return undefined;
41
+ };
42
+ // Root files the shared repo keeps for each extension; create never edits them.
43
+ export const rootEdits = (id) => [
44
+ ` root edit in the shared repo root: ci.yml gets "${id}" in the MIN_EXECUTED map (start at 1)`,
45
+ ` root README.md and CLAUDE.md list ${id}; agentage/e2e extensions.json needs a row for ${id}`,
46
+ ];
@@ -0,0 +1 @@
1
+ export declare const pruneLib: (dir: string) => string[];
@@ -0,0 +1,58 @@
1
+ import { existsSync, readdirSync, readFileSync, rmdirSync, rmSync } from 'node:fs';
2
+ import { dirname, join, relative, resolve } from 'node:path';
3
+ const LIB = join('src', 'lib');
4
+ const CODE = /\.(?:[cm]?[jt]sx?)$/;
5
+ const TEST = /^(.*)\.(?:test|spec)(\.[cm]?[jt]sx?)$/;
6
+ const SKIP = new Set(['node_modules', '.git', 'dist', 'coverage']);
7
+ // from '..', import '..', import('..'), require('..'), vi.mock('..')
8
+ const SPEC = /(?:\bfrom\s*|\bimport\s*\(?\s*|\brequire\s*\(\s*|\bmock\s*\(\s*)(['"])(\.{1,2}\/[^'"]*|\.{1,2})\1/g;
9
+ const walk = (dir) => readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {
10
+ if (SKIP.has(entry.name))
11
+ return [];
12
+ const path = join(dir, entry.name);
13
+ return entry.isDirectory() ? walk(path) : CODE.test(entry.name) ? [path] : [];
14
+ });
15
+ // `./a.js` names a.ts, a.tsx or a/index.ts in a nodenext repo.
16
+ const target = (from, spec, files) => {
17
+ const base = resolve(dirname(from), spec);
18
+ const bare = base.replace(/\.[cm]?js$/, '');
19
+ return [base, ...['.ts', '.tsx', '.mts', '.cts'].map((ext) => bare + ext)]
20
+ .concat(['.ts', '.tsx'].map((ext) => join(base, `index${ext}`)))
21
+ .find((path) => files.has(path));
22
+ };
23
+ const importsOf = (file, files) => [...readFileSync(file, 'utf8').matchAll(SPEC)].flatMap((m) => target(file, m[2] ?? '', files) ?? []);
24
+ // Every file outside src/lib is a root; a lib test is no root, it goes with the file it tests.
25
+ const reachable = (files, lib) => {
26
+ const seen = new Set();
27
+ const todo = [...files].filter((path) => !path.startsWith(lib));
28
+ for (let path = todo.pop(); path; path = todo.pop()) {
29
+ if (seen.has(path))
30
+ continue;
31
+ seen.add(path);
32
+ todo.push(...importsOf(path, files));
33
+ }
34
+ return seen;
35
+ };
36
+ const emptyDirs = (dir) => {
37
+ for (const entry of readdirSync(dir, { withFileTypes: true }))
38
+ if (entry.isDirectory())
39
+ emptyDirs(join(dir, entry.name));
40
+ if (readdirSync(dir).length === 0)
41
+ rmdirSync(dir);
42
+ };
43
+ // Removes the src/lib files (and their tests) that no kept file imports, so no dead file lowers the coverage.
44
+ export const pruneLib = (dir) => {
45
+ const lib = `${resolve(dir, LIB)}/`;
46
+ if (!existsSync(lib))
47
+ return [];
48
+ const files = new Set(walk(resolve(dir)));
49
+ const used = reachable(files, lib);
50
+ const inLib = [...files].filter((path) => path.startsWith(lib));
51
+ const dead = inLib.filter((path) => !TEST.test(path) && !used.has(path));
52
+ const gone = new Set(dead.map((path) => path.replace(CODE, '')));
53
+ const tests = inLib.filter((path) => gone.has(TEST.exec(path)?.[1] ?? '\0'));
54
+ for (const path of [...dead, ...tests])
55
+ rmSync(path, { force: true });
56
+ emptyDirs(lib);
57
+ return [...dead, ...tests].map((path) => relative(resolve(dir), path));
58
+ };
@@ -1,5 +1,4 @@
1
1
  export declare const TEMPLATE = "agentage/kit:template";
2
- export declare const OWN_TEMPLATES: string[];
3
2
  export declare const fromRefusal: (from: string) => string;
4
3
  export declare const repoRef: (from: string) => {
5
4
  repo: string;
@@ -1,16 +1,10 @@
1
1
  import { execFile } from 'node:child_process';
2
2
  import { lstatSync, mkdtempSync, readdirSync, renameSync, rmSync } from 'node:fs';
3
- import { join } from 'node:path';
3
+ import { basename, dirname, join } from 'node:path';
4
4
  import { promisify } from 'node:util';
5
5
  import { holdSignals } from '../../core/loader/dispose.js';
6
6
  const run = promisify(execFile);
7
- // The kit repo holds the template in its folder template/; the old repo held it at its root.
8
7
  export const TEMPLATE = 'agentage/kit:template';
9
- export const OWN_TEMPLATES = [
10
- TEMPLATE,
11
- 'agentage/platform:template',
12
- 'agentage/extension-template',
13
- ];
14
8
  // owner/repo, then #branch and :folder, each optional: nothing that can pass for a flag or leave the repo.
15
9
  const FROM = /^[\w.-]+\/[\w.-]+(?:#\w[\w./-]*)?(?::\w[\w.-]*(?:\/\w[\w.-]*)*)?$/;
16
10
  export const fromRefusal = (from) => !FROM.test(from) || from.includes('..')
@@ -55,7 +49,7 @@ const refuseLinks = (dir, from) => {
55
49
  // Removes only what this run made; also the Ctrl-C path, so it never throws.
56
50
  export const removeOwn = (path) => rmSync(path, { recursive: true, force: true });
57
51
  // A fresh name beside the new folder (a rename across disks fails), so no folder of yours is reused.
58
- const cloneFolder = (dir, folder) => folder ? mkdtempSync(`.${dir}.clone-`) : dir;
52
+ const cloneFolder = (dir, folder) => folder ? mkdtempSync(join(dirname(dir), `.${basename(dir)}.clone-`)) : dir;
59
53
  // With :folder only that folder stays; a signal during the clone removes this run's folders, then exits as it would.
60
54
  export const clone = async (url, from, dir) => {
61
55
  const { folder } = repoRef(from);
@@ -1,4 +1,3 @@
1
- import { type Command } from 'commander';
2
1
  import { installCreated } from './create-install.js';
3
2
  import { TEMPLATE } from './create-source.js';
4
3
  import { type ConfirmIo } from './lifecycle.js';
@@ -10,8 +9,9 @@ export interface ExtensionCreateOptions {
10
9
  from?: string;
11
10
  install?: boolean;
12
11
  yes?: boolean;
12
+ blank?: boolean;
13
+ into?: string;
13
14
  json?: boolean;
14
15
  }
15
16
  export declare const splitParts: (parts: string[]) => string[];
16
17
  export declare const runExtensionCreate: (opts: ExtensionCreateOptions, url?: (from: string) => string, after?: typeof installCreated, io?: ConfirmIo) => Promise<unknown>;
17
- export declare const addCreate: (group: Command, create: (o: ExtensionCreateOptions) => Promise<void>) => Command;
@@ -1,9 +1,12 @@
1
1
  import { existsSync, readdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
2
2
  import { join, resolve } from 'node:path';
3
- import {} from 'commander';
4
- import { addJson, CliError } from '../../lib/json-output.js';
3
+ import { CliError } from '../../lib/json-output.js';
5
4
  import { siteFqdn } from '../../lib/net/origins.js';
6
5
  import { installCreated, trustFrom } from './create-install.js';
6
+ import { applyBlank } from './create-blank.js';
7
+ import { pruneLib } from './create-lib.js';
8
+ import { lowerFloor } from './create-floor.js';
9
+ import { intoRefusal, rootEdits, shapeShared } from './create-into.js';
7
10
  import { markFolder } from './create-markers.js';
8
11
  import { devDropped, PRUNE, syncLockRoot } from './create-prune.js';
9
12
  import { clone, fromRefusal, repoRef, TEMPLATE } from './create-source.js';
@@ -16,7 +19,7 @@ const WORD = /(?<![A-Za-z0-9])template(?![A-Za-z0-9])/g;
16
19
  const LOCK = 'package-lock.json';
17
20
  // Parts come as separate words, comma lists or both: `app,api`, `app api`, `app, api`.
18
21
  export const splitParts = (parts) => parts.flatMap((part) => part.split(/[\s,]+/)).filter(Boolean);
19
- const refusal = ({ id, parts, from = TEMPLATE }, kept) => {
22
+ const refusal = ({ id, parts, from = TEMPLATE, into }, kept) => {
20
23
  const unknown = parts.find((part) => !PARTS.includes(part));
21
24
  if (unknown)
22
25
  return `unknown part ${unknown}: one of ${PARTS.join(', ')}`;
@@ -28,6 +31,8 @@ const refusal = ({ id, parts, from = TEMPLATE }, kept) => {
28
31
  return `an extension needs at least one of ${ROUTED.join(', ')}`;
29
32
  if (fromRefusal(from))
30
33
  return fromRefusal(from);
34
+ if (into)
35
+ return intoRefusal(into, id);
31
36
  return existsSync(`extension-${id}`)
32
37
  ? `extension-${id} exists: pick another id or remove it`
33
38
  : '';
@@ -82,32 +87,21 @@ const renameLock = (dir, id) => {
82
87
  syncLockRoot(root, json(join(dir, 'package.json'))['devDependencies'] ?? {});
83
88
  save(join(dir, LOCK), lock);
84
89
  };
85
- const CI = join('.github', 'workflows', 'ci.yml');
86
- const FLOOR = /MIN_EXECUTED: '\d+'/;
87
- const LOWERED = " ci MIN_EXECUTED is 1: after the first green run, set it to the gate's count";
88
- const BY_HAND = ` ci no MIN_EXECUTED line found in ${CI}: set it by hand to the gate's count`;
89
- // The template's floor counts the gate's tests for all eight parts; a subset's count is unknown.
90
- const lowerFloor = (dir, kept) => {
91
- if (kept.length === PARTS.length)
92
- return undefined;
93
- const file = join(dir, CI);
94
- const text = existsSync(file) ? readFileSync(file, 'utf8') : '';
95
- if (!FLOOR.test(text))
96
- return BY_HAND;
97
- writeFileSync(file, text.replace(FLOOR, "MIN_EXECUTED: '1'"));
98
- return LOWERED;
99
- };
100
90
  // A half-made folder is removed, so a re-run is not refused as "exists".
101
- const shape = (dir, from, id, kept) => {
91
+ const shape = (dir, from, id, kept, { blank, into }) => {
102
92
  try {
93
+ applyBlank(dir, blank);
103
94
  drop(dir, kept);
95
+ pruneLib(dir);
104
96
  markFolder(dir, kept, PARTS);
105
97
  rewrite(dir, id);
106
98
  renameLock(dir, id);
107
- return lowerFloor(dir, kept);
99
+ return into ? shapeShared(dir, into, id) : lowerFloor(dir, kept, PARTS.length);
108
100
  }
109
101
  catch (err) {
110
102
  rmSync(dir, { recursive: true, force: true });
103
+ if (err instanceof CliError)
104
+ throw err;
111
105
  throw new Error(`template ${from}: ${err.message}`);
112
106
  }
113
107
  };
@@ -115,7 +109,9 @@ const shape = (dir, from, id, kept) => {
115
109
  const hostLine = (id) => process.env['AGENTAGE_SITE_FQDN']?.trim()
116
110
  ? `host ${id}.${siteFqdn()}`
117
111
  : `host ${id} on your site (set AGENTAGE_SITE_FQDN to print its address)`;
118
- const printNext = (dir, from, id, kept) => {
112
+ // With no install, the folder has no node_modules: npm ci comes first, and npx runs the pinned cli.
113
+ const nextStep = (dir, install) => `cd ${dir} && ${install ? '' : 'npm ci && '}npx agentage extension up`;
114
+ const printNext = (dir, from, id, kept, install) => {
119
115
  const kit = String(json(join(dir, 'package.json'))['dependencies']?.['@agentage/extension'] ?? '?');
120
116
  const { repo, ref, folder } = repoRef(from);
121
117
  const branch = ref ? `branch ${ref}` : 'default branch';
@@ -124,7 +120,7 @@ const printNext = (dir, from, id, kept) => {
124
120
  const contract = kept.includes('mcp') ? ` · contract ${id}.mcpc.json` : '';
125
121
  console.log(` folder ${resolve(dir)}`);
126
122
  console.log(` id ${id} · ${hostLine(id)}${contract}`);
127
- console.log(` next cd ${dir} && agentage extension up`);
123
+ console.log(` next ${nextStep(dir, install)}`);
128
124
  };
129
125
  // Clones the template's default branch (or the #branch of --from; only its :folder) into ./extension-<id>, no history;
130
126
  // then installs its dependencies, builds it and (unless --no-install) gives it to the daemon.
@@ -136,20 +132,13 @@ export const runExtensionCreate = async (opts, url = (from) => `https://github.c
136
132
  if (refused)
137
133
  throw new CliError('invalid_argument', refused);
138
134
  await trustFrom(from, opts, opts.json ? { ...io, isTTY: false } : io);
139
- const dir = `extension-${id}`;
135
+ const dir = opts.into ? join(opts.into, id) : `extension-${id}`;
140
136
  await clone(url(repoRef(from).repo), from, dir);
141
- const ci = shape(dir, from, id, kept);
142
- printNext(dir, from, id, kept);
137
+ const ci = shape(dir, from, id, kept, opts);
138
+ printNext(dir, from, id, kept, opts.install !== false);
143
139
  if (ci)
144
140
  console.log(ci);
141
+ if (opts.into)
142
+ rootEdits(id).forEach((line) => console.log(line));
145
143
  return { id, dir, from, kept, ...(await after(dir, opts.install !== false)) };
146
144
  };
147
- export const addCreate = (group, create) => addJson(group
148
- .command('create')
149
- .description('Create ./extension-<id> from the extension template with the parts named')
150
- .argument('<id>', 'the extension id, also its host and contract name')
151
- .argument('[parts...]', `parts to keep (default: all eight): ${PARTS.join(', ')}`)
152
- .option('--from <owner/repo[#branch][:folder]>', `the template repo and folder (default: ${TEMPLATE})`)
153
- .option('--no-install', 'build the folder, but do not give it to the daemon')
154
- .option('--yes', 'run code from another --from repo or branch without asking')
155
- .addHelpText('after', '\nExample:\n agentage extension create my-ext app api (parts may also be app,api)')).action((id, parts, o) => create({ id, parts, ...o }));
@@ -24,8 +24,8 @@ const addInstall = (group, { install, list }) => {
24
24
  addJson(group
25
25
  .command('install')
26
26
  .description('Install an extension in the daemon and run it')
27
- .argument('<name>', '<id>, <id>@<version> or a local folder')
28
- .option('--off', 'old name of: install, then extension disable'))
27
+ .argument('<name>', '<id>, <id>@<version> or a local folder'))
28
+ .showHelpAfterError('(--off is gone: agentage extension install <name>, then extension disable <id>)')
29
29
  .addHelpText('after', INSTALL_HELP)
30
30
  .action((name, opts) => install({ name, ...opts }));
31
31
  addJson(group
@@ -9,7 +9,6 @@ export interface ConfirmIo {
9
9
  }
10
10
  export interface InstallOptions {
11
11
  name: string;
12
- off?: boolean;
13
12
  json?: boolean;
14
13
  }
15
14
  export interface RemoveOptions {
@@ -56,10 +56,7 @@ export const runInstall = async (opts, deps) => {
56
56
  const seal = await deps.sealOff?.().catch(() => null);
57
57
  if (seal)
58
58
  console.error(seal);
59
- if (!opts.off)
60
- return report(done, already ? ' (already installed)' : '');
61
- console.error('install --off is now: agentage extension disable <id>');
62
- return report(await host.change(done.id, { enabled: false }));
59
+ return report(done, already ? ' (already installed)' : '');
63
60
  };
64
61
  export const runEnabled = async (id, enabled, deps) => report(await (await deps.host()).change(specOf(id).id, { enabled }));
65
62
  const askLine = async (question) => {
@@ -1,7 +1,8 @@
1
1
  import {} from 'commander';
2
2
  import { addBuild } from './build.js';
3
3
  import { addRelease } from './release.js';
4
- import { addCreate } from './create.js';
4
+ import { addCreate } from './create-command.js';
5
+ import {} from './create.js';
5
6
  import {} from './doctor.js';
6
7
  import { addLifecycle } from './lifecycle-commands.js';
7
8
  import { addMarket } from './market-commands.js';
@@ -34,7 +34,7 @@ export const attach = async (run, tag, repo, names, target) => {
34
34
  }
35
35
  step(`record: ${names.join(', ')} attached to release ${tag}`);
36
36
  };
37
- // The part images (v13 rows, the estate) and the one image (app hosts), all pushed by digest.
37
+ // The part images and the one image (app hosts), all pushed by digest.
38
38
  export const buildImages = async (dir, oneImage, tool, committed) => {
39
39
  await runImageBuild({ push: true, dir }, tool, committed);
40
40
  if (!oneImage)
@@ -1,3 +1,3 @@
1
1
  import {} from '../net/discovery.js';
2
- // The machines routes of the platform: one base, no v13 route (J.4.3).
2
+ // The machines routes of the platform: one base.
3
3
  export const machinesCall = (platform, path, call) => call(`${platform.machines}${path}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/cli",
3
- "version": "0.81.3",
3
+ "version": "0.82.1",
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
  },
56
56
  "dependencies": {
57
57
  "@agentage/apphost": "0.8.5",
58
- "@agentage/extension": "0.25.9",
58
+ "@agentage/extension": "0.25.12",
59
59
  "@electric-sql/pglite": "^0.6.0",
60
60
  "@tailwindcss/postcss": "^4.3.5",
61
61
  "chalk": "^6.0.0",