@maximem/synap-js-sdk 0.5.6 → 0.5.7

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/dist/index.d.cts CHANGED
@@ -374,6 +374,16 @@ interface RawContextItem {
374
374
  extracted_at?: string | null;
375
375
  metadata?: Json;
376
376
  event_date?: string | null;
377
+ /**
378
+ * The day the words were SAID, which is not the day the event happened.
379
+ *
380
+ * `event_date` is empty unless somebody stated when the event took place, so
381
+ * without this field beside it an item whose turn stated no event date
382
+ * arrives with no machine-readable date at all. Empty when the client never
383
+ * told the server when the conversation happened; it is never the server's
384
+ * own ingest or extraction clock.
385
+ */
386
+ said_at?: string | null;
377
387
  valid_until?: string | null;
378
388
  temporal_category?: string | null;
379
389
  temporal_confidence?: number;
@@ -409,6 +419,16 @@ interface RawContext {
409
419
  }
410
420
  interface TemporalFields {
411
421
  eventDate: string | null;
422
+ /**
423
+ * The day the words were SAID, which is not the day the event happened.
424
+ *
425
+ * `event_date` is empty unless somebody stated when the event took place, so
426
+ * without this field beside it an item whose turn stated no event date
427
+ * arrives with no machine-readable date at all. Empty when the client never
428
+ * told the server when the conversation happened; it is never the server's
429
+ * own ingest or extraction clock.
430
+ */
431
+ saidAt: string | null;
412
432
  validUntil: string | null;
413
433
  temporalCategory: string | null;
414
434
  temporalConfidence: number;
@@ -458,6 +478,8 @@ interface TemporalEvent extends QueryAttribution {
458
478
  id: string;
459
479
  content: string;
460
480
  eventDate: string | null;
481
+ /** See the note on `TemporalFields.saidAt`. */
482
+ saidAt: string | null;
461
483
  validUntil: string | null;
462
484
  /**
463
485
  * Nullable despite the `''` default in the normaliser: `pickDefined` skips
@@ -595,6 +617,8 @@ interface FlatMemory {
595
617
  metadata: Json;
596
618
  context_type: 'fact' | 'preference' | 'episode' | 'emotion' | 'temporal_event';
597
619
  event_date: string | null;
620
+ /** See `TemporalFields.saidAt` in ./types. */
621
+ said_at: string | null;
598
622
  valid_until: string | null;
599
623
  temporal_category: string | null;
600
624
  temporal_confidence: number;
@@ -1654,7 +1678,7 @@ declare class SynapClient {
1654
1678
  * build when the two disagree, which is the only thing that makes a manual
1655
1679
  * publish safe.
1656
1680
  */
1657
- declare const SDK_VERSION = "0.5.6";
1681
+ declare const SDK_VERSION = "0.5.7";
1658
1682
 
1659
1683
  /**
1660
1684
  * BM25 scorer for the anticipation cache.
package/dist/index.d.ts CHANGED
@@ -374,6 +374,16 @@ interface RawContextItem {
374
374
  extracted_at?: string | null;
375
375
  metadata?: Json;
376
376
  event_date?: string | null;
377
+ /**
378
+ * The day the words were SAID, which is not the day the event happened.
379
+ *
380
+ * `event_date` is empty unless somebody stated when the event took place, so
381
+ * without this field beside it an item whose turn stated no event date
382
+ * arrives with no machine-readable date at all. Empty when the client never
383
+ * told the server when the conversation happened; it is never the server's
384
+ * own ingest or extraction clock.
385
+ */
386
+ said_at?: string | null;
377
387
  valid_until?: string | null;
378
388
  temporal_category?: string | null;
379
389
  temporal_confidence?: number;
@@ -409,6 +419,16 @@ interface RawContext {
409
419
  }
410
420
  interface TemporalFields {
411
421
  eventDate: string | null;
422
+ /**
423
+ * The day the words were SAID, which is not the day the event happened.
424
+ *
425
+ * `event_date` is empty unless somebody stated when the event took place, so
426
+ * without this field beside it an item whose turn stated no event date
427
+ * arrives with no machine-readable date at all. Empty when the client never
428
+ * told the server when the conversation happened; it is never the server's
429
+ * own ingest or extraction clock.
430
+ */
431
+ saidAt: string | null;
412
432
  validUntil: string | null;
413
433
  temporalCategory: string | null;
414
434
  temporalConfidence: number;
@@ -458,6 +478,8 @@ interface TemporalEvent extends QueryAttribution {
458
478
  id: string;
459
479
  content: string;
460
480
  eventDate: string | null;
481
+ /** See the note on `TemporalFields.saidAt`. */
482
+ saidAt: string | null;
461
483
  validUntil: string | null;
462
484
  /**
463
485
  * Nullable despite the `''` default in the normaliser: `pickDefined` skips
@@ -595,6 +617,8 @@ interface FlatMemory {
595
617
  metadata: Json;
596
618
  context_type: 'fact' | 'preference' | 'episode' | 'emotion' | 'temporal_event';
597
619
  event_date: string | null;
620
+ /** See `TemporalFields.saidAt` in ./types. */
621
+ said_at: string | null;
598
622
  valid_until: string | null;
599
623
  temporal_category: string | null;
600
624
  temporal_confidence: number;
@@ -1654,7 +1678,7 @@ declare class SynapClient {
1654
1678
  * build when the two disagree, which is the only thing that makes a manual
1655
1679
  * publish safe.
1656
1680
  */
1657
- declare const SDK_VERSION = "0.5.6";
1681
+ declare const SDK_VERSION = "0.5.7";
1658
1682
 
1659
1683
  /**
1660
1684
  * BM25 scorer for the anticipation cache.
package/dist/index.js CHANGED
@@ -638,6 +638,7 @@ function matchedQueries(item = {}) {
638
638
  function normalizeTemporalFields(item = {}) {
639
639
  return {
640
640
  eventDate: pick(item["eventDate"], item.event_date, null),
641
+ saidAt: pick(item["saidAt"], item.said_at, null),
641
642
  validUntil: pick(item["validUntil"], item.valid_until, null),
642
643
  temporalCategory: pick(item["temporalCategory"], item.temporal_category, null),
643
644
  temporalConfidence: pick(item["temporalConfidence"], item.temporal_confidence, 0)
@@ -697,6 +698,7 @@ function normalizeTemporalEvent(item = {}) {
697
698
  id: item.id || "",
698
699
  content: item.content || "",
699
700
  eventDate: pick(item["eventDate"], item.event_date, null),
701
+ saidAt: pick(item["saidAt"], item.said_at, null),
700
702
  validUntil: pick(item["validUntil"], item.valid_until, null),
701
703
  temporalCategory: pick(item["temporalCategory"], item.temporal_category, ""),
702
704
  temporalConfidence: pick(item["temporalConfidence"], item.temporal_confidence, 0),
@@ -760,6 +762,7 @@ var dt = (v) => v ? String(v) : null;
760
762
  function temporal(item) {
761
763
  return {
762
764
  event_date: dt(item["event_date"]),
765
+ said_at: dt(item["said_at"]),
763
766
  valid_until: dt(item["valid_until"]),
764
767
  temporal_category: item["temporal_category"] ?? null,
765
768
  temporal_confidence: n(item["temporal_confidence"], 0)
@@ -1511,7 +1514,7 @@ function createInstanceNamespace(credentials, cache, onTurn) {
1511
1514
  if (client !== null) {
1512
1515
  throw new ListeningAlreadyActiveError("Listening is already active on this instance");
1513
1516
  }
1514
- const { GrpcStreamClient } = await import("./stream-client-Y5NFAMIH.js");
1517
+ const { GrpcStreamClient } = await import("./stream-client-VWKINE47.js");
1515
1518
  const onContext = options.on_context ?? options.onContext;
1516
1519
  const onDisconnect = options.on_disconnect ?? options.onDisconnect;
1517
1520
  const onReconnect = options.on_reconnect ?? options.onReconnect;
@@ -1683,7 +1686,7 @@ function createInstanceNamespace(credentials, cache, onTurn) {
1683
1686
  }
1684
1687
 
1685
1688
  // src/version.ts
1686
- var SDK_VERSION = "0.5.6";
1689
+ var SDK_VERSION = "0.5.7";
1687
1690
 
1688
1691
  // src/registry.ts
1689
1692
  var instances = /* @__PURE__ */ new Map();
@@ -2112,6 +2115,7 @@ function normalise(item) {
2112
2115
  detected_at: pick2(item, "detected_at", "extracted_at", "created_at") ?? null,
2113
2116
  metadata: pick2(item, "metadata") ?? {},
2114
2117
  event_date: pick2(item, "event_date") ?? null,
2118
+ said_at: pick2(item, "said_at") ?? null,
2115
2119
  valid_until: pick2(item, "valid_until") ?? null,
2116
2120
  temporal_category: pick2(item, "temporal_category") ?? null,
2117
2121
  temporal_confidence: Number(pick2(item, "temporal_confidence") ?? 0)