@rizom/brain 0.2.0-alpha.122 → 0.2.0-alpha.124

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.
@@ -0,0 +1,74 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "c491af4c-c0c6-4011-9615-a0bcbc710e2d",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "runtime_state_records": {
8
+ "name": "runtime_state_records",
9
+ "columns": {
10
+ "namespace": {
11
+ "name": "namespace",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "key": {
18
+ "name": "key",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "value": {
25
+ "name": "value",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "created_at": {
32
+ "name": "created_at",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "updated_at": {
39
+ "name": "updated_at",
40
+ "type": "integer",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ }
45
+ },
46
+ "indexes": {
47
+ "idx_runtime_state_namespace_updated_at": {
48
+ "name": "idx_runtime_state_namespace_updated_at",
49
+ "columns": ["namespace", "updated_at"],
50
+ "isUnique": false
51
+ }
52
+ },
53
+ "foreignKeys": {},
54
+ "compositePrimaryKeys": {
55
+ "runtime_state_records_namespace_key_pk": {
56
+ "columns": ["namespace", "key"],
57
+ "name": "runtime_state_records_namespace_key_pk"
58
+ }
59
+ },
60
+ "uniqueConstraints": {},
61
+ "checkConstraints": {}
62
+ }
63
+ },
64
+ "views": {},
65
+ "enums": {},
66
+ "_meta": {
67
+ "schemas": {},
68
+ "tables": {},
69
+ "columns": {}
70
+ },
71
+ "internal": {
72
+ "indexes": {}
73
+ }
74
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "6",
8
+ "when": 1781628919983,
9
+ "tag": "0000_tidy_jackal",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
package/dist/plugins.d.ts CHANGED
@@ -253,6 +253,16 @@ type CreateInterceptionResult = {
253
253
  input: CreateInput;
254
254
  };
255
255
  type CreateInterceptor = (input: CreateInput, executionContext: CreateExecutionContext) => Promise<CreateInterceptionResult>;
256
+ interface UploadSaveInput {
257
+ upload: CreateFromUploadInput;
258
+ title?: string;
259
+ }
260
+ type UploadSaveHandler = (input: UploadSaveInput, executionContext: CreateExecutionContext) => Promise<CreateResult>;
261
+ interface UploadSaveHandlerRegistration {
262
+ entityType: string;
263
+ mediaTypes: string[];
264
+ handler: UploadSaveHandler;
265
+ }
256
266
  /**
257
267
  * Interface for entity adapter - handles conversion between entities and markdown
258
268
  * following the hybrid storage model
@@ -460,6 +470,8 @@ interface IEntitiesNamespace {
460
470
  registerDataSource(dataSource: DataSource): void;
461
471
  /** Register a create interceptor for this plugin's entity type */
462
472
  registerCreateInterceptor(entityType: string, interceptor: CreateInterceptor): void;
473
+ /** Register a raw-upload durable save handler for this plugin's entity type */
474
+ registerUploadSaveHandler(registration: UploadSaveHandlerRegistration): void;
463
475
  }
464
476
  interface EntityService extends ICoreEntityService {
465
477
  createEntity<T extends BaseEntity>(request: CreateEntityRequest<T>): Promise<EntityMutationResult>;
@@ -1233,7 +1245,7 @@ declare const AgentResponseSchema: z.ZodObject<{
1233
1245
  type AgentResponse = z.infer<typeof AgentResponseSchema>;
1234
1246
  interface AgentNamespace {
1235
1247
  chat(message: string, conversationId: string, context?: ChatContext): Promise<AgentResponse>;
1236
- confirmPendingAction(conversationId: string, confirmed: boolean, approvalId: string): Promise<AgentResponse>;
1248
+ confirmPendingAction(conversationId: string, confirmed: boolean, approvalId: string, context: ChatContext): Promise<AgentResponse>;
1237
1249
  invalidate(): void;
1238
1250
  }
1239
1251