Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/rag/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.0]

### Changed

- Convert `@qvac/rag` to TypeScript compiled ESM (`"type": "module"`). CommonJS `require('@qvac/rag')` no longer works — switch to `import`. Named exports are unchanged (#3718).

### Fixed

- Validate `search` and `infer` queries before logging so a non-string or blank query throws `QvacErrorRAG { code: INVALID_INPUT }` instead of a raw `TypeError` (#3729).

## [0.6.4]

### Changed
Expand Down
1 change: 1 addition & 0 deletions packages/rag/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ JavaScript Dependencies
@hyperswarm/secret-stream@6.9.1
https://github.com/holepunchto/hyperswarm-secret-stream
@qvac/error@0.1.1
@qvac/logging@0.1.1
adaptive-timeout@1.0.1
https://github.com/holepunchto/adaptive-timeout
b4a@1.8.1
Expand Down
7 changes: 7 additions & 0 deletions packages/rag/changelog/0.6.4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog v0.6.4

Release Date: 2026-06-15

## 🔧 Changed

- Drop the unused `crypto-browserify` hard dependency. The package never imported it — `#crypto` resolves to `bare-crypto` (Bare) or `node:crypto` (Node), and the browser / React Native shim reads `globalThis.crypto`. Consumers needing Node-style `crypto.createHash` (e.g. HyperDB document hashing in a browser/RN runtime) should install `crypto-browserify` themselves and assign it to `globalThis.crypto`, as documented in the README.
11 changes: 11 additions & 0 deletions packages/rag/changelog/0.6.4/CHANGELOG_LLM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# QVAC RAG v0.6.4 Release Notes

📦 **NPM:** https://www.npmjs.com/package/@qvac/rag/v/0.6.4

This patch drops the unused `crypto-browserify` hard dependency. The package never imported it.

## Changed

### Unused `crypto-browserify` dependency removed

`#crypto` still resolves to `bare-crypto` on Bare, `node:crypto` on Node, and `globalThis.crypto` on browser / React Native. Consumers that need Node-style `crypto.createHash` (for example HyperDB document hashing in a browser or React Native runtime) should install `crypto-browserify` themselves and assign it to `globalThis.crypto`, as documented in the README.
22 changes: 22 additions & 0 deletions packages/rag/changelog/0.7.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog v0.7.0

Release Date: 2026-08-24

## 🔌 API

- Expose @qvac/rag/errors subpath for consumers. (see PR [#2303](https://github.com/tetherto/qvac/pull/2303)) - See [API changes](./api.md)

## 🐞 Fixes

- Load RAG hard deps with require() for Pear/CJS compatibility. (see PR [#2284](https://github.com/tetherto/qvac/pull/2284))
- Validate RAG query before logging it. (see PR [#3729](https://github.com/tetherto/qvac/pull/3729))

## 📘 Docs

- Update npm package homepage metadata. (see PR [#2810](https://github.com/tetherto/qvac/pull/2810))

## 🧹 Chores

- Switch @qvac/rag to Lunte and Prettier. (see PR [#2801](https://github.com/tetherto/qvac/pull/2801))
- Unify lint/format/typecheck across SDK-pod packages. (see PR [#3040](https://github.com/tetherto/qvac/pull/3040))
- Convert @qvac/rag to TypeScript ESM. (see PR [#3718](https://github.com/tetherto/qvac/pull/3718)) - See [breaking changes](./breaking.md)
31 changes: 31 additions & 0 deletions packages/rag/changelog/0.7.0/CHANGELOG_LLM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# QVAC RAG v0.7.0 Release Notes

📦 **NPM:** https://www.npmjs.com/package/@qvac/rag/v/0.7.0

`@qvac/rag` is now TypeScript compiled to ESM. CommonJS `require('@qvac/rag')` no longer works — switch to `import`. Invalid `search` and `infer` queries throw `QvacErrorRAG` with `INVALID_INPUT` instead of a raw `TypeError`. Named exports are unchanged.

## Breaking Changes

### ESM only

The package is `"type": "module"`. Node rejects `require()` of ESM. Use `import`. Named exports (`RAG`, `HyperDBAdapter`, adapters, `ERR_CODES`, `QvacErrorRAG`) are the same. `@qvac/rag/errors` still exports the error class and codes without loading the full package.

**Before:**

```js
const { RAG, HyperDBAdapter } = require('@qvac/rag')
```

**After:**

```ts
import { RAG, HyperDBAdapter } from '@qvac/rag'
```

The 0.6.1 Pear/CJS `require()` path for hard dependencies is gone with this conversion. Pear consumers need an ESM-capable loader.

## Bug Fixes

### Query validated before logging

`rag.search()` and `rag.infer()` reject a non-string or blank query with `QvacErrorRAG { code: INVALID_INPUT }` before any debug log reads `query.substring`. Valid queries are unchanged. Previously a non-string hit `TypeError` at the log line and never reached the existing search guard.
15 changes: 15 additions & 0 deletions packages/rag/changelog/0.7.0/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 🔌 API Changes v0.7.0

## Expose @qvac/rag/errors subpath for consumers

PR: [#2303](https://github.com/tetherto/qvac/pull/2303)

```typescript
import { ERR_CODES, QvacErrorRAG } from '@qvac/rag/errors'

if (err instanceof QvacErrorRAG && err.code === ERR_CODES.OPERATION_CANCELLED) {
// handle cancellation
}
```

---
19 changes: 19 additions & 0 deletions packages/rag/changelog/0.7.0/breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 💥 Breaking Changes v0.7.0

## Convert @qvac/rag to TypeScript ESM

PR: [#3718](https://github.com/tetherto/qvac/pull/3718)

**BEFORE:**

```js
const { RAG, HyperDBAdapter } = require('@qvac/rag')
```

**AFTER:**

```ts
import { RAG, HyperDBAdapter } from '@qvac/rag'
```

---
2 changes: 1 addition & 1 deletion packages/rag/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qvac/rag",
"version": "0.6.4",
"version": "0.7.0",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/rag/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ const definitions: ErrorCodesMap = {
}
}

addCodes(definitions, { name: '@qvac/rag', version: '0.6.4' })
addCodes(definitions, { name: '@qvac/rag', version: '0.7.0' })
Loading