@upoch/guard 0.1.1 → 0.1.2

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/README.md CHANGED
@@ -6,9 +6,15 @@ Upoch Guard saves verifiable checkpoints of an agent's work on Robinhood Chain.
6
6
  prompt or makes a bad trade, it restores the last good state, checked against the chain, or rolls back to the
7
7
  checkpoint before the mistake and keeps going. It also knows which of its actions already happened.
8
8
 
9
- This package is the `upoch` command you set Upoch up with, and the engine behind the Upoch framework plugins:
9
+ This package is the `upoch` command you set Upoch up with, an MCP server, and the engine behind the Upoch
10
+ framework plugins:
10
11
 
11
- - **ElizaOS**: [@upoch/plugin-elizaos](https://www.npmjs.com/package/@upoch/plugin-elizaos)
12
+ | Agent | One line |
13
+ |---|---|
14
+ | Claude Code | `claude mcp add upoch -- upoch mcp` |
15
+ | Cursor, Codex, Claude Desktop, any MCP client | an MCP server with the command `upoch mcp` (stdio) |
16
+ | ElizaOS | `plugins: ["@upoch/plugin-elizaos"]` in your character ([@upoch/plugin-elizaos](https://www.npmjs.com/package/@upoch/plugin-elizaos)) |
17
+ | LangChain / LangGraph | `callbacks: [new UpochCallbackHandler()]` ([@upoch/langchain](https://www.npmjs.com/package/@upoch/langchain)) |
12
18
 
13
19
  Website and debugger: https://upoch.tech. Contract (Robinhood Chain, 4663): `0x6179d9123c3c1f9e82f948101a4350cb55aa8c27`
14
20
 
@@ -22,8 +28,8 @@ upoch setup
22
28
  ```
23
29
 
24
30
  `upoch setup` creates your keys in `~/.upoch`, shows the owner address, and waits while you send it a little ETH on
25
- Robinhood Chain (0.001 ETH is plenty). Then it registers your agent. After that, connecting an agent is one line,
26
- for example `plugins: ["@upoch/plugin-elizaos"]` in an ElizaOS character.
31
+ Robinhood Chain (0.001 ETH is plenty). Then it registers your agent and, if Claude Code is installed, offers to
32
+ add the MCP server to it. After that, connecting an agent is one line (table above).
27
33
 
28
34
  Prefer separate steps? Run `upoch init`, then `upoch register`.
29
35
 
@@ -42,10 +48,28 @@ Two keys are created on your machine and never leave it:
42
48
  A rollback restores the agent's state and memory. It cannot reverse transactions that already happened on-chain;
43
49
  those are listed so the agent can account for them.
44
50
 
51
+ ## MCP tools
52
+
53
+ | Tool | What it does | On-chain |
54
+ |---|---|---|
55
+ | `upoch_restore` | Restores the latest checkpoint after verifying it: state, note, completed and unresolved actions | read |
56
+ | `upoch_checkpoint` | Saves the current state as a checkpoint (`progress`, `before_action`, `after_action`, `manual`) | 1 transaction |
57
+ | `upoch_record_action` | Records an external action (planned, submitted, confirmed, failed) with its transaction hash | no (goes into the next checkpoint) |
58
+ | `upoch_rollback` | Goes back to an earlier checkpoint (e.g. before a bad trade) and continues from it; lists actions since then that were not undone on-chain | 1 transaction |
59
+ | `upoch_complete` | Saves a final checkpoint and marks the run finished | 1 transaction |
60
+ | `upoch_history` | Lists recent checkpoints | read |
61
+ | `upoch_verify` | Verifies one checkpoint without restoring it | read |
62
+ | `upoch_status` | Shows the workflow, executor funds and today's usage | read |
63
+
64
+ The server tells the agent when to use them: restore at the start, checkpoint after meaningful progress and before
65
+ consequential actions, record each action as planned and then as confirmed, roll back when something went wrong,
66
+ and complete at the end.
67
+
45
68
  ## Commands
46
69
 
47
70
  ```sh
48
71
  upoch setup # keys, funding, registration, in one go
72
+ upoch mcp # run the MCP server (stdio); your MCP client starts it
49
73
  upoch status # workflow, funds and today's usage
50
74
  upoch key # print the checkpoint key, to open checkpoints in the debugger
51
75
  upoch export-owner # print the owner private key, to import it into a wallet
package/dist/cli.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // upoch init create keys and settings (your terminal only)
5
5
  // upoch register register the agent's workflow on-chain and fund its executor (your terminal only)
6
6
  // upoch status show the workflow, funds and usage
7
- // upoch mcp run the MCP server (stdio) for Claude Code, Cursor, Codex and other MCP clients (see LAUNCHED)
7
+ // upoch mcp run the MCP server (stdio) for Claude Code, Cursor, Codex and other MCP clients
8
8
  // upoch key print the checkpoint key, to open checkpoints in the debugger (your terminal only)
9
9
  // upoch export-owner print the owner private key, to import it into a wallet (your terminal only)
10
10
  import { spawnSync } from "node:child_process";
@@ -16,11 +16,8 @@ import { hasSetup, loadConfig, loadSecrets, networkInfo, upochHome } from "./con
16
16
  import { Guard } from "./guard.js";
17
17
  import { createServer, VERSION } from "./server.js";
18
18
  import { initialize, register, registrationPlan } from "./setup.js";
19
- /**
20
- * Integrations announced so far. The MCP server (`upoch mcp`) and LangChain already work; help and setup output list
21
- * them only once they launch. Flip these at launch.
22
- */
23
- const LAUNCHED = { mcp: false, langchain: false };
19
+ /** Integrations listed in help and setup output. */
20
+ const LAUNCHED = { mcp: true, langchain: true };
24
21
  const CONNECT = [
25
22
  ...(LAUNCHED.mcp ? [" Claude Code claude mcp add upoch -- upoch mcp", " Cursor, Codex add an MCP server with the command: upoch mcp"] : []),
26
23
  ' ElizaOS plugins: ["@upoch/plugin-elizaos"] in your character',
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { Guard } from "./guard.ts";
3
- export declare const VERSION = "0.1.1";
3
+ export declare const VERSION = "0.1.2";
4
4
  export declare const INSTRUCTIONS = "Upoch Guard saves verifiable checkpoints of your work on Robinhood Chain, so a crash, a bad prompt or a bad trade can be recovered from the last good state.\n\nWhen to use it:\n- At the start of a task, call upoch_restore. If a run was interrupted, continue from the returned state and do not repeat its completed actions.\n- After meaningful progress, call upoch_checkpoint with the state you would need to continue (plan, step, positions, results so far). Not after every small step: each checkpoint is an on-chain transaction.\n- Before a consequential external action (a swap, a transfer, a deployment), call upoch_record_action with status \"planned\" and then upoch_checkpoint with kind \"before_action\". After it settles, record it again as \"confirmed\" (with its transaction hash) or \"failed\".\n- If something went wrong (a bad trade, a bad instruction, corrupted state), use upoch_history to find the last good checkpoint and upoch_rollback to go back to it and continue. Rolling back restores your state; it does not undo on-chain transactions, so check the actions it lists.\n- When the task is finished, call upoch_complete.\n\nNever put private keys, seed phrases, passwords or API tokens in the state, notes or actions: checkpoints are permanent. Upoch refuses state that looks like it contains them. Setup (keys, registration, funding) is done by the user in their own terminal with the upoch command; never run \"upoch init\", \"upoch register\", \"upoch key\" or \"upoch export-owner\" yourself.";
5
5
  export declare function createServer(guard: Guard | (() => Guard)): McpServer;
package/dist/server.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import { z } from "zod";
5
5
  import { Guard, GuardError } from "./guard.js";
6
- export const VERSION = "0.1.1";
6
+ export const VERSION = "0.1.2";
7
7
  export const INSTRUCTIONS = `Upoch Guard saves verifiable checkpoints of your work on Robinhood Chain, so a crash, a bad prompt or a bad trade can be recovered from the last good state.
8
8
 
9
9
  When to use it:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@upoch/guard",
3
- "version": "0.1.1",
4
- "description": "Upoch Guard: verifiable checkpoints, recovery and rollback for AI agents on Robinhood Chain. The upoch command and the engine behind the Upoch framework plugins.",
3
+ "version": "0.1.2",
4
+ "description": "Upoch Guard: verifiable checkpoints, recovery and rollback for AI agents on Robinhood Chain. The upoch command, an MCP server for Claude Code, Cursor and Codex, and the engine behind the Upoch plugins for ElizaOS and LangChain.",
5
5
  "keywords": [
6
6
  "upoch",
7
7
  "ai-agents",
@@ -9,7 +9,10 @@
9
9
  "recovery",
10
10
  "rollback",
11
11
  "robinhood-chain",
12
- "elizaos"
12
+ "elizaos",
13
+ "langchain",
14
+ "mcp",
15
+ "model-context-protocol"
13
16
  ],
14
17
  "homepage": "https://upoch.tech/docs",
15
18
  "license": "MIT",