@agents24/node 0.1.0 → 0.2.1
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 +25 -3
- package/compatibility.json +10 -10
- package/dist/bff.cjs +466 -0
- package/dist/bff.cjs.map +1 -0
- package/dist/bff.d.cts +25 -0
- package/dist/bff.d.ts +25 -0
- package/dist/bff.js +464 -0
- package/dist/bff.js.map +1 -0
- package/dist/client-CnOaaCVH.d.cts +1018 -0
- package/dist/client-CnOaaCVH.d.ts +1018 -0
- package/dist/index.cjs +279 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -561
- package/dist/index.d.ts +4 -561
- package/dist/index.js +279 -55
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +52 -6
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +14 -2
- package/dist/server.d.ts +14 -2
- package/dist/server.js +50 -7
- package/dist/server.js.map +1 -1
- package/dist/types/agents.d.ts +5 -4
- package/dist/types/agents.d.ts.map +1 -1
- package/dist/types/bff.d.ts +22 -0
- package/dist/types/bff.d.ts.map +1 -0
- package/dist/types/builders.d.ts +2 -0
- package/dist/types/builders.d.ts.map +1 -1
- package/dist/types/client-runtime-admin.d.ts +3 -3
- package/dist/types/client-runtime-admin.d.ts.map +1 -1
- package/dist/types/client.d.ts +8 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/embed.d.ts +6 -4
- package/dist/types/embed.d.ts.map +1 -1
- package/dist/types/errors.d.ts +10 -2
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/generated/instructions.d.ts +8 -0
- package/dist/types/generated/instructions.d.ts.map +1 -0
- package/dist/types/generated/manifest.d.ts +1 -1
- package/dist/types/generated/manifest.d.ts.map +1 -1
- package/dist/types/generated/resourceBundles.d.ts +12 -0
- package/dist/types/generated/resourceBundles.d.ts.map +1 -0
- package/dist/types/generated/resourcePackages.d.ts +10 -0
- package/dist/types/generated/resourcePackages.d.ts.map +1 -0
- package/dist/types/generated/resourcePolicies.d.ts +14 -0
- package/dist/types/generated/resourcePolicies.d.ts.map +1 -0
- package/dist/types/http.d.ts +0 -2
- package/dist/types/http.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/runs.d.ts +4 -2
- package/dist/types/runs.d.ts.map +1 -1
- package/dist/types/server.d.ts +13 -1
- package/dist/types/server.d.ts.map +1 -1
- package/dist/types/types.d.ts +466 -61
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +8 -2
package/dist/index.js
CHANGED
|
@@ -8,16 +8,37 @@ export { CONTRACT_HASH, RUNTIME_PROTOCOL_VERSION, THREAD_SUMMARY_PROTOCOL_VERSIO
|
|
|
8
8
|
var Agents24SDKError = class extends Error {
|
|
9
9
|
kind;
|
|
10
10
|
status;
|
|
11
|
-
|
|
11
|
+
failure;
|
|
12
12
|
responseHeaders;
|
|
13
13
|
constructor(message, options) {
|
|
14
14
|
super(message, { cause: options.cause });
|
|
15
15
|
this.name = "Agents24SDKError";
|
|
16
16
|
this.kind = options.kind;
|
|
17
17
|
this.status = options.status;
|
|
18
|
-
this.
|
|
18
|
+
this.failure = options.failure;
|
|
19
19
|
this.responseHeaders = options.responseHeaders;
|
|
20
20
|
}
|
|
21
|
+
get code() {
|
|
22
|
+
return this.failure?.code;
|
|
23
|
+
}
|
|
24
|
+
get category() {
|
|
25
|
+
return this.failure?.category;
|
|
26
|
+
}
|
|
27
|
+
get failureId() {
|
|
28
|
+
return this.failure?.failure_id;
|
|
29
|
+
}
|
|
30
|
+
get requestId() {
|
|
31
|
+
return this.failure?.request_id ?? void 0;
|
|
32
|
+
}
|
|
33
|
+
get retryable() {
|
|
34
|
+
return this.failure?.retryable ?? false;
|
|
35
|
+
}
|
|
36
|
+
get retryAfterMs() {
|
|
37
|
+
return this.failure?.retry_after_ms ?? void 0;
|
|
38
|
+
}
|
|
39
|
+
get details() {
|
|
40
|
+
return this.failure?.details ?? {};
|
|
41
|
+
}
|
|
21
42
|
};
|
|
22
43
|
|
|
23
44
|
// src/http.ts
|
|
@@ -43,17 +64,10 @@ async function errorDetails(response) {
|
|
|
43
64
|
return text;
|
|
44
65
|
}
|
|
45
66
|
}
|
|
46
|
-
function
|
|
47
|
-
if (typeof
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (typeof detail === "string" && detail.trim()) return detail.trim();
|
|
51
|
-
if (detail && typeof detail === "object" && !Array.isArray(detail)) {
|
|
52
|
-
const message2 = detail.message;
|
|
53
|
-
if (typeof message2 === "string" && message2.trim()) return message2.trim();
|
|
54
|
-
}
|
|
55
|
-
const message = details.message;
|
|
56
|
-
return typeof message === "string" && message.trim() ? message.trim() : void 0;
|
|
67
|
+
function failureView(value) {
|
|
68
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
69
|
+
const candidate = value;
|
|
70
|
+
return candidate.schema_version === "agents24.failure.v1" && typeof candidate.failure_id === "string" && typeof candidate.code === "string" && typeof candidate.category === "string" && typeof candidate.message === "string" && typeof candidate.retryable === "boolean" && candidate.details !== null && typeof candidate.details === "object" && !Array.isArray(candidate.details) ? candidate : void 0;
|
|
57
71
|
}
|
|
58
72
|
function responseHeaders(response) {
|
|
59
73
|
const headers = {};
|
|
@@ -65,19 +79,17 @@ function responseHeaders(response) {
|
|
|
65
79
|
}
|
|
66
80
|
async function assertOk(response) {
|
|
67
81
|
if (response.ok) return;
|
|
68
|
-
const
|
|
69
|
-
throw new Agents24SDKError(
|
|
82
|
+
const failure = failureView(await errorDetails(response));
|
|
83
|
+
throw new Agents24SDKError(failure?.message || "Agents24 request failed.", {
|
|
70
84
|
kind: "http",
|
|
71
85
|
status: response.status,
|
|
72
|
-
|
|
86
|
+
failure,
|
|
73
87
|
responseHeaders: responseHeaders(response)
|
|
74
88
|
});
|
|
75
89
|
}
|
|
76
90
|
var Agents24HttpClient = class {
|
|
77
91
|
base;
|
|
78
92
|
apiKey;
|
|
79
|
-
organizationId;
|
|
80
|
-
projectId;
|
|
81
93
|
fetchImpl;
|
|
82
94
|
constructor(options) {
|
|
83
95
|
if (typeof process === "undefined" || process.release?.name !== "node") {
|
|
@@ -85,8 +97,6 @@ var Agents24HttpClient = class {
|
|
|
85
97
|
}
|
|
86
98
|
this.base = normalizeBaseUrl(options.baseUrl);
|
|
87
99
|
this.apiKey = required(options.apiKey, "apiKey");
|
|
88
|
-
this.organizationId = required(options.organizationId, "organizationId");
|
|
89
|
-
this.projectId = required(options.projectId, "projectId");
|
|
90
100
|
if (typeof options.fetchImpl !== "function" && typeof fetch !== "function") {
|
|
91
101
|
throw new Agents24SDKError("No fetch implementation is available. Use Node 22 or 24.", { kind: "protocol" });
|
|
92
102
|
}
|
|
@@ -111,8 +121,6 @@ var Agents24HttpClient = class {
|
|
|
111
121
|
Authorization: `Bearer ${this.apiKey}`,
|
|
112
122
|
Accept: "application/json",
|
|
113
123
|
"Content-Type": "application/json",
|
|
114
|
-
"X-Organization-ID": this.organizationId,
|
|
115
|
-
"X-Project-ID": this.projectId,
|
|
116
124
|
"X-SDK-Contract": "1",
|
|
117
125
|
...mutation ? { "Idempotency-Key": options?.idempotencyKey || randomUUID() } : {},
|
|
118
126
|
...options?.requestMetadata ? { "X-Request-Metadata": JSON.stringify(options.requestMetadata) } : {},
|
|
@@ -126,8 +134,6 @@ var Agents24HttpClient = class {
|
|
|
126
134
|
return {
|
|
127
135
|
Authorization: `Bearer ${this.apiKey}`,
|
|
128
136
|
Accept: "application/json",
|
|
129
|
-
"X-Organization-ID": this.organizationId,
|
|
130
|
-
"X-Project-ID": this.projectId,
|
|
131
137
|
"X-SDK-Contract": "1",
|
|
132
138
|
...mutation ? { "Idempotency-Key": options?.idempotencyKey || randomUUID() } : {},
|
|
133
139
|
...extra || {}
|
|
@@ -252,6 +258,7 @@ var AgentsNamespace = class {
|
|
|
252
258
|
async uploadAttachments(agentId, options) {
|
|
253
259
|
const form = new FormData();
|
|
254
260
|
if (options.threadId) form.set("thread_id", options.threadId);
|
|
261
|
+
if (options.agentVersionId) form.set("agent_version_id", options.agentVersionId);
|
|
255
262
|
for (const file of options.files) form.append("files", file, file.name);
|
|
256
263
|
const response = await this.http.fetchOrThrow(this.http.url(`/agents/${agentId}/attachments/upload`), {
|
|
257
264
|
method: "POST",
|
|
@@ -261,6 +268,12 @@ var AgentsNamespace = class {
|
|
|
261
268
|
await assertOk(response);
|
|
262
269
|
return await response.json();
|
|
263
270
|
}
|
|
271
|
+
createAttachmentContentAccess(agentId, attachmentId, request, options) {
|
|
272
|
+
return this.http.requestJson(
|
|
273
|
+
`/agents/${agentId}/attachments/${attachmentId}/content-access`,
|
|
274
|
+
{ method: "POST", body: request, options, mutation: true }
|
|
275
|
+
);
|
|
276
|
+
}
|
|
264
277
|
};
|
|
265
278
|
|
|
266
279
|
// src/builders.ts
|
|
@@ -279,12 +292,15 @@ function toolsetAttachments(options) {
|
|
|
279
292
|
const id = refId(attachment.toolset);
|
|
280
293
|
if (!id || seen.has(id)) return [];
|
|
281
294
|
seen.add(id);
|
|
282
|
-
const
|
|
283
|
-
return [{
|
|
295
|
+
const normalized = {
|
|
284
296
|
toolset_id: id,
|
|
285
|
-
loading_mode: attachment.loadingMode || "static"
|
|
286
|
-
|
|
287
|
-
|
|
297
|
+
loading_mode: attachment.loadingMode || "static"
|
|
298
|
+
};
|
|
299
|
+
const policy = attachment.versionPolicy;
|
|
300
|
+
if (policy) {
|
|
301
|
+
normalized.version_policy = policy.mode === "pinned" ? { mode: "pinned", version_id: policy.versionId } : { mode: "latest_published" };
|
|
302
|
+
}
|
|
303
|
+
return [normalized];
|
|
288
304
|
});
|
|
289
305
|
}
|
|
290
306
|
var AgentDefinitionBuilder = class {
|
|
@@ -362,9 +378,10 @@ var GraphBuilder = class {
|
|
|
362
378
|
id: options.id || `${sourceId}-${targetId}`,
|
|
363
379
|
source: sourceId,
|
|
364
380
|
target: targetId,
|
|
365
|
-
type: "control",
|
|
381
|
+
type: options.type || "control",
|
|
366
382
|
source_handle: options.sourceHandle,
|
|
367
|
-
target_handle: options.targetHandle
|
|
383
|
+
target_handle: options.targetHandle,
|
|
384
|
+
condition: options.condition
|
|
368
385
|
});
|
|
369
386
|
return this;
|
|
370
387
|
}
|
|
@@ -394,6 +411,15 @@ var ClientDeploymentsNamespace = class {
|
|
|
394
411
|
mutation: true
|
|
395
412
|
});
|
|
396
413
|
}
|
|
414
|
+
list(query) {
|
|
415
|
+
const params = new URLSearchParams({ agent_id: query.agentId });
|
|
416
|
+
if (query.lifecycleStatus) params.set("lifecycle_status", query.lifecycleStatus);
|
|
417
|
+
if (query.cursor) params.set("cursor", query.cursor);
|
|
418
|
+
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
419
|
+
return this.http.requestJson(
|
|
420
|
+
`/client-runtime/deployments?${params.toString()}`
|
|
421
|
+
);
|
|
422
|
+
}
|
|
397
423
|
get(deploymentId) {
|
|
398
424
|
return this.http.requestJson(`/client-runtime/deployments/${deploymentId}`);
|
|
399
425
|
}
|
|
@@ -405,15 +431,7 @@ var ClientDeploymentsNamespace = class {
|
|
|
405
431
|
mutation: true
|
|
406
432
|
});
|
|
407
433
|
}
|
|
408
|
-
|
|
409
|
-
return this.http.requestJson(`/client-runtime/deployments/${deploymentId}/promote`, {
|
|
410
|
-
method: "POST",
|
|
411
|
-
body: request,
|
|
412
|
-
options,
|
|
413
|
-
mutation: true
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
revoke(deploymentId, options) {
|
|
434
|
+
delete(deploymentId, options) {
|
|
417
435
|
return this.http.requestJson(`/client-runtime/deployments/${deploymentId}`, {
|
|
418
436
|
method: "DELETE",
|
|
419
437
|
options,
|
|
@@ -473,8 +491,10 @@ var EmbedNamespace = class {
|
|
|
473
491
|
startAgentRunMcpAuth(agentId, runId, serverId, payload, options) {
|
|
474
492
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/mcp/servers/${serverId}/auth/start`, { method: "POST", body: payload, options, mutation: true });
|
|
475
493
|
}
|
|
476
|
-
getRuntimeBootstrap(agentId) {
|
|
477
|
-
return this.http.requestJson(`/public/embed/agents/${agentId}/runtime/bootstrap
|
|
494
|
+
getRuntimeBootstrap(agentId, agentVersionId) {
|
|
495
|
+
return this.http.requestJson(`/public/embed/agents/${agentId}/runtime/bootstrap`, {
|
|
496
|
+
query: { agent_version_id: agentVersionId }
|
|
497
|
+
});
|
|
478
498
|
}
|
|
479
499
|
listAgentThreads(agentId, options) {
|
|
480
500
|
return this.http.requestJson(`/public/embed/agents/${agentId}/threads`, { query: {
|
|
@@ -512,18 +532,17 @@ var EmbedNamespace = class {
|
|
|
512
532
|
external_session_id: options.externalSessionId,
|
|
513
533
|
before_turn_index: options.beforeTurnIndex,
|
|
514
534
|
limit: options.limit,
|
|
515
|
-
include_run_events: options.includeRunEvents,
|
|
516
535
|
include_subthreads: options.includeSubthreads,
|
|
517
536
|
subthread_depth: options.subthreadDepth,
|
|
518
537
|
subthread_turn_limit: options.subthreadTurnLimit,
|
|
519
538
|
subthread_child_limit: options.subthreadChildLimit
|
|
520
539
|
} });
|
|
521
540
|
}
|
|
522
|
-
deleteAgentThread(agentId, threadId, options) {
|
|
541
|
+
deleteAgentThread(agentId, threadId, options, requestOptions) {
|
|
523
542
|
return this.http.requestJson(`/public/embed/agents/${agentId}/threads/${threadId}`, { method: "DELETE", query: {
|
|
524
543
|
external_user_id: options.externalUserId,
|
|
525
544
|
external_session_id: options.externalSessionId
|
|
526
|
-
}, mutation: true });
|
|
545
|
+
}, options: requestOptions, mutation: true });
|
|
527
546
|
}
|
|
528
547
|
getAgentRunContext(agentId, runId, options) {
|
|
529
548
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/context`, { query: {
|
|
@@ -531,11 +550,17 @@ var EmbedNamespace = class {
|
|
|
531
550
|
external_session_id: options.externalSessionId
|
|
532
551
|
} });
|
|
533
552
|
}
|
|
534
|
-
cancelAgentRun(agentId, runId, options) {
|
|
553
|
+
cancelAgentRun(agentId, runId, options, requestOptions) {
|
|
535
554
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/cancel`, { method: "POST", query: {
|
|
536
555
|
external_user_id: options.externalUserId,
|
|
537
556
|
external_session_id: options.externalSessionId
|
|
538
|
-
}, body: {}, mutation: true });
|
|
557
|
+
}, body: {}, options: requestOptions, mutation: true });
|
|
558
|
+
}
|
|
559
|
+
setAgentRunFeedback(agentId, runId, payload) {
|
|
560
|
+
return this.http.requestJson(
|
|
561
|
+
`/public/embed/agents/${agentId}/runs/${runId}/feedback`,
|
|
562
|
+
{ method: "PUT", body: payload, mutation: true }
|
|
563
|
+
);
|
|
539
564
|
}
|
|
540
565
|
async uploadAgentAttachments(agentId, options) {
|
|
541
566
|
const form = new FormData();
|
|
@@ -551,6 +576,105 @@ var EmbedNamespace = class {
|
|
|
551
576
|
await assertOk(response);
|
|
552
577
|
return await response.json();
|
|
553
578
|
}
|
|
579
|
+
createAttachmentContentAccess(agentId, attachmentId, request, options) {
|
|
580
|
+
return this.http.requestJson(
|
|
581
|
+
`/public/embed/agents/${agentId}/attachments/${attachmentId}/content-access`,
|
|
582
|
+
{ method: "POST", body: request, options, mutation: true }
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
// src/generated/resourceBundles.ts
|
|
588
|
+
var ResourceBundlesNamespace = class {
|
|
589
|
+
constructor(http) {
|
|
590
|
+
this.http = http;
|
|
591
|
+
}
|
|
592
|
+
http;
|
|
593
|
+
exportPlan(request) {
|
|
594
|
+
return this.http.requestJson("/resource-bundles/export/plan", {
|
|
595
|
+
method: "POST",
|
|
596
|
+
body: request
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
exportBundle(request) {
|
|
600
|
+
return this.http.requestJson("/resource-bundles/export", {
|
|
601
|
+
method: "POST",
|
|
602
|
+
body: request
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
candidates(options) {
|
|
606
|
+
return this.http.requestJson("/resource-bundles/candidates", {
|
|
607
|
+
query: {
|
|
608
|
+
kind: options.kind,
|
|
609
|
+
q: options.query,
|
|
610
|
+
limit: options.limit,
|
|
611
|
+
offset: options.offset,
|
|
612
|
+
required_capability: options.requiredCapability
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
importPreview(request) {
|
|
617
|
+
return this.http.requestJson("/resource-bundles/import/preview", {
|
|
618
|
+
method: "POST",
|
|
619
|
+
body: request
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
importBundle(request, options) {
|
|
623
|
+
return this.http.requestJson("/resource-bundles/import", {
|
|
624
|
+
method: "POST",
|
|
625
|
+
body: request,
|
|
626
|
+
options,
|
|
627
|
+
mutation: true
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
// src/generated/resourcePackages.ts
|
|
633
|
+
var ResourcePackagesNamespace = class {
|
|
634
|
+
constructor(http) {
|
|
635
|
+
this.http = http;
|
|
636
|
+
}
|
|
637
|
+
http;
|
|
638
|
+
async exportPackage(request) {
|
|
639
|
+
const response = await this.http.fetchOrThrow(
|
|
640
|
+
this.http.url("/resource-packages/export"),
|
|
641
|
+
{ method: "POST", headers: this.http.jsonHeaders(), body: JSON.stringify(request) },
|
|
642
|
+
"Failed to export the Agents24 resource package."
|
|
643
|
+
);
|
|
644
|
+
await assertOk(response);
|
|
645
|
+
const disposition = response.headers.get("content-disposition") || "";
|
|
646
|
+
const candidate = /filename="?([^";]+)"?/i.exec(disposition)?.[1] || "";
|
|
647
|
+
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
648
|
+
return { data: new Uint8Array(await response.arrayBuffer()), filename };
|
|
649
|
+
}
|
|
650
|
+
async validatePackage(upload) {
|
|
651
|
+
const formData = new FormData();
|
|
652
|
+
const archiveBytes = upload.data.slice().buffer;
|
|
653
|
+
const candidate = upload.filename || "";
|
|
654
|
+
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
655
|
+
formData.append("file", new Blob([archiveBytes]), filename);
|
|
656
|
+
const response = await this.http.fetchOrThrow(
|
|
657
|
+
this.http.url("/resource-packages/validate"),
|
|
658
|
+
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
659
|
+
"Failed to upload the Agents24 resource package."
|
|
660
|
+
);
|
|
661
|
+
await assertOk(response);
|
|
662
|
+
return await response.json();
|
|
663
|
+
}
|
|
664
|
+
async compilePackage(upload) {
|
|
665
|
+
const formData = new FormData();
|
|
666
|
+
const archiveBytes = upload.data.slice().buffer;
|
|
667
|
+
const candidate = upload.filename || "";
|
|
668
|
+
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
669
|
+
formData.append("file", new Blob([archiveBytes]), filename);
|
|
670
|
+
const response = await this.http.fetchOrThrow(
|
|
671
|
+
this.http.url("/resource-packages/compile"),
|
|
672
|
+
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
673
|
+
"Failed to upload the Agents24 resource package."
|
|
674
|
+
);
|
|
675
|
+
await assertOk(response);
|
|
676
|
+
return await response.json();
|
|
677
|
+
}
|
|
554
678
|
};
|
|
555
679
|
|
|
556
680
|
// src/runs.ts
|
|
@@ -571,12 +695,81 @@ var RunsNamespace = class {
|
|
|
571
695
|
getContext(runId) {
|
|
572
696
|
return this.http.requestJson(`/agents/runs/${runId}/context`);
|
|
573
697
|
}
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
698
|
+
getTrace(runId, options = {}) {
|
|
699
|
+
return this.http.requestJson(`/agents/runs/${runId}/trace`, {
|
|
700
|
+
query: { include_diagnostics: options.includeDiagnostics }
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
// src/generated/instructions.ts
|
|
706
|
+
var InstructionsNamespace = class {
|
|
707
|
+
constructor(http) {
|
|
708
|
+
this.http = http;
|
|
709
|
+
}
|
|
710
|
+
http;
|
|
711
|
+
publish(instructionId, options) {
|
|
712
|
+
return this.http.requestJson(`/prompts/${instructionId}/publish`, {
|
|
713
|
+
method: "POST",
|
|
714
|
+
body: {},
|
|
715
|
+
options,
|
|
716
|
+
mutation: true
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
// src/generated/resourcePolicies.ts
|
|
722
|
+
var ResourcePoliciesNamespace = class {
|
|
723
|
+
constructor(http) {
|
|
724
|
+
this.http = http;
|
|
725
|
+
}
|
|
726
|
+
http;
|
|
727
|
+
list() {
|
|
728
|
+
return this.http.requestJson("/admin/security/resource-policies/sets");
|
|
729
|
+
}
|
|
730
|
+
setCustomerAssignment(request, options) {
|
|
731
|
+
return this.http.requestJson("/admin/security/resource-policies/customer-assignments/set", {
|
|
732
|
+
method: "POST",
|
|
733
|
+
body: request,
|
|
734
|
+
options,
|
|
735
|
+
mutation: true
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
getCustomerAssignment(request) {
|
|
739
|
+
return this.http.requestJson("/admin/security/resource-policies/customer-assignments/get", {
|
|
740
|
+
method: "POST",
|
|
741
|
+
body: request
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
clearCustomerAssignment(request, options) {
|
|
745
|
+
return this.http.requestJson("/admin/security/resource-policies/customer-assignments/clear", {
|
|
746
|
+
method: "POST",
|
|
747
|
+
body: request,
|
|
748
|
+
options,
|
|
749
|
+
mutation: true
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
getEffectiveCustomerPolicy(request) {
|
|
753
|
+
return this.http.requestJson("/admin/security/resource-policies/customers/effective", {
|
|
754
|
+
method: "POST",
|
|
755
|
+
body: request
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
setQuotaSchedule(request, options) {
|
|
759
|
+
return this.http.requestJson("/admin/security/resource-policies/quota-schedules/set", {
|
|
760
|
+
method: "POST",
|
|
761
|
+
body: request,
|
|
762
|
+
options,
|
|
763
|
+
mutation: true
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
resetQuotaNow(request, options) {
|
|
767
|
+
return this.http.requestJson("/admin/security/resource-policies/quota-schedules/reset-now", {
|
|
768
|
+
method: "POST",
|
|
769
|
+
body: request,
|
|
770
|
+
options,
|
|
771
|
+
mutation: true
|
|
772
|
+
});
|
|
580
773
|
}
|
|
581
774
|
};
|
|
582
775
|
|
|
@@ -585,15 +778,23 @@ var Agents24 = class {
|
|
|
585
778
|
agents;
|
|
586
779
|
embed;
|
|
587
780
|
runs;
|
|
781
|
+
resourceBundles;
|
|
782
|
+
resourcePackages;
|
|
588
783
|
clientDeployments;
|
|
589
784
|
clientSessions;
|
|
785
|
+
instructions;
|
|
786
|
+
resourcePolicies;
|
|
590
787
|
constructor(options) {
|
|
591
788
|
const http = new Agents24HttpClient(options);
|
|
592
789
|
this.agents = new AgentsNamespace(http);
|
|
593
790
|
this.embed = new EmbedNamespace(http);
|
|
594
791
|
this.runs = new RunsNamespace(http);
|
|
792
|
+
this.resourceBundles = new ResourceBundlesNamespace(http);
|
|
793
|
+
this.resourcePackages = new ResourcePackagesNamespace(http);
|
|
595
794
|
this.clientDeployments = new ClientDeploymentsNamespace(http);
|
|
596
795
|
this.clientSessions = new ClientSessionsNamespace(http);
|
|
796
|
+
this.instructions = new InstructionsNamespace(http);
|
|
797
|
+
this.resourcePolicies = new ResourcePoliciesNamespace(http);
|
|
597
798
|
}
|
|
598
799
|
agent(options) {
|
|
599
800
|
return new AgentDefinitionBuilder(this.agents, options);
|
|
@@ -608,6 +809,7 @@ var SDK_OPERATION_IDS = [
|
|
|
608
809
|
"agents.cancel_run",
|
|
609
810
|
"agents.catalog",
|
|
610
811
|
"agents.create",
|
|
812
|
+
"agents.create_attachment_content_access",
|
|
611
813
|
"agents.delete",
|
|
612
814
|
"agents.get",
|
|
613
815
|
"agents.list",
|
|
@@ -620,20 +822,23 @@ var SDK_OPERATION_IDS = [
|
|
|
620
822
|
"agents.update_graph",
|
|
621
823
|
"agents.upload_attachments",
|
|
622
824
|
"agents.validate",
|
|
825
|
+
"client.attachments.create_content_access",
|
|
623
826
|
"client.attachments.upload",
|
|
624
827
|
"client.bootstrap",
|
|
625
828
|
"client.chat.stream",
|
|
626
829
|
"client.deployments.create",
|
|
830
|
+
"client.deployments.delete",
|
|
627
831
|
"client.deployments.get",
|
|
628
|
-
"client.deployments.
|
|
629
|
-
"client.deployments.revoke",
|
|
832
|
+
"client.deployments.list",
|
|
630
833
|
"client.deployments.update",
|
|
631
834
|
"client.hitl.resume",
|
|
632
835
|
"client.jwks",
|
|
633
836
|
"client.mcp.redeem",
|
|
634
837
|
"client.mcp.start",
|
|
838
|
+
"client.resource_policy",
|
|
635
839
|
"client.runs.attach",
|
|
636
840
|
"client.runs.cancel",
|
|
841
|
+
"client.runs.set_feedback",
|
|
637
842
|
"client.sessions.anonymous",
|
|
638
843
|
"client.sessions.backendExchange",
|
|
639
844
|
"client.sessions.refresh",
|
|
@@ -644,6 +849,7 @@ var SDK_OPERATION_IDS = [
|
|
|
644
849
|
"client.threads.list",
|
|
645
850
|
"embed.attach_agent_run",
|
|
646
851
|
"embed.cancel_agent_run",
|
|
852
|
+
"embed.create_attachment_content_access",
|
|
647
853
|
"embed.delete_agent_thread",
|
|
648
854
|
"embed.get_agent_run_context",
|
|
649
855
|
"embed.get_agent_thread",
|
|
@@ -651,14 +857,32 @@ var SDK_OPERATION_IDS = [
|
|
|
651
857
|
"embed.list_agent_threads",
|
|
652
858
|
"embed.list_agent_threads_multi",
|
|
653
859
|
"embed.resume_agent_run",
|
|
860
|
+
"embed.set_agent_run_feedback",
|
|
654
861
|
"embed.start_agent_run_mcp_auth",
|
|
655
862
|
"embed.stream_agent",
|
|
656
863
|
"embed.stream_agent_thread_events",
|
|
657
864
|
"embed.stream_agent_thread_events_multi",
|
|
658
865
|
"embed.upload_agent_attachments",
|
|
866
|
+
"instructions.publish",
|
|
867
|
+
"resource_bundles.candidates",
|
|
868
|
+
"resource_bundles.export",
|
|
869
|
+
"resource_bundles.export_plan",
|
|
870
|
+
"resource_bundles.import",
|
|
871
|
+
"resource_bundles.import_preview",
|
|
872
|
+
"resource_packages.compile",
|
|
873
|
+
"resource_packages.export",
|
|
874
|
+
"resource_packages.validate",
|
|
875
|
+
"resource_policies.clear_customer_assignment",
|
|
876
|
+
"resource_policies.get_customer_assignment",
|
|
877
|
+
"resource_policies.get_effective_customer_policy",
|
|
878
|
+
"resource_policies.list",
|
|
879
|
+
"resource_policies.reset_quota_now",
|
|
880
|
+
"resource_policies.set_customer_assignment",
|
|
881
|
+
"resource_policies.set_quota_schedule",
|
|
659
882
|
"runs.get",
|
|
660
883
|
"runs.get_context",
|
|
661
884
|
"runs.get_events",
|
|
885
|
+
"runs.get_trace",
|
|
662
886
|
"runs.get_tree"
|
|
663
887
|
];
|
|
664
888
|
|