@kora-platform/cli 0.7.0-rc1 → 0.8.0-rc10
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/README.md +21 -0
- package/dist/api-client.d.ts +274 -106
- package/dist/api-client.js +192 -167
- package/dist/api-types.d.ts +301 -163
- package/dist/artifact-api-client.d.ts +28 -1
- package/dist/artifact-api-client.js +33 -0
- package/dist/artifact-commands.d.ts +5 -0
- package/dist/artifact-commands.js +177 -4
- package/dist/audit-commands.d.ts +12 -0
- package/dist/audit-commands.js +74 -0
- package/dist/auth-commands.d.ts +1 -0
- package/dist/auth-commands.js +195 -32
- package/dist/cli-errors.d.ts +7 -1
- package/dist/cli-errors.js +12 -1
- package/dist/command-builders.d.ts +1 -0
- package/dist/command-builders.js +1 -0
- package/dist/command-flags.d.ts +1 -0
- package/dist/command-flags.js +7 -0
- package/dist/command-groups.js +10 -12
- package/dist/command-registry.js +595 -277
- package/dist/commands.js +728 -636
- package/dist/environment-context.d.ts +9 -0
- package/dist/environment-context.js +32 -0
- package/dist/error-code.d.ts +2 -0
- package/dist/error-code.js +9 -0
- package/dist/{integration-commands.d.ts → extension-commands.d.ts} +3 -2
- package/dist/extension-commands.js +446 -0
- package/dist/files.d.ts +44 -4
- package/dist/files.js +349 -26
- package/dist/format.d.ts +6 -0
- package/dist/format.js +83 -1
- package/dist/runner.js +28 -10
- package/dist/schema-registry-data.d.ts +318 -571
- package/dist/schema-registry-data.js +356 -698
- package/dist/session-store.js +80 -0
- package/dist/session.d.ts +1 -0
- package/dist/transport-refresh.d.ts +10 -0
- package/dist/transport-refresh.js +51 -0
- package/dist/transport.d.ts +31 -0
- package/dist/transport.js +102 -36
- package/dist/types.d.ts +2 -1
- package/dist/workspace-source.d.ts +1 -0
- package/dist/workspace-source.js +13 -0
- package/package.json +2 -1
- package/dist/dotenv.d.ts +0 -1
- package/dist/dotenv.js +0 -26
- package/dist/integration-api-client.d.ts +0 -29
- package/dist/integration-api-client.js +0 -50
- package/dist/integration-commands.js +0 -208
package/dist/api-types.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export type CliRecord = Record<string, unknown>;
|
|
2
|
+
export type WorkspaceCommandDiagnostic = CliRecord & {
|
|
3
|
+
code: string;
|
|
4
|
+
gate: "importBlocking" | "importWarnings" | "releaseReadiness" | "releaseBlocking" | "releaseWarnings" | "runtimeBlocking" | "runtimeWarnings";
|
|
5
|
+
message: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
severity: "error" | "warning";
|
|
8
|
+
};
|
|
2
9
|
export type RoleName = "admin" | "member" | "owner" | "viewer";
|
|
3
10
|
export interface ApiKeyRecord extends CliRecord {
|
|
4
11
|
expiresAt?: string | null;
|
|
@@ -35,16 +42,102 @@ export interface DeletedOrganizationSummary extends CliRecord {
|
|
|
35
42
|
}
|
|
36
43
|
export interface OrgSettingsRecord extends CliRecord {
|
|
37
44
|
}
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
export interface WorkflowNodeTestResult extends CliRecord {
|
|
46
|
+
nodeId: string;
|
|
47
|
+
nodeKind?: string;
|
|
48
|
+
operationName: string;
|
|
49
|
+
status: "failed" | "invalid" | "passed";
|
|
50
|
+
testId: string;
|
|
51
|
+
workflowName: string;
|
|
41
52
|
}
|
|
42
53
|
export interface RuntimeVariableRecord extends CliRecord {
|
|
54
|
+
environmentKey?: string;
|
|
43
55
|
name: string;
|
|
44
56
|
value: string;
|
|
45
57
|
}
|
|
46
58
|
export interface OrgSecretRecord extends CliRecord {
|
|
59
|
+
environmentKey?: string;
|
|
60
|
+
name: string;
|
|
61
|
+
}
|
|
62
|
+
export interface ExtensionPackageFileInput extends CliRecord {
|
|
63
|
+
contentBase64: string;
|
|
64
|
+
path: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ExtensionPermissions extends CliRecord {
|
|
67
|
+
callbacks?: boolean;
|
|
68
|
+
cloud?: boolean;
|
|
69
|
+
egress?: string[];
|
|
70
|
+
schedules?: boolean;
|
|
71
|
+
secrets?: boolean;
|
|
72
|
+
storage?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface ExtensionInstallRecord extends CliRecord {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
environmentKey?: string;
|
|
77
|
+
grantedPermissions: ExtensionPermissions;
|
|
78
|
+
id: string;
|
|
79
|
+
packageId: string;
|
|
80
|
+
packageRevisionId: string;
|
|
81
|
+
slug: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ExtensionPackageRecord extends CliRecord {
|
|
84
|
+
id: string;
|
|
47
85
|
name: string;
|
|
86
|
+
orgId: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ExtensionPackageRevisionRecord extends CliRecord {
|
|
89
|
+
fileCount: number;
|
|
90
|
+
id: string;
|
|
91
|
+
packageId: string;
|
|
92
|
+
revisionHash: string;
|
|
93
|
+
totalBytes: number;
|
|
94
|
+
version: string;
|
|
95
|
+
}
|
|
96
|
+
export interface ExtensionPackageValidationDiagnostic extends CliRecord {
|
|
97
|
+
code: string;
|
|
98
|
+
message: string;
|
|
99
|
+
path?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ExtensionPackageValidationResult extends CliRecord {
|
|
102
|
+
diagnostics: ExtensionPackageValidationDiagnostic[];
|
|
103
|
+
fileCount: number;
|
|
104
|
+
ok: boolean;
|
|
105
|
+
revisionHash?: string;
|
|
106
|
+
totalBytes: number;
|
|
107
|
+
}
|
|
108
|
+
export interface ExtensionPackageExportEnvelope extends CliRecord {
|
|
109
|
+
files: ExtensionPackageFileInput[];
|
|
110
|
+
metadata: CliRecord & {
|
|
111
|
+
installId?: string;
|
|
112
|
+
installSlug?: string;
|
|
113
|
+
installUpdatedAt?: string;
|
|
114
|
+
packageRevisionId: string;
|
|
115
|
+
revisionHash: string;
|
|
116
|
+
source: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface BuiltInExtensionRecord extends CliRecord {
|
|
120
|
+
availability: "available" | "unavailable";
|
|
121
|
+
defaultGrantedPermissions: ExtensionPermissions;
|
|
122
|
+
description: string;
|
|
123
|
+
installedSlug: string | null;
|
|
124
|
+
packageName: string;
|
|
125
|
+
requiresCloud: boolean;
|
|
126
|
+
slug: string;
|
|
127
|
+
source: string;
|
|
128
|
+
title: string;
|
|
129
|
+
unavailableReason: string | null;
|
|
130
|
+
}
|
|
131
|
+
export interface ExtensionInstallDetailRecord extends CliRecord {
|
|
132
|
+
install: ExtensionInstallRecord;
|
|
133
|
+
package: ExtensionPackageRecord;
|
|
134
|
+
registrations: CliRecord | null;
|
|
135
|
+
revision: ExtensionPackageRevisionRecord;
|
|
136
|
+
}
|
|
137
|
+
export interface ExtensionInstallUpdatePlan extends CliRecord {
|
|
138
|
+
diagnostics: WorkspaceCommandDiagnostic[];
|
|
139
|
+
mutated: boolean;
|
|
140
|
+
updateAllowed: boolean;
|
|
48
141
|
}
|
|
49
142
|
export interface ProcessDefinitionSummary extends CliRecord {
|
|
50
143
|
}
|
|
@@ -81,127 +174,174 @@ export interface AuthoringOrganizationManagementContext extends CliRecord {
|
|
|
81
174
|
}
|
|
82
175
|
export interface CapabilityEditorRecord extends CliRecord {
|
|
83
176
|
}
|
|
84
|
-
export interface ConnectorsEditorRecord extends CliRecord {
|
|
85
|
-
connectors: Array<CliRecord & {
|
|
86
|
-
name: string;
|
|
87
|
-
}>;
|
|
88
|
-
}
|
|
89
|
-
export interface McpServersEditorRecord extends CliRecord {
|
|
90
|
-
servers: Array<CliRecord & {
|
|
91
|
-
name: string;
|
|
92
|
-
}>;
|
|
93
|
-
}
|
|
94
177
|
export interface OperationsEditorRecord extends CliRecord {
|
|
95
178
|
operations: Array<CliRecord & {
|
|
96
179
|
name: string;
|
|
97
180
|
}>;
|
|
98
181
|
}
|
|
99
|
-
export
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
182
|
+
export type AuditOutcome = "denied" | "failed" | "succeeded";
|
|
183
|
+
export type AuditEventSource = "auth" | "platform";
|
|
184
|
+
export interface AuditEventRecord extends CliRecord {
|
|
185
|
+
action: string;
|
|
186
|
+
actorId: string;
|
|
187
|
+
actorType: string;
|
|
188
|
+
category: string;
|
|
189
|
+
correlationId: string | null;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
deploymentId: string | null;
|
|
192
|
+
id: string;
|
|
193
|
+
metadata: CliRecord;
|
|
194
|
+
occurredAt: string;
|
|
195
|
+
orgId: string | null;
|
|
196
|
+
outcome: AuditOutcome;
|
|
197
|
+
releaseId: string | null;
|
|
198
|
+
requestId: string | null;
|
|
199
|
+
resourceId: string | null;
|
|
200
|
+
resourceName: string | null;
|
|
201
|
+
resourceType: string | null;
|
|
202
|
+
runId: string | null;
|
|
203
|
+
schemaVersion: number;
|
|
204
|
+
source: AuditEventSource;
|
|
205
|
+
sourceEventId: string | null;
|
|
206
|
+
workflowId: string | null;
|
|
207
|
+
}
|
|
208
|
+
export interface AuditEventListResult extends CliRecord {
|
|
209
|
+
events: AuditEventRecord[];
|
|
210
|
+
limit: number;
|
|
107
211
|
}
|
|
108
|
-
export interface
|
|
109
|
-
|
|
212
|
+
export interface ReleaseSummaryRecord extends CliRecord {
|
|
213
|
+
id: string;
|
|
110
214
|
}
|
|
111
|
-
export interface
|
|
112
|
-
|
|
215
|
+
export interface CreateReleaseResult extends CliRecord {
|
|
216
|
+
release: ReleaseSummaryRecord;
|
|
113
217
|
}
|
|
114
|
-
export interface
|
|
218
|
+
export interface ReleaseSourceFileRecord extends CliRecord {
|
|
219
|
+
content: string;
|
|
220
|
+
path: string;
|
|
115
221
|
}
|
|
116
|
-
export interface
|
|
222
|
+
export interface ReleaseSourceSnapshotRecord extends CliRecord {
|
|
223
|
+
assets: ReleaseSourceFileRecord[];
|
|
224
|
+
files: ReleaseSourceFileRecord[];
|
|
225
|
+
ingestionHistory: CliRecord[];
|
|
117
226
|
}
|
|
118
|
-
export interface
|
|
227
|
+
export interface ReleaseValidationDiagnostic extends CliRecord {
|
|
228
|
+
code: string;
|
|
229
|
+
gate: "releaseBlocking" | "releaseWarnings";
|
|
230
|
+
message: string;
|
|
231
|
+
path: string;
|
|
232
|
+
severity: string;
|
|
119
233
|
}
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
id: string;
|
|
125
|
-
slug?: string;
|
|
126
|
-
status?: string;
|
|
127
|
-
url?: string;
|
|
234
|
+
export interface ReleaseValidationResult extends CliRecord {
|
|
235
|
+
diagnostics: ReleaseValidationDiagnostic[];
|
|
236
|
+
releaseId: string;
|
|
237
|
+
releaseReady: boolean;
|
|
128
238
|
}
|
|
129
|
-
export
|
|
130
|
-
|
|
239
|
+
export type RuntimeControlActivityFocusType = "run" | "task" | "workflow";
|
|
240
|
+
export interface RuntimeControlActivityReadResult extends CliRecord {
|
|
241
|
+
events: CliRecord[];
|
|
131
242
|
}
|
|
132
|
-
export
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
243
|
+
export type AgentUsageSourceStatus = "event_only" | "trace_joined";
|
|
244
|
+
export interface AgentUsageSummary extends CliRecord {
|
|
245
|
+
agentExecutionCount: number;
|
|
246
|
+
from: string;
|
|
247
|
+
orgId: string;
|
|
248
|
+
sourceEventOnlyCount: number;
|
|
249
|
+
to: string;
|
|
250
|
+
tokensIn: number;
|
|
251
|
+
tokensOut: number;
|
|
252
|
+
toolCallCount: number;
|
|
253
|
+
usdMicros: number;
|
|
254
|
+
}
|
|
255
|
+
export interface AgentUsageWorkflowSummary extends CliRecord {
|
|
256
|
+
agentExecutionCount: number;
|
|
257
|
+
model: string | null;
|
|
258
|
+
processName: string;
|
|
259
|
+
provider: string | null;
|
|
260
|
+
tokensIn: number;
|
|
261
|
+
tokensOut: number;
|
|
262
|
+
toolCallCount: number;
|
|
263
|
+
usdMicros: number;
|
|
264
|
+
}
|
|
265
|
+
export interface AgentToolUsageSummary extends CliRecord {
|
|
266
|
+
callCount: number;
|
|
267
|
+
failureCount: number;
|
|
268
|
+
successCount: number;
|
|
269
|
+
toolName: string;
|
|
270
|
+
}
|
|
271
|
+
export interface AgentUsageRecentEvent extends CliRecord {
|
|
272
|
+
eventId: string;
|
|
273
|
+
model: string | null;
|
|
274
|
+
occurredAt: string;
|
|
275
|
+
processName: string;
|
|
276
|
+
provider: string | null;
|
|
277
|
+
runId: string;
|
|
278
|
+
sourceStatus: AgentUsageSourceStatus;
|
|
279
|
+
status: string;
|
|
280
|
+
tokensIn: number;
|
|
281
|
+
tokensOut: number;
|
|
282
|
+
toolCallCount: number;
|
|
283
|
+
usdMicros: number;
|
|
138
284
|
}
|
|
139
|
-
export interface
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
toolName: string;
|
|
145
|
-
}>;
|
|
285
|
+
export interface AgentUsageReport extends CliRecord {
|
|
286
|
+
recentEvents: AgentUsageRecentEvent[];
|
|
287
|
+
summary: AgentUsageSummary;
|
|
288
|
+
tools: AgentToolUsageSummary[];
|
|
289
|
+
workflows: AgentUsageWorkflowSummary[];
|
|
146
290
|
}
|
|
147
|
-
export interface
|
|
148
|
-
server: OrgMcpServerRecord & {
|
|
149
|
-
slug: string;
|
|
150
|
-
};
|
|
291
|
+
export interface RuntimeControlDeploymentRecord extends CliRecord {
|
|
151
292
|
}
|
|
152
|
-
export interface
|
|
153
|
-
|
|
154
|
-
|
|
293
|
+
export interface WorkflowFailureSummary extends CliRecord {
|
|
294
|
+
causeChain: string[];
|
|
295
|
+
rootCause: string;
|
|
296
|
+
rootCauseCode?: string;
|
|
297
|
+
summary: string;
|
|
298
|
+
summaryCode?: string;
|
|
155
299
|
}
|
|
156
|
-
export interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
300
|
+
export interface EnvironmentRecord extends CliRecord {
|
|
301
|
+
currentDeploymentId?: string | null;
|
|
302
|
+
id: string;
|
|
303
|
+
isProductionTarget?: boolean;
|
|
304
|
+
key: string;
|
|
305
|
+
name: string;
|
|
161
306
|
status: string;
|
|
162
307
|
}
|
|
163
|
-
export interface
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
slug?: string;
|
|
171
|
-
timeoutMs?: number;
|
|
172
|
-
transport?: string;
|
|
173
|
-
url?: string;
|
|
174
|
-
}
|
|
175
|
-
export interface UpdateOrgMcpServerInput extends CliRecord {
|
|
176
|
-
authMode?: OrgMcpServerAuthMode;
|
|
177
|
-
displayName?: string;
|
|
178
|
-
timeoutMs?: number;
|
|
179
|
-
transport?: string;
|
|
180
|
-
url?: string;
|
|
181
|
-
}
|
|
182
|
-
export interface ReleaseSummaryRecord extends CliRecord {
|
|
308
|
+
export interface EnvironmentDeploymentRecord extends CliRecord {
|
|
309
|
+
appliedAt?: string | null;
|
|
310
|
+
createdAt?: string;
|
|
311
|
+
coreDeploymentId?: string | null;
|
|
312
|
+
environmentId?: string;
|
|
313
|
+
environmentKey: string;
|
|
314
|
+
error?: CliRecord | null;
|
|
183
315
|
id: string;
|
|
316
|
+
isLive: boolean;
|
|
317
|
+
previousDeploymentId?: string | null;
|
|
318
|
+
releaseId: string;
|
|
319
|
+
status: string;
|
|
320
|
+
updatedAt?: string;
|
|
184
321
|
}
|
|
185
|
-
export interface
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
export interface PublishReleaseResult extends CliRecord {
|
|
190
|
-
release: ReleaseSummaryRecord;
|
|
191
|
-
}
|
|
192
|
-
export interface RetryReleasePublicationResult extends CliRecord {
|
|
193
|
-
}
|
|
194
|
-
export type RuntimeControlActivityFocusType = "run" | "task" | "workflow";
|
|
195
|
-
export interface RuntimeControlActivityReadResult extends CliRecord {
|
|
196
|
-
events: CliRecord[];
|
|
197
|
-
}
|
|
198
|
-
export interface RuntimeControlDeploymentRecord extends CliRecord {
|
|
322
|
+
export interface EnvironmentDetailRecord extends CliRecord {
|
|
323
|
+
environment: EnvironmentRecord;
|
|
324
|
+
latestDeployment: EnvironmentDeploymentRecord | null;
|
|
325
|
+
liveDeployment: EnvironmentDeploymentRecord | null;
|
|
199
326
|
}
|
|
200
327
|
export interface RuntimeControlOverviewRecord extends CliRecord {
|
|
201
328
|
}
|
|
202
|
-
export interface RuntimeControlRunDetailRecord extends CliRecord {
|
|
203
|
-
}
|
|
204
329
|
export interface RuntimeControlRunRecord extends CliRecord {
|
|
330
|
+
closeTime?: string | null;
|
|
331
|
+
deploymentId?: string | null;
|
|
332
|
+
environmentKey?: string | null;
|
|
333
|
+
failure?: WorkflowFailureSummary;
|
|
334
|
+
releaseId?: string | null;
|
|
335
|
+
startTime?: string;
|
|
336
|
+
status: string;
|
|
337
|
+
workflowId: string;
|
|
338
|
+
}
|
|
339
|
+
export interface RuntimeControlRunDetailRecord extends RuntimeControlRunRecord {
|
|
340
|
+
failureLookupError?: string;
|
|
341
|
+
historyLength?: number;
|
|
342
|
+
historySizeBytes?: number;
|
|
343
|
+
state?: CliRecord | null;
|
|
344
|
+
stateQueryError?: string;
|
|
205
345
|
}
|
|
206
346
|
export interface RuntimeControlRunStateRecord extends CliRecord {
|
|
207
347
|
}
|
|
@@ -221,75 +361,73 @@ export interface CompleteRuntimeTaskResult extends CliRecord {
|
|
|
221
361
|
}
|
|
222
362
|
export interface AbortRuntimeRunResult extends CliRecord {
|
|
223
363
|
}
|
|
364
|
+
export type RuntimeArtifactProducerType = "review_upload" | "upload" | "workflow_capture" | "workflow_node_test_capture";
|
|
365
|
+
export type RuntimeArtifactAssociationKind = "origin" | "usage";
|
|
366
|
+
export type RuntimeArtifactAssociationRole = "input" | "output" | "review";
|
|
367
|
+
export type RuntimeArtifactLifecycleStatus = "active" | "archived" | "purged";
|
|
368
|
+
export type RuntimeArtifactLifecycleFilter = RuntimeArtifactLifecycleStatus | "all";
|
|
369
|
+
export type RuntimeArtifactByteDeletionStatus = "deleted" | "pending" | "retained";
|
|
224
370
|
export interface RuntimeArtifactRecord extends CliRecord {
|
|
225
|
-
|
|
226
|
-
|
|
371
|
+
archivedAt?: string;
|
|
372
|
+
artifactId: string;
|
|
373
|
+
byteDeletionStatus: RuntimeArtifactByteDeletionStatus;
|
|
374
|
+
bytesDeletedAt?: string;
|
|
375
|
+
createdAt: string;
|
|
376
|
+
deploymentId?: string;
|
|
377
|
+
encryptionKeyId?: string;
|
|
378
|
+
encryptionMode?: string;
|
|
379
|
+
expiresAt?: string;
|
|
380
|
+
fieldKey?: string;
|
|
381
|
+
fieldPath?: string;
|
|
382
|
+
folderEntryCount?: number;
|
|
383
|
+
folderTotalBytes?: number;
|
|
384
|
+
kind: "file" | "folder";
|
|
385
|
+
lifecycleStatus: RuntimeArtifactLifecycleStatus;
|
|
386
|
+
mediaType?: string;
|
|
387
|
+
name: string;
|
|
388
|
+
nodeId?: string;
|
|
389
|
+
producerType: RuntimeArtifactProducerType;
|
|
390
|
+
purgedAt?: string;
|
|
391
|
+
scanStatus: "blocked" | "clean" | "failed" | "not_scanned" | "pending";
|
|
392
|
+
sha256: string;
|
|
393
|
+
sizeBytes: number;
|
|
394
|
+
workflowId?: string;
|
|
395
|
+
workflowName?: string;
|
|
396
|
+
workflowNodeTestId?: string;
|
|
397
|
+
workflowRunId?: string;
|
|
398
|
+
}
|
|
399
|
+
export interface RuntimeArtifactAssociationRecord extends CliRecord {
|
|
400
|
+
artifactId: string;
|
|
401
|
+
associatedAt: string;
|
|
402
|
+
associationKind: RuntimeArtifactAssociationKind;
|
|
403
|
+
deploymentId?: string;
|
|
404
|
+
fieldKey?: string;
|
|
405
|
+
fieldPath?: string;
|
|
406
|
+
nodeId?: string;
|
|
407
|
+
reviewTaskId?: string;
|
|
408
|
+
role: RuntimeArtifactAssociationRole;
|
|
409
|
+
workflowId?: string;
|
|
410
|
+
workflowName?: string;
|
|
411
|
+
workflowNodeTestId?: string;
|
|
412
|
+
workflowRunId?: string;
|
|
413
|
+
}
|
|
414
|
+
export interface RuntimeArtifactAssociationSummary extends CliRecord {
|
|
415
|
+
inputUsageCount: number;
|
|
416
|
+
outputOriginCount: number;
|
|
417
|
+
reviewUsageCount: number;
|
|
418
|
+
}
|
|
419
|
+
export interface RuntimeArtifactInventoryRecord extends CliRecord {
|
|
420
|
+
artifact: RuntimeArtifactRecord;
|
|
421
|
+
associationSummary: RuntimeArtifactAssociationSummary;
|
|
422
|
+
originAssociation: RuntimeArtifactAssociationRecord | null;
|
|
423
|
+
}
|
|
424
|
+
export interface RuntimeArtifactDetailRecord extends CliRecord {
|
|
425
|
+
artifact: RuntimeArtifactRecord;
|
|
426
|
+
associations: RuntimeArtifactAssociationRecord[];
|
|
227
427
|
}
|
|
228
428
|
export interface ChatHealth extends CliRecord {
|
|
229
429
|
}
|
|
230
|
-
export interface ChatSessionChangesRecord extends CliRecord {
|
|
231
|
-
}
|
|
232
|
-
export interface ChatSessionDraftApplyRecord extends CliRecord {
|
|
233
|
-
}
|
|
234
|
-
export interface ChatSessionDraftRefreshRecord extends CliRecord {
|
|
235
|
-
}
|
|
236
|
-
export interface ChatSessionDraftRecord extends CliRecord {
|
|
237
|
-
}
|
|
238
430
|
export interface ChatSessionRecord extends CliRecord {
|
|
239
431
|
}
|
|
240
432
|
export interface ChatSessionSummary extends CliRecord {
|
|
241
433
|
}
|
|
242
|
-
export interface ChatSessionValidationRecord extends CliRecord {
|
|
243
|
-
}
|
|
244
|
-
export interface ChatSessionWorkspaceStateRecord extends CliRecord {
|
|
245
|
-
}
|
|
246
|
-
export type ManagedIntegrationJsonValue = ManagedIntegrationJsonObject | ManagedIntegrationJsonValue[] | boolean | null | number | string;
|
|
247
|
-
export interface ManagedIntegrationJsonObject {
|
|
248
|
-
[key: string]: ManagedIntegrationJsonValue;
|
|
249
|
-
}
|
|
250
|
-
export interface ManagedIntegrationActionInput extends CliRecord {
|
|
251
|
-
connectionRef?: string;
|
|
252
|
-
input?: ManagedIntegrationJsonObject;
|
|
253
|
-
}
|
|
254
|
-
export interface ManagedIntegrationActionDescriptor extends CliRecord {
|
|
255
|
-
cliSafe: boolean;
|
|
256
|
-
id: string;
|
|
257
|
-
label?: string;
|
|
258
|
-
}
|
|
259
|
-
export interface ManagedIntegrationSummary extends CliRecord {
|
|
260
|
-
id: string;
|
|
261
|
-
}
|
|
262
|
-
export interface ManagedIntegrationDiagnostic extends CliRecord {
|
|
263
|
-
id: string;
|
|
264
|
-
}
|
|
265
|
-
export interface ManagedIntegrationConnectionSummary extends CliRecord {
|
|
266
|
-
connectionRef: string;
|
|
267
|
-
}
|
|
268
|
-
export interface ManagedIntegrationPromptGuidance extends CliRecord {
|
|
269
|
-
}
|
|
270
|
-
export type ManagedIntegrationHostEffect = {
|
|
271
|
-
kind: "connection_ready";
|
|
272
|
-
connectionRef: string;
|
|
273
|
-
displayName: string;
|
|
274
|
-
} | {
|
|
275
|
-
kind: "open_external_url";
|
|
276
|
-
label?: string;
|
|
277
|
-
url: string;
|
|
278
|
-
} | {
|
|
279
|
-
kind: "refresh_state";
|
|
280
|
-
reason?: string;
|
|
281
|
-
} | {
|
|
282
|
-
kind: "schedule_poll";
|
|
283
|
-
intervalMs: number;
|
|
284
|
-
reason?: string;
|
|
285
|
-
} | {
|
|
286
|
-
kind: "terminal_failure";
|
|
287
|
-
message: string;
|
|
288
|
-
} | {
|
|
289
|
-
kind: "user_message";
|
|
290
|
-
message: string;
|
|
291
|
-
};
|
|
292
|
-
export interface ManagedIntegrationActionResult extends CliRecord {
|
|
293
|
-
actionId: string;
|
|
294
|
-
effects: ManagedIntegrationHostEffect[];
|
|
295
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RuntimeArtifactRecord } from "./api-types.js";
|
|
1
|
+
import type { RuntimeArtifactDetailRecord, RuntimeArtifactLifecycleFilter, RuntimeArtifactInventoryRecord, RuntimeArtifactRecord } from "./api-types.js";
|
|
2
2
|
import type { CliSessionState, createPlatformTransport } from "./transport.js";
|
|
3
3
|
type PlatformTransport = ReturnType<typeof createPlatformTransport>;
|
|
4
4
|
type DownloadArtifactOptions = {
|
|
@@ -9,6 +9,20 @@ type DownloadArtifactOptions = {
|
|
|
9
9
|
maxBytes?: number;
|
|
10
10
|
validateHeaders?: (headers: Headers) => void;
|
|
11
11
|
};
|
|
12
|
+
type ListArtifactsFilters = {
|
|
13
|
+
associationKind?: string;
|
|
14
|
+
associationRole?: string;
|
|
15
|
+
createdAfter?: string;
|
|
16
|
+
createdBefore?: string;
|
|
17
|
+
lifecycleStatus?: RuntimeArtifactLifecycleFilter;
|
|
18
|
+
limit?: number;
|
|
19
|
+
mediaType?: string;
|
|
20
|
+
nodeId?: string;
|
|
21
|
+
producerType?: string;
|
|
22
|
+
runId?: string;
|
|
23
|
+
workflowNodeTestId?: string;
|
|
24
|
+
workflowId?: string;
|
|
25
|
+
};
|
|
12
26
|
export declare function createArtifactApiClient(transport: PlatformTransport): {
|
|
13
27
|
uploadArtifact(session: CliSessionState, orgId: string, inputData: {
|
|
14
28
|
body: Uint8Array;
|
|
@@ -23,11 +37,24 @@ export declare function createArtifactApiClient(transport: PlatformTransport): {
|
|
|
23
37
|
}): Promise<{
|
|
24
38
|
artifacts: RuntimeArtifactRecord[];
|
|
25
39
|
}>;
|
|
40
|
+
listArtifacts(session: CliSessionState, orgId: string, filters: ListArtifactsFilters): Promise<{
|
|
41
|
+
artifacts: RuntimeArtifactInventoryRecord[];
|
|
42
|
+
}>;
|
|
43
|
+
getArtifactDetail(session: CliSessionState, orgId: string, artifactId: string): Promise<RuntimeArtifactDetailRecord>;
|
|
26
44
|
downloadArtifact(session: CliSessionState, orgId: string, artifactId: string, options?: DownloadArtifactOptions): Promise<{
|
|
27
45
|
body: Uint8Array<ArrayBufferLike>;
|
|
28
46
|
contentType: string;
|
|
29
47
|
fileName: string | null;
|
|
30
48
|
sizeBytes: number;
|
|
31
49
|
}>;
|
|
50
|
+
archiveArtifact(session: CliSessionState, orgId: string, artifactId: string): Promise<{
|
|
51
|
+
artifact: RuntimeArtifactRecord;
|
|
52
|
+
}>;
|
|
53
|
+
restoreArtifact(session: CliSessionState, orgId: string, artifactId: string): Promise<{
|
|
54
|
+
artifact: RuntimeArtifactRecord;
|
|
55
|
+
}>;
|
|
56
|
+
purgeArtifact(session: CliSessionState, orgId: string, artifactId: string): Promise<{
|
|
57
|
+
artifact: RuntimeArtifactRecord;
|
|
58
|
+
}>;
|
|
32
59
|
};
|
|
33
60
|
export {};
|
|
@@ -20,6 +20,18 @@ export function createArtifactApiClient(transport) {
|
|
|
20
20
|
session
|
|
21
21
|
});
|
|
22
22
|
},
|
|
23
|
+
async listArtifacts(session, orgId, filters) {
|
|
24
|
+
return transport.requestJson({
|
|
25
|
+
path: withQuery(`/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts`, filters),
|
|
26
|
+
session
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
async getArtifactDetail(session, orgId, artifactId) {
|
|
30
|
+
return transport.requestJson({
|
|
31
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}`,
|
|
32
|
+
session
|
|
33
|
+
});
|
|
34
|
+
},
|
|
23
35
|
async downloadArtifact(session, orgId, artifactId, options = {}) {
|
|
24
36
|
const response = await transport.requestBytes({
|
|
25
37
|
...(options.createMaxBytesError ? { createMaxBytesError: options.createMaxBytesError } : {}),
|
|
@@ -34,6 +46,27 @@ export function createArtifactApiClient(transport) {
|
|
|
34
46
|
fileName: readContentDispositionFileName(response.headers.get("content-disposition")),
|
|
35
47
|
sizeBytes: response.body.byteLength
|
|
36
48
|
};
|
|
49
|
+
},
|
|
50
|
+
async archiveArtifact(session, orgId, artifactId) {
|
|
51
|
+
return transport.requestJson({
|
|
52
|
+
method: "POST",
|
|
53
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}/archive`,
|
|
54
|
+
session
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
async restoreArtifact(session, orgId, artifactId) {
|
|
58
|
+
return transport.requestJson({
|
|
59
|
+
method: "POST",
|
|
60
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}/restore`,
|
|
61
|
+
session
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
async purgeArtifact(session, orgId, artifactId) {
|
|
65
|
+
return transport.requestJson({
|
|
66
|
+
method: "POST",
|
|
67
|
+
path: `/api/v1/orgs/${encodeURIComponent(orgId)}/artifacts/${encodeURIComponent(artifactId)}/purge`,
|
|
68
|
+
session
|
|
69
|
+
});
|
|
37
70
|
}
|
|
38
71
|
};
|
|
39
72
|
}
|
|
@@ -10,6 +10,11 @@ type ResolveOrgScope = (parsed: ParsedCommand, context: CommandExecutionContext,
|
|
|
10
10
|
}>;
|
|
11
11
|
export declare function executeArtifactUpload(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
12
12
|
export declare function executeArtifactList(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
13
|
+
export declare function executeArtifactInventory(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
14
|
+
export declare function executeArtifactInspect(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
13
15
|
export declare function executeArtifactDownload(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
14
16
|
export declare function executeArtifactRead(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
17
|
+
export declare function executeArtifactArchive(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
18
|
+
export declare function executeArtifactRestore(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
19
|
+
export declare function executeArtifactPurge(parsed: ParsedCommand, context: CommandExecutionContext, api: ReturnType<typeof createPlatformApiClient>, resolveOrgScope: ResolveOrgScope): Promise<ExecutedCommand>;
|
|
15
20
|
export {};
|