guanwei 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "guanwei",
3
3
  "private": false,
4
- "version": "1.2.5",
4
+ "version": "1.2.6",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -6588,6 +6588,162 @@
6588
6588
  "samples": [],
6589
6589
  "records": [],
6590
6590
  "token": "957487f61daf7c8a30abe1a6d8c7f18615a60ad1f482b41603a847bf4aa02af8"
6591
+ },
6592
+ {
6593
+ "username": "联调6337",
6594
+ "passHash": "scrypt$fcef8e2d049d828cab00f5b1b9cf053c$b20f9074d8ed06dd77e5deb3e9d1c28e4c26723b05ca6187a77291b9d9038517ee6e631793e58a0ccf8e0aef376c2c8ef02b04129cb8894e254fc0f096336e53",
6595
+ "createdAt": 1787978356427,
6596
+ "profile": {
6597
+ "birthDate": "1996-09-09",
6598
+ "birthHourIndex": 5,
6599
+ "gender": "男",
6600
+ "location": null
6601
+ },
6602
+ "samples": [],
6603
+ "records": [
6604
+ {
6605
+ "artId": "bazi",
6606
+ "createdAt": 1,
6607
+ "result": {
6608
+ "dayGZ": "壬申"
6609
+ }
6610
+ }
6611
+ ],
6612
+ "token": "15fe37911eb72bdd3413a2b7d53d76b2bfca8a291bc86e30e585039afbc3e41f"
6613
+ },
6614
+ {
6615
+ "username": "鉴权6593",
6616
+ "passHash": "scrypt$d4b72586266f6cdfdcc3d3df931237cb$266366a33eb554b0a7de60ec40e789ab79c1fc56c1ac527433fe5fc011636835c195b28455c20dcd093f4b3303acb27b0725b2d6d72c29b269b219123e4d657e",
6617
+ "createdAt": 1787978356640,
6618
+ "profile": {
6619
+ "birthDate": "1999-01-01"
6620
+ },
6621
+ "samples": [],
6622
+ "records": [],
6623
+ "token": "c231ef749f16bbbc7a0151c9f8e8dbc86186b5753da5f8995eee3a7e380c2481"
6624
+ },
6625
+ {
6626
+ "username": "他人6686",
6627
+ "passHash": "scrypt$e5470b328196d5d1415ee56400bac2f0$a576a32b0b6b291d86cc0bc3a83a19f37e97486b115377b73151b8fffc729876a07c007926d03c639ebcea658b884f90a3158954f3b2b30605ec634bff559851",
6628
+ "createdAt": 1787978356737,
6629
+ "profile": {},
6630
+ "samples": [],
6631
+ "records": [],
6632
+ "token": "e7dd53f31c29fa2c30bb841869d763af228e52292953bd5abd4287d78d2d1724"
6633
+ },
6634
+ {
6635
+ "username": "登鉴6745",
6636
+ "passHash": "scrypt$4da27f576a9599933671d16b866091dc$03e88d3b0f93798d28f05cc8e0b85d8c4fe8169fdcb46568dd256cf31b0a9818774a301168003debeb510bb59c0b8fec98e6b9765e211ce5b8829545bd040fda",
6637
+ "createdAt": 1787978356786,
6638
+ "profile": {},
6639
+ "samples": [],
6640
+ "records": [],
6641
+ "token": "694f7a690a4d32223db3fd97c256f1470fe049df9db80173c76c3ed623ce94cd"
6642
+ },
6643
+ {
6644
+ "username": "占位6827",
6645
+ "passHash": "scrypt$80c0cefc6c6bc40375c8ff1ad3369c40$30bb233c5b96843e6e709c2646cd7d65aff34303b32d63900ad7ea8e09f89f5f2a1015341020ff8d42df7d70f384b4d8e55a4e205210d1f7cce0bfa16663b25d",
6646
+ "createdAt": 1787978356830,
6647
+ "profile": {},
6648
+ "samples": [],
6649
+ "records": [],
6650
+ "token": "2d0c81cada1b36571ae965d4180a662cbef68dbb57fa883013510c2eb919cd44"
6651
+ },
6652
+ {
6653
+ "username": "甲6931",
6654
+ "passHash": "scrypt$2ad4bbc5c40b6f30c63cd4d4b8ec58df$c274784703f2a487efc4e58906de2e75951f711fe31eda2debf94663ee79813c71f1204e712e057cf6c23d625af4576927ea7b9f2cfbb8624be6ac346dc88229",
6655
+ "createdAt": 1787978356982,
6656
+ "profile": {},
6657
+ "samples": [],
6658
+ "records": [],
6659
+ "token": "4ef92e4f752f2798fde75c28f4a0672b2d3c848daccd282dd76e0e1f63678f45"
6660
+ },
6661
+ {
6662
+ "username": "乙6931",
6663
+ "passHash": "scrypt$37e3af2e80433cf81d8a6a4d321be293$33c3f391de987f6eb956a49985becc2f64d7c0a73f6af99920261c5ffab90ef624ad61f0bd14a74ba33da3ad6f55f748580ef7730e839602a3c44f502106e88c",
6664
+ "createdAt": 1787978357032,
6665
+ "profile": {},
6666
+ "samples": [],
6667
+ "records": [],
6668
+ "token": "99a53431fb95f7cd5049ac926cd974145dd47d358b8d9f4aae2837940a42a9ea"
6669
+ },
6670
+ {
6671
+ "username": "联调0387",
6672
+ "passHash": "scrypt$573da827e7a7ddf9089438980d3da419$05ebb4314470f3f5951ce1e5db8b83bff360c3c40f187220c3d9786e35cc2dbd57143aedc0de6bbdfe8b98c226ab1f154f85e41dfbb7a5e08eaa02ae57f0e52a",
6673
+ "createdAt": 1787978370461,
6674
+ "profile": {
6675
+ "birthDate": "1996-09-09",
6676
+ "birthHourIndex": 5,
6677
+ "gender": "男",
6678
+ "location": null
6679
+ },
6680
+ "samples": [],
6681
+ "records": [
6682
+ {
6683
+ "artId": "bazi",
6684
+ "createdAt": 1,
6685
+ "result": {
6686
+ "dayGZ": "壬申"
6687
+ }
6688
+ }
6689
+ ],
6690
+ "token": "c352a6e5cb4c3f7096d374631c687ec50257a1e82d436b684a4ce624a7650b90"
6691
+ },
6692
+ {
6693
+ "username": "鉴权0656",
6694
+ "passHash": "scrypt$bda3151120b7af6d018dc096b0c7b827$c0dc6f0db7d8d1cab6ea8ee76c22d50d8544d6f6feac721df98624da1975331673b30c5de55aa45b3f28e611ea0d202503a6ee64be40e4394abd5b2bd771e6e7",
6695
+ "createdAt": 1787978370697,
6696
+ "profile": {
6697
+ "birthDate": "1999-01-01"
6698
+ },
6699
+ "samples": [],
6700
+ "records": [],
6701
+ "token": "d4cae222e7c35c80801d47aec4f30bb1098b31d00ae90c7eba00f5c65d50cc70"
6702
+ },
6703
+ {
6704
+ "username": "他人0721",
6705
+ "passHash": "scrypt$add02bd12f43f37226769736b3fe7590$0dc18e701e6158144a37d5b8fb5d1d81bcd9f51a29150190945615abae8595dd0425dc5b59a22da539dc4c33a2e8f2ff2096eacf760bc08ad921494fdf31aa61",
6706
+ "createdAt": 1787978370765,
6707
+ "profile": {},
6708
+ "samples": [],
6709
+ "records": [],
6710
+ "token": "fce1afbf5f36c6e6257740106e815ae5910a3ef64b89c6cdaef8e88ee1996dc6"
6711
+ },
6712
+ {
6713
+ "username": "登鉴0774",
6714
+ "passHash": "scrypt$b5a877f90ba174fad21a37f08318e07f$df91de7cc0891704ae083c502fda059977cb3c789dfff9e6d75e3089b8c04980355d2d33d44d795131b0476c0bb958fcfdfb318ea65fe2d81ab56679d4c02661",
6715
+ "createdAt": 1787978370819,
6716
+ "profile": {},
6717
+ "samples": [],
6718
+ "records": [],
6719
+ "token": "e5aaa3313c7f72231bf591f2cf4980829ed806d839b4a8d2118580325028a16f"
6720
+ },
6721
+ {
6722
+ "username": "占位0872",
6723
+ "passHash": "scrypt$fadf5b83732b0e4e895e1c9fdd7f66ef$b66960d25301e97b782e7754301a74233503a41eda8585688386b369fea920703cefc983873ac423a17b49cd0264ad113a0b65ef69246d4b93900060c950c3f8",
6724
+ "createdAt": 1787978370874,
6725
+ "profile": {},
6726
+ "samples": [],
6727
+ "records": [],
6728
+ "token": "b7098ef1f563769ca96d56ec751bcc51a98328e580cb5cf54922ef847ea68718"
6729
+ },
6730
+ {
6731
+ "username": "甲0985",
6732
+ "passHash": "scrypt$3b2d3f361dcc7eeafad57e353078ed70$8ea67dfb7fc406de4b91f2d96fe7236db06b5242b4d69098933f82edaa9e3f17b77f7948fca14a2782a8e4359a0804e55282a9836127dd145dca21d717c584db",
6733
+ "createdAt": 1787978371046,
6734
+ "profile": {},
6735
+ "samples": [],
6736
+ "records": [],
6737
+ "token": "10e168af504dbf81deb5516f2f1c8a08f31ad870c62985621f46055a575fc909"
6738
+ },
6739
+ {
6740
+ "username": "乙0985",
6741
+ "passHash": "scrypt$365a2bae3be185a4320f92bf6a5b4fc8$64e199092f297a2d8bc213a278b0483d7587cfe3e022ae7d4cac9985de1a25ad557390a08fed590f9feb87b599135b0e41b15cf520f3cb8ccba5d1180cb68a49",
6742
+ "createdAt": 1787978371091,
6743
+ "profile": {},
6744
+ "samples": [],
6745
+ "records": [],
6746
+ "token": "da86949d87c96659755e15ddc3a511b805cc89524904a3cbeaf7211f8acdc0a0"
6591
6747
  }
6592
6748
  ]
6593
6749
  }
Binary file
@@ -196,10 +196,12 @@ interface RawReading { summary: string; keyPoints: string[] }
196
196
  // ─── Step1 盘面解析缓存 ───
197
197
  // 同一 divineId + 同一问题复用同一份盘面解析:多次解读的输入一致 → 输出不再互相矛盾
198
198
  // (Step1 每次调用结果都不同是「一会严格一会宽松」的主因之一)
199
+ // 键含日期:prompt 注入了【当前时间 · 事实】,跨日/跨年复用会给出过期的"现在"——按天隔离
199
200
  const step1Cache = new Map<string, string>();
200
201
  const STEP1_CACHE_MAX = 300;
201
202
  async function getStep1(divineId: string, artId: string, question: string, resultRaw: unknown, profile: unknown): Promise<string> {
202
- const key = divineId + '|' + (question || '');
203
+ const day = new Date().toISOString().slice(0, 10);
204
+ const key = divineId + '|' + day + '|' + (question || '');
203
205
  const hit = step1Cache.get(key);
204
206
  if (hit) return hit;
205
207
  try {
@@ -295,6 +295,8 @@ export function buildStep2Messages(
295
295
  '【盘面事实(原始排盘,引用须一致)】',
296
296
  chartBrief(artId, resultRaw),
297
297
  '',
298
+ nowFact(),
299
+ '',
298
300
  lifeEventsNote(profile),
299
301
  '',
300
302
  semantic ? '【问题语义分析】' + JSON.stringify(semantic, null, 1) : '',
@@ -317,6 +319,7 @@ function systemPrompt(artId: string): string {
317
319
  '',
318
320
  '【语言规范】现代白话,温润克制,不作绝对化断言;引经据典附出处;结尾附免责声明。',
319
321
  '输出结构:严格输出合法 json 对象(字段名不可更改)。',
322
+ nowFact(),
320
323
  '【可引古籍】' + (p?.classics || ''),
321
324
  ].join('\n');
322
325
  }
@@ -333,6 +336,8 @@ export function buildMessages(
333
336
  '【排盘结果】',
334
337
  JSON.stringify(resultRaw, null, 1),
335
338
  '',
339
+ nowFact(),
340
+ '',
336
341
  semantic ? '【问题语义分析】' + JSON.stringify(semantic, null, 1) : '',
337
342
  '',
338
343
  '请按语言规范生成解读。',