@volter/twin-algolia 0.1.0 → 0.1.2
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/src/algolia-twin.js +2 -2
- package/package.json +3 -3
- package/src/algolia-twin.ts +2 -2
package/dist/src/algolia-twin.js
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
// `POST /query`/`POST /browse` are read-shaped POSTs and stay allowed in readOnly mode, mirroring
|
|
50
50
|
// pinecone-twin.ts's / linear-state.ts's per-operation readOnly gating).
|
|
51
51
|
import { createHash } from 'node:crypto';
|
|
52
|
-
import { applyTwinWrite, projectResources } from '@volter/world-core';
|
|
52
|
+
import { applyTwinWrite, projectResources, worldNow } from '@volter/world-core';
|
|
53
53
|
import { matchesAlgoliaFilters, matchesFacetFilters, computeFacetCounts } from "./algolia-filter.js";
|
|
54
54
|
import { rankRecords, buildSynonymGroups } from "./algolia-search.js";
|
|
55
55
|
const SERVICE = 'algolia';
|
|
@@ -108,7 +108,7 @@ function parseObjectBody(body) {
|
|
|
108
108
|
return v && typeof v === 'object' && !Array.isArray(v) ? v : {};
|
|
109
109
|
}
|
|
110
110
|
function nowIso(occurredAt) {
|
|
111
|
-
return occurredAt ??
|
|
111
|
+
return occurredAt ?? worldNow();
|
|
112
112
|
}
|
|
113
113
|
// ── kernel subject ids (type-prefixed; D1) ──────────────────────────────────────────────────
|
|
114
114
|
function indexKey(name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-algolia",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Local Algolia twin for the hosted-search surface: index list/delete/clear, record CRUD (add-auto-objectID/add-replace/get/partial/delete/batch), browse-adjacent record listing, a REAL search engine (tokenize + Damerau-Levenshtein typo tolerance + a faithful-subset ranking + REAL filter/facetFilters evaluation + exact facet-count aggregation + customRanking tie-breaks + basic bidirectional synonym expansion), settings get/set, multi-index, and a host-tolerant router, built on @volter/world-core.",
|
|
5
5
|
"author": "Volter (https://github.com/volter-ai)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"postpack": "node ../../../scripts/publish/prepare-publish.mjs postpack"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@volter/world-core": "2.0.
|
|
38
|
+
"@volter/world-core": "2.0.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/bun": "^1.2.20",
|
|
42
42
|
"@types/node": "^24.0.0",
|
|
43
|
-
"@volter/world-core": "2.0.
|
|
43
|
+
"@volter/world-core": "2.0.2",
|
|
44
44
|
"@volter/world-tooling": "0.1.0",
|
|
45
45
|
"algoliasearch": "4.27.0",
|
|
46
46
|
"typescript": "^5.9.0"
|
package/src/algolia-twin.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
// `POST /query`/`POST /browse` are read-shaped POSTs and stay allowed in readOnly mode, mirroring
|
|
50
50
|
// pinecone-twin.ts's / linear-state.ts's per-operation readOnly gating).
|
|
51
51
|
import { createHash } from 'node:crypto';
|
|
52
|
-
import { applyTwinWrite, projectResources } from '@volter/world-core';
|
|
52
|
+
import { applyTwinWrite, projectResources, worldNow } from '@volter/world-core';
|
|
53
53
|
import { matchesAlgoliaFilters, matchesFacetFilters, computeFacetCounts, type FacetFilters } from './algolia-filter.ts';
|
|
54
54
|
import { rankRecords, buildSynonymGroups, type CustomRankingRule, type SearchRecord } from './algolia-search.ts';
|
|
55
55
|
|
|
@@ -130,7 +130,7 @@ function parseObjectBody(body?: string): Record<string, unknown> {
|
|
|
130
130
|
return v && typeof v === 'object' && !Array.isArray(v) ? (v as Record<string, unknown>) : {};
|
|
131
131
|
}
|
|
132
132
|
function nowIso(occurredAt?: string): string {
|
|
133
|
-
return occurredAt ??
|
|
133
|
+
return occurredAt ?? worldNow();
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
// ── kernel subject ids (type-prefixed; D1) ──────────────────────────────────────────────────
|