@agent-factory-platform/client 0.2.0
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/document-assistant-model.d.ts +50 -0
- package/dist/document-assistant-model.d.ts.map +1 -0
- package/dist/document-assistant-model.js +104 -0
- package/dist/document-assistant-model.js.map +1 -0
- package/dist/gen/agentfactory/agent/v1/agent_pb.d.ts +2242 -0
- package/dist/gen/agentfactory/agent/v1/agent_pb.d.ts.map +1 -0
- package/dist/gen/agentfactory/agent/v1/agent_pb.js +457 -0
- package/dist/gen/agentfactory/agent/v1/agent_pb.js.map +1 -0
- package/dist/gen/agentfactory/docs/v1/docs_pb.d.ts +1172 -0
- package/dist/gen/agentfactory/docs/v1/docs_pb.d.ts.map +1 -0
- package/dist/gen/agentfactory/docs/v1/docs_pb.js +287 -0
- package/dist/gen/agentfactory/docs/v1/docs_pb.js.map +1 -0
- package/dist/index.d.ts +453 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/session-model.d.ts +122 -0
- package/dist/session-model.d.ts.map +1 -0
- package/dist/session-model.js +343 -0
- package/dist/session-model.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import { type Interceptor } from "@connectrpc/connect";
|
|
2
|
+
import { AgentCapabilityService, AgentCollaborationService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
3
|
+
import { DocsService } from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
4
|
+
export * as agentV1 from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
5
|
+
export * as docsV1 from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
6
|
+
export { AgentCapabilityService, AgentCollaborationService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService, DocsService, };
|
|
7
|
+
export * from "./session-model.js";
|
|
8
|
+
export * from "./document-assistant-model.js";
|
|
9
|
+
export interface AgentFactoryClientOptions {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
headers?: () => HeadersInit | Promise<HeadersInit>;
|
|
12
|
+
interceptors?: Interceptor[];
|
|
13
|
+
}
|
|
14
|
+
export declare function createAgentFactoryClients(options: AgentFactoryClientOptions): {
|
|
15
|
+
agent: {
|
|
16
|
+
sessions: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
17
|
+
createSession: {
|
|
18
|
+
methodKind: "unary";
|
|
19
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CreateSessionRequestSchema;
|
|
20
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSchema;
|
|
21
|
+
};
|
|
22
|
+
listSessions: {
|
|
23
|
+
methodKind: "unary";
|
|
24
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListSessionsRequestSchema;
|
|
25
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListSessionsResponseSchema;
|
|
26
|
+
};
|
|
27
|
+
getSession: {
|
|
28
|
+
methodKind: "unary";
|
|
29
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetSessionRequestSchema;
|
|
30
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSchema;
|
|
31
|
+
};
|
|
32
|
+
deleteSession: {
|
|
33
|
+
methodKind: "unary";
|
|
34
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DeleteSessionRequestSchema;
|
|
35
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
36
|
+
};
|
|
37
|
+
forkSession: {
|
|
38
|
+
methodKind: "unary";
|
|
39
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ForkSessionRequestSchema;
|
|
40
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionSchema;
|
|
41
|
+
};
|
|
42
|
+
submitInput: {
|
|
43
|
+
methodKind: "unary";
|
|
44
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SubmitInputRequestSchema;
|
|
45
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").InputReceiptSchema;
|
|
46
|
+
};
|
|
47
|
+
cancelRun: {
|
|
48
|
+
methodKind: "unary";
|
|
49
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CancelRunRequestSchema;
|
|
50
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").RunSchema;
|
|
51
|
+
};
|
|
52
|
+
getRun: {
|
|
53
|
+
methodKind: "unary";
|
|
54
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetRunRequestSchema;
|
|
55
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").RunSchema;
|
|
56
|
+
};
|
|
57
|
+
followEvents: {
|
|
58
|
+
methodKind: "server_streaming";
|
|
59
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").FollowEventsRequestSchema;
|
|
60
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SessionEventSchema;
|
|
61
|
+
};
|
|
62
|
+
}>>;
|
|
63
|
+
profiles: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
64
|
+
createProfile: {
|
|
65
|
+
methodKind: "unary";
|
|
66
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CreateProfileRequestSchema;
|
|
67
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").AgentProfileViewSchema;
|
|
68
|
+
};
|
|
69
|
+
listProfiles: {
|
|
70
|
+
methodKind: "unary";
|
|
71
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListProfilesRequestSchema;
|
|
72
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListProfilesResponseSchema;
|
|
73
|
+
};
|
|
74
|
+
getProfile: {
|
|
75
|
+
methodKind: "unary";
|
|
76
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetProfileRequestSchema;
|
|
77
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").AgentProfileViewSchema;
|
|
78
|
+
};
|
|
79
|
+
updateProfile: {
|
|
80
|
+
methodKind: "unary";
|
|
81
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").UpdateProfileRequestSchema;
|
|
82
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").AgentProfileViewSchema;
|
|
83
|
+
};
|
|
84
|
+
deleteProfile: {
|
|
85
|
+
methodKind: "unary";
|
|
86
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DeleteProfileRequestSchema;
|
|
87
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
88
|
+
};
|
|
89
|
+
listProfileRevisions: {
|
|
90
|
+
methodKind: "unary";
|
|
91
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListProfileRevisionsRequestSchema;
|
|
92
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListProfileRevisionsResponseSchema;
|
|
93
|
+
};
|
|
94
|
+
}>>;
|
|
95
|
+
capabilities: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
96
|
+
listSkills: {
|
|
97
|
+
methodKind: "unary";
|
|
98
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListSkillsRequestSchema;
|
|
99
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListSkillsResponseSchema;
|
|
100
|
+
};
|
|
101
|
+
getSkill: {
|
|
102
|
+
methodKind: "unary";
|
|
103
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetSkillRequestSchema;
|
|
104
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SkillBodySchema;
|
|
105
|
+
};
|
|
106
|
+
upsertSkill: {
|
|
107
|
+
methodKind: "unary";
|
|
108
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").UpsertSkillRequestSchema;
|
|
109
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").SkillSummarySchema;
|
|
110
|
+
};
|
|
111
|
+
deleteSkill: {
|
|
112
|
+
methodKind: "unary";
|
|
113
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DeleteSkillRequestSchema;
|
|
114
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
115
|
+
};
|
|
116
|
+
installSkill: {
|
|
117
|
+
methodKind: "unary";
|
|
118
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").InstallSkillRequestSchema;
|
|
119
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CapabilityInstallSchema;
|
|
120
|
+
};
|
|
121
|
+
uninstallSkill: {
|
|
122
|
+
methodKind: "unary";
|
|
123
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").UninstallSkillRequestSchema;
|
|
124
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
125
|
+
};
|
|
126
|
+
shareSkill: {
|
|
127
|
+
methodKind: "unary";
|
|
128
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ShareSkillRequestSchema;
|
|
129
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
130
|
+
};
|
|
131
|
+
}>>;
|
|
132
|
+
memories: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
133
|
+
getMemorySettings: {
|
|
134
|
+
methodKind: "unary";
|
|
135
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetMemorySettingsRequestSchema;
|
|
136
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").MemorySettingsSchema;
|
|
137
|
+
};
|
|
138
|
+
updateMemorySettings: {
|
|
139
|
+
methodKind: "unary";
|
|
140
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").UpdateMemorySettingsRequestSchema;
|
|
141
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").MemorySettingsSchema;
|
|
142
|
+
};
|
|
143
|
+
listMemories: {
|
|
144
|
+
methodKind: "unary";
|
|
145
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListMemoriesRequestSchema;
|
|
146
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListMemoriesResponseSchema;
|
|
147
|
+
};
|
|
148
|
+
confirmMemory: {
|
|
149
|
+
methodKind: "unary";
|
|
150
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ConfirmMemoryRequestSchema;
|
|
151
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").MemorySchema;
|
|
152
|
+
};
|
|
153
|
+
deleteMemory: {
|
|
154
|
+
methodKind: "unary";
|
|
155
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").DeleteMemoryRequestSchema;
|
|
156
|
+
output: typeof import("@bufbuild/protobuf/wkt").EmptySchema;
|
|
157
|
+
};
|
|
158
|
+
}>>;
|
|
159
|
+
interactions: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
160
|
+
getInteraction: {
|
|
161
|
+
methodKind: "unary";
|
|
162
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetInteractionRequestSchema;
|
|
163
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").InteractionSchema;
|
|
164
|
+
};
|
|
165
|
+
listInteractions: {
|
|
166
|
+
methodKind: "unary";
|
|
167
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListInteractionsRequestSchema;
|
|
168
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListInteractionsResponseSchema;
|
|
169
|
+
};
|
|
170
|
+
resolveInteraction: {
|
|
171
|
+
methodKind: "unary";
|
|
172
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ResolveInteractionRequestSchema;
|
|
173
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").InteractionSchema;
|
|
174
|
+
};
|
|
175
|
+
}>>;
|
|
176
|
+
sessionTransport: {
|
|
177
|
+
getSession: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").GetSessionRequest | {
|
|
178
|
+
readonly $typeName?: undefined;
|
|
179
|
+
sessionId?: string | undefined;
|
|
180
|
+
}, options?: import("@connectrpc/connect").CallOptions) => Promise<import("./gen/agentfactory/agent/v1/agent_pb.js").Session>;
|
|
181
|
+
submitInput: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").SubmitInputRequest | {
|
|
182
|
+
readonly $typeName?: undefined;
|
|
183
|
+
sessionId?: string | undefined;
|
|
184
|
+
content?: (import("./gen/agentfactory/agent/v1/agent_pb.js").ContentBlock | {
|
|
185
|
+
readonly $typeName?: undefined;
|
|
186
|
+
block?: {
|
|
187
|
+
case: undefined;
|
|
188
|
+
value?: undefined;
|
|
189
|
+
} | {
|
|
190
|
+
case: "text";
|
|
191
|
+
value: import("./gen/agentfactory/agent/v1/agent_pb.js").TextBlock | {
|
|
192
|
+
readonly $typeName?: undefined;
|
|
193
|
+
text?: string | undefined;
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
case: "resource";
|
|
197
|
+
value: import("./gen/agentfactory/agent/v1/agent_pb.js").ResourceBlock | {
|
|
198
|
+
readonly $typeName?: undefined;
|
|
199
|
+
resourceId?: string | undefined;
|
|
200
|
+
mediaType?: string | undefined;
|
|
201
|
+
};
|
|
202
|
+
} | {
|
|
203
|
+
case: "data";
|
|
204
|
+
value: import("./gen/agentfactory/agent/v1/agent_pb.js").DataBlock | {
|
|
205
|
+
readonly $typeName?: undefined;
|
|
206
|
+
slot?: string | undefined;
|
|
207
|
+
value?: (import("@bufbuild/protobuf/wkt").Value | {
|
|
208
|
+
readonly $typeName?: undefined;
|
|
209
|
+
kind?: {
|
|
210
|
+
value: import("@bufbuild/protobuf/wkt").NullValue;
|
|
211
|
+
case: "nullValue";
|
|
212
|
+
} | {
|
|
213
|
+
value: number;
|
|
214
|
+
case: "numberValue";
|
|
215
|
+
} | {
|
|
216
|
+
value: string;
|
|
217
|
+
case: "stringValue";
|
|
218
|
+
} | {
|
|
219
|
+
value: boolean;
|
|
220
|
+
case: "boolValue";
|
|
221
|
+
} | {
|
|
222
|
+
case: undefined;
|
|
223
|
+
value?: undefined;
|
|
224
|
+
} | {
|
|
225
|
+
case: "structValue";
|
|
226
|
+
value: import("@bufbuild/protobuf/wkt").Struct | {
|
|
227
|
+
readonly $typeName?: undefined;
|
|
228
|
+
fields?: {
|
|
229
|
+
[key: string]: import("@bufbuild/protobuf/wkt").Value | /*elided*/ any;
|
|
230
|
+
[key: number]: import("@bufbuild/protobuf/wkt").Value | /*elided*/ any;
|
|
231
|
+
} | undefined;
|
|
232
|
+
};
|
|
233
|
+
} | {
|
|
234
|
+
case: "listValue";
|
|
235
|
+
value: import("@bufbuild/protobuf/wkt").ListValue | {
|
|
236
|
+
readonly $typeName?: undefined;
|
|
237
|
+
values?: (import("@bufbuild/protobuf/wkt").Value | /*elided*/ any)[] | undefined;
|
|
238
|
+
};
|
|
239
|
+
} | undefined;
|
|
240
|
+
}) | undefined;
|
|
241
|
+
};
|
|
242
|
+
} | {
|
|
243
|
+
case: "citation";
|
|
244
|
+
value: import("./gen/agentfactory/agent/v1/agent_pb.js").CitationBlock | {
|
|
245
|
+
readonly $typeName?: undefined;
|
|
246
|
+
resourceId?: string | undefined;
|
|
247
|
+
label?: string | undefined;
|
|
248
|
+
uri?: string | undefined;
|
|
249
|
+
excerpt?: string | undefined;
|
|
250
|
+
};
|
|
251
|
+
} | undefined;
|
|
252
|
+
})[] | undefined;
|
|
253
|
+
deliveryMode?: string | undefined;
|
|
254
|
+
explicitSkillSlug?: string | undefined;
|
|
255
|
+
idempotencyKey?: string | undefined;
|
|
256
|
+
}, options?: import("@connectrpc/connect").CallOptions) => Promise<import("./gen/agentfactory/agent/v1/agent_pb.js").InputReceipt>;
|
|
257
|
+
followEvents: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").FollowEventsRequest | {
|
|
258
|
+
readonly $typeName?: undefined;
|
|
259
|
+
sessionId?: string | undefined;
|
|
260
|
+
afterSeq?: bigint | undefined;
|
|
261
|
+
}, options?: import("@connectrpc/connect").CallOptions) => AsyncIterable<import("./gen/agentfactory/agent/v1/agent_pb.js").SessionEvent>;
|
|
262
|
+
getRun: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").GetRunRequest | {
|
|
263
|
+
readonly $typeName?: undefined;
|
|
264
|
+
sessionId?: string | undefined;
|
|
265
|
+
runId?: string | undefined;
|
|
266
|
+
}, options?: import("@connectrpc/connect").CallOptions) => Promise<import("./gen/agentfactory/agent/v1/agent_pb.js").Run>;
|
|
267
|
+
cancelRun: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").CancelRunRequest | {
|
|
268
|
+
readonly $typeName?: undefined;
|
|
269
|
+
sessionId?: string | undefined;
|
|
270
|
+
runId?: string | undefined;
|
|
271
|
+
}, options?: import("@connectrpc/connect").CallOptions) => Promise<import("./gen/agentfactory/agent/v1/agent_pb.js").Run>;
|
|
272
|
+
resolveInteraction: (request: import("./gen/agentfactory/agent/v1/agent_pb.js").ResolveInteractionRequest | {
|
|
273
|
+
readonly $typeName?: undefined;
|
|
274
|
+
interactionId?: string | undefined;
|
|
275
|
+
resolution?: import("./gen/agentfactory/agent/v1/agent_pb.js").InteractionResolutionKind | undefined;
|
|
276
|
+
payload?: (import("@bufbuild/protobuf/wkt").Value | {
|
|
277
|
+
readonly $typeName?: undefined;
|
|
278
|
+
kind?: {
|
|
279
|
+
value: import("@bufbuild/protobuf/wkt").NullValue;
|
|
280
|
+
case: "nullValue";
|
|
281
|
+
} | {
|
|
282
|
+
value: number;
|
|
283
|
+
case: "numberValue";
|
|
284
|
+
} | {
|
|
285
|
+
value: string;
|
|
286
|
+
case: "stringValue";
|
|
287
|
+
} | {
|
|
288
|
+
value: boolean;
|
|
289
|
+
case: "boolValue";
|
|
290
|
+
} | {
|
|
291
|
+
case: undefined;
|
|
292
|
+
value?: undefined;
|
|
293
|
+
} | {
|
|
294
|
+
case: "structValue";
|
|
295
|
+
value: import("@bufbuild/protobuf/wkt").Struct | {
|
|
296
|
+
readonly $typeName?: undefined;
|
|
297
|
+
fields?: {
|
|
298
|
+
[key: string]: import("@bufbuild/protobuf/wkt").Value | /*elided*/ any;
|
|
299
|
+
[key: number]: import("@bufbuild/protobuf/wkt").Value | /*elided*/ any;
|
|
300
|
+
} | undefined;
|
|
301
|
+
};
|
|
302
|
+
} | {
|
|
303
|
+
case: "listValue";
|
|
304
|
+
value: import("@bufbuild/protobuf/wkt").ListValue | {
|
|
305
|
+
readonly $typeName?: undefined;
|
|
306
|
+
values?: (import("@bufbuild/protobuf/wkt").Value | /*elided*/ any)[] | undefined;
|
|
307
|
+
};
|
|
308
|
+
} | undefined;
|
|
309
|
+
}) | undefined;
|
|
310
|
+
}, options?: import("@connectrpc/connect").CallOptions) => Promise<import("./gen/agentfactory/agent/v1/agent_pb.js").Interaction>;
|
|
311
|
+
};
|
|
312
|
+
collaborations: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
313
|
+
getCollaboration: {
|
|
314
|
+
methodKind: "unary";
|
|
315
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").GetCollaborationRequestSchema;
|
|
316
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CollaborationSchema;
|
|
317
|
+
};
|
|
318
|
+
listCollaborationTasks: {
|
|
319
|
+
methodKind: "unary";
|
|
320
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListCollaborationTasksRequestSchema;
|
|
321
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").ListCollaborationTasksResponseSchema;
|
|
322
|
+
};
|
|
323
|
+
cancelCollaboration: {
|
|
324
|
+
methodKind: "unary";
|
|
325
|
+
input: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CancelCollaborationRequestSchema;
|
|
326
|
+
output: typeof import("./gen/agentfactory/agent/v1/agent_pb.js").CollaborationSchema;
|
|
327
|
+
};
|
|
328
|
+
}>>;
|
|
329
|
+
};
|
|
330
|
+
docs: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv1").GenService<{
|
|
331
|
+
health: {
|
|
332
|
+
methodKind: "unary";
|
|
333
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").HealthRequestSchema;
|
|
334
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").HealthResponseSchema;
|
|
335
|
+
};
|
|
336
|
+
createSpace: {
|
|
337
|
+
methodKind: "unary";
|
|
338
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CreateSpaceRequestSchema;
|
|
339
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SpaceSchema;
|
|
340
|
+
};
|
|
341
|
+
listSpaces: {
|
|
342
|
+
methodKind: "unary";
|
|
343
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListSpacesRequestSchema;
|
|
344
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListSpacesResponseSchema;
|
|
345
|
+
};
|
|
346
|
+
upsertNode: {
|
|
347
|
+
methodKind: "unary";
|
|
348
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").UpsertNodeRequestSchema;
|
|
349
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").NodeSchema;
|
|
350
|
+
};
|
|
351
|
+
getNode: {
|
|
352
|
+
methodKind: "unary";
|
|
353
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetNodeRequestSchema;
|
|
354
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").NodeSchema;
|
|
355
|
+
};
|
|
356
|
+
listChildren: {
|
|
357
|
+
methodKind: "unary";
|
|
358
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListChildrenRequestSchema;
|
|
359
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListChildrenResponseSchema;
|
|
360
|
+
};
|
|
361
|
+
deleteNode: {
|
|
362
|
+
methodKind: "unary";
|
|
363
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").DeleteNodeRequestSchema;
|
|
364
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").DeleteNodeResponseSchema;
|
|
365
|
+
};
|
|
366
|
+
moveNode: {
|
|
367
|
+
methodKind: "unary";
|
|
368
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").MoveNodeRequestSchema;
|
|
369
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").NodeSchema;
|
|
370
|
+
};
|
|
371
|
+
restoreNode: {
|
|
372
|
+
methodKind: "unary";
|
|
373
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RestoreNodeRequestSchema;
|
|
374
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").NodeSchema;
|
|
375
|
+
};
|
|
376
|
+
saveRevision: {
|
|
377
|
+
methodKind: "unary";
|
|
378
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SaveRevisionRequestSchema;
|
|
379
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevisionSchema;
|
|
380
|
+
};
|
|
381
|
+
listRevisions: {
|
|
382
|
+
methodKind: "unary";
|
|
383
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListRevisionsRequestSchema;
|
|
384
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListRevisionsResponseSchema;
|
|
385
|
+
};
|
|
386
|
+
getRevisionIndexStatus: {
|
|
387
|
+
methodKind: "unary";
|
|
388
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetRevisionIndexStatusRequestSchema;
|
|
389
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevisionIndexStateSchema;
|
|
390
|
+
};
|
|
391
|
+
retryRevisionIndex: {
|
|
392
|
+
methodKind: "unary";
|
|
393
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RetryRevisionIndexRequestSchema;
|
|
394
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevisionIndexStateSchema;
|
|
395
|
+
};
|
|
396
|
+
setAcl: {
|
|
397
|
+
methodKind: "unary";
|
|
398
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SetAclRequestSchema;
|
|
399
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").AclEntrySchema;
|
|
400
|
+
};
|
|
401
|
+
revokeAcl: {
|
|
402
|
+
methodKind: "unary";
|
|
403
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevokeAclRequestSchema;
|
|
404
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevokeAclResponseSchema;
|
|
405
|
+
};
|
|
406
|
+
listAcl: {
|
|
407
|
+
methodKind: "unary";
|
|
408
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListAclRequestSchema;
|
|
409
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListAclResponseSchema;
|
|
410
|
+
};
|
|
411
|
+
createInvite: {
|
|
412
|
+
methodKind: "unary";
|
|
413
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CreateInviteRequestSchema;
|
|
414
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").InviteSchema;
|
|
415
|
+
};
|
|
416
|
+
listInvites: {
|
|
417
|
+
methodKind: "unary";
|
|
418
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListInvitesRequestSchema;
|
|
419
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ListInvitesResponseSchema;
|
|
420
|
+
};
|
|
421
|
+
revokeInvite: {
|
|
422
|
+
methodKind: "unary";
|
|
423
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevokeInviteRequestSchema;
|
|
424
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").RevokeInviteResponseSchema;
|
|
425
|
+
};
|
|
426
|
+
acceptInvite: {
|
|
427
|
+
methodKind: "unary";
|
|
428
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").AcceptInviteRequestSchema;
|
|
429
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").AclEntrySchema;
|
|
430
|
+
};
|
|
431
|
+
createAsset: {
|
|
432
|
+
methodKind: "unary";
|
|
433
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").CreateAssetRequestSchema;
|
|
434
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").AssetSchema;
|
|
435
|
+
};
|
|
436
|
+
publishRelease: {
|
|
437
|
+
methodKind: "unary";
|
|
438
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").PublishReleaseRequestSchema;
|
|
439
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ReleaseSchema;
|
|
440
|
+
};
|
|
441
|
+
getRelease: {
|
|
442
|
+
methodKind: "unary";
|
|
443
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").GetReleaseRequestSchema;
|
|
444
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").ReleaseSchema;
|
|
445
|
+
};
|
|
446
|
+
search: {
|
|
447
|
+
methodKind: "unary";
|
|
448
|
+
input: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SearchRequestSchema;
|
|
449
|
+
output: typeof import("./gen/agentfactory/docs/v1/docs_pb.js").SearchResponseSchema;
|
|
450
|
+
};
|
|
451
|
+
}>>;
|
|
452
|
+
};
|
|
453
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0B3E"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createClient } from "@connectrpc/connect";
|
|
2
|
+
import { createGrpcWebTransport } from "@connectrpc/connect-web";
|
|
3
|
+
import { AgentCapabilityService, AgentCollaborationService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService, } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
4
|
+
import { DocsService } from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
5
|
+
export * as agentV1 from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
6
|
+
export * as docsV1 from "./gen/agentfactory/docs/v1/docs_pb.js";
|
|
7
|
+
export { AgentCapabilityService, AgentCollaborationService, AgentInteractionService, AgentMemoryService, AgentProfileService, AgentSessionService, DocsService, };
|
|
8
|
+
export * from "./session-model.js";
|
|
9
|
+
export * from "./document-assistant-model.js";
|
|
10
|
+
export function createAgentFactoryClients(options) {
|
|
11
|
+
const transport = createGrpcWebTransport({
|
|
12
|
+
baseUrl: options.baseUrl.replace(/\/$/, ""),
|
|
13
|
+
interceptors: [contextInterceptor(options.headers), ...(options.interceptors ?? [])],
|
|
14
|
+
});
|
|
15
|
+
const sessions = createClient(AgentSessionService, transport);
|
|
16
|
+
const interactions = createClient(AgentInteractionService, transport);
|
|
17
|
+
return {
|
|
18
|
+
agent: {
|
|
19
|
+
sessions,
|
|
20
|
+
profiles: createClient(AgentProfileService, transport),
|
|
21
|
+
capabilities: createClient(AgentCapabilityService, transport),
|
|
22
|
+
memories: createClient(AgentMemoryService, transport),
|
|
23
|
+
interactions,
|
|
24
|
+
sessionTransport: {
|
|
25
|
+
getSession: sessions.getSession,
|
|
26
|
+
submitInput: sessions.submitInput,
|
|
27
|
+
followEvents: sessions.followEvents,
|
|
28
|
+
getRun: sessions.getRun,
|
|
29
|
+
cancelRun: sessions.cancelRun,
|
|
30
|
+
resolveInteraction: interactions.resolveInteraction,
|
|
31
|
+
},
|
|
32
|
+
collaborations: createClient(AgentCollaborationService, transport),
|
|
33
|
+
},
|
|
34
|
+
docs: createClient(DocsService, transport),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function contextInterceptor(headers) {
|
|
38
|
+
return (next) => async (request) => {
|
|
39
|
+
if (headers)
|
|
40
|
+
new Headers(await headers()).forEach((value, key) => request.header.set(key, value));
|
|
41
|
+
if (!request.header.has("x-request-id"))
|
|
42
|
+
request.header.set("x-request-id", crypto.randomUUID());
|
|
43
|
+
return next(request);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,OAAO,KAAK,OAAO,MAAM,yCAAyC,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,uCAAuC,CAAC;AAChE,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,GACZ,CAAC;AACF,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAQ9C,MAAM,UAAU,yBAAyB,CAAC,OAAkC;IAC1E,MAAM,SAAS,GAAG,sBAAsB,CAAC;QACvC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAC3C,YAAY,EAAE,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C,GAAG,CAAC,cAAc,CAAC;YAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QACjG,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { type JsonValue } from "@bufbuild/protobuf";
|
|
2
|
+
import { type ContentBlock, type InputReceipt, type Interaction, type Run, type Session, type SessionEvent } from "./gen/agentfactory/agent/v1/agent_pb.js";
|
|
3
|
+
export interface AgentSessionTransport {
|
|
4
|
+
getSession(request: {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
}, options?: {
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}): Promise<Session>;
|
|
9
|
+
submitInput(request: ReturnType<typeof submitRequest>, options?: {
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}): Promise<InputReceipt>;
|
|
12
|
+
followEvents(request: {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
afterSeq: bigint;
|
|
15
|
+
}, options?: {
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}): AsyncIterable<SessionEvent>;
|
|
18
|
+
getRun(request: {
|
|
19
|
+
sessionId: string;
|
|
20
|
+
runId: string;
|
|
21
|
+
}, options?: {
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
}): Promise<Run>;
|
|
24
|
+
cancelRun(request: {
|
|
25
|
+
sessionId: string;
|
|
26
|
+
runId: string;
|
|
27
|
+
}): Promise<Run>;
|
|
28
|
+
resolveInteraction(request: ReturnType<typeof interactionRequest>, options?: {
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
}): Promise<Interaction>;
|
|
31
|
+
}
|
|
32
|
+
export type AgentDataSlots = Record<string, unknown>;
|
|
33
|
+
export type AgentProjectionPosition = {
|
|
34
|
+
anchorSeq: bigint;
|
|
35
|
+
lastUpdatedSeq: bigint;
|
|
36
|
+
};
|
|
37
|
+
export type AgentDataProjection<Slots extends AgentDataSlots = AgentDataSlots> = {
|
|
38
|
+
[Name in keyof Slots & string]: AgentProjectionPosition & {
|
|
39
|
+
slot: "data";
|
|
40
|
+
blockIndex: number;
|
|
41
|
+
name: Name;
|
|
42
|
+
value: unknown;
|
|
43
|
+
};
|
|
44
|
+
}[keyof Slots & string];
|
|
45
|
+
export type AgentToolProjection = AgentProjectionPosition & {
|
|
46
|
+
slot: "tool-card";
|
|
47
|
+
phase: string;
|
|
48
|
+
callId: string;
|
|
49
|
+
name: string;
|
|
50
|
+
arguments?: JsonValue;
|
|
51
|
+
result?: JsonValue;
|
|
52
|
+
error: boolean;
|
|
53
|
+
};
|
|
54
|
+
export type AgentActionProjection = AgentProjectionPosition & {
|
|
55
|
+
slot: "action";
|
|
56
|
+
interactionId: string;
|
|
57
|
+
kind: string;
|
|
58
|
+
phase: string;
|
|
59
|
+
payload?: JsonValue;
|
|
60
|
+
resolution?: string;
|
|
61
|
+
response?: JsonValue;
|
|
62
|
+
};
|
|
63
|
+
export type AgentProjectionItem<Slots extends AgentDataSlots = AgentDataSlots> = (AgentProjectionPosition & {
|
|
64
|
+
slot: "message-content";
|
|
65
|
+
role: string;
|
|
66
|
+
text: string;
|
|
67
|
+
}) | AgentToolProjection | AgentActionProjection | (AgentProjectionPosition & {
|
|
68
|
+
slot: "citation";
|
|
69
|
+
blockIndex: number;
|
|
70
|
+
resourceId: string;
|
|
71
|
+
mediaType?: string;
|
|
72
|
+
label?: string;
|
|
73
|
+
uri?: string;
|
|
74
|
+
excerpt?: string;
|
|
75
|
+
}) | AgentDataProjection<Slots> | (AgentProjectionPosition & {
|
|
76
|
+
slot: "trace-item";
|
|
77
|
+
kind: string;
|
|
78
|
+
status: string;
|
|
79
|
+
});
|
|
80
|
+
export interface AgentSessionProjection<Slots extends AgentDataSlots = AgentDataSlots> {
|
|
81
|
+
lastSeq: bigint;
|
|
82
|
+
items: AgentProjectionItem<Slots>[];
|
|
83
|
+
text: string;
|
|
84
|
+
}
|
|
85
|
+
export type AgentRunStatus = "queued" | "running" | "waiting_for_input" | "completed" | "failed" | "cancelled" | "max_steps_reached";
|
|
86
|
+
export type AgentSubmitDraft = {
|
|
87
|
+
text: string;
|
|
88
|
+
content?: ContentBlock[];
|
|
89
|
+
explicitSkillSlug: string;
|
|
90
|
+
idempotencyKey: string;
|
|
91
|
+
};
|
|
92
|
+
export type AgentSessionState<Slots extends AgentDataSlots = AgentDataSlots> = {
|
|
93
|
+
status: "idle" | "submitting" | AgentRunStatus | "disconnected";
|
|
94
|
+
sessionId: string;
|
|
95
|
+
run?: Run;
|
|
96
|
+
events: SessionEvent[];
|
|
97
|
+
projection: AgentSessionProjection<Slots>;
|
|
98
|
+
error?: Error;
|
|
99
|
+
retryDraft?: AgentSubmitDraft;
|
|
100
|
+
};
|
|
101
|
+
export declare class AgentSessionModel<Slots extends AgentDataSlots = AgentDataSlots> {
|
|
102
|
+
#private;
|
|
103
|
+
private readonly transport;
|
|
104
|
+
constructor(transport: AgentSessionTransport, sessionId: string);
|
|
105
|
+
getSnapshot: () => AgentSessionState<Slots>;
|
|
106
|
+
subscribe: (listener: () => void) => () => boolean;
|
|
107
|
+
submitText(text: string, explicitSkillSlug?: string): Promise<Run>;
|
|
108
|
+
submitContent(content: readonly ContentBlock[], explicitSkillSlug?: string): Promise<Run>;
|
|
109
|
+
retry(): Promise<Run>;
|
|
110
|
+
steerText(text: string): Promise<InputReceipt>;
|
|
111
|
+
injectText(text: string): Promise<InputReceipt>;
|
|
112
|
+
bootstrap(): Promise<Run | undefined>;
|
|
113
|
+
resolveInteraction(interactionId: string, resolution: "confirmed" | "rejected" | "answered", payload?: JsonValue): Promise<Run>;
|
|
114
|
+
hydrate(events: readonly SessionEvent[], run?: Run): void;
|
|
115
|
+
resume(): Promise<Run>;
|
|
116
|
+
cancel(): Promise<void>;
|
|
117
|
+
}
|
|
118
|
+
declare function submitRequest(sessionId: string, content: ContentBlock[], deliveryMode: "followup" | "steer" | "inject", explicitSkillSlug: string, idempotencyKey: string): import("./gen/agentfactory/agent/v1/agent_pb.js").SubmitInputRequest;
|
|
119
|
+
declare function interactionRequest(interactionId: string, resolution: "confirmed" | "rejected" | "answered", payload?: JsonValue): import("./gen/agentfactory/agent/v1/agent_pb.js").ResolveInteractionRequest;
|
|
120
|
+
export declare function project<Slots extends AgentDataSlots = AgentDataSlots>(events: readonly SessionEvent[]): AgentSessionProjection<Slots>;
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=session-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-model.d.ts","sourceRoot":"","sources":["../src/session-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAUL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,YAAY,EAClB,MAAM,yCAAyC,CAAC;AAEjD,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjG,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAClH,YAAY,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;IAChI,MAAM,CAAC,OAAO,EAAE;Q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