@foxden-app/foxclaw 0.2.2 → 0.2.3

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.
@@ -3,7 +3,9 @@ import fs from 'node:fs';
3
3
  import net from 'node:net';
4
4
  import path from 'node:path';
5
5
  import { spawn } from 'node:child_process';
6
+ import { fileURLToPath } from 'node:url';
6
7
  import { buildThreadDeepLink, openUrl } from './deeplink.js';
8
+ const CLIENT_VERSION = readPackageVersion();
7
9
  export class CodexAppClient extends EventEmitter {
8
10
  codexCliBin;
9
11
  launchCommand;
@@ -593,7 +595,7 @@ export class CodexAppClient extends EventEmitter {
593
595
  clientInfo: {
594
596
  name: 'foxclaw',
595
597
  title: 'FoxClaw',
596
- version: '0.2.0',
598
+ version: CLIENT_VERSION,
597
599
  },
598
600
  capabilities: {
599
601
  experimentalApi: true,
@@ -770,6 +772,16 @@ export class CodexAppClient extends EventEmitter {
770
772
  this.clearServerState();
771
773
  }
772
774
  }
775
+ function readPackageVersion() {
776
+ try {
777
+ const pkgPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..', 'package.json');
778
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
779
+ return typeof pkg.version === 'string' && pkg.version.trim() ? pkg.version : '0.0.0';
780
+ }
781
+ catch {
782
+ return '0.0.0';
783
+ }
784
+ }
773
785
  async function reservePort() {
774
786
  return new Promise((resolve, reject) => {
775
787
  const server = net.createServer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foxden-app/foxclaw",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Foxden local execution claw for controlling Codex from trusted chat interfaces.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",