eximagent 0.0.2 → 0.0.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.
package/bin/eximagent.cjs CHANGED
@@ -18,11 +18,13 @@ if (!target) {
18
18
  console.error(`[eximagent] supported: ${Object.keys(PLATFORM_MAP).join(', ')}`)
19
19
  process.exit(64)
20
20
  }
21
+ const VERSION = require('../package.json').version
21
22
  const installDir = process.env.EXIMAGENT_HOME || join(homedir(), '.eximagent')
22
23
  const binDir = join(installDir, 'bin')
23
- const binPath = join(binDir, `eximagent-${target}`)
24
+ const binPath = join(binDir, `eximagent-${target}-${VERSION}`)
24
25
  const downloadUrl =
25
- process.env.EXIMAGENT_INSTALL_URL || `https://raw.githubusercontent.com/EximAgent/cli/main/bin/eximagent-${target}`
26
+ process.env.EXIMAGENT_INSTALL_URL ||
27
+ `https://raw.githubusercontent.com/EximAgent/cli/v${VERSION}/bin/eximagent-${target}`
26
28
  const download = (url, dest) =>
27
29
  new Promise((resolve, reject) => {
28
30
  const file = createWriteStream(dest, { mode: 0o755 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eximagent",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Trade-intelligence CLI for coding agents. B2B prospect discovery, contact enrichment, outreach with stage tracking, tariff + HS-code lookups, OFAC sanctions screening, trade corridor management, per-company negotiation memory.",
5
5
  "keywords": [
6
6
  "trade",
@@ -12,12 +12,14 @@ const PLATFORM_MAP = {
12
12
  }
13
13
  const target = PLATFORM_MAP[`${platform()}-${arch()}`]
14
14
  if (!target) process.exit(0)
15
+ const VERSION = require('../package.json').version
15
16
  const installDir = process.env.EXIMAGENT_HOME || join(homedir(), '.eximagent')
16
17
  const binDir = join(installDir, 'bin')
17
- const binPath = join(binDir, `eximagent-${target}`)
18
+ const binPath = join(binDir, `eximagent-${target}-${VERSION}`)
18
19
  if (existsSync(binPath)) process.exit(0)
19
20
  const url =
20
- process.env.EXIMAGENT_INSTALL_URL || `https://raw.githubusercontent.com/EximAgent/cli/main/bin/eximagent-${target}`
21
+ process.env.EXIMAGENT_INSTALL_URL ||
22
+ `https://raw.githubusercontent.com/EximAgent/cli/v${VERSION}/bin/eximagent-${target}`
21
23
  const TIMEOUT_MS = 20_000
22
24
  if (!existsSync(binDir)) {
23
25
  try {