agentworkforce 0.6.1 → 0.7.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/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - `agentworkforce --version` now prints the installed package version.
13
+
14
+ ## [0.7.0] - 2026-05-07
15
+
16
+ ### Fixed
17
+
18
+ - Add agentworkforce version flag
19
+
10
20
  ## [0.6.0] - 2026-05-06
11
21
 
12
22
  ### Added
package/README.md CHANGED
@@ -14,6 +14,7 @@ agentworkforce list [flags]
14
14
  agentworkforce show <persona>
15
15
  agentworkforce sources <list|add|remove>
16
16
  agentworkforce harness check
17
+ agentworkforce --version
17
18
  ```
18
19
 
19
20
  This package is a thin wrapper around [`@agentworkforce/cli`](https://www.npmjs.com/package/@agentworkforce/cli).
@@ -1,12 +1,30 @@
1
1
  #!/usr/bin/env node
2
- // Top-level wrapper. Re-exports the @agentworkforce/cli entry point under the
2
+ import { readFileSync } from 'node:fs';
3
+
4
+ // Top-level wrapper. Delegates to the @agentworkforce/cli entry point under the
3
5
  // shorter `agentworkforce` bin name so users can `npm i -g agentworkforce` and
4
6
  // run `agentworkforce agent <persona>`. The CLI derives its help-text bin name
5
7
  // from process.argv[1], so this file's basename (sans extension) is what
6
8
  // shows up in usage strings.
7
- import { main } from '@agentworkforce/cli/dist/cli.js';
9
+ function readPackageVersion() {
10
+ const pkg = JSON.parse(
11
+ readFileSync(new URL('../package.json', import.meta.url), 'utf8')
12
+ );
13
+ if (typeof pkg.version !== 'string' || !pkg.version) {
14
+ throw new Error('Could not read agentworkforce package version.');
15
+ }
16
+ return pkg.version;
17
+ }
18
+
19
+ try {
20
+ if (process.argv[2] === '-v' || process.argv[2] === '--version') {
21
+ process.stdout.write(`${readPackageVersion()}\n`);
22
+ process.exit(0);
23
+ }
8
24
 
9
- main().catch((err) => {
25
+ const { main } = await import('@agentworkforce/cli/dist/cli.js');
26
+ await main();
27
+ } catch (err) {
10
28
  process.stderr.write(`${err?.stack ?? String(err)}\n`);
11
29
  process.exit(1);
12
- });
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentworkforce",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "description": "Top-level installer for the Agent Workforce CLI (installs the `agentworkforce` command). Wraps @agentworkforce/cli.",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "node": ">=22"
18
18
  },
19
19
  "dependencies": {
20
- "@agentworkforce/cli": "0.6.1"
20
+ "@agentworkforce/cli": "0.7.0"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
@@ -32,6 +32,6 @@
32
32
  "dev": "chmod +x bin/agentworkforce.js",
33
33
  "typecheck": "node --check bin/agentworkforce.js",
34
34
  "lint": "node --check bin/agentworkforce.js",
35
- "test": "node --check bin/agentworkforce.js"
35
+ "test": "node --check bin/agentworkforce.js && node --test test/*.test.js"
36
36
  }
37
37
  }