@synap-core/api-types 1.6.1 → 1.6.2
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/generated.d.ts +343 -35
- package/package.json +1 -1
- package/src/generated.d.ts +184 -4
package/dist/generated.d.ts
CHANGED
|
@@ -2,8 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import { Column, SQL } from 'drizzle-orm';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Context Types
|
|
7
|
+
*
|
|
8
|
+
* Proper type definitions for tRPC context to avoid `any` types.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Database client type
|
|
12
|
+
*
|
|
13
|
+
* Note: Using `any` here to preserve Drizzle's schema inference.
|
|
14
|
+
* Attempting to use PostgresJsDatabase<any> loses the schema generic
|
|
15
|
+
* and breaks db.query.tableName access patterns.
|
|
16
|
+
*/
|
|
17
|
+
export type DatabaseClient = any;
|
|
18
|
+
/**
|
|
19
|
+
* Ory Kratos identity
|
|
20
|
+
*/
|
|
21
|
+
export interface KratosIdentity {
|
|
7
22
|
id: string;
|
|
8
23
|
traits: {
|
|
9
24
|
email: string;
|
|
@@ -11,18 +26,27 @@ interface KratosIdentity {
|
|
|
11
26
|
[key: string]: unknown;
|
|
12
27
|
};
|
|
13
28
|
}
|
|
14
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Ory Kratos session
|
|
31
|
+
*/
|
|
32
|
+
export interface KratosSession {
|
|
15
33
|
identity: KratosIdentity;
|
|
16
34
|
active: boolean;
|
|
17
35
|
expires_at?: string;
|
|
18
36
|
authenticated_at?: string;
|
|
19
37
|
}
|
|
20
|
-
|
|
38
|
+
/**
|
|
39
|
+
* User object (simplified from Kratos identity)
|
|
40
|
+
*/
|
|
41
|
+
export interface User {
|
|
21
42
|
id: string;
|
|
22
43
|
email: string;
|
|
23
44
|
name?: string;
|
|
24
45
|
}
|
|
25
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Full tRPC context
|
|
48
|
+
*/
|
|
49
|
+
export interface Context {
|
|
26
50
|
db: DatabaseClient;
|
|
27
51
|
authenticated: boolean;
|
|
28
52
|
userId?: string | null;
|
|
@@ -33,7 +57,15 @@ interface Context {
|
|
|
33
57
|
workspaceId?: string | null;
|
|
34
58
|
workspaceRole?: string | null;
|
|
35
59
|
}
|
|
36
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Users Table - Cache for Kratos Identity Data
|
|
62
|
+
*
|
|
63
|
+
* Purpose: Store Kratos identity data in Synap DB for performance
|
|
64
|
+
* - Allows JOINs without calling Kratos API
|
|
65
|
+
* - Can add Synap-specific fields (avatar, timezone)
|
|
66
|
+
* - Kratos remains source of truth for authentication
|
|
67
|
+
*/
|
|
68
|
+
export interface AgentMetadata {
|
|
37
69
|
agentType: string;
|
|
38
70
|
description?: string;
|
|
39
71
|
createdByUserId: string;
|
|
@@ -387,7 +419,7 @@ declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
387
419
|
};
|
|
388
420
|
dialect: "pg";
|
|
389
421
|
}>;
|
|
390
|
-
type ChatThread = typeof chatThreads.$inferSelect;
|
|
422
|
+
export type ChatThread = typeof chatThreads.$inferSelect;
|
|
391
423
|
declare enum ThreadEntityRelationshipType {
|
|
392
424
|
USED_AS_CONTEXT = "used_as_context",
|
|
393
425
|
CREATED = "created",
|
|
@@ -412,25 +444,33 @@ declare enum ThreadDocumentConflictStatus {
|
|
|
412
444
|
PENDING = "pending",
|
|
413
445
|
RESOLVED = "resolved"
|
|
414
446
|
}
|
|
415
|
-
interface DerivedInput {
|
|
447
|
+
export interface DerivedInput {
|
|
416
448
|
name: string;
|
|
417
449
|
label?: string;
|
|
418
450
|
type?: string;
|
|
419
451
|
options?: string[];
|
|
420
452
|
default?: string;
|
|
421
453
|
}
|
|
422
|
-
interface InputOverride {
|
|
454
|
+
export interface InputOverride {
|
|
423
455
|
label?: string;
|
|
424
456
|
default?: string;
|
|
425
457
|
options?: string[];
|
|
426
458
|
}
|
|
427
|
-
|
|
459
|
+
/**
|
|
460
|
+
* Workspaces Schema - Multi-user workspace support
|
|
461
|
+
*
|
|
462
|
+
* A workspace can be:
|
|
463
|
+
* - Personal (single user)
|
|
464
|
+
* - Team (multiple users with roles)
|
|
465
|
+
* - Enterprise (advanced features)
|
|
466
|
+
*/
|
|
467
|
+
export interface WorkspaceLayoutConfig {
|
|
428
468
|
pinnedApps?: string[];
|
|
429
469
|
sidebarApps?: string[];
|
|
430
470
|
defaultView?: string;
|
|
431
471
|
theme?: string;
|
|
432
472
|
}
|
|
433
|
-
interface WorkspaceSettings {
|
|
473
|
+
export interface WorkspaceSettings {
|
|
434
474
|
defaultEntityTypes?: string[];
|
|
435
475
|
theme?: string;
|
|
436
476
|
aiEnabled?: boolean;
|
|
@@ -671,7 +711,7 @@ declare const messageLinks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
671
711
|
};
|
|
672
712
|
dialect: "pg";
|
|
673
713
|
}>;
|
|
674
|
-
type MessageLink = typeof messageLinks.$inferSelect;
|
|
714
|
+
export type MessageLink = typeof messageLinks.$inferSelect;
|
|
675
715
|
declare enum PropertyValueType {
|
|
676
716
|
STRING = "string",
|
|
677
717
|
NUMBER = "number",
|
|
@@ -820,13 +860,19 @@ declare const propertyDefs: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
820
860
|
};
|
|
821
861
|
dialect: "pg";
|
|
822
862
|
}>;
|
|
823
|
-
type PropertyDef = typeof propertyDefs.$inferSelect;
|
|
863
|
+
export type PropertyDef = typeof propertyDefs.$inferSelect;
|
|
824
864
|
declare enum ProfileScope {
|
|
825
865
|
SYSTEM = "system",// Available to all users
|
|
826
866
|
WORKSPACE = "workspace",// Shared within workspace
|
|
827
867
|
USER = "user"
|
|
828
868
|
}
|
|
829
|
-
|
|
869
|
+
/**
|
|
870
|
+
* EventRecord - Database representation of an event
|
|
871
|
+
*
|
|
872
|
+
* This is the format returned from the database.
|
|
873
|
+
* It maps directly to the events table structure.
|
|
874
|
+
*/
|
|
875
|
+
export interface EventRecord {
|
|
830
876
|
id: string;
|
|
831
877
|
timestamp: Date;
|
|
832
878
|
subjectId: string;
|
|
@@ -840,7 +886,8 @@ interface EventRecord {
|
|
|
840
886
|
correlationId?: string;
|
|
841
887
|
source: string;
|
|
842
888
|
}
|
|
843
|
-
|
|
889
|
+
/** Minimal message fields for list/preview */
|
|
890
|
+
export interface LinkedMessagePreview {
|
|
844
891
|
id: string;
|
|
845
892
|
threadId: string;
|
|
846
893
|
role: string;
|
|
@@ -848,16 +895,19 @@ interface LinkedMessagePreview {
|
|
|
848
895
|
timestamp: Date;
|
|
849
896
|
userId: string;
|
|
850
897
|
}
|
|
851
|
-
interface LinkedMessageItem {
|
|
898
|
+
export interface LinkedMessageItem {
|
|
852
899
|
link: MessageLink;
|
|
853
900
|
message: LinkedMessagePreview;
|
|
854
901
|
}
|
|
855
|
-
interface EffectiveProperty extends PropertyDef {
|
|
902
|
+
export interface EffectiveProperty extends PropertyDef {
|
|
856
903
|
required: boolean;
|
|
857
904
|
defaultValue: unknown;
|
|
858
905
|
displayOrder: number;
|
|
859
906
|
}
|
|
860
|
-
|
|
907
|
+
/**
|
|
908
|
+
* Column definition for views
|
|
909
|
+
*/
|
|
910
|
+
export interface ViewColumn {
|
|
861
911
|
id: string;
|
|
862
912
|
field: string;
|
|
863
913
|
title?: string;
|
|
@@ -866,17 +916,38 @@ interface ViewColumn {
|
|
|
866
916
|
visible?: boolean;
|
|
867
917
|
width?: number;
|
|
868
918
|
}
|
|
869
|
-
|
|
870
|
-
|
|
919
|
+
/**
|
|
920
|
+
* View Query Types
|
|
921
|
+
*
|
|
922
|
+
* Single source of truth for all view query and filter types.
|
|
923
|
+
*/
|
|
924
|
+
/**
|
|
925
|
+
* Filter operator types
|
|
926
|
+
*/
|
|
927
|
+
export type FilterOperator = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "is_empty" | "is_not_empty" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal";
|
|
928
|
+
/**
|
|
929
|
+
* Filter definition for entity queries
|
|
930
|
+
*/
|
|
931
|
+
export interface EntityFilter {
|
|
871
932
|
field: string;
|
|
872
933
|
operator: FilterOperator;
|
|
873
934
|
value?: unknown;
|
|
874
935
|
}
|
|
875
|
-
|
|
936
|
+
/**
|
|
937
|
+
* Sort rule for entity queries
|
|
938
|
+
*/
|
|
939
|
+
export interface SortRule {
|
|
876
940
|
field: string;
|
|
877
941
|
direction: "asc" | "desc";
|
|
878
942
|
}
|
|
879
|
-
|
|
943
|
+
/**
|
|
944
|
+
* Query definition for structured views
|
|
945
|
+
* Defines which entities to show and how to filter them
|
|
946
|
+
*
|
|
947
|
+
* NOTE: profileIds/profileSlugs are now stored in views.scopeProfileIds
|
|
948
|
+
* This query structure only contains filters, sorts, search, pagination, and groupBy
|
|
949
|
+
*/
|
|
950
|
+
export interface EntityQuery {
|
|
880
951
|
/** @deprecated - Profile IDs now stored in views.scopeProfileIds */
|
|
881
952
|
profileIds?: string[];
|
|
882
953
|
/** @deprecated - Profile slugs now stored in views.scopeProfileIds (resolved to IDs) */
|
|
@@ -907,7 +978,10 @@ declare enum AgentType {
|
|
|
907
978
|
WRITING = "writing",
|
|
908
979
|
ACTION = "action"
|
|
909
980
|
}
|
|
910
|
-
|
|
981
|
+
/**
|
|
982
|
+
* Agent type as string literal union (for flexibility)
|
|
983
|
+
*/
|
|
984
|
+
export type AgentTypeString = `${AgentType}` | (string & {});
|
|
911
985
|
declare enum AIStepType {
|
|
912
986
|
THINKING = "thinking",
|
|
913
987
|
TOOL_CALL = "tool_call",
|
|
@@ -915,7 +989,17 @@ declare enum AIStepType {
|
|
|
915
989
|
DECISION = "decision",
|
|
916
990
|
ERROR = "error"
|
|
917
991
|
}
|
|
918
|
-
|
|
992
|
+
/**
|
|
993
|
+
* AI step - shows what the AI is doing
|
|
994
|
+
*
|
|
995
|
+
* Represents any step in the AI's reasoning/execution process:
|
|
996
|
+
* - thinking: General analysis and reasoning
|
|
997
|
+
* - tool_call: When AI calls a tool
|
|
998
|
+
* - tool_result: Result from tool execution
|
|
999
|
+
* - decision: AI making a decision
|
|
1000
|
+
* - error: Error during processing
|
|
1001
|
+
*/
|
|
1002
|
+
export interface AIStep {
|
|
919
1003
|
id: string;
|
|
920
1004
|
type: AIStepType | string;
|
|
921
1005
|
content: string;
|
|
@@ -929,7 +1013,10 @@ interface AIStep {
|
|
|
929
1013
|
description?: string;
|
|
930
1014
|
status?: "pending" | "running" | "complete" | "error";
|
|
931
1015
|
}
|
|
932
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* Branch decision from meta-agent
|
|
1018
|
+
*/
|
|
1019
|
+
export interface BranchDecision {
|
|
933
1020
|
shouldBranch: boolean;
|
|
934
1021
|
reason: string;
|
|
935
1022
|
suggestedAgentType?: AgentTypeString;
|
|
@@ -969,7 +1056,35 @@ declare enum MessageLinkRelationshipType {
|
|
|
969
1056
|
QUOTES = "quotes",// Message quotes this object
|
|
970
1057
|
CONTEXT = "context"
|
|
971
1058
|
}
|
|
972
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* @synap/events - Schema-Driven Event Generator
|
|
1061
|
+
*
|
|
1062
|
+
* This module generates event types and payload schemas from Drizzle database tables.
|
|
1063
|
+
*
|
|
1064
|
+
* V2.0 CONSOLIDATED PATTERN: {table}.{action}.{modifier}
|
|
1065
|
+
*
|
|
1066
|
+
* Actions: create | update | delete
|
|
1067
|
+
* Modifiers: requested | validated
|
|
1068
|
+
*
|
|
1069
|
+
* Examples:
|
|
1070
|
+
* entities.create.requested ← Intent submitted (by user or AI)
|
|
1071
|
+
* entities.create.validated ← Change confirmed and applied
|
|
1072
|
+
* entities.update.requested ← Update intent
|
|
1073
|
+
* entities.update.validated ← Update confirmed
|
|
1074
|
+
*
|
|
1075
|
+
* No direct actions (e.g., entities.create) - all changes go through requested→validated flow.
|
|
1076
|
+
*/
|
|
1077
|
+
/**
|
|
1078
|
+
* Standard CRUD actions with modifiers for table events
|
|
1079
|
+
*
|
|
1080
|
+
* V2.1: Added 'approved' modifier for 3-phase flow
|
|
1081
|
+
*
|
|
1082
|
+
* Flow:
|
|
1083
|
+
* 1. requested: Intent (user/AI wants to do something)
|
|
1084
|
+
* 2. approved: Validated (permissions checked, user approved if needed)
|
|
1085
|
+
* 3. validated: Completed (DB operation done, entity exists)
|
|
1086
|
+
*/
|
|
1087
|
+
export type TableAction = "create.requested" | "create.approved" | "create.validated" | "update.requested" | "update.approved" | "update.validated" | "delete.requested" | "delete.approved" | "delete.validated";
|
|
973
1088
|
declare const CORE_TABLES: readonly [
|
|
974
1089
|
"entities",
|
|
975
1090
|
"documents",
|
|
@@ -985,9 +1100,22 @@ declare const CORE_TABLES: readonly [
|
|
|
985
1100
|
"views",
|
|
986
1101
|
"userPreferences"
|
|
987
1102
|
];
|
|
988
|
-
type CoreTable = (typeof CORE_TABLES)[number];
|
|
989
|
-
|
|
990
|
-
|
|
1103
|
+
export type CoreTable = (typeof CORE_TABLES)[number];
|
|
1104
|
+
/**
|
|
1105
|
+
* Flat list of all generated event types (for type checking)
|
|
1106
|
+
*
|
|
1107
|
+
* V2.1: Added .approved phase for 3-phase flow
|
|
1108
|
+
*/
|
|
1109
|
+
export type GeneratedEventType = `${CoreTable}.create.requested` | `${CoreTable}.create.approved` | `${CoreTable}.create.validated` | `${CoreTable}.update.requested` | `${CoreTable}.update.approved` | `${CoreTable}.update.validated` | `${CoreTable}.delete.requested` | `${CoreTable}.delete.approved` | `${CoreTable}.delete.validated`;
|
|
1110
|
+
/**
|
|
1111
|
+
* Worker Registry - Static worker metadata for Admin UI
|
|
1112
|
+
*
|
|
1113
|
+
* V2.0: Simplified registry with only active workers
|
|
1114
|
+
*
|
|
1115
|
+
* Pattern: Table workers handle {table}.{crud}.requested events
|
|
1116
|
+
* and emit {table}.{crud}.completed events.
|
|
1117
|
+
*/
|
|
1118
|
+
export interface WorkerMetadata {
|
|
991
1119
|
id: string;
|
|
992
1120
|
name: string;
|
|
993
1121
|
description: string;
|
|
@@ -3243,7 +3371,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3243
3371
|
errorMessage: string | null;
|
|
3244
3372
|
startedAt: Date;
|
|
3245
3373
|
threadId: string;
|
|
3246
|
-
status: "completed" | "
|
|
3374
|
+
status: "completed" | "running" | "failed";
|
|
3247
3375
|
commandId: string;
|
|
3248
3376
|
permissionsSnapshot: Record<string, unknown> | null;
|
|
3249
3377
|
inputs: Record<string, unknown> | null;
|
|
@@ -3269,7 +3397,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3269
3397
|
errorMessage: string | null;
|
|
3270
3398
|
startedAt: Date;
|
|
3271
3399
|
threadId: string;
|
|
3272
|
-
status: "completed" | "
|
|
3400
|
+
status: "completed" | "running" | "failed";
|
|
3273
3401
|
commandId: string;
|
|
3274
3402
|
permissionsSnapshot: Record<string, unknown> | null;
|
|
3275
3403
|
inputs: Record<string, unknown> | null;
|
|
@@ -3296,6 +3424,185 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3296
3424
|
};
|
|
3297
3425
|
meta: object;
|
|
3298
3426
|
}>;
|
|
3427
|
+
agentDefinitions: import("@trpc/server").TRPCQueryProcedure<{
|
|
3428
|
+
input: Record<string, never>;
|
|
3429
|
+
output: {
|
|
3430
|
+
agents: unknown[];
|
|
3431
|
+
};
|
|
3432
|
+
meta: object;
|
|
3433
|
+
}>;
|
|
3434
|
+
toolDefinitions: import("@trpc/server").TRPCQueryProcedure<{
|
|
3435
|
+
input: Record<string, never>;
|
|
3436
|
+
output: {
|
|
3437
|
+
tools: unknown[];
|
|
3438
|
+
};
|
|
3439
|
+
meta: object;
|
|
3440
|
+
}>;
|
|
3441
|
+
agentConfig: import("@trpc/server").TRPCQueryProcedure<{
|
|
3442
|
+
input: {
|
|
3443
|
+
agentType: string;
|
|
3444
|
+
};
|
|
3445
|
+
output: {
|
|
3446
|
+
config: unknown;
|
|
3447
|
+
};
|
|
3448
|
+
meta: object;
|
|
3449
|
+
}>;
|
|
3450
|
+
saveAgentConfig: import("@trpc/server").TRPCMutationProcedure<{
|
|
3451
|
+
input: {
|
|
3452
|
+
agentType: string;
|
|
3453
|
+
promptAppend?: string | null | undefined;
|
|
3454
|
+
extraToolIds?: string[] | undefined;
|
|
3455
|
+
disabledToolIds?: string[] | undefined;
|
|
3456
|
+
maxStepsOverride?: number | null | undefined;
|
|
3457
|
+
};
|
|
3458
|
+
output: {
|
|
3459
|
+
config: unknown;
|
|
3460
|
+
};
|
|
3461
|
+
meta: object;
|
|
3462
|
+
}>;
|
|
3463
|
+
deleteAgentConfig: import("@trpc/server").TRPCMutationProcedure<{
|
|
3464
|
+
input: {
|
|
3465
|
+
agentType: string;
|
|
3466
|
+
};
|
|
3467
|
+
output: {
|
|
3468
|
+
success: boolean;
|
|
3469
|
+
};
|
|
3470
|
+
meta: object;
|
|
3471
|
+
}>;
|
|
3472
|
+
memoryFacts: import("@trpc/server").TRPCQueryProcedure<{
|
|
3473
|
+
input: {
|
|
3474
|
+
limit?: number | undefined;
|
|
3475
|
+
};
|
|
3476
|
+
output: {
|
|
3477
|
+
facts: any[];
|
|
3478
|
+
};
|
|
3479
|
+
meta: object;
|
|
3480
|
+
}>;
|
|
3481
|
+
searchMemory: import("@trpc/server").TRPCQueryProcedure<{
|
|
3482
|
+
input: {
|
|
3483
|
+
query: string;
|
|
3484
|
+
limit?: number | undefined;
|
|
3485
|
+
};
|
|
3486
|
+
output: {
|
|
3487
|
+
facts: any[];
|
|
3488
|
+
};
|
|
3489
|
+
meta: object;
|
|
3490
|
+
}>;
|
|
3491
|
+
createMemoryFact: import("@trpc/server").TRPCMutationProcedure<{
|
|
3492
|
+
input: {
|
|
3493
|
+
fact: string;
|
|
3494
|
+
confidence?: number | undefined;
|
|
3495
|
+
};
|
|
3496
|
+
output: {
|
|
3497
|
+
fact: any;
|
|
3498
|
+
};
|
|
3499
|
+
meta: object;
|
|
3500
|
+
}>;
|
|
3501
|
+
deleteMemoryFact: import("@trpc/server").TRPCMutationProcedure<{
|
|
3502
|
+
input: {
|
|
3503
|
+
id: string;
|
|
3504
|
+
};
|
|
3505
|
+
output: {
|
|
3506
|
+
success: boolean;
|
|
3507
|
+
};
|
|
3508
|
+
meta: object;
|
|
3509
|
+
}>;
|
|
3510
|
+
skills: import("@trpc/server").TRPCQueryProcedure<{
|
|
3511
|
+
input: Record<string, never>;
|
|
3512
|
+
output: {
|
|
3513
|
+
skills: any[];
|
|
3514
|
+
};
|
|
3515
|
+
meta: object;
|
|
3516
|
+
}>;
|
|
3517
|
+
createSkill: import("@trpc/server").TRPCMutationProcedure<{
|
|
3518
|
+
input: {
|
|
3519
|
+
name: string;
|
|
3520
|
+
description: string;
|
|
3521
|
+
parameters?: Record<string, string> | undefined;
|
|
3522
|
+
category?: "context" | "action" | undefined;
|
|
3523
|
+
};
|
|
3524
|
+
output: {
|
|
3525
|
+
skill: any;
|
|
3526
|
+
};
|
|
3527
|
+
meta: object;
|
|
3528
|
+
}>;
|
|
3529
|
+
executionStats: import("@trpc/server").TRPCQueryProcedure<{
|
|
3530
|
+
input: {
|
|
3531
|
+
since?: string | undefined;
|
|
3532
|
+
};
|
|
3533
|
+
output: {
|
|
3534
|
+
stats: unknown;
|
|
3535
|
+
};
|
|
3536
|
+
meta: object;
|
|
3537
|
+
}>;
|
|
3538
|
+
executions: import("@trpc/server").TRPCQueryProcedure<{
|
|
3539
|
+
input: {
|
|
3540
|
+
limit?: number | undefined;
|
|
3541
|
+
offset?: number | undefined;
|
|
3542
|
+
agentType?: string | undefined;
|
|
3543
|
+
};
|
|
3544
|
+
output: {
|
|
3545
|
+
executions: unknown[];
|
|
3546
|
+
};
|
|
3547
|
+
meta: object;
|
|
3548
|
+
}>;
|
|
3549
|
+
executionDetail: import("@trpc/server").TRPCQueryProcedure<{
|
|
3550
|
+
input: {
|
|
3551
|
+
id: string;
|
|
3552
|
+
};
|
|
3553
|
+
output: {
|
|
3554
|
+
execution: unknown;
|
|
3555
|
+
toolLogs: unknown[];
|
|
3556
|
+
};
|
|
3557
|
+
meta: object;
|
|
3558
|
+
}>;
|
|
3559
|
+
proposals: import("@trpc/server").TRPCQueryProcedure<{
|
|
3560
|
+
input: {
|
|
3561
|
+
status?: "denied" | "pending" | "approved" | undefined;
|
|
3562
|
+
};
|
|
3563
|
+
output: {
|
|
3564
|
+
proposals: any[];
|
|
3565
|
+
};
|
|
3566
|
+
meta: object;
|
|
3567
|
+
}>;
|
|
3568
|
+
approveProposal: import("@trpc/server").TRPCMutationProcedure<{
|
|
3569
|
+
input: {
|
|
3570
|
+
id: string;
|
|
3571
|
+
};
|
|
3572
|
+
output: {
|
|
3573
|
+
success: boolean;
|
|
3574
|
+
};
|
|
3575
|
+
meta: object;
|
|
3576
|
+
}>;
|
|
3577
|
+
denyProposal: import("@trpc/server").TRPCMutationProcedure<{
|
|
3578
|
+
input: {
|
|
3579
|
+
id: string;
|
|
3580
|
+
};
|
|
3581
|
+
output: {
|
|
3582
|
+
success: boolean;
|
|
3583
|
+
};
|
|
3584
|
+
meta: object;
|
|
3585
|
+
}>;
|
|
3586
|
+
startAIChannel: import("@trpc/server").TRPCMutationProcedure<{
|
|
3587
|
+
input: {
|
|
3588
|
+
topic: string;
|
|
3589
|
+
mode?: "debate" | "collaborate" | "critique" | undefined;
|
|
3590
|
+
maxTurns?: number | undefined;
|
|
3591
|
+
personaA?: {
|
|
3592
|
+
name?: string | undefined;
|
|
3593
|
+
agentType?: string | undefined;
|
|
3594
|
+
systemPrompt?: string | undefined;
|
|
3595
|
+
} | undefined;
|
|
3596
|
+
personaB?: {
|
|
3597
|
+
name?: string | undefined;
|
|
3598
|
+
agentType?: string | undefined;
|
|
3599
|
+
systemPrompt?: string | undefined;
|
|
3600
|
+
} | undefined;
|
|
3601
|
+
initialMessage?: string | undefined;
|
|
3602
|
+
};
|
|
3603
|
+
output: any;
|
|
3604
|
+
meta: object;
|
|
3605
|
+
}>;
|
|
3299
3606
|
}>>;
|
|
3300
3607
|
capabilities: import("@trpc/server").TRPCBuiltRouter<{
|
|
3301
3608
|
ctx: Context;
|
|
@@ -3411,11 +3718,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3411
3718
|
input: void;
|
|
3412
3719
|
output: {
|
|
3413
3720
|
types: {
|
|
3721
|
+
type: string;
|
|
3414
3722
|
label: string;
|
|
3415
3723
|
description: string;
|
|
3416
3724
|
directionality: "unidirectional" | "bidirectional";
|
|
3417
|
-
category:
|
|
3418
|
-
|
|
3725
|
+
category: string;
|
|
3726
|
+
source: "workspace";
|
|
3419
3727
|
}[];
|
|
3420
3728
|
};
|
|
3421
3729
|
meta: object;
|
|
@@ -3423,7 +3731,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3423
3731
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
3424
3732
|
input: {
|
|
3425
3733
|
entityId: string;
|
|
3426
|
-
type?:
|
|
3734
|
+
type?: string | undefined;
|
|
3427
3735
|
direction?: "source" | "target" | "both" | undefined;
|
|
3428
3736
|
limit?: number | undefined;
|
|
3429
3737
|
};
|
|
@@ -3444,7 +3752,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3444
3752
|
getRelated: import("@trpc/server").TRPCQueryProcedure<{
|
|
3445
3753
|
input: {
|
|
3446
3754
|
entityId: string;
|
|
3447
|
-
type?:
|
|
3755
|
+
type?: string | undefined;
|
|
3448
3756
|
direction?: "source" | "target" | "both" | undefined;
|
|
3449
3757
|
limit?: number | undefined;
|
|
3450
3758
|
};
|
package/package.json
CHANGED
package/src/generated.d.ts
CHANGED
|
@@ -3424,6 +3424,185 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3424
3424
|
};
|
|
3425
3425
|
meta: object;
|
|
3426
3426
|
}>;
|
|
3427
|
+
agentDefinitions: import("@trpc/server").TRPCQueryProcedure<{
|
|
3428
|
+
input: Record<string, never>;
|
|
3429
|
+
output: {
|
|
3430
|
+
agents: unknown[];
|
|
3431
|
+
};
|
|
3432
|
+
meta: object;
|
|
3433
|
+
}>;
|
|
3434
|
+
toolDefinitions: import("@trpc/server").TRPCQueryProcedure<{
|
|
3435
|
+
input: Record<string, never>;
|
|
3436
|
+
output: {
|
|
3437
|
+
tools: unknown[];
|
|
3438
|
+
};
|
|
3439
|
+
meta: object;
|
|
3440
|
+
}>;
|
|
3441
|
+
agentConfig: import("@trpc/server").TRPCQueryProcedure<{
|
|
3442
|
+
input: {
|
|
3443
|
+
agentType: string;
|
|
3444
|
+
};
|
|
3445
|
+
output: {
|
|
3446
|
+
config: unknown;
|
|
3447
|
+
};
|
|
3448
|
+
meta: object;
|
|
3449
|
+
}>;
|
|
3450
|
+
saveAgentConfig: import("@trpc/server").TRPCMutationProcedure<{
|
|
3451
|
+
input: {
|
|
3452
|
+
agentType: string;
|
|
3453
|
+
promptAppend?: string | null | undefined;
|
|
3454
|
+
extraToolIds?: string[] | undefined;
|
|
3455
|
+
disabledToolIds?: string[] | undefined;
|
|
3456
|
+
maxStepsOverride?: number | null | undefined;
|
|
3457
|
+
};
|
|
3458
|
+
output: {
|
|
3459
|
+
config: unknown;
|
|
3460
|
+
};
|
|
3461
|
+
meta: object;
|
|
3462
|
+
}>;
|
|
3463
|
+
deleteAgentConfig: import("@trpc/server").TRPCMutationProcedure<{
|
|
3464
|
+
input: {
|
|
3465
|
+
agentType: string;
|
|
3466
|
+
};
|
|
3467
|
+
output: {
|
|
3468
|
+
success: boolean;
|
|
3469
|
+
};
|
|
3470
|
+
meta: object;
|
|
3471
|
+
}>;
|
|
3472
|
+
memoryFacts: import("@trpc/server").TRPCQueryProcedure<{
|
|
3473
|
+
input: {
|
|
3474
|
+
limit?: number | undefined;
|
|
3475
|
+
};
|
|
3476
|
+
output: {
|
|
3477
|
+
facts: any[];
|
|
3478
|
+
};
|
|
3479
|
+
meta: object;
|
|
3480
|
+
}>;
|
|
3481
|
+
searchMemory: import("@trpc/server").TRPCQueryProcedure<{
|
|
3482
|
+
input: {
|
|
3483
|
+
query: string;
|
|
3484
|
+
limit?: number | undefined;
|
|
3485
|
+
};
|
|
3486
|
+
output: {
|
|
3487
|
+
facts: any[];
|
|
3488
|
+
};
|
|
3489
|
+
meta: object;
|
|
3490
|
+
}>;
|
|
3491
|
+
createMemoryFact: import("@trpc/server").TRPCMutationProcedure<{
|
|
3492
|
+
input: {
|
|
3493
|
+
fact: string;
|
|
3494
|
+
confidence?: number | undefined;
|
|
3495
|
+
};
|
|
3496
|
+
output: {
|
|
3497
|
+
fact: any;
|
|
3498
|
+
};
|
|
3499
|
+
meta: object;
|
|
3500
|
+
}>;
|
|
3501
|
+
deleteMemoryFact: import("@trpc/server").TRPCMutationProcedure<{
|
|
3502
|
+
input: {
|
|
3503
|
+
id: string;
|
|
3504
|
+
};
|
|
3505
|
+
output: {
|
|
3506
|
+
success: boolean;
|
|
3507
|
+
};
|
|
3508
|
+
meta: object;
|
|
3509
|
+
}>;
|
|
3510
|
+
skills: import("@trpc/server").TRPCQueryProcedure<{
|
|
3511
|
+
input: Record<string, never>;
|
|
3512
|
+
output: {
|
|
3513
|
+
skills: any[];
|
|
3514
|
+
};
|
|
3515
|
+
meta: object;
|
|
3516
|
+
}>;
|
|
3517
|
+
createSkill: import("@trpc/server").TRPCMutationProcedure<{
|
|
3518
|
+
input: {
|
|
3519
|
+
name: string;
|
|
3520
|
+
description: string;
|
|
3521
|
+
parameters?: Record<string, string> | undefined;
|
|
3522
|
+
category?: "context" | "action" | undefined;
|
|
3523
|
+
};
|
|
3524
|
+
output: {
|
|
3525
|
+
skill: any;
|
|
3526
|
+
};
|
|
3527
|
+
meta: object;
|
|
3528
|
+
}>;
|
|
3529
|
+
executionStats: import("@trpc/server").TRPCQueryProcedure<{
|
|
3530
|
+
input: {
|
|
3531
|
+
since?: string | undefined;
|
|
3532
|
+
};
|
|
3533
|
+
output: {
|
|
3534
|
+
stats: unknown;
|
|
3535
|
+
};
|
|
3536
|
+
meta: object;
|
|
3537
|
+
}>;
|
|
3538
|
+
executions: import("@trpc/server").TRPCQueryProcedure<{
|
|
3539
|
+
input: {
|
|
3540
|
+
limit?: number | undefined;
|
|
3541
|
+
offset?: number | undefined;
|
|
3542
|
+
agentType?: string | undefined;
|
|
3543
|
+
};
|
|
3544
|
+
output: {
|
|
3545
|
+
executions: unknown[];
|
|
3546
|
+
};
|
|
3547
|
+
meta: object;
|
|
3548
|
+
}>;
|
|
3549
|
+
executionDetail: import("@trpc/server").TRPCQueryProcedure<{
|
|
3550
|
+
input: {
|
|
3551
|
+
id: string;
|
|
3552
|
+
};
|
|
3553
|
+
output: {
|
|
3554
|
+
execution: unknown;
|
|
3555
|
+
toolLogs: unknown[];
|
|
3556
|
+
};
|
|
3557
|
+
meta: object;
|
|
3558
|
+
}>;
|
|
3559
|
+
proposals: import("@trpc/server").TRPCQueryProcedure<{
|
|
3560
|
+
input: {
|
|
3561
|
+
status?: "denied" | "pending" | "approved" | undefined;
|
|
3562
|
+
};
|
|
3563
|
+
output: {
|
|
3564
|
+
proposals: any[];
|
|
3565
|
+
};
|
|
3566
|
+
meta: object;
|
|
3567
|
+
}>;
|
|
3568
|
+
approveProposal: import("@trpc/server").TRPCMutationProcedure<{
|
|
3569
|
+
input: {
|
|
3570
|
+
id: string;
|
|
3571
|
+
};
|
|
3572
|
+
output: {
|
|
3573
|
+
success: boolean;
|
|
3574
|
+
};
|
|
3575
|
+
meta: object;
|
|
3576
|
+
}>;
|
|
3577
|
+
denyProposal: import("@trpc/server").TRPCMutationProcedure<{
|
|
3578
|
+
input: {
|
|
3579
|
+
id: string;
|
|
3580
|
+
};
|
|
3581
|
+
output: {
|
|
3582
|
+
success: boolean;
|
|
3583
|
+
};
|
|
3584
|
+
meta: object;
|
|
3585
|
+
}>;
|
|
3586
|
+
startAIChannel: import("@trpc/server").TRPCMutationProcedure<{
|
|
3587
|
+
input: {
|
|
3588
|
+
topic: string;
|
|
3589
|
+
mode?: "debate" | "collaborate" | "critique" | undefined;
|
|
3590
|
+
maxTurns?: number | undefined;
|
|
3591
|
+
personaA?: {
|
|
3592
|
+
name?: string | undefined;
|
|
3593
|
+
agentType?: string | undefined;
|
|
3594
|
+
systemPrompt?: string | undefined;
|
|
3595
|
+
} | undefined;
|
|
3596
|
+
personaB?: {
|
|
3597
|
+
name?: string | undefined;
|
|
3598
|
+
agentType?: string | undefined;
|
|
3599
|
+
systemPrompt?: string | undefined;
|
|
3600
|
+
} | undefined;
|
|
3601
|
+
initialMessage?: string | undefined;
|
|
3602
|
+
};
|
|
3603
|
+
output: any;
|
|
3604
|
+
meta: object;
|
|
3605
|
+
}>;
|
|
3427
3606
|
}>>;
|
|
3428
3607
|
capabilities: import("@trpc/server").TRPCBuiltRouter<{
|
|
3429
3608
|
ctx: Context;
|
|
@@ -3539,11 +3718,12 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3539
3718
|
input: void;
|
|
3540
3719
|
output: {
|
|
3541
3720
|
types: {
|
|
3721
|
+
type: string;
|
|
3542
3722
|
label: string;
|
|
3543
3723
|
description: string;
|
|
3544
3724
|
directionality: "unidirectional" | "bidirectional";
|
|
3545
|
-
category:
|
|
3546
|
-
|
|
3725
|
+
category: string;
|
|
3726
|
+
source: "workspace";
|
|
3547
3727
|
}[];
|
|
3548
3728
|
};
|
|
3549
3729
|
meta: object;
|
|
@@ -3551,7 +3731,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3551
3731
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
3552
3732
|
input: {
|
|
3553
3733
|
entityId: string;
|
|
3554
|
-
type?:
|
|
3734
|
+
type?: string | undefined;
|
|
3555
3735
|
direction?: "source" | "target" | "both" | undefined;
|
|
3556
3736
|
limit?: number | undefined;
|
|
3557
3737
|
};
|
|
@@ -3572,7 +3752,7 @@ export declare const coreRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3572
3752
|
getRelated: import("@trpc/server").TRPCQueryProcedure<{
|
|
3573
3753
|
input: {
|
|
3574
3754
|
entityId: string;
|
|
3575
|
-
type?:
|
|
3755
|
+
type?: string | undefined;
|
|
3576
3756
|
direction?: "source" | "target" | "both" | undefined;
|
|
3577
3757
|
limit?: number | undefined;
|
|
3578
3758
|
};
|