@tbox.cn/app-module-shopping-guide 0.9.0 → 0.9.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/AGENTS.md +1 -1
- package/dist/{chunk-AYQZO2FV.js → chunk-HWPVP7N5.js} +2 -2
- package/dist/{chunk-VKDA6RXQ.js → chunk-XJIDKUIG.js} +11 -11
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/server/index.d.ts +855 -846
- package/dist/server/index.js +1 -1
- package/package.json +5 -4
- package/src/client/cards/category-list/index.tsx +1 -1
- package/src/client/cards/human-guide-list/index.tsx +1 -1
- package/src/client/cards/location-handoff/index.tsx +1 -1
- package/src/client/cards/mall-directory/index.tsx +1 -1
- package/src/client/cards/nearby-mall-list/index.tsx +1 -1
- package/src/client/cards/product-detail/index.tsx +1 -1
- package/src/client/cards/product-list/index.tsx +1 -1
- package/src/client/cards/shop-detail/index.tsx +1 -1
- package/src/client/cards/shop-list/index.tsx +2 -2
- package/src/client/components/ShopDetailSheet.tsx +1 -1
- package/src/client/index.ts +1 -1
- package/src/server/handler.ts +1 -1
- package/src/server/index.ts +2 -2
- package/src/server/ports/index.ts +1 -1
- package/src/server/tools/index.ts +2 -2
- package/tbox.module.json +26 -12
- package/tests/cards-render.test.tsx +3 -3
- package/tests/floor-pretool.test.ts +4 -4
- package/tests/handler.test.ts +3 -3
- package/tests/ports-resolve.test.ts +2 -2
- package/tests/samples.test.ts +1 -1
- package/tests/shopping-guide.test.ts +4 -4
- package/tests/skill.test.ts +1 -1
- 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
|
|
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
|
|
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
|
|
|
@@ -5,7 +5,7 @@ import "./shopping-guide-EGRHPEDA.css";
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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;
|
package/dist/client/index.d.ts
CHANGED
package/dist/client/index.js
CHANGED
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
|
|
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
|
|
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-
|
|
6
|
+
} from "./chunk-HWPVP7N5.js";
|
|
7
7
|
import {
|
|
8
8
|
clientModule
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XJIDKUIG.js";
|
|
10
10
|
export {
|
|
11
11
|
clientModule,
|
|
12
12
|
createShoppingGuideTools,
|