@redplanethq/sdk 0.1.17 → 1.2.1
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/CHANGELOG.md +1657 -0
- package/LICENSE.md +30 -0
- package/README.md +159 -183
- package/dist/__tests__/__fixtures__/network.stream.d.ts +2329 -0
- package/dist/__tests__/__fixtures__/network.stream.d.ts.map +1 -0
- package/dist/_types/@ai-sdk_provider/dist/index.d.ts +1725 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +10332 -0
- package/dist/_types/@internal_ai-v6/dist/index.d.ts +13493 -0
- package/dist/chat-route.d.ts +117 -0
- package/dist/chat-route.d.ts.map +1 -0
- package/dist/chunk-3YJ25IUJ.js +79 -0
- package/dist/chunk-3YJ25IUJ.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +10 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-HDI4ZP7N.js +79 -0
- package/dist/chunk-HDI4ZP7N.js.map +1 -0
- package/dist/chunk-HMOX24BQ.js +439 -0
- package/dist/chunk-HMOX24BQ.js.map +1 -0
- package/dist/chunk-IV3RKEE4.js +439 -0
- package/dist/chunk-IV3RKEE4.js.map +1 -0
- package/dist/chunk-JEQ2X3Z6.cjs +12 -0
- package/dist/chunk-JEQ2X3Z6.cjs.map +1 -0
- package/dist/chunk-PEZAMDZJ.cjs +84 -0
- package/dist/chunk-PEZAMDZJ.cjs.map +1 -0
- package/dist/chunk-VJW66KXQ.cjs +441 -0
- package/dist/chunk-VJW66KXQ.cjs.map +1 -0
- package/dist/chunk-WFARZCDO.cjs +84 -0
- package/dist/chunk-WFARZCDO.cjs.map +1 -0
- package/dist/chunk-X72VW7EY.cjs +441 -0
- package/dist/chunk-X72VW7EY.cjs.map +1 -0
- package/dist/convert-messages.d.ts +90 -0
- package/dist/convert-messages.d.ts.map +1 -0
- package/dist/convert-streams.d.ts +59 -0
- package/dist/convert-streams.d.ts.map +1 -0
- package/dist/helpers.d.ts +59 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/index.cjs +14385 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +14 -1245
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14289 -804
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +159 -0
- package/dist/middleware.d.ts.map +1 -0
- package/dist/network-route.d.ts +84 -0
- package/dist/network-route.d.ts.map +1 -0
- package/dist/public-types.d.ts +9 -0
- package/dist/public-types.d.ts.map +1 -0
- package/dist/to-ai-sdk-format.d.ts +16 -0
- package/dist/to-ai-sdk-format.d.ts.map +1 -0
- package/dist/token-APYSY3BW-CBIBV5F2.js +61 -0
- package/dist/token-APYSY3BW-CBIBV5F2.js.map +1 -0
- package/dist/token-APYSY3BW-INR55PKP.js +61 -0
- package/dist/token-APYSY3BW-INR55PKP.js.map +1 -0
- package/dist/token-APYSY3BW-M2K6HVOG.cjs +63 -0
- package/dist/token-APYSY3BW-M2K6HVOG.cjs.map +1 -0
- package/dist/token-APYSY3BW-Y5VD4L7Z.cjs +63 -0
- package/dist/token-APYSY3BW-Y5VD4L7Z.cjs.map +1 -0
- package/dist/token-util-RMHT2CPJ-3LCBPXJ6.cjs +10 -0
- package/dist/token-util-RMHT2CPJ-3LCBPXJ6.cjs.map +1 -0
- package/dist/token-util-RMHT2CPJ-4YTBAZ23.cjs +10 -0
- package/dist/token-util-RMHT2CPJ-4YTBAZ23.cjs.map +1 -0
- package/dist/token-util-RMHT2CPJ-HCMQIDTV.js +8 -0
- package/dist/token-util-RMHT2CPJ-HCMQIDTV.js.map +1 -0
- package/dist/token-util-RMHT2CPJ-IOKQM5O3.js +8 -0
- package/dist/token-util-RMHT2CPJ-IOKQM5O3.js.map +1 -0
- package/dist/transformers.d.ts +315 -0
- package/dist/transformers.d.ts.map +1 -0
- package/dist/ui.cjs +15 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +12 -0
- package/dist/ui.js.map +1 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/workflow-route.d.ts +93 -0
- package/dist/workflow-route.d.ts.map +1 -0
- package/package.json +65 -31
- package/ui.d.ts +1 -0
- package/LICENSE +0 -44
- package/dist/index.d.mts +0 -1245
- package/dist/index.mjs +0 -822
- package/dist/index.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,1245 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
GEMINI25FLASH = "GEMINI25FLASH",
|
|
16
|
-
GEMINI25PRO = "GEMINI25PRO",
|
|
17
|
-
GEMINI20FLASH = "GEMINI20FLASH",
|
|
18
|
-
GEMINI20FLASHLITE = "GEMINI20FLASHLITE"
|
|
19
|
-
}
|
|
20
|
-
declare enum LLMMappings {
|
|
21
|
-
GPT35TURBO = "gpt-3.5-turbo",
|
|
22
|
-
GPT4TURBO = "gpt-4-turbo",
|
|
23
|
-
GPT4O = "gpt-4o",
|
|
24
|
-
GPT41 = "gpt-4.1-2025-04-14",
|
|
25
|
-
GPT41MINI = "gpt-4.1-mini-2025-04-14",
|
|
26
|
-
GPT41NANO = "gpt-4.1-nano-2025-04-14",
|
|
27
|
-
LLAMA3 = "llama3",
|
|
28
|
-
CLAUDEOPUS = "claude-3-opus-20240229",
|
|
29
|
-
CLAUDESONNET = "claude-3-7-sonnet-20250219",
|
|
30
|
-
CLAUDEHAIKU = "claude-3-5-haiku-20241022",
|
|
31
|
-
GEMINI25FLASH = "gemini-2.5-flash-preview-04-17",
|
|
32
|
-
GEMINI25PRO = "gemini-2.5-pro-preview-03-25",
|
|
33
|
-
GEMINI20FLASH = "gemini-2.0-flash",
|
|
34
|
-
GEMINI20FLASHLITE = "gemini-2.0-flash-lite"
|
|
35
|
-
}
|
|
36
|
-
declare const OpenAIModels: LLMModelEnum[];
|
|
37
|
-
declare const ClaudeModels: LLMModelEnum[];
|
|
38
|
-
declare const GeminiModels: LLMModelEnum[];
|
|
39
|
-
declare const LLMModelType: {
|
|
40
|
-
GPT35TURBO: string;
|
|
41
|
-
GPT4TURBO: string;
|
|
42
|
-
GPT4O: string;
|
|
43
|
-
GPT41: string;
|
|
44
|
-
GPT41MINI: string;
|
|
45
|
-
GPT41NANO: string;
|
|
46
|
-
LLAMA3: string;
|
|
47
|
-
CLAUDEOPUS: string;
|
|
48
|
-
CLAUDESONNET: string;
|
|
49
|
-
CLAUDEHAIKU: string;
|
|
50
|
-
GEMINI25FLASH: string;
|
|
51
|
-
GEMINI25PRO: string;
|
|
52
|
-
GEMINI20FLASH: string;
|
|
53
|
-
GEMINI20FLASHLITE: string;
|
|
54
|
-
};
|
|
55
|
-
type LLMModelType = (typeof LLMModelType)[keyof typeof LLMModelType];
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Interface for document node in the reified knowledge graph
|
|
59
|
-
* Documents are parent containers for episodic chunks
|
|
60
|
-
*/
|
|
61
|
-
interface DocumentNode {
|
|
62
|
-
uuid: string;
|
|
63
|
-
title: string;
|
|
64
|
-
originalContent: string;
|
|
65
|
-
metadata: Record<string, any>;
|
|
66
|
-
source: string;
|
|
67
|
-
userId: string;
|
|
68
|
-
workspaceId?: string;
|
|
69
|
-
createdAt: Date;
|
|
70
|
-
validAt: Date;
|
|
71
|
-
totalChunks: number;
|
|
72
|
-
sessionId?: string;
|
|
73
|
-
version: number;
|
|
74
|
-
contentHash: string;
|
|
75
|
-
previousVersionUuid?: string;
|
|
76
|
-
chunkHashes?: string[];
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Interface for episodic node in the reified knowledge graph
|
|
80
|
-
* Episodes are containers for statements and represent source information
|
|
81
|
-
* Unified architecture: Both conversations and documents use Episodes with sessionId grouping
|
|
82
|
-
*/
|
|
83
|
-
interface EpisodicNode {
|
|
84
|
-
uuid: string;
|
|
85
|
-
content: string;
|
|
86
|
-
originalContent: string;
|
|
87
|
-
contentEmbedding?: number[];
|
|
88
|
-
metadata: Record<string, any>;
|
|
89
|
-
source: string;
|
|
90
|
-
createdAt: Date;
|
|
91
|
-
validAt: Date;
|
|
92
|
-
labelIds: string[];
|
|
93
|
-
userId: string;
|
|
94
|
-
workspaceId?: string;
|
|
95
|
-
sessionId: string;
|
|
96
|
-
queueId?: string;
|
|
97
|
-
type?: EpisodeType;
|
|
98
|
-
chunkIndex?: number;
|
|
99
|
-
totalChunks?: number;
|
|
100
|
-
version?: number;
|
|
101
|
-
contentHash?: string;
|
|
102
|
-
previousVersionSessionId?: string;
|
|
103
|
-
chunkHashes?: string[];
|
|
104
|
-
recallCount?: number;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Episodic node without embeddings for query responses
|
|
108
|
-
* Use this type when returning episodes from Cypher queries to avoid loading large embedding arrays
|
|
109
|
-
*/
|
|
110
|
-
type EpisodicNodeWithoutEmbeddings = Omit<EpisodicNode, "contentEmbedding">;
|
|
111
|
-
/**
|
|
112
|
-
* Helper to get episodic node properties for Cypher RETURN clause (excludes embeddings)
|
|
113
|
-
* Usage in Cypher: RETURN ${EPISODIC_NODE_PROPERTIES} as episode
|
|
114
|
-
*/
|
|
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}";
|
|
119
|
-
/**
|
|
120
|
-
* Entity types for the knowledge graph (10 types)
|
|
121
|
-
* Only NAMED, SEARCHABLE entities - no generic vocabulary
|
|
122
|
-
*/
|
|
123
|
-
declare const EntityTypes: readonly ["Person", "Organization", "Place", "Event", "Project", "Task", "Technology", "Product", "Standard", "Concept", "Predicate"];
|
|
124
|
-
type EntityType = (typeof EntityTypes)[number];
|
|
125
|
-
/**
|
|
126
|
-
* Interface for entity node in the reified knowledge graph
|
|
127
|
-
* Entities represent subjects, objects, or predicates in statements
|
|
128
|
-
*/
|
|
129
|
-
interface EntityNode {
|
|
130
|
-
uuid: string;
|
|
131
|
-
name: string;
|
|
132
|
-
type?: EntityType;
|
|
133
|
-
nameEmbedding?: number[];
|
|
134
|
-
attributes?: Record<string, any>;
|
|
135
|
-
createdAt: Date;
|
|
136
|
-
userId: string;
|
|
137
|
-
workspaceId?: string;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Statement aspects for classification
|
|
141
|
-
* These are the types of knowledge a statement can represent
|
|
142
|
-
*
|
|
143
|
-
* Categories:
|
|
144
|
-
* 1. Identity - Who they are (slow-changing): role, location, affiliation
|
|
145
|
-
* 2. Knowledge - What they know: expertise, skills, understanding
|
|
146
|
-
* 3. Belief - Why they think that way: values, opinions, reasoning
|
|
147
|
-
* 4. Preference - How they want things: likes, dislikes, style choices
|
|
148
|
-
* 5. Action - What they do: observable behaviors, habits, practices
|
|
149
|
-
* 6. Goal - What they want to achieve: future targets, aims
|
|
150
|
-
* 7. Directive - Rules and automation: always do X, notify when Y, remind me to Z
|
|
151
|
-
* 8. Decision - Choices made, conclusions reached
|
|
152
|
-
* 9. Event - Specific occurrences with timestamps
|
|
153
|
-
* 10. Problem - Blockers, issues, challenges
|
|
154
|
-
* 11. Relationship - Connections between people
|
|
155
|
-
*/
|
|
156
|
-
declare const StatementAspects: readonly ["Identity", "Knowledge", "Belief", "Preference", "Habit", "Goal", "Task", "Directive", "Decision", "Event", "Problem", "Relationship"];
|
|
157
|
-
type StatementAspect = (typeof StatementAspects)[number];
|
|
158
|
-
/**
|
|
159
|
-
* Voice Aspects — User's voice: stored as complete non-decomposed statements in Aspects Store.
|
|
160
|
-
* These represent what the user SPEAKS (rules, preferences, beliefs, goals, habits).
|
|
161
|
-
*/
|
|
162
|
-
declare const VOICE_ASPECTS: readonly ["Directive", "Preference", "Habit", "Belief", "Goal", "Task"];
|
|
163
|
-
type VoiceAspect = (typeof VOICE_ASPECTS)[number];
|
|
164
|
-
/**
|
|
165
|
-
* Graph Aspects — User's world: stored as atomic SPO triples in Neo4j.
|
|
166
|
-
* These represent what the user OBSERVES (who they are, what happened, who's connected).
|
|
167
|
-
*/
|
|
168
|
-
declare const GRAPH_ASPECTS: readonly ["Identity", "Event", "Relationship", "Decision", "Knowledge", "Problem", "Task"];
|
|
169
|
-
type GraphAspect = (typeof GRAPH_ASPECTS)[number];
|
|
170
|
-
/**
|
|
171
|
-
* Voice Aspect node — stored in Aspects Store (Postgres table + vector namespace).
|
|
172
|
-
* Complete non-decomposed statements representing the user's voice.
|
|
173
|
-
*/
|
|
174
|
-
interface VoiceAspectNode {
|
|
175
|
-
uuid: string;
|
|
176
|
-
fact: string;
|
|
177
|
-
aspect: VoiceAspect;
|
|
178
|
-
userId: string;
|
|
179
|
-
workspaceId?: string;
|
|
180
|
-
episodeUuids: string[];
|
|
181
|
-
createdAt: Date;
|
|
182
|
-
validAt: Date;
|
|
183
|
-
invalidAt: Date | null;
|
|
184
|
-
invalidatedBy?: string;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Interface for statement node in the reified knowledge graph
|
|
188
|
-
* Statements are first-class objects representing facts with temporal properties
|
|
189
|
-
*/
|
|
190
|
-
interface StatementNode {
|
|
191
|
-
uuid: string;
|
|
192
|
-
fact: string;
|
|
193
|
-
factEmbedding: number[];
|
|
194
|
-
createdAt: Date;
|
|
195
|
-
validAt: Date;
|
|
196
|
-
invalidAt: Date | null;
|
|
197
|
-
invalidatedBy?: string;
|
|
198
|
-
attributes: Record<string, any>;
|
|
199
|
-
userId: string;
|
|
200
|
-
workspaceId?: string;
|
|
201
|
-
labelIds?: string[];
|
|
202
|
-
aspect?: StatementAspect | null;
|
|
203
|
-
recallCount?: {
|
|
204
|
-
low: number;
|
|
205
|
-
high: number;
|
|
206
|
-
};
|
|
207
|
-
provenanceCount?: number;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Interface for a triple in the reified knowledge graph
|
|
211
|
-
* A triple connects a subject, predicate, object via a statement node
|
|
212
|
-
* and maintains provenance information
|
|
213
|
-
*/
|
|
214
|
-
interface Triple {
|
|
215
|
-
statement: StatementNode;
|
|
216
|
-
subject: EntityNode;
|
|
217
|
-
predicate: EntityNode;
|
|
218
|
-
object: EntityNode;
|
|
219
|
-
provenance: EpisodicNode;
|
|
220
|
-
}
|
|
221
|
-
declare enum EpisodeTypeEnum {
|
|
222
|
-
CONVERSATION = "CONVERSATION",
|
|
223
|
-
DOCUMENT = "DOCUMENT"
|
|
224
|
-
}
|
|
225
|
-
declare const EpisodeType: {
|
|
226
|
-
CONVERSATION: string;
|
|
227
|
-
DOCUMENT: string;
|
|
228
|
-
IMAGE: string;
|
|
229
|
-
};
|
|
230
|
-
type EpisodeType = (typeof EpisodeType)[keyof typeof EpisodeType];
|
|
231
|
-
type AddEpisodeParams = {
|
|
232
|
-
episodeBody: string;
|
|
233
|
-
originalEpisodeBody: string;
|
|
234
|
-
referenceTime: Date;
|
|
235
|
-
metadata?: Record<string, any>;
|
|
236
|
-
source: string;
|
|
237
|
-
userId: string;
|
|
238
|
-
workspaceId?: string;
|
|
239
|
-
userName?: string;
|
|
240
|
-
labelIds?: string[];
|
|
241
|
-
sessionId: string;
|
|
242
|
-
queueId: string;
|
|
243
|
-
type?: EpisodeType;
|
|
244
|
-
chunkIndex?: number;
|
|
245
|
-
totalChunks?: number;
|
|
246
|
-
version?: number;
|
|
247
|
-
contentHash?: string;
|
|
248
|
-
previousVersionSessionId?: string;
|
|
249
|
-
chunkHashes?: string[];
|
|
250
|
-
episodeUuid?: string;
|
|
251
|
-
};
|
|
252
|
-
type AddEpisodeResult = {
|
|
253
|
-
episodeUuid: string | null;
|
|
254
|
-
type: EpisodeType;
|
|
255
|
-
statementsCreated: number;
|
|
256
|
-
voiceAspectsCreated: number;
|
|
257
|
-
processingTimeMs: number;
|
|
258
|
-
tokenUsage?: {
|
|
259
|
-
high: {
|
|
260
|
-
input: number;
|
|
261
|
-
output: number;
|
|
262
|
-
total: number;
|
|
263
|
-
};
|
|
264
|
-
low: {
|
|
265
|
-
input: number;
|
|
266
|
-
output: number;
|
|
267
|
-
total: number;
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
totalChunks?: number;
|
|
271
|
-
currentChunk?: number;
|
|
272
|
-
};
|
|
273
|
-
interface ExtractedTripleData {
|
|
274
|
-
source: string;
|
|
275
|
-
sourceType?: string;
|
|
276
|
-
predicate: string;
|
|
277
|
-
target: string;
|
|
278
|
-
targetType?: string;
|
|
279
|
-
fact: string;
|
|
280
|
-
aspect?: StatementAspect | null;
|
|
281
|
-
attributes?: Record<string, any>;
|
|
282
|
-
}
|
|
283
|
-
interface CompactedSessionNode {
|
|
284
|
-
uuid: string;
|
|
285
|
-
sessionId: string;
|
|
286
|
-
summary: string;
|
|
287
|
-
summaryEmbedding?: number[];
|
|
288
|
-
episodeCount: number;
|
|
289
|
-
startTime: Date;
|
|
290
|
-
endTime: Date;
|
|
291
|
-
createdAt: Date;
|
|
292
|
-
updatedAt?: Date;
|
|
293
|
-
confidence: number;
|
|
294
|
-
userId: string;
|
|
295
|
-
workspaceId?: string;
|
|
296
|
-
source: string;
|
|
297
|
-
compressionRatio?: number;
|
|
298
|
-
metadata?: Record<string, any>;
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Interface for space node - a collection of related episodes
|
|
302
|
-
* Spaces help organize memory by topics, projects, or contexts
|
|
303
|
-
*/
|
|
304
|
-
interface SpaceNode {
|
|
305
|
-
uuid: string;
|
|
306
|
-
name: string;
|
|
307
|
-
description: string;
|
|
308
|
-
userId: string;
|
|
309
|
-
workspaceId?: string;
|
|
310
|
-
createdAt: Date;
|
|
311
|
-
updatedAt: Date;
|
|
312
|
-
isActive: boolean;
|
|
313
|
-
contextCount?: number;
|
|
314
|
-
type?: string;
|
|
315
|
-
summaryStructure?: string;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Result type for space deletion operations
|
|
319
|
-
*/
|
|
320
|
-
interface SpaceDeletionResult {
|
|
321
|
-
deleted: boolean;
|
|
322
|
-
statementsUpdated: number;
|
|
323
|
-
error?: string;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Result type for space assignment operations
|
|
327
|
-
*/
|
|
328
|
-
interface SpaceAssignmentResult {
|
|
329
|
-
success: boolean;
|
|
330
|
-
statementsUpdated: number;
|
|
331
|
-
error?: string;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Adjacent episode chunks result
|
|
335
|
-
*/
|
|
336
|
-
interface AdjacentChunks {
|
|
337
|
-
matchedChunk: EpisodicNode;
|
|
338
|
-
previousChunk?: EpisodicNode;
|
|
339
|
-
nextChunk?: EpisodicNode;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
declare enum ActionStatusEnum {
|
|
343
|
-
ACCEPT = "ACCEPT",
|
|
344
|
-
DECLINE = "DECLINE",
|
|
345
|
-
QUESTION = "QUESTION",
|
|
346
|
-
TOOL_REQUEST = "TOOL_REQUEST",
|
|
347
|
-
SUCCESS = "SUCCESS",
|
|
348
|
-
FAILED = "FAILED"
|
|
349
|
-
}
|
|
350
|
-
declare const ActionStatus: {
|
|
351
|
-
ACCEPT: string;
|
|
352
|
-
DECLINE: string;
|
|
353
|
-
QUESTION: string;
|
|
354
|
-
TOOL_REQUEST: string;
|
|
355
|
-
SUCCESS: string;
|
|
356
|
-
FAILED: string;
|
|
357
|
-
};
|
|
358
|
-
type ActionStatus = (typeof ActionStatus)[keyof typeof ActionStatus];
|
|
359
|
-
|
|
360
|
-
declare class OAuth2Params {
|
|
361
|
-
authorization_url: string;
|
|
362
|
-
authorization_params?: Record<string, string>;
|
|
363
|
-
default_scopes?: string[];
|
|
364
|
-
scope_separator?: string;
|
|
365
|
-
scope_identifier?: string;
|
|
366
|
-
token_url: string;
|
|
367
|
-
token_params?: Record<string, string>;
|
|
368
|
-
redirect_uri_metadata?: string[];
|
|
369
|
-
token_response_metadata?: string[];
|
|
370
|
-
token_expiration_buffer?: number;
|
|
371
|
-
scopes?: string[];
|
|
372
|
-
token_request_auth_method?: string;
|
|
373
|
-
}
|
|
374
|
-
type AuthType = "OAuth2" | "api_key" | "mcp";
|
|
375
|
-
type Param = {
|
|
376
|
-
name: string;
|
|
377
|
-
label: string;
|
|
378
|
-
placeholder: string;
|
|
379
|
-
description: string;
|
|
380
|
-
};
|
|
381
|
-
declare class APIKeyParams {
|
|
382
|
-
fields: Array<Param>;
|
|
383
|
-
}
|
|
384
|
-
declare class McpAuthParams {
|
|
385
|
-
server_url: string;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
interface WidgetRenderContext {
|
|
389
|
-
placement: 'tui' | 'webapp';
|
|
390
|
-
pat: string;
|
|
391
|
-
accounts: Array<{
|
|
392
|
-
id: string;
|
|
393
|
-
slug: string;
|
|
394
|
-
name?: string;
|
|
395
|
-
}>;
|
|
396
|
-
baseUrl: string;
|
|
397
|
-
/** Call to trigger a TUI re-render after updating internal state (TUI only) */
|
|
398
|
-
requestRender?: () => void;
|
|
399
|
-
}
|
|
400
|
-
/** Metadata only — used in integration Spec (no render function) */
|
|
401
|
-
interface WidgetMeta {
|
|
402
|
-
name: string;
|
|
403
|
-
slug: string;
|
|
404
|
-
description: string;
|
|
405
|
-
support: Array<'tui' | 'webapp'>;
|
|
406
|
-
tuiPlacement?: 'overview' | 'below-input';
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* A zero-argument React function component (webapp placement).
|
|
410
|
-
* Context (pat, accountId, baseUrl) is baked in via closure.
|
|
411
|
-
*/
|
|
412
|
-
type WebWidgetComponent = () => unknown;
|
|
413
|
-
/**
|
|
414
|
-
* A pi-tui Component instance (tui placement).
|
|
415
|
-
* Returned by createPlayer / createList / etc. from @redplanethq/ui/tui.
|
|
416
|
-
*/
|
|
417
|
-
type TuiWidgetComponent = object;
|
|
418
|
-
/** Union of the two surface-specific component types */
|
|
419
|
-
type WidgetComponent = WebWidgetComponent | TuiWidgetComponent;
|
|
420
|
-
/** Full widget — used in widgets/index.ts (includes render) */
|
|
421
|
-
interface WidgetSpec extends WidgetMeta {
|
|
422
|
-
render(context: WidgetRenderContext): Promise<WidgetComponent>;
|
|
423
|
-
}
|
|
424
|
-
declare enum IntegrationEventType {
|
|
425
|
-
/**
|
|
426
|
-
* Processes authentication data and returns tokens/credentials to be saved
|
|
427
|
-
*/
|
|
428
|
-
SETUP = "setup",
|
|
429
|
-
/**
|
|
430
|
-
* Processing incoming data from the integration
|
|
431
|
-
*/
|
|
432
|
-
PROCESS = "process",
|
|
433
|
-
/**
|
|
434
|
-
* Identifying which account a webhook belongs to
|
|
435
|
-
*/
|
|
436
|
-
IDENTIFY = "identify",
|
|
437
|
-
/**
|
|
438
|
-
* Scheduled synchronization of data
|
|
439
|
-
*/
|
|
440
|
-
SYNC = "sync",
|
|
441
|
-
/**
|
|
442
|
-
* For returning integration metadata/config
|
|
443
|
-
*/
|
|
444
|
-
SPEC = "spec",
|
|
445
|
-
/**
|
|
446
|
-
* Get available MCP tools for this integration
|
|
447
|
-
*/
|
|
448
|
-
GET_TOOLS = "get-tools",
|
|
449
|
-
/**
|
|
450
|
-
* Call a specific MCP tool
|
|
451
|
-
*/
|
|
452
|
-
CALL_TOOL = "call-tool"
|
|
453
|
-
}
|
|
454
|
-
interface IntegrationDefinition {
|
|
455
|
-
name: string;
|
|
456
|
-
version: string;
|
|
457
|
-
description: string;
|
|
458
|
-
config: Record<string, string>;
|
|
459
|
-
spec: any;
|
|
460
|
-
}
|
|
461
|
-
interface IntegrationEventPayload {
|
|
462
|
-
event: IntegrationEventType;
|
|
463
|
-
integrationDefinition?: IntegrationDefinition;
|
|
464
|
-
eventBody: any;
|
|
465
|
-
config?: Config;
|
|
466
|
-
state?: Record<string, string>;
|
|
467
|
-
[x: string]: any;
|
|
468
|
-
}
|
|
469
|
-
declare class Spec {
|
|
470
|
-
name: string;
|
|
471
|
-
key: string;
|
|
472
|
-
description: string;
|
|
473
|
-
icon: string;
|
|
474
|
-
category?: string;
|
|
475
|
-
schedule?: {
|
|
476
|
-
frequency?: string;
|
|
477
|
-
};
|
|
478
|
-
auth?: {
|
|
479
|
-
OAuth2?: OAuth2Params;
|
|
480
|
-
api_key?: APIKeyParams;
|
|
481
|
-
mcp?: McpAuthParams;
|
|
482
|
-
};
|
|
483
|
-
widgets?: WidgetMeta[];
|
|
484
|
-
}
|
|
485
|
-
interface Config {
|
|
486
|
-
access_token: string;
|
|
487
|
-
[key: string]: string;
|
|
488
|
-
}
|
|
489
|
-
interface Identifier {
|
|
490
|
-
id: string;
|
|
491
|
-
type?: string;
|
|
492
|
-
}
|
|
493
|
-
type MessageType = "spec" | "activity" | "state" | "identifier" | "account" | "tools" | "tool_result" | "error";
|
|
494
|
-
interface Message {
|
|
495
|
-
type: MessageType;
|
|
496
|
-
data: any;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
declare enum UserTypeEnum {
|
|
500
|
-
Agent = "Agent",
|
|
501
|
-
User = "User",
|
|
502
|
-
System = "System"
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
type UserConfirmationStatus = "pending" | "accepted" | "rejected" | "edited";
|
|
506
|
-
interface SpacePattern {
|
|
507
|
-
id: string;
|
|
508
|
-
name: string;
|
|
509
|
-
source: "explicit" | "implicit";
|
|
510
|
-
type: string;
|
|
511
|
-
summary: string;
|
|
512
|
-
editedSummary?: string;
|
|
513
|
-
evidence: string[];
|
|
514
|
-
confidence: number;
|
|
515
|
-
userConfirmed: UserConfirmationStatus;
|
|
516
|
-
spaceId: string;
|
|
517
|
-
createdAt: Date;
|
|
518
|
-
updatedAt: Date;
|
|
519
|
-
}
|
|
520
|
-
interface CreatePatternParams {
|
|
521
|
-
name: string;
|
|
522
|
-
source: "explicit" | "implicit";
|
|
523
|
-
type: string;
|
|
524
|
-
summary: string;
|
|
525
|
-
editedSummary?: string;
|
|
526
|
-
evidence: string[];
|
|
527
|
-
confidence: number;
|
|
528
|
-
userConfirmed?: UserConfirmationStatus;
|
|
529
|
-
spaceId: string;
|
|
530
|
-
}
|
|
531
|
-
interface PatternDetectionResult {
|
|
532
|
-
explicitPatterns: Omit<SpacePattern, "id" | "createdAt" | "updatedAt" | "spaceId">[];
|
|
533
|
-
implicitPatterns: Omit<SpacePattern, "id" | "createdAt" | "updatedAt" | "spaceId">[];
|
|
534
|
-
totalPatternsFound: number;
|
|
535
|
-
processingStats: {
|
|
536
|
-
statementsAnalyzed: number;
|
|
537
|
-
themesProcessed: number;
|
|
538
|
-
implicitPatternsExtracted: number;
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
interface PatternConfirmationParams {
|
|
542
|
-
patternId: string;
|
|
543
|
-
confirmed: boolean;
|
|
544
|
-
}
|
|
545
|
-
declare const EXPLICIT_PATTERN_TYPES: {
|
|
546
|
-
readonly THEME: "theme";
|
|
547
|
-
readonly TOPIC: "topic";
|
|
548
|
-
readonly DOMAIN: "domain";
|
|
549
|
-
readonly INTEREST_AREA: "interest_area";
|
|
550
|
-
};
|
|
551
|
-
declare const IMPLICIT_PATTERN_TYPES: {
|
|
552
|
-
readonly PREFERENCE: "preference";
|
|
553
|
-
readonly HABIT: "habit";
|
|
554
|
-
readonly WORKFLOW: "workflow";
|
|
555
|
-
readonly COMMUNICATION_STYLE: "communication_style";
|
|
556
|
-
readonly DECISION_PATTERN: "decision_pattern";
|
|
557
|
-
readonly TEMPORAL_PATTERN: "temporal_pattern";
|
|
558
|
-
readonly BEHAVIORAL_PATTERN: "behavioral_pattern";
|
|
559
|
-
readonly LEARNING_STYLE: "learning_style";
|
|
560
|
-
readonly COLLABORATION_STYLE: "collaboration_style";
|
|
561
|
-
};
|
|
562
|
-
declare const PATTERN_TYPES: {
|
|
563
|
-
readonly PREFERENCE: "preference";
|
|
564
|
-
readonly HABIT: "habit";
|
|
565
|
-
readonly WORKFLOW: "workflow";
|
|
566
|
-
readonly COMMUNICATION_STYLE: "communication_style";
|
|
567
|
-
readonly DECISION_PATTERN: "decision_pattern";
|
|
568
|
-
readonly TEMPORAL_PATTERN: "temporal_pattern";
|
|
569
|
-
readonly BEHAVIORAL_PATTERN: "behavioral_pattern";
|
|
570
|
-
readonly LEARNING_STYLE: "learning_style";
|
|
571
|
-
readonly COLLABORATION_STYLE: "collaboration_style";
|
|
572
|
-
readonly THEME: "theme";
|
|
573
|
-
readonly TOPIC: "topic";
|
|
574
|
-
readonly DOMAIN: "domain";
|
|
575
|
-
readonly INTEREST_AREA: "interest_area";
|
|
576
|
-
};
|
|
577
|
-
type ExplicitPatternType = (typeof EXPLICIT_PATTERN_TYPES)[keyof typeof EXPLICIT_PATTERN_TYPES];
|
|
578
|
-
type ImplicitPatternType = (typeof IMPLICIT_PATTERN_TYPES)[keyof typeof IMPLICIT_PATTERN_TYPES];
|
|
579
|
-
type PatternType = (typeof PATTERN_TYPES)[keyof typeof PATTERN_TYPES];
|
|
580
|
-
|
|
581
|
-
/**
|
|
582
|
-
* Search options interface
|
|
583
|
-
*/
|
|
584
|
-
interface SearchOptions {
|
|
585
|
-
limit?: number;
|
|
586
|
-
maxBfsDepth?: number;
|
|
587
|
-
validAt?: Date;
|
|
588
|
-
startTime?: Date | null;
|
|
589
|
-
endTime?: Date;
|
|
590
|
-
includeInvalidated?: boolean;
|
|
591
|
-
entityTypes?: string[];
|
|
592
|
-
predicateTypes?: string[];
|
|
593
|
-
scoreThreshold?: number;
|
|
594
|
-
minResults?: number;
|
|
595
|
-
labelIds?: string[];
|
|
596
|
-
adaptiveFiltering?: boolean;
|
|
597
|
-
structured?: boolean;
|
|
598
|
-
useLLMValidation?: boolean;
|
|
599
|
-
qualityThreshold?: number;
|
|
600
|
-
maxEpisodesForLLM?: number;
|
|
601
|
-
sortBy?: "relevance" | "recency";
|
|
602
|
-
tokenBudget?: number;
|
|
603
|
-
}
|
|
604
|
-
/**
|
|
605
|
-
* Statement with source provenance tracking
|
|
606
|
-
*/
|
|
607
|
-
interface StatementWithSource {
|
|
608
|
-
statement: StatementNode;
|
|
609
|
-
sources: {
|
|
610
|
-
episodeGraph?: {
|
|
611
|
-
score: number;
|
|
612
|
-
entityMatches: number;
|
|
613
|
-
};
|
|
614
|
-
episodeVector?: {
|
|
615
|
-
score: number;
|
|
616
|
-
};
|
|
617
|
-
bfs?: {
|
|
618
|
-
score: number;
|
|
619
|
-
hopDistance: number;
|
|
620
|
-
relevance: number;
|
|
621
|
-
};
|
|
622
|
-
vector?: {
|
|
623
|
-
score: number;
|
|
624
|
-
similarity: number;
|
|
625
|
-
};
|
|
626
|
-
bm25?: {
|
|
627
|
-
score: number;
|
|
628
|
-
rank: number;
|
|
629
|
-
};
|
|
630
|
-
};
|
|
631
|
-
primarySource: "episodeGraph" | "episodeVector" | "bfs" | "vector" | "bm25";
|
|
632
|
-
}
|
|
633
|
-
/**
|
|
634
|
-
* Episode with provenance tracking from multiple sources
|
|
635
|
-
*/
|
|
636
|
-
interface EpisodeWithProvenance {
|
|
637
|
-
episode: EpisodicNode;
|
|
638
|
-
statements: StatementWithSource[];
|
|
639
|
-
episodeGraphScore: number;
|
|
640
|
-
episodeVectorScore: number;
|
|
641
|
-
bfsScore: number;
|
|
642
|
-
vectorScore: number;
|
|
643
|
-
bm25Score: number;
|
|
644
|
-
sourceBreakdown: {
|
|
645
|
-
fromEpisodeGraph: number;
|
|
646
|
-
fromEpisodeVector: number;
|
|
647
|
-
fromBFS: number;
|
|
648
|
-
fromVector: number;
|
|
649
|
-
fromBM25: number;
|
|
650
|
-
};
|
|
651
|
-
entityMatchCount?: number;
|
|
652
|
-
firstLevelScore?: number;
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Quality filtering result
|
|
656
|
-
*/
|
|
657
|
-
interface QualityFilterResult {
|
|
658
|
-
episodes: EpisodeWithProvenance[];
|
|
659
|
-
confidence: number;
|
|
660
|
-
message: string;
|
|
661
|
-
}
|
|
662
|
-
/**
|
|
663
|
-
* Quality thresholds for filtering
|
|
664
|
-
*/
|
|
665
|
-
declare const QUALITY_THRESHOLDS: {
|
|
666
|
-
HIGH_QUALITY_EPISODE: number;
|
|
667
|
-
MEDIUM_QUALITY_EPISODE: number;
|
|
668
|
-
LOW_QUALITY_EPISODE: number;
|
|
669
|
-
CONFIDENT_RESULT: number;
|
|
670
|
-
UNCERTAIN_RESULT: number;
|
|
671
|
-
NO_RESULT: number;
|
|
672
|
-
MINIMUM_GAP_RATIO: number;
|
|
673
|
-
};
|
|
674
|
-
/**
|
|
675
|
-
* Episode search result with aggregated scores and sample statements
|
|
676
|
-
* Returned by BM25, Vector, and BFS searches
|
|
677
|
-
*/
|
|
678
|
-
interface EpisodeSearchResult {
|
|
679
|
-
episode: EpisodicNode;
|
|
680
|
-
score: number;
|
|
681
|
-
statementCount: number;
|
|
682
|
-
topStatements: StatementNode[];
|
|
683
|
-
invalidatedStatements: StatementNode[];
|
|
684
|
-
}
|
|
685
|
-
/**
|
|
686
|
-
* Configuration for reranking
|
|
687
|
-
*/
|
|
688
|
-
interface RerankConfig {
|
|
689
|
-
provider: "cohere" | "ollama" | "none";
|
|
690
|
-
limit?: number;
|
|
691
|
-
threshold: number;
|
|
692
|
-
cohereApiKey?: string;
|
|
693
|
-
cohereModel?: string;
|
|
694
|
-
ollamaUrl?: string;
|
|
695
|
-
ollamaModel?: string;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
declare abstract class IntegrationCLI {
|
|
699
|
-
protected program: Command;
|
|
700
|
-
protected integrationName: string;
|
|
701
|
-
protected version: string;
|
|
702
|
-
constructor(integrationName: string, version?: string);
|
|
703
|
-
private setupProgram;
|
|
704
|
-
private setupAccountCommands;
|
|
705
|
-
private setupDataCommands;
|
|
706
|
-
private setupSpecCommand;
|
|
707
|
-
private setupSyncCommand;
|
|
708
|
-
private setupGetToolsCommand;
|
|
709
|
-
private setupCallToolCommand;
|
|
710
|
-
protected abstract handleEvent(eventPayload: IntegrationEventPayload): Promise<Message[]>;
|
|
711
|
-
protected abstract getSpec(): Promise<Spec>;
|
|
712
|
-
parse(): void;
|
|
713
|
-
getProgram(): Command;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
declare const IngestInputSchema: z.ZodObject<{
|
|
717
|
-
episodeBody: z.ZodString;
|
|
718
|
-
referenceTime: z.ZodString;
|
|
719
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
720
|
-
source: z.ZodString;
|
|
721
|
-
labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
722
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
723
|
-
type: z.ZodDefault<z.ZodEnum<["CONVERSATION", "DOCUMENT"]>>;
|
|
724
|
-
title: z.ZodOptional<z.ZodString>;
|
|
725
|
-
}, "strip", z.ZodTypeAny, {
|
|
726
|
-
episodeBody?: string;
|
|
727
|
-
referenceTime?: string;
|
|
728
|
-
type?: "CONVERSATION" | "DOCUMENT";
|
|
729
|
-
metadata?: Record<string, string | number | boolean>;
|
|
730
|
-
source?: string;
|
|
731
|
-
labelIds?: string[];
|
|
732
|
-
sessionId?: string;
|
|
733
|
-
title?: string;
|
|
734
|
-
}, {
|
|
735
|
-
episodeBody?: string;
|
|
736
|
-
referenceTime?: string;
|
|
737
|
-
type?: "CONVERSATION" | "DOCUMENT";
|
|
738
|
-
metadata?: Record<string, string | number | boolean>;
|
|
739
|
-
source?: string;
|
|
740
|
-
labelIds?: string[];
|
|
741
|
-
sessionId?: string;
|
|
742
|
-
title?: string;
|
|
743
|
-
}>;
|
|
744
|
-
type IngestInput = z.infer<typeof IngestInputSchema>;
|
|
745
|
-
declare const IngestResponseSchema: z.ZodObject<{
|
|
746
|
-
success: z.ZodBoolean;
|
|
747
|
-
id: z.ZodString;
|
|
748
|
-
}, "strip", z.ZodTypeAny, {
|
|
749
|
-
success?: boolean;
|
|
750
|
-
id?: string;
|
|
751
|
-
}, {
|
|
752
|
-
success?: boolean;
|
|
753
|
-
id?: string;
|
|
754
|
-
}>;
|
|
755
|
-
type IngestResponse = z.infer<typeof IngestResponseSchema>;
|
|
756
|
-
declare const SearchInputSchema: z.ZodObject<{
|
|
757
|
-
query: z.ZodString;
|
|
758
|
-
startTime: z.ZodOptional<z.ZodString>;
|
|
759
|
-
endTime: z.ZodOptional<z.ZodString>;
|
|
760
|
-
labelIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
761
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
762
|
-
structured: z.ZodOptional<z.ZodBoolean>;
|
|
763
|
-
sortBy: z.ZodOptional<z.ZodEnum<["relevance", "recency"]>>;
|
|
764
|
-
}, "strip", z.ZodTypeAny, {
|
|
765
|
-
labelIds?: string[];
|
|
766
|
-
query?: string;
|
|
767
|
-
startTime?: string;
|
|
768
|
-
endTime?: string;
|
|
769
|
-
limit?: number;
|
|
770
|
-
structured?: boolean;
|
|
771
|
-
sortBy?: "relevance" | "recency";
|
|
772
|
-
}, {
|
|
773
|
-
labelIds?: string[];
|
|
774
|
-
query?: string;
|
|
775
|
-
startTime?: string;
|
|
776
|
-
endTime?: string;
|
|
777
|
-
limit?: number;
|
|
778
|
-
structured?: boolean;
|
|
779
|
-
sortBy?: "relevance" | "recency";
|
|
780
|
-
}>;
|
|
781
|
-
type SearchInput = z.infer<typeof SearchInputSchema>;
|
|
782
|
-
declare const SearchResponseSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
783
|
-
type SearchResponse = z.infer<typeof SearchResponseSchema>;
|
|
784
|
-
declare const MeResponseSchema: z.ZodObject<{
|
|
785
|
-
id: z.ZodString;
|
|
786
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
787
|
-
persona: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
788
|
-
workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
789
|
-
phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
790
|
-
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
791
|
-
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
792
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
793
|
-
}, "strip", z.ZodTypeAny, {
|
|
794
|
-
metadata?: Record<string, unknown>;
|
|
795
|
-
id?: string;
|
|
796
|
-
name?: string;
|
|
797
|
-
persona?: string;
|
|
798
|
-
workspaceId?: string;
|
|
799
|
-
phoneNumber?: string;
|
|
800
|
-
email?: string;
|
|
801
|
-
timezone?: string;
|
|
802
|
-
}, {
|
|
803
|
-
metadata?: Record<string, unknown>;
|
|
804
|
-
id?: string;
|
|
805
|
-
name?: string;
|
|
806
|
-
persona?: string;
|
|
807
|
-
workspaceId?: string;
|
|
808
|
-
phoneNumber?: string;
|
|
809
|
-
email?: string;
|
|
810
|
-
timezone?: string;
|
|
811
|
-
}>;
|
|
812
|
-
type MeResponse = z.infer<typeof MeResponseSchema>;
|
|
813
|
-
declare const IntegrationAccountSchema: z.ZodObject<{
|
|
814
|
-
id: z.ZodString;
|
|
815
|
-
name: z.ZodOptional<z.ZodString>;
|
|
816
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
817
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
818
|
-
id: z.ZodString;
|
|
819
|
-
name: z.ZodOptional<z.ZodString>;
|
|
820
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
821
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
822
|
-
id: z.ZodString;
|
|
823
|
-
name: z.ZodOptional<z.ZodString>;
|
|
824
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
825
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
826
|
-
declare const GetIntegrationsConnectedResponseSchema: z.ZodObject<{
|
|
827
|
-
accounts: z.ZodArray<z.ZodObject<{
|
|
828
|
-
id: z.ZodString;
|
|
829
|
-
name: z.ZodOptional<z.ZodString>;
|
|
830
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
831
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
832
|
-
id: z.ZodString;
|
|
833
|
-
name: z.ZodOptional<z.ZodString>;
|
|
834
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
835
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
836
|
-
id: z.ZodString;
|
|
837
|
-
name: z.ZodOptional<z.ZodString>;
|
|
838
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
839
|
-
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
840
|
-
}, "strip", z.ZodTypeAny, {
|
|
841
|
-
accounts?: z.objectOutputType<{
|
|
842
|
-
id: z.ZodString;
|
|
843
|
-
name: z.ZodOptional<z.ZodString>;
|
|
844
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
845
|
-
}, z.ZodTypeAny, "passthrough">[];
|
|
846
|
-
}, {
|
|
847
|
-
accounts?: z.objectInputType<{
|
|
848
|
-
id: z.ZodString;
|
|
849
|
-
name: z.ZodOptional<z.ZodString>;
|
|
850
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
851
|
-
}, z.ZodTypeAny, "passthrough">[];
|
|
852
|
-
}>;
|
|
853
|
-
type GetIntegrationsConnectedResponse = z.infer<typeof GetIntegrationsConnectedResponseSchema>;
|
|
854
|
-
declare const GetIntegrationActionsInputSchema: z.ZodObject<{
|
|
855
|
-
accountId: z.ZodString;
|
|
856
|
-
query: z.ZodOptional<z.ZodString>;
|
|
857
|
-
}, "strip", z.ZodTypeAny, {
|
|
858
|
-
query?: string;
|
|
859
|
-
accountId?: string;
|
|
860
|
-
}, {
|
|
861
|
-
query?: string;
|
|
862
|
-
accountId?: string;
|
|
863
|
-
}>;
|
|
864
|
-
type GetIntegrationActionsInput = z.infer<typeof GetIntegrationActionsInputSchema>;
|
|
865
|
-
declare const GetIntegrationActionsResponseSchema: z.ZodObject<{
|
|
866
|
-
actions: z.ZodArray<z.ZodUnknown, "many">;
|
|
867
|
-
}, "strip", z.ZodTypeAny, {
|
|
868
|
-
actions?: unknown[];
|
|
869
|
-
}, {
|
|
870
|
-
actions?: unknown[];
|
|
871
|
-
}>;
|
|
872
|
-
type GetIntegrationActionsResponse = z.infer<typeof GetIntegrationActionsResponseSchema>;
|
|
873
|
-
declare const ExecuteIntegrationActionInputSchema: z.ZodObject<{
|
|
874
|
-
accountId: z.ZodString;
|
|
875
|
-
action: z.ZodString;
|
|
876
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
877
|
-
}, "strip", z.ZodTypeAny, {
|
|
878
|
-
accountId?: string;
|
|
879
|
-
action?: string;
|
|
880
|
-
parameters?: Record<string, unknown>;
|
|
881
|
-
}, {
|
|
882
|
-
accountId?: string;
|
|
883
|
-
action?: string;
|
|
884
|
-
parameters?: Record<string, unknown>;
|
|
885
|
-
}>;
|
|
886
|
-
type ExecuteIntegrationActionInput = z.infer<typeof ExecuteIntegrationActionInputSchema>;
|
|
887
|
-
declare const ExecuteIntegrationActionResponseSchema: z.ZodObject<{
|
|
888
|
-
result: z.ZodUnknown;
|
|
889
|
-
}, "strip", z.ZodTypeAny, {
|
|
890
|
-
result?: unknown;
|
|
891
|
-
}, {
|
|
892
|
-
result?: unknown;
|
|
893
|
-
}>;
|
|
894
|
-
type ExecuteIntegrationActionResponse = z.infer<typeof ExecuteIntegrationActionResponseSchema>;
|
|
895
|
-
declare const GetDocumentsInputSchema: z.ZodObject<{
|
|
896
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
897
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
898
|
-
source: z.ZodOptional<z.ZodString>;
|
|
899
|
-
status: z.ZodOptional<z.ZodString>;
|
|
900
|
-
type: z.ZodOptional<z.ZodString>;
|
|
901
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
902
|
-
label: z.ZodOptional<z.ZodString>;
|
|
903
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
904
|
-
}, "strip", z.ZodTypeAny, {
|
|
905
|
-
status?: string;
|
|
906
|
-
type?: string;
|
|
907
|
-
source?: string;
|
|
908
|
-
sessionId?: string;
|
|
909
|
-
limit?: number;
|
|
910
|
-
page?: number;
|
|
911
|
-
label?: string;
|
|
912
|
-
cursor?: string;
|
|
913
|
-
}, {
|
|
914
|
-
status?: string;
|
|
915
|
-
type?: string;
|
|
916
|
-
source?: string;
|
|
917
|
-
sessionId?: string;
|
|
918
|
-
limit?: number;
|
|
919
|
-
page?: number;
|
|
920
|
-
label?: string;
|
|
921
|
-
cursor?: string;
|
|
922
|
-
}>;
|
|
923
|
-
type GetDocumentsInput = z.infer<typeof GetDocumentsInputSchema>;
|
|
924
|
-
declare const DocumentSchema: z.ZodObject<{
|
|
925
|
-
id: z.ZodString;
|
|
926
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
927
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
928
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
929
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
930
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
931
|
-
id: z.ZodString;
|
|
932
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
933
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
934
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
935
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
936
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
937
|
-
id: z.ZodString;
|
|
938
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
939
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
940
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
941
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
942
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
943
|
-
declare const GetDocumentsResponseSchema: z.ZodObject<{
|
|
944
|
-
documents: z.ZodArray<z.ZodObject<{
|
|
945
|
-
id: z.ZodString;
|
|
946
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
947
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
948
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
949
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
950
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
951
|
-
id: z.ZodString;
|
|
952
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
953
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
954
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
955
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
956
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
957
|
-
id: z.ZodString;
|
|
958
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
959
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
960
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
961
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
962
|
-
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
963
|
-
page: z.ZodNumber;
|
|
964
|
-
limit: z.ZodNumber;
|
|
965
|
-
hasMore: z.ZodBoolean;
|
|
966
|
-
nextCursor: z.ZodNullable<z.ZodString>;
|
|
967
|
-
availableSources: z.ZodArray<z.ZodObject<{
|
|
968
|
-
name: z.ZodString;
|
|
969
|
-
slug: z.ZodString;
|
|
970
|
-
}, "strip", z.ZodTypeAny, {
|
|
971
|
-
name?: string;
|
|
972
|
-
slug?: string;
|
|
973
|
-
}, {
|
|
974
|
-
name?: string;
|
|
975
|
-
slug?: string;
|
|
976
|
-
}>, "many">;
|
|
977
|
-
totalCount: z.ZodNumber;
|
|
978
|
-
}, "strip", z.ZodTypeAny, {
|
|
979
|
-
limit?: number;
|
|
980
|
-
page?: number;
|
|
981
|
-
documents?: z.objectOutputType<{
|
|
982
|
-
id: z.ZodString;
|
|
983
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
984
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
985
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
986
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
987
|
-
}, z.ZodTypeAny, "passthrough">[];
|
|
988
|
-
hasMore?: boolean;
|
|
989
|
-
nextCursor?: string;
|
|
990
|
-
availableSources?: {
|
|
991
|
-
name?: string;
|
|
992
|
-
slug?: string;
|
|
993
|
-
}[];
|
|
994
|
-
totalCount?: number;
|
|
995
|
-
}, {
|
|
996
|
-
limit?: number;
|
|
997
|
-
page?: number;
|
|
998
|
-
documents?: z.objectInputType<{
|
|
999
|
-
id: z.ZodString;
|
|
1000
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1001
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
1002
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1003
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1004
|
-
}, z.ZodTypeAny, "passthrough">[];
|
|
1005
|
-
hasMore?: boolean;
|
|
1006
|
-
nextCursor?: string;
|
|
1007
|
-
availableSources?: {
|
|
1008
|
-
name?: string;
|
|
1009
|
-
slug?: string;
|
|
1010
|
-
}[];
|
|
1011
|
-
totalCount?: number;
|
|
1012
|
-
}>;
|
|
1013
|
-
type GetDocumentsResponse = z.infer<typeof GetDocumentsResponseSchema>;
|
|
1014
|
-
declare const GetDocumentInputSchema: z.ZodObject<{
|
|
1015
|
-
documentId: z.ZodString;
|
|
1016
|
-
}, "strip", z.ZodTypeAny, {
|
|
1017
|
-
documentId?: string;
|
|
1018
|
-
}, {
|
|
1019
|
-
documentId?: string;
|
|
1020
|
-
}>;
|
|
1021
|
-
type GetDocumentInput = z.infer<typeof GetDocumentInputSchema>;
|
|
1022
|
-
declare const GetDocumentResponseSchema: z.ZodObject<{
|
|
1023
|
-
document: z.ZodNullable<z.ZodObject<{
|
|
1024
|
-
id: z.ZodString;
|
|
1025
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1026
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
1027
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1028
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1029
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1030
|
-
id: z.ZodString;
|
|
1031
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1032
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
1033
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1034
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1035
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1036
|
-
id: z.ZodString;
|
|
1037
|
-
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1038
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
1039
|
-
sessionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1040
|
-
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1041
|
-
}, z.ZodTypeAny, "passthrough">>>;
|
|
1042
|
-
}, "strip", z.ZodTypeAny, {
|
|
1043
|
-
document?: {
|
|
1044
|
-
source?: string;
|
|
1045
|
-
sessionId?: string;
|
|
1046
|
-
title?: string;
|
|
1047
|
-
id?: string;
|
|
1048
|
-
createdAt?: string;
|
|
1049
|
-
} & {
|
|
1050
|
-
[k: string]: unknown;
|
|
1051
|
-
};
|
|
1052
|
-
}, {
|
|
1053
|
-
document?: {
|
|
1054
|
-
source?: string;
|
|
1055
|
-
sessionId?: string;
|
|
1056
|
-
title?: string;
|
|
1057
|
-
id?: string;
|
|
1058
|
-
createdAt?: string;
|
|
1059
|
-
} & {
|
|
1060
|
-
[k: string]: unknown;
|
|
1061
|
-
};
|
|
1062
|
-
}>;
|
|
1063
|
-
type GetDocumentResponse = z.infer<typeof GetDocumentResponseSchema>;
|
|
1064
|
-
declare const GatewayAgentInfoSchema: z.ZodObject<{
|
|
1065
|
-
id: z.ZodString;
|
|
1066
|
-
name: z.ZodString;
|
|
1067
|
-
description: z.ZodString;
|
|
1068
|
-
tools: z.ZodArray<z.ZodString, "many">;
|
|
1069
|
-
platform: z.ZodNullable<z.ZodString>;
|
|
1070
|
-
hostname: z.ZodNullable<z.ZodString>;
|
|
1071
|
-
status: z.ZodEnum<["CONNECTED", "DISCONNECTED"]>;
|
|
1072
|
-
}, "strip", z.ZodTypeAny, {
|
|
1073
|
-
tools?: string[];
|
|
1074
|
-
status?: "CONNECTED" | "DISCONNECTED";
|
|
1075
|
-
id?: string;
|
|
1076
|
-
name?: string;
|
|
1077
|
-
description?: string;
|
|
1078
|
-
platform?: string;
|
|
1079
|
-
hostname?: string;
|
|
1080
|
-
}, {
|
|
1081
|
-
tools?: string[];
|
|
1082
|
-
status?: "CONNECTED" | "DISCONNECTED";
|
|
1083
|
-
id?: string;
|
|
1084
|
-
name?: string;
|
|
1085
|
-
description?: string;
|
|
1086
|
-
platform?: string;
|
|
1087
|
-
hostname?: string;
|
|
1088
|
-
}>;
|
|
1089
|
-
type GatewayAgentInfo = z.infer<typeof GatewayAgentInfoSchema>;
|
|
1090
|
-
declare const GetGatewaysResponseSchema: z.ZodObject<{
|
|
1091
|
-
gateways: z.ZodArray<z.ZodObject<{
|
|
1092
|
-
id: z.ZodString;
|
|
1093
|
-
name: z.ZodString;
|
|
1094
|
-
description: z.ZodString;
|
|
1095
|
-
tools: z.ZodArray<z.ZodString, "many">;
|
|
1096
|
-
platform: z.ZodNullable<z.ZodString>;
|
|
1097
|
-
hostname: z.ZodNullable<z.ZodString>;
|
|
1098
|
-
status: z.ZodEnum<["CONNECTED", "DISCONNECTED"]>;
|
|
1099
|
-
}, "strip", z.ZodTypeAny, {
|
|
1100
|
-
tools?: string[];
|
|
1101
|
-
status?: "CONNECTED" | "DISCONNECTED";
|
|
1102
|
-
id?: string;
|
|
1103
|
-
name?: string;
|
|
1104
|
-
description?: string;
|
|
1105
|
-
platform?: string;
|
|
1106
|
-
hostname?: string;
|
|
1107
|
-
}, {
|
|
1108
|
-
tools?: string[];
|
|
1109
|
-
status?: "CONNECTED" | "DISCONNECTED";
|
|
1110
|
-
id?: string;
|
|
1111
|
-
name?: string;
|
|
1112
|
-
description?: string;
|
|
1113
|
-
platform?: string;
|
|
1114
|
-
hostname?: string;
|
|
1115
|
-
}>, "many">;
|
|
1116
|
-
}, "strip", z.ZodTypeAny, {
|
|
1117
|
-
gateways?: {
|
|
1118
|
-
tools?: string[];
|
|
1119
|
-
status?: "CONNECTED" | "DISCONNECTED";
|
|
1120
|
-
id?: string;
|
|
1121
|
-
name?: string;
|
|
1122
|
-
description?: string;
|
|
1123
|
-
platform?: string;
|
|
1124
|
-
hostname?: string;
|
|
1125
|
-
}[];
|
|
1126
|
-
}, {
|
|
1127
|
-
gateways?: {
|
|
1128
|
-
tools?: string[];
|
|
1129
|
-
status?: "CONNECTED" | "DISCONNECTED";
|
|
1130
|
-
id?: string;
|
|
1131
|
-
name?: string;
|
|
1132
|
-
description?: string;
|
|
1133
|
-
platform?: string;
|
|
1134
|
-
hostname?: string;
|
|
1135
|
-
}[];
|
|
1136
|
-
}>;
|
|
1137
|
-
type GetGatewaysResponse = z.infer<typeof GetGatewaysResponseSchema>;
|
|
1138
|
-
declare const ExecuteGatewayInputSchema: z.ZodObject<{
|
|
1139
|
-
gatewayId: z.ZodString;
|
|
1140
|
-
intent: z.ZodString;
|
|
1141
|
-
}, "strip", z.ZodTypeAny, {
|
|
1142
|
-
gatewayId?: string;
|
|
1143
|
-
intent?: string;
|
|
1144
|
-
}, {
|
|
1145
|
-
gatewayId?: string;
|
|
1146
|
-
intent?: string;
|
|
1147
|
-
}>;
|
|
1148
|
-
type ExecuteGatewayInput = z.infer<typeof ExecuteGatewayInputSchema>;
|
|
1149
|
-
declare const ExecuteGatewayToolInputSchema: z.ZodObject<{
|
|
1150
|
-
gatewayId: z.ZodString;
|
|
1151
|
-
toolName: z.ZodString;
|
|
1152
|
-
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1153
|
-
}, "strip", z.ZodTypeAny, {
|
|
1154
|
-
params?: Record<string, unknown>;
|
|
1155
|
-
gatewayId?: string;
|
|
1156
|
-
toolName?: string;
|
|
1157
|
-
}, {
|
|
1158
|
-
params?: Record<string, unknown>;
|
|
1159
|
-
gatewayId?: string;
|
|
1160
|
-
toolName?: string;
|
|
1161
|
-
}>;
|
|
1162
|
-
type ExecuteGatewayToolInput = z.infer<typeof ExecuteGatewayToolInputSchema>;
|
|
1163
|
-
declare const ExecuteGatewayResponseSchema: z.ZodObject<{
|
|
1164
|
-
result: z.ZodUnknown;
|
|
1165
|
-
}, "strip", z.ZodTypeAny, {
|
|
1166
|
-
result?: unknown;
|
|
1167
|
-
}, {
|
|
1168
|
-
result?: unknown;
|
|
1169
|
-
}>;
|
|
1170
|
-
type ExecuteGatewayResponse = z.infer<typeof ExecuteGatewayResponseSchema>;
|
|
1171
|
-
declare const AuthorizationCodeResponseSchema: z.ZodObject<{
|
|
1172
|
-
authorizationCode: z.ZodString;
|
|
1173
|
-
url: z.ZodString;
|
|
1174
|
-
}, "strip", z.ZodTypeAny, {
|
|
1175
|
-
authorizationCode?: string;
|
|
1176
|
-
url?: string;
|
|
1177
|
-
}, {
|
|
1178
|
-
authorizationCode?: string;
|
|
1179
|
-
url?: string;
|
|
1180
|
-
}>;
|
|
1181
|
-
type AuthorizationCodeResponse = z.infer<typeof AuthorizationCodeResponseSchema>;
|
|
1182
|
-
declare const TokenExchangeInputSchema: z.ZodObject<{
|
|
1183
|
-
authorizationCode: z.ZodString;
|
|
1184
|
-
}, "strip", z.ZodTypeAny, {
|
|
1185
|
-
authorizationCode?: string;
|
|
1186
|
-
}, {
|
|
1187
|
-
authorizationCode?: string;
|
|
1188
|
-
}>;
|
|
1189
|
-
type TokenExchangeInput = z.infer<typeof TokenExchangeInputSchema>;
|
|
1190
|
-
declare const TokenExchangeResponseSchema: z.ZodObject<{
|
|
1191
|
-
token: z.ZodNullable<z.ZodObject<{
|
|
1192
|
-
token: z.ZodString;
|
|
1193
|
-
obfuscatedToken: z.ZodString;
|
|
1194
|
-
}, "strip", z.ZodTypeAny, {
|
|
1195
|
-
token?: string;
|
|
1196
|
-
obfuscatedToken?: string;
|
|
1197
|
-
}, {
|
|
1198
|
-
token?: string;
|
|
1199
|
-
obfuscatedToken?: string;
|
|
1200
|
-
}>>;
|
|
1201
|
-
}, "strip", z.ZodTypeAny, {
|
|
1202
|
-
token?: {
|
|
1203
|
-
token?: string;
|
|
1204
|
-
obfuscatedToken?: string;
|
|
1205
|
-
};
|
|
1206
|
-
}, {
|
|
1207
|
-
token?: {
|
|
1208
|
-
token?: string;
|
|
1209
|
-
obfuscatedToken?: string;
|
|
1210
|
-
};
|
|
1211
|
-
}>;
|
|
1212
|
-
type TokenExchangeResponse = z.infer<typeof TokenExchangeResponseSchema>;
|
|
1213
|
-
|
|
1214
|
-
interface CoreClientOptions {
|
|
1215
|
-
baseUrl: string;
|
|
1216
|
-
token: string;
|
|
1217
|
-
}
|
|
1218
|
-
declare class CoreClientError extends Error {
|
|
1219
|
-
statusCode: number;
|
|
1220
|
-
constructor(message: string, statusCode: number);
|
|
1221
|
-
}
|
|
1222
|
-
declare class CoreClient {
|
|
1223
|
-
private baseUrl;
|
|
1224
|
-
private token;
|
|
1225
|
-
constructor(options: CoreClientOptions);
|
|
1226
|
-
private request;
|
|
1227
|
-
private requestPublic;
|
|
1228
|
-
me(): Promise<MeResponse>;
|
|
1229
|
-
ingest(body: IngestInput): Promise<IngestResponse>;
|
|
1230
|
-
search(body: SearchInput): Promise<SearchResponse>;
|
|
1231
|
-
getIntegrationsConnected(): Promise<GetIntegrationsConnectedResponse>;
|
|
1232
|
-
getIntegrationActions(params: GetIntegrationActionsInput): Promise<GetIntegrationActionsResponse>;
|
|
1233
|
-
executeIntegrationAction(params: ExecuteIntegrationActionInput): Promise<ExecuteIntegrationActionResponse>;
|
|
1234
|
-
getSessionId(): Promise<string>;
|
|
1235
|
-
getDocuments(params?: GetDocumentsInput): Promise<GetDocumentsResponse>;
|
|
1236
|
-
getDocument(params: GetDocumentInput): Promise<GetDocumentResponse>;
|
|
1237
|
-
getGateways(): Promise<GetGatewaysResponse>;
|
|
1238
|
-
executeGateway(params: ExecuteGatewayInput): Promise<ExecuteGatewayResponse>;
|
|
1239
|
-
executeGatewayTool(params: ExecuteGatewayToolInput): Promise<ExecuteGatewayResponse>;
|
|
1240
|
-
getAuthorizationCode(): Promise<AuthorizationCodeResponse>;
|
|
1241
|
-
exchangeToken(params: TokenExchangeInput): Promise<TokenExchangeResponse>;
|
|
1242
|
-
checkAuth(): Promise<MeResponse>;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
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, GRAPH_ASPECTS, 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, type GraphAspect, 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 TuiWidgetComponent, type UserConfirmationStatus, UserTypeEnum, VOICE_ASPECTS, type VoiceAspect, type VoiceAspectNode, type WebWidgetComponent, type WidgetComponent, type WidgetMeta, type WidgetRenderContext, type WidgetSpec };
|
|
1
|
+
export { chatRoute, handleChatStream } from './chat-route.js';
|
|
2
|
+
export type { chatRouteOptions, ChatStreamHandlerParams, ChatStreamHandlerOptions } from './chat-route.js';
|
|
3
|
+
export { workflowRoute, handleWorkflowStream } from './workflow-route.js';
|
|
4
|
+
export type { WorkflowRouteOptions, WorkflowStreamHandlerParams, WorkflowStreamHandlerOptions } from './workflow-route.js';
|
|
5
|
+
export type { WorkflowDataPart } from './transformers.js';
|
|
6
|
+
export { networkRoute, handleNetworkStream } from './network-route.js';
|
|
7
|
+
export type { NetworkRouteOptions, NetworkStreamHandlerParams, NetworkStreamHandlerOptions } from './network-route.js';
|
|
8
|
+
export type { NetworkDataPart } from './transformers.js';
|
|
9
|
+
export type { AgentDataPart } from './transformers.js';
|
|
10
|
+
export { toAISdkStream, toAISdkV5Stream } from './convert-streams.js';
|
|
11
|
+
export { withMastra } from './middleware.js';
|
|
12
|
+
export type { WithMastraOptions, WithMastraMemoryOptions, WithMastraSemanticRecallOptions } from './middleware.js';
|
|
13
|
+
export { toAISdkFormat } from './to-ai-sdk-format.js';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|