@tbox.cn/app-module-shopping-guide 0.9.0 → 0.9.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.
Files changed (36) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/{chunk-AYQZO2FV.js → chunk-HWPVP7N5.js} +2 -2
  3. package/dist/{chunk-VKDA6RXQ.js → chunk-PAYDOSCV.js} +12 -12
  4. package/dist/client/index.d.ts +1 -1
  5. package/dist/client/index.js +1 -1
  6. package/dist/index.d.ts +3 -2
  7. package/dist/index.js +2 -2
  8. package/dist/server/index.d.ts +855 -846
  9. package/dist/server/index.js +1 -1
  10. package/dist/{shopping-guide-EGRHPEDA.css → shopping-guide-62BDCPW5.css} +2 -0
  11. package/package.json +5 -4
  12. package/src/client/cards/category-list/index.tsx +1 -1
  13. package/src/client/cards/human-guide-list/index.tsx +1 -1
  14. package/src/client/cards/location-handoff/index.tsx +1 -1
  15. package/src/client/cards/mall-directory/index.tsx +1 -1
  16. package/src/client/cards/nearby-mall-list/index.tsx +1 -1
  17. package/src/client/cards/product-detail/index.tsx +1 -1
  18. package/src/client/cards/product-list/index.tsx +1 -1
  19. package/src/client/cards/shop-detail/index.tsx +1 -1
  20. package/src/client/cards/shop-list/index.tsx +2 -2
  21. package/src/client/components/ShopDetailSheet.tsx +1 -1
  22. package/src/client/index.ts +1 -1
  23. package/src/client/styles/shopping-guide.css +2 -0
  24. package/src/server/handler.ts +1 -1
  25. package/src/server/index.ts +2 -2
  26. package/src/server/ports/index.ts +1 -1
  27. package/src/server/tools/index.ts +2 -2
  28. package/tbox.module.json +26 -12
  29. package/tests/cards-render.test.tsx +3 -3
  30. package/tests/floor-pretool.test.ts +4 -4
  31. package/tests/handler.test.ts +3 -3
  32. package/tests/ports-resolve.test.ts +2 -2
  33. package/tests/samples.test.ts +1 -1
  34. package/tests/shopping-guide.test.ts +4 -4
  35. package/tests/skill.test.ts +1 -1
  36. package/tsup.config.ts +2 -1
package/AGENTS.md CHANGED
@@ -12,5 +12,5 @@
12
12
 
13
13
  ## 真实厂商接入
14
14
 
15
- 官方 provider 包形态(manifest 槽声明 + 独立包发布)参照 `modules/provider-mock` 结构样例与
15
+ 官方 provider 包形态(manifest 槽声明 + 独立包发布)参照 `modules/provider-mock`(极简形态)/ `modules/provider-mocktest`(带 configSchema 形态)结构样例与
16
16
  docs/reference/providers.md;厂商中立措辞纪律见该参考(本文件受 vendor-neutrality 门禁扫描)。
@@ -1,5 +1,5 @@
1
1
  // src/server/index.ts
2
- import { definePreTool, loadModuleSkills, getRequestContext } from "@tbox.cn/app-sdk/server";
2
+ import { definePreTool, loadModuleSkills, getRequestContext } from "@tbox.cn/app-agent-sdk-server";
3
3
  import { Router } from "express";
4
4
  import { toMallQueryContext, withMallScopeFromQuery, mallSlot } from "@tbox.cn/app-contracts-mall";
5
5
 
@@ -655,7 +655,7 @@ var meta11 = {
655
655
  var meta_default11 = meta11;
656
656
 
657
657
  // src/server/tools/index.ts
658
- import { createTool, coerceStringifiedFields, requireToolRequestContext, withCardEmissionHint, internalTool } from "@tbox.cn/app-sdk/server";
658
+ import { createTool, coerceStringifiedFields, requireToolRequestContext, withCardEmissionHint, internalTool } from "@tbox.cn/app-agent-sdk-server";
659
659
  import { z } from "zod";
660
660
  import { mallSubjectIdOf } from "@tbox.cn/app-contracts-mall";
661
661
 
@@ -1,11 +1,11 @@
1
1
  // src/client/index.ts
2
- import "./shopping-guide-EGRHPEDA.css";
2
+ import "./shopping-guide-62BDCPW5.css";
3
3
 
4
4
  // src/client/cards/product-list/index.tsx
5
5
  import { useState as useState2 } from "react";
6
6
  import { createPortal } from "react-dom";
7
7
  import { X } from "@phosphor-icons/react";
8
- import { ItemActionsRow, sendCardAction } from "@tbox.cn/app-sdk/client";
8
+ import { ItemActionsRow, sendCardAction } from "@tbox.cn/app-agent-sdk-client";
9
9
 
10
10
  // src/client/components/ImageWithFallback.tsx
11
11
  import { useState } from "react";
@@ -178,7 +178,7 @@ var product_list_default = ProductListCard;
178
178
 
179
179
  // src/client/cards/product-detail/index.tsx
180
180
  import { useState as useState3 } from "react";
181
- import { ItemActionsRow as ItemActionsRow2 } from "@tbox.cn/app-sdk/client";
181
+ import { ItemActionsRow as ItemActionsRow2 } from "@tbox.cn/app-agent-sdk-client";
182
182
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
183
183
  function ProductDetailCard(props) {
184
184
  const { data, cardId, isHistory } = props;
@@ -239,13 +239,13 @@ var product_detail_default = ProductDetailCard;
239
239
  // src/client/cards/shop-list/index.tsx
240
240
  import { useCallback as useCallback3, useMemo as useMemo2, useRef as useRef3, useState as useState6 } from "react";
241
241
  import { CaretRight } from "@phosphor-icons/react";
242
- import { markSelfRendering } from "@tbox.cn/app-sdk/client";
242
+ import { markSelfRendering } from "@tbox.cn/app-agent-sdk-client";
243
243
 
244
244
  // src/client/components/ShopDetailSheet.tsx
245
245
  import { useCallback, useEffect, useId, useRef, useState as useState4 } from "react";
246
246
  import { createPortal as createPortal2 } from "react-dom";
247
247
  import { Clock, MapPin, Phone, Star, Tag, X as X2 } from "@phosphor-icons/react";
248
- import { ItemActionsRow as ItemActionsRow3, navigateToAlipayPage, sendCardAction as sendCardAction2 } from "@tbox.cn/app-sdk/client";
248
+ import { ItemActionsRow as ItemActionsRow3, navigateToAlipayPage, sendCardAction as sendCardAction2 } from "@tbox.cn/app-agent-sdk-client";
249
249
  import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
250
250
  var HIDDEN_DETAIL_ACTION_LABELS = /* @__PURE__ */ new Set(["\u67E5\u770B\u8BE6\u60C5", "\u5BFC\u822A", "\u95EE\u95EE\u5BFC\u8D2D"]);
251
251
  function ShopDetailSheet(props) {
@@ -840,7 +840,7 @@ function ShopListSheet(props) {
840
840
  }
841
841
 
842
842
  // src/client/cards/shop-list/index.tsx
843
- import { httpGet } from "@tbox.cn/app-sdk/client";
843
+ import { httpGet } from "@tbox.cn/app-agent-sdk-client";
844
844
  import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
845
845
  var PREVIEW_ITEM_COUNT = 3;
846
846
  function projectSheetDataFromItem(merchant) {
@@ -998,7 +998,7 @@ var shop_list_default = ShopListCard;
998
998
  // src/client/cards/shop-detail/index.tsx
999
999
  import { useCallback as useCallback4, useRef as useRef4, useState as useState7 } from "react";
1000
1000
  import { Clock as Clock2, Phone as Phone2 } from "@phosphor-icons/react";
1001
- import { httpGet as httpGet2, markSelfRendering as markSelfRendering2 } from "@tbox.cn/app-sdk/client";
1001
+ import { httpGet as httpGet2, markSelfRendering as markSelfRendering2 } from "@tbox.cn/app-agent-sdk-client";
1002
1002
  import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1003
1003
  function projectSheetDataFromCardData(data) {
1004
1004
  return {
@@ -1091,7 +1091,7 @@ var shop_detail_default = ShopDetailCard;
1091
1091
  // src/client/cards/category-list/index.tsx
1092
1092
  import { useState as useState8 } from "react";
1093
1093
  import { CaretDown } from "@phosphor-icons/react";
1094
- import { sendCardAction as sendCardAction3 } from "@tbox.cn/app-sdk/client";
1094
+ import { sendCardAction as sendCardAction3 } from "@tbox.cn/app-agent-sdk-client";
1095
1095
 
1096
1096
  // src/client/cards/view.ts
1097
1097
  function formatDistance(distanceKm) {
@@ -1359,7 +1359,7 @@ var product_comparison_default = ProductComparisonCard;
1359
1359
  // src/client/cards/mall-directory/index.tsx
1360
1360
  import { useState as useState10 } from "react";
1361
1361
  import { CaretDown as CaretDown2, Storefront as Storefront2 } from "@phosphor-icons/react";
1362
- import { sendCardAction as sendCardAction4 } from "@tbox.cn/app-sdk/client";
1362
+ import { sendCardAction as sendCardAction4 } from "@tbox.cn/app-agent-sdk-client";
1363
1363
  import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1364
1364
  function MallDirectoryCard(props) {
1365
1365
  const { data, cardId, isHistory } = props;
@@ -1422,7 +1422,7 @@ function MallDirectoryCard(props) {
1422
1422
  var mall_directory_default = MallDirectoryCard;
1423
1423
 
1424
1424
  // src/client/cards/nearby-mall-list/index.tsx
1425
- import { ItemActionsRow as ItemActionsRow4 } from "@tbox.cn/app-sdk/client";
1425
+ import { ItemActionsRow as ItemActionsRow4 } from "@tbox.cn/app-agent-sdk-client";
1426
1426
  import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1427
1427
  function NearbyMallListCard(props) {
1428
1428
  const { data, cardId, isHistory } = props;
@@ -1452,7 +1452,7 @@ function NearbyMallListCard(props) {
1452
1452
  var nearby_mall_list_default = NearbyMallListCard;
1453
1453
 
1454
1454
  // src/client/cards/human-guide-list/index.tsx
1455
- import { sendCardAction as sendCardAction5 } from "@tbox.cn/app-sdk/client";
1455
+ import { sendCardAction as sendCardAction5 } from "@tbox.cn/app-agent-sdk-client";
1456
1456
  import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
1457
1457
  function HumanGuideListCard(props) {
1458
1458
  const { data, cardId, isHistory } = props;
@@ -1500,7 +1500,7 @@ var human_guide_list_default = HumanGuideListCard;
1500
1500
 
1501
1501
  // src/client/cards/location-handoff/index.tsx
1502
1502
  import { MapPin as MapPin3, NavigationArrow } from "@phosphor-icons/react";
1503
- import { sendCardAction as sendCardAction6 } from "@tbox.cn/app-sdk/client";
1503
+ import { sendCardAction as sendCardAction6 } from "@tbox.cn/app-agent-sdk-client";
1504
1504
  import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
1505
1505
  function LocationHandoffCard(props) {
1506
1506
  const { data, cardId } = props;
@@ -1,5 +1,5 @@
1
1
  import { CardComponent } from '@tbox.cn/app-contracts';
2
- import { ClientContext } from '@tbox.cn/app-sdk/client';
2
+ import { ClientContext } from '@tbox.cn/app-agent-sdk-client';
3
3
 
4
4
  /**
5
5
  * module-shopping-guide 客户端入口(与服务端 serverModule 对称)。
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clientModule
3
- } from "../chunk-VKDA6RXQ.js";
3
+ } from "../chunk-PAYDOSCV.js";
4
4
  export {
5
5
  clientModule
6
6
  };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  export { ShoppingGuideToolIds, ShoppingGuideTools, createShoppingGuideTools, resolveShoppingGuidePorts, serverModule, shoppingGuideCards } from './server/index.js';
2
2
  export { clientModule } from './client/index.js';
3
+ import '@tbox.cn/app-agent-sdk-server';
3
4
  import '@mastra/core/tools';
4
- import '@tbox.cn/app-sdk/server';
5
+ import '@tbox.cn/app-sdk-server';
5
6
  import '@tbox.cn/app-contracts';
6
7
  import 'zod';
7
8
  import '@tbox.cn/app-contracts-mall';
8
- import '@tbox.cn/app-sdk/client';
9
+ import '@tbox.cn/app-agent-sdk-client';
package/dist/index.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  resolveShoppingGuidePorts,
4
4
  serverModule,
5
5
  shoppingGuideCards
6
- } from "./chunk-AYQZO2FV.js";
6
+ } from "./chunk-HWPVP7N5.js";
7
7
  import {
8
8
  clientModule
9
- } from "./chunk-VKDA6RXQ.js";
9
+ } from "./chunk-PAYDOSCV.js";
10
10
  export {
11
11
  clientModule,
12
12
  createShoppingGuideTools,