@neus/sdk 1.1.6 → 1.2.0

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
@@ -14,16 +14,29 @@ npm install @neus/sdk
14
14
 
15
15
  ## Connect editors and assistants
16
16
 
17
- One command detects your environment and configures hosted MCP for Claude Code, Codex, Cursor, or VS Code.
17
+ Install once, then use short commands:
18
18
 
19
19
  ```bash
20
- npx -y -p @neus/sdk neus setup
21
- npx -y -p @neus/sdk neus check
22
- npx -y -p @neus/sdk neus examples
20
+ npm i -g @neus/sdk
21
+ neus setup
22
+ neus check
23
+ neus examples
23
24
  ```
24
25
 
26
+ Zero-install: `npx @neus/sdk setup`
27
+
25
28
  Ask your assistant: **"Use NEUS Verify before taking sensitive actions."**
26
29
 
30
+ ## Mount an agent in a project
31
+
32
+ ```bash
33
+ neus auth
34
+ neus mount <agentId> --apply cursor
35
+ neus doctor --live
36
+ ```
37
+
38
+ Writes `.neus/mount.json` and host rules in the current repo. [Runtime Mount docs](https://docs.neus.network/agents/runtime-mount).
39
+
27
40
  ## MCP docs
28
41
 
29
42
  | Topic | Link |
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // cli-commands.js
21
+ var cli_commands_exports = {};
22
+ __export(cli_commands_exports, {
23
+ NEUS_AUTH_CLI: () => NEUS_AUTH_CLI,
24
+ NEUS_AUTH_NPX: () => NEUS_AUTH_NPX,
25
+ NEUS_CHECK_CLI: () => NEUS_CHECK_CLI,
26
+ NEUS_CHECK_NPX: () => NEUS_CHECK_NPX,
27
+ NEUS_DOCTOR_CLI: () => NEUS_DOCTOR_CLI,
28
+ NEUS_DOCTOR_NPX: () => NEUS_DOCTOR_NPX,
29
+ NEUS_EXAMPLES_CLI: () => NEUS_EXAMPLES_CLI,
30
+ NEUS_EXAMPLES_NPX: () => NEUS_EXAMPLES_NPX,
31
+ NEUS_INSTALL_CLI: () => NEUS_INSTALL_CLI,
32
+ NEUS_MOUNT_WORKFLOW: () => NEUS_MOUNT_WORKFLOW,
33
+ NEUS_NPX: () => NEUS_NPX,
34
+ NEUS_PKG: () => NEUS_PKG,
35
+ NEUS_QUICKSTART_INSTALLED: () => NEUS_QUICKSTART_INSTALLED,
36
+ NEUS_QUICKSTART_NPX: () => NEUS_QUICKSTART_NPX,
37
+ NEUS_SETUP_CLI: () => NEUS_SETUP_CLI,
38
+ NEUS_SETUP_NPX: () => NEUS_SETUP_NPX,
39
+ neusCmd: () => neusCmd,
40
+ neusMountApply: () => neusMountApply,
41
+ neusMountApplyNpx: () => neusMountApplyNpx,
42
+ neusNpx: () => neusNpx
43
+ });
44
+ module.exports = __toCommonJS(cli_commands_exports);
45
+ var NEUS_PKG = "@neus/sdk";
46
+ var NEUS_INSTALL_CLI = `npm i -g ${NEUS_PKG}`;
47
+ var NEUS_NPX = `npx ${NEUS_PKG}`;
48
+ var NEUS_SETUP_CLI = "neus setup";
49
+ var NEUS_AUTH_CLI = "neus auth";
50
+ var NEUS_CHECK_CLI = "neus check";
51
+ var NEUS_DOCTOR_CLI = "neus doctor --live";
52
+ var NEUS_EXAMPLES_CLI = "neus examples";
53
+ var NEUS_SETUP_NPX = `${NEUS_NPX} setup`;
54
+ var NEUS_AUTH_NPX = `${NEUS_NPX} auth`;
55
+ var NEUS_CHECK_NPX = `${NEUS_NPX} check`;
56
+ var NEUS_DOCTOR_NPX = `${NEUS_NPX} doctor --live`;
57
+ var NEUS_EXAMPLES_NPX = `${NEUS_NPX} examples`;
58
+ function neusMountApply(agentId, host = "cursor") {
59
+ const id = String(agentId || "").trim();
60
+ return `neus mount ${id} --apply ${host}`;
61
+ }
62
+ function neusMountApplyNpx(agentId, host = "cursor") {
63
+ const id = String(agentId || "").trim();
64
+ return `${NEUS_NPX} mount ${id} --apply ${host}`;
65
+ }
66
+ var NEUS_QUICKSTART_INSTALLED = `${NEUS_INSTALL_CLI}
67
+ ${NEUS_SETUP_CLI}
68
+ ${NEUS_AUTH_CLI}`;
69
+ var NEUS_QUICKSTART_NPX = NEUS_SETUP_NPX;
70
+ var NEUS_MOUNT_WORKFLOW = `${NEUS_AUTH_CLI}
71
+ neus mount <agentId> --apply cursor
72
+ ${NEUS_DOCTOR_CLI}`;
73
+ function neusCmd(subcommand) {
74
+ return `neus ${String(subcommand || "").trim()}`;
75
+ }
76
+ function neusNpx(subcommand) {
77
+ return `${NEUS_NPX} ${String(subcommand || "").trim()}`;
78
+ }
79
+ // Annotate the CommonJS export names for ESM import in node:
80
+ 0 && (module.exports = {
81
+ NEUS_AUTH_CLI,
82
+ NEUS_AUTH_NPX,
83
+ NEUS_CHECK_CLI,
84
+ NEUS_CHECK_NPX,
85
+ NEUS_DOCTOR_CLI,
86
+ NEUS_DOCTOR_NPX,
87
+ NEUS_EXAMPLES_CLI,
88
+ NEUS_EXAMPLES_NPX,
89
+ NEUS_INSTALL_CLI,
90
+ NEUS_MOUNT_WORKFLOW,
91
+ NEUS_NPX,
92
+ NEUS_PKG,
93
+ NEUS_QUICKSTART_INSTALLED,
94
+ NEUS_QUICKSTART_NPX,
95
+ NEUS_SETUP_CLI,
96
+ NEUS_SETUP_NPX,
97
+ neusCmd,
98
+ neusMountApply,
99
+ neusMountApplyNpx,
100
+ neusNpx
101
+ });
package/cjs/client.cjs CHANGED
@@ -1743,13 +1743,12 @@ ${bytes.length}`;
1743
1743
  }
1744
1744
  throw new ValidationError(`Failed to sign revocation: ${error.message}`);
1745
1745
  }
1746
- const res = await this._makeRequest("POST", `/api/v1/proofs/revoke-self/${qHash}`, {
1746
+ const json = await this._makeRequest("POST", `/api/v1/proofs/revoke-self/${qHash}`, {
1747
1747
  walletAddress: address,
1748
1748
  signature,
1749
1749
  signedTimestamp,
1750
1750
  ...signerIsEvm ? {} : { chain, signatureMethod }
1751
1751
  });
1752
- const json = await res.json();
1753
1752
  if (!json.success) {
1754
1753
  throw new ApiError(json.error?.message || "Failed to revoke proof", json.error);
1755
1754
  }
@@ -1999,7 +1998,7 @@ ${bytes.length}`;
1999
1998
  if (!id || id.length > 80 || !/^[a-zA-Z0-9:_-]+$/.test(id)) {
2000
1999
  throw new ValidationError("Valid gateId is required");
2001
2000
  }
2002
- const response = await this._makeRequest("GET", `/api/v1/gates/${encodeURIComponent(id)}`);
2001
+ const response = await this._makeRequest("GET", `/api/v1/profile/gates/${encodeURIComponent(id)}`);
2003
2002
  if (!response.success || !response.data?.gate) {
2004
2003
  throw new ApiError(`Gate lookup failed: ${response.error?.message || "Gate not found"}`, response.error);
2005
2004
  }
@@ -2036,7 +2035,7 @@ ${bytes.length}`;
2036
2035
  if (paymentTxHash) body.paymentTxHash = paymentTxHash;
2037
2036
  const response = await this._makeRequest(
2038
2037
  "POST",
2039
- `/api/v1/gates/${encodeURIComponent(gateId)}/fulfill`,
2038
+ `/api/v1/profile/gates/${encodeURIComponent(gateId)}/fulfill`,
2040
2039
  body
2041
2040
  );
2042
2041
  if (!response.success) {