@adea-ai/sdk 4.0.2 → 4.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/README.md +19 -3
- package/dist/client.d.ts +76 -64
- package/dist/client.js +181 -157
- package/dist/operations.d.ts +37 -2
- package/dist/operations.js +37 -2
- package/openapi/control-plane.v4.json +3735 -2130
- package/package.json +5 -4
- package/openapi/control-plane.v1.json +0 -3845
- package/openapi/control-plane.v2.json +0 -4585
- package/openapi/control-plane.v3.json +0 -24163
package/dist/client.js
CHANGED
|
@@ -7,6 +7,7 @@ export class ControlPlaneClientError extends Error {
|
|
|
7
7
|
retryable;
|
|
8
8
|
status;
|
|
9
9
|
reasonCode;
|
|
10
|
+
retryAfterMs;
|
|
10
11
|
constructor(input) {
|
|
11
12
|
super(input.message);
|
|
12
13
|
this.name = 'ControlPlaneClientError';
|
|
@@ -16,6 +17,7 @@ export class ControlPlaneClientError extends Error {
|
|
|
16
17
|
this.retryable = input.retryable;
|
|
17
18
|
this.status = input.status;
|
|
18
19
|
this.reasonCode = input.reasonCode;
|
|
20
|
+
this.retryAfterMs = input.retryAfterMs;
|
|
19
21
|
}
|
|
20
22
|
toJSON() {
|
|
21
23
|
return {
|
|
@@ -27,6 +29,7 @@ export class ControlPlaneClientError extends Error {
|
|
|
27
29
|
retryable: this.retryable,
|
|
28
30
|
status: this.status,
|
|
29
31
|
...(this.reasonCode === undefined ? {} : { reasonCode: this.reasonCode }),
|
|
32
|
+
...(this.retryAfterMs === undefined ? {} : { retryAfterMs: this.retryAfterMs }),
|
|
30
33
|
};
|
|
31
34
|
}
|
|
32
35
|
}
|
|
@@ -44,218 +47,217 @@ export class ControlPlaneClient {
|
|
|
44
47
|
throw new Error('Control Plane client timeout must be a positive integer');
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
|
-
createModelConnection(input) {
|
|
48
|
-
return this.#request(ControlApiOperations.createModelConnection, input);
|
|
50
|
+
createModelConnection(input, options) {
|
|
51
|
+
return this.#request(ControlApiOperations.createModelConnection, input, options);
|
|
49
52
|
}
|
|
50
|
-
revokeModelConnection(input) {
|
|
51
|
-
return this.#request(ControlApiOperations.revokeModelConnection, input);
|
|
53
|
+
revokeModelConnection(input, options) {
|
|
54
|
+
return this.#request(ControlApiOperations.revokeModelConnection, input, options);
|
|
52
55
|
}
|
|
53
|
-
listModelConnections(input) {
|
|
54
|
-
return this.#request(ControlApiOperations.listModelConnections, input);
|
|
56
|
+
listModelConnections(input, options) {
|
|
57
|
+
return this.#request(ControlApiOperations.listModelConnections, input, options);
|
|
55
58
|
}
|
|
56
|
-
getModelDefaults(input) {
|
|
57
|
-
return this.#request(ControlApiOperations.getModelDefaults, input);
|
|
59
|
+
getModelDefaults(input, options) {
|
|
60
|
+
return this.#request(ControlApiOperations.getModelDefaults, input, options);
|
|
58
61
|
}
|
|
59
|
-
setModelDefaults(input) {
|
|
60
|
-
return this.#request(ControlApiOperations.setModelDefaults, input);
|
|
62
|
+
setModelDefaults(input, options) {
|
|
63
|
+
return this.#request(ControlApiOperations.setModelDefaults, input, options);
|
|
61
64
|
}
|
|
62
|
-
resolveModelSelection(input) {
|
|
63
|
-
return this.#request(ControlApiOperations.resolveModelSelection, input);
|
|
65
|
+
resolveModelSelection(input, options) {
|
|
66
|
+
return this.#request(ControlApiOperations.resolveModelSelection, input, options);
|
|
64
67
|
}
|
|
65
|
-
getModelSelectionFunding(input) {
|
|
66
|
-
return this.#request(ControlApiOperations.getModelSelectionFunding, input);
|
|
68
|
+
getModelSelectionFunding(input, options) {
|
|
69
|
+
return this.#request(ControlApiOperations.getModelSelectionFunding, input, options);
|
|
67
70
|
}
|
|
68
|
-
getPiDurableLeadPublication(input) {
|
|
69
|
-
return this.#request(ControlApiOperations.getPiDurableLeadPublication, input);
|
|
71
|
+
getPiDurableLeadPublication(input, options) {
|
|
72
|
+
return this.#request(ControlApiOperations.getPiDurableLeadPublication, input, options);
|
|
70
73
|
}
|
|
71
|
-
getPiDurableChildPublication(input) {
|
|
72
|
-
return this.#request(ControlApiOperations.getPiDurableChildPublication, input);
|
|
74
|
+
getPiDurableChildPublication(input, options) {
|
|
75
|
+
return this.#request(ControlApiOperations.getPiDurableChildPublication, input, options);
|
|
73
76
|
}
|
|
74
|
-
createCredential(input) {
|
|
75
|
-
return this.#request(ControlApiOperations.createCredential, input);
|
|
77
|
+
createCredential(input, options) {
|
|
78
|
+
return this.#request(ControlApiOperations.createCredential, input, options);
|
|
76
79
|
}
|
|
77
|
-
rotateCredential(input) {
|
|
78
|
-
return this.#request(ControlApiOperations.rotateCredential, input);
|
|
80
|
+
rotateCredential(input, options) {
|
|
81
|
+
return this.#request(ControlApiOperations.rotateCredential, input, options);
|
|
79
82
|
}
|
|
80
|
-
revokeCredential(input) {
|
|
81
|
-
return this.#request(ControlApiOperations.revokeCredential, input);
|
|
83
|
+
revokeCredential(input, options) {
|
|
84
|
+
return this.#request(ControlApiOperations.revokeCredential, input, options);
|
|
82
85
|
}
|
|
83
|
-
getCredential(input) {
|
|
84
|
-
return this.#request(ControlApiOperations.getCredential, input);
|
|
86
|
+
getCredential(input, options) {
|
|
87
|
+
return this.#request(ControlApiOperations.getCredential, input, options);
|
|
85
88
|
}
|
|
86
|
-
listCredentials(input) {
|
|
87
|
-
return this.#request(ControlApiOperations.listCredentials, input);
|
|
89
|
+
listCredentials(input, options) {
|
|
90
|
+
return this.#request(ControlApiOperations.listCredentials, input, options);
|
|
88
91
|
}
|
|
89
|
-
listWorkspaceSkills(input) {
|
|
90
|
-
return this.#request(ControlApiOperations.listWorkspaceSkills, input);
|
|
92
|
+
listWorkspaceSkills(input, options) {
|
|
93
|
+
return this.#request(ControlApiOperations.listWorkspaceSkills, input, options);
|
|
91
94
|
}
|
|
92
|
-
getWorkspaceSkill(input) {
|
|
93
|
-
return this.#request(ControlApiOperations.getWorkspaceSkill, input);
|
|
95
|
+
getWorkspaceSkill(input, options) {
|
|
96
|
+
return this.#request(ControlApiOperations.getWorkspaceSkill, input, options);
|
|
94
97
|
}
|
|
95
|
-
publishWorkspaceSkill(input) {
|
|
96
|
-
return this.#request(ControlApiOperations.publishWorkspaceSkill, input);
|
|
98
|
+
publishWorkspaceSkill(input, options) {
|
|
99
|
+
return this.#request(ControlApiOperations.publishWorkspaceSkill, input, options);
|
|
97
100
|
}
|
|
98
|
-
deprecateWorkspaceSkill(input) {
|
|
99
|
-
return this.#request(ControlApiOperations.deprecateWorkspaceSkill, input);
|
|
101
|
+
deprecateWorkspaceSkill(input, options) {
|
|
102
|
+
return this.#request(ControlApiOperations.deprecateWorkspaceSkill, input, options);
|
|
100
103
|
}
|
|
101
|
-
revokeWorkspaceSkill(input) {
|
|
102
|
-
return this.#request(ControlApiOperations.revokeWorkspaceSkill, input);
|
|
104
|
+
revokeWorkspaceSkill(input, options) {
|
|
105
|
+
return this.#request(ControlApiOperations.revokeWorkspaceSkill, input, options);
|
|
103
106
|
}
|
|
104
|
-
listWorkspaceProfiles(input) {
|
|
105
|
-
return this.#request(ControlApiOperations.listWorkspaceProfiles, input);
|
|
107
|
+
listWorkspaceProfiles(input, options) {
|
|
108
|
+
return this.#request(ControlApiOperations.listWorkspaceProfiles, input, options);
|
|
106
109
|
}
|
|
107
|
-
getWorkspaceProfile(input) {
|
|
108
|
-
return this.#request(ControlApiOperations.getWorkspaceProfile, input);
|
|
110
|
+
getWorkspaceProfile(input, options) {
|
|
111
|
+
return this.#request(ControlApiOperations.getWorkspaceProfile, input, options);
|
|
109
112
|
}
|
|
110
|
-
publishWorkspaceProfile(input) {
|
|
111
|
-
return this.#request(ControlApiOperations.publishWorkspaceProfile, input);
|
|
113
|
+
publishWorkspaceProfile(input, options) {
|
|
114
|
+
return this.#request(ControlApiOperations.publishWorkspaceProfile, input, options);
|
|
112
115
|
}
|
|
113
|
-
deprecateWorkspaceProfile(input) {
|
|
114
|
-
return this.#request(ControlApiOperations.deprecateWorkspaceProfile, input);
|
|
116
|
+
deprecateWorkspaceProfile(input, options) {
|
|
117
|
+
return this.#request(ControlApiOperations.deprecateWorkspaceProfile, input, options);
|
|
115
118
|
}
|
|
116
|
-
revokeWorkspaceProfile(input) {
|
|
117
|
-
return this.#request(ControlApiOperations.revokeWorkspaceProfile, input);
|
|
119
|
+
revokeWorkspaceProfile(input, options) {
|
|
120
|
+
return this.#request(ControlApiOperations.revokeWorkspaceProfile, input, options);
|
|
118
121
|
}
|
|
119
|
-
verifyAuthentication(input) {
|
|
120
|
-
return this.#request(ControlApiOperations.verifyAuthentication, input);
|
|
122
|
+
verifyAuthentication(input, options) {
|
|
123
|
+
return this.#request(ControlApiOperations.verifyAuthentication, input, options);
|
|
121
124
|
}
|
|
122
|
-
resolveDecision(input) {
|
|
123
|
-
return this.#request(ControlApiOperations.resolveDecision, input);
|
|
125
|
+
resolveDecision(input, options) {
|
|
126
|
+
return this.#request(ControlApiOperations.resolveDecision, input, options);
|
|
124
127
|
}
|
|
125
|
-
resolveProfile(input) {
|
|
126
|
-
return this.#request(ControlApiOperations.resolveProfile, input);
|
|
128
|
+
resolveProfile(input, options) {
|
|
129
|
+
return this.#request(ControlApiOperations.resolveProfile, input, options);
|
|
127
130
|
}
|
|
128
|
-
resolveProjectState(input) {
|
|
129
|
-
return this.#request(ControlApiOperations.resolveProjectState, input);
|
|
131
|
+
resolveProjectState(input, options) {
|
|
132
|
+
return this.#request(ControlApiOperations.resolveProjectState, input, options);
|
|
130
133
|
}
|
|
131
|
-
initializeProjectState(input) {
|
|
132
|
-
return this.#request(ControlApiOperations.initializeProjectState, input);
|
|
134
|
+
initializeProjectState(input, options) {
|
|
135
|
+
return this.#request(ControlApiOperations.initializeProjectState, input, options);
|
|
133
136
|
}
|
|
134
|
-
resolveContextPackage(input) {
|
|
135
|
-
return this.#request(ControlApiOperations.resolveContextPackage, input);
|
|
137
|
+
resolveContextPackage(input, options) {
|
|
138
|
+
return this.#request(ControlApiOperations.resolveContextPackage, input, options);
|
|
136
139
|
}
|
|
137
|
-
listRuntimes(input) {
|
|
138
|
-
return this.#request(ControlApiOperations.listRuntimes, input);
|
|
140
|
+
listRuntimes(input, options) {
|
|
141
|
+
return this.#request(ControlApiOperations.listRuntimes, input, options);
|
|
139
142
|
}
|
|
140
|
-
listRuntimeConnections(input) {
|
|
141
|
-
return this.#request(ControlApiOperations.listRuntimeConnections, input);
|
|
143
|
+
listRuntimeConnections(input, options) {
|
|
144
|
+
return this.#request(ControlApiOperations.listRuntimeConnections, input, options);
|
|
142
145
|
}
|
|
143
|
-
getRuntimeConnection(input) {
|
|
144
|
-
return this.#request(ControlApiOperations.getRuntimeConnection, input);
|
|
146
|
+
getRuntimeConnection(input, options) {
|
|
147
|
+
return this.#request(ControlApiOperations.getRuntimeConnection, input, options);
|
|
145
148
|
}
|
|
146
|
-
listExternalSessions(input) {
|
|
147
|
-
return this.#request(ControlApiOperations.listExternalSessions, input);
|
|
149
|
+
listExternalSessions(input, options) {
|
|
150
|
+
return this.#request(ControlApiOperations.listExternalSessions, input, options);
|
|
148
151
|
}
|
|
149
|
-
getExternalSession(input) {
|
|
150
|
-
return this.#request(ControlApiOperations.getExternalSession, input);
|
|
152
|
+
getExternalSession(input, options) {
|
|
153
|
+
return this.#request(ControlApiOperations.getExternalSession, input, options);
|
|
151
154
|
}
|
|
152
|
-
uploadDeviceSyncObject(input) {
|
|
153
|
-
return this.#request(ControlApiOperations.uploadDeviceSyncObject, input);
|
|
155
|
+
uploadDeviceSyncObject(input, options) {
|
|
156
|
+
return this.#request(ControlApiOperations.uploadDeviceSyncObject, input, options);
|
|
154
157
|
}
|
|
155
|
-
commitDeviceSyncObject(input) {
|
|
156
|
-
return this.#request(ControlApiOperations.commitDeviceSyncObject, input);
|
|
158
|
+
commitDeviceSyncObject(input, options) {
|
|
159
|
+
return this.#request(ControlApiOperations.commitDeviceSyncObject, input, options);
|
|
157
160
|
}
|
|
158
|
-
downloadDeviceSyncObjects(input) {
|
|
159
|
-
return this.#request(ControlApiOperations.downloadDeviceSyncObjects, input);
|
|
161
|
+
downloadDeviceSyncObjects(input, options) {
|
|
162
|
+
return this.#request(ControlApiOperations.downloadDeviceSyncObjects, input, options);
|
|
160
163
|
}
|
|
161
|
-
releaseDeviceSyncObjects(input) {
|
|
162
|
-
return this.#request(ControlApiOperations.releaseDeviceSyncObjects, input);
|
|
164
|
+
releaseDeviceSyncObjects(input, options) {
|
|
165
|
+
return this.#request(ControlApiOperations.releaseDeviceSyncObjects, input, options);
|
|
163
166
|
}
|
|
164
|
-
appendDeviceSyncLog(input) {
|
|
165
|
-
return this.#request(ControlApiOperations.appendDeviceSyncLog, input);
|
|
167
|
+
appendDeviceSyncLog(input, options) {
|
|
168
|
+
return this.#request(ControlApiOperations.appendDeviceSyncLog, input, options);
|
|
166
169
|
}
|
|
167
|
-
readDeviceSyncLog(input) {
|
|
168
|
-
return this.#request(ControlApiOperations.readDeviceSyncLog, input);
|
|
170
|
+
readDeviceSyncLog(input, options) {
|
|
171
|
+
return this.#request(ControlApiOperations.readDeviceSyncLog, input, options);
|
|
169
172
|
}
|
|
170
|
-
readDeviceSyncUsage(input) {
|
|
171
|
-
return this.#request(ControlApiOperations.readDeviceSyncUsage, input);
|
|
173
|
+
readDeviceSyncUsage(input, options) {
|
|
174
|
+
return this.#request(ControlApiOperations.readDeviceSyncUsage, input, options);
|
|
172
175
|
}
|
|
173
|
-
|
|
174
|
-
return this.#request(ControlApiOperations.
|
|
176
|
+
readDeviceSyncCheckpoint(input, options) {
|
|
177
|
+
return this.#request(ControlApiOperations.readDeviceSyncCheckpoint, input, options);
|
|
175
178
|
}
|
|
176
|
-
|
|
177
|
-
return this.#request(ControlApiOperations.
|
|
179
|
+
registerDeviceSyncCheckpoint(input, options) {
|
|
180
|
+
return this.#request(ControlApiOperations.registerDeviceSyncCheckpoint, input, options);
|
|
178
181
|
}
|
|
179
|
-
|
|
180
|
-
return this.#request(ControlApiOperations.
|
|
182
|
+
acknowledgeDeviceSyncLog(input, options) {
|
|
183
|
+
return this.#request(ControlApiOperations.acknowledgeDeviceSyncLog, input, options);
|
|
181
184
|
}
|
|
182
|
-
|
|
183
|
-
return this.#request(ControlApiOperations.
|
|
185
|
+
validateExecutionRequest(input, options) {
|
|
186
|
+
return this.#request(ControlApiOperations.validateExecutionRequest, input, options);
|
|
184
187
|
}
|
|
185
|
-
|
|
186
|
-
return this.#request(ControlApiOperations.
|
|
188
|
+
acceptExecution(input, options) {
|
|
189
|
+
return this.#request(ControlApiOperations.acceptExecution, input, options);
|
|
187
190
|
}
|
|
188
|
-
|
|
189
|
-
return this.#request(ControlApiOperations.
|
|
191
|
+
respondToInteraction(input, options) {
|
|
192
|
+
return this.#request(ControlApiOperations.respondToInteraction, input, options);
|
|
190
193
|
}
|
|
191
|
-
|
|
192
|
-
return this.#request(ControlApiOperations.
|
|
194
|
+
cancelExecution(input, options) {
|
|
195
|
+
return this.#request(ControlApiOperations.cancelExecution, input, options);
|
|
193
196
|
}
|
|
194
|
-
|
|
195
|
-
return this.#request(ControlApiOperations.
|
|
197
|
+
marketplaceCatalog(input, options) {
|
|
198
|
+
return this.#request(ControlApiOperations.marketplaceCatalog, input, options);
|
|
196
199
|
}
|
|
197
|
-
|
|
198
|
-
return this.#request(ControlApiOperations.
|
|
200
|
+
marketplaceInstall(input, options) {
|
|
201
|
+
return this.#request(ControlApiOperations.marketplaceInstall, input, options);
|
|
199
202
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const response = await this.#request(ControlApiOperations.preparePiDurableLead, request);
|
|
203
|
-
if (response.data.intentId !== request.payload.intentId ||
|
|
204
|
-
response.data.funding.workspaceId !== request.workspaceId) {
|
|
205
|
-
throw invalidResponse(request.requestId, 200);
|
|
206
|
-
}
|
|
207
|
-
return response;
|
|
203
|
+
marketplaceInstallPlan(input, options) {
|
|
204
|
+
return this.#request(ControlApiOperations.marketplaceInstallPlan, input, options);
|
|
208
205
|
}
|
|
209
|
-
|
|
210
|
-
return this.#request(ControlApiOperations.
|
|
206
|
+
marketplaceInstallationList(input, options) {
|
|
207
|
+
return this.#request(ControlApiOperations.marketplaceInstallationList, input, options);
|
|
211
208
|
}
|
|
212
|
-
|
|
213
|
-
return this.#request(ControlApiOperations.
|
|
209
|
+
marketplaceInstallationGet(input, options) {
|
|
210
|
+
return this.#request(ControlApiOperations.marketplaceInstallationGet, input, options);
|
|
214
211
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
const response = await this.#request(ControlApiOperations.lookupPiDurableLead, request);
|
|
218
|
-
if (response.data.intentId !== request.parameters.intentId ||
|
|
219
|
-
response.data.workspaceId !== request.workspaceId) {
|
|
220
|
-
throw invalidResponse(request.requestId, 200);
|
|
221
|
-
}
|
|
222
|
-
return response;
|
|
212
|
+
marketplaceInstallationUninstall(input, options) {
|
|
213
|
+
return this.#request(ControlApiOperations.marketplaceInstallationUninstall, input, options);
|
|
223
214
|
}
|
|
224
|
-
|
|
225
|
-
return this.#request(ControlApiOperations.
|
|
215
|
+
preparePiDurableLead(input, options) {
|
|
216
|
+
return this.#request(ControlApiOperations.preparePiDurableLead, input, options, (request, response) => response.data.intentId === request.payload.intentId &&
|
|
217
|
+
response.data.funding.workspaceId === request.workspaceId);
|
|
226
218
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
219
|
+
dispatchPiDurableLead(input, options) {
|
|
220
|
+
return this.#request(ControlApiOperations.dispatchPiDurableLead, input, options);
|
|
221
|
+
}
|
|
222
|
+
getPiDurableLeadStatus(input, options) {
|
|
223
|
+
return this.#request(ControlApiOperations.getPiDurableLeadStatus, input, options);
|
|
224
|
+
}
|
|
225
|
+
lookupPiDurableLead(input, options) {
|
|
226
|
+
return this.#request(ControlApiOperations.lookupPiDurableLead, input, options, (request, response) => response.data.intentId === request.parameters.intentId &&
|
|
227
|
+
response.data.workspaceId === request.workspaceId);
|
|
234
228
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
const response = await this.#request(ControlApiOperations.getPiDurableLeadChildTarget, request);
|
|
238
|
-
if (response.data.dispatchId !== request.parameters.dispatchId ||
|
|
239
|
-
response.data.child.delegationId !== request.parameters.delegationId)
|
|
240
|
-
throw invalidResponse(request.requestId, 200);
|
|
241
|
-
return response;
|
|
229
|
+
getPiDurableLeadProgress(input, options) {
|
|
230
|
+
return this.#request(ControlApiOperations.getPiDurableLeadProgress, input, options);
|
|
242
231
|
}
|
|
243
|
-
|
|
244
|
-
return this.#request(ControlApiOperations.
|
|
232
|
+
getPiDurableLeadChildren(input, options) {
|
|
233
|
+
return this.#request(ControlApiOperations.getPiDurableLeadChildren, input, options, (request, response) => response.data.dispatchId === request.parameters.dispatchId);
|
|
245
234
|
}
|
|
246
|
-
|
|
247
|
-
return this.#request(ControlApiOperations.
|
|
235
|
+
getPiDurableLeadChildTarget(input, options) {
|
|
236
|
+
return this.#request(ControlApiOperations.getPiDurableLeadChildTarget, input, options, (request, response) => response.data.dispatchId === request.parameters.dispatchId &&
|
|
237
|
+
response.data.child.delegationId === request.parameters.delegationId);
|
|
248
238
|
}
|
|
249
|
-
|
|
250
|
-
return this.#request(ControlApiOperations.
|
|
239
|
+
cancelPiDurableLead(input, options) {
|
|
240
|
+
return this.#request(ControlApiOperations.cancelPiDurableLead, input, options);
|
|
251
241
|
}
|
|
252
|
-
|
|
253
|
-
return this.#request(ControlApiOperations.
|
|
242
|
+
answerPiDurableLeadQuestion(input, options) {
|
|
243
|
+
return this.#request(ControlApiOperations.answerPiDurableLeadQuestion, input, options);
|
|
254
244
|
}
|
|
255
|
-
|
|
245
|
+
answerPiDurableLeadApproval(input, options) {
|
|
246
|
+
return this.#request(ControlApiOperations.answerPiDurableLeadApproval, input, options);
|
|
247
|
+
}
|
|
248
|
+
cancelPiDurableLeadChild(input, options) {
|
|
249
|
+
return this.#request(ControlApiOperations.cancelPiDurableLeadChild, input, options);
|
|
250
|
+
}
|
|
251
|
+
messagePiDurableLeadChild(input, options) {
|
|
252
|
+
return this.#request(ControlApiOperations.messagePiDurableLeadChild, input, options);
|
|
253
|
+
}
|
|
254
|
+
async #request(operation, input, options = {}, answers) {
|
|
256
255
|
const request = operation.requestSchema.parse(input);
|
|
256
|
+
options.signal?.throwIfAborted();
|
|
257
257
|
const credential = await resolveCredential(this.#credential);
|
|
258
|
-
const
|
|
258
|
+
const timeout = AbortSignal.timeout(this.#timeoutMs);
|
|
259
|
+
const signal = options.signal === undefined ? timeout : AbortSignal.any([options.signal, timeout]);
|
|
260
|
+
signal.throwIfAborted();
|
|
259
261
|
const response = await this.#fetch(new URL(operation.path.slice(1), this.#baseUrl), {
|
|
260
262
|
method: operation.method,
|
|
261
263
|
headers: {
|
|
@@ -273,6 +275,8 @@ export class ControlPlaneClient {
|
|
|
273
275
|
if (!response.ok) {
|
|
274
276
|
const parsedError = ErrorResponseEnvelopeSchema.safeParse(body);
|
|
275
277
|
if (!parsedError.success) {
|
|
278
|
+
if (TRANSIENT_STATUSES.has(response.status))
|
|
279
|
+
throw unavailable(request.requestId, response.status, response.headers);
|
|
276
280
|
throw invalidResponse(request.requestId, response.status);
|
|
277
281
|
}
|
|
278
282
|
assertCompatibleVersion(parsedError.data.contractVersion, request.requestId, response.status);
|
|
@@ -281,9 +285,10 @@ export class ControlPlaneClient {
|
|
|
281
285
|
errorClass: parsedError.data.error.class,
|
|
282
286
|
message: parsedError.data.error.message,
|
|
283
287
|
requestId: parsedError.data.requestId,
|
|
284
|
-
retryable: parsedError.data.error.retryable,
|
|
288
|
+
retryable: parsedError.data.error.retryable || response.status === 429,
|
|
285
289
|
status: response.status,
|
|
286
290
|
reasonCode: readinessReason(parsedError.data.error.details),
|
|
291
|
+
retryAfterMs: parseRetryAfterMs(response.headers.get('retry-after')),
|
|
287
292
|
});
|
|
288
293
|
}
|
|
289
294
|
const version = ContractVersionSchema.safeParse(versionFrom(body));
|
|
@@ -291,8 +296,9 @@ export class ControlPlaneClient {
|
|
|
291
296
|
throw invalidResponse(request.requestId, response.status);
|
|
292
297
|
assertCompatibleVersion(version.data, request.requestId, response.status);
|
|
293
298
|
const parsedResponse = operation.responseSchema.safeParse(body);
|
|
294
|
-
if (!parsedResponse.success)
|
|
299
|
+
if (!parsedResponse.success || (answers && !answers(request, parsedResponse.data))) {
|
|
295
300
|
throw invalidResponse(request.requestId, response.status);
|
|
301
|
+
}
|
|
296
302
|
return parsedResponse.data;
|
|
297
303
|
}
|
|
298
304
|
}
|
|
@@ -314,27 +320,34 @@ async function resolveCredential(provider) {
|
|
|
314
320
|
throw new Error('Control Plane service credential is required');
|
|
315
321
|
return credential;
|
|
316
322
|
}
|
|
323
|
+
const TRANSIENT_STATUSES = new Set([429, 502, 503, 504]);
|
|
317
324
|
async function parseResponseBody(response, requestId, signal) {
|
|
318
325
|
try {
|
|
319
326
|
return await response.json();
|
|
320
327
|
}
|
|
321
328
|
catch {
|
|
322
329
|
signal.throwIfAborted();
|
|
330
|
+
if (!response.ok)
|
|
331
|
+
return undefined;
|
|
323
332
|
throw invalidResponse(requestId, response.status);
|
|
324
333
|
}
|
|
325
334
|
}
|
|
335
|
+
export function parseRetryAfterMs(header, now = Date.now()) {
|
|
336
|
+
if (header === null)
|
|
337
|
+
return undefined;
|
|
338
|
+
const value = header.trim();
|
|
339
|
+
if (/^\d{1,9}$/.test(value))
|
|
340
|
+
return Number(value) * 1000;
|
|
341
|
+
const date = /^[A-Z][a-z]{2}, /.test(value) ? Date.parse(value) : Number.NaN;
|
|
342
|
+
return Number.isNaN(date) ? undefined : Math.max(0, date - now);
|
|
343
|
+
}
|
|
326
344
|
function versionFrom(body) {
|
|
327
345
|
if (typeof body !== 'object' || body === null)
|
|
328
346
|
return undefined;
|
|
329
347
|
return Reflect.get(body, 'contractVersion');
|
|
330
348
|
}
|
|
331
|
-
function assertCompatibleVersion(
|
|
332
|
-
|
|
333
|
-
if (!producer.success ||
|
|
334
|
-
!assessContractCompatibility({
|
|
335
|
-
consumer: PublicContractManifest.current,
|
|
336
|
-
producer: producer.data,
|
|
337
|
-
}).compatible) {
|
|
349
|
+
function assertCompatibleVersion(producer, requestId, status) {
|
|
350
|
+
if (!assessContractCompatibility({ consumer: PublicContractManifest.current, producer }).compatible) {
|
|
338
351
|
throw new ControlPlaneClientError({
|
|
339
352
|
code: 'INCOMPATIBLE_CONTRACT_VERSION',
|
|
340
353
|
errorClass: 'validation',
|
|
@@ -349,6 +362,17 @@ function readinessReason(details) {
|
|
|
349
362
|
const parsed = ModelReadinessReasonSchema.safeParse(details?.['reasonCode']);
|
|
350
363
|
return parsed.success && parsed.data !== 'READY' ? parsed.data : undefined;
|
|
351
364
|
}
|
|
365
|
+
function unavailable(requestId, status, headers) {
|
|
366
|
+
return new ControlPlaneClientError({
|
|
367
|
+
code: 'CONTROL_PLANE_UNAVAILABLE',
|
|
368
|
+
errorClass: 'runtime_unavailable',
|
|
369
|
+
message: 'Control Plane is temporarily unavailable',
|
|
370
|
+
requestId,
|
|
371
|
+
retryable: true,
|
|
372
|
+
status,
|
|
373
|
+
retryAfterMs: parseRetryAfterMs(headers.get('retry-after')),
|
|
374
|
+
});
|
|
375
|
+
}
|
|
352
376
|
function invalidResponse(requestId, status) {
|
|
353
377
|
return new ControlPlaneClientError({
|
|
354
378
|
code: 'INVALID_CONTROL_PLANE_RESPONSE',
|
package/dist/operations.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PiDurableLeadPrepareRequestSchema, PiDurableLeadPrepareResponseSchema, PiDurableLeadLookupRequestSchema, PiDurableLeadLookupResponseSchema, PiDurableLeadDispatchRequestSchema, PiDurableLeadDispatchResponseSchema, PiDurableLeadStatusRequestSchema, PiDurableLeadStatusResponseSchema, PiDurableLeadChildrenRequestSchema, PiDurableLeadChildrenResponseSchema, PiDurableLeadChildTargetRequestSchema, PiDurableLeadChildTargetResponseSchema, PiDurableLeadProgressRequestSchema, PiDurableLeadEventsRequestSchema, PiDurableLeadEventsResponseSchema, PiDurableSessionsRequestSchema, PiDurableSessionsResponseSchema, PiDurableSessionEventsRequestSchema, PiDurableSessionEventsResponseSchema, PiDurableLeadProgressResponseSchema, PiDurableLeadCancelRequestSchema, PiDurableLeadChildCancelRequestSchema, PiDurableLeadQuestionAnswerRequestSchema, PiDurableLeadApprovalAnswerRequestSchema, PiDurableLeadApprovalAnswerResponseSchema, PiDurableLeadQuestionAnswerResponseSchema, PiDurableLeadChildCancelResponseSchema, PiDurableLeadCancelResponseSchema } from '@adea-ai/runtime-sdk';
|
|
1
|
+
import { PiDurableLeadPrepareRequestSchema, PiDurableLeadPrepareResponseSchema, PiDurableLeadLookupRequestSchema, PiDurableLeadLookupResponseSchema, PiDurableLeadDispatchRequestSchema, PiDurableLeadDispatchResponseSchema, PiDurableLeadStatusRequestSchema, PiDurableLeadStatusResponseSchema, PiDurableLeadChildrenRequestSchema, PiDurableLeadChildrenResponseSchema, PiDurableLeadChildTargetRequestSchema, PiDurableLeadChildTargetResponseSchema, PiDurableLeadProgressRequestSchema, PiDurableLeadEventsRequestSchema, PiDurableLeadEventsResponseSchema, PiDurableSessionsRequestSchema, PiDurableSessionsResponseSchema, PiDurableSessionEventsRequestSchema, PiDurableSessionEventsResponseSchema, PiDurableLeadProgressResponseSchema, PiDurableLeadCancelRequestSchema, PiDurableLeadChildCancelRequestSchema, PiDurableLeadQuestionAnswerRequestSchema, PiDurableLeadApprovalAnswerRequestSchema, PiDurableLeadApprovalAnswerResponseSchema, PiDurableLeadQuestionAnswerResponseSchema, PiDurableLeadChildCancelResponseSchema, PiDurableLeadChildMessageRequestSchema, PiDurableLeadChildMessageResponseSchema, PiDurableLeadCancelResponseSchema } from '@adea-ai/runtime-sdk';
|
|
2
2
|
import { PiLeadPublicationRequestSchema, PiLeadPublicationResponseSchema, PiChildPublicationRequestSchema, PiChildPublicationResponseSchema, ModelSelectionFundingRequestSchema, ModelSelectionFundingResponseSchema, ModelConnectionCreateRequestSchema, ModelConnectionListRequestSchema, ModelConnectionListResponseSchema, ModelConnectionResponseSchema, ModelConnectionRevokeRequestSchema, ModelDefaultsGetRequestSchema, ModelDefaultsResponseSchema, ModelDefaultsSetRequestSchema, ModelSelectionResolveRequestSchema, ModelSelectionResponseSchema } from '@adea-ai/contracts';
|
|
3
|
-
import { CredentialCreateRequestSchema, CredentialGetRequestSchema, CredentialListRequestSchema, CredentialListResponseSchema, CredentialResponseSchema, CredentialRevokeRequestSchema, CredentialRotateRequestSchema, ExecutionCancellationCommandSchema, ExecutionCancellationCommandResultSchema, InteractionResponseCommandSchema, InteractionResponseCommandResultSchema, ContextPackageResolutionRequestSchema, ContextPackageResolutionResponseSchema, ExecutionAcceptanceRequestSchema, ExecutionAcceptanceResponseSchema, ExecutionRequestValidationRequestSchema, ExecutionRequestValidationResponseSchema, DecisionResolveRequestSchema, DecisionResolveResponseSchema, ProfileResolutionRequestSchema, ProfileResolutionResponseSchema, ProjectStateInitializationRequestSchema, ProjectStateInitializationResponseSchema, ProjectStateResolutionRequestSchema, ProjectStateResolutionResponseSchema, RuntimeListRequestSchema, RuntimeListResponseSchema, ServiceAuthenticationRequestSchema, ServiceAuthenticationResponseSchema, ExternalSessionGetRequestSchema, ExternalSessionGetResponseSchema, ExternalSessionListRequestSchema, ExternalSessionListResponseSchema, RuntimeConnectionGetRequestSchema, RuntimeConnectionGetResponseSchema, RuntimeConnectionListRequestSchema, RuntimeConnectionListResponseSchema, MarketplaceCatalogRequestSchema, MarketplaceCatalogResponseSchema, MarketplaceInstallPlanRequestSchema, MarketplaceInstallPlanResponseSchema, MarketplaceInstallRequestSchema, MarketplaceInstallResponseSchema, MarketplaceInstallationGetRequestSchema, MarketplaceInstallationGetResponseSchema, MarketplaceInstallationUninstallRequestSchema, MarketplaceInstallationUninstallResponseSchema, WorkspaceAgentProfileDeprecationRequestSchema, WorkspaceAgentProfileGetRequestSchema, WorkspaceAgentProfileGetResponseSchema, WorkspaceAgentProfileLifecycleResponseSchema, WorkspaceAgentProfileListRequestSchema, WorkspaceAgentProfileListResponseSchema, WorkspaceAgentProfilePublishRequestSchema, WorkspaceAgentProfilePublishResponseSchema, WorkspaceAgentProfileRevocationRequestSchema, WorkspaceSkillDeprecationRequestSchema, WorkspaceSkillGetRequestSchema, WorkspaceSkillGetResponseSchema, WorkspaceSkillLifecycleResponseSchema, WorkspaceSkillListRequestSchema, WorkspaceSkillListResponseSchema, WorkspaceSkillPublishRequestSchema, WorkspaceSkillPublishResponseSchema, WorkspaceSkillRevocationRequestSchema, DeviceSyncUploadRequestSchema, DeviceSyncUploadResponseSchema, DeviceSyncCommitRequestSchema, DeviceSyncCommitResponseSchema, DeviceSyncDownloadRequestSchema, DeviceSyncDownloadResponseSchema, DeviceSyncReleaseRequestSchema, DeviceSyncReleaseResponseSchema, DeviceSyncAppendRequestSchema, DeviceSyncAppendResponseSchema, DeviceSyncLogRequestSchema, DeviceSyncLogResponseSchema, DeviceSyncUsageRequestSchema, DeviceSyncUsageResponseSchema } from '@adea-ai/contracts';
|
|
3
|
+
import { CredentialCreateRequestSchema, CredentialGetRequestSchema, CredentialListRequestSchema, CredentialListResponseSchema, CredentialResponseSchema, CredentialRevokeRequestSchema, CredentialRotateRequestSchema, ExecutionCancellationCommandSchema, ExecutionCancellationCommandResultSchema, InteractionResponseCommandSchema, InteractionResponseCommandResultSchema, ContextPackageResolutionRequestSchema, ContextPackageResolutionResponseSchema, ExecutionAcceptanceRequestSchema, ExecutionAcceptanceResponseSchema, ExecutionRequestValidationRequestSchema, ExecutionRequestValidationResponseSchema, DecisionResolveRequestSchema, DecisionResolveResponseSchema, ProfileResolutionRequestSchema, ProfileResolutionResponseSchema, ProjectStateInitializationRequestSchema, ProjectStateInitializationResponseSchema, ProjectStateResolutionRequestSchema, ProjectStateResolutionResponseSchema, RuntimeListRequestSchema, RuntimeListResponseSchema, ServiceAuthenticationRequestSchema, ServiceAuthenticationResponseSchema, ExternalSessionGetRequestSchema, ExternalSessionGetResponseSchema, ExternalSessionListRequestSchema, ExternalSessionListResponseSchema, RuntimeConnectionGetRequestSchema, RuntimeConnectionGetResponseSchema, RuntimeConnectionListRequestSchema, RuntimeConnectionListResponseSchema, MarketplaceCatalogRequestSchema, MarketplaceCatalogResponseSchema, MarketplaceInstallPlanRequestSchema, MarketplaceInstallPlanResponseSchema, MarketplaceInstallRequestSchema, MarketplaceInstallResponseSchema, MarketplaceInstallationGetRequestSchema, MarketplaceInstallationGetResponseSchema, MarketplaceInstallationListRequestSchema, MarketplaceInstallationListResponseSchema, MarketplaceInstallationUninstallRequestSchema, MarketplaceInstallationUninstallResponseSchema, WorkspaceAgentProfileDeprecationRequestSchema, WorkspaceAgentProfileGetRequestSchema, WorkspaceAgentProfileGetResponseSchema, WorkspaceAgentProfileLifecycleResponseSchema, WorkspaceAgentProfileListRequestSchema, WorkspaceAgentProfileListResponseSchema, WorkspaceAgentProfilePublishRequestSchema, WorkspaceAgentProfilePublishResponseSchema, WorkspaceAgentProfileRevocationRequestSchema, WorkspaceSkillDeprecationRequestSchema, WorkspaceSkillGetRequestSchema, WorkspaceSkillGetResponseSchema, WorkspaceSkillLifecycleResponseSchema, WorkspaceSkillListRequestSchema, WorkspaceSkillListResponseSchema, WorkspaceSkillPublishRequestSchema, WorkspaceSkillPublishResponseSchema, WorkspaceSkillRevocationRequestSchema, DeviceSyncUploadRequestSchema, DeviceSyncUploadResponseSchema, DeviceSyncCommitRequestSchema, DeviceSyncCommitResponseSchema, DeviceSyncDownloadRequestSchema, DeviceSyncDownloadResponseSchema, DeviceSyncReleaseRequestSchema, DeviceSyncReleaseResponseSchema, DeviceSyncAppendRequestSchema, DeviceSyncAppendResponseSchema, DeviceSyncLogRequestSchema, DeviceSyncLogResponseSchema, DeviceSyncUsageRequestSchema, DeviceSyncUsageResponseSchema, DeviceSyncCheckpointRequestSchema, DeviceSyncCheckpointResponseSchema, DeviceSyncRegisterCheckpointRequestSchema, DeviceSyncRegisterCheckpointResponseSchema, DeviceSyncAckRequestSchema, DeviceSyncAckResponseSchema } from '@adea-ai/contracts';
|
|
4
4
|
export declare const ControlApiOperations: Readonly<{
|
|
5
5
|
readonly getPiDurableLeadPublication: {
|
|
6
6
|
readonly operation: 'pi-durable.lead.publication.current';
|
|
@@ -298,6 +298,13 @@ export declare const ControlApiOperations: Readonly<{
|
|
|
298
298
|
readonly requestSchema: typeof MarketplaceInstallPlanRequestSchema;
|
|
299
299
|
readonly responseSchema: typeof MarketplaceInstallPlanResponseSchema;
|
|
300
300
|
};
|
|
301
|
+
readonly marketplaceInstallationList: {
|
|
302
|
+
readonly operation: 'marketplace.installation.list';
|
|
303
|
+
readonly method: 'POST';
|
|
304
|
+
readonly path: '/v1/marketplace/installations/list';
|
|
305
|
+
readonly requestSchema: typeof MarketplaceInstallationListRequestSchema;
|
|
306
|
+
readonly responseSchema: typeof MarketplaceInstallationListResponseSchema;
|
|
307
|
+
};
|
|
301
308
|
readonly marketplaceInstallationGet: {
|
|
302
309
|
readonly operation: 'marketplace.installation.get';
|
|
303
310
|
readonly method: 'POST';
|
|
@@ -413,6 +420,13 @@ export declare const ControlApiOperations: Readonly<{
|
|
|
413
420
|
readonly responseSchema: typeof PiDurableLeadChildCancelResponseSchema;
|
|
414
421
|
readonly responseStatus: 202;
|
|
415
422
|
};
|
|
423
|
+
readonly messagePiDurableLeadChild: {
|
|
424
|
+
readonly operation: 'pi-durable.lead.child-message';
|
|
425
|
+
readonly method: 'POST';
|
|
426
|
+
readonly path: '/v3/pi-durable/lead-dispatches/child-message';
|
|
427
|
+
readonly requestSchema: typeof PiDurableLeadChildMessageRequestSchema;
|
|
428
|
+
readonly responseSchema: typeof PiDurableLeadChildMessageResponseSchema;
|
|
429
|
+
};
|
|
416
430
|
readonly uploadDeviceSyncObject: {
|
|
417
431
|
readonly operation: 'device-sync.upload';
|
|
418
432
|
readonly method: 'POST';
|
|
@@ -462,5 +476,26 @@ export declare const ControlApiOperations: Readonly<{
|
|
|
462
476
|
readonly requestSchema: typeof DeviceSyncUsageRequestSchema;
|
|
463
477
|
readonly responseSchema: typeof DeviceSyncUsageResponseSchema;
|
|
464
478
|
};
|
|
479
|
+
readonly readDeviceSyncCheckpoint: {
|
|
480
|
+
readonly operation: 'device-sync.checkpoint';
|
|
481
|
+
readonly method: 'POST';
|
|
482
|
+
readonly path: '/v1/device-sync/log/checkpoint';
|
|
483
|
+
readonly requestSchema: typeof DeviceSyncCheckpointRequestSchema;
|
|
484
|
+
readonly responseSchema: typeof DeviceSyncCheckpointResponseSchema;
|
|
485
|
+
};
|
|
486
|
+
readonly registerDeviceSyncCheckpoint: {
|
|
487
|
+
readonly operation: 'device-sync.register-checkpoint';
|
|
488
|
+
readonly method: 'POST';
|
|
489
|
+
readonly path: '/v1/device-sync/log/checkpoint/register';
|
|
490
|
+
readonly requestSchema: typeof DeviceSyncRegisterCheckpointRequestSchema;
|
|
491
|
+
readonly responseSchema: typeof DeviceSyncRegisterCheckpointResponseSchema;
|
|
492
|
+
};
|
|
493
|
+
readonly acknowledgeDeviceSyncLog: {
|
|
494
|
+
readonly operation: 'device-sync.ack';
|
|
495
|
+
readonly method: 'POST';
|
|
496
|
+
readonly path: '/v1/device-sync/log/ack';
|
|
497
|
+
readonly requestSchema: typeof DeviceSyncAckRequestSchema;
|
|
498
|
+
readonly responseSchema: typeof DeviceSyncAckResponseSchema;
|
|
499
|
+
};
|
|
465
500
|
}>;
|
|
466
501
|
export type ControlApiOperationName = keyof typeof ControlApiOperations;
|
package/dist/operations.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PiDurableLeadPrepareRequestSchema, PiDurableLeadPrepareResponseSchema, PiDurableLeadLookupRequestSchema, PiDurableLeadLookupResponseSchema, PiDurableLeadDispatchRequestSchema, PiDurableLeadDispatchResponseSchema, PiDurableLeadStatusRequestSchema, PiDurableLeadStatusResponseSchema, PiDurableLeadChildrenRequestSchema, PiDurableLeadChildrenResponseSchema, PiDurableLeadChildTargetRequestSchema, PiDurableLeadChildTargetResponseSchema, PiDurableLeadProgressRequestSchema, PiDurableLeadEventsRequestSchema, PiDurableLeadEventsResponseSchema, PiDurableSessionsRequestSchema, PiDurableSessionsResponseSchema, PiDurableSessionEventsRequestSchema, PiDurableSessionEventsResponseSchema, PiDurableLeadProgressResponseSchema, PiDurableLeadCancelRequestSchema, PiDurableLeadChildCancelRequestSchema, PiDurableLeadQuestionAnswerRequestSchema, PiDurableLeadApprovalAnswerRequestSchema, PiDurableLeadApprovalAnswerResponseSchema, PiDurableLeadQuestionAnswerResponseSchema, PiDurableLeadChildCancelResponseSchema, PiDurableLeadCancelResponseSchema, } from '@adea-ai/runtime-sdk';
|
|
1
|
+
import { PiDurableLeadPrepareRequestSchema, PiDurableLeadPrepareResponseSchema, PiDurableLeadLookupRequestSchema, PiDurableLeadLookupResponseSchema, PiDurableLeadDispatchRequestSchema, PiDurableLeadDispatchResponseSchema, PiDurableLeadStatusRequestSchema, PiDurableLeadStatusResponseSchema, PiDurableLeadChildrenRequestSchema, PiDurableLeadChildrenResponseSchema, PiDurableLeadChildTargetRequestSchema, PiDurableLeadChildTargetResponseSchema, PiDurableLeadProgressRequestSchema, PiDurableLeadEventsRequestSchema, PiDurableLeadEventsResponseSchema, PiDurableSessionsRequestSchema, PiDurableSessionsResponseSchema, PiDurableSessionEventsRequestSchema, PiDurableSessionEventsResponseSchema, PiDurableLeadProgressResponseSchema, PiDurableLeadCancelRequestSchema, PiDurableLeadChildCancelRequestSchema, PiDurableLeadQuestionAnswerRequestSchema, PiDurableLeadApprovalAnswerRequestSchema, PiDurableLeadApprovalAnswerResponseSchema, PiDurableLeadQuestionAnswerResponseSchema, PiDurableLeadChildCancelResponseSchema, PiDurableLeadChildMessageRequestSchema, PiDurableLeadChildMessageResponseSchema, PiDurableLeadCancelResponseSchema, } from '@adea-ai/runtime-sdk';
|
|
2
2
|
import { PiLeadPublicationRequestSchema, PiLeadPublicationResponseSchema, PiChildPublicationRequestSchema, PiChildPublicationResponseSchema, ModelSelectionFundingRequestSchema, ModelSelectionFundingResponseSchema, ModelConnectionCreateRequestSchema, ModelConnectionListRequestSchema, ModelConnectionListResponseSchema, ModelConnectionResponseSchema, ModelConnectionRevokeRequestSchema, ModelDefaultsGetRequestSchema, ModelDefaultsResponseSchema, ModelDefaultsSetRequestSchema, ModelSelectionResolveRequestSchema, ModelSelectionResponseSchema, } from '@adea-ai/contracts';
|
|
3
|
-
import { CredentialCreateRequestSchema, CredentialGetRequestSchema, CredentialListRequestSchema, CredentialListResponseSchema, CredentialResponseSchema, CredentialRevokeRequestSchema, CredentialRotateRequestSchema, ExecutionCancellationCommandSchema, ExecutionCancellationCommandResultSchema, InteractionResponseCommandSchema, InteractionResponseCommandResultSchema, ContextPackageResolutionRequestSchema, ContextPackageResolutionResponseSchema, ExecutionAcceptanceRequestSchema, ExecutionAcceptanceResponseSchema, ExecutionRequestValidationRequestSchema, ExecutionRequestValidationResponseSchema, DecisionResolveRequestSchema, DecisionResolveResponseSchema, ProfileResolutionRequestSchema, ProfileResolutionResponseSchema, ProjectStateInitializationRequestSchema, ProjectStateInitializationResponseSchema, ProjectStateResolutionRequestSchema, ProjectStateResolutionResponseSchema, RuntimeListRequestSchema, RuntimeListResponseSchema, ServiceAuthenticationRequestSchema, ServiceAuthenticationResponseSchema, ExternalSessionGetRequestSchema, ExternalSessionGetResponseSchema, ExternalSessionListRequestSchema, ExternalSessionListResponseSchema, RuntimeConnectionGetRequestSchema, RuntimeConnectionGetResponseSchema, RuntimeConnectionListRequestSchema, RuntimeConnectionListResponseSchema, MarketplaceCatalogRequestSchema, MarketplaceCatalogResponseSchema, MarketplaceInstallPlanRequestSchema, MarketplaceInstallPlanResponseSchema, MarketplaceInstallRequestSchema, MarketplaceInstallResponseSchema, MarketplaceInstallationGetRequestSchema, MarketplaceInstallationGetResponseSchema, MarketplaceInstallationUninstallRequestSchema, MarketplaceInstallationUninstallResponseSchema, WorkspaceAgentProfileDeprecationRequestSchema, WorkspaceAgentProfileGetRequestSchema, WorkspaceAgentProfileGetResponseSchema, WorkspaceAgentProfileLifecycleResponseSchema, WorkspaceAgentProfileListRequestSchema, WorkspaceAgentProfileListResponseSchema, WorkspaceAgentProfilePublishRequestSchema, WorkspaceAgentProfilePublishResponseSchema, WorkspaceAgentProfileRevocationRequestSchema, WorkspaceSkillDeprecationRequestSchema, WorkspaceSkillGetRequestSchema, WorkspaceSkillGetResponseSchema, WorkspaceSkillLifecycleResponseSchema, WorkspaceSkillListRequestSchema, WorkspaceSkillListResponseSchema, WorkspaceSkillPublishRequestSchema, WorkspaceSkillPublishResponseSchema, WorkspaceSkillRevocationRequestSchema, DeviceSyncUploadRequestSchema, DeviceSyncUploadResponseSchema, DeviceSyncCommitRequestSchema, DeviceSyncCommitResponseSchema, DeviceSyncDownloadRequestSchema, DeviceSyncDownloadResponseSchema, DeviceSyncReleaseRequestSchema, DeviceSyncReleaseResponseSchema, DeviceSyncAppendRequestSchema, DeviceSyncAppendResponseSchema, DeviceSyncLogRequestSchema, DeviceSyncLogResponseSchema, DeviceSyncUsageRequestSchema, DeviceSyncUsageResponseSchema, } from '@adea-ai/contracts';
|
|
3
|
+
import { CredentialCreateRequestSchema, CredentialGetRequestSchema, CredentialListRequestSchema, CredentialListResponseSchema, CredentialResponseSchema, CredentialRevokeRequestSchema, CredentialRotateRequestSchema, ExecutionCancellationCommandSchema, ExecutionCancellationCommandResultSchema, InteractionResponseCommandSchema, InteractionResponseCommandResultSchema, ContextPackageResolutionRequestSchema, ContextPackageResolutionResponseSchema, ExecutionAcceptanceRequestSchema, ExecutionAcceptanceResponseSchema, ExecutionRequestValidationRequestSchema, ExecutionRequestValidationResponseSchema, DecisionResolveRequestSchema, DecisionResolveResponseSchema, ProfileResolutionRequestSchema, ProfileResolutionResponseSchema, ProjectStateInitializationRequestSchema, ProjectStateInitializationResponseSchema, ProjectStateResolutionRequestSchema, ProjectStateResolutionResponseSchema, RuntimeListRequestSchema, RuntimeListResponseSchema, ServiceAuthenticationRequestSchema, ServiceAuthenticationResponseSchema, ExternalSessionGetRequestSchema, ExternalSessionGetResponseSchema, ExternalSessionListRequestSchema, ExternalSessionListResponseSchema, RuntimeConnectionGetRequestSchema, RuntimeConnectionGetResponseSchema, RuntimeConnectionListRequestSchema, RuntimeConnectionListResponseSchema, MarketplaceCatalogRequestSchema, MarketplaceCatalogResponseSchema, MarketplaceInstallPlanRequestSchema, MarketplaceInstallPlanResponseSchema, MarketplaceInstallRequestSchema, MarketplaceInstallResponseSchema, MarketplaceInstallationGetRequestSchema, MarketplaceInstallationGetResponseSchema, MarketplaceInstallationListRequestSchema, MarketplaceInstallationListResponseSchema, MarketplaceInstallationUninstallRequestSchema, MarketplaceInstallationUninstallResponseSchema, WorkspaceAgentProfileDeprecationRequestSchema, WorkspaceAgentProfileGetRequestSchema, WorkspaceAgentProfileGetResponseSchema, WorkspaceAgentProfileLifecycleResponseSchema, WorkspaceAgentProfileListRequestSchema, WorkspaceAgentProfileListResponseSchema, WorkspaceAgentProfilePublishRequestSchema, WorkspaceAgentProfilePublishResponseSchema, WorkspaceAgentProfileRevocationRequestSchema, WorkspaceSkillDeprecationRequestSchema, WorkspaceSkillGetRequestSchema, WorkspaceSkillGetResponseSchema, WorkspaceSkillLifecycleResponseSchema, WorkspaceSkillListRequestSchema, WorkspaceSkillListResponseSchema, WorkspaceSkillPublishRequestSchema, WorkspaceSkillPublishResponseSchema, WorkspaceSkillRevocationRequestSchema, DeviceSyncUploadRequestSchema, DeviceSyncUploadResponseSchema, DeviceSyncCommitRequestSchema, DeviceSyncCommitResponseSchema, DeviceSyncDownloadRequestSchema, DeviceSyncDownloadResponseSchema, DeviceSyncReleaseRequestSchema, DeviceSyncReleaseResponseSchema, DeviceSyncAppendRequestSchema, DeviceSyncAppendResponseSchema, DeviceSyncLogRequestSchema, DeviceSyncLogResponseSchema, DeviceSyncUsageRequestSchema, DeviceSyncUsageResponseSchema, DeviceSyncCheckpointRequestSchema, DeviceSyncCheckpointResponseSchema, DeviceSyncRegisterCheckpointRequestSchema, DeviceSyncRegisterCheckpointResponseSchema, DeviceSyncAckRequestSchema, DeviceSyncAckResponseSchema, } from '@adea-ai/contracts';
|
|
4
4
|
export const ControlApiOperations = Object.freeze({
|
|
5
5
|
getPiDurableLeadPublication: {
|
|
6
6
|
operation: 'pi-durable.lead.publication.current',
|
|
@@ -298,6 +298,13 @@ export const ControlApiOperations = Object.freeze({
|
|
|
298
298
|
requestSchema: MarketplaceInstallPlanRequestSchema,
|
|
299
299
|
responseSchema: MarketplaceInstallPlanResponseSchema,
|
|
300
300
|
},
|
|
301
|
+
marketplaceInstallationList: {
|
|
302
|
+
operation: 'marketplace.installation.list',
|
|
303
|
+
method: 'POST',
|
|
304
|
+
path: '/v1/marketplace/installations/list',
|
|
305
|
+
requestSchema: MarketplaceInstallationListRequestSchema,
|
|
306
|
+
responseSchema: MarketplaceInstallationListResponseSchema,
|
|
307
|
+
},
|
|
301
308
|
marketplaceInstallationGet: {
|
|
302
309
|
operation: 'marketplace.installation.get',
|
|
303
310
|
method: 'POST',
|
|
@@ -413,6 +420,13 @@ export const ControlApiOperations = Object.freeze({
|
|
|
413
420
|
responseSchema: PiDurableLeadChildCancelResponseSchema,
|
|
414
421
|
responseStatus: 202,
|
|
415
422
|
},
|
|
423
|
+
messagePiDurableLeadChild: {
|
|
424
|
+
operation: 'pi-durable.lead.child-message',
|
|
425
|
+
method: 'POST',
|
|
426
|
+
path: '/v3/pi-durable/lead-dispatches/child-message',
|
|
427
|
+
requestSchema: PiDurableLeadChildMessageRequestSchema,
|
|
428
|
+
responseSchema: PiDurableLeadChildMessageResponseSchema,
|
|
429
|
+
},
|
|
416
430
|
uploadDeviceSyncObject: {
|
|
417
431
|
operation: 'device-sync.upload',
|
|
418
432
|
method: 'POST',
|
|
@@ -462,4 +476,25 @@ export const ControlApiOperations = Object.freeze({
|
|
|
462
476
|
requestSchema: DeviceSyncUsageRequestSchema,
|
|
463
477
|
responseSchema: DeviceSyncUsageResponseSchema,
|
|
464
478
|
},
|
|
479
|
+
readDeviceSyncCheckpoint: {
|
|
480
|
+
operation: 'device-sync.checkpoint',
|
|
481
|
+
method: 'POST',
|
|
482
|
+
path: '/v1/device-sync/log/checkpoint',
|
|
483
|
+
requestSchema: DeviceSyncCheckpointRequestSchema,
|
|
484
|
+
responseSchema: DeviceSyncCheckpointResponseSchema,
|
|
485
|
+
},
|
|
486
|
+
registerDeviceSyncCheckpoint: {
|
|
487
|
+
operation: 'device-sync.register-checkpoint',
|
|
488
|
+
method: 'POST',
|
|
489
|
+
path: '/v1/device-sync/log/checkpoint/register',
|
|
490
|
+
requestSchema: DeviceSyncRegisterCheckpointRequestSchema,
|
|
491
|
+
responseSchema: DeviceSyncRegisterCheckpointResponseSchema,
|
|
492
|
+
},
|
|
493
|
+
acknowledgeDeviceSyncLog: {
|
|
494
|
+
operation: 'device-sync.ack',
|
|
495
|
+
method: 'POST',
|
|
496
|
+
path: '/v1/device-sync/log/ack',
|
|
497
|
+
requestSchema: DeviceSyncAckRequestSchema,
|
|
498
|
+
responseSchema: DeviceSyncAckResponseSchema,
|
|
499
|
+
},
|
|
465
500
|
});
|