@clawpump/claw-agent 0.1.13 → 0.1.14
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.
|
|
5
|
+
"version": "0.15.4",
|
|
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",
|
package/agent/scripts/install.sh
CHANGED
|
@@ -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")}`);
|