@breign/db-schemas 0.1.43 → 0.1.45
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/types/agent-memory.d.ts +26 -0
- package/dist/types/agent-memory.js +2 -0
- package/dist/types/agent.d.ts +8 -0
- package/dist/types/app.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/speech-to-text.d.ts +4 -0
- package/dist/types/speech-to-text.js +2 -0
- package/package.json +1 -1
- package/src/types/agent-memory.ts +26 -0
- package/src/types/agent.ts +9 -0
- package/src/types/app.ts +3 -0
- package/src/types/index.ts +2 -0
- package/src/types/speech-to-text.ts +4 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Long-term agent memory — one row per virtual file under /memories/.
|
|
3
|
+
*
|
|
4
|
+
* Shared between brain-api (storage adapters + tool) and any other consumer.
|
|
5
|
+
* The path is a virtual filesystem key (e.g. '/memories/core.md'); identity
|
|
6
|
+
* (organisationId/agentId/userId) never comes from the path, always from the
|
|
7
|
+
* server-side chat context.
|
|
8
|
+
*/
|
|
9
|
+
export type AgentMemory = {
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* British spelling "organisationId" — aligned with Agent.organisationId
|
|
13
|
+
* (domain + Mongo storage). In PostgreSQL the COLUMN is organizationId ("z"),
|
|
14
|
+
* mapped inside the PG adapter (cf. agents-pg.adapter.ts).
|
|
15
|
+
*/
|
|
16
|
+
organisationId: string;
|
|
17
|
+
/** agentId (not brainId) — consistent with Chat.agentId and the rest of the code. */
|
|
18
|
+
agentId: string;
|
|
19
|
+
userId: string;
|
|
20
|
+
/** e.g. '/memories/core.md' — namespace validated tool-side, never by the model alone. */
|
|
21
|
+
path: string;
|
|
22
|
+
content: string;
|
|
23
|
+
/** Optimistic lock — incremented on every write (see "Concurrency" in the spec). */
|
|
24
|
+
version: number;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
};
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentModuleTypeUio, AgentTypeUio } from '@breign/client';
|
|
2
2
|
import { FlowNode } from './flow';
|
|
3
3
|
import { EngineOptions } from './engine';
|
|
4
|
+
import { SpeechToTextConfig } from './speech-to-text';
|
|
4
5
|
export type Agent = {
|
|
5
6
|
id: string;
|
|
6
7
|
name: string;
|
|
@@ -40,6 +41,13 @@ export type Agent = {
|
|
|
40
41
|
hideConversationsInHistory?: boolean;
|
|
41
42
|
maxToolSteps?: number;
|
|
42
43
|
contextualKnowledgeConversation?: ContextualKnowledgeConversationConfig;
|
|
44
|
+
memoryConfiguration?: AgentMemoryConfiguration;
|
|
45
|
+
speechToText?: SpeechToTextConfig;
|
|
46
|
+
};
|
|
47
|
+
export type AgentMemoryConfiguration = {
|
|
48
|
+
userMemoryEnabled?: boolean;
|
|
49
|
+
agentMemoryEnabled?: boolean;
|
|
50
|
+
organizationMemoryEnabled?: boolean;
|
|
43
51
|
};
|
|
44
52
|
export type ContextualKnowledgeConversationBackend = 'weaviate' | 'qdrant' | 'colpali';
|
|
45
53
|
export type ContextualKnowledgeConversationConfig = {
|
package/dist/types/app.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SpeechToTextConfig } from './speech-to-text';
|
|
1
2
|
export type AppStatus = 'IDLE' | 'BUSY';
|
|
2
3
|
export type AppConfiguration = {
|
|
3
4
|
date: string;
|
|
@@ -57,6 +58,7 @@ export type App = {
|
|
|
57
58
|
voiceId: string;
|
|
58
59
|
type: string;
|
|
59
60
|
voiceModelId: string;
|
|
61
|
+
speechToText?: SpeechToTextConfig;
|
|
60
62
|
voice?: Record<string, string | number>;
|
|
61
63
|
lipsync?: AppLipsync;
|
|
62
64
|
status: AppStatus;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './agent';
|
|
2
|
+
export * from './agent-memory';
|
|
2
3
|
export * from './app';
|
|
3
4
|
export * from './flow';
|
|
4
5
|
export * from './flow-editor';
|
|
@@ -15,3 +16,4 @@ export * from './tool';
|
|
|
15
16
|
export * from './skill';
|
|
16
17
|
export * from './scheduled-task';
|
|
17
18
|
export * from './scheduled-task-run';
|
|
19
|
+
export * from './speech-to-text';
|
package/dist/types/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./agent"), exports);
|
|
18
|
+
__exportStar(require("./agent-memory"), exports);
|
|
18
19
|
__exportStar(require("./app"), exports);
|
|
19
20
|
__exportStar(require("./flow"), exports);
|
|
20
21
|
__exportStar(require("./flow-editor"), exports);
|
|
@@ -31,3 +32,4 @@ __exportStar(require("./tool"), exports);
|
|
|
31
32
|
__exportStar(require("./skill"), exports);
|
|
32
33
|
__exportStar(require("./scheduled-task"), exports);
|
|
33
34
|
__exportStar(require("./scheduled-task-run"), exports);
|
|
35
|
+
__exportStar(require("./speech-to-text"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Long-term agent memory — one row per virtual file under /memories/.
|
|
3
|
+
*
|
|
4
|
+
* Shared between brain-api (storage adapters + tool) and any other consumer.
|
|
5
|
+
* The path is a virtual filesystem key (e.g. '/memories/core.md'); identity
|
|
6
|
+
* (organisationId/agentId/userId) never comes from the path, always from the
|
|
7
|
+
* server-side chat context.
|
|
8
|
+
*/
|
|
9
|
+
export type AgentMemory = {
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* British spelling "organisationId" — aligned with Agent.organisationId
|
|
13
|
+
* (domain + Mongo storage). In PostgreSQL the COLUMN is organizationId ("z"),
|
|
14
|
+
* mapped inside the PG adapter (cf. agents-pg.adapter.ts).
|
|
15
|
+
*/
|
|
16
|
+
organisationId: string;
|
|
17
|
+
/** agentId (not brainId) — consistent with Chat.agentId and the rest of the code. */
|
|
18
|
+
agentId: string;
|
|
19
|
+
userId: string;
|
|
20
|
+
/** e.g. '/memories/core.md' — namespace validated tool-side, never by the model alone. */
|
|
21
|
+
path: string;
|
|
22
|
+
content: string;
|
|
23
|
+
/** Optimistic lock — incremented on every write (see "Concurrency" in the spec). */
|
|
24
|
+
version: number;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
};
|
package/src/types/agent.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentModuleTypeUio, AgentTypeUio } from '@breign/client';
|
|
2
2
|
import { FlowNode } from './flow';
|
|
3
3
|
import { EngineOptions } from './engine';
|
|
4
|
+
import { SpeechToTextConfig } from './speech-to-text';
|
|
4
5
|
|
|
5
6
|
export type Agent = {
|
|
6
7
|
id: string;
|
|
@@ -36,6 +37,14 @@ export type Agent = {
|
|
|
36
37
|
hideConversationsInHistory?: boolean;
|
|
37
38
|
maxToolSteps?: number;
|
|
38
39
|
contextualKnowledgeConversation?: ContextualKnowledgeConversationConfig;
|
|
40
|
+
memoryConfiguration?: AgentMemoryConfiguration;
|
|
41
|
+
speechToText?: SpeechToTextConfig;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type AgentMemoryConfiguration = {
|
|
45
|
+
userMemoryEnabled?: boolean;
|
|
46
|
+
agentMemoryEnabled?: boolean;
|
|
47
|
+
organizationMemoryEnabled?: boolean;
|
|
39
48
|
};
|
|
40
49
|
|
|
41
50
|
export type ContextualKnowledgeConversationBackend = 'weaviate' | 'qdrant' | 'colpali';
|
package/src/types/app.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SpeechToTextConfig } from './speech-to-text';
|
|
2
|
+
|
|
1
3
|
export type AppStatus = 'IDLE' | 'BUSY';
|
|
2
4
|
|
|
3
5
|
export type AppConfiguration = { date: string } & Record<string, unknown>;
|
|
@@ -61,6 +63,7 @@ export type App = {
|
|
|
61
63
|
voiceId: string;
|
|
62
64
|
type: string;
|
|
63
65
|
voiceModelId: string;
|
|
66
|
+
speechToText?: SpeechToTextConfig;
|
|
64
67
|
voice?: Record<string, string | number>;
|
|
65
68
|
lipsync?: AppLipsync;
|
|
66
69
|
status: AppStatus;
|
package/src/types/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './agent';
|
|
2
|
+
export * from './agent-memory';
|
|
2
3
|
export * from './app';
|
|
3
4
|
export * from './flow';
|
|
4
5
|
export * from './flow-editor';
|
|
@@ -15,3 +16,4 @@ export * from './tool';
|
|
|
15
16
|
export * from './skill';
|
|
16
17
|
export * from './scheduled-task';
|
|
17
18
|
export * from './scheduled-task-run';
|
|
19
|
+
export * from './speech-to-text';
|