@tbox.cn/app-module-parking 0.10.3 → 0.10.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/AGENTS.md CHANGED
@@ -1,16 +1,14 @@
1
1
  # module-parking —— 集成指引(AI 助手用)
2
2
 
3
- 本模块为商圈业务模块,声明消费以下服务槽(Port 接口定义见 `src/server/ports/`):
4
-
5
- - 服务槽清单:见 `tbox.module.json` 的 `contributes.services`(demand 侧,含 title/description meta)。
3
+ 本模块为商圈业务模块(停车:车位查询、缴费与车辆管理)。服务槽、接口清单、接入依赖与可选降级见本包
4
+ `INTEGRATION.md`(真源);结构事实(槽位/必选性)见本包 `tbox.module.json`。
6
5
 
7
6
  ## 自定义 API 对接(AI 集成)
8
7
 
9
- 用户为本模块服务槽配置「自定义 API」后,adapter 实施落点 = `packages/provider-custom/`
10
- (停车:车位查询、缴费与车辆管理)。实施步骤与完成判据见 `packages/provider-custom/AGENTS.md`;
11
- 本模块 Port 接口为 adapter 的实现契约(输入 `ServiceAdapterInput`:config/instanceId/credentialRef)。
8
+ 见本包 `INTEGRATION.md`(接入语义真源);实施落点与流程见应用根 `INTEGRATION.md`
9
+ 与 `packages/provider-custom/INTEGRATION.md`。
12
10
 
13
11
  ## 真实厂商接入
14
12
 
15
- 官方 provider 包形态(manifest 槽声明 + 独立包发布)参照 `modules/provider-mock`(极简形态)/ `modules/provider-mocktest`(带 configSchema 形态)结构样例与
16
- docs/reference/providers.md;厂商中立措辞纪律见该参考(本文件受 vendor-neutrality 门禁扫描)。
13
+ 见本包 `INTEGRATION.md`;官方 provider 包形态用 `tbox-app new provider <name>` 骨架
14
+ (应用态 `packages/provider-<id>` local 形态 / 仓库态 `modules/provider-<id>` 发布形态)。
package/INTEGRATION.md ADDED
@@ -0,0 +1,18 @@
1
+ # INTEGRATION —— module-parking(停车)接入指引
2
+
3
+ > 结构事实以本包 `tbox.module.json` 为准(`declare.consumes`:槽位与必选性、`declare.owns`:
4
+ > 服务归属);接口签名以消费的契约包 Port 为准(`packages/contracts-mall/src/services/`);本文件只写二者推不出的接入语义。
5
+
6
+ ## 服务与依赖
7
+
8
+ - **三读一写全必选**:parking.query / parking.payment / parking.vehicle(`optional:false`);
9
+ `parking.snapshot` 聚合槽由底层槽派生,落声明时跳过。
10
+ - **身份与定位键**:查询上下文携带 `scope.mallId` + `subjectId`(登录态 userId,匿名可缺);
11
+ 车辆/记录类接口以 `plateNo`/`vehicleRef`/`recordRef` 为定位键——`recordRef`/`vehicleRef`
12
+ 由你的列表接口下发、详情/操作接口按其解析,**归属校验(当前用户)由后端负责**。
13
+ - **跨槽顺序**:缴费与详情依赖 query/payment 槽的记录列表(recordRef 先有后有);车辆
14
+ 绑定列表驱动 query 槽「我的车」语义(无 plateNo 线索时扫描绑定车队)。
15
+ - **可选能力**:`ParkingQueryPort.requiresMembership?` 可选(缺席照常查询);
16
+ `probeParkedVehicles?` 可选(缺席按未入场渲染)。
17
+ - **开票语义**:`getInvoiceSettings` 返回 `parkingInvoiceEnabled`——后端不支持线上开票时
18
+ 如实返回 false,工具层据此收口(不得编造开票能力)。
@@ -1591,7 +1591,7 @@ function createParkingActions(ctx) {
1591
1591
  };
1592
1592
  }
1593
1593
  },
1594
- /** 2. 支付结果回调(三步链 step3:uploadResult + reconcile 权威收口,F5;补签通道专用不渲染按钮) */
1594
+ /** 2. 支付结果回调(三步链 step3:uploadResult + reconcile 权威收口,补签通道专用不渲染按钮) */
1595
1595
  reportPaymentResult: {
1596
1596
  actionId: "parking.report-payment-result",
1597
1597
  moduleId: "parking",
@@ -1773,7 +1773,7 @@ function createParkingActions(ctx) {
1773
1773
  }
1774
1774
  }
1775
1775
  },
1776
- /** 4-6. 车辆三操作(LLM 直写归零,D5;车牌正则校验) */
1776
+ /** 4-6. 车辆三操作(LLM 直写归零,车牌正则校验) */
1777
1777
  bindVehicle: {
1778
1778
  actionId: "parking.bind-vehicle",
1779
1779
  moduleId: "parking",
@@ -1919,7 +1919,7 @@ function createParkingActions(ctx) {
1919
1919
  };
1920
1920
  }
1921
1921
  },
1922
- /** 支付状态刷新(reconcile 轮询兜底;显式交互 R4)——P0 原地更新被点击卡 */
1922
+ /** 支付状态刷新(reconcile 轮询兜底;显式交互)—— 原地更新被点击卡 */
1923
1923
  refreshPayment: {
1924
1924
  actionId: "parking.refresh-payment",
1925
1925
  moduleId: "parking",
@@ -2493,7 +2493,7 @@ function createParkingTools(opts) {
2493
2493
  return withCards(
2494
2494
  facts,
2495
2495
  "parking-payment-result",
2496
- // note 契约(W7):状态/金额前置(答话可直接转述,如「浙A12345 支付成功 · 12 元」)
2496
+ // note 契约:状态/金额前置(答话可直接转述,如「浙A12345 支付成功 · 12 元」)
2497
2497
  `${current.plateNo} ${status === "PAID" ? "\u652F\u4ED8\u6210\u529F" : status === "CANCELLED" ? "\u652F\u4ED8\u5DF2\u53D6\u6D88" : "\u786E\u8BA4\u4E2D"} \xB7 ${formatCents(current.payableCents)}`
2498
2498
  );
2499
2499
  }
@@ -2,7 +2,7 @@ import { CardComponent } from '@tbox.cn/app-contracts';
2
2
  import { ClientContext } from '@tbox.cn/app-agent-sdk-client';
3
3
 
4
4
  /**
5
- * module-parking 客户端入口(与服务端 serverModule 对称;015 S5:5 卡)。
5
+ * module-parking 客户端入口(与服务端 serverModule 对称;5 卡)。
6
6
  */
7
7
 
8
8
  declare const cards: {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  resolveParkingQueryPort,
7
7
  resolveParkingVehiclePort,
8
8
  serverModule
9
- } from "./chunk-VH3J7FEI.js";
9
+ } from "./chunk-PGSDWF4M.js";
10
10
  import {
11
11
  cards,
12
12
  clientModule
@@ -6,7 +6,7 @@ import {
6
6
  resolveParkingQueryPort,
7
7
  resolveParkingVehiclePort,
8
8
  serverModule
9
- } from "../chunk-VH3J7FEI.js";
9
+ } from "../chunk-PGSDWF4M.js";
10
10
  export {
11
11
  InMemoryParkingService,
12
12
  inMemoryParking,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tbox.cn/app-module-parking",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "type": "module",
5
5
  "description": "商圈停车模块:计费支付、车辆寻车、缴费记录与开票(codegen 源)。",
6
6
  "exports": {
@@ -18,10 +18,10 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@tbox.cn/app-contracts": "0.12.3",
22
- "@tbox.cn/app-contracts-mall": "0.12.3",
23
- "@tbox.cn/app-agent-sdk-client": "0.1.3",
24
- "@tbox.cn/app-agent-sdk-server": "0.1.4"
21
+ "@tbox.cn/app-contracts": "0.13.0",
22
+ "@tbox.cn/app-contracts-mall": "0.13.0",
23
+ "@tbox.cn/app-agent-sdk-client": "0.1.6",
24
+ "@tbox.cn/app-agent-sdk-server": "0.2.3"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "zod": "3.25.76",
@@ -49,7 +49,8 @@
49
49
  "README.md",
50
50
  "LICENSE",
51
51
  "skills",
52
- "AGENTS.md"
52
+ "AGENTS.md",
53
+ "INTEGRATION.md"
53
54
  ],
54
55
  "engines": {
55
56
  "node": ">=20.0.0"
@@ -1,5 +1,5 @@
1
1
  /**
2
- * module-parking 客户端卡片聚合(0.4.0 D6:一卡一目录)。
2
+ * module-parking 客户端卡片聚合(0.4.0 一卡一目录)。
3
3
  */
4
4
  export { default as ParkingPaymentCard } from './parking-payment';
5
5
  export { default as ParkingPaymentResultCard } from './parking-payment-result';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * parking-payment 富卡渲染器(0.4.0 D1/D6/D10 范式卡)。
2
+ * parking-payment 富卡渲染器(0.4.0// 范式卡)。
3
3
  * 视觉源:POC components/parking/src/client/cards/ParkingPaymentCard.tsx(结构对齐,字段按 B 契约)。
4
4
  * 自渲染动作(markSelfRendering):卡内勾选/重算/支付,SDK 默认按钮条跳过。
5
5
  * actionId 无版本后缀(B 架构,非 POC 的 @1)。
@@ -1,5 +1,5 @@
1
1
  /**
2
- * parking-payment-records 富卡(0.4.0 D6):前 5 条 + 展开收起 + 状态色。
2
+ * parking-payment-records 富卡(0.4.0):前 5 条 + 展开收起 + 状态色。
3
3
  * 点击任意记录行弹出底部半屏 Sheet 展示订单详情。
4
4
  */
5
5
  import { useEffect, useId, useRef, useState } from 'react';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * parking-payment-result 富卡(0.4.0 D6/D10):三态 + retryable 刷新。
2
+ * parking-payment-result 富卡(0.4.0/):三态 + retryable 刷新。
3
3
  */
4
4
  import { CheckCircle, Clock, WarningCircle } from '@phosphor-icons/react';
5
5
  import { sendCardAction, markSelfRendering } from '@tbox.cn/app-agent-sdk-client';
@@ -79,5 +79,5 @@ export function ParkingPaymentResultCard(props: {
79
79
  );
80
80
  }
81
81
 
82
- // 0.4.0 D10 评审补位:卡内"刷新支付状态"按钮(paymentRef 依赖卡数据)自持动作,跳过 SDK 默认按钮条
82
+ // 0.4.0 评审补位:卡内"刷新支付状态"按钮(paymentRef 依赖卡数据)自持动作,跳过 SDK 默认按钮条
83
83
  export default markSelfRendering(ParkingPaymentResultCard);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * parking 展示纯函数(0.4.0 D6:状态文案/色类/车牌排版,可单测)。
2
+ * parking 展示纯函数(0.4.0 状态文案/色类/车牌排版,可单测)。
3
3
  */
4
4
  import { PARKING_PLATE_PATTERN } from '@tbox.cn/app-contracts-mall';
5
5
 
@@ -1,7 +1,7 @@
1
1
  /**
2
- * module-parking 客户端入口(与服务端 serverModule 对称;015 S5:5 卡)。
2
+ * module-parking 客户端入口(与服务端 serverModule 对称;5 卡)。
3
3
  */
4
- import './styles/parking.css'; // 0.4.0 D1:模块自持 CSS(副作用 import,首行保证先行加载)
4
+ import './styles/parking.css'; // 0.4.0 模块自持 CSS(副作用 import,首行保证先行加载)
5
5
 
6
6
  import type { CardComponent } from '@tbox.cn/app-contracts';
7
7
  import type { ClientContext, ClientModule } from '@tbox.cn/app-agent-sdk-client';
@@ -1,2 +1,2 @@
1
- /** 0.4.0 D1:模块自持 CSS(经 tsup loader: { '.css': 'copy' } 出货,样式在应用侧生效) */
1
+ /** 0.4.0 模块自持 CSS(经 tsup loader: { '.css': 'copy' } 出货,样式在应用侧生效) */
2
2
  declare module '*.css';
@@ -1,10 +1,10 @@
1
1
  /**
2
- * parking 写动作(10 动作;LLM 直写归零 D5)。
2
+ * parking 写动作(10 动作;LLM 直写归零)。
3
3
  *
4
- * 支付三步链(R2):
4
+ * 支付三步链:
5
5
  * confirm-payment(建单+签名+PAYING 持久化 → payment effect)
6
6
  * → [client tradePay(SDK host-effect-runner)]
7
- * → report-payment-result(uploadResult + reconcile 权威收口 F5 → 结果卡)
7
+ * → report-payment-result(uploadResult + reconcile 权威收口 → 结果卡)
8
8
  *
9
9
  * 全部 singleUse + grant 闭环;cards key = meta.cardType。
10
10
  */
@@ -179,7 +179,7 @@ export function createParkingActions(
179
179
  return { text: '缴费失败:缺少会话上下文或报价引用' };
180
180
  }
181
181
 
182
- // revision CAS(旧卡重放/缓存过期拒绝——恒实时语义下用户重新查询即得新报价,W4)
182
+ // revision CAS(旧卡重放/缓存过期拒绝——恒实时语义下用户重新查询即得新报价)
183
183
  const expectedRevision = revision ? Number(revision) : undefined;
184
184
  let quote = expectedRevision
185
185
  ? await assertQuoteRevision(state, quoteRef, expectedRevision, owner)
@@ -367,7 +367,7 @@ export function createParkingActions(
367
367
 
368
368
  // PAYING 持久化(悬挂收口锚点,V2)
369
369
  // quoteProjection:报价投影随建单快照(对齐 entryAt 同模式——PAID 原卡翻转
370
- // 要重灌终态卡数据,而 W4 报价缓存仅 UNPAID 态可见、届时不可达)
370
+ // 要重灌终态卡数据,而 报价缓存仅 UNPAID 态可见、届时不可达)
371
371
  await persistPaymentOperation(state, {
372
372
  paymentRef,
373
373
  providerPaymentRef,
@@ -392,7 +392,7 @@ export function createParkingActions(
392
392
  },
393
393
  });
394
394
 
395
- // step2:payment effect(dispatcher 补签 → client tradePay,R1 orderInfo 内联)
395
+ // step2:payment effect(dispatcher 补签 → client tradePay, orderInfo 内联)
396
396
  // 同时原地终结缴费卡:token 已 singleUse 消费、revision 已锁定,这张报价单不能再提交。
397
397
  // 支付的最终成败经 report-payment-result 落在回执卡上——effect 回传无卡锚点
398
398
  // (chat-store sendModuleAction 恒 surfaceId:''),服务端无法二次原地更新本卡。
@@ -416,7 +416,7 @@ export function createParkingActions(
416
416
  },
417
417
  },
418
418
 
419
- /** 2. 支付结果回调(三步链 step3:uploadResult + reconcile 权威收口,F5;补签通道专用不渲染按钮) */
419
+ /** 2. 支付结果回调(三步链 step3:uploadResult + reconcile 权威收口,补签通道专用不渲染按钮) */
420
420
  reportPaymentResult: {
421
421
  actionId: 'parking.report-payment-result',
422
422
  moduleId: 'parking',
@@ -461,7 +461,7 @@ export function createParkingActions(
461
461
  );
462
462
  return undefined;
463
463
  });
464
- // F5:收口判定恒 reconcile 权威回查(客户端 status 仅上报)
464
+ // 收口判定恒 reconcile 权威回查(客户端 status 仅上报)
465
465
  const final = await s.service.reconcile(s.q, op.providerPaymentRef);
466
466
  const settled = await settlePaymentOperation(
467
467
  state,
@@ -475,7 +475,7 @@ export function createParkingActions(
475
475
  const current = settled ?? op;
476
476
 
477
477
  if (current.status === 'PAID') {
478
- // PAID 原卡翻转(host-effect-card-anchor D2 出/刷二分):经 dispatcher 签名锚定
478
+ // PAID 原卡翻转(host-effect-card-anchor 出/刷二分):经 dispatcher 签名锚定
479
479
  // 原地回写发起报价卡——成功回执新卡冗余(历史凭证由缴费记录卡兜底)。
480
480
  // 投影缺失(存量 PAYING 单、旧版本发起)降级出新回执卡,零回归。
481
481
  if (current.quoteProjection) {
@@ -638,7 +638,7 @@ export function createParkingActions(
638
638
  },
639
639
  },
640
640
 
641
- /** 4-6. 车辆三操作(LLM 直写归零,D5;车牌正则校验) */
641
+ /** 4-6. 车辆三操作(LLM 直写归零,车牌正则校验) */
642
642
  bindVehicle: {
643
643
  actionId: 'parking.bind-vehicle',
644
644
  moduleId: 'parking',
@@ -805,7 +805,7 @@ export function createParkingActions(
805
805
  },
806
806
  },
807
807
 
808
- /** 支付状态刷新(reconcile 轮询兜底;显式交互 R4)——P0 原地更新被点击卡 */
808
+ /** 支付状态刷新(reconcile 轮询兜底;显式交互)—— 原地更新被点击卡 */
809
809
  refreshPayment: {
810
810
  actionId: 'parking.refresh-payment',
811
811
  moduleId: 'parking',
@@ -1,4 +1,4 @@
1
- /** parking 卡 meta 聚合(015 S5:5 卡;key 约定 = meta.cardType;书序与 CardMeta.order 预览序位一致) */
1
+ /** parking 卡 meta 聚合(5 卡;key 约定 = meta.cardType;书序与 CardMeta.order 预览序位一致) */
2
2
  import parkingVehicleManagement from './parking-vehicle-management/meta';
3
3
  import parkingInfo from './parking-info/meta';
4
4
  import parkingPayment from './parking-payment/meta';
@@ -1,8 +1,8 @@
1
1
  /**
2
- * 停车域状态机与收口纯函数(015 S5)。
3
- * - 报价缓存:仅未支付态、TTL 5min(W4 前提一)
2
+ * 停车域状态机与收口纯函数。
3
+ * - 报价缓存:仅未支付态、TTL 5min(前提一)
4
4
  * - 支付操作:PAYING →(reconcile 权威)→ PAID/CANCELLED;UNKNOWN 悬挂(V2:下次交互收口)
5
- * - 收口规则(W4 前提三):查询命中已支付态 → 自动收口 PaymentOperation
5
+ * - 收口规则(前提三):查询命中已支付态 → 自动收口 PaymentOperation
6
6
  */
7
7
  import { createHash, randomUUID } from 'node:crypto';
8
8
  import type {
@@ -15,7 +15,7 @@ import type {
15
15
  export const PARKING_QUOTE_NAMESPACE = 'parking.quotes';
16
16
  export const PARKING_PAYMENT_NAMESPACE = 'parking.payment-operations';
17
17
  export const PARKING_LATEST_PAYMENT_NAMESPACE = 'parking.latest-payment';
18
- /** quoteRef → paymentRef 映射(W4 收口接线:queryFee 命中 PAID 时反查悬挂操作) */
18
+ /** quoteRef → paymentRef 映射(收口接线:queryFee 命中 PAID 时反查悬挂操作) */
19
19
  export const PARKING_QUOTE_PAYMENT_NAMESPACE = 'parking.quote-payment';
20
20
  export const QUOTE_TTL_MS = 5 * 60 * 1000;
21
21
  export const PAYMENT_OPERATION_TTL_MS = 24 * 60 * 60 * 1000;
@@ -54,7 +54,7 @@ type OwnedQuoteSnapshot = QuoteSnapshot & {
54
54
  readonly ownerMallId: string;
55
55
  };
56
56
 
57
- /** 报价缓存(W4:仅未支付态缓存;PAYING/PAID 直接穿透过厂商) */
57
+ /** 报价缓存(仅未支付态缓存;PAYING/PAID 直接穿透过厂商) */
58
58
  export async function cacheQuote(
59
59
  state: StoreLike,
60
60
  quote: QuoteSnapshot,
@@ -98,7 +98,7 @@ export async function assertQuoteRevision(
98
98
  return cached.revision === expectedRevision ? cached : null;
99
99
  }
100
100
 
101
- /** 支付操作持久化(建单成功 → PAYING;F5:收口判定恒 reconcile) */
101
+ /** 支付操作持久化(建单成功 → PAYING;收口判定恒 reconcile) */
102
102
  export async function persistPaymentOperation(
103
103
  state: StoreLike,
104
104
  op: PaymentOperation,
@@ -161,7 +161,7 @@ function paymentOwnerRef(subjectId: string, mallId: string): string {
161
161
  .digest('hex');
162
162
  }
163
163
 
164
- /** quoteRef → paymentRef 映射(confirm 建单时写入;W4 收口反查锚点) */
164
+ /** quoteRef → paymentRef 映射(confirm 建单时写入; 收口反查锚点) */
165
165
  export async function recordQuotePayment(
166
166
  state: StoreLike,
167
167
  quoteRef: string,
@@ -193,7 +193,7 @@ function quoteOwnerRef(quoteRef: string, owner: QuoteOwner): string {
193
193
  .digest('hex');
194
194
  }
195
195
 
196
- /** reconcile 收口(F5 唯一写 PAID 的路径) */
196
+ /** reconcile 收口(唯一写 PAID 的路径) */
197
197
  export async function settlePaymentOperation(
198
198
  state: StoreLike,
199
199
  paymentRef: string,
@@ -226,7 +226,7 @@ export async function settlePaymentOperation(
226
226
  }
227
227
 
228
228
  /**
229
- * W4 前提三:已支付态查询命中 → 自动收口悬挂 PAYING 操作。
229
+ * 前提三:已支付态查询命中 → 自动收口悬挂 PAYING 操作。
230
230
  * 工具每次查询(queryFee/records)后调用;paidSignal = 厂商侧已支付证据。
231
231
  */
232
232
  export async function autoSettleOnPaidEvidence(
@@ -8,7 +8,7 @@ import { toIntentQueryContext } from './intent-context';
8
8
  import { buildParkingPaymentFacts, parkingMembershipGate } from './tools';
9
9
  import type { StoreLike } from './domain';
10
10
 
11
- /** 停车缴费硬路由关键词(W3-3 自模板 intent-routes.ts 迁入——意图与处理器同处定义,011 D7):
11
+ /** 停车缴费硬路由关键词(自模板 intent-routes.ts 迁入——意图与处理器同处定义):
12
12
  * 整句全等命中(match:'exact',不入 BM25 词袋)绕过 LLM 工具选择;intent action 与
13
13
  * 显式路由 query-fee 分支同实现出报价卡。queryFee 无车牌时走扫描绑定车队逻辑(不追问车牌)。 */
14
14
  const PARKING_PAY_PHRASES = [
@@ -1,3 +1,9 @@
1
+ /**
2
+ * module-parking 服务端入口(双端自注册闭环——见模块 AGENTS.md 与 INTEGRATION.md)。
3
+ * 职责:停车查询/缴费/车辆三槽解析 + 费用/缴费/车辆工具族 + 停车卡族 + 缴费动作。
4
+ * 入口约定:register 只注册不解析(resolveService 仅 handle/事件回调内);cards map 的
5
+ * key = meta.cardType;卡片动作上下文唯一来源 = execute 第二参 reqCtx。
6
+ */
1
7
  import type {
2
8
  ServerContext,
3
9
  ServerModule,
@@ -38,7 +44,7 @@ const getCtx = (): ServerContext => {
38
44
  const tools = createParkingTools({ getCtx });
39
45
 
40
46
  /**
41
- * 停车费问句确定性预执行(W5 P0,2026-09-01):费用意图轮零 LLM 预执行出报价卡。
47
+ * 停车费问句确定性预执行(2026-09-01):费用意图轮零 LLM 预执行出报价卡。
42
48
  * - 零参 run:queryParkingFee 服务端自动扫描在场车(与「我的车」问词语义恰好匹配);
43
49
  * - 四门 decide 见 tools.ts decideParkingFeePreRun(纯函数单源,测试直测);
44
50
  * - silent:不发前端事件;结果 reminder 注入 + cards 经 capture 入本轮候选池;
@@ -98,7 +104,7 @@ export const serverModule = {
98
104
  // InMemory 单例恒注册(跨模块消费方 resolveService 兼容;真实供给经三槽 resolver(query/payment/vehicle)槽位轴)
99
105
  ctx.services.register('parking', inMemoryParking);
100
106
 
101
- // 停车快览工厂(parking.snapshot,W3-3):首页联单面板跨模块消费面
107
+ // 停车快览工厂(parking.snapshot):首页联单面板跨模块消费面
102
108
  // (绑定车辆列表 + 在场探测)。query 槽 Pick 子集——可选能力口(probeParkedVehicles)
103
109
  // 缺席性透传;工厂运行期执行(注册期纯净铁律)。
104
110
  ctx.services.register(
@@ -45,7 +45,7 @@ async function resolveParkingSlot<T>(
45
45
  })) as T;
46
46
  } catch (e) {
47
47
  if (isExpectedProviderAbsence(e)) return fallback; // 预期缺席 → InMemory 兜底
48
- throw e; // PROVIDER_NOT_IMPLEMENTED 等非预期缺席 → 上抛(配置即声明,F5 起无回退)
48
+ throw e; // PROVIDER_NOT_IMPLEMENTED 等非预期缺席 → 上抛(配置即声明, 起无回退)
49
49
  }
50
50
  }
51
51
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * InMemory 停车服务(015 S5:新三 Port 形状;演示/单测/未装配 provider 降级)。
2
+ * InMemory 停车服务(新三 Port 形状;演示/单测/未装配 provider 降级)。
3
3
  * mock 语义:
4
4
  * - queryFee 按 plateNo 生成报价(3 小时 15 元演示费率;已在场记忆)
5
5
  * - reprice 权益重选(member-95 折 / points-5 元抵扣 2 项演示权益),revision 递增
@@ -3,7 +3,7 @@
3
3
  * 出卡(v2 契约):出参 cards 字段声明 cardType,data 形状与 parkingCardDataSchemas 对齐;
4
4
  * found:false 等无价值结果分支不产 cards(不出卡语义)。
5
5
  * 上下文统一化:运行上下文 = 工具 execute 第二参(requireToolRequestContext 显式读取);
6
- * 查询恒实时(W4)。
6
+ * 查询恒实时。
7
7
  */
8
8
  import { createTool, coerceStringifiedFields, withCardEmissionHint } from '@tbox.cn/app-agent-sdk-server';
9
9
  import type { ServerContext, ToolExecContextLike } from '@tbox.cn/app-agent-sdk-server';
@@ -175,7 +175,7 @@ export async function buildParkingPaymentFacts(input: {
175
175
  quote: QuoteSnapshot;
176
176
  }) {
177
177
  const quote = input.quote;
178
- // W4:仅未支付态缓存(confirm revision CAS 依赖);已支付态命中 → 自动收口悬挂 PAYING
178
+ // 仅未支付态缓存(confirm revision CAS 依赖);已支付态命中 → 自动收口悬挂 PAYING
179
179
  const owner = paymentOwner(input.q);
180
180
  if (owner) await cacheQuote(input.state, quote, owner);
181
181
  const paidRef =
@@ -679,7 +679,7 @@ export function createParkingTools(opts: { getCtx: () => ServerContext }) {
679
679
  return withCards(
680
680
  facts,
681
681
  'parking-payment-result',
682
- // note 契约(W7):状态/金额前置(答话可直接转述,如「浙A12345 支付成功 · 12 元」)
682
+ // note 契约:状态/金额前置(答话可直接转述,如「浙A12345 支付成功 · 12 元」)
683
683
  `${current.plateNo} ${
684
684
  status === 'PAID' ? '支付成功' : status === 'CANCELLED' ? '支付已取消' : '确认中'
685
685
  } · ${formatCents(current.payableCents)}`,
@@ -736,7 +736,7 @@ export function createParkingTools(opts: { getCtx: () => ServerContext }) {
736
736
  },
737
737
  });
738
738
 
739
- // W2(2026-09-01):出卡工具创建点单点 wrap(description 追加预告知句)——
739
+ //(2026-09-01):出卡工具创建点单点 wrap(description 追加预告知句)——
740
740
  // 注册与 preTool 声明均使用 wrapped 实例;locateVehicle 无卡不 wrap。
741
741
  return {
742
742
  queryParkingFee: withCardEmissionHint(queryParkingFee, { actions: true }),
@@ -798,7 +798,7 @@ export type {
798
798
  ParkingVehiclePort,
799
799
  } from '@tbox.cn/app-contracts-mall';
800
800
 
801
- // ===== W5 P0(2026-09-01):停车费问句四门 decide(纯函数,index.ts preTool 接线) =====
801
+ // ===== (2026-09-01):停车费问句四门 decide(纯函数,index.ts preTool 接线) =====
802
802
 
803
803
  /** 费用意图(停车费/缴费/出场费/待支付/停车单) */
804
804
  export const PARKING_FEE_INTENT_RE = /停车费|停车缴|缴费|出场费|待支付|停车单/;