@neus/sdk 1.1.4 → 1.1.5

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
@@ -1,8 +1,8 @@
1
1
  # @neus/sdk
2
2
 
3
- Create, check, and reuse NEUS trust receipts from apps and backends. The same package ships the **`neus`** CLI for hosted MCP setup.
3
+ Create, check, and reuse NEUS trust receipts from apps and backends. The same package ships the **`neus`** CLI for assistant setup.
4
4
 
5
- NEUS makes trust portable across apps, agents, and ecosystems before access, payment, or action.
5
+ NEUS is trust infrastructure for apps, agents, and ecosystems.
6
6
 
7
7
  Roadmap: [docs.neus.network/platform/status](https://docs.neus.network/platform/status)
8
8
 
@@ -18,25 +18,26 @@ One command detects your environment and configures hosted MCP for Claude Code,
18
18
 
19
19
  ```bash
20
20
  npx -y -p @neus/sdk neus setup
21
- npx -y -p @neus/sdk neus doctor --live
21
+ npx -y -p @neus/sdk neus check
22
+ npx -y -p @neus/sdk neus examples
22
23
  ```
23
24
 
24
- Open your MCP client and ask the assistant to use NEUS Trust.
25
+ Ask your assistant: **"Use NEUS Verify before taking sensitive actions."**
25
26
 
26
27
  ## MCP docs
27
28
 
28
29
  | Topic | Link |
29
30
  | --------------------------------- | ----------------------------------------------------------------------------- |
30
31
  | Setup, JSON snippets, and headers | [MCP setup](https://docs.neus.network/mcp/setup) |
31
- | Tools and session order | [MCP overview](https://docs.neus.network/mcp/overview) |
32
+ | Reuse-first MCP flow | [MCP overview](https://docs.neus.network/mcp/overview) |
32
33
  | Discovery URLs | [Discovery and endpoints](https://docs.neus.network/mcp/endpoints) |
33
- | Install NEUS Trust | [Install NEUS Trust](https://docs.neus.network/install) |
34
+ | Install NEUS | [Install NEUS](https://docs.neus.network/install) |
34
35
 
35
36
  Prefer `neus setup` over hand-editing config files so every host stays on **`https://mcp.neus.network/mcp`**.
36
37
 
37
38
  ## What you can ship
38
39
 
39
- - Hosted verification flows that return a reusable receipt
40
+ - Hosted verification flows that return reusable receipts
40
41
  - Server checks before access, rewards, payments, or actions
41
42
  - React gates with `VerifyGate`
42
43
  - Agent identity and scoped delegation
@@ -163,14 +164,14 @@ const client = new NeusClient({
163
164
 
164
165
  ```bash
165
166
  npx -y -p @neus/sdk neus setup
166
- npx -y -p @neus/sdk neus doctor --live
167
+ npx -y -p @neus/sdk neus check
167
168
  ```
168
169
 
169
170
  `neus setup` configures MCP and signs you in: `NEUS_ACCESS_KEY` from the environment when set, otherwise the selected host starts OAuth. Cursor, VS Code, and Claude Code use browser sign-in on NEUS. Pass `--access-key <npk_...>` only to override.
170
171
 
171
172
  Codex owns its local MCP OAuth session. Use `npx -y -p @neus/sdk neus setup --client codex`, then `npx -y -p @neus/sdk neus auth --client codex`.
172
173
 
173
- Integrators embedding install UX in apps should import **`@neus/sdk/mcp-hosts`** (setup commands, deeplinks, host labels) instead of duplicating strings.
174
+ Embed install UX with **`@neus/sdk/mcp-hosts`** (setup commands, deeplinks, host labels).
174
175
 
175
176
  Claude Code users can install **`neus-trust@neus`** for the bundled session workflow:
176
177
 
@@ -179,7 +180,7 @@ Claude Code users can install **`neus-trust@neus`** for the bundled session work
179
180
  /plugin install neus-trust@neus
180
181
  ```
181
182
 
182
- Other hosts: [Install NEUS Trust](https://docs.neus.network/install).
183
+ Other hosts: [Install NEUS](https://docs.neus.network/install).
183
184
 
184
185
  ## Docs
185
186
 
package/cjs/client.cjs CHANGED
@@ -468,19 +468,19 @@ var NEUS_CONSTANTS = {
468
468
  // client.js
469
469
  var FALLBACK_PUBLIC_VERIFIER_CATALOG = {
470
470
  "ownership-basic": { supportsDirectApi: true },
471
+ "ownership-social": { supportsDirectApi: false },
471
472
  "ownership-pseudonym": { supportsDirectApi: true },
472
473
  "ownership-dns-txt": { supportsDirectApi: true },
473
- "ownership-social": { supportsDirectApi: false },
474
474
  "ownership-org-oauth": { supportsDirectApi: false },
475
475
  "contract-ownership": { supportsDirectApi: true },
476
+ "proof-of-human": { supportsDirectApi: false },
476
477
  "nft-ownership": { supportsDirectApi: true },
477
478
  "token-holding": { supportsDirectApi: true },
478
- "wallet-link": { supportsDirectApi: true },
479
479
  "wallet-risk": { supportsDirectApi: true },
480
- "proof-of-human": { supportsDirectApi: false },
480
+ "wallet-link": { supportsDirectApi: true },
481
+ "ai-content-moderation": { supportsDirectApi: true },
481
482
  "agent-identity": { supportsDirectApi: true },
482
- "agent-delegation": { supportsDirectApi: true },
483
- "ai-content-moderation": { supportsDirectApi: true }
483
+ "agent-delegation": { supportsDirectApi: true }
484
484
  };
485
485
  var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
486
486
  var WALLET_LINK_RELATIONSHIP_TYPES = /* @__PURE__ */ new Set(["primary", "personal", "org", "affiliate", "agent", "linked"]);
package/cjs/index.cjs CHANGED
@@ -1180,19 +1180,19 @@ var init_client = __esm({
1180
1180
  init_utils();
1181
1181
  FALLBACK_PUBLIC_VERIFIER_CATALOG = {
1182
1182
  "ownership-basic": { supportsDirectApi: true },
1183
+ "ownership-social": { supportsDirectApi: false },
1183
1184
  "ownership-pseudonym": { supportsDirectApi: true },
1184
1185
  "ownership-dns-txt": { supportsDirectApi: true },
1185
- "ownership-social": { supportsDirectApi: false },
1186
1186
  "ownership-org-oauth": { supportsDirectApi: false },
1187
1187
  "contract-ownership": { supportsDirectApi: true },
1188
+ "proof-of-human": { supportsDirectApi: false },
1188
1189
  "nft-ownership": { supportsDirectApi: true },
1189
1190
  "token-holding": { supportsDirectApi: true },
1190
- "wallet-link": { supportsDirectApi: true },
1191
1191
  "wallet-risk": { supportsDirectApi: true },
1192
- "proof-of-human": { supportsDirectApi: false },
1192
+ "wallet-link": { supportsDirectApi: true },
1193
+ "ai-content-moderation": { supportsDirectApi: true },
1193
1194
  "agent-identity": { supportsDirectApi: true },
1194
- "agent-delegation": { supportsDirectApi: true },
1195
- "ai-content-moderation": { supportsDirectApi: true }
1195
+ "agent-delegation": { supportsDirectApi: true }
1196
1196
  };
1197
1197
  EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
1198
1198
  WALLET_LINK_RELATIONSHIP_TYPES = /* @__PURE__ */ new Set(["primary", "personal", "org", "affiliate", "agent", "linked"]);
package/cli/neus.mjs CHANGED
@@ -100,7 +100,7 @@ function emitCliBanner(cliOptions = {}) {
100
100
  if (!shouldEmitCliBanner(cliOptions)) return;
101
101
  const version = readCliVersion();
102
102
  const title = paint('NEUS', 'green');
103
- const meta = `${paint(`v${version}`, 'dim')}${paint(' | trust receipts', 'dim')}`;
103
+ const meta = `${paint(`v${version}`, 'dim')}${paint(' | trust that travels', 'dim')}`;
104
104
  writeCliLine('');
105
105
  writeCliLine(` ${title} ${meta}`);
106
106
  writeCliLine('');
@@ -141,17 +141,15 @@ function describeClientResult(command, result) {
141
141
  }
142
142
 
143
143
  function printBuilderGuidance(command, results) {
144
- if (!['setup', 'auth'].includes(command)) return;
144
+ if (!['setup', 'auth', 'check'].includes(command)) return;
145
145
  const hasCodex = results.some(result => result.client === 'codex');
146
146
  writeCliLine('');
147
- writeCliLine(paint('Builder notes', 'cyan'));
148
- writeGuidanceLine('Use from any shell without a global install: `npx -y -p @neus/sdk neus ...`.');
147
+ writeCliLine(paint('Next steps', 'cyan'));
148
+ writeGuidanceLine('Run `npx -y -p @neus/sdk neus examples` for assistant prompts.');
149
149
  if (hasCodex) {
150
- writeGuidanceLine('Codex owns OAuth: run `neus auth --client codex` or `codex mcp login neus`.');
150
+ writeGuidanceLine('Codex OAuth: `neus auth --client codex` or `codex mcp login neus`.');
151
151
  }
152
- writeGuidanceLine(
153
- 'Claude plugin commands run inside Claude Code chat, not as `claude install`: `/plugin marketplace add https://github.com/neus/network`.'
154
- );
152
+ writeGuidanceLine('Ask your assistant: "Use NEUS Verify before taking sensitive actions."');
155
153
  }
156
154
 
157
155
  function selectedClientNames(results) {
@@ -178,7 +176,7 @@ function printStatusGuidance(results) {
178
176
  writeGuidanceLine(NEUS_MCP_URL);
179
177
  writeCliLine(paint('Profile connection', 'cyan'));
180
178
  if (results.some(result => result.configured)) {
181
- writeGuidanceLine('Saved config found. Run `npx -y -p @neus/sdk neus doctor --live` to confirm live Profile context.');
179
+ writeGuidanceLine('Saved config found. Run `npx -y -p @neus/sdk neus check` to confirm live connection.');
182
180
  } else {
183
181
  writeGuidanceLine(`No selected MCP host is configured yet. Run \`${preferredSetupCommand(results)}\`.`);
184
182
  }
@@ -659,6 +657,8 @@ function printUsage(exitCode = 0) {
659
657
  ' auth Sign in (browser, or NEUS_ACCESS_KEY / --access-key when set)',
660
658
  ' disconnect Disconnect NEUS MCP (revoke the stored OAuth token or access key)',
661
659
  ' status Show current NEUS MCP setup',
660
+ ' check Confirm setup and live NEUS connection (alias for doctor --live)',
661
+ ' examples Show assistant prompts to try after install',
662
662
  ' doctor Deep check: config status, profile connection, and live MCP context',
663
663
  ' import Detect and package supported assistant context for NEUS portability',
664
664
  ' export Export the latest local NEUS portable agent manifest',
@@ -1105,7 +1105,7 @@ function createEmptyManifest(source) {
1105
1105
  proofHints: {
1106
1106
  status: 'not-issued',
1107
1107
  qHashes: [],
1108
- next: ['neus setup', 'neus auth', 'neus doctor --live']
1108
+ next: ['neus setup', 'neus auth', 'neus check']
1109
1109
  }
1110
1110
  };
1111
1111
  }
@@ -1383,7 +1383,7 @@ async function runLiveMcpDiagnostics(accessKey) {
1383
1383
  params: {
1384
1384
  protocolVersion: '2025-11-25',
1385
1385
  capabilities: {},
1386
- clientInfo: { name: 'neus-cli', version: '1.0.0' }
1386
+ clientInfo: { name: 'neus-cli', version: '1.1.5' }
1387
1387
  },
1388
1388
  accessKey,
1389
1389
  signal: controller.signal
@@ -1424,6 +1424,9 @@ async function runLiveMcpDiagnostics(accessKey) {
1424
1424
  signal: controller.signal
1425
1425
  });
1426
1426
  const mode = context.ok ? context.payload?.mode?.current || context.payload?.mode || '' : '';
1427
+ const profileCtx = context.ok ? context.payload?.profileContext : null;
1428
+ const principal = profileCtx?.principal || null;
1429
+ const proofsTotal = profileCtx?.profileSummary?.proofsSummary?.total;
1427
1430
  return {
1428
1431
  live: true,
1429
1432
  reachable: true,
@@ -1431,6 +1434,9 @@ async function runLiveMcpDiagnostics(accessKey) {
1431
1434
  toolsCount: toolNames.length,
1432
1435
  tools: toolNames,
1433
1436
  contextMode: mode,
1437
+ sessionWallet: context.ok ? context.payload?.sessionWallet || principal?.primaryAccount || null : null,
1438
+ profileHandle: principal?.handle || null,
1439
+ proofsTotal: Number.isFinite(Number(proofsTotal)) ? Number(proofsTotal) : null,
1434
1440
  checks: [
1435
1441
  {
1436
1442
  name: 'initialize',
@@ -1815,7 +1821,7 @@ async function runSetup(options) {
1815
1821
  }
1816
1822
 
1817
1823
  printFlowSummary('setup', scope, initResults, {
1818
- nextStep: accessKey ? 'Open your MCP client and ask the assistant to use NEUS Trust.' : '',
1824
+ nextStep: accessKey ? 'Run `neus examples`, then ask your assistant to use NEUS Verify.' : '',
1819
1825
  cliOptions: options
1820
1826
  });
1821
1827
 
@@ -1823,7 +1829,7 @@ async function runSetup(options) {
1823
1829
  const authResult = await runAuth(options);
1824
1830
  if (authResult && !authResult.hasErrors) {
1825
1831
  printFlowSummary('auth', authResult.scope, authResult.results, {
1826
- nextStep: 'Open your MCP client and ask the assistant to use NEUS Trust.',
1832
+ nextStep: 'Run `neus examples`, then ask your assistant to use NEUS Verify.',
1827
1833
  cliOptions: options
1828
1834
  });
1829
1835
  }
@@ -1910,7 +1916,39 @@ function runExport(options) {
1910
1916
  printExportSummary(payload, options);
1911
1917
  }
1912
1918
 
1919
+ const ASSISTANT_EXAMPLE_PROMPTS = [
1920
+ 'Use NEUS Verify before taking sensitive actions.',
1921
+ 'Check whether I already have the required trust receipt.',
1922
+ 'Verify this agent is trusted before it runs tools.',
1923
+ 'Use NEUS Vault before storing or using secrets.',
1924
+ 'Show the receipt for this verification.'
1925
+ ];
1926
+
1927
+ function runExamples(options) {
1928
+ const payload = {
1929
+ command: 'examples',
1930
+ intro: 'Try this in your assistant:',
1931
+ prompts: ASSISTANT_EXAMPLE_PROMPTS
1932
+ };
1933
+
1934
+ if (options.json) {
1935
+ printJson(payload);
1936
+ return;
1937
+ }
1938
+
1939
+ emitCliBanner(options);
1940
+ writeCliLine(paint('examples', 'green'));
1941
+ writeCliLine('');
1942
+ writeCliLine(` ${paint(payload.intro, 'dim')}`);
1943
+ writeCliLine('');
1944
+ ASSISTANT_EXAMPLE_PROMPTS.forEach((prompt, index) => {
1945
+ writeCliLine(` ${paint(String(index + 1) + '.', 'cyan')} ${prompt}`);
1946
+ });
1947
+ writeCliLine('');
1948
+ }
1949
+
1913
1950
  async function runDoctor(options) {
1951
+ const displayCommand = options.displayCommand || 'doctor';
1914
1952
  const scope = resolveScope(options);
1915
1953
  const cwd = process.cwd();
1916
1954
  const clients = resolveClients(scope, options.clients);
@@ -1922,7 +1960,7 @@ async function runDoctor(options) {
1922
1960
  const configuredClients = inspected.filter(r => r.configured);
1923
1961
  const liveAccessKey = resolveLiveAccessKey(options, scope, cwd);
1924
1962
  const payload = {
1925
- command: 'doctor',
1963
+ command: displayCommand,
1926
1964
  scope,
1927
1965
  clients: inspected,
1928
1966
  configuredCount: configuredClients.length,
@@ -1951,7 +1989,7 @@ async function runDoctor(options) {
1951
1989
 
1952
1990
  if (configuredClients.length === 0) {
1953
1991
  emitCliBanner(options);
1954
- writeCliLine(paint('doctor', 'green'));
1992
+ writeCliLine(paint(displayCommand, 'green'));
1955
1993
  for (const result of inspected) {
1956
1994
  if (result.error) {
1957
1995
  logStep('warn', result.client, result.error);
@@ -1966,13 +2004,13 @@ async function runDoctor(options) {
1966
2004
  writeGuidanceLine(NEUS_MCP_URL);
1967
2005
  writeCliLine(paint('Profile connection', 'cyan'));
1968
2006
  writeGuidanceLine(`No selected MCP host is configured yet. Run \`${preferredSetupCommand(inspected)}\`.`);
1969
- writeGuidanceLine(`Then run \`${preferredAuthCommand(inspected)}\` and re-check with \`npx -y -p @neus/sdk neus doctor --live\`.`);
2007
+ writeGuidanceLine(`Then run \`${preferredAuthCommand(inspected)}\` and re-check with \`npx -y -p @neus/sdk neus check\`.`);
1970
2008
  writeCliLine('');
1971
2009
  process.exitCode = 1;
1972
2010
  return;
1973
2011
  }
1974
2012
 
1975
- printFlowSummary('doctor', scope, inspected, { cliOptions: options });
2013
+ printFlowSummary(displayCommand, scope, inspected, { cliOptions: options });
1976
2014
  const hasCodex = inspected.some(result => result.client === 'codex');
1977
2015
  writeCliLine(paint('Profile connection', 'cyan'));
1978
2016
  if (options.live && payload.mcp) {
@@ -1983,16 +2021,19 @@ async function runDoctor(options) {
1983
2021
  : 'No account credential found for the configured MCP clients. Run `neus auth`.'
1984
2022
  );
1985
2023
  } else {
1986
- logStep(
1987
- payload.mcp.authenticated ? 'ok' : 'warn',
1988
- 'profile',
1989
- payload.mcp.authenticated
1990
- ? `live MCP context confirmed; ${payload.mcp.toolsCount || 0} tools discovered`
1991
- : 'live MCP context was not confirmed'
1992
- );
2024
+ if (payload.mcp.authenticated) {
2025
+ const handle = payload.mcp.profileHandle ? ` as ${payload.mcp.profileHandle}` : '';
2026
+ const receipts =
2027
+ payload.mcp.proofsTotal != null ? ` · ${payload.mcp.proofsTotal} trust receipts on file` : '';
2028
+ logStep('ok', 'profile', `connected${handle}${receipts}`);
2029
+ writeGuidanceLine('NEUS Verify is ready. Ask your assistant to verify trust before sensitive actions.');
2030
+ writeGuidanceLine('Run `npx -y -p @neus/sdk neus examples` for starter prompts.');
2031
+ } else {
2032
+ logStep('warn', 'profile', 'live connection was not confirmed — run `neus auth`');
2033
+ }
1993
2034
  }
1994
2035
  } else if (liveAccessKey) {
1995
- writeGuidanceLine('Saved credential found. Run `neus doctor --live` to confirm Profile context.');
2036
+ writeGuidanceLine('Saved credential found. Run `neus check` to confirm live connection.');
1996
2037
  } else {
1997
2038
  writeGuidanceLine(
1998
2039
  hasCodex
@@ -2096,12 +2137,12 @@ async function main() {
2096
2137
  printJson(result);
2097
2138
  } else if (result.authMethod !== 'browser') {
2098
2139
  printFlowSummary('auth', result.scope, result.results, {
2099
- nextStep: 'Open your MCP client and ask the assistant to use NEUS Trust.',
2140
+ nextStep: 'Run `neus examples`, then ask your assistant to use NEUS Verify.',
2100
2141
  cliOptions: options
2101
2142
  });
2102
2143
  } else {
2103
2144
  printFlowSummary('auth', result.scope, result.results, {
2104
- nextStep: 'Open your MCP client and ask the assistant to use NEUS Trust.',
2145
+ nextStep: 'Run `neus examples`, then ask your assistant to use NEUS Verify.',
2105
2146
  cliOptions: options
2106
2147
  });
2107
2148
  }
@@ -2122,10 +2163,18 @@ async function main() {
2122
2163
  }
2123
2164
  return;
2124
2165
  }
2166
+ if (command === 'check') {
2167
+ await runDoctor({ ...options, live: true, displayCommand: 'check' });
2168
+ return;
2169
+ }
2125
2170
  if (command === 'doctor') {
2126
2171
  await runDoctor(options);
2127
2172
  return;
2128
2173
  }
2174
+ if (command === 'examples') {
2175
+ runExamples(options);
2176
+ return;
2177
+ }
2129
2178
  if (command === 'import') {
2130
2179
  runImport(options);
2131
2180
  return;
package/client.js CHANGED
@@ -11,19 +11,19 @@ import {
11
11
 
12
12
  const FALLBACK_PUBLIC_VERIFIER_CATALOG = {
13
13
  'ownership-basic': { supportsDirectApi: true },
14
+ 'ownership-social': { supportsDirectApi: false },
14
15
  'ownership-pseudonym': { supportsDirectApi: true },
15
16
  'ownership-dns-txt': { supportsDirectApi: true },
16
- 'ownership-social': { supportsDirectApi: false },
17
17
  'ownership-org-oauth': { supportsDirectApi: false },
18
18
  'contract-ownership': { supportsDirectApi: true },
19
+ 'proof-of-human': { supportsDirectApi: false },
19
20
  'nft-ownership': { supportsDirectApi: true },
20
21
  'token-holding': { supportsDirectApi: true },
21
- 'wallet-link': { supportsDirectApi: true },
22
22
  'wallet-risk': { supportsDirectApi: true },
23
- 'proof-of-human': { supportsDirectApi: false },
23
+ 'wallet-link': { supportsDirectApi: true },
24
+ 'ai-content-moderation': { supportsDirectApi: true },
24
25
  'agent-identity': { supportsDirectApi: true },
25
- 'agent-delegation': { supportsDirectApi: true },
26
- 'ai-content-moderation': { supportsDirectApi: true }
26
+ 'agent-delegation': { supportsDirectApi: true }
27
27
  };
28
28
 
29
29
  const EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neus/sdk",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "NEUS makes trust portable across the internet — so people, apps, and AI agents can prove what is real before access, payout, or execution.",
5
5
  "bin": {
6
6
  "neus": "cli/neus.mjs"