@agentage/cli 0.82.0 → 0.82.2

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
 
@@ -1,6 +1,5 @@
1
1
  import { cpSync, existsSync, readFileSync, rmSync } from 'node:fs';
2
2
  import { isAbsolute, join, relative, resolve } from 'node:path';
3
- import { CliError } from '../../lib/json-output.js';
4
3
  export const BLANK = 'blank';
5
4
  const REMOVE = 'remove.json';
6
5
  const inside = (dir, path) => {
@@ -18,12 +17,11 @@ const removals = (overlay) => {
18
17
  return list;
19
18
  };
20
19
  // Runs first: blank/ is a template overlay, never part of the extension that is made.
20
+ // --blank on a template with no overlay is a no-op: that template is already the blank form.
21
21
  export const applyBlank = (dir, blank) => {
22
22
  const overlay = join(dir, BLANK);
23
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) {
24
+ if (blank && found) {
27
25
  for (const path of removals(overlay)) {
28
26
  if (!inside(dir, path))
29
27
  throw new Error(`${BLANK}/${REMOVE}: ${path} is outside the template`);
@@ -8,7 +8,7 @@ export const addCreate = (group, create) => addJson(group
8
8
  .argument('[parts...]', `parts to keep (default: all eight): ${PARTS.join(', ')}`)
9
9
  .option('--from <owner/repo[#branch][:folder]>', `the template repo and folder (default: ${TEMPLATE})`)
10
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)')
11
+ .option('--blank', 'keep the parts but not the notes example (no effect on a template that is already blank)')
12
12
  .option('--into <dir>', 'write <dir>/<id> for a shared repo (no repo files of its own); <dir> is its extensions folder')
13
13
  .option('--yes', 'run code from another --from repo or branch without asking')
14
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 }));
@@ -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)
@@ -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;
@@ -4,13 +4,7 @@ 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('..')
@@ -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) => {
@@ -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.82.0",
3
+ "version": "0.82.2",
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.10",
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",