@agentage/cli 0.42.0 → 0.42.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.
@@ -1,20 +1,15 @@
1
1
  import {} from 'commander';
2
- import { kitVersion } from '../../core/kit-version.js';
3
2
  import { loadKitTool } from './kit-tool.js';
4
3
  // The kit's lines, or its report as JSON, on stdout; a package that does not conform exits 1.
5
4
  export const runExtensionCheck = async ({ dir = '.', json } = {}, tool = loadKitTool) => {
6
5
  const { check, checkLines } = await tool();
7
- if (typeof check !== 'function')
8
- throw new Error(`this package uses kit ${kitVersion()}; check needs @agentage/extension ^0.4`);
9
6
  const report = await check(dir);
10
7
  const lines = checkLines(report);
11
- const shown = json
12
- ? [JSON.stringify(report, null, 2)]
13
- : lines.slice(0, report.conforms ? undefined : -1);
14
- for (const line of shown)
8
+ const fail = report.conforms ? undefined : lines.pop();
9
+ for (const line of json ? [JSON.stringify(report, null, 2)] : lines)
15
10
  console.log(line);
16
11
  if (!report.conforms)
17
- throw new Error(lines.at(-1));
12
+ throw new Error(fail);
18
13
  };
19
14
  // One line per image on stdout (part, tag, digest when pushed), then the record path.
20
15
  export const runExtensionBuild = async (opts = {}, tool = loadKitTool) => {
@@ -24,11 +19,11 @@ export const runExtensionBuild = async (opts = {}, tool = loadKitTool) => {
24
19
  };
25
20
  const BUILD_HELP = `
26
21
  Builds one image per server part of the extension package in --dir (default: the current
27
- folder): the manifest is checked, the package's own build script runs, then the kit recipe makes
22
+ folder): the package's own build script runs, then extension check, then the kit recipe makes
28
23
  each image, tagged ghcr.io/agentage/<id>-<part>:<version> with the commit and build time as
29
24
  labels. --push pushes them (run docker login first) and writes dist/agentage-extension.json, the
30
- build record with every image by digest. Needs docker. Exits 1 when the manifest is invalid or a
31
- build or push fails.`;
25
+ build record with every image by digest. Needs docker. Exits 1 when the package does not conform or
26
+ a build or push fails.`;
32
27
  export const addBuild = (group, { check, build }) => {
33
28
  group
34
29
  .command('check')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/cli",
3
- "version": "0.42.0",
3
+ "version": "0.42.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
  "prepublishOnly": "npm run verify"
56
56
  },
57
57
  "dependencies": {
58
- "@agentage/extension": "^0.2.1 || ^0.3.0 || ^0.4.0",
58
+ "@agentage/extension": "^0.4.0",
59
59
  "chalk": "^6.0.0",
60
60
  "commander": "^15.0.0",
61
61
  "open": "^11.0.0"