@dtoolkit/dbrain-client 0.1.0
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/LICENSE +21 -0
- package/dist/client.d.ts +109 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +152 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +123 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Iván Campillo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { HealthResponse, ConnectResponse, EntityRow, EntityWithFacts, FactRow, ConversationSummary, ConversationWithMessages, SearchResult, MemorySummaryRow, Document, DocumentListItem, PendingMessages, Message } from "./types.js";
|
|
2
|
+
export interface DBrainClientOptions {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
token: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class DBrainClient {
|
|
7
|
+
private readonly baseUrl;
|
|
8
|
+
private readonly token;
|
|
9
|
+
constructor(baseUrl: string, token: string);
|
|
10
|
+
constructor(options: DBrainClientOptions);
|
|
11
|
+
health(): Promise<HealthResponse>;
|
|
12
|
+
connect(): Promise<ConnectResponse>;
|
|
13
|
+
listEntities(filters?: {
|
|
14
|
+
category?: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
}): Promise<EntityRow[]>;
|
|
17
|
+
getEntity(id: string): Promise<EntityWithFacts>;
|
|
18
|
+
createEntity(entity: {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
category: string;
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
category: string;
|
|
29
|
+
}>;
|
|
30
|
+
archiveEntity(id: string): Promise<{
|
|
31
|
+
id: string;
|
|
32
|
+
status: string;
|
|
33
|
+
}>;
|
|
34
|
+
listFacts(entityId: string, filters?: {
|
|
35
|
+
tier?: string;
|
|
36
|
+
}): Promise<FactRow[]>;
|
|
37
|
+
addFact(entityId: string, fact: {
|
|
38
|
+
id: string;
|
|
39
|
+
fact: string;
|
|
40
|
+
category?: string;
|
|
41
|
+
timestamp?: string;
|
|
42
|
+
source?: string;
|
|
43
|
+
relatedEntities?: string[];
|
|
44
|
+
}): Promise<{
|
|
45
|
+
id: string;
|
|
46
|
+
entityId: string;
|
|
47
|
+
fact: string;
|
|
48
|
+
}>;
|
|
49
|
+
bumpFact(id: string): Promise<{
|
|
50
|
+
id: string;
|
|
51
|
+
bumped: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
search(query: string, options?: {
|
|
54
|
+
limit?: number;
|
|
55
|
+
entityId?: string;
|
|
56
|
+
tier?: string;
|
|
57
|
+
}): Promise<SearchResult[]>;
|
|
58
|
+
memorySummary(): Promise<MemorySummaryRow[]>;
|
|
59
|
+
listConversations(filters?: {
|
|
60
|
+
source?: string;
|
|
61
|
+
limit?: number;
|
|
62
|
+
}): Promise<ConversationSummary[]>;
|
|
63
|
+
getConversation(id: string): Promise<ConversationWithMessages>;
|
|
64
|
+
startConversation(source: string, id?: string): Promise<{
|
|
65
|
+
id: string;
|
|
66
|
+
source: string;
|
|
67
|
+
started_at: string;
|
|
68
|
+
}>;
|
|
69
|
+
sendMessages(conversationId: string, messages: Array<{
|
|
70
|
+
role: string;
|
|
71
|
+
content: string;
|
|
72
|
+
}>): Promise<Array<{
|
|
73
|
+
id: string;
|
|
74
|
+
role: string;
|
|
75
|
+
timestamp: string;
|
|
76
|
+
}>>;
|
|
77
|
+
listMessages(conversationId: string, filters?: {
|
|
78
|
+
since?: string;
|
|
79
|
+
processed?: boolean;
|
|
80
|
+
}): Promise<Message[]>;
|
|
81
|
+
pendingMessages(): Promise<PendingMessages>;
|
|
82
|
+
listDocuments(): Promise<DocumentListItem[]>;
|
|
83
|
+
getDocument(key: string): Promise<Document>;
|
|
84
|
+
putDocument(key: string, doc: {
|
|
85
|
+
title: string;
|
|
86
|
+
content: string;
|
|
87
|
+
}): Promise<{
|
|
88
|
+
key: string;
|
|
89
|
+
title: string;
|
|
90
|
+
updated_at: string;
|
|
91
|
+
}>;
|
|
92
|
+
deleteDocument(key: string): Promise<{
|
|
93
|
+
key: string;
|
|
94
|
+
deleted: boolean;
|
|
95
|
+
}>;
|
|
96
|
+
private request;
|
|
97
|
+
private get;
|
|
98
|
+
private post;
|
|
99
|
+
private put;
|
|
100
|
+
private patch;
|
|
101
|
+
private del;
|
|
102
|
+
}
|
|
103
|
+
export declare class DBrainError extends Error {
|
|
104
|
+
readonly status: number;
|
|
105
|
+
readonly body: string;
|
|
106
|
+
readonly path: string;
|
|
107
|
+
constructor(status: number, body: string, path: string);
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,OAAO,EACR,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;gBAC9B,OAAO,EAAE,mBAAmB;IAalC,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC;IAIjC,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC;IAMnC,YAAY,CAAC,OAAO,CAAC,EAAE;QAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAOlB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAI/C,YAAY,CAAC,MAAM,EAAE;QACzB,EAAE,EAAE,MAAM,CA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AAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GACtC,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAIxD,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;YAM/D,OAAO;IAsBrB,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,GAAG;CAGZ;AAED,qBAAa,WAAY,SAAQ,KAAK;aAElB,MAAM,EAAE,MAAM;aACd,IAAI,EAAE,MAAM;aACZ,IAAI,EAAE,MAAM;gBAFZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM;CAK/B"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
export class DBrainClient {
|
|
2
|
+
baseUrl;
|
|
3
|
+
token;
|
|
4
|
+
constructor(baseUrlOrOptions, token) {
|
|
5
|
+
if (typeof baseUrlOrOptions === "string") {
|
|
6
|
+
this.baseUrl = baseUrlOrOptions.replace(/\/$/, "");
|
|
7
|
+
this.token = token;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
this.baseUrl = baseUrlOrOptions.baseUrl.replace(/\/$/, "");
|
|
11
|
+
this.token = baseUrlOrOptions.token;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// --- Health ---
|
|
15
|
+
async health() {
|
|
16
|
+
return this.get("/health");
|
|
17
|
+
}
|
|
18
|
+
async connect() {
|
|
19
|
+
return this.get("/connect");
|
|
20
|
+
}
|
|
21
|
+
// --- Entities ---
|
|
22
|
+
async listEntities(filters) {
|
|
23
|
+
const params = new URLSearchParams();
|
|
24
|
+
if (filters?.category)
|
|
25
|
+
params.set("category", filters.category);
|
|
26
|
+
if (filters?.type)
|
|
27
|
+
params.set("type", filters.type);
|
|
28
|
+
return this.get(`/entities${qs(params)}`);
|
|
29
|
+
}
|
|
30
|
+
async getEntity(id) {
|
|
31
|
+
return this.get(`/entities/${enc(id)}`);
|
|
32
|
+
}
|
|
33
|
+
async createEntity(entity) {
|
|
34
|
+
return this.post("/entities", entity);
|
|
35
|
+
}
|
|
36
|
+
async archiveEntity(id) {
|
|
37
|
+
return this.del(`/entities/${enc(id)}`);
|
|
38
|
+
}
|
|
39
|
+
// --- Facts ---
|
|
40
|
+
async listFacts(entityId, filters) {
|
|
41
|
+
const params = new URLSearchParams();
|
|
42
|
+
if (filters?.tier)
|
|
43
|
+
params.set("tier", filters.tier);
|
|
44
|
+
return this.get(`/entities/${enc(entityId)}/facts${qs(params)}`);
|
|
45
|
+
}
|
|
46
|
+
async addFact(entityId, fact) {
|
|
47
|
+
return this.post(`/entities/${enc(entityId)}/facts`, fact);
|
|
48
|
+
}
|
|
49
|
+
async bumpFact(id) {
|
|
50
|
+
return this.patch(`/facts/${enc(id)}/access`);
|
|
51
|
+
}
|
|
52
|
+
// --- Search ---
|
|
53
|
+
async search(query, options) {
|
|
54
|
+
return this.post("/search", { query, ...options });
|
|
55
|
+
}
|
|
56
|
+
async memorySummary() {
|
|
57
|
+
return this.get("/memory/summary");
|
|
58
|
+
}
|
|
59
|
+
// --- Conversations ---
|
|
60
|
+
async listConversations(filters) {
|
|
61
|
+
const params = new URLSearchParams();
|
|
62
|
+
if (filters?.source)
|
|
63
|
+
params.set("source", filters.source);
|
|
64
|
+
if (filters?.limit)
|
|
65
|
+
params.set("limit", String(filters.limit));
|
|
66
|
+
return this.get(`/conversations${qs(params)}`);
|
|
67
|
+
}
|
|
68
|
+
async getConversation(id) {
|
|
69
|
+
return this.get(`/conversations/${enc(id)}`);
|
|
70
|
+
}
|
|
71
|
+
async startConversation(source, id) {
|
|
72
|
+
return this.post("/conversations", { source, ...(id ? { id } : {}) });
|
|
73
|
+
}
|
|
74
|
+
async sendMessages(conversationId, messages) {
|
|
75
|
+
return this.post(`/conversations/${enc(conversationId)}/messages`, messages.length === 1 ? messages[0] : messages);
|
|
76
|
+
}
|
|
77
|
+
async listMessages(conversationId, filters) {
|
|
78
|
+
const params = new URLSearchParams();
|
|
79
|
+
if (filters?.since)
|
|
80
|
+
params.set("since", filters.since);
|
|
81
|
+
if (filters?.processed !== undefined)
|
|
82
|
+
params.set("processed", String(filters.processed));
|
|
83
|
+
return this.get(`/conversations/${enc(conversationId)}/messages${qs(params)}`);
|
|
84
|
+
}
|
|
85
|
+
async pendingMessages() {
|
|
86
|
+
return this.get("/conversations/pending");
|
|
87
|
+
}
|
|
88
|
+
// --- Workspace (Documents) ---
|
|
89
|
+
async listDocuments() {
|
|
90
|
+
return this.get("/workspace");
|
|
91
|
+
}
|
|
92
|
+
async getDocument(key) {
|
|
93
|
+
return this.get(`/workspace/${enc(key)}`);
|
|
94
|
+
}
|
|
95
|
+
async putDocument(key, doc) {
|
|
96
|
+
return this.put(`/workspace/${enc(key)}`, doc);
|
|
97
|
+
}
|
|
98
|
+
async deleteDocument(key) {
|
|
99
|
+
return this.del(`/workspace/${enc(key)}`);
|
|
100
|
+
}
|
|
101
|
+
// --- HTTP helpers ---
|
|
102
|
+
async request(method, path, body) {
|
|
103
|
+
const res = await fetch(`${this.baseUrl}${path}`, {
|
|
104
|
+
method,
|
|
105
|
+
headers: {
|
|
106
|
+
Authorization: `Bearer ${this.token}`,
|
|
107
|
+
...(body !== undefined ? { "Content-Type": "application/json" } : {}),
|
|
108
|
+
},
|
|
109
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
110
|
+
});
|
|
111
|
+
if (!res.ok) {
|
|
112
|
+
const text = await res.text().catch(() => "");
|
|
113
|
+
throw new DBrainError(res.status, text, path);
|
|
114
|
+
}
|
|
115
|
+
return res.json();
|
|
116
|
+
}
|
|
117
|
+
get(path) {
|
|
118
|
+
return this.request("GET", path);
|
|
119
|
+
}
|
|
120
|
+
post(path, body) {
|
|
121
|
+
return this.request("POST", path, body);
|
|
122
|
+
}
|
|
123
|
+
put(path, body) {
|
|
124
|
+
return this.request("PUT", path, body);
|
|
125
|
+
}
|
|
126
|
+
patch(path, body) {
|
|
127
|
+
return this.request("PATCH", path, body);
|
|
128
|
+
}
|
|
129
|
+
del(path) {
|
|
130
|
+
return this.request("DELETE", path);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export class DBrainError extends Error {
|
|
134
|
+
status;
|
|
135
|
+
body;
|
|
136
|
+
path;
|
|
137
|
+
constructor(status, body, path) {
|
|
138
|
+
super(`dbrain ${status} on ${path}: ${body}`);
|
|
139
|
+
this.status = status;
|
|
140
|
+
this.body = body;
|
|
141
|
+
this.path = path;
|
|
142
|
+
this.name = "DBrainError";
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function enc(s) {
|
|
146
|
+
return encodeURIComponent(s);
|
|
147
|
+
}
|
|
148
|
+
function qs(params) {
|
|
149
|
+
const str = params.toString();
|
|
150
|
+
return str ? `?${str}` : "";
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAqBA,MAAM,OAAO,YAAY;IACN,OAAO,CAAS;IAChB,KAAK,CAAS;IAI/B,YAAY,gBAA8C,EAAE,KAAc;QACxE,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE,CAAC;YACzC,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,KAAK,GAAG,KAAM,CAAC;QACtB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EA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rainClient, DBrainError, type DBrainClientOptions } from "./client.js";
|
|
2
|
+
export type { HealthResponse, ConnectResponse, EntityRow, EntityWithFacts, FactRow, ConversationSummary, ConversationWithMessages, SearchResult, MemorySummaryRow, Document, DocumentListItem, PendingMessages, Message, } from "./types.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElF,YAAY,EACV,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,OAAO,GACR,MAAM,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAA4B,MAAM,aAAa,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export interface HealthResponse {
|
|
2
|
+
status: string;
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
entities: number;
|
|
6
|
+
facts: number;
|
|
7
|
+
documents: number;
|
|
8
|
+
conversations: number;
|
|
9
|
+
unprocessed: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ConnectResponse {
|
|
12
|
+
mcp: {
|
|
13
|
+
dbrain: {
|
|
14
|
+
type: string;
|
|
15
|
+
url: string;
|
|
16
|
+
headers: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
permissions: string[];
|
|
20
|
+
claudeMd: string;
|
|
21
|
+
}
|
|
22
|
+
export interface EntityRow {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
type: string;
|
|
26
|
+
category: string;
|
|
27
|
+
status: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
updated_at: string;
|
|
30
|
+
metadata: Record<string, unknown> | null;
|
|
31
|
+
}
|
|
32
|
+
export interface FactRow {
|
|
33
|
+
id: string;
|
|
34
|
+
entity_id: string;
|
|
35
|
+
fact: string;
|
|
36
|
+
category: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
status: string;
|
|
39
|
+
superseded_by: string | null;
|
|
40
|
+
related_entities: string[];
|
|
41
|
+
last_accessed: string;
|
|
42
|
+
access_count: number;
|
|
43
|
+
tier: string;
|
|
44
|
+
source: string | null;
|
|
45
|
+
}
|
|
46
|
+
export interface EntityWithFacts extends EntityRow {
|
|
47
|
+
facts: FactRow[];
|
|
48
|
+
}
|
|
49
|
+
export interface ConversationSummary {
|
|
50
|
+
id: string;
|
|
51
|
+
source: string;
|
|
52
|
+
started_at: string;
|
|
53
|
+
ended_at: string | null;
|
|
54
|
+
summary: string | null;
|
|
55
|
+
message_count: number;
|
|
56
|
+
}
|
|
57
|
+
export interface Message {
|
|
58
|
+
id: string;
|
|
59
|
+
role: string;
|
|
60
|
+
content: string;
|
|
61
|
+
timestamp: string;
|
|
62
|
+
processed: number;
|
|
63
|
+
}
|
|
64
|
+
export interface ConversationWithMessages {
|
|
65
|
+
id: string;
|
|
66
|
+
source: string;
|
|
67
|
+
started_at: string;
|
|
68
|
+
ended_at: string | null;
|
|
69
|
+
summary: string | null;
|
|
70
|
+
messages: Message[];
|
|
71
|
+
}
|
|
72
|
+
export interface SearchResult {
|
|
73
|
+
fact: {
|
|
74
|
+
id: string;
|
|
75
|
+
entityId: string;
|
|
76
|
+
fact: string;
|
|
77
|
+
category: string;
|
|
78
|
+
timestamp: string;
|
|
79
|
+
status: string;
|
|
80
|
+
lastAccessed: string;
|
|
81
|
+
accessCount: number;
|
|
82
|
+
tier: string;
|
|
83
|
+
source: string | null;
|
|
84
|
+
};
|
|
85
|
+
entity: {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
type: string;
|
|
89
|
+
category: string;
|
|
90
|
+
};
|
|
91
|
+
score: number;
|
|
92
|
+
}
|
|
93
|
+
export interface MemorySummaryRow {
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
type: string;
|
|
97
|
+
category: string;
|
|
98
|
+
hot: number;
|
|
99
|
+
warm: number;
|
|
100
|
+
cold: number;
|
|
101
|
+
total: number;
|
|
102
|
+
}
|
|
103
|
+
export interface Document {
|
|
104
|
+
key: string;
|
|
105
|
+
title: string;
|
|
106
|
+
content: string;
|
|
107
|
+
updated_at: string;
|
|
108
|
+
}
|
|
109
|
+
export interface DocumentListItem {
|
|
110
|
+
key: string;
|
|
111
|
+
title: string;
|
|
112
|
+
updated_at: string;
|
|
113
|
+
}
|
|
114
|
+
export interface PendingMessages {
|
|
115
|
+
total_unprocessed: number;
|
|
116
|
+
conversations: Array<{
|
|
117
|
+
id: string;
|
|
118
|
+
source: string;
|
|
119
|
+
started_at: string;
|
|
120
|
+
unprocessed: number;
|
|
121
|
+
}>;
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE;QACH,MAAM,EAAE;YACN,IAAI,EAAE,MAAM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f;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,KAAK,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;CACJ"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dtoolkit/dbrain-client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Typed HTTP client for dbrain",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Iván Campillo <ivncmp@gmail.com>",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/ivncmp/dtoolkit.git",
|
|
11
|
+
"directory": "packages/dbrain-client"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/ivncmp/dtoolkit/tree/main/packages/dbrain-client",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"ai",
|
|
31
|
+
"memory",
|
|
32
|
+
"dbrain",
|
|
33
|
+
"client",
|
|
34
|
+
"mcp",
|
|
35
|
+
"knowledge"
|
|
36
|
+
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@dtoolkit/core": "0.1.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^22.0.0",
|
|
42
|
+
"typescript": "^5.7.0"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc",
|
|
46
|
+
"lint": "eslint src/",
|
|
47
|
+
"lint:fix": "eslint src/ --fix"
|
|
48
|
+
}
|
|
49
|
+
}
|