@chainlesschain/personal-data-hub 0.2.3 → 0.2.4

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.
@@ -320,7 +320,7 @@ describe("AnalysisEngine emits TOTALS preamble", () => {
320
320
  expect(userMsg).toContain('"persons": 512');
321
321
  expect(userMsg).toContain('"items": 89');
322
322
  // System prompt tells LLM to trust TOTALS for counts.
323
- expect(chatCalls[0][0].content).toMatch(/TOTALS.*authoritative/);
323
+ expect(chatCalls[0][0].content).toMatch(/TOTALS.*authoritative/i);
324
324
  });
325
325
 
326
326
  it("intent=count for '几个联系人' and '几个 app' and '多少个 X'", () => {
@@ -53,8 +53,13 @@ describe("DouyinAdapter", () => {
53
53
  expect(assertAdapter(a).ok).toBe(true);
54
54
  });
55
55
 
56
- it("rejects missing account.uid", () => {
57
- expect(() => new DouyinAdapter({ account: {} })).toThrow(/uid/);
56
+ it("snapshot mode constructs without account.uid (stateless)", () => {
57
+ // §A8 v0.2: constructor loosened — snapshot mode pulls account from the
58
+ // snapshot file. Sqlite mode still requires account.uid, checked at sync
59
+ // time not construction (see _syncViaSqlite throw at runtime).
60
+ const a = new DouyinAdapter({});
61
+ expect(assertAdapter(a).ok).toBe(true);
62
+ expect(a.account).toBeNull();
58
63
  });
59
64
 
60
65
  it("sync yields history + favourite + search", async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainlesschain/personal-data-hub",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Personal Data Hub — UnifiedSchema + validators + KG ingest helpers for the data-back-to-the-individual middleware",
5
5
  "type": "commonjs",
6
6
  "main": "lib/index.js",