@inupedia/spotlight-memory 0.1.7 → 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.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/package.json +2 -2
- package/dist/ttl.d.ts +0 -4
- package/dist/ttl.d.ts.map +0 -1
- package/dist/ttl.js +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { classifyMemoryKind, isMemoryKindAllowedForRead, type ClassifyMemoryKindInput, type ClassifyMemoryKindResult, } from "./classify.js";
|
|
2
2
|
export { normalizeQuestion, scoreQuestionSimilarity, } from "./normalize.js";
|
|
3
3
|
export { isMemoryEntryStale, pickSemanticHit } from "./stale.js";
|
|
4
|
-
export { clampMemoryTtlSec, MEMORY_TTL_MAX_SEC } from "./ttl.js";
|
|
5
4
|
export { cosineSimilarity } from "./similarity.js";
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { classifyMemoryKind, isMemoryKindAllowedForRead, } from "./classify.js";
|
|
2
2
|
export { normalizeQuestion, scoreQuestionSimilarity, } from "./normalize.js";
|
|
3
3
|
export { isMemoryEntryStale, pickSemanticHit } from "./stale.js";
|
|
4
|
-
export { clampMemoryTtlSec, MEMORY_TTL_MAX_SEC } from "./ttl.js";
|
|
5
4
|
export { cosineSimilarity } from "./similarity.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inupedia/spotlight-memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Memory Gate, exact/semantic cache stores for Inupedia Spotlight",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@inupedia/spotlight-protocol": "0.1.
|
|
27
|
+
"@inupedia/spotlight-protocol": "0.1.9"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^22.10.0",
|
package/dist/ttl.d.ts
DELETED
package/dist/ttl.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ttl.d.ts","sourceRoot":"","sources":["../src/ttl.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAEzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGxD"}
|
package/dist/ttl.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/** Hard upper bound for any memory entry TTL (24 hours). */
|
|
2
|
-
export const MEMORY_TTL_MAX_SEC = 86_400;
|
|
3
|
-
export function clampMemoryTtlSec(ttlSec) {
|
|
4
|
-
if (!Number.isFinite(ttlSec))
|
|
5
|
-
return 0;
|
|
6
|
-
return Math.max(0, Math.min(Math.floor(ttlSec), MEMORY_TTL_MAX_SEC));
|
|
7
|
-
}
|