@redplanethq/sdk 0.1.11 → 0.1.13
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/index.d.mts +139 -17
- package/dist/index.d.ts +139 -17
- package/dist/index.js +68 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -65,6 +65,7 @@ interface DocumentNode {
|
|
|
65
65
|
metadata: Record<string, any>;
|
|
66
66
|
source: string;
|
|
67
67
|
userId: string;
|
|
68
|
+
workspaceId?: string;
|
|
68
69
|
createdAt: Date;
|
|
69
70
|
validAt: Date;
|
|
70
71
|
totalChunks: number;
|
|
@@ -90,6 +91,7 @@ interface EpisodicNode {
|
|
|
90
91
|
validAt: Date;
|
|
91
92
|
labelIds: string[];
|
|
92
93
|
userId: string;
|
|
94
|
+
workspaceId?: string;
|
|
93
95
|
sessionId: string;
|
|
94
96
|
queueId?: string;
|
|
95
97
|
type?: EpisodeType;
|
|
@@ -110,10 +112,10 @@ type EpisodicNodeWithoutEmbeddings = Omit<EpisodicNode, "contentEmbedding">;
|
|
|
110
112
|
* Helper to get episodic node properties for Cypher RETURN clause (excludes embeddings)
|
|
111
113
|
* Usage in Cypher: RETURN ${EPISODIC_NODE_PROPERTIES} as episode
|
|
112
114
|
*/
|
|
113
|
-
declare const EPISODIC_NODE_PROPERTIES = "{\n uuid: e.uuid,\n content: e.content,\n originalContent: e.originalContent,\n source: e.source,\n metadata: e.metadata,\n createdAt: e.createdAt,\n userId: e.userId,\n sessionId: e.sessionId,\n queueId: e.queueId,\n labelIds: e.labelIds,\n validAt: e.validAt,\n recallCount: e.recallCount,\n type: e.type,\n chunkIndex: e.chunkIndex,\n totalChunks: e.totalChunks,\n version: e.version,\n contentHash: e.contentHash,\n previousVersionSessionId: e.previousVersionSessionId,\n chunkHashes: e.chunkHashes\n}";
|
|
114
|
-
declare const STATEMENT_NODE_PROPERTIES = "{\n uuid: s.uuid,\n fact: s.fact,\n createdAt: s.createdAt,\n userId: s.userId,\n validAt: s.validAt,\n invalidAt: s.invalidAt,\n invalidatedBy: s.invalidatedBy,\n attributes: s.attributes,\n aspect: s.aspect,\n recallCount: s.recallCount,\n provenanceCount: s.provenanceCount\n}";
|
|
115
|
-
declare const ENTITY_NODE_PROPERTIES = "{\n uuid: ent.uuid,\n name: ent.name,\n type: ent.type,\n createdAt: ent.createdAt,\n userId: ent.userId,\n attributes: ent.attributes\n}";
|
|
116
|
-
declare const COMPACTED_SESSION_NODE_PROPERTIES = "{\n uuid: cs.uuid,\n sessionId: cs.sessionId,\n summary: cs.summary,\n episodeCount: cs.episodeCount,\n startTime: cs.startTime,\n endTime: cs.endTime,\n createdAt: cs.createdAt,\n updatedAt: cs.updatedAt,\n confidence: cs.confidence,\n userId: cs.userId,\n source: cs.source,\n compressionRatio: cs.compressionRatio,\n metadata: cs.metadata\n}";
|
|
115
|
+
declare const EPISODIC_NODE_PROPERTIES = "{\n uuid: e.uuid,\n content: e.content,\n originalContent: e.originalContent,\n source: e.source,\n metadata: e.metadata,\n createdAt: e.createdAt,\n userId: e.userId,\n workspaceId: e.workspaceId,\n sessionId: e.sessionId,\n queueId: e.queueId,\n labelIds: e.labelIds,\n validAt: e.validAt,\n recallCount: e.recallCount,\n type: e.type,\n chunkIndex: e.chunkIndex,\n totalChunks: e.totalChunks,\n version: e.version,\n contentHash: e.contentHash,\n previousVersionSessionId: e.previousVersionSessionId,\n chunkHashes: e.chunkHashes\n}";
|
|
116
|
+
declare const STATEMENT_NODE_PROPERTIES = "{\n uuid: s.uuid,\n fact: s.fact,\n createdAt: s.createdAt,\n userId: s.userId,\n workspaceId: s.workspaceId,\n validAt: s.validAt,\n invalidAt: s.invalidAt,\n invalidatedBy: s.invalidatedBy,\n attributes: s.attributes,\n aspect: s.aspect,\n recallCount: s.recallCount,\n provenanceCount: s.provenanceCount\n}";
|
|
117
|
+
declare const ENTITY_NODE_PROPERTIES = "{\n uuid: ent.uuid,\n name: ent.name,\n type: ent.type,\n createdAt: ent.createdAt,\n userId: ent.userId,\n workspaceId: ent.workspaceId,\n attributes: ent.attributes\n}";
|
|
118
|
+
declare const COMPACTED_SESSION_NODE_PROPERTIES = "{\n uuid: cs.uuid,\n sessionId: cs.sessionId,\n summary: cs.summary,\n episodeCount: cs.episodeCount,\n startTime: cs.startTime,\n endTime: cs.endTime,\n createdAt: cs.createdAt,\n updatedAt: cs.updatedAt,\n confidence: cs.confidence,\n userId: cs.userId,\n workspaceId: cs.workspaceId,\n source: cs.source,\n compressionRatio: cs.compressionRatio,\n metadata: cs.metadata\n}";
|
|
117
119
|
/**
|
|
118
120
|
* Entity types for the knowledge graph (10 types)
|
|
119
121
|
* Only NAMED, SEARCHABLE entities - no generic vocabulary
|
|
@@ -132,6 +134,7 @@ interface EntityNode {
|
|
|
132
134
|
attributes?: Record<string, any>;
|
|
133
135
|
createdAt: Date;
|
|
134
136
|
userId: string;
|
|
137
|
+
workspaceId?: string;
|
|
135
138
|
}
|
|
136
139
|
/**
|
|
137
140
|
* Statement aspects for classification
|
|
@@ -150,7 +153,7 @@ interface EntityNode {
|
|
|
150
153
|
* 10. Problem - Blockers, issues, challenges
|
|
151
154
|
* 11. Relationship - Connections between people
|
|
152
155
|
*/
|
|
153
|
-
declare const StatementAspects: readonly ["Identity", "Knowledge", "Belief", "Preference", "
|
|
156
|
+
declare const StatementAspects: readonly ["Identity", "Knowledge", "Belief", "Preference", "Habit", "Goal", "Directive", "Decision", "Event", "Problem", "Relationship"];
|
|
154
157
|
type StatementAspect = (typeof StatementAspects)[number];
|
|
155
158
|
/**
|
|
156
159
|
* Interface for statement node in the reified knowledge graph
|
|
@@ -166,6 +169,7 @@ interface StatementNode {
|
|
|
166
169
|
invalidatedBy?: string;
|
|
167
170
|
attributes: Record<string, any>;
|
|
168
171
|
userId: string;
|
|
172
|
+
workspaceId?: string;
|
|
169
173
|
labelIds?: string[];
|
|
170
174
|
aspect?: StatementAspect | null;
|
|
171
175
|
recallCount?: {
|
|
@@ -203,6 +207,7 @@ type AddEpisodeParams = {
|
|
|
203
207
|
metadata?: Record<string, any>;
|
|
204
208
|
source: string;
|
|
205
209
|
userId: string;
|
|
210
|
+
workspaceId?: string;
|
|
206
211
|
userName?: string;
|
|
207
212
|
labelIds?: string[];
|
|
208
213
|
sessionId: string;
|
|
@@ -258,6 +263,7 @@ interface CompactedSessionNode {
|
|
|
258
263
|
updatedAt?: Date;
|
|
259
264
|
confidence: number;
|
|
260
265
|
userId: string;
|
|
266
|
+
workspaceId?: string;
|
|
261
267
|
source: string;
|
|
262
268
|
compressionRatio?: number;
|
|
263
269
|
metadata?: Record<string, any>;
|
|
@@ -271,6 +277,7 @@ interface SpaceNode {
|
|
|
271
277
|
name: string;
|
|
272
278
|
description: string;
|
|
273
279
|
userId: string;
|
|
280
|
+
workspaceId?: string;
|
|
274
281
|
createdAt: Date;
|
|
275
282
|
updatedAt: Date;
|
|
276
283
|
isActive: boolean;
|
|
@@ -335,10 +342,18 @@ declare class OAuth2Params {
|
|
|
335
342
|
scopes?: string[];
|
|
336
343
|
token_request_auth_method?: string;
|
|
337
344
|
}
|
|
338
|
-
type AuthType = "OAuth2" | "
|
|
345
|
+
type AuthType = "OAuth2" | "api_key" | "mcp";
|
|
346
|
+
type Param = {
|
|
347
|
+
name: string;
|
|
348
|
+
label: string;
|
|
349
|
+
placeholder: string;
|
|
350
|
+
description: string;
|
|
351
|
+
};
|
|
339
352
|
declare class APIKeyParams {
|
|
340
|
-
|
|
341
|
-
|
|
353
|
+
fields: Array<Param>;
|
|
354
|
+
}
|
|
355
|
+
declare class McpAuthParams {
|
|
356
|
+
authorization_url: string;
|
|
342
357
|
}
|
|
343
358
|
|
|
344
359
|
declare enum IntegrationEventType {
|
|
@@ -395,15 +410,11 @@ declare class Spec {
|
|
|
395
410
|
schedule?: {
|
|
396
411
|
frequency?: string;
|
|
397
412
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
needsAuth?: boolean;
|
|
403
|
-
} | {
|
|
404
|
-
type: "cli";
|
|
413
|
+
auth?: {
|
|
414
|
+
OAuth2?: OAuth2Params;
|
|
415
|
+
api_key?: APIKeyParams;
|
|
416
|
+
mcp?: McpAuthParams;
|
|
405
417
|
};
|
|
406
|
-
auth?: Record<string, OAuth2Params | APIKeyParams>;
|
|
407
418
|
}
|
|
408
419
|
interface Config {
|
|
409
420
|
access_token: string;
|
|
@@ -522,6 +533,7 @@ interface SearchOptions {
|
|
|
522
533
|
qualityThreshold?: number;
|
|
523
534
|
maxEpisodesForLLM?: number;
|
|
524
535
|
sortBy?: "relevance" | "recency";
|
|
536
|
+
tokenBudget?: number;
|
|
525
537
|
}
|
|
526
538
|
/**
|
|
527
539
|
* Statement with source provenance tracking
|
|
@@ -983,6 +995,113 @@ declare const GetDocumentResponseSchema: z.ZodObject<{
|
|
|
983
995
|
};
|
|
984
996
|
}>;
|
|
985
997
|
type GetDocumentResponse = z.infer<typeof GetDocumentResponseSchema>;
|
|
998
|
+
declare const GatewayAgentInfoSchema: z.ZodObject<{
|
|
999
|
+
id: z.ZodString;
|
|
1000
|
+
name: z.ZodString;
|
|
1001
|
+
description: z.ZodString;
|
|
1002
|
+
tools: z.ZodArray<z.ZodString, "many">;
|
|
1003
|
+
platform: z.ZodNullable<z.ZodString>;
|
|
1004
|
+
hostname: z.ZodNullable<z.ZodString>;
|
|
1005
|
+
status: z.ZodEnum<["CONNECTED", "DISCONNECTED"]>;
|
|
1006
|
+
}, "strip", z.ZodTypeAny, {
|
|
1007
|
+
tools?: string[];
|
|
1008
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1009
|
+
id?: string;
|
|
1010
|
+
name?: string;
|
|
1011
|
+
description?: string;
|
|
1012
|
+
platform?: string;
|
|
1013
|
+
hostname?: string;
|
|
1014
|
+
}, {
|
|
1015
|
+
tools?: string[];
|
|
1016
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1017
|
+
id?: string;
|
|
1018
|
+
name?: string;
|
|
1019
|
+
description?: string;
|
|
1020
|
+
platform?: string;
|
|
1021
|
+
hostname?: string;
|
|
1022
|
+
}>;
|
|
1023
|
+
type GatewayAgentInfo = z.infer<typeof GatewayAgentInfoSchema>;
|
|
1024
|
+
declare const GetGatewaysResponseSchema: z.ZodObject<{
|
|
1025
|
+
gateways: z.ZodArray<z.ZodObject<{
|
|
1026
|
+
id: z.ZodString;
|
|
1027
|
+
name: z.ZodString;
|
|
1028
|
+
description: z.ZodString;
|
|
1029
|
+
tools: z.ZodArray<z.ZodString, "many">;
|
|
1030
|
+
platform: z.ZodNullable<z.ZodString>;
|
|
1031
|
+
hostname: z.ZodNullable<z.ZodString>;
|
|
1032
|
+
status: z.ZodEnum<["CONNECTED", "DISCONNECTED"]>;
|
|
1033
|
+
}, "strip", z.ZodTypeAny, {
|
|
1034
|
+
tools?: string[];
|
|
1035
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1036
|
+
id?: string;
|
|
1037
|
+
name?: string;
|
|
1038
|
+
description?: string;
|
|
1039
|
+
platform?: string;
|
|
1040
|
+
hostname?: string;
|
|
1041
|
+
}, {
|
|
1042
|
+
tools?: string[];
|
|
1043
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1044
|
+
id?: string;
|
|
1045
|
+
name?: string;
|
|
1046
|
+
description?: string;
|
|
1047
|
+
platform?: string;
|
|
1048
|
+
hostname?: string;
|
|
1049
|
+
}>, "many">;
|
|
1050
|
+
}, "strip", z.ZodTypeAny, {
|
|
1051
|
+
gateways?: {
|
|
1052
|
+
tools?: string[];
|
|
1053
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1054
|
+
id?: string;
|
|
1055
|
+
name?: string;
|
|
1056
|
+
description?: string;
|
|
1057
|
+
platform?: string;
|
|
1058
|
+
hostname?: string;
|
|
1059
|
+
}[];
|
|
1060
|
+
}, {
|
|
1061
|
+
gateways?: {
|
|
1062
|
+
tools?: string[];
|
|
1063
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1064
|
+
id?: string;
|
|
1065
|
+
name?: string;
|
|
1066
|
+
description?: string;
|
|
1067
|
+
platform?: string;
|
|
1068
|
+
hostname?: string;
|
|
1069
|
+
}[];
|
|
1070
|
+
}>;
|
|
1071
|
+
type GetGatewaysResponse = z.infer<typeof GetGatewaysResponseSchema>;
|
|
1072
|
+
declare const ExecuteGatewayInputSchema: z.ZodObject<{
|
|
1073
|
+
gatewayId: z.ZodString;
|
|
1074
|
+
intent: z.ZodString;
|
|
1075
|
+
}, "strip", z.ZodTypeAny, {
|
|
1076
|
+
gatewayId?: string;
|
|
1077
|
+
intent?: string;
|
|
1078
|
+
}, {
|
|
1079
|
+
gatewayId?: string;
|
|
1080
|
+
intent?: string;
|
|
1081
|
+
}>;
|
|
1082
|
+
type ExecuteGatewayInput = z.infer<typeof ExecuteGatewayInputSchema>;
|
|
1083
|
+
declare const ExecuteGatewayToolInputSchema: z.ZodObject<{
|
|
1084
|
+
gatewayId: z.ZodString;
|
|
1085
|
+
toolName: z.ZodString;
|
|
1086
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1087
|
+
}, "strip", z.ZodTypeAny, {
|
|
1088
|
+
params?: Record<string, unknown>;
|
|
1089
|
+
gatewayId?: string;
|
|
1090
|
+
toolName?: string;
|
|
1091
|
+
}, {
|
|
1092
|
+
params?: Record<string, unknown>;
|
|
1093
|
+
gatewayId?: string;
|
|
1094
|
+
toolName?: string;
|
|
1095
|
+
}>;
|
|
1096
|
+
type ExecuteGatewayToolInput = z.infer<typeof ExecuteGatewayToolInputSchema>;
|
|
1097
|
+
declare const ExecuteGatewayResponseSchema: z.ZodObject<{
|
|
1098
|
+
result: z.ZodUnknown;
|
|
1099
|
+
}, "strip", z.ZodTypeAny, {
|
|
1100
|
+
result?: unknown;
|
|
1101
|
+
}, {
|
|
1102
|
+
result?: unknown;
|
|
1103
|
+
}>;
|
|
1104
|
+
type ExecuteGatewayResponse = z.infer<typeof ExecuteGatewayResponseSchema>;
|
|
986
1105
|
declare const AuthorizationCodeResponseSchema: z.ZodObject<{
|
|
987
1106
|
authorizationCode: z.ZodString;
|
|
988
1107
|
url: z.ZodString;
|
|
@@ -1049,9 +1168,12 @@ declare class CoreClient {
|
|
|
1049
1168
|
getSessionId(): Promise<string>;
|
|
1050
1169
|
getDocuments(params?: GetDocumentsInput): Promise<GetDocumentsResponse>;
|
|
1051
1170
|
getDocument(params: GetDocumentInput): Promise<GetDocumentResponse>;
|
|
1171
|
+
getGateways(): Promise<GetGatewaysResponse>;
|
|
1172
|
+
executeGateway(params: ExecuteGatewayInput): Promise<ExecuteGatewayResponse>;
|
|
1173
|
+
executeGatewayTool(params: ExecuteGatewayToolInput): Promise<ExecuteGatewayResponse>;
|
|
1052
1174
|
getAuthorizationCode(): Promise<AuthorizationCodeResponse>;
|
|
1053
1175
|
exchangeToken(params: TokenExchangeInput): Promise<TokenExchangeResponse>;
|
|
1054
1176
|
checkAuth(): Promise<MeResponse>;
|
|
1055
1177
|
}
|
|
1056
1178
|
|
|
1057
|
-
export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type UserConfirmationStatus, UserTypeEnum };
|
|
1179
|
+
export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type UserConfirmationStatus, UserTypeEnum };
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ interface DocumentNode {
|
|
|
65
65
|
metadata: Record<string, any>;
|
|
66
66
|
source: string;
|
|
67
67
|
userId: string;
|
|
68
|
+
workspaceId?: string;
|
|
68
69
|
createdAt: Date;
|
|
69
70
|
validAt: Date;
|
|
70
71
|
totalChunks: number;
|
|
@@ -90,6 +91,7 @@ interface EpisodicNode {
|
|
|
90
91
|
validAt: Date;
|
|
91
92
|
labelIds: string[];
|
|
92
93
|
userId: string;
|
|
94
|
+
workspaceId?: string;
|
|
93
95
|
sessionId: string;
|
|
94
96
|
queueId?: string;
|
|
95
97
|
type?: EpisodeType;
|
|
@@ -110,10 +112,10 @@ type EpisodicNodeWithoutEmbeddings = Omit<EpisodicNode, "contentEmbedding">;
|
|
|
110
112
|
* Helper to get episodic node properties for Cypher RETURN clause (excludes embeddings)
|
|
111
113
|
* Usage in Cypher: RETURN ${EPISODIC_NODE_PROPERTIES} as episode
|
|
112
114
|
*/
|
|
113
|
-
declare const EPISODIC_NODE_PROPERTIES = "{\n uuid: e.uuid,\n content: e.content,\n originalContent: e.originalContent,\n source: e.source,\n metadata: e.metadata,\n createdAt: e.createdAt,\n userId: e.userId,\n sessionId: e.sessionId,\n queueId: e.queueId,\n labelIds: e.labelIds,\n validAt: e.validAt,\n recallCount: e.recallCount,\n type: e.type,\n chunkIndex: e.chunkIndex,\n totalChunks: e.totalChunks,\n version: e.version,\n contentHash: e.contentHash,\n previousVersionSessionId: e.previousVersionSessionId,\n chunkHashes: e.chunkHashes\n}";
|
|
114
|
-
declare const STATEMENT_NODE_PROPERTIES = "{\n uuid: s.uuid,\n fact: s.fact,\n createdAt: s.createdAt,\n userId: s.userId,\n validAt: s.validAt,\n invalidAt: s.invalidAt,\n invalidatedBy: s.invalidatedBy,\n attributes: s.attributes,\n aspect: s.aspect,\n recallCount: s.recallCount,\n provenanceCount: s.provenanceCount\n}";
|
|
115
|
-
declare const ENTITY_NODE_PROPERTIES = "{\n uuid: ent.uuid,\n name: ent.name,\n type: ent.type,\n createdAt: ent.createdAt,\n userId: ent.userId,\n attributes: ent.attributes\n}";
|
|
116
|
-
declare const COMPACTED_SESSION_NODE_PROPERTIES = "{\n uuid: cs.uuid,\n sessionId: cs.sessionId,\n summary: cs.summary,\n episodeCount: cs.episodeCount,\n startTime: cs.startTime,\n endTime: cs.endTime,\n createdAt: cs.createdAt,\n updatedAt: cs.updatedAt,\n confidence: cs.confidence,\n userId: cs.userId,\n source: cs.source,\n compressionRatio: cs.compressionRatio,\n metadata: cs.metadata\n}";
|
|
115
|
+
declare const EPISODIC_NODE_PROPERTIES = "{\n uuid: e.uuid,\n content: e.content,\n originalContent: e.originalContent,\n source: e.source,\n metadata: e.metadata,\n createdAt: e.createdAt,\n userId: e.userId,\n workspaceId: e.workspaceId,\n sessionId: e.sessionId,\n queueId: e.queueId,\n labelIds: e.labelIds,\n validAt: e.validAt,\n recallCount: e.recallCount,\n type: e.type,\n chunkIndex: e.chunkIndex,\n totalChunks: e.totalChunks,\n version: e.version,\n contentHash: e.contentHash,\n previousVersionSessionId: e.previousVersionSessionId,\n chunkHashes: e.chunkHashes\n}";
|
|
116
|
+
declare const STATEMENT_NODE_PROPERTIES = "{\n uuid: s.uuid,\n fact: s.fact,\n createdAt: s.createdAt,\n userId: s.userId,\n workspaceId: s.workspaceId,\n validAt: s.validAt,\n invalidAt: s.invalidAt,\n invalidatedBy: s.invalidatedBy,\n attributes: s.attributes,\n aspect: s.aspect,\n recallCount: s.recallCount,\n provenanceCount: s.provenanceCount\n}";
|
|
117
|
+
declare const ENTITY_NODE_PROPERTIES = "{\n uuid: ent.uuid,\n name: ent.name,\n type: ent.type,\n createdAt: ent.createdAt,\n userId: ent.userId,\n workspaceId: ent.workspaceId,\n attributes: ent.attributes\n}";
|
|
118
|
+
declare const COMPACTED_SESSION_NODE_PROPERTIES = "{\n uuid: cs.uuid,\n sessionId: cs.sessionId,\n summary: cs.summary,\n episodeCount: cs.episodeCount,\n startTime: cs.startTime,\n endTime: cs.endTime,\n createdAt: cs.createdAt,\n updatedAt: cs.updatedAt,\n confidence: cs.confidence,\n userId: cs.userId,\n workspaceId: cs.workspaceId,\n source: cs.source,\n compressionRatio: cs.compressionRatio,\n metadata: cs.metadata\n}";
|
|
117
119
|
/**
|
|
118
120
|
* Entity types for the knowledge graph (10 types)
|
|
119
121
|
* Only NAMED, SEARCHABLE entities - no generic vocabulary
|
|
@@ -132,6 +134,7 @@ interface EntityNode {
|
|
|
132
134
|
attributes?: Record<string, any>;
|
|
133
135
|
createdAt: Date;
|
|
134
136
|
userId: string;
|
|
137
|
+
workspaceId?: string;
|
|
135
138
|
}
|
|
136
139
|
/**
|
|
137
140
|
* Statement aspects for classification
|
|
@@ -150,7 +153,7 @@ interface EntityNode {
|
|
|
150
153
|
* 10. Problem - Blockers, issues, challenges
|
|
151
154
|
* 11. Relationship - Connections between people
|
|
152
155
|
*/
|
|
153
|
-
declare const StatementAspects: readonly ["Identity", "Knowledge", "Belief", "Preference", "
|
|
156
|
+
declare const StatementAspects: readonly ["Identity", "Knowledge", "Belief", "Preference", "Habit", "Goal", "Directive", "Decision", "Event", "Problem", "Relationship"];
|
|
154
157
|
type StatementAspect = (typeof StatementAspects)[number];
|
|
155
158
|
/**
|
|
156
159
|
* Interface for statement node in the reified knowledge graph
|
|
@@ -166,6 +169,7 @@ interface StatementNode {
|
|
|
166
169
|
invalidatedBy?: string;
|
|
167
170
|
attributes: Record<string, any>;
|
|
168
171
|
userId: string;
|
|
172
|
+
workspaceId?: string;
|
|
169
173
|
labelIds?: string[];
|
|
170
174
|
aspect?: StatementAspect | null;
|
|
171
175
|
recallCount?: {
|
|
@@ -203,6 +207,7 @@ type AddEpisodeParams = {
|
|
|
203
207
|
metadata?: Record<string, any>;
|
|
204
208
|
source: string;
|
|
205
209
|
userId: string;
|
|
210
|
+
workspaceId?: string;
|
|
206
211
|
userName?: string;
|
|
207
212
|
labelIds?: string[];
|
|
208
213
|
sessionId: string;
|
|
@@ -258,6 +263,7 @@ interface CompactedSessionNode {
|
|
|
258
263
|
updatedAt?: Date;
|
|
259
264
|
confidence: number;
|
|
260
265
|
userId: string;
|
|
266
|
+
workspaceId?: string;
|
|
261
267
|
source: string;
|
|
262
268
|
compressionRatio?: number;
|
|
263
269
|
metadata?: Record<string, any>;
|
|
@@ -271,6 +277,7 @@ interface SpaceNode {
|
|
|
271
277
|
name: string;
|
|
272
278
|
description: string;
|
|
273
279
|
userId: string;
|
|
280
|
+
workspaceId?: string;
|
|
274
281
|
createdAt: Date;
|
|
275
282
|
updatedAt: Date;
|
|
276
283
|
isActive: boolean;
|
|
@@ -335,10 +342,18 @@ declare class OAuth2Params {
|
|
|
335
342
|
scopes?: string[];
|
|
336
343
|
token_request_auth_method?: string;
|
|
337
344
|
}
|
|
338
|
-
type AuthType = "OAuth2" | "
|
|
345
|
+
type AuthType = "OAuth2" | "api_key" | "mcp";
|
|
346
|
+
type Param = {
|
|
347
|
+
name: string;
|
|
348
|
+
label: string;
|
|
349
|
+
placeholder: string;
|
|
350
|
+
description: string;
|
|
351
|
+
};
|
|
339
352
|
declare class APIKeyParams {
|
|
340
|
-
|
|
341
|
-
|
|
353
|
+
fields: Array<Param>;
|
|
354
|
+
}
|
|
355
|
+
declare class McpAuthParams {
|
|
356
|
+
authorization_url: string;
|
|
342
357
|
}
|
|
343
358
|
|
|
344
359
|
declare enum IntegrationEventType {
|
|
@@ -395,15 +410,11 @@ declare class Spec {
|
|
|
395
410
|
schedule?: {
|
|
396
411
|
frequency?: string;
|
|
397
412
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
needsAuth?: boolean;
|
|
403
|
-
} | {
|
|
404
|
-
type: "cli";
|
|
413
|
+
auth?: {
|
|
414
|
+
OAuth2?: OAuth2Params;
|
|
415
|
+
api_key?: APIKeyParams;
|
|
416
|
+
mcp?: McpAuthParams;
|
|
405
417
|
};
|
|
406
|
-
auth?: Record<string, OAuth2Params | APIKeyParams>;
|
|
407
418
|
}
|
|
408
419
|
interface Config {
|
|
409
420
|
access_token: string;
|
|
@@ -522,6 +533,7 @@ interface SearchOptions {
|
|
|
522
533
|
qualityThreshold?: number;
|
|
523
534
|
maxEpisodesForLLM?: number;
|
|
524
535
|
sortBy?: "relevance" | "recency";
|
|
536
|
+
tokenBudget?: number;
|
|
525
537
|
}
|
|
526
538
|
/**
|
|
527
539
|
* Statement with source provenance tracking
|
|
@@ -983,6 +995,113 @@ declare const GetDocumentResponseSchema: z.ZodObject<{
|
|
|
983
995
|
};
|
|
984
996
|
}>;
|
|
985
997
|
type GetDocumentResponse = z.infer<typeof GetDocumentResponseSchema>;
|
|
998
|
+
declare const GatewayAgentInfoSchema: z.ZodObject<{
|
|
999
|
+
id: z.ZodString;
|
|
1000
|
+
name: z.ZodString;
|
|
1001
|
+
description: z.ZodString;
|
|
1002
|
+
tools: z.ZodArray<z.ZodString, "many">;
|
|
1003
|
+
platform: z.ZodNullable<z.ZodString>;
|
|
1004
|
+
hostname: z.ZodNullable<z.ZodString>;
|
|
1005
|
+
status: z.ZodEnum<["CONNECTED", "DISCONNECTED"]>;
|
|
1006
|
+
}, "strip", z.ZodTypeAny, {
|
|
1007
|
+
tools?: string[];
|
|
1008
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1009
|
+
id?: string;
|
|
1010
|
+
name?: string;
|
|
1011
|
+
description?: string;
|
|
1012
|
+
platform?: string;
|
|
1013
|
+
hostname?: string;
|
|
1014
|
+
}, {
|
|
1015
|
+
tools?: string[];
|
|
1016
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1017
|
+
id?: string;
|
|
1018
|
+
name?: string;
|
|
1019
|
+
description?: string;
|
|
1020
|
+
platform?: string;
|
|
1021
|
+
hostname?: string;
|
|
1022
|
+
}>;
|
|
1023
|
+
type GatewayAgentInfo = z.infer<typeof GatewayAgentInfoSchema>;
|
|
1024
|
+
declare const GetGatewaysResponseSchema: z.ZodObject<{
|
|
1025
|
+
gateways: z.ZodArray<z.ZodObject<{
|
|
1026
|
+
id: z.ZodString;
|
|
1027
|
+
name: z.ZodString;
|
|
1028
|
+
description: z.ZodString;
|
|
1029
|
+
tools: z.ZodArray<z.ZodString, "many">;
|
|
1030
|
+
platform: z.ZodNullable<z.ZodString>;
|
|
1031
|
+
hostname: z.ZodNullable<z.ZodString>;
|
|
1032
|
+
status: z.ZodEnum<["CONNECTED", "DISCONNECTED"]>;
|
|
1033
|
+
}, "strip", z.ZodTypeAny, {
|
|
1034
|
+
tools?: string[];
|
|
1035
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1036
|
+
id?: string;
|
|
1037
|
+
name?: string;
|
|
1038
|
+
description?: string;
|
|
1039
|
+
platform?: string;
|
|
1040
|
+
hostname?: string;
|
|
1041
|
+
}, {
|
|
1042
|
+
tools?: string[];
|
|
1043
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1044
|
+
id?: string;
|
|
1045
|
+
name?: string;
|
|
1046
|
+
description?: string;
|
|
1047
|
+
platform?: string;
|
|
1048
|
+
hostname?: string;
|
|
1049
|
+
}>, "many">;
|
|
1050
|
+
}, "strip", z.ZodTypeAny, {
|
|
1051
|
+
gateways?: {
|
|
1052
|
+
tools?: string[];
|
|
1053
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1054
|
+
id?: string;
|
|
1055
|
+
name?: string;
|
|
1056
|
+
description?: string;
|
|
1057
|
+
platform?: string;
|
|
1058
|
+
hostname?: string;
|
|
1059
|
+
}[];
|
|
1060
|
+
}, {
|
|
1061
|
+
gateways?: {
|
|
1062
|
+
tools?: string[];
|
|
1063
|
+
status?: "CONNECTED" | "DISCONNECTED";
|
|
1064
|
+
id?: string;
|
|
1065
|
+
name?: string;
|
|
1066
|
+
description?: string;
|
|
1067
|
+
platform?: string;
|
|
1068
|
+
hostname?: string;
|
|
1069
|
+
}[];
|
|
1070
|
+
}>;
|
|
1071
|
+
type GetGatewaysResponse = z.infer<typeof GetGatewaysResponseSchema>;
|
|
1072
|
+
declare const ExecuteGatewayInputSchema: z.ZodObject<{
|
|
1073
|
+
gatewayId: z.ZodString;
|
|
1074
|
+
intent: z.ZodString;
|
|
1075
|
+
}, "strip", z.ZodTypeAny, {
|
|
1076
|
+
gatewayId?: string;
|
|
1077
|
+
intent?: string;
|
|
1078
|
+
}, {
|
|
1079
|
+
gatewayId?: string;
|
|
1080
|
+
intent?: string;
|
|
1081
|
+
}>;
|
|
1082
|
+
type ExecuteGatewayInput = z.infer<typeof ExecuteGatewayInputSchema>;
|
|
1083
|
+
declare const ExecuteGatewayToolInputSchema: z.ZodObject<{
|
|
1084
|
+
gatewayId: z.ZodString;
|
|
1085
|
+
toolName: z.ZodString;
|
|
1086
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1087
|
+
}, "strip", z.ZodTypeAny, {
|
|
1088
|
+
params?: Record<string, unknown>;
|
|
1089
|
+
gatewayId?: string;
|
|
1090
|
+
toolName?: string;
|
|
1091
|
+
}, {
|
|
1092
|
+
params?: Record<string, unknown>;
|
|
1093
|
+
gatewayId?: string;
|
|
1094
|
+
toolName?: string;
|
|
1095
|
+
}>;
|
|
1096
|
+
type ExecuteGatewayToolInput = z.infer<typeof ExecuteGatewayToolInputSchema>;
|
|
1097
|
+
declare const ExecuteGatewayResponseSchema: z.ZodObject<{
|
|
1098
|
+
result: z.ZodUnknown;
|
|
1099
|
+
}, "strip", z.ZodTypeAny, {
|
|
1100
|
+
result?: unknown;
|
|
1101
|
+
}, {
|
|
1102
|
+
result?: unknown;
|
|
1103
|
+
}>;
|
|
1104
|
+
type ExecuteGatewayResponse = z.infer<typeof ExecuteGatewayResponseSchema>;
|
|
986
1105
|
declare const AuthorizationCodeResponseSchema: z.ZodObject<{
|
|
987
1106
|
authorizationCode: z.ZodString;
|
|
988
1107
|
url: z.ZodString;
|
|
@@ -1049,9 +1168,12 @@ declare class CoreClient {
|
|
|
1049
1168
|
getSessionId(): Promise<string>;
|
|
1050
1169
|
getDocuments(params?: GetDocumentsInput): Promise<GetDocumentsResponse>;
|
|
1051
1170
|
getDocument(params: GetDocumentInput): Promise<GetDocumentResponse>;
|
|
1171
|
+
getGateways(): Promise<GetGatewaysResponse>;
|
|
1172
|
+
executeGateway(params: ExecuteGatewayInput): Promise<ExecuteGatewayResponse>;
|
|
1173
|
+
executeGatewayTool(params: ExecuteGatewayToolInput): Promise<ExecuteGatewayResponse>;
|
|
1052
1174
|
getAuthorizationCode(): Promise<AuthorizationCodeResponse>;
|
|
1053
1175
|
exchangeToken(params: TokenExchangeInput): Promise<TokenExchangeResponse>;
|
|
1054
1176
|
checkAuth(): Promise<MeResponse>;
|
|
1055
1177
|
}
|
|
1056
1178
|
|
|
1057
|
-
export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type UserConfirmationStatus, UserTypeEnum };
|
|
1179
|
+
export { APIKeyParams, ActionStatus, ActionStatusEnum, type AddEpisodeParams, type AddEpisodeResult, type AdjacentChunks, type AuthType, type AuthorizationCodeResponse, AuthorizationCodeResponseSchema, COMPACTED_SESSION_NODE_PROPERTIES, ClaudeModels, type CompactedSessionNode, type Config, CoreClient, CoreClientError, type CoreClientOptions, type CreatePatternParams, type DocumentNode, DocumentSchema, ENTITY_NODE_PROPERTIES, EPISODIC_NODE_PROPERTIES, EXPLICIT_PATTERN_TYPES, type EntityNode, type EntityType, EntityTypes, type EpisodeSearchResult, EpisodeType, EpisodeTypeEnum, type EpisodeWithProvenance, type EpisodicNode, type EpisodicNodeWithoutEmbeddings, type ExecuteGatewayInput, ExecuteGatewayInputSchema, type ExecuteGatewayResponse, ExecuteGatewayResponseSchema, type ExecuteGatewayToolInput, ExecuteGatewayToolInputSchema, type ExecuteIntegrationActionInput, ExecuteIntegrationActionInputSchema, type ExecuteIntegrationActionResponse, ExecuteIntegrationActionResponseSchema, type ExplicitPatternType, type ExtractedTripleData, type GatewayAgentInfo, GatewayAgentInfoSchema, GeminiModels, type GetDocumentInput, GetDocumentInputSchema, type GetDocumentResponse, GetDocumentResponseSchema, type GetDocumentsInput, GetDocumentsInputSchema, type GetDocumentsResponse, GetDocumentsResponseSchema, type GetGatewaysResponse, GetGatewaysResponseSchema, type GetIntegrationActionsInput, GetIntegrationActionsInputSchema, type GetIntegrationActionsResponse, GetIntegrationActionsResponseSchema, type GetIntegrationsConnectedResponse, GetIntegrationsConnectedResponseSchema, IMPLICIT_PATTERN_TYPES, type Identifier, type ImplicitPatternType, type IngestInput, IngestInputSchema, type IngestResponse, IngestResponseSchema, IntegrationAccountSchema, IntegrationCLI, type IntegrationEventPayload, IntegrationEventType, LLMMappings, LLMModelEnum, LLMModelType, McpAuthParams, type MeResponse, MeResponseSchema, type Message, type MessageType, OAuth2Params, OpenAIModels, PATTERN_TYPES, type Param, type PatternConfirmationParams, type PatternDetectionResult, type PatternType, QUALITY_THRESHOLDS, type QualityFilterResult, type RerankConfig, STATEMENT_NODE_PROPERTIES, type SearchInput, SearchInputSchema, type SearchOptions, type SearchResponse, SearchResponseSchema, type SpaceAssignmentResult, type SpaceDeletionResult, type SpaceNode, type SpacePattern, Spec, type StatementAspect, StatementAspects, type StatementNode, type StatementWithSource, type TokenExchangeInput, TokenExchangeInputSchema, type TokenExchangeResponse, TokenExchangeResponseSchema, type Triple, type UserConfirmationStatus, UserTypeEnum };
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,7 @@ var EPISODIC_NODE_PROPERTIES = `{
|
|
|
87
87
|
metadata: e.metadata,
|
|
88
88
|
createdAt: e.createdAt,
|
|
89
89
|
userId: e.userId,
|
|
90
|
+
workspaceId: e.workspaceId,
|
|
90
91
|
sessionId: e.sessionId,
|
|
91
92
|
queueId: e.queueId,
|
|
92
93
|
labelIds: e.labelIds,
|
|
@@ -105,6 +106,7 @@ var STATEMENT_NODE_PROPERTIES = `{
|
|
|
105
106
|
fact: s.fact,
|
|
106
107
|
createdAt: s.createdAt,
|
|
107
108
|
userId: s.userId,
|
|
109
|
+
workspaceId: s.workspaceId,
|
|
108
110
|
validAt: s.validAt,
|
|
109
111
|
invalidAt: s.invalidAt,
|
|
110
112
|
invalidatedBy: s.invalidatedBy,
|
|
@@ -119,6 +121,7 @@ var ENTITY_NODE_PROPERTIES = `{
|
|
|
119
121
|
type: ent.type,
|
|
120
122
|
createdAt: ent.createdAt,
|
|
121
123
|
userId: ent.userId,
|
|
124
|
+
workspaceId: ent.workspaceId,
|
|
122
125
|
attributes: ent.attributes
|
|
123
126
|
}`;
|
|
124
127
|
var COMPACTED_SESSION_NODE_PROPERTIES = `{
|
|
@@ -132,6 +135,7 @@ var COMPACTED_SESSION_NODE_PROPERTIES = `{
|
|
|
132
135
|
updatedAt: cs.updatedAt,
|
|
133
136
|
confidence: cs.confidence,
|
|
134
137
|
userId: cs.userId,
|
|
138
|
+
workspaceId: cs.workspaceId,
|
|
135
139
|
source: cs.source,
|
|
136
140
|
compressionRatio: cs.compressionRatio,
|
|
137
141
|
metadata: cs.metadata
|
|
@@ -154,7 +158,7 @@ var StatementAspects = [
|
|
|
154
158
|
"Knowledge",
|
|
155
159
|
"Belief",
|
|
156
160
|
"Preference",
|
|
157
|
-
"
|
|
161
|
+
"Habit",
|
|
158
162
|
"Goal",
|
|
159
163
|
"Directive",
|
|
160
164
|
"Decision",
|
|
@@ -198,11 +202,6 @@ var OAuth2Params = class {
|
|
|
198
202
|
__name(this, "OAuth2Params");
|
|
199
203
|
}
|
|
200
204
|
};
|
|
201
|
-
var APIKeyParams = class {
|
|
202
|
-
static {
|
|
203
|
-
__name(this, "APIKeyParams");
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
205
|
|
|
207
206
|
// ../types/dist/integration.js
|
|
208
207
|
exports.IntegrationEventType = void 0;
|
|
@@ -531,6 +530,33 @@ var GetDocumentInputSchema = zod.z.object({
|
|
|
531
530
|
var GetDocumentResponseSchema = zod.z.object({
|
|
532
531
|
document: DocumentSchema.nullable()
|
|
533
532
|
});
|
|
533
|
+
var GatewayAgentInfoSchema = zod.z.object({
|
|
534
|
+
id: zod.z.string(),
|
|
535
|
+
name: zod.z.string(),
|
|
536
|
+
description: zod.z.string(),
|
|
537
|
+
tools: zod.z.array(zod.z.string()),
|
|
538
|
+
platform: zod.z.string().nullable(),
|
|
539
|
+
hostname: zod.z.string().nullable(),
|
|
540
|
+
status: zod.z.enum([
|
|
541
|
+
"CONNECTED",
|
|
542
|
+
"DISCONNECTED"
|
|
543
|
+
])
|
|
544
|
+
});
|
|
545
|
+
var GetGatewaysResponseSchema = zod.z.object({
|
|
546
|
+
gateways: zod.z.array(GatewayAgentInfoSchema)
|
|
547
|
+
});
|
|
548
|
+
var ExecuteGatewayInputSchema = zod.z.object({
|
|
549
|
+
gatewayId: zod.z.string(),
|
|
550
|
+
intent: zod.z.string()
|
|
551
|
+
});
|
|
552
|
+
var ExecuteGatewayToolInputSchema = zod.z.object({
|
|
553
|
+
gatewayId: zod.z.string(),
|
|
554
|
+
toolName: zod.z.string(),
|
|
555
|
+
params: zod.z.record(zod.z.unknown())
|
|
556
|
+
});
|
|
557
|
+
var ExecuteGatewayResponseSchema = zod.z.object({
|
|
558
|
+
result: zod.z.unknown()
|
|
559
|
+
});
|
|
534
560
|
var AuthorizationCodeResponseSchema = zod.z.object({
|
|
535
561
|
authorizationCode: zod.z.string(),
|
|
536
562
|
url: zod.z.string()
|
|
@@ -708,6 +734,37 @@ var CoreClient = class {
|
|
|
708
734
|
async getDocument(params) {
|
|
709
735
|
return this.request("GET", `/api/v1/documents/${params.documentId}`);
|
|
710
736
|
}
|
|
737
|
+
/**
|
|
738
|
+
* List all connected gateways for the workspace.
|
|
739
|
+
* GET /api/v1/gateways
|
|
740
|
+
*/
|
|
741
|
+
async getGateways() {
|
|
742
|
+
return this.request("GET", "/api/v1/gateways");
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Run a gateway sub-agent with an intent and return the final text result.
|
|
746
|
+
* POST /api/v1/gateways/:gatewayId/execute
|
|
747
|
+
*/
|
|
748
|
+
async executeGateway(params) {
|
|
749
|
+
return this.request("POST", `/api/v1/gateways/${params.gatewayId}/execute`, {
|
|
750
|
+
body: {
|
|
751
|
+
intent: params.intent
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Proxy a single tool call to a gateway via server websocket.
|
|
757
|
+
* POST /api/v1/gateways/:gatewayId/execute (mode: "tool")
|
|
758
|
+
*/
|
|
759
|
+
async executeGatewayTool(params) {
|
|
760
|
+
return this.request("POST", `/api/v1/gateways/${params.gatewayId}/execute`, {
|
|
761
|
+
body: {
|
|
762
|
+
mode: "tool",
|
|
763
|
+
toolName: params.toolName,
|
|
764
|
+
params: params.params
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
711
768
|
// -------------------------------------------------------------------------
|
|
712
769
|
// Auth – Device-style login flow (public endpoints, no token required)
|
|
713
770
|
// -------------------------------------------------------------------------
|
|
@@ -742,7 +799,6 @@ var CoreClient = class {
|
|
|
742
799
|
}
|
|
743
800
|
};
|
|
744
801
|
|
|
745
|
-
exports.APIKeyParams = APIKeyParams;
|
|
746
802
|
exports.ActionStatus = ActionStatus;
|
|
747
803
|
exports.AuthorizationCodeResponseSchema = AuthorizationCodeResponseSchema;
|
|
748
804
|
exports.COMPACTED_SESSION_NODE_PROPERTIES = COMPACTED_SESSION_NODE_PROPERTIES;
|
|
@@ -755,13 +811,18 @@ exports.EPISODIC_NODE_PROPERTIES = EPISODIC_NODE_PROPERTIES;
|
|
|
755
811
|
exports.EXPLICIT_PATTERN_TYPES = EXPLICIT_PATTERN_TYPES;
|
|
756
812
|
exports.EntityTypes = EntityTypes;
|
|
757
813
|
exports.EpisodeType = EpisodeType;
|
|
814
|
+
exports.ExecuteGatewayInputSchema = ExecuteGatewayInputSchema;
|
|
815
|
+
exports.ExecuteGatewayResponseSchema = ExecuteGatewayResponseSchema;
|
|
816
|
+
exports.ExecuteGatewayToolInputSchema = ExecuteGatewayToolInputSchema;
|
|
758
817
|
exports.ExecuteIntegrationActionInputSchema = ExecuteIntegrationActionInputSchema;
|
|
759
818
|
exports.ExecuteIntegrationActionResponseSchema = ExecuteIntegrationActionResponseSchema;
|
|
819
|
+
exports.GatewayAgentInfoSchema = GatewayAgentInfoSchema;
|
|
760
820
|
exports.GeminiModels = GeminiModels;
|
|
761
821
|
exports.GetDocumentInputSchema = GetDocumentInputSchema;
|
|
762
822
|
exports.GetDocumentResponseSchema = GetDocumentResponseSchema;
|
|
763
823
|
exports.GetDocumentsInputSchema = GetDocumentsInputSchema;
|
|
764
824
|
exports.GetDocumentsResponseSchema = GetDocumentsResponseSchema;
|
|
825
|
+
exports.GetGatewaysResponseSchema = GetGatewaysResponseSchema;
|
|
765
826
|
exports.GetIntegrationActionsInputSchema = GetIntegrationActionsInputSchema;
|
|
766
827
|
exports.GetIntegrationActionsResponseSchema = GetIntegrationActionsResponseSchema;
|
|
767
828
|
exports.GetIntegrationsConnectedResponseSchema = GetIntegrationsConnectedResponseSchema;
|