korely-memory 0.1.8 → 0.1.9

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.cjs CHANGED
@@ -87,7 +87,7 @@ var QuotaExceededError = class _QuotaExceededError extends APIError {
87
87
  };
88
88
 
89
89
  // src/client.ts
90
- var VERSION = "0.1.8";
90
+ var VERSION = "0.1.9";
91
91
  var REGIONS = { eu: "https://api.korely.ai" };
92
92
  function coerceContent(content) {
93
93
  if (typeof content === "string") return content;
@@ -110,6 +110,9 @@ function coerceContent(content) {
110
110
  return String(content);
111
111
  }
112
112
  function seg(value, what) {
113
+ if (value != null && typeof value !== "string" && !(typeof value === "number" && Number.isInteger(value))) {
114
+ throw new KorelyError(`${what} must be a string id, not ${Array.isArray(value) ? "an array" : `a ${typeof value}`}.`);
115
+ }
113
116
  const s = value == null ? "" : String(value);
114
117
  if (!s) throw new KorelyError(`${what} is empty.`);
115
118
  return encodeURIComponent(s);
package/dist/index.d.cts CHANGED
@@ -370,7 +370,7 @@ interface ForgetReceipt {
370
370
 
371
371
  /** Must equal `version` in package.json (a test checks). It goes out in the
372
372
  * X-Korely-Client header, and said 0.1.1 from 0.1.1 to 0.1.6. */
373
- declare const VERSION = "0.1.8";
373
+ declare const VERSION = "0.1.9";
374
374
  interface KorelyOptions {
375
375
  /** Your `kor_live_...` key. Falls back to the KORELY_API_KEY env var. */
376
376
  apiKey?: string;
package/dist/index.d.ts CHANGED
@@ -370,7 +370,7 @@ interface ForgetReceipt {
370
370
 
371
371
  /** Must equal `version` in package.json (a test checks). It goes out in the
372
372
  * X-Korely-Client header, and said 0.1.1 from 0.1.1 to 0.1.6. */
373
- declare const VERSION = "0.1.8";
373
+ declare const VERSION = "0.1.9";
374
374
  interface KorelyOptions {
375
375
  /** Your `kor_live_...` key. Falls back to the KORELY_API_KEY env var. */
376
376
  apiKey?: string;
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ var QuotaExceededError = class _QuotaExceededError extends APIError {
53
53
  };
54
54
 
55
55
  // src/client.ts
56
- var VERSION = "0.1.8";
56
+ var VERSION = "0.1.9";
57
57
  var REGIONS = { eu: "https://api.korely.ai" };
58
58
  function coerceContent(content) {
59
59
  if (typeof content === "string") return content;
@@ -76,6 +76,9 @@ function coerceContent(content) {
76
76
  return String(content);
77
77
  }
78
78
  function seg(value, what) {
79
+ if (value != null && typeof value !== "string" && !(typeof value === "number" && Number.isInteger(value))) {
80
+ throw new KorelyError(`${what} must be a string id, not ${Array.isArray(value) ? "an array" : `a ${typeof value}`}.`);
81
+ }
79
82
  const s = value == null ? "" : String(value);
80
83
  if (!s) throw new KorelyError(`${what} is empty.`);
81
84
  return encodeURIComponent(s);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "korely-memory",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "JavaScript / TypeScript SDK for Korely Agents: memory for AI agents with bi-temporal typed facts.",
5
5
  "keywords": [
6
6
  "ai",