@sequenceholdings/artifact-studio 0.10.1 → 0.11.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.
@@ -0,0 +1,870 @@
1
+ import { type ArtifactServerClient, type ArtifactServerClientOptions, type ArtifactServerContext } from './client.js';
2
+ import type { ArtifactExternalAccept } from './external-context.js';
3
+ type PlatformSource = Pick<ArtifactServerClient<ArtifactServerContext>, 'context' | 'principal' | 'mode' | 'log' | 'api' | 'agents' | 'storage' | 'functions' | 'processes' | 'groups' | 'flags' | 'audit'>;
4
+ /** Shared endpoint clients are bound to the existing verified broker, never a bearer fallback. */
5
+ export declare function createArtifactServerPlatformAdapter(client: PlatformSource): {
6
+ context: ArtifactServerContext;
7
+ principal: import("./principal.js").ArtifactPrincipal;
8
+ mode: "service" | "user";
9
+ log: {
10
+ info: (event: string, metadata?: import("./logger.js").ArtifactLogMetadata) => void;
11
+ warn: (event: string, metadata?: import("./logger.js").ArtifactLogMetadata) => void;
12
+ error: (event: string, metadata?: import("./logger.js").ArtifactLogMetadata) => void;
13
+ };
14
+ api: {
15
+ request: (path: string, options?: import("./api-client.js").ArtifactServerFetchOptions) => Promise<Response>;
16
+ fetch<TBody = unknown>(path: string, options?: import("./api-client.js").ArtifactServerFetchOptions): Promise<import("../sdk.js").SequenceApiFetchResponse<TBody>>;
17
+ streamResponse(path: string, options?: import("./api-client.js").ArtifactServerFetchOptions): Promise<Response>;
18
+ stream(path: string, options?: import("./api-client.js").ArtifactServerFetchOptions): Promise<ReadableStream<Uint8Array<ArrayBuffer>>>;
19
+ get: <T = unknown>(path: string) => Promise<T>;
20
+ post: <T = unknown>(path: string, body?: unknown) => Promise<T>;
21
+ put: <T = unknown>(path: string, body?: unknown) => Promise<T>;
22
+ patch: <T = unknown>(path: string, body?: unknown) => Promise<T>;
23
+ delete: <T = unknown>(path: string, body?: unknown) => Promise<T>;
24
+ };
25
+ /** Broker domains retain their narrower, manifest-declared operation contracts. */
26
+ agents: {
27
+ createJob(input: import("./agent-responses.js").ArtifactCreateAgentJob): Promise<import("./agent-responses.js").ArtifactCreatedAgentJob>;
28
+ createWorkflowJob(input: import("./agent-responses.js").ArtifactCreateWorkflowJob): Promise<import("./agent-responses.js").ArtifactCreatedWorkflowJob>;
29
+ getCurrentIdentity(query: {
30
+ kind: "agent" | "workflow";
31
+ id: string;
32
+ }): Promise<import("./agent-responses.js").ArtifactExecutionIdentity>;
33
+ getCompletedRun(query: {
34
+ agent: string;
35
+ runId: string;
36
+ }): Promise<import("./agent-responses.js").ArtifactCompletedAgentRun>;
37
+ captureCompletedRun(query: {
38
+ agent: string;
39
+ runId: string;
40
+ }): Promise<import("./agent-responses.js").ArtifactCompletedAgentSourceCapture>;
41
+ captureCompletedConversation(query: {
42
+ agent: string;
43
+ runId: string;
44
+ }): Promise<import("./agent-responses.js").ArtifactCompletedAgentConversationCapture>;
45
+ captureConversation(query: {
46
+ agent: string;
47
+ threadId: string;
48
+ }): Promise<import("./agent-responses.js").ArtifactAgentConversationSourceCapture>;
49
+ captureCompletedWorkflow(query: {
50
+ workflow: string;
51
+ runId: string;
52
+ }): Promise<import("./agent-responses.js").ArtifactCompletedWorkflowSourceCapture>;
53
+ list: (query?: {
54
+ view?: "list";
55
+ limit?: number;
56
+ offset?: number;
57
+ }) => Promise<unknown>;
58
+ get: ({ agentId }: {
59
+ agentId: string;
60
+ }) => Promise<unknown>;
61
+ tools: {
62
+ execute: ({ server, tool, input }: {
63
+ server: string;
64
+ tool: string;
65
+ input: Record<string, unknown>;
66
+ }) => Promise<unknown>;
67
+ };
68
+ threads: {
69
+ create: (input: import("@sequenceholdings/platform/browser").PlatformAgentThreadInput) => Promise<unknown>;
70
+ get: ({ threadId }: {
71
+ threadId: string;
72
+ }) => Promise<unknown>;
73
+ };
74
+ jobs: {
75
+ create: (input: import("@sequenceholdings/platform/browser").PlatformAgentJobInput) => Promise<unknown>;
76
+ get: ({ jobId }: {
77
+ jobId: string;
78
+ }) => Promise<unknown>;
79
+ cancel: ({ jobId }: {
80
+ jobId: string;
81
+ }) => Promise<unknown>;
82
+ };
83
+ files: {
84
+ create: ({ file, agentId }: {
85
+ file: File;
86
+ agentId?: string;
87
+ }) => Promise<unknown>;
88
+ getUrl: ({ fileId, workflowId, shareId }: {
89
+ fileId: string;
90
+ workflowId?: string;
91
+ shareId?: string;
92
+ }) => Promise<unknown>;
93
+ delete: ({ fileId, agentId }: {
94
+ fileId: string;
95
+ agentId?: string;
96
+ }) => Promise<unknown>;
97
+ contentPath: ({ fileId, agentId, workflowId }: {
98
+ fileId: string;
99
+ agentId?: string;
100
+ workflowId?: string;
101
+ }) => string;
102
+ };
103
+ workflows: {
104
+ get: ({ workflowId }: {
105
+ workflowId: string;
106
+ }) => Promise<unknown>;
107
+ start: ({ workflowId, input, metadata, expectedIdentity, idempotencyKey }: import("@sequenceholdings/platform/browser").PlatformWorkflowRunInput) => Promise<unknown>;
108
+ createRun: ({ workflowId, input, metadata, expectedIdentity, idempotencyKey }: import("@sequenceholdings/platform/browser").PlatformWorkflowRunInput) => Promise<unknown>;
109
+ getRun: ({ runId }: {
110
+ runId: string;
111
+ }) => Promise<unknown>;
112
+ cancelRun: ({ runId }: {
113
+ runId: string;
114
+ }) => Promise<unknown>;
115
+ };
116
+ };
117
+ groups: {
118
+ list(query?: import("./groups.js").ArtifactGroupMembershipsQuery): Promise<import("./groups.js").ArtifactGroupMembershipsPage>;
119
+ resolve(groupIds: string[]): Promise<{
120
+ groups: Array<{
121
+ id: string;
122
+ name: string;
123
+ }>;
124
+ }>;
125
+ directory(query?: import("./group-directory.js").ArtifactGroupDirectoryQuery): Promise<import("./group-directory.js").ArtifactGroupDirectoryPage>;
126
+ get(groupId: string): Promise<import("./group-directory.js").ArtifactGroupDetail>;
127
+ changeMembers(groupId: string, change: import("./group-directory.js").ArtifactGroupMemberChange): Promise<import("./group-directory.js").ArtifactGroupDetail>;
128
+ };
129
+ functions: {
130
+ invoke: ({ id, params }: {
131
+ id: string;
132
+ params?: Record<string, unknown>;
133
+ }) => Promise<unknown>;
134
+ get: ({ id }: {
135
+ id: string;
136
+ }) => Promise<unknown>;
137
+ };
138
+ storage: {
139
+ capabilities: () => Promise<{
140
+ canProvision: boolean;
141
+ uploadMethods: string[];
142
+ pendingUploads: {
143
+ perPrincipal: number;
144
+ perWorkspace: number;
145
+ };
146
+ uploadBatchLimit: number;
147
+ importConcurrency: {
148
+ default: number;
149
+ max: number;
150
+ };
151
+ }>;
152
+ list: (options?: import("@sequenceholdings/storage").StorageListOptions) => Promise<{
153
+ items: {
154
+ id: string;
155
+ name: string;
156
+ description: string;
157
+ environment: string;
158
+ state: "active" | "trashed" | "purging";
159
+ revision: number;
160
+ createdAt: string;
161
+ role: "viewer" | "editor" | "admin" | "owner";
162
+ quotaBytes: number;
163
+ usedBytes: number;
164
+ reservedBytes: number;
165
+ }[];
166
+ nextCursor: string | null;
167
+ }>;
168
+ shared: (options?: import("@sequenceholdings/storage").StorageListOptions & {
169
+ trash?: boolean;
170
+ }) => Promise<{
171
+ items: {
172
+ id: string;
173
+ workspaceId: string;
174
+ parentId: string | null;
175
+ name: string;
176
+ kind: "file" | "folder";
177
+ state: "active" | "trashed" | "purging";
178
+ restricted: boolean;
179
+ revision: number;
180
+ currentVersionId: string | null;
181
+ metadata: Record<string, string>;
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ role: "viewer" | "editor" | "admin";
185
+ size: number | null;
186
+ contentType: string | null;
187
+ }[];
188
+ nextCursor: string | null;
189
+ }>;
190
+ apply: (manifest: import("@sequenceholdings/storage").WorkspaceManifest) => Promise<{
191
+ id: string;
192
+ name: string;
193
+ description: string;
194
+ environment: string;
195
+ state: "active" | "trashed" | "purging";
196
+ revision: number;
197
+ createdAt: string;
198
+ role: "viewer" | "editor" | "admin" | "owner";
199
+ quotaBytes: number;
200
+ usedBytes: number;
201
+ reservedBytes: number;
202
+ }>;
203
+ workspace(id: string): {
204
+ get: () => Promise<{
205
+ id: string;
206
+ name: string;
207
+ description: string;
208
+ environment: string;
209
+ state: "active" | "trashed" | "purging";
210
+ revision: number;
211
+ createdAt: string;
212
+ role: "viewer" | "editor" | "admin" | "owner";
213
+ quotaBytes: number;
214
+ usedBytes: number;
215
+ reservedBytes: number;
216
+ }>;
217
+ delete: (expectedRevision: number) => Promise<{
218
+ id: string;
219
+ workspaceId: string;
220
+ targetId: string | null;
221
+ kind: "purge" | "delete_version";
222
+ status: "running" | "failed" | "queued" | "succeeded";
223
+ completed: number;
224
+ total: number;
225
+ error: string | null;
226
+ createdAt: string;
227
+ updatedAt: string;
228
+ canRetry: boolean;
229
+ }>;
230
+ list: (options?: import("@sequenceholdings/storage").StorageListOptions & {
231
+ parentId?: string | null;
232
+ trash?: boolean;
233
+ }) => Promise<{
234
+ items: {
235
+ id: string;
236
+ workspaceId: string;
237
+ parentId: string | null;
238
+ name: string;
239
+ kind: "file" | "folder";
240
+ state: "active" | "trashed" | "purging";
241
+ restricted: boolean;
242
+ revision: number;
243
+ currentVersionId: string | null;
244
+ metadata: Record<string, string>;
245
+ createdAt: string;
246
+ updatedAt: string;
247
+ role: "viewer" | "editor" | "admin";
248
+ size: number | null;
249
+ contentType: string | null;
250
+ }[];
251
+ nextCursor: string | null;
252
+ }>;
253
+ getNode: (id: string) => Promise<{
254
+ id: string;
255
+ workspaceId: string;
256
+ parentId: string | null;
257
+ name: string;
258
+ kind: "file" | "folder";
259
+ state: "active" | "trashed" | "purging";
260
+ restricted: boolean;
261
+ revision: number;
262
+ currentVersionId: string | null;
263
+ metadata: Record<string, string>;
264
+ createdAt: string;
265
+ updatedAt: string;
266
+ role: "viewer" | "editor" | "admin";
267
+ size: number | null;
268
+ contentType: string | null;
269
+ }>;
270
+ getNodeWithAncestors: (id: string) => Promise<{
271
+ id: string;
272
+ workspaceId: string;
273
+ parentId: string | null;
274
+ name: string;
275
+ kind: "file" | "folder";
276
+ state: "active" | "trashed" | "purging";
277
+ restricted: boolean;
278
+ revision: number;
279
+ currentVersionId: string | null;
280
+ metadata: Record<string, string>;
281
+ createdAt: string;
282
+ updatedAt: string;
283
+ role: "viewer" | "editor" | "admin";
284
+ size: number | null;
285
+ contentType: string | null;
286
+ ancestors: {
287
+ id: string;
288
+ workspaceId: string;
289
+ parentId: string | null;
290
+ name: string;
291
+ kind: "file" | "folder";
292
+ state: "active" | "trashed" | "purging";
293
+ restricted: boolean;
294
+ revision: number;
295
+ currentVersionId: string | null;
296
+ metadata: Record<string, string>;
297
+ createdAt: string;
298
+ updatedAt: string;
299
+ role: "viewer" | "editor" | "admin";
300
+ size: number | null;
301
+ contentType: string | null;
302
+ }[];
303
+ }>;
304
+ createFolder: (name: string, parentId?: string | null, { idempotencyKey, }?: {
305
+ idempotencyKey?: string;
306
+ }) => Promise<{
307
+ id: string;
308
+ workspaceId: string;
309
+ parentId: string | null;
310
+ name: string;
311
+ kind: "file" | "folder";
312
+ state: "active" | "trashed" | "purging";
313
+ restricted: boolean;
314
+ revision: number;
315
+ currentVersionId: string | null;
316
+ metadata: Record<string, string>;
317
+ createdAt: string;
318
+ updatedAt: string;
319
+ role: "viewer" | "editor" | "admin";
320
+ size: number | null;
321
+ contentType: string | null;
322
+ }>;
323
+ update: (id: string, input: import("zod").input<typeof import("@sequenceholdings/storage").updateNodeSchema>) => Promise<{
324
+ id: string;
325
+ workspaceId: string;
326
+ parentId: string | null;
327
+ name: string;
328
+ kind: "file" | "folder";
329
+ state: "active" | "trashed" | "purging";
330
+ restricted: boolean;
331
+ revision: number;
332
+ currentVersionId: string | null;
333
+ metadata: Record<string, string>;
334
+ createdAt: string;
335
+ updatedAt: string;
336
+ role: "viewer" | "editor" | "admin";
337
+ size: number | null;
338
+ contentType: string | null;
339
+ }>;
340
+ trash: (id: string, expectedRevision: number) => Promise<{
341
+ id: string;
342
+ workspaceId: string;
343
+ parentId: string | null;
344
+ name: string;
345
+ kind: "file" | "folder";
346
+ state: "active" | "trashed" | "purging";
347
+ restricted: boolean;
348
+ revision: number;
349
+ currentVersionId: string | null;
350
+ metadata: Record<string, string>;
351
+ createdAt: string;
352
+ updatedAt: string;
353
+ role: "viewer" | "editor" | "admin";
354
+ size: number | null;
355
+ contentType: string | null;
356
+ }>;
357
+ restore: (id: string, expectedRevision: number) => Promise<{
358
+ id: string;
359
+ workspaceId: string;
360
+ parentId: string | null;
361
+ name: string;
362
+ kind: "file" | "folder";
363
+ state: "active" | "trashed" | "purging";
364
+ restricted: boolean;
365
+ revision: number;
366
+ currentVersionId: string | null;
367
+ metadata: Record<string, string>;
368
+ createdAt: string;
369
+ updatedAt: string;
370
+ role: "viewer" | "editor" | "admin";
371
+ size: number | null;
372
+ contentType: string | null;
373
+ }>;
374
+ purge: (id: string, expectedRevision: number) => Promise<{
375
+ id: string;
376
+ workspaceId: string;
377
+ targetId: string | null;
378
+ kind: "purge" | "delete_version";
379
+ status: "running" | "failed" | "queued" | "succeeded";
380
+ completed: number;
381
+ total: number;
382
+ error: string | null;
383
+ createdAt: string;
384
+ updatedAt: string;
385
+ canRetry: boolean;
386
+ }>;
387
+ download: (id: string, options?: {
388
+ versionId?: string;
389
+ preview?: boolean;
390
+ }) => Promise<{
391
+ url: string;
392
+ expiresAt: string;
393
+ preview: boolean;
394
+ }>;
395
+ versions: (id: string, options?: {
396
+ before?: number;
397
+ limit?: number;
398
+ }) => Promise<{
399
+ items: {
400
+ id: string;
401
+ fileId: string;
402
+ revision: number;
403
+ size: number;
404
+ checksum: string;
405
+ contentType: string;
406
+ createdAt: string;
407
+ createdBy: string;
408
+ state: "active" | "purging";
409
+ }[];
410
+ nextRevision: number | null;
411
+ }>;
412
+ restoreVersion: (id: string, versionId: string, expectedRevision: number) => Promise<{
413
+ id: string;
414
+ fileId: string;
415
+ revision: number;
416
+ size: number;
417
+ checksum: string;
418
+ contentType: string;
419
+ createdAt: string;
420
+ createdBy: string;
421
+ state: "active" | "purging";
422
+ }>;
423
+ deleteVersion: (id: string, versionId: string, expectedRevision: number) => Promise<{
424
+ id: string;
425
+ workspaceId: string;
426
+ targetId: string | null;
427
+ kind: "purge" | "delete_version";
428
+ status: "running" | "failed" | "queued" | "succeeded";
429
+ completed: number;
430
+ total: number;
431
+ error: string | null;
432
+ createdAt: string;
433
+ updatedAt: string;
434
+ canRetry: boolean;
435
+ }>;
436
+ access: (id?: string) => Promise<{
437
+ revision: number;
438
+ restricted: boolean;
439
+ grants: {
440
+ type: "user" | "service_account" | "group" | "organization";
441
+ id: string;
442
+ role: "viewer" | "editor" | "admin";
443
+ }[];
444
+ owner: string | null;
445
+ inherited: boolean;
446
+ workspaceAdminOverride: true;
447
+ displayNames: Record<string, string>;
448
+ }>;
449
+ setAccess: (input: import("zod").input<typeof import("@sequenceholdings/storage").updateStorageAccessSchema>, id?: string) => Promise<{
450
+ revision: number;
451
+ restricted: boolean;
452
+ grants: {
453
+ type: "user" | "service_account" | "group" | "organization";
454
+ id: string;
455
+ role: "viewer" | "editor" | "admin";
456
+ }[];
457
+ owner: string | null;
458
+ inherited: boolean;
459
+ workspaceAdminOverride: true;
460
+ displayNames: Record<string, string>;
461
+ }>;
462
+ transferOwner: (principal: {
463
+ type: "user" | "service_account";
464
+ id: string;
465
+ }, expectedRevision: number) => Promise<{
466
+ revision: number;
467
+ restricted: boolean;
468
+ grants: {
469
+ type: "user" | "service_account" | "group" | "organization";
470
+ id: string;
471
+ role: "viewer" | "editor" | "admin";
472
+ }[];
473
+ owner: string | null;
474
+ inherited: boolean;
475
+ workspaceAdminOverride: true;
476
+ displayNames: Record<string, string>;
477
+ }>;
478
+ operations: (options?: {
479
+ before?: string;
480
+ limit?: number;
481
+ scope?: import("@sequenceholdings/storage").StorageOperationScope;
482
+ }) => Promise<{
483
+ items: {
484
+ id: string;
485
+ workspaceId: string;
486
+ targetId: string | null;
487
+ kind: "purge" | "delete_version";
488
+ status: "running" | "failed" | "queued" | "succeeded";
489
+ completed: number;
490
+ total: number;
491
+ error: string | null;
492
+ createdAt: string;
493
+ updatedAt: string;
494
+ canRetry: boolean;
495
+ }[];
496
+ nextCursor: string | null;
497
+ }>;
498
+ retryOperation: (id: string) => Promise<{
499
+ id: string;
500
+ workspaceId: string;
501
+ targetId: string | null;
502
+ kind: "purge" | "delete_version";
503
+ status: "running" | "failed" | "queued" | "succeeded";
504
+ completed: number;
505
+ total: number;
506
+ error: string | null;
507
+ createdAt: string;
508
+ updatedAt: string;
509
+ canRetry: boolean;
510
+ }>;
511
+ uploads: {
512
+ start: (input: import("@sequenceholdings/storage").StartStorageUpload) => Promise<{
513
+ id: string;
514
+ fileId: string;
515
+ uploadUrl: string | null;
516
+ expiresAt: string;
517
+ state: "aborted" | "pending" | "complete";
518
+ versionId: string | null;
519
+ maxBytes: number;
520
+ }>;
521
+ get: (id: string) => Promise<{
522
+ id: string;
523
+ fileId: string;
524
+ uploadUrl: string | null;
525
+ expiresAt: string;
526
+ state: "aborted" | "pending" | "complete";
527
+ versionId: string | null;
528
+ maxBytes: number;
529
+ }>;
530
+ complete: (id: string, input?: import("@sequenceholdings/storage").CompleteStorageUpload) => Promise<{
531
+ id: string;
532
+ fileId: string;
533
+ uploadUrl: string | null;
534
+ expiresAt: string;
535
+ state: "aborted" | "pending" | "complete";
536
+ versionId: string | null;
537
+ maxBytes: number;
538
+ }>;
539
+ abort: (id: string) => Promise<{
540
+ id: string;
541
+ fileId: string;
542
+ uploadUrl: string | null;
543
+ expiresAt: string;
544
+ state: "aborted" | "pending" | "complete";
545
+ versionId: string | null;
546
+ maxBytes: number;
547
+ }>;
548
+ startBatch: (items: import("@sequenceholdings/storage").StartStorageUpload[]) => Promise<{
549
+ items: {
550
+ id: string;
551
+ fileId: string;
552
+ uploadUrl: string | null;
553
+ expiresAt: string;
554
+ state: "aborted" | "pending" | "complete";
555
+ versionId: string | null;
556
+ maxBytes: number;
557
+ }[];
558
+ }>;
559
+ list: () => Promise<{
560
+ items: {
561
+ id: string;
562
+ fileId: string;
563
+ name: string;
564
+ state: "aborted" | "pending" | "complete";
565
+ expiresAt: string;
566
+ maxBytes: number;
567
+ expectedSize: number | null;
568
+ versionId: string | null;
569
+ }[];
570
+ limits: {
571
+ perPrincipal: number;
572
+ perWorkspace: number;
573
+ };
574
+ }>;
575
+ reconcile: (input?: {
576
+ abortIncomplete?: boolean;
577
+ }) => Promise<{
578
+ completed: {
579
+ id: string;
580
+ fileId: string;
581
+ name: string;
582
+ state: "aborted" | "pending" | "complete";
583
+ expiresAt: string;
584
+ maxBytes: number;
585
+ expectedSize: number | null;
586
+ versionId: string | null;
587
+ code: string;
588
+ message: string;
589
+ }[];
590
+ aborted: {
591
+ id: string;
592
+ fileId: string;
593
+ name: string;
594
+ state: "aborted" | "pending" | "complete";
595
+ expiresAt: string;
596
+ maxBytes: number;
597
+ expectedSize: number | null;
598
+ versionId: string | null;
599
+ code: string;
600
+ message: string;
601
+ }[];
602
+ pending: {
603
+ id: string;
604
+ fileId: string;
605
+ name: string;
606
+ state: "aborted" | "pending" | "complete";
607
+ expiresAt: string;
608
+ maxBytes: number;
609
+ expectedSize: number | null;
610
+ versionId: string | null;
611
+ code: string;
612
+ message: string;
613
+ }[];
614
+ }>;
615
+ resume(id: string, source: import("@sequenceholdings/storage").StorageUploadSource, options?: import("@sequenceholdings/storage").StorageTransferOptions & {
616
+ size?: number;
617
+ }): Promise<{
618
+ id: string;
619
+ fileId: string;
620
+ uploadUrl: string | null;
621
+ expiresAt: string;
622
+ state: "aborted" | "pending" | "complete";
623
+ versionId: string | null;
624
+ maxBytes: number;
625
+ }>;
626
+ put(input: Omit<import("@sequenceholdings/storage").StartStorageUpload, "idempotencyKey"> & {
627
+ idempotencyKey?: string;
628
+ }, source: import("@sequenceholdings/storage").StorageUploadSource, { keepSessionOnFailure, ...options }?: import("@sequenceholdings/storage").StorageTransferOptions & {
629
+ keepSessionOnFailure?: boolean;
630
+ }): Promise<{
631
+ id: string;
632
+ fileId: string;
633
+ uploadUrl: string | null;
634
+ expiresAt: string;
635
+ state: "aborted" | "pending" | "complete";
636
+ versionId: string | null;
637
+ maxBytes: number;
638
+ }>;
639
+ };
640
+ };
641
+ };
642
+ processes: import("./processes.js").ArtifactServerProcesses;
643
+ flags: import("./client.js").ArtifactServerFlags;
644
+ audit: import("./client.js").ArtifactServerAudit;
645
+ files: {
646
+ download: (input: {
647
+ fileId: string;
648
+ download?: boolean;
649
+ }) => Promise<import("../sdk.js").SequenceApiFetchResponse<unknown>>;
650
+ get: ({ fileId }: {
651
+ fileId: string;
652
+ }) => Promise<unknown>;
653
+ downloadPath: ({ fileId, download }: {
654
+ fileId: string;
655
+ download?: boolean;
656
+ }) => string;
657
+ speech: {
658
+ getConfiguration: () => Promise<unknown>;
659
+ };
660
+ };
661
+ identity: {
662
+ me: () => Promise<unknown>;
663
+ permissions: () => Promise<unknown>;
664
+ };
665
+ directory: {
666
+ list: (query?: {
667
+ limit?: number;
668
+ offset?: number;
669
+ }) => Promise<unknown>;
670
+ };
671
+ permissions: {
672
+ searchPrincipals: (query?: {
673
+ q?: string;
674
+ limit?: number;
675
+ types?: string;
676
+ }) => Promise<unknown>;
677
+ };
678
+ lattice: {
679
+ runs: {
680
+ list: (query?: {
681
+ process_id?: string;
682
+ status?: string;
683
+ entity_type?: string;
684
+ entity_id?: string;
685
+ limit?: number;
686
+ archived?: boolean;
687
+ }) => Promise<unknown>;
688
+ get: ({ runId }: {
689
+ runId: string;
690
+ }) => Promise<unknown>;
691
+ start: (input: import("@sequenceholdings/platform/browser").PlatformRunStart) => Promise<{
692
+ run_id: string;
693
+ process_id: string;
694
+ process_version: string;
695
+ bundle_hash: string;
696
+ status: "pending" | "existing";
697
+ idempotent_replay: boolean;
698
+ outcome: "existing" | "created" | "replayed" | "unclaimed" | "queued";
699
+ }>;
700
+ advance: ({ runId, ...body }: import("@sequenceholdings/platform/browser").PlatformRunAdvance) => Promise<unknown>;
701
+ };
702
+ steps: {
703
+ get: ({ runId, stepId }: {
704
+ runId: string;
705
+ stepId: string;
706
+ }) => Promise<unknown>;
707
+ getContext: ({ runId, stepId }: {
708
+ runId: string;
709
+ stepId: string;
710
+ }) => Promise<unknown>;
711
+ assign: ({ runId, stepId, assignment }: {
712
+ runId: string;
713
+ stepId: string;
714
+ assignment: {
715
+ users?: string[];
716
+ groups?: string[];
717
+ };
718
+ }) => Promise<unknown>;
719
+ };
720
+ principals: {
721
+ search: (query?: {
722
+ q?: string;
723
+ limit?: number;
724
+ types?: string;
725
+ requireAppAccess?: string;
726
+ }) => Promise<unknown>;
727
+ };
728
+ processes: {
729
+ listRuns: ({ process, ...query }: {
730
+ process: string;
731
+ limit?: number;
732
+ offset?: number;
733
+ status?: string;
734
+ entity_type?: string;
735
+ entity_id?: string;
736
+ }) => Promise<unknown>;
737
+ getCompletion: ({ process, cycle }: {
738
+ process: string;
739
+ cycle: string;
740
+ }) => Promise<unknown>;
741
+ listSchedules: ({ process }: {
742
+ process: string;
743
+ }) => Promise<unknown>;
744
+ createSchedule: ({ process, schedule }: {
745
+ process: string;
746
+ schedule: Record<string, unknown>;
747
+ }) => Promise<unknown>;
748
+ };
749
+ legacyV2: {
750
+ listRuns: (query?: import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
751
+ getRun: ({ runId }: {
752
+ runId: string;
753
+ }) => Promise<unknown>;
754
+ startRun: (input: import("@sequenceholdings/platform/browser").PlatformRunStart) => Promise<unknown>;
755
+ advanceRun: ({ runId, ...body }: import("@sequenceholdings/platform/browser").PlatformRunAdvance) => Promise<unknown>;
756
+ };
757
+ };
758
+ activity: {
759
+ getFormSchema: ({ runId }: {
760
+ runId: string;
761
+ }) => Promise<unknown>;
762
+ advance: ({ runId, ...body }: import("@sequenceholdings/platform/browser").PlatformRunAdvance) => Promise<unknown>;
763
+ claim: ({ runId }: {
764
+ runId: string;
765
+ }) => Promise<unknown>;
766
+ ownership: {
767
+ setPrimary: ({ runId, primarySub }: {
768
+ runId: string;
769
+ primarySub: string;
770
+ }) => Promise<unknown>;
771
+ handToQueue: ({ runId, queueGroupId }: {
772
+ runId: string;
773
+ queueGroupId: string;
774
+ }) => Promise<unknown>;
775
+ addWatchers: ({ runId, ...input }: {
776
+ runId: string;
777
+ } & import("@sequenceholdings/platform/browser").PlatformTicketWatchers) => Promise<unknown>;
778
+ removeWatchers: ({ runId, ...input }: {
779
+ runId: string;
780
+ } & import("@sequenceholdings/platform/browser").PlatformTicketWatchers) => Promise<unknown>;
781
+ };
782
+ comments: {
783
+ list: ({ runId, ...query }: {
784
+ runId: string;
785
+ } & import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
786
+ create: ({ runId, comment }: {
787
+ runId: string;
788
+ comment: import("@sequenceholdings/platform/browser").PlatformActivityComment;
789
+ }) => Promise<unknown>;
790
+ createForStep: ({ runId, stepId, comment }: {
791
+ runId: string;
792
+ stepId: string;
793
+ comment: Pick<import("@sequenceholdings/platform/browser").PlatformActivityComment, "body">;
794
+ }) => Promise<unknown>;
795
+ };
796
+ drafts: {
797
+ save: ({ runId, stepId, values }: {
798
+ runId: string;
799
+ stepId: string;
800
+ values: Record<string, unknown>;
801
+ }) => Promise<unknown>;
802
+ delete: ({ runId, stepId }: {
803
+ runId: string;
804
+ stepId: string;
805
+ }) => Promise<unknown>;
806
+ };
807
+ };
808
+ legacyShowcase: {
809
+ listAgents: () => Promise<unknown>;
810
+ listAgentRuns: ({ agentId }: {
811
+ agentId: string;
812
+ }) => Promise<unknown>;
813
+ getRun: ({ runId }: {
814
+ runId: string;
815
+ }) => Promise<unknown>;
816
+ };
817
+ usage: {
818
+ record: (event: Record<string, unknown>) => Promise<unknown>;
819
+ };
820
+ legacyProcesses: {
821
+ types: {
822
+ list: (query?: {
823
+ publishedOnly?: boolean;
824
+ }) => Promise<unknown>;
825
+ get: ({ typeId }: {
826
+ typeId: string;
827
+ }) => Promise<unknown>;
828
+ ensureSystem: () => Promise<unknown>;
829
+ };
830
+ instances: {
831
+ get: ({ instanceId }: {
832
+ instanceId: string;
833
+ }) => Promise<unknown>;
834
+ create: (input: Record<string, unknown>) => Promise<unknown>;
835
+ getRoles: ({ instanceId }: {
836
+ instanceId: string;
837
+ }) => Promise<unknown>;
838
+ setRoles: ({ instanceId, roles }: {
839
+ instanceId: string;
840
+ roles: Record<string, unknown>;
841
+ }) => Promise<unknown>;
842
+ completeStage: ({ instanceId, stageId, completion }: {
843
+ instanceId: string;
844
+ stageId: string;
845
+ completion: Record<string, unknown>;
846
+ }) => Promise<unknown>;
847
+ };
848
+ stages: {
849
+ assigned: (query?: import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
850
+ };
851
+ principals: {
852
+ search: (query?: import("@sequenceholdings/platform/browser").PlatformQuery) => Promise<unknown>;
853
+ };
854
+ data: {
855
+ query: (input: Record<string, unknown>) => Promise<unknown>;
856
+ };
857
+ };
858
+ health: {
859
+ get: () => Promise<unknown>;
860
+ };
861
+ };
862
+ export type ArtifactServerPlatform = ReturnType<typeof createArtifactServerPlatformAdapter>;
863
+ export type ArtifactServerPlatformClient = ArtifactServerPlatform & {
864
+ asService(): ArtifactServerPlatformClient;
865
+ };
866
+ /** One per Next.js request. Uses the same context verification and explicit service transition as the legacy factory. */
867
+ export declare function createArtifactServerPlatformClient(options: ArtifactServerClientOptions & {
868
+ accept?: ArtifactExternalAccept;
869
+ }): Promise<ArtifactServerPlatformClient>;
870
+ export {};