clishop 1.5.7 → 1.5.9

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/.mcp.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "clishop": {
4
- "command": "npx",
5
- "args": ["-y", "clishop", "--mcp"]
4
+ "command": "node",
5
+ "args": ["./dist/mcp.js"]
6
6
  }
7
7
  }
8
8
  }
package/README.md CHANGED
@@ -58,7 +58,7 @@ Once the ClawHub package is published, install CLISHOP into an OpenClaw workspac
58
58
  openclaw plugins install clawhub:clishop
59
59
  ```
60
60
 
61
- The bundle exposes the CLISHOP skill under `skills/clishop/SKILL.md` and merges the packaged MCP defaults from `.mcp.json` so OpenClaw can launch `clishop --mcp` automatically.
61
+ The bundle exposes the CLISHOP skill under `skills/clishop/SKILL.md` and merges the packaged MCP defaults from `.mcp.json` so OpenClaw can launch the bundled CLISHOP MCP runtime locally without fetching npm code at startup.
62
62
 
63
63
  ### Linux / WSL
64
64
 
@@ -98,6 +98,8 @@ clishop setup start --email user@example.com --json
98
98
 
99
99
  `setup start` returns immediately with account-ready status and stores auth locally.
100
100
 
101
+ In OpenClaw, prefer the installed CLISHOP MCP tools over CLI shell commands. For address management, the intended flow is to call `list_addresses` first, then `add_address` non-interactively with any known fields, and ask the user only for missing required address fields (`label`, `firstName`, `lastName`, `line1`, `city`, `postalCode`, `country`).
102
+
101
103
  - Search products right away with `clishop search <query>`
102
104
  - Add a shipping address later with `clishop address add`
103
105
  - Add a payment method later with `clishop payment add`
@@ -198,7 +200,7 @@ CLISHOP ships as a native MCP server with 46 tools. Any MCP-compatible client ge
198
200
 
199
201
  ```bash
200
202
  clishop-mcp # If installed globally
201
- npx -y clishop --mcp # Without installing
203
+ node ./dist/mcp.js # From the installed package directory
202
204
  ```
203
205
 
204
206
  The MCP onboarding tools now follow the same email-first model:
@@ -46,7 +46,9 @@ function fileDeletePassword(service, account) {
46
46
  }
47
47
 
48
48
  // src/auth.ts
49
- var require2 = createRequire(import.meta.url);
49
+ var require2 = createRequire(
50
+ typeof __filename !== "undefined" ? __filename : import.meta.url
51
+ );
50
52
  var _keytar = null;
51
53
  var _keytarChecked = false;
52
54
  function getKeytar() {
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  resolveBackend,
15
15
  startSetupSession,
16
16
  waitForSetupSession
17
- } from "./chunk-UO2N5F5R.js";
17
+ } from "./chunk-IF2ZZ3IJ.js";
18
18
  import {
19
19
  createAgent,
20
20
  deleteAgent,
@@ -1114,8 +1114,8 @@ async function runSetupWizard(emailArg, { json = false } = {}) {
1114
1114
  console.log();
1115
1115
  console.log(chalk4.bold.cyan(" W E L C O M E T O C L I S H O P"));
1116
1116
  console.log(chalk4.dim(" Order anything from your terminal."));
1117
- console.log(chalk4.dim(` npm: v${"1.5.7"}`));
1118
- console.log(chalk4.dim(` Build: ${"2026-04-06T08:53:16.476Z"}`));
1117
+ console.log(chalk4.dim(` npm: v${"1.5.9"}`));
1118
+ console.log(chalk4.dim(` Build: ${"2026-04-06T11:34:30.345Z"}`));
1119
1119
  console.log();
1120
1120
  divider(chalk4.cyan);
1121
1121
  console.log();
@@ -4261,7 +4261,7 @@ function registerDoctorCommand(program2) {
4261
4261
 
4262
4262
  // src/index.ts
4263
4263
  var program = new Command();
4264
- program.name("clishop").version("1.5.7").description(
4264
+ program.name("clishop").version("1.5.9").description(
4265
4265
  chalk16.bold("CLISHOP") + ` \u2014 Order anything from your terminal.
4266
4266
 
4267
4267
  Run 'clishop setup <email>' or 'clishop setup start --email <email> --json' to create your account.
package/dist/mcp.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  getUserInfo,
7
7
  isLoggedIn,
8
8
  startSetupSession
9
- } from "./chunk-UO2N5F5R.js";
9
+ } from "./chunk-IF2ZZ3IJ.js";
10
10
  import {
11
11
  __export,
12
12
  getActiveAgent,
@@ -16,6 +16,8 @@ import {
16
16
  // src/mcp.ts
17
17
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
18
18
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
19
+ import { resolve } from "path";
20
+ import { fileURLToPath } from "url";
19
21
 
20
22
  // node_modules/zod/v4/classic/external.js
21
23
  var external_exports = {};
@@ -13813,7 +13815,7 @@ function safeCall(fn) {
13813
13815
  var server = new McpServer(
13814
13816
  {
13815
13817
  name: "clishop",
13816
- version: "1.5.7"
13818
+ version: "1.5.9"
13817
13819
  },
13818
13820
  {
13819
13821
  capabilities: {
@@ -15046,7 +15048,8 @@ async function startMcpServer() {
15046
15048
  const transport = new StdioServerTransport();
15047
15049
  await server.connect(transport);
15048
15050
  }
15049
- var isDirectEntry = import.meta.url === `file:///${process.argv[1]?.replace(/\\/g, "/")}` || import.meta.url === `file://${process.argv[1]?.replace(/\\/g, "/")}`;
15051
+ var moduleEntryPath = typeof __filename !== "undefined" ? __filename : fileURLToPath(import.meta.url);
15052
+ var isDirectEntry = !!process.argv[1] && resolve(process.argv[1]) === resolve(moduleEntryPath);
15050
15053
  if (isDirectEntry) {
15051
15054
  startMcpServer().catch((err) => {
15052
15055
  process.stderr.write(`CLISHOP MCP server failed to start: ${err}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clishop",
3
3
  "displayName": "CLISHOP",
4
- "version": "1.5.7",
4
+ "version": "1.5.9",
5
5
  "mcpName": "io.github.StefDCL/clishop",
6
6
  "description": "CLISHOP — Order anything from your terminal",
7
7
  "main": "dist/index.js",
@@ -17,7 +17,8 @@
17
17
  "clishop-mcp": "dist/mcp.js"
18
18
  },
19
19
  "scripts": {
20
- "build": "tsup",
20
+ "build": "tsup && tsup --config tsup.clawhub.config.ts",
21
+ "build:bundle": "tsup --config tsup.clawhub.config.ts",
21
22
  "dev": "tsx src/index.ts",
22
23
  "dev:mcp": "tsx src/mcp.ts",
23
24
  "start": "node dist/index.js",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/DavooxBv2/CLISHOP",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.5.7",
9
+ "version": "1.5.9",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "clishop",
14
- "version": "1.5.7",
14
+ "version": "1.5.9",
15
15
  "runtime": "node",
16
16
  "args": ["--mcp"],
17
17
  "transport": {
@@ -27,9 +27,46 @@ Then search products, and only add an address or payment method when the user is
27
27
 
28
28
  ```bash
29
29
  clishop-mcp # If installed globally
30
- npx -y clishop --mcp # Without installing
30
+ node ./dist/mcp.js # From the installed package directory
31
31
  ```
32
32
 
33
+ ## OpenClaw usage rules
34
+
35
+ When CLISHOP is installed in OpenClaw, prefer the MCP tools exposed by the CLISHOP server instead of shell commands.
36
+
37
+ - OpenClaw commonly exposes these tools with a `clishop__<tool_name>` naming pattern, for example `clishop__list_addresses`, `clishop__add_address`, `clishop__set_default_address`, `clishop__list_payment_methods`, and `clishop__buy_product`.
38
+ - If those MCP tools are available, do not fall back to `clishop address add` or other CLI subcommands.
39
+ - If a user asks to add a home or shipping address and the address is already known from memory or prior conversation context, call the address tool directly and only ask for missing required fields.
40
+
41
+ ### Non-interactive address flow
42
+
43
+ 1. Call `clishop__list_addresses` or `list_addresses` first to check existing saved addresses.
44
+ 2. If the correct address already exists, reuse it and call `clishop__set_default_address` or `set_default_address` if needed.
45
+ 3. If no suitable address exists, call `clishop__add_address` or `add_address` directly with the known fields.
46
+ 4. Ask the user only for any missing required fields.
47
+ 5. Prefer `setDefault: true` when adding the main home address.
48
+
49
+ Required fields for `add_address`:
50
+
51
+ - `label`
52
+ - `firstName`
53
+ - `lastName`
54
+ - `line1`
55
+ - `city`
56
+ - `postalCode`
57
+ - `country`
58
+
59
+ Optional fields:
60
+
61
+ - `line2`
62
+ - `region`
63
+ - `phone`
64
+ - `companyName`
65
+ - `vatNumber`
66
+ - `taxId`
67
+ - `instructions`
68
+ - `setDefault`
69
+
33
70
  ## Tools
34
71
 
35
72
  | Tool | Description | Read-only |