@collective-intelligence/external-apps-server-sdk 0.0.0-stage → 0.1.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.
Files changed (40) hide show
  1. package/README.md +1075 -2
  2. package/dist/admin.d.ts +7556 -0
  3. package/dist/admin.js +6 -0
  4. package/dist/auth/better-auth.d.ts +71 -0
  5. package/dist/auth/better-auth.js +1 -0
  6. package/dist/auth/federated.d.ts +135 -0
  7. package/dist/auth/federated.js +8 -0
  8. package/dist/auth.d.ts +162 -0
  9. package/dist/auth.js +1 -0
  10. package/dist/express.d.ts +644 -0
  11. package/dist/express.js +1 -0
  12. package/dist/gateway/contracts.d.ts +663 -0
  13. package/dist/gateway/contracts.js +0 -0
  14. package/dist/gateway.d.ts +762 -0
  15. package/dist/gateway.js +8 -0
  16. package/dist/index.d.ts +597 -0
  17. package/dist/index.js +9 -0
  18. package/dist/knowledge-sources/payload.d.ts +420 -0
  19. package/dist/knowledge-sources/payload.js +1 -0
  20. package/dist/knowledge-sources/strapi.d.ts +389 -0
  21. package/dist/knowledge-sources/strapi.js +1 -0
  22. package/dist/persistence/drizzle-effect.d.ts +38 -0
  23. package/dist/persistence/drizzle-effect.js +1 -0
  24. package/dist/persistence/drizzle.d.ts +1514 -0
  25. package/dist/persistence/drizzle.js +18 -0
  26. package/dist/resources.d.ts +423 -0
  27. package/dist/resources.js +15 -0
  28. package/dist/runtime/effect.d.ts +954 -0
  29. package/dist/runtime/effect.js +15 -0
  30. package/dist/runtime/express.d.ts +644 -0
  31. package/dist/runtime/express.js +1 -0
  32. package/dist/runtime/nestjs.d.ts +802 -0
  33. package/dist/runtime/nestjs.js +8 -0
  34. package/dist/runtime/next.d.ts +874 -0
  35. package/dist/runtime/next.js +8 -0
  36. package/dist/runtime/web.d.ts +776 -0
  37. package/dist/runtime/web.js +8 -0
  38. package/dist/tools/ai-sdk.d.ts +170 -0
  39. package/dist/tools/ai-sdk.js +8 -0
  40. package/package.json +242 -4
@@ -0,0 +1,597 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ export type ResourceJsonValue = null | boolean | number | string | readonly ResourceJsonValue[] | Readonly<{
4
+ [key: string]: ResourceJsonValue;
5
+ }>;
6
+ export type ExternalApplicationsGetContextErrors = {
7
+ /**
8
+ * Error
9
+ */
10
+ 400: {
11
+ correlationId: string;
12
+ error: {
13
+ code: "invalid_request";
14
+ message: string;
15
+ retryable: false;
16
+ };
17
+ };
18
+ /**
19
+ * Error
20
+ */
21
+ 401: {
22
+ correlationId: string;
23
+ error: {
24
+ code: "authentication_required";
25
+ message: string;
26
+ retryable: false;
27
+ };
28
+ };
29
+ /**
30
+ * Error
31
+ */
32
+ 403: {
33
+ correlationId: string;
34
+ error: {
35
+ code: "authorization_denied";
36
+ message: string;
37
+ retryable: false;
38
+ };
39
+ };
40
+ /**
41
+ * Error
42
+ */
43
+ 404: {
44
+ correlationId: string;
45
+ error: {
46
+ code: "operation_not_allowed";
47
+ message: string;
48
+ retryable: false;
49
+ };
50
+ } | {
51
+ correlationId: string;
52
+ error: {
53
+ code: "not_found";
54
+ message: string;
55
+ retryable: false;
56
+ };
57
+ };
58
+ /**
59
+ * Error
60
+ */
61
+ 409: {
62
+ correlationId: string;
63
+ error: {
64
+ code: "conflict";
65
+ message: string;
66
+ retryable: false;
67
+ };
68
+ };
69
+ /**
70
+ * Error
71
+ */
72
+ 500: {
73
+ correlationId: string;
74
+ error: {
75
+ code: "internal_error";
76
+ message: string;
77
+ retryable: false;
78
+ };
79
+ };
80
+ /**
81
+ * Error
82
+ */
83
+ 503: {
84
+ correlationId: string;
85
+ error: {
86
+ code: "temporarily_unavailable";
87
+ message: string;
88
+ retryable: true;
89
+ };
90
+ };
91
+ };
92
+ export type ExternalApplicationsGetContextError = ExternalApplicationsGetContextErrors[keyof ExternalApplicationsGetContextErrors];
93
+ export type JsonValue = boolean | null | number | readonly JsonValue[] | Readonly<{
94
+ readonly [key: string]: JsonValue;
95
+ }> | string;
96
+ export type JsonObject = Readonly<Record<string, JsonValue>>;
97
+ export type WorkflowInvokeTarget = {
98
+ workflowId: string;
99
+ workflowFqn?: never;
100
+ } | {
101
+ workflowFqn: string;
102
+ workflowId?: never;
103
+ };
104
+ /** Addresses an Agent by its UUID or its in-organization FQN. */
105
+ export type AgentInvokeTarget = {
106
+ agentId: string;
107
+ agentFqn?: never;
108
+ } | {
109
+ agentFqn: string;
110
+ agentId?: never;
111
+ };
112
+ /** Starts a conversation with an Agent, or continues an existing one. */
113
+ export type ConversationContinueTarget = (AgentInvokeTarget & {
114
+ conversationId?: never;
115
+ }) | {
116
+ agentFqn?: never;
117
+ agentId?: never;
118
+ conversationId: string;
119
+ };
120
+ export type ConversationTurnStatus = "accepted" | "cancelled" | "failed" | "running" | "succeeded";
121
+ /**
122
+ * One conversation turn: the application's input, the Agent's final message
123
+ * once its run succeeded, and the Agent Output the run saved, if any.
124
+ * `runId` identifies the turn and its producing run.
125
+ */
126
+ export interface ConversationTurn {
127
+ completedAt: string | null;
128
+ createdAt: string;
129
+ input: unknown;
130
+ message: string | null;
131
+ output?: unknown;
132
+ runId: string;
133
+ status: ConversationTurnStatus;
134
+ }
135
+ export interface ConversationHistory {
136
+ agentId: string;
137
+ conversationId: string;
138
+ createdAt: string;
139
+ turns: ConversationTurn[];
140
+ }
141
+ export interface QueryFilter {
142
+ caseSensitive?: boolean;
143
+ field: string;
144
+ op: "eq" | "neq" | "in" | "contains" | "gt" | "gte" | "lt" | "lte" | "exists";
145
+ value?: unknown;
146
+ }
147
+ export interface SearchQuery {
148
+ cursor?: string;
149
+ entitySchemaId: string;
150
+ fields?: string[];
151
+ filters?: QueryFilter[];
152
+ limit?: number;
153
+ text?: string;
154
+ }
155
+ export type KnowledgeQuery = {
156
+ entityId: string;
157
+ op: "get";
158
+ } | {
159
+ anchorEntityId: string;
160
+ filters?: QueryFilter[];
161
+ limit?: number;
162
+ op: "related";
163
+ relationSchemaId: string;
164
+ text?: string;
165
+ } | (SearchQuery & {
166
+ op: "search";
167
+ }) | {
168
+ entitySchemaId: string;
169
+ fields: string[];
170
+ filters?: QueryFilter[];
171
+ op: "facets";
172
+ text?: string;
173
+ } | (SearchQuery & {
174
+ op: "autocomplete";
175
+ });
176
+ export type ExternalApplicationOperationRequest = {
177
+ input: JsonObject | unknown[];
178
+ operationId: "context_get";
179
+ } | {
180
+ input: {
181
+ query: KnowledgeQuery;
182
+ };
183
+ operationId: "knowledge_query";
184
+ } | {
185
+ input: {
186
+ schemaId: string;
187
+ };
188
+ operationId: "knowledge_get_entity_schema_snapshot";
189
+ } | {
190
+ input: SearchQuery;
191
+ operationId: "knowledge_search_entities";
192
+ } | {
193
+ input: {
194
+ entitySchemaId: string;
195
+ fields: string[];
196
+ filters?: QueryFilter[];
197
+ text?: string;
198
+ };
199
+ operationId: "knowledge_facets";
200
+ } | {
201
+ input: {
202
+ entitySchemaId: string;
203
+ };
204
+ operationId: "knowledge_get_schema_query_context";
205
+ } | {
206
+ input: SearchQuery;
207
+ operationId: "knowledge_autocomplete";
208
+ } | {
209
+ input: {
210
+ entityId: string;
211
+ };
212
+ operationId: "knowledge_get_entity";
213
+ } | {
214
+ input: {
215
+ entity: {
216
+ data: JsonObject;
217
+ description?: string;
218
+ entitySchemaId: string;
219
+ name: string;
220
+ };
221
+ idempotencyKey: string;
222
+ };
223
+ operationId: "knowledge_create_entity";
224
+ } | {
225
+ input: {
226
+ entity: {
227
+ data?: JsonObject;
228
+ description?: string;
229
+ name?: string;
230
+ };
231
+ entityId: string;
232
+ expectedVersion: number;
233
+ idempotencyKey: string;
234
+ };
235
+ operationId: "knowledge_update_entity";
236
+ } | {
237
+ input: {
238
+ entity: {
239
+ data: JsonObject;
240
+ description?: string;
241
+ entitySchemaId: string;
242
+ name: string;
243
+ };
244
+ entitySchemaId: string;
245
+ externalIdentity: {
246
+ source: string;
247
+ value: string;
248
+ };
249
+ idempotencyKey: string;
250
+ };
251
+ operationId: "knowledge_upsert_entity";
252
+ } | {
253
+ input: {
254
+ entityId: string;
255
+ expectedVersion: number;
256
+ idempotencyKey: string;
257
+ };
258
+ operationId: "knowledge_delete_entity";
259
+ } | {
260
+ input: {
261
+ anchorEntityId: string;
262
+ direction?: "incoming" | "outgoing" | "both";
263
+ limit?: number;
264
+ maxDepth?: number;
265
+ relationSchemaId?: string;
266
+ };
267
+ operationId: "knowledge_traverse";
268
+ } | {
269
+ input: {
270
+ idempotencyKey: string;
271
+ relation: {
272
+ data?: JsonObject;
273
+ relationSchemaId: string;
274
+ sourceId: string;
275
+ targetId: string;
276
+ };
277
+ };
278
+ operationId: "knowledge_create_relation";
279
+ } | {
280
+ input: {
281
+ expectedVersion: number;
282
+ idempotencyKey: string;
283
+ relation: {
284
+ data?: JsonObject;
285
+ };
286
+ relationId: string;
287
+ };
288
+ operationId: "knowledge_update_relation";
289
+ } | {
290
+ input: {
291
+ expectedVersion: number;
292
+ idempotencyKey: string;
293
+ relationId: string;
294
+ };
295
+ operationId: "knowledge_delete_relation";
296
+ } | {
297
+ input: {
298
+ filter?: JsonObject;
299
+ };
300
+ operationId: "agents_list";
301
+ } | {
302
+ input: {
303
+ idempotencyKey: string;
304
+ input: unknown;
305
+ } & AgentInvokeTarget;
306
+ operationId: "agents_invoke";
307
+ } | {
308
+ input: {
309
+ filter?: JsonObject;
310
+ };
311
+ operationId: "skills_list";
312
+ } | {
313
+ input: {
314
+ idempotencyKey: string;
315
+ input: unknown;
316
+ skillId: string;
317
+ };
318
+ operationId: "skills_invoke";
319
+ } | {
320
+ input: {
321
+ filter?: JsonObject;
322
+ };
323
+ operationId: "workflows_list";
324
+ } | {
325
+ input: {
326
+ idempotencyKey: string;
327
+ input: unknown;
328
+ } & WorkflowInvokeTarget;
329
+ operationId: "workflows_invoke";
330
+ } | {
331
+ input: {
332
+ runId: string;
333
+ };
334
+ operationId: "runs_get";
335
+ } | {
336
+ input: {
337
+ afterCursor?: string;
338
+ runId: string;
339
+ };
340
+ operationId: "runs_stream";
341
+ } | {
342
+ input: {
343
+ runId: string;
344
+ };
345
+ operationId: "runs_cancel";
346
+ } | {
347
+ input: {
348
+ contentBase64: string;
349
+ contentType: string;
350
+ fileName: string;
351
+ runId: string;
352
+ sizeBytes: number;
353
+ };
354
+ operationId: "attachments_upload";
355
+ } | {
356
+ input: {
357
+ attachmentId: string;
358
+ runId: string;
359
+ };
360
+ operationId: "attachments_download_url";
361
+ } | {
362
+ input: {
363
+ idempotencyKey: string;
364
+ input: unknown;
365
+ } & ConversationContinueTarget;
366
+ operationId: "conversations_continue";
367
+ } | {
368
+ input: {
369
+ conversationId: string;
370
+ };
371
+ operationId: "conversations_history";
372
+ };
373
+ export interface EnvelopeSuccess<Id extends string, Result> {
374
+ correlationId: string;
375
+ operationId: Id;
376
+ result: Result;
377
+ }
378
+ export type ExternalApplicationOperationSuccess = EnvelopeSuccess<"context_get", JsonObject> | EnvelopeSuccess<"knowledge_query", JsonObject> | EnvelopeSuccess<"knowledge_get_entity_schema_snapshot", JsonObject> | EnvelopeSuccess<"knowledge_search_entities", JsonObject> | EnvelopeSuccess<"knowledge_facets", JsonObject> | EnvelopeSuccess<"knowledge_get_schema_query_context", JsonObject> | EnvelopeSuccess<"knowledge_autocomplete", JsonObject> | EnvelopeSuccess<"knowledge_get_entity", JsonObject> | EnvelopeSuccess<"knowledge_create_entity", JsonObject> | EnvelopeSuccess<"knowledge_update_entity", JsonObject> | EnvelopeSuccess<"knowledge_upsert_entity", JsonObject> | EnvelopeSuccess<"knowledge_delete_entity", JsonObject> | EnvelopeSuccess<"knowledge_traverse", JsonObject> | EnvelopeSuccess<"knowledge_create_relation", JsonObject> | EnvelopeSuccess<"knowledge_update_relation", JsonObject> | EnvelopeSuccess<"knowledge_delete_relation", JsonObject> | EnvelopeSuccess<"agents_list", JsonObject> | EnvelopeSuccess<"agents_invoke", {
379
+ runId: string;
380
+ }> | EnvelopeSuccess<"skills_list", JsonObject> | EnvelopeSuccess<"skills_invoke", {
381
+ runId: string;
382
+ }> | EnvelopeSuccess<"workflows_list", JsonObject> | EnvelopeSuccess<"workflows_invoke", {
383
+ runId: string;
384
+ }> | EnvelopeSuccess<"runs_get", JsonObject> | EnvelopeSuccess<"runs_stream", {
385
+ events: JsonObject[];
386
+ nextCursor: string | null;
387
+ }> | EnvelopeSuccess<"runs_cancel", JsonObject> | EnvelopeSuccess<"attachments_upload", {
388
+ attachmentId: string;
389
+ }> | EnvelopeSuccess<"attachments_download_url", {
390
+ expiresAt: string;
391
+ url: string;
392
+ }> | EnvelopeSuccess<"conversations_continue", {
393
+ conversationId: string;
394
+ runId: string;
395
+ }> | EnvelopeSuccess<"conversations_history", ConversationHistory>;
396
+ export type ExternalApplicationOperationFailure = ExternalApplicationsGetContextError;
397
+ export type ExternalApplicationOperationId = ExternalApplicationOperationRequest["operationId"];
398
+ export type ExternalApplicationOperationRequestFor<Id extends ExternalApplicationOperationId> = Extract<ExternalApplicationOperationRequest, {
399
+ operationId: Id;
400
+ }>;
401
+ export type ExternalApplicationOperationSuccessFor<Id extends ExternalApplicationOperationId> = Extract<ExternalApplicationOperationSuccess, {
402
+ operationId: Id;
403
+ }>;
404
+ export type ExternalApplicationOperationResult<Id extends ExternalApplicationOperationId> = Readonly<{
405
+ error: ExternalApplicationOperationFailure;
406
+ ok: false;
407
+ }> | Readonly<{
408
+ ok: true;
409
+ value: ExternalApplicationOperationSuccessFor<Id>;
410
+ }>;
411
+ export interface ExternalApplicationExternalAuditSubject {
412
+ readonly issuer: string;
413
+ readonly mappedUserId?: string;
414
+ readonly subjectId: string;
415
+ }
416
+ export interface ConfidentialCredentials {
417
+ readonly clientId: string;
418
+ readonly clientSecret: string;
419
+ }
420
+ export interface RotatingConfidentialCredentialProvider {
421
+ readonly getCredentials: () => ConfidentialCredentials | Promise<ConfidentialCredentials>;
422
+ }
423
+ export type ConfidentialCredentialProvider = ConfidentialCredentials | RotatingConfidentialCredentialProvider;
424
+ export interface ServerRetryPolicy {
425
+ readonly baseDelayMs?: number;
426
+ readonly maxAttempts?: number;
427
+ readonly maxDelayMs?: number;
428
+ }
429
+ export type DelegatedServerAuthentication = Readonly<{
430
+ getAccessToken: () => Promise<string> | string;
431
+ mode?: "delegated";
432
+ }>;
433
+ export type ServiceServerAuthentication = Readonly<{
434
+ credentials: ConfidentialCredentialProvider;
435
+ mode: "service";
436
+ }>;
437
+ export type ServerClientAuthentication = DelegatedServerAuthentication | ServiceServerAuthentication;
438
+ export interface ServerClientConfig {
439
+ readonly auditSubject?: ExternalApplicationExternalAuditSubject;
440
+ readonly authentication: ServerClientAuthentication;
441
+ readonly createCorrelationId?: () => string;
442
+ readonly createIdempotencyKey?: () => string;
443
+ readonly fetch?: typeof globalThis.fetch;
444
+ readonly retry?: ServerRetryPolicy;
445
+ readonly sleep?: (milliseconds: number) => Promise<void>;
446
+ readonly tenantUrl: string;
447
+ }
448
+ export interface ServerInvocationContext {
449
+ readonly auditSubject?: ExternalApplicationExternalAuditSubject;
450
+ /**
451
+ * `anonymous_visitor`: this service call is made for the anonymous visitor
452
+ * `auditSubject` names, who must not map to a CI user. The visitor may only
453
+ * converse with Agents that admit anonymous visitors of this application.
454
+ */
455
+ readonly callerKind?: "anonymous_visitor";
456
+ readonly correlationId?: string;
457
+ readonly organizationId: string;
458
+ readonly signal?: AbortSignal;
459
+ readonly traceparent?: string;
460
+ }
461
+ export type OperationInput<Id extends ExternalApplicationOperationId> = ExternalApplicationOperationRequestFor<Id>["input"];
462
+ export type ManagedInput<Input> = Input extends {
463
+ idempotencyKey: string;
464
+ } ? Omit<Input, "idempotencyKey"> & {
465
+ readonly idempotencyKey?: string;
466
+ } : Input;
467
+ export type ManagedOperationInput<Id extends ExternalApplicationOperationId> = ManagedInput<OperationInput<Id>>;
468
+ export type ServerOperationRequest<Id extends ExternalApplicationOperationId> = ManagedOperationInput<Id> & ServerInvocationContext;
469
+ export type ServerOperationMethod<Id extends ExternalApplicationOperationId> = (request: ServerOperationRequest<Id>) => Promise<ExternalApplicationOperationResult<Id>>;
470
+ export type RunOperationId = "runs_cancel" | "runs_get" | "runs_stream";
471
+ export type ServerRunStatus = "accepted" | "cancelled" | "failed" | "running" | "succeeded";
472
+ /**
473
+ * A succeeded Agent run's result: the normal final assistant `message` and,
474
+ * when the run saved one, its schema-valid structured Agent `output`.
475
+ */
476
+ export type ServerAgentRunResult = Readonly<{
477
+ message: string;
478
+ output?: ResourceJsonValue;
479
+ }>;
480
+ /**
481
+ * Snapshot of one external run. `result` is set once the run finishes: a
482
+ * succeeded Agent run carries a `ServerAgentRunResult`, a failed one
483
+ * `{ nativeStatus, reason }`.
484
+ */
485
+ export type ServerRun = Readonly<{
486
+ cancelRequested: boolean;
487
+ completedAt: string | null;
488
+ createdAt: string;
489
+ result: ResourceJsonValue;
490
+ runId: string;
491
+ status: ServerRunStatus;
492
+ updatedAt: string;
493
+ }>;
494
+ /**
495
+ * One run event. `accepted`, `completed`, `failed` and `cancelled` are
496
+ * lifecycle kinds; namespaced kinds such as `app.update` are application
497
+ * events published by the invoked Agent.
498
+ */
499
+ export type ServerRunEvent = Readonly<{
500
+ createdAt: string;
501
+ cursor: string;
502
+ data: Readonly<Record<string, ResourceJsonValue>>;
503
+ kind: string;
504
+ }>;
505
+ export type ServerRunEventPage = Readonly<{
506
+ events: readonly ServerRunEvent[];
507
+ nextCursor: string | null;
508
+ }>;
509
+ /**
510
+ * A conversation's turns, oldest first. Each turn has the Agent's final
511
+ * `message` once its run succeeded and, when the run saved one, its Agent
512
+ * `output`.
513
+ */
514
+ export type ServerConversationHistory = Extract<ExternalApplicationOperationResult<"conversations_history">, {
515
+ ok: true;
516
+ }>["value"]["result"];
517
+ export type ServerConversationTurn = ServerConversationHistory["turns"][number];
518
+ export type RunOperationSuccess<Id extends RunOperationId> = Extract<ExternalApplicationOperationResult<Id>, {
519
+ ok: true;
520
+ }>["value"];
521
+ export type ServerRunOperationResult<Id extends RunOperationId, Result> = Extract<ExternalApplicationOperationResult<Id>, {
522
+ ok: false;
523
+ }> | Readonly<{
524
+ ok: true;
525
+ value: Omit<RunOperationSuccess<Id>, "result"> & Readonly<{
526
+ result: Result;
527
+ }>;
528
+ }>;
529
+ export type ServerRunOperationMethod<Id extends RunOperationId, Result> = (request: ServerOperationRequest<Id>) => Promise<ServerRunOperationResult<Id, Result>>;
530
+ export interface ServerClient {
531
+ readonly agents: Readonly<{
532
+ /** Starts an Agent run addressed by `agentId` or by its Organization `agentFqn`. */
533
+ invoke: ServerOperationMethod<"agents_invoke">;
534
+ list: ServerOperationMethod<"agents_list">;
535
+ }>;
536
+ readonly attachments: Readonly<{
537
+ downloadUrl: ServerOperationMethod<"attachments_download_url">;
538
+ upload: ServerOperationMethod<"attachments_upload">;
539
+ }>;
540
+ readonly context: Readonly<{
541
+ get: ServerOperationMethod<"context_get">;
542
+ }>;
543
+ /**
544
+ * Multi-turn Agent conversations scoped to the caller's Audit subject.
545
+ * `continue({ agentId | agentFqn, input })` starts one; `continue({ conversationId, input })`
546
+ * adds a turn whose run sees the earlier turns. Both return `{ conversationId, runId }`.
547
+ */
548
+ readonly conversations: Readonly<{
549
+ continue: ServerOperationMethod<"conversations_continue">;
550
+ history: ServerOperationMethod<"conversations_history">;
551
+ }>;
552
+ readonly knowledge: Readonly<{
553
+ autocomplete: ServerOperationMethod<"knowledge_autocomplete">;
554
+ createEntity: ServerOperationMethod<"knowledge_create_entity">;
555
+ createRelation: ServerOperationMethod<"knowledge_create_relation">;
556
+ deleteEntity: ServerOperationMethod<"knowledge_delete_entity">;
557
+ deleteRelation: ServerOperationMethod<"knowledge_delete_relation">;
558
+ facets: ServerOperationMethod<"knowledge_facets">;
559
+ getEntity: ServerOperationMethod<"knowledge_get_entity">;
560
+ getEntitySchemaSnapshot: ServerOperationMethod<"knowledge_get_entity_schema_snapshot">;
561
+ getSchemaQueryContext: ServerOperationMethod<"knowledge_get_schema_query_context">;
562
+ query: ServerOperationMethod<"knowledge_query">;
563
+ searchEntities: ServerOperationMethod<"knowledge_search_entities">;
564
+ traverse: ServerOperationMethod<"knowledge_traverse">;
565
+ updateEntity: ServerOperationMethod<"knowledge_update_entity">;
566
+ updateRelation: ServerOperationMethod<"knowledge_update_relation">;
567
+ upsertEntity: ServerOperationMethod<"knowledge_upsert_entity">;
568
+ }>;
569
+ readonly runs: Readonly<{
570
+ cancel: ServerRunOperationMethod<"runs_cancel", ServerRun>;
571
+ get: ServerRunOperationMethod<"runs_get", ServerRun>;
572
+ stream: ServerRunOperationMethod<"runs_stream", ServerRunEventPage>;
573
+ }>;
574
+ readonly skills: Readonly<{
575
+ invoke: ServerOperationMethod<"skills_invoke">;
576
+ list: ServerOperationMethod<"skills_list">;
577
+ }>;
578
+ readonly workflows: Readonly<{
579
+ invoke: ServerOperationMethod<"workflows_invoke">;
580
+ list: ServerOperationMethod<"workflows_list">;
581
+ }>;
582
+ }
583
+ export type RunAsApplicationConfig = Readonly<{
584
+ auditSubject: ExternalApplicationExternalAuditSubject;
585
+ credentials: ConfidentialCredentials;
586
+ createCorrelationId?: () => string;
587
+ createIdempotencyKey?: () => string;
588
+ fetch?: typeof globalThis.fetch;
589
+ retry?: ServerRetryPolicy;
590
+ sleep?: (milliseconds: number) => Promise<void>;
591
+ tenantUrl: string;
592
+ }>;
593
+ export declare const createServerClient: (config: ServerClientConfig) => ServerClient, serverSdkRuntime: "node";
594
+ export declare const runAsApplication: (config: RunAsApplicationConfig) => ServerClient;
595
+ export declare const uuidV7: () => string;
596
+
597
+ export {};