@revealui/ai 0.2.8 → 0.2.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/README.md +2 -2
- package/dist/a2a/card.d.ts +1 -1
- package/dist/a2a/card.d.ts.map +1 -1
- package/dist/a2a/card.js +4 -4
- package/dist/a2a/handler.d.ts +4 -4
- package/dist/a2a/handler.js +5 -5
- package/dist/a2a/index.d.ts +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/audit/emitter.d.ts +1 -1
- package/dist/audit/emitter.js +2 -2
- package/dist/audit/index.d.ts +2 -2
- package/dist/audit/index.js +2 -2
- package/dist/audit/store.d.ts +2 -2
- package/dist/audit/store.js +2 -2
- package/dist/client/errors.d.ts +13 -0
- package/dist/client/errors.d.ts.map +1 -0
- package/dist/client/errors.js +28 -0
- package/dist/client/hooks/useAgentContext.d.ts.map +1 -1
- package/dist/client/hooks/useAgentContext.js +6 -5
- package/dist/client/hooks/useAgentStream.d.ts +2 -2
- package/dist/client/hooks/useAgentStream.js +3 -3
- package/dist/client/hooks/useEpisodicMemory.d.ts.map +1 -1
- package/dist/client/hooks/useEpisodicMemory.js +6 -5
- package/dist/client/hooks/useWorkingMemory.d.ts.map +1 -1
- package/dist/client/hooks/useWorkingMemory.js +7 -6
- package/dist/embeddings/index.d.ts +1 -1
- package/dist/embeddings/index.js +4 -4
- package/dist/inference/context-budget.d.ts +1 -1
- package/dist/inference/context-budget.js +4 -4
- package/dist/inference/index.d.ts +1 -1
- package/dist/inference/index.js +1 -1
- package/dist/inference/runRag.d.ts +3 -3
- package/dist/inference/runRag.d.ts.map +1 -1
- package/dist/inference/runRag.js +1 -1
- package/dist/inference/task-decomposer.d.ts +1 -1
- package/dist/inference/task-decomposer.d.ts.map +1 -1
- package/dist/inference/task-decomposer.js +3 -3
- package/dist/inference/tool-result-compressor.d.ts +1 -1
- package/dist/inference/tool-result-compressor.js +1 -1
- package/dist/ingestion/{cms-indexer.d.ts → admin-indexer.d.ts} +12 -12
- package/dist/ingestion/admin-indexer.d.ts.map +1 -0
- package/dist/ingestion/{cms-indexer.js → admin-indexer.js} +9 -9
- package/dist/ingestion/bm25.d.ts +1 -1
- package/dist/ingestion/bm25.js +1 -1
- package/dist/ingestion/file-parsers.d.ts +1 -1
- package/dist/ingestion/file-parsers.d.ts.map +1 -1
- package/dist/ingestion/file-parsers.js +36 -17
- package/dist/ingestion/hybrid-search.d.ts +1 -1
- package/dist/ingestion/hybrid-search.js +1 -1
- package/dist/ingestion/index.d.ts +1 -1
- package/dist/ingestion/index.d.ts.map +1 -1
- package/dist/ingestion/index.js +1 -1
- package/dist/ingestion/rag-vector-service.d.ts +1 -1
- package/dist/ingestion/rag-vector-service.js +1 -1
- package/dist/ingestion/reranker.d.ts +1 -1
- package/dist/ingestion/reranker.js +1 -1
- package/dist/ingestion/text-splitter.d.ts +1 -1
- package/dist/ingestion/text-splitter.js +2 -2
- package/dist/llm/client.d.ts +7 -10
- package/dist/llm/client.d.ts.map +1 -1
- package/dist/llm/client.js +10 -34
- package/dist/llm/key-validator.d.ts +1 -1
- package/dist/llm/key-validator.js +8 -8
- package/dist/llm/providers/base.d.ts +2 -2
- package/dist/llm/providers/groq.d.ts +2 -2
- package/dist/llm/providers/groq.d.ts.map +1 -1
- package/dist/llm/providers/groq.js +2 -2
- package/dist/llm/providers/inference-snaps.d.ts +5 -5
- package/dist/llm/providers/inference-snaps.d.ts.map +1 -1
- package/dist/llm/providers/inference-snaps.js +4 -4
- package/dist/llm/providers/ollama.d.ts +2 -2
- package/dist/llm/providers/ollama.d.ts.map +1 -1
- package/dist/llm/providers/ollama.js +1 -1
- package/dist/llm/providers/openai-compat.d.ts +2 -2
- package/dist/llm/providers/openai-compat.js +5 -5
- package/dist/llm/providers/vultr.js +1 -1
- package/dist/llm/server.d.ts +0 -1
- package/dist/llm/server.d.ts.map +1 -1
- package/dist/llm/server.js +0 -1
- package/dist/llm/token-counter.d.ts.map +1 -1
- package/dist/llm/token-counter.js +11 -8
- package/dist/llm/workspace-provider-config.d.ts +1 -1
- package/dist/llm/workspace-provider-config.d.ts.map +1 -1
- package/dist/llm/workspace-provider-config.js +1 -1
- package/dist/memory/crdt/or-set.d.ts +12 -0
- package/dist/memory/crdt/or-set.d.ts.map +1 -1
- package/dist/memory/crdt/or-set.js +27 -0
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +1 -0
- package/dist/memory/persistence/crdt-persistence.d.ts +21 -1
- package/dist/memory/persistence/crdt-persistence.d.ts.map +1 -1
- package/dist/memory/persistence/crdt-persistence.js +67 -0
- package/dist/memory/preferences/user-preferences-manager.d.ts.map +1 -1
- package/dist/memory/preferences/user-preferences-manager.js +11 -1
- package/dist/memory/stores/episodic-memory.js +2 -2
- package/dist/memory/stores/working-memory.d.ts +7 -2
- package/dist/memory/stores/working-memory.d.ts.map +1 -1
- package/dist/memory/stores/working-memory.js +31 -17
- package/dist/memory/sync/index.d.ts +2 -0
- package/dist/memory/sync/index.d.ts.map +1 -0
- package/dist/memory/sync/index.js +1 -0
- package/dist/memory/sync/sync-manager.d.ts +104 -0
- package/dist/memory/sync/sync-manager.d.ts.map +1 -0
- package/dist/memory/sync/sync-manager.js +137 -0
- package/dist/memory/utils/validation.js +1 -1
- package/dist/memory/vector/vector-memory-service.d.ts +1 -1
- package/dist/memory/vector/vector-memory-service.js +1 -1
- package/dist/orchestration/agent.d.ts +2 -2
- package/dist/orchestration/defaults.d.ts +1 -1
- package/dist/orchestration/defaults.js +1 -1
- package/dist/orchestration/orchestrator.d.ts +3 -3
- package/dist/orchestration/orchestrator.js +3 -3
- package/dist/orchestration/runtime.d.ts +1 -1
- package/dist/orchestration/runtime.js +1 -1
- package/dist/orchestration/streaming-runtime.d.ts +2 -2
- package/dist/orchestration/streaming-runtime.js +2 -2
- package/dist/orchestration/ticket-agent.d.ts +11 -11
- package/dist/orchestration/ticket-agent.d.ts.map +1 -1
- package/dist/orchestration/ticket-agent.js +10 -10
- package/dist/skills/catalog/vercel-catalog.d.ts.map +1 -1
- package/dist/skills/catalog/vercel-catalog.js +7 -4
- package/dist/skills/loader/github-loader.d.ts.map +1 -1
- package/dist/skills/loader/github-loader.js +2 -0
- package/dist/skills/loader/local-loader.js +1 -1
- package/dist/skills/loader/vercel-loader.d.ts.map +1 -1
- package/dist/skills/loader/vercel-loader.js +2 -0
- package/dist/skills/parser/skill-md-parser.js +2 -2
- package/dist/skills/registry/skill-registry.js +1 -1
- package/dist/templates/prompt-spec.js +1 -1
- package/dist/templates/skill-spec.js +1 -1
- package/dist/tools/{cms → admin}/collection-tools.d.ts +2 -2
- package/dist/tools/admin/collection-tools.d.ts.map +1 -0
- package/dist/tools/{cms → admin}/collection-tools.js +8 -8
- package/dist/tools/{cms → admin}/factory.d.ts +11 -11
- package/dist/tools/admin/factory.d.ts.map +1 -0
- package/dist/tools/{cms → admin}/factory.js +4 -4
- package/dist/tools/{cms → admin}/global-tools.d.ts +1 -1
- package/dist/tools/admin/global-tools.d.ts.map +1 -0
- package/dist/tools/{cms → admin}/global-tools.js +4 -4
- package/dist/tools/{cms → admin}/index.d.ts +4 -4
- package/dist/tools/admin/index.d.ts.map +1 -0
- package/dist/tools/{cms → admin}/index.js +3 -3
- package/dist/tools/{cms → admin}/media-tools.d.ts +1 -1
- package/dist/tools/admin/media-tools.d.ts.map +1 -0
- package/dist/tools/{cms → admin}/media-tools.js +4 -4
- package/dist/tools/{cms → admin}/user-tools.d.ts +1 -1
- package/dist/tools/admin/user-tools.d.ts.map +1 -0
- package/dist/tools/{cms → admin}/user-tools.js +1 -1
- package/dist/tools/coding/file-edit.d.ts +1 -1
- package/dist/tools/coding/file-edit.js +2 -2
- package/dist/tools/coding/file-glob.d.ts +1 -1
- package/dist/tools/coding/file-glob.d.ts.map +1 -1
- package/dist/tools/coding/file-glob.js +2 -1
- package/dist/tools/coding/file-grep.d.ts +1 -1
- package/dist/tools/coding/file-grep.d.ts.map +1 -1
- package/dist/tools/coding/file-grep.js +2 -1
- package/dist/tools/coding/file-read.d.ts +1 -1
- package/dist/tools/coding/file-read.d.ts.map +1 -1
- package/dist/tools/coding/file-read.js +15 -9
- package/dist/tools/coding/file-write.d.ts +1 -1
- package/dist/tools/coding/file-write.js +1 -1
- package/dist/tools/coding/git-ops.d.ts +1 -1
- package/dist/tools/coding/git-ops.d.ts.map +1 -1
- package/dist/tools/coding/git-ops.js +5 -7
- package/dist/tools/coding/index.d.ts +1 -1
- package/dist/tools/coding/index.d.ts.map +1 -1
- package/dist/tools/coding/lint-fix.d.ts +1 -1
- package/dist/tools/coding/lint-fix.d.ts.map +1 -1
- package/dist/tools/coding/lint-fix.js +8 -4
- package/dist/tools/coding/project-context.d.ts +1 -1
- package/dist/tools/coding/project-context.d.ts.map +1 -1
- package/dist/tools/coding/project-context.js +25 -24
- package/dist/tools/coding/safety.d.ts +1 -1
- package/dist/tools/coding/safety.d.ts.map +1 -1
- package/dist/tools/coding/shell-exec.d.ts +1 -1
- package/dist/tools/coding/shell-exec.js +1 -1
- package/dist/tools/coding/test-runner.d.ts +1 -1
- package/dist/tools/coding/test-runner.d.ts.map +1 -1
- package/dist/tools/coding/test-runner.js +12 -7
- package/dist/tools/deduplicator.js +1 -1
- package/dist/tools/document-summarizer.js +2 -2
- package/dist/tools/memory/store-memory.d.ts +1 -1
- package/dist/tools/memory/store-memory.js +2 -2
- package/dist/tools/ticket-tools.d.ts +2 -2
- package/dist/tools/ticket-tools.js +3 -3
- package/dist/tools/web/duck-duck-go.d.ts +3 -3
- package/dist/tools/web/duck-duck-go.js +4 -4
- package/dist/tools/web/exa.d.ts +1 -1
- package/dist/tools/web/exa.js +1 -1
- package/dist/tools/web/scraper.js +1 -1
- package/dist/tools/web/tavily.d.ts +2 -2
- package/dist/tools/web/tavily.js +2 -2
- package/dist/tools/web/types.d.ts +2 -2
- package/dist/tools/web/types.js +2 -2
- package/package.json +20 -15
- package/dist/ingestion/cms-indexer.d.ts.map +0 -1
- package/dist/llm/providers/bitnet.d.ts +0 -28
- package/dist/llm/providers/bitnet.d.ts.map +0 -1
- package/dist/llm/providers/bitnet.js +0 -36
- package/dist/tools/cms/collection-tools.d.ts.map +0 -1
- package/dist/tools/cms/factory.d.ts.map +0 -1
- package/dist/tools/cms/global-tools.d.ts.map +0 -1
- package/dist/tools/cms/index.d.ts.map +0 -1
- package/dist/tools/cms/media-tools.d.ts.map +0 -1
- package/dist/tools/cms/user-tools.d.ts.map +0 -1
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Uses the DuckDuckGo Instant Answer API (no API key required).
|
|
5
5
|
* Returns structured results suitable for agent consumption.
|
|
6
6
|
*
|
|
7
|
-
* Part of the WebSearch skill family
|
|
7
|
+
* Part of the WebSearch skill family - see types.ts for the
|
|
8
8
|
* WebSearchProvider interface used by future Tavily/Exa backends (P4-3).
|
|
9
9
|
*/
|
|
10
10
|
import type { Tool } from '../base.js';
|
|
11
11
|
import type { WebSearchProvider, WebSearchResponse } from './types.js';
|
|
12
12
|
/**
|
|
13
|
-
* DuckDuckGo search provider
|
|
13
|
+
* DuckDuckGo search provider - zero-config, no API key required.
|
|
14
14
|
*
|
|
15
15
|
* Uses the DuckDuckGo Instant Answer API to retrieve the abstract summary
|
|
16
16
|
* and related topics for a query.
|
|
@@ -38,7 +38,7 @@ export declare function createWebSearchTool(provider: WebSearchProvider): Tool;
|
|
|
38
38
|
* Web search tool backed by DuckDuckGo (zero-config).
|
|
39
39
|
*
|
|
40
40
|
* Register this on any agent that needs live web access. Requires no
|
|
41
|
-
* API key
|
|
41
|
+
* API key - backed by the DuckDuckGo Instant Answer API.
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
44
|
* ```typescript
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Uses the DuckDuckGo Instant Answer API (no API key required).
|
|
5
5
|
* Returns structured results suitable for agent consumption.
|
|
6
6
|
*
|
|
7
|
-
* Part of the WebSearch skill family
|
|
7
|
+
* Part of the WebSearch skill family - see types.ts for the
|
|
8
8
|
* WebSearchProvider interface used by future Tavily/Exa backends (P4-3).
|
|
9
9
|
*/
|
|
10
10
|
import { z } from 'zod/v4';
|
|
@@ -17,7 +17,7 @@ function estimateTokens(text) {
|
|
|
17
17
|
// Provider
|
|
18
18
|
// =============================================================================
|
|
19
19
|
/**
|
|
20
|
-
* DuckDuckGo search provider
|
|
20
|
+
* DuckDuckGo search provider - zero-config, no API key required.
|
|
21
21
|
*
|
|
22
22
|
* Uses the DuckDuckGo Instant Answer API to retrieve the abstract summary
|
|
23
23
|
* and related topics for a query.
|
|
@@ -57,7 +57,7 @@ export class DuckDuckGoProvider {
|
|
|
57
57
|
if (results.length >= maxResults)
|
|
58
58
|
break;
|
|
59
59
|
if (topic.Topics)
|
|
60
|
-
continue; // category group
|
|
60
|
+
continue; // category group - skip
|
|
61
61
|
const text = topic.Text;
|
|
62
62
|
const firstURL = topic.FirstURL;
|
|
63
63
|
if (!(firstURL && text))
|
|
@@ -147,7 +147,7 @@ export function createWebSearchTool(provider) {
|
|
|
147
147
|
* Web search tool backed by DuckDuckGo (zero-config).
|
|
148
148
|
*
|
|
149
149
|
* Register this on any agent that needs live web access. Requires no
|
|
150
|
-
* API key
|
|
150
|
+
* API key - backed by the DuckDuckGo Instant Answer API.
|
|
151
151
|
*
|
|
152
152
|
* @example
|
|
153
153
|
* ```typescript
|
package/dist/tools/web/exa.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { WebSearchProvider, WebSearchResponse } from './types.js';
|
|
11
11
|
/**
|
|
12
|
-
* Exa neural search provider
|
|
12
|
+
* Exa neural search provider - BYOK, requires `EXA_API_KEY`.
|
|
13
13
|
*
|
|
14
14
|
* Exa uses embeddings to find semantically relevant results rather than
|
|
15
15
|
* keyword matching. Best for research-oriented queries.
|
package/dist/tools/web/exa.js
CHANGED
|
@@ -13,7 +13,7 @@ function estimateTokens(text) {
|
|
|
13
13
|
return Math.ceil(text.length / 4);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Exa neural search provider
|
|
16
|
+
* Exa neural search provider - BYOK, requires `EXA_API_KEY`.
|
|
17
17
|
*
|
|
18
18
|
* Exa uses embeddings to find semantically relevant results rather than
|
|
19
19
|
* keyword matching. Best for research-oriented queries.
|
|
@@ -96,7 +96,7 @@ export const webScraperTool = {
|
|
|
96
96
|
if (content.length > maxChars) {
|
|
97
97
|
content =
|
|
98
98
|
content.slice(0, maxChars) +
|
|
99
|
-
' [content truncated
|
|
99
|
+
' [content truncated - use document_summarize for full content]';
|
|
100
100
|
truncated = true;
|
|
101
101
|
}
|
|
102
102
|
return {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Tavily Web Search Provider (P4-3)
|
|
3
3
|
*
|
|
4
4
|
* High-quality BYOK search backend using the Tavily Search API.
|
|
5
|
-
* Tavily is optimised for LLM consumption
|
|
5
|
+
* Tavily is optimised for LLM consumption - returns clean, summarised
|
|
6
6
|
* content rather than raw HTML. Requires a Tavily API key.
|
|
7
7
|
*
|
|
8
8
|
* @see https://docs.tavily.com/docs/tavily-api/rest_api
|
|
9
9
|
*/
|
|
10
10
|
import type { WebSearchProvider, WebSearchResponse } from './types.js';
|
|
11
11
|
/**
|
|
12
|
-
* Tavily search provider
|
|
12
|
+
* Tavily search provider - BYOK, requires `TAVILY_API_KEY`.
|
|
13
13
|
*
|
|
14
14
|
* Tavily returns high-quality, LLM-optimised results with relevance scoring.
|
|
15
15
|
* Register via `AgentConfig.webSearchProvider` to replace the default
|
package/dist/tools/web/tavily.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Tavily Web Search Provider (P4-3)
|
|
3
3
|
*
|
|
4
4
|
* High-quality BYOK search backend using the Tavily Search API.
|
|
5
|
-
* Tavily is optimised for LLM consumption
|
|
5
|
+
* Tavily is optimised for LLM consumption - returns clean, summarised
|
|
6
6
|
* content rather than raw HTML. Requires a Tavily API key.
|
|
7
7
|
*
|
|
8
8
|
* @see https://docs.tavily.com/docs/tavily-api/rest_api
|
|
@@ -13,7 +13,7 @@ function estimateTokens(text) {
|
|
|
13
13
|
return Math.ceil(text.length / 4);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Tavily search provider
|
|
16
|
+
* Tavily search provider - BYOK, requires `TAVILY_API_KEY`.
|
|
17
17
|
*
|
|
18
18
|
* Tavily returns high-quality, LLM-optimised results with relevance scoring.
|
|
19
19
|
* Register via `AgentConfig.webSearchProvider` to replace the default
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types for web search tools and provider interface.
|
|
5
5
|
* The WebSearchProvider interface enables swappable backends:
|
|
6
|
-
* - DuckDuckGo (default, zero-config)
|
|
7
|
-
* - Tavily, Exa (BYOK)
|
|
6
|
+
* - DuckDuckGo (default, zero-config) - P3-1
|
|
7
|
+
* - Tavily, Exa (BYOK) - P4-3
|
|
8
8
|
*/
|
|
9
9
|
export interface WebSearchResult {
|
|
10
10
|
title: string;
|
package/dist/tools/web/types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types for web search tools and provider interface.
|
|
5
5
|
* The WebSearchProvider interface enables swappable backends:
|
|
6
|
-
* - DuckDuckGo (default, zero-config)
|
|
7
|
-
* - Tavily, Exa (BYOK)
|
|
6
|
+
* - DuckDuckGo (default, zero-config) - P3-1
|
|
7
|
+
* - Tavily, Exa (BYOK) - P4-3
|
|
8
8
|
*/
|
|
9
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revealui/ai",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "[Pro] AI system for RevealUI - memory, LLM, orchestration, and tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "FSL-1.1-MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"lru-cache": "^11.
|
|
27
|
-
"zod": "^4.3.
|
|
28
|
-
"@revealui/contracts": "1.3.
|
|
29
|
-
"@revealui/core": "0.5.
|
|
30
|
-
"@revealui/db": "0.3.
|
|
26
|
+
"lru-cache": "^11.3.3",
|
|
27
|
+
"zod": "^4.3.6",
|
|
28
|
+
"@revealui/contracts": "1.3.7",
|
|
29
|
+
"@revealui/core": "0.5.6",
|
|
30
|
+
"@revealui/db": "0.3.7"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/react": "^16.3.2",
|
|
34
|
-
"@vitest/coverage-v8": "^4.
|
|
35
|
-
"jsdom": "
|
|
36
|
-
"react": "^19.2.
|
|
37
|
-
"react-dom": "^19.2.
|
|
34
|
+
"@vitest/coverage-v8": "^4.1.3",
|
|
35
|
+
"jsdom": "29.0.1",
|
|
36
|
+
"react": "^19.2.5",
|
|
37
|
+
"react-dom": "^19.2.5",
|
|
38
38
|
"typescript": "^6.0.2",
|
|
39
|
-
"vitest": "^4.
|
|
40
|
-
"dev": "0.0
|
|
39
|
+
"vitest": "^4.1.3",
|
|
40
|
+
"@revealui/dev": "0.1.0"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=24.13.0"
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"types": "./dist/llm/providers/base.d.ts",
|
|
100
100
|
"import": "./dist/llm/providers/base.js"
|
|
101
101
|
},
|
|
102
|
-
"./tools/
|
|
103
|
-
"types": "./dist/tools/
|
|
104
|
-
"import": "./dist/tools/
|
|
102
|
+
"./tools/admin": {
|
|
103
|
+
"types": "./dist/tools/admin/index.d.ts",
|
|
104
|
+
"import": "./dist/tools/admin/index.js"
|
|
105
105
|
},
|
|
106
106
|
"./tools/registry": {
|
|
107
107
|
"types": "./dist/tools/registry.d.ts",
|
|
@@ -160,6 +160,11 @@
|
|
|
160
160
|
},
|
|
161
161
|
"type": "module",
|
|
162
162
|
"types": "./dist/index.d.ts",
|
|
163
|
+
"homepage": "https://revealui.com",
|
|
164
|
+
"author": "RevealUI Studio <founder@revealui.com>",
|
|
165
|
+
"bugs": {
|
|
166
|
+
"url": "https://github.com/RevealUIStudio/revealui/issues"
|
|
167
|
+
},
|
|
163
168
|
"scripts": {
|
|
164
169
|
"build": "tsc",
|
|
165
170
|
"clean": "rm -rf dist",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cms-indexer.d.ts","sourceRoot":"","sources":["../../src/ingestion/cms-indexer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAoBD,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,kBAAkB,CAAS;gBAEvB,MAAM,EAAE,gBAAgB;IAMpC;;;OAGG;IACG,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CA8BhE"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BitNet Provider
|
|
3
|
-
*
|
|
4
|
-
* Local inference via BitNet's OpenAI-compatible llama-server (http://localhost:8080/v1).
|
|
5
|
-
* No API key required. Runs entirely on CPU (AVX2). Zero cost, fully offline.
|
|
6
|
-
*
|
|
7
|
-
* Setup: pnpm bitnet:install (clone + compile + download model)
|
|
8
|
-
* Start: pnpm bitnet:serve (start inference server on :8080)
|
|
9
|
-
*
|
|
10
|
-
* Note: BitNet is a generative model only. It does not expose /v1/embeddings.
|
|
11
|
-
* For vector search, use Ollama (nomic-embed-text) or @xenova/transformers.
|
|
12
|
-
*/
|
|
13
|
-
import type { Embedding, LLMChatOptions, LLMChunk, LLMEmbedOptions, LLMProvider, LLMProviderConfig, LLMResponse, LLMStreamOptions, Message } from './base.js';
|
|
14
|
-
export interface BitnetProviderConfig extends Omit<LLMProviderConfig, 'apiKey'> {
|
|
15
|
-
apiKey?: string;
|
|
16
|
-
/** Defaults to http://localhost:8080/v1 */
|
|
17
|
-
baseURL?: string;
|
|
18
|
-
/** Chat model. Defaults to bitnet-b1.58-2B-4T — installed by pnpm bitnet:install */
|
|
19
|
-
model?: string;
|
|
20
|
-
}
|
|
21
|
-
export declare class BitnetProvider implements LLMProvider {
|
|
22
|
-
private inner;
|
|
23
|
-
constructor(config: BitnetProviderConfig);
|
|
24
|
-
chat(messages: Message[], options?: LLMChatOptions): Promise<LLMResponse>;
|
|
25
|
-
stream(messages: Message[], options?: LLMStreamOptions): AsyncIterable<LLMChunk>;
|
|
26
|
-
embed(_text: string | string[], _options?: LLMEmbedOptions): Promise<Embedding | Embedding[]>;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=bitnet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bitnet.d.ts","sourceRoot":"","sources":["../../../src/llm/providers/bitnet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,QAAQ,EACR,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,OAAO,EACR,MAAM,WAAW,CAAC;AAGnB,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,cAAe,YAAW,WAAW;IAChD,OAAO,CAAC,KAAK,CAAuB;gBAExB,MAAM,EAAE,oBAAoB;IAUxC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC;IAIzE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,aAAa,CAAC,QAAQ,CAAC;IAIhF,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS,EAAE,CAAC;CAO9F"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BitNet Provider
|
|
3
|
-
*
|
|
4
|
-
* Local inference via BitNet's OpenAI-compatible llama-server (http://localhost:8080/v1).
|
|
5
|
-
* No API key required. Runs entirely on CPU (AVX2). Zero cost, fully offline.
|
|
6
|
-
*
|
|
7
|
-
* Setup: pnpm bitnet:install (clone + compile + download model)
|
|
8
|
-
* Start: pnpm bitnet:serve (start inference server on :8080)
|
|
9
|
-
*
|
|
10
|
-
* Note: BitNet is a generative model only. It does not expose /v1/embeddings.
|
|
11
|
-
* For vector search, use Ollama (nomic-embed-text) or @xenova/transformers.
|
|
12
|
-
*/
|
|
13
|
-
import { OpenAICompatProvider } from './openai-compat.js';
|
|
14
|
-
export class BitnetProvider {
|
|
15
|
-
inner;
|
|
16
|
-
constructor(config) {
|
|
17
|
-
this.inner = new OpenAICompatProvider({
|
|
18
|
-
...config,
|
|
19
|
-
// llama-server ignores the API key but the OpenAI client requires a non-empty value
|
|
20
|
-
apiKey: config.apiKey ?? 'bitnet',
|
|
21
|
-
baseURL: config.baseURL ?? 'http://localhost:8080/v1',
|
|
22
|
-
model: config.model ?? 'bitnet-b1.58-2B-4T',
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
chat(messages, options) {
|
|
26
|
-
return this.inner.chat(messages, options);
|
|
27
|
-
}
|
|
28
|
-
stream(messages, options) {
|
|
29
|
-
return this.inner.stream(messages, options);
|
|
30
|
-
}
|
|
31
|
-
embed(_text, _options) {
|
|
32
|
-
throw new Error('BitNet does not support embeddings. Set OLLAMA_BASE_URL to auto-wire Ollama ' +
|
|
33
|
-
'(nomic-embed-text) as the embed backend, or use @xenova/transformers for ' +
|
|
34
|
-
'fully offline embedding generation.');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collection-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/cms/collection-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,IAiCjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,IA2C/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,IAwB7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,IA+BhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,IAmChC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,IAwBhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/tools/cms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GG;AACH,eAAO,MAAM,aAAa,EAAE,IAwB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,IA+B9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/cms/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"media-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/cms/media-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,IAqC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,IAsB1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,IAyC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,IAuB7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,IAoC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/cms/user-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,IAoBhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,IAiC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,IAsC5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,IAsC5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,IAuB5B,CAAC"}
|