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