@breign/db-schemas 0.1.51 → 0.1.52
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.d.ts +12 -0
- package/dist/types/conversation.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/workspace-file.d.ts +39 -0
- package/dist/types/workspace-file.js +2 -0
- package/package.json +1 -1
- package/src/types/agent.ts +14 -0
- package/src/types/conversation.ts +1 -0
- package/src/types/index.ts +1 -0
- package/src/types/workspace-file.ts +43 -0
package/dist/types/agent.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export type Agent = {
|
|
|
39
39
|
maxToolSteps?: number;
|
|
40
40
|
contextualKnowledgeConversation?: ContextualKnowledgeConversationConfig;
|
|
41
41
|
memoryConfiguration?: AgentMemoryConfiguration;
|
|
42
|
+
sandboxConfiguration?: AgentSandboxConfiguration;
|
|
42
43
|
speechToText?: SpeechToTextConfig;
|
|
43
44
|
};
|
|
44
45
|
export type AgentMemoryConfiguration = {
|
|
@@ -46,6 +47,17 @@ export type AgentMemoryConfiguration = {
|
|
|
46
47
|
agentMemoryEnabled?: boolean;
|
|
47
48
|
organizationMemoryEnabled?: boolean;
|
|
48
49
|
};
|
|
50
|
+
export type AgentSandboxNetworkConfiguration = {
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
allowedUrlPrefixes?: string[];
|
|
53
|
+
allowedMethods?: ('GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS')[];
|
|
54
|
+
};
|
|
55
|
+
export type AgentSandboxConfiguration = {
|
|
56
|
+
enabled?: boolean;
|
|
57
|
+
pythonEnabled?: boolean;
|
|
58
|
+
network?: AgentSandboxNetworkConfiguration;
|
|
59
|
+
workspaceScope?: 'conversation' | 'agentUser';
|
|
60
|
+
};
|
|
49
61
|
export type ContextualKnowledgeConversationBackend = 'weaviate' | 'qdrant' | 'colpali';
|
|
50
62
|
export type ContextualKnowledgeConversationConfig = {
|
|
51
63
|
enabled: boolean;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent agent workspace — one row per virtual file under /home/user/.
|
|
3
|
+
*
|
|
4
|
+
* Shared between brain-api (storage adapters + Bash_exec sandbox) and any other
|
|
5
|
+
* consumer. The path is a virtual filesystem key (e.g. '/home/user/rapport.md');
|
|
6
|
+
* identity (organisationId / conversationId / agentId / userId) never comes from
|
|
7
|
+
* the path, always from the server-side chat context.
|
|
8
|
+
*
|
|
9
|
+
* Content is UTF-8 text only: it is stored in a `text` column, which cannot hold
|
|
10
|
+
* a NUL byte. The invariant is enforced at write time inside the sandbox
|
|
11
|
+
* filesystem, not here.
|
|
12
|
+
*/
|
|
13
|
+
export type WorkspaceFile = {
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* British spelling "organisationId" — aligned with Agent.organisationId
|
|
17
|
+
* (domain + Mongo storage). In PostgreSQL the COLUMN is organizationId ("z"),
|
|
18
|
+
* mapped inside the PG adapter (cf. agents-pg.adapter.ts).
|
|
19
|
+
*/
|
|
20
|
+
organisationId: string;
|
|
21
|
+
/** Set for the 'conversation' scope (phase 1). Mutually exclusive with agentId/userId. */
|
|
22
|
+
conversationId?: string;
|
|
23
|
+
/** Set for the 'agentUser' scope. Mutually exclusive with conversationId. */
|
|
24
|
+
agentId?: string;
|
|
25
|
+
/** Set for the 'agentUser' scope. Mutually exclusive with conversationId. */
|
|
26
|
+
userId?: string;
|
|
27
|
+
/** e.g. '/home/user/rapport.md' — validated server-side, never by the model alone. */
|
|
28
|
+
path: string;
|
|
29
|
+
content: string;
|
|
30
|
+
/** utf8 byte length — avoids a length() on every listing. */
|
|
31
|
+
size: number;
|
|
32
|
+
mimeType: string;
|
|
33
|
+
/** Optimistic lock — incremented on every write. Also used as the canvas ETag. */
|
|
34
|
+
version: number;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
};
|
|
38
|
+
/** Listing entry: never carries the content. */
|
|
39
|
+
export type WorkspaceFileEntry = Pick<WorkspaceFile, 'path' | 'size' | 'mimeType' | 'version' | 'updatedAt'>;
|
package/package.json
CHANGED
package/src/types/agent.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type Agent = {
|
|
|
34
34
|
maxToolSteps?: number;
|
|
35
35
|
contextualKnowledgeConversation?: ContextualKnowledgeConversationConfig;
|
|
36
36
|
memoryConfiguration?: AgentMemoryConfiguration;
|
|
37
|
+
sandboxConfiguration?: AgentSandboxConfiguration;
|
|
37
38
|
speechToText?: SpeechToTextConfig;
|
|
38
39
|
};
|
|
39
40
|
|
|
@@ -43,6 +44,19 @@ export type AgentMemoryConfiguration = {
|
|
|
43
44
|
organizationMemoryEnabled?: boolean;
|
|
44
45
|
};
|
|
45
46
|
|
|
47
|
+
export type AgentSandboxNetworkConfiguration = {
|
|
48
|
+
enabled?: boolean;
|
|
49
|
+
allowedUrlPrefixes?: string[];
|
|
50
|
+
allowedMethods?: ('GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS')[];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type AgentSandboxConfiguration = {
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
pythonEnabled?: boolean;
|
|
56
|
+
network?: AgentSandboxNetworkConfiguration;
|
|
57
|
+
workspaceScope?: 'conversation' | 'agentUser';
|
|
58
|
+
};
|
|
59
|
+
|
|
46
60
|
export type ContextualKnowledgeConversationBackend = 'weaviate' | 'qdrant' | 'colpali';
|
|
47
61
|
|
|
48
62
|
export type ContextualKnowledgeConversationConfig = {
|
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent agent workspace — one row per virtual file under /home/user/.
|
|
3
|
+
*
|
|
4
|
+
* Shared between brain-api (storage adapters + Bash_exec sandbox) and any other
|
|
5
|
+
* consumer. The path is a virtual filesystem key (e.g. '/home/user/rapport.md');
|
|
6
|
+
* identity (organisationId / conversationId / agentId / userId) never comes from
|
|
7
|
+
* the path, always from the server-side chat context.
|
|
8
|
+
*
|
|
9
|
+
* Content is UTF-8 text only: it is stored in a `text` column, which cannot hold
|
|
10
|
+
* a NUL byte. The invariant is enforced at write time inside the sandbox
|
|
11
|
+
* filesystem, not here.
|
|
12
|
+
*/
|
|
13
|
+
export type WorkspaceFile = {
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* British spelling "organisationId" — aligned with Agent.organisationId
|
|
17
|
+
* (domain + Mongo storage). In PostgreSQL the COLUMN is organizationId ("z"),
|
|
18
|
+
* mapped inside the PG adapter (cf. agents-pg.adapter.ts).
|
|
19
|
+
*/
|
|
20
|
+
organisationId: string;
|
|
21
|
+
/** Set for the 'conversation' scope (phase 1). Mutually exclusive with agentId/userId. */
|
|
22
|
+
conversationId?: string;
|
|
23
|
+
/** Set for the 'agentUser' scope. Mutually exclusive with conversationId. */
|
|
24
|
+
agentId?: string;
|
|
25
|
+
/** Set for the 'agentUser' scope. Mutually exclusive with conversationId. */
|
|
26
|
+
userId?: string;
|
|
27
|
+
/** e.g. '/home/user/rapport.md' — validated server-side, never by the model alone. */
|
|
28
|
+
path: string;
|
|
29
|
+
content: string;
|
|
30
|
+
/** utf8 byte length — avoids a length() on every listing. */
|
|
31
|
+
size: number;
|
|
32
|
+
mimeType: string;
|
|
33
|
+
/** Optimistic lock — incremented on every write. Also used as the canvas ETag. */
|
|
34
|
+
version: number;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Listing entry: never carries the content. */
|
|
40
|
+
export type WorkspaceFileEntry = Pick<
|
|
41
|
+
WorkspaceFile,
|
|
42
|
+
'path' | 'size' | 'mimeType' | 'version' | 'updatedAt'
|
|
43
|
+
>;
|