@agentage/cli 0.82.1 → 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.
@@ -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 }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/cli",
3
- "version": "0.82.1",
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",