@clawpump/claw-agent 0.1.13 → 0.1.15

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.
@@ -1451,6 +1451,33 @@ async function getOriginUrl(updateRoot) {
1451
1451
  return origin.code === 0 ? origin.stdout.trim() : ''
1452
1452
  }
1453
1453
 
1454
+ // The ClawPump fork the desktop must always track. Anyone who installed
1455
+ // upstream Hermes has origin=NousResearch in ~/.hermes/hermes-agent; the
1456
+ // self-update fetches/rebuilds whatever origin points at, then dittos the
1457
+ // rebuilt app over the running one. With an upstream origin that rebuilds
1458
+ // UPSTREAM Hermes (its icon, installer, branding) on top of Claw Agent.
1459
+ const CLAWPUMP_FORK_HTTPS = 'https://github.com/Clawpump/claw-agent.git'
1460
+
1461
+ // Force a pre-existing checkout's origin to the ClawPump fork before any
1462
+ // update check/apply. Idempotent — no-ops once origin already points at the
1463
+ // fork (the common case after the install.sh bootstrap re-point). Best-effort:
1464
+ // never throws, so a git hiccup can't block the update path.
1465
+ async function ensureClawpumpOrigin(updateRoot) {
1466
+ try {
1467
+ const url = await getOriginUrl(updateRoot)
1468
+ if (/clawpump\/claw-agent/i.test(url)) return false
1469
+ const res = await runGit(['remote', 'set-url', 'origin', CLAWPUMP_FORK_HTTPS], { cwd: updateRoot })
1470
+ if (res.code !== 0) {
1471
+ await runGit(['remote', 'add', 'origin', CLAWPUMP_FORK_HTTPS], { cwd: updateRoot })
1472
+ }
1473
+ rememberLog(`[updates] re-pointed origin to the ClawPump fork (was: ${url || 'none'})`)
1474
+ return true
1475
+ } catch (error) {
1476
+ rememberLog(`[updates] ensureClawpumpOrigin failed: ${error.message}`)
1477
+ return false
1478
+ }
1479
+ }
1480
+
1454
1481
  function emitUpdateProgress(payload) {
1455
1482
  const merged = { stage: 'idle', message: '', percent: null, error: null, ...payload, at: Date.now() }
1456
1483
  rememberLog(`[updates] ${merged.stage}: ${merged.message || merged.error || ''}`)
@@ -1487,6 +1514,7 @@ async function resolveHealedBranch(updateRoot, branch) {
1487
1514
 
1488
1515
  async function checkUpdates() {
1489
1516
  const updateRoot = resolveUpdateRoot()
1517
+ await ensureClawpumpOrigin(updateRoot)
1490
1518
  let { branch } = readDesktopUpdateConfig()
1491
1519
  const gitDir = path.join(updateRoot, '.git')
1492
1520
  if (!directoryExists(gitDir)) {
@@ -1764,6 +1792,9 @@ async function applyUpdates(opts = {}) {
1764
1792
  updateInFlight = true
1765
1793
 
1766
1794
  try {
1795
+ // Guard against rebuilding/installing UPSTREAM Hermes over Claw Agent: make
1796
+ // sure the checkout the apply pulls + rebuilds from tracks the fork.
1797
+ await ensureClawpumpOrigin(resolveUpdateRoot())
1767
1798
  const updater = resolveUpdaterBinary()
1768
1799
  if (!updater && !IS_WINDOWS) {
1769
1800
  // macOS/Linux drag-install: no staged Tauri hermes-setup. Unlike Windows
@@ -2,7 +2,7 @@
2
2
  "name": "hermes",
3
3
  "productName": "Claw Agent",
4
4
  "private": true,
5
- "version": "0.15.3",
5
+ "version": "0.15.5",
6
6
  "description": "Claw Agent by ClawPump — native desktop app for Solana agents, built on Hermes Agent by Nous Research.",
7
7
  "author": "ClawPump (built on Hermes by Nous Research)",
8
8
  "type": "module",
@@ -5953,7 +5953,7 @@ def _update_via_zip(args):
5953
5953
  )
5954
5954
  sys.exit(1)
5955
5955
  zip_url = (
5956
- f"https://github.com/NousResearch/hermes-agent/archive/refs/heads/{branch}.zip"
5956
+ f"https://github.com/Clawpump/claw-agent/archive/refs/heads/{branch}.zip"
5957
5957
  )
5958
5958
 
5959
5959
  print("→ Downloading latest version...")
@@ -8624,7 +8624,7 @@ def _cmd_update_impl(args, gateway_mode: bool):
8624
8624
  return
8625
8625
  print("✗ Not a git repository. Please reinstall:")
8626
8626
  print(
8627
- " curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash"
8627
+ " npx @clawpump/claw-agent"
8628
8628
  )
8629
8629
  sys.exit(1)
8630
8630
 
@@ -5,10 +5,10 @@ REM ============================================================================
5
5
  REM This batch file launches the PowerShell installer for users running CMD.
6
6
  REM
7
7
  REM Usage:
8
- REM curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.cmd -o install.cmd && install.cmd && del install.cmd
8
+ REM curl -fsSL https://raw.githubusercontent.com/Clawpump/claw-agent/main/scripts/install.cmd -o install.cmd && install.cmd && del install.cmd
9
9
  REM
10
10
  REM Or if you're already in PowerShell, use the direct command instead:
11
- REM iex (irm https://hermes-agent.nousresearch.com/install.ps1)
11
+ REM iex (irm https://raw.githubusercontent.com/Clawpump/claw-agent/main/scripts/install.ps1)
12
12
  REM ============================================================================
13
13
 
14
14
  echo.
@@ -16,12 +16,12 @@ echo Hermes Agent Installer
16
16
  echo Launching PowerShell installer...
17
17
  echo.
18
18
 
19
- powershell -ExecutionPolicy ByPass -NoProfile -Command "iex (irm https://hermes-agent.nousresearch.com/install.ps1)"
19
+ powershell -ExecutionPolicy ByPass -NoProfile -Command "iex (irm https://raw.githubusercontent.com/Clawpump/claw-agent/main/scripts/install.ps1)"
20
20
 
21
21
  if %ERRORLEVEL% NEQ 0 (
22
22
  echo.
23
23
  echo Installation failed. Please try running PowerShell directly:
24
- echo powershell -ExecutionPolicy ByPass -c "iex (irm https://hermes-agent.nousresearch.com/install.ps1)"
24
+ echo powershell -ExecutionPolicy ByPass -c "iex (irm https://raw.githubusercontent.com/Clawpump/claw-agent/main/scripts/install.ps1)"
25
25
  echo.
26
26
  pause
27
27
  exit /b 1
@@ -1208,6 +1208,19 @@ function Install-Repository {
1208
1208
  # users hit on update. Pin autocrlf=false so the dirt is never
1209
1209
  # created in the first place.
1210
1210
  git -c windows.appendAtomically=false config core.autocrlf false 2>$null
1211
+ # Re-point a pre-existing checkout at the ClawPump fork. Anyone
1212
+ # who installed upstream Hermes has origin=NousResearch here;
1213
+ # without this the update pulls upstream (none of the ClawPump
1214
+ # features) into the install. Force origin to the fork; the
1215
+ # diverged history means the update below hard-resets onto it.
1216
+ $repoRepointed = $false
1217
+ $currentOrigin = (git -c windows.appendAtomically=false remote get-url origin 2>$null) -join ""
1218
+ if ($currentOrigin -notmatch "(?i)clawpump/claw-agent") {
1219
+ Write-Warn "Re-pointing origin to the ClawPump fork (was: $currentOrigin)."
1220
+ git -c windows.appendAtomically=false remote set-url origin $RepoUrlHttps 2>$null
1221
+ if ($LASTEXITCODE -ne 0) { git -c windows.appendAtomically=false remote add origin $RepoUrlHttps 2>$null }
1222
+ $repoRepointed = $true
1223
+ }
1211
1224
  # Preserve any real local changes before the checkout instead of
1212
1225
  # discarding them with `reset --hard HEAD`. The old hard reset
1213
1226
  # silently destroyed agent-edited source on managed clones (the
@@ -1254,8 +1267,16 @@ function Install-Repository {
1254
1267
  } else {
1255
1268
  git -c windows.appendAtomically=false checkout $Branch
1256
1269
  if ($LASTEXITCODE -ne 0) { throw "git checkout $Branch failed (exit $LASTEXITCODE)" }
1257
- git -c windows.appendAtomically=false pull --ff-only origin $Branch
1258
- if ($LASTEXITCODE -ne 0) { throw "git pull failed (exit $LASTEXITCODE)" }
1270
+ if ($repoRepointed) {
1271
+ # Upstream -> fork is a diverged history; fast-forward is
1272
+ # impossible. Hard-reset the branch onto the fork.
1273
+ Write-Info "Resetting $Branch to the ClawPump fork (origin/$Branch)..."
1274
+ git -c windows.appendAtomically=false reset --hard "origin/$Branch"
1275
+ if ($LASTEXITCODE -ne 0) { throw "git reset --hard origin/$Branch failed (exit $LASTEXITCODE)" }
1276
+ } else {
1277
+ git -c windows.appendAtomically=false pull --ff-only origin $Branch
1278
+ if ($LASTEXITCODE -ne 0) { throw "git pull failed (exit $LASTEXITCODE)" }
1279
+ }
1259
1280
  }
1260
1281
 
1261
1282
  if ($autostashRef) {
@@ -1266,7 +1287,9 @@ function Install-Repository {
1266
1287
  # bootstrap run the installer without a usable console -- in
1267
1288
  # those cases Read-Host would hang or return empty, so we
1268
1289
  # skip the prompt and just restore (the safe default).
1269
- $restoreNow = $true
1290
+ # Don't replay upstream-Hermes local edits onto the fork —
1291
+ # they target different code and would only conflict.
1292
+ $restoreNow = -not $repoRepointed
1270
1293
  $hasConsole = $false
1271
1294
  try {
1272
1295
  $hasConsole = (
@@ -1804,6 +1804,30 @@ SOUL_EOF
1804
1804
  fi
1805
1805
  fi
1806
1806
  fi
1807
+
1808
+ # Seed the ClawPump MCP (133 ClawPump tools: wallet, trading, marketplace,
1809
+ # perps, token launch) so it's connected out of the box instead of needing
1810
+ # a manual `hermes clawpump setup`. The remote entry is OAuth-deferred — the
1811
+ # sign-in browser opens on first connect, not here — so this only writes
1812
+ # config. Idempotent (skips if already configured) and best-effort: a
1813
+ # failure here must never fail the install.
1814
+ if [ -x "$INSTALL_DIR/venv/bin/python" ]; then
1815
+ log_info "Ensuring the ClawPump MCP is connected..."
1816
+ if "$INSTALL_DIR/venv/bin/python" - >/dev/null 2>&1 <<'PY'
1817
+ import sys
1818
+ try:
1819
+ from hermes_cli.clawpump_cli import _configured_entry
1820
+ from hermes_cli.mcp_picker import install_by_name
1821
+ sys.exit(0 if _configured_entry() else install_by_name("clawpump"))
1822
+ except Exception:
1823
+ sys.exit(1)
1824
+ PY
1825
+ then
1826
+ log_success "ClawPump MCP connected — sign in on first launch"
1827
+ else
1828
+ log_info "ClawPump MCP seed deferred (run 'hermes clawpump setup' to connect)"
1829
+ fi
1830
+ fi
1807
1831
  }
1808
1832
 
1809
1833
  find_system_browser() {
package/bin/cli.mjs CHANGED
@@ -133,6 +133,24 @@ function main() {
133
133
  run(uv, ["pip", "install", "--python", venvExe("python"), "-e", `${AGENT_DIR}[${EXTRA}]`]);
134
134
  ok("dependencies installed");
135
135
 
136
+ // 3b) Seed the ClawPump MCP (133 tools — wallet, trading, marketplace) so
137
+ // it's connected out of the box. Idempotent (skips if already configured)
138
+ // and best-effort — a failure here must never abort the install. The remote
139
+ // entry is OAuth-deferred, so the sign-in browser opens on first connect.
140
+ try {
141
+ const seed = [
142
+ "import sys",
143
+ "try:",
144
+ " from hermes_cli.clawpump_cli import _configured_entry",
145
+ " from hermes_cli.mcp_picker import install_by_name",
146
+ " sys.exit(0 if _configured_entry() else install_by_name('clawpump'))",
147
+ "except Exception:",
148
+ " sys.exit(1)",
149
+ ].join("\n");
150
+ const r = spawnSync(venvExe("python"), ["-c", seed], { stdio: "ignore" });
151
+ if (r.status === 0) ok("ClawPump MCP connected — sign in on first launch");
152
+ } catch { /* best-effort: connect manually with `claw clawpump setup` */ }
153
+
136
154
  // 4) launcher
137
155
  const onPath = makeLauncher();
138
156
  ok(`launcher → ${path.join(BIN_DIR, "claw")}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawpump/claw-agent",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },