clishop 1.2.0 → 1.2.1

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/dist/index.js CHANGED
@@ -932,7 +932,7 @@ async function runSetupWizard() {
932
932
  console.log();
933
933
  console.log(chalk4.bold.cyan(" W E L C O M E T O C L I S H O P"));
934
934
  console.log(chalk4.dim(" Order anything from your terminal."));
935
- console.log(chalk4.dim(` Build: ${"2026-03-03T18:27:22.112Z"}`));
935
+ console.log(chalk4.dim(` Build: ${"2026-03-03T19:01:39.979Z"}`));
936
936
  console.log();
937
937
  divider(chalk4.cyan);
938
938
  console.log();
package/dist/mcp.js CHANGED
@@ -13810,7 +13810,7 @@ function safeCall(fn) {
13810
13810
  var server = new McpServer(
13811
13811
  {
13812
13812
  name: "clishop",
13813
- version: "1.2.0"
13813
+ version: "1.2.1"
13814
13814
  },
13815
13815
  {
13816
13816
  capabilities: {
@@ -13849,6 +13849,26 @@ server.registerTool("search_products", {
13849
13849
  }, async (args) => {
13850
13850
  return safeCall(async () => {
13851
13851
  const api = getApiClient();
13852
+ let country = args.country;
13853
+ if (!country) {
13854
+ const agent = getActiveAgent();
13855
+ try {
13856
+ const addrRes = await api.get("/addresses", { params: { agent: agent.name } });
13857
+ const addresses = addrRes.data.addresses || [];
13858
+ const resolved = agent.defaultAddressId && addresses.find((a) => a.id === agent.defaultAddressId) || addresses[0];
13859
+ if (resolved) {
13860
+ country = resolved.country;
13861
+ if (!agent.defaultAddressId) {
13862
+ const { updateAgent } = await import("./config-WZBIQWME.js");
13863
+ updateAgent(agent.name, { defaultAddressId: resolved.id });
13864
+ }
13865
+ }
13866
+ } catch {
13867
+ }
13868
+ }
13869
+ if (!country) {
13870
+ throw new Error("No delivery country available. Add a shipping address first ('clishop address add') or pass the 'country' parameter (e.g. 'US', 'NL', 'BE').");
13871
+ }
13852
13872
  const res = await api.get("/products/search", {
13853
13873
  params: {
13854
13874
  q: args.query,
@@ -13858,7 +13878,7 @@ server.registerTool("search_products", {
13858
13878
  minPrice: args.minPrice,
13859
13879
  maxPrice: args.maxPrice,
13860
13880
  freeShipping: args.freeShipping || void 0,
13861
- country: args.country,
13881
+ country,
13862
13882
  maxDeliveryDays: args.maxDeliveryDays,
13863
13883
  inStock: args.inStock || void 0,
13864
13884
  freeReturns: args.freeReturns || void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clishop",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "mcpName": "io.github.StefDCL/clishop",
5
5
  "description": "CLISHOP — Order anything from your terminal",
6
6
  "main": "dist/index.js",