@agents24/node 0.2.1 → 0.4.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 +3 -3
- package/compatibility.json +7 -7
- package/dist/bff.cjs +25 -15
- package/dist/bff.cjs.map +1 -1
- package/dist/bff.d.cts +4 -4
- package/dist/bff.d.ts +4 -4
- package/dist/bff.js +25 -15
- package/dist/bff.js.map +1 -1
- package/dist/{client-CnOaaCVH.d.cts → client-C5ui84wi.d.cts} +173 -5
- package/dist/{client-CnOaaCVH.d.ts → client-C5ui84wi.d.ts} +173 -5
- package/dist/index.cjs +150 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +150 -10
- package/dist/index.js.map +1 -1
- package/dist/types/bff.d.ts +3 -3
- package/dist/types/bff.d.ts.map +1 -1
- package/dist/types/client.d.ts +2 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/embed.d.ts +3 -2
- package/dist/types/embed.d.ts.map +1 -1
- package/dist/types/generated/manifest.d.ts +1 -1
- package/dist/types/generated/manifest.d.ts.map +1 -1
- package/dist/types/generated/resourceInstallations.d.ts +21 -0
- package/dist/types/generated/resourceInstallations.d.ts.map +1 -0
- package/dist/types/types.d.ts +150 -3
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -491,9 +491,15 @@ var EmbedNamespace = class {
|
|
|
491
491
|
startAgentRunMcpAuth(agentId, runId, serverId, payload, options) {
|
|
492
492
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/mcp/servers/${serverId}/auth/start`, { method: "POST", body: payload, options, mutation: true });
|
|
493
493
|
}
|
|
494
|
-
getRuntimeBootstrap(agentId, agentVersionId) {
|
|
494
|
+
getRuntimeBootstrap(agentId, agentVersionId, runtimeTarget = "published") {
|
|
495
495
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runtime/bootstrap`, {
|
|
496
|
-
query: { agent_version_id: agentVersionId }
|
|
496
|
+
query: { agent_version_id: agentVersionId, runtime_target: runtimeTarget }
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
getResourcePolicy(agentId, request) {
|
|
500
|
+
return this.http.requestJson(`/public/embed/agents/${agentId}/resource-policy`, {
|
|
501
|
+
method: "POST",
|
|
502
|
+
body: request
|
|
497
503
|
});
|
|
498
504
|
}
|
|
499
505
|
listAgentThreads(agentId, options) {
|
|
@@ -501,7 +507,8 @@ var EmbedNamespace = class {
|
|
|
501
507
|
external_user_id: options.externalUserId,
|
|
502
508
|
external_session_id: options.externalSessionId,
|
|
503
509
|
skip: options.skip ?? 0,
|
|
504
|
-
limit: options.limit ?? 20
|
|
510
|
+
limit: options.limit ?? 20,
|
|
511
|
+
runtime_target: options.runtimeTarget
|
|
505
512
|
} });
|
|
506
513
|
}
|
|
507
514
|
listAgentThreadsMulti(options) {
|
|
@@ -511,7 +518,8 @@ var EmbedNamespace = class {
|
|
|
511
518
|
const response = await this.http.fetchOrThrow(this.http.url(`/public/embed/agents/${agentId}/threads/events`, {
|
|
512
519
|
external_user_id: options.externalUserId,
|
|
513
520
|
external_session_id: options.externalSessionId,
|
|
514
|
-
cursor: options.cursor
|
|
521
|
+
cursor: options.cursor,
|
|
522
|
+
runtime_target: options.runtimeTarget
|
|
515
523
|
}), { method: "GET", headers: this.http.streamHeaders(), signal: options.signal }, "Failed to connect to the embedded-agent thread event endpoint.");
|
|
516
524
|
await assertOk(response);
|
|
517
525
|
await consumeThreadSummaryEventStream(response, onEvent, options.signal);
|
|
@@ -535,25 +543,29 @@ var EmbedNamespace = class {
|
|
|
535
543
|
include_subthreads: options.includeSubthreads,
|
|
536
544
|
subthread_depth: options.subthreadDepth,
|
|
537
545
|
subthread_turn_limit: options.subthreadTurnLimit,
|
|
538
|
-
subthread_child_limit: options.subthreadChildLimit
|
|
546
|
+
subthread_child_limit: options.subthreadChildLimit,
|
|
547
|
+
runtime_target: options.runtimeTarget
|
|
539
548
|
} });
|
|
540
549
|
}
|
|
541
550
|
deleteAgentThread(agentId, threadId, options, requestOptions) {
|
|
542
551
|
return this.http.requestJson(`/public/embed/agents/${agentId}/threads/${threadId}`, { method: "DELETE", query: {
|
|
543
552
|
external_user_id: options.externalUserId,
|
|
544
|
-
external_session_id: options.externalSessionId
|
|
553
|
+
external_session_id: options.externalSessionId,
|
|
554
|
+
runtime_target: options.runtimeTarget
|
|
545
555
|
}, options: requestOptions, mutation: true });
|
|
546
556
|
}
|
|
547
557
|
getAgentRunContext(agentId, runId, options) {
|
|
548
558
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/context`, { query: {
|
|
549
559
|
external_user_id: options.externalUserId,
|
|
550
|
-
external_session_id: options.externalSessionId
|
|
560
|
+
external_session_id: options.externalSessionId,
|
|
561
|
+
runtime_target: options.runtimeTarget
|
|
551
562
|
} });
|
|
552
563
|
}
|
|
553
564
|
cancelAgentRun(agentId, runId, options, requestOptions) {
|
|
554
565
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/cancel`, { method: "POST", query: {
|
|
555
566
|
external_user_id: options.externalUserId,
|
|
556
|
-
external_session_id: options.externalSessionId
|
|
567
|
+
external_session_id: options.externalSessionId,
|
|
568
|
+
runtime_target: options.runtimeTarget
|
|
557
569
|
}, body: {}, options: requestOptions, mutation: true });
|
|
558
570
|
}
|
|
559
571
|
setAgentRunFeedback(agentId, runId, payload) {
|
|
@@ -567,6 +579,7 @@ var EmbedNamespace = class {
|
|
|
567
579
|
form.set("external_user_id", options.externalUserId);
|
|
568
580
|
if (options.externalSessionId) form.set("external_session_id", options.externalSessionId);
|
|
569
581
|
if (options.threadId) form.set("thread_id", options.threadId);
|
|
582
|
+
if (options.runtimeTarget) form.set("runtime_target", options.runtimeTarget);
|
|
570
583
|
for (const file of options.files) form.append("files", file, file.name);
|
|
571
584
|
const response = await this.http.fetchOrThrow(this.http.url(`/public/embed/agents/${agentId}/attachments/upload`), {
|
|
572
585
|
method: "POST",
|
|
@@ -654,7 +667,7 @@ var ResourcePackagesNamespace = class {
|
|
|
654
667
|
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
655
668
|
formData.append("file", new Blob([archiveBytes]), filename);
|
|
656
669
|
const response = await this.http.fetchOrThrow(
|
|
657
|
-
this.http.url("/resource-packages/validate"),
|
|
670
|
+
this.http.url("/resource-packages/validate", void 0),
|
|
658
671
|
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
659
672
|
"Failed to upload the Agents24 resource package."
|
|
660
673
|
);
|
|
@@ -668,7 +681,7 @@ var ResourcePackagesNamespace = class {
|
|
|
668
681
|
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
669
682
|
formData.append("file", new Blob([archiveBytes]), filename);
|
|
670
683
|
const response = await this.http.fetchOrThrow(
|
|
671
|
-
this.http.url("/resource-packages/compile"),
|
|
684
|
+
this.http.url("/resource-packages/compile", void 0),
|
|
672
685
|
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
673
686
|
"Failed to upload the Agents24 resource package."
|
|
674
687
|
);
|
|
@@ -677,6 +690,116 @@ var ResourcePackagesNamespace = class {
|
|
|
677
690
|
}
|
|
678
691
|
};
|
|
679
692
|
|
|
693
|
+
// src/generated/resourceInstallations.ts
|
|
694
|
+
var ResourceInstallationsNamespace = class {
|
|
695
|
+
constructor(http) {
|
|
696
|
+
this.http = http;
|
|
697
|
+
}
|
|
698
|
+
http;
|
|
699
|
+
list() {
|
|
700
|
+
return this.http.requestJson("/resource-installations");
|
|
701
|
+
}
|
|
702
|
+
create(request, options) {
|
|
703
|
+
return this.http.requestJson("/resource-installations", {
|
|
704
|
+
method: "POST",
|
|
705
|
+
body: request,
|
|
706
|
+
options,
|
|
707
|
+
mutation: true
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
get(installationId) {
|
|
711
|
+
return this.http.requestJson(`/resource-installations/${installationId}`);
|
|
712
|
+
}
|
|
713
|
+
async plan(upload) {
|
|
714
|
+
const formData = new FormData();
|
|
715
|
+
const archiveBytes = upload.data.slice().buffer;
|
|
716
|
+
const candidate = upload.filename || "";
|
|
717
|
+
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
718
|
+
formData.append("file", new Blob([archiveBytes]), filename);
|
|
719
|
+
const response = await this.http.fetchOrThrow(
|
|
720
|
+
this.http.url("/resource-installations/plan", {
|
|
721
|
+
installation_id: upload.installationId,
|
|
722
|
+
prune: upload.prune,
|
|
723
|
+
development: upload.development
|
|
724
|
+
}),
|
|
725
|
+
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
726
|
+
"Failed to upload the Agents24 resource package."
|
|
727
|
+
);
|
|
728
|
+
await assertOk(response);
|
|
729
|
+
return await response.json();
|
|
730
|
+
}
|
|
731
|
+
link(installationId, request, options) {
|
|
732
|
+
return this.http.requestJson(`/resource-installations/${installationId}/link`, {
|
|
733
|
+
method: "POST",
|
|
734
|
+
body: request,
|
|
735
|
+
options,
|
|
736
|
+
mutation: true
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
configureSecrets(installationId, request, options) {
|
|
740
|
+
return this.http.requestJson(`/resource-installations/${installationId}/secrets`, {
|
|
741
|
+
method: "PUT",
|
|
742
|
+
body: request,
|
|
743
|
+
options,
|
|
744
|
+
mutation: true
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
apply(operationId, request, options) {
|
|
748
|
+
return this.http.requestJson(`/resource-installations/operations/${operationId}/apply`, {
|
|
749
|
+
method: "POST",
|
|
750
|
+
body: request,
|
|
751
|
+
options,
|
|
752
|
+
mutation: true
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
operationStatus(operationId) {
|
|
756
|
+
return this.http.requestJson(`/resource-installations/operations/${operationId}/status`);
|
|
757
|
+
}
|
|
758
|
+
publish(installationId, request, options) {
|
|
759
|
+
return this.http.requestJson(`/resource-installations/${installationId}/publish`, {
|
|
760
|
+
method: "POST",
|
|
761
|
+
body: request,
|
|
762
|
+
options,
|
|
763
|
+
mutation: true
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
prepareDevelopmentSession(installationId, request, options) {
|
|
767
|
+
return this.http.requestJson(`/resource-installations/${installationId}/artifact-development-sessions`, {
|
|
768
|
+
method: "POST",
|
|
769
|
+
body: request,
|
|
770
|
+
options,
|
|
771
|
+
mutation: true
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
developmentSessionStatus(installationId, resourceKey) {
|
|
775
|
+
return this.http.requestJson(`/resource-installations/${installationId}/artifact-development-sessions/${resourceKey}`);
|
|
776
|
+
}
|
|
777
|
+
revokeDevelopmentSession(installationId, sessionId, options) {
|
|
778
|
+
return this.http.requestJson(`/resource-installations/${installationId}/artifact-development-sessions/${sessionId}`, {
|
|
779
|
+
method: "DELETE",
|
|
780
|
+
options,
|
|
781
|
+
mutation: true
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
bindDeployment(installationId, request, options) {
|
|
785
|
+
return this.http.requestJson(`/resource-installations/${installationId}/deployment`, {
|
|
786
|
+
method: "PUT",
|
|
787
|
+
body: request,
|
|
788
|
+
options,
|
|
789
|
+
mutation: true
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
resources(options) {
|
|
793
|
+
return this.http.requestJson("/resource-installations/resources/list", {
|
|
794
|
+
query: {
|
|
795
|
+
kind: options.kind,
|
|
796
|
+
query: options.query,
|
|
797
|
+
limit: options.limit
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
|
|
680
803
|
// src/runs.ts
|
|
681
804
|
var RunsNamespace = class {
|
|
682
805
|
constructor(http) {
|
|
@@ -780,6 +903,7 @@ var Agents24 = class {
|
|
|
780
903
|
runs;
|
|
781
904
|
resourceBundles;
|
|
782
905
|
resourcePackages;
|
|
906
|
+
resourceInstallations;
|
|
783
907
|
clientDeployments;
|
|
784
908
|
clientSessions;
|
|
785
909
|
instructions;
|
|
@@ -791,6 +915,7 @@ var Agents24 = class {
|
|
|
791
915
|
this.runs = new RunsNamespace(http);
|
|
792
916
|
this.resourceBundles = new ResourceBundlesNamespace(http);
|
|
793
917
|
this.resourcePackages = new ResourcePackagesNamespace(http);
|
|
918
|
+
this.resourceInstallations = new ResourceInstallationsNamespace(http);
|
|
794
919
|
this.clientDeployments = new ClientDeploymentsNamespace(http);
|
|
795
920
|
this.clientSessions = new ClientSessionsNamespace(http);
|
|
796
921
|
this.instructions = new InstructionsNamespace(http);
|
|
@@ -853,6 +978,7 @@ var SDK_OPERATION_IDS = [
|
|
|
853
978
|
"embed.delete_agent_thread",
|
|
854
979
|
"embed.get_agent_run_context",
|
|
855
980
|
"embed.get_agent_thread",
|
|
981
|
+
"embed.get_resource_policy",
|
|
856
982
|
"embed.get_runtime_bootstrap",
|
|
857
983
|
"embed.list_agent_threads",
|
|
858
984
|
"embed.list_agent_threads_multi",
|
|
@@ -869,6 +995,20 @@ var SDK_OPERATION_IDS = [
|
|
|
869
995
|
"resource_bundles.export_plan",
|
|
870
996
|
"resource_bundles.import",
|
|
871
997
|
"resource_bundles.import_preview",
|
|
998
|
+
"resource_installations.apply",
|
|
999
|
+
"resource_installations.bind_deployment",
|
|
1000
|
+
"resource_installations.configure_secrets",
|
|
1001
|
+
"resource_installations.create",
|
|
1002
|
+
"resource_installations.development_session_status",
|
|
1003
|
+
"resource_installations.get",
|
|
1004
|
+
"resource_installations.link",
|
|
1005
|
+
"resource_installations.list",
|
|
1006
|
+
"resource_installations.operation_status",
|
|
1007
|
+
"resource_installations.plan",
|
|
1008
|
+
"resource_installations.prepare_development_session",
|
|
1009
|
+
"resource_installations.publish",
|
|
1010
|
+
"resource_installations.resources",
|
|
1011
|
+
"resource_installations.revoke_development_session",
|
|
872
1012
|
"resource_packages.compile",
|
|
873
1013
|
"resource_packages.export",
|
|
874
1014
|
"resource_packages.validate",
|