@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
|
@@ -79,6 +79,7 @@ type EmbedStreamRequest = {
|
|
|
79
79
|
external_session_id?: string;
|
|
80
80
|
metadata?: Record<string, unknown>;
|
|
81
81
|
client?: Record<string, unknown>;
|
|
82
|
+
runtime_target?: "draft" | "published";
|
|
82
83
|
};
|
|
83
84
|
type AttachRunRequest = {
|
|
84
85
|
external_user_id: string;
|
|
@@ -86,6 +87,7 @@ type AttachRunRequest = {
|
|
|
86
87
|
metadata?: Record<string, unknown>;
|
|
87
88
|
client?: Record<string, unknown>;
|
|
88
89
|
cursor?: number;
|
|
90
|
+
runtime_target?: "draft" | "published";
|
|
89
91
|
};
|
|
90
92
|
type FeedbackRating = "like" | "dislike";
|
|
91
93
|
type FeedbackReason = "incorrect" | "irrelevant" | "incomplete" | "unsafe" | "citation_issue" | "other";
|
|
@@ -106,6 +108,7 @@ type EmbeddedResponseFeedbackInput = {
|
|
|
106
108
|
rating: FeedbackRating | null;
|
|
107
109
|
reason?: FeedbackReason | null;
|
|
108
110
|
comment?: string | null;
|
|
111
|
+
runtime_target?: "draft" | "published";
|
|
109
112
|
};
|
|
110
113
|
type HitlAction = "approve" | "reject" | "connect" | "skip" | "respond";
|
|
111
114
|
type HitlAnswer = {
|
|
@@ -148,12 +151,14 @@ type MultiAgentThreadListRequest = {
|
|
|
148
151
|
type ThreadListOptions = {
|
|
149
152
|
externalUserId: string;
|
|
150
153
|
externalSessionId?: string;
|
|
154
|
+
runtimeTarget?: "draft" | "published";
|
|
151
155
|
skip?: number;
|
|
152
156
|
limit?: number;
|
|
153
157
|
};
|
|
154
158
|
type ThreadDetailOptions = {
|
|
155
159
|
externalUserId: string;
|
|
156
160
|
externalSessionId?: string;
|
|
161
|
+
runtimeTarget?: "draft" | "published";
|
|
157
162
|
beforeTurnIndex?: number;
|
|
158
163
|
limit?: number;
|
|
159
164
|
includeSubthreads?: boolean;
|
|
@@ -164,6 +169,7 @@ type ThreadDetailOptions = {
|
|
|
164
169
|
type RunContextOptions = {
|
|
165
170
|
externalUserId: string;
|
|
166
171
|
externalSessionId?: string;
|
|
172
|
+
runtimeTarget?: "draft" | "published";
|
|
167
173
|
};
|
|
168
174
|
type RunCancelOptions = {
|
|
169
175
|
externalUserId?: string;
|
|
@@ -173,16 +179,19 @@ type RunCancelOptions = {
|
|
|
173
179
|
type EmbedRunCancelOptions = {
|
|
174
180
|
externalUserId?: string;
|
|
175
181
|
externalSessionId?: string;
|
|
182
|
+
runtimeTarget?: "draft" | "published";
|
|
176
183
|
};
|
|
177
184
|
type ThreadDeleteOptions = {
|
|
178
185
|
externalUserId: string;
|
|
179
186
|
externalSessionId?: string;
|
|
187
|
+
runtimeTarget?: "draft" | "published";
|
|
180
188
|
};
|
|
181
189
|
type ThreadSummaryEventOptions = {
|
|
182
190
|
externalUserId: string;
|
|
183
191
|
externalSessionId?: string | null;
|
|
184
192
|
cursor?: number | null;
|
|
185
193
|
signal?: AbortSignal;
|
|
194
|
+
runtimeTarget?: "draft" | "published";
|
|
186
195
|
};
|
|
187
196
|
type MultiAgentThreadSummaryEventOptions = ThreadSummaryEventOptions & {
|
|
188
197
|
agentIds: string[];
|
|
@@ -199,10 +208,12 @@ type AttachmentContentAccessRequest = {
|
|
|
199
208
|
type EmbedAttachmentContentAccessRequest = AttachmentContentAccessRequest & {
|
|
200
209
|
external_user_id: string;
|
|
201
210
|
external_session_id?: string | null;
|
|
211
|
+
runtime_target?: "draft" | "published";
|
|
202
212
|
};
|
|
203
213
|
type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
|
|
204
214
|
externalUserId: string;
|
|
205
215
|
externalSessionId?: string;
|
|
216
|
+
runtimeTarget?: "draft" | "published";
|
|
206
217
|
};
|
|
207
218
|
type GraphValueRef = {
|
|
208
219
|
namespace: "workflow_input" | "state" | "node_output";
|
|
@@ -634,7 +645,7 @@ type ClientSessionCredentials = {
|
|
|
634
645
|
refresh_expires_at: string | null;
|
|
635
646
|
dpop_nonce: string | null;
|
|
636
647
|
};
|
|
637
|
-
type PortableResourceKind = "agent" | "rag_pipeline" | "instruction" | "knowledge_store";
|
|
648
|
+
type PortableResourceKind = "agent" | "rag_pipeline" | "instruction" | "knowledge_store" | "artifact";
|
|
638
649
|
type ResourceSelector = {
|
|
639
650
|
kind: PortableResourceKind;
|
|
640
651
|
id: string;
|
|
@@ -652,6 +663,11 @@ type ResourcePackageUpload = {
|
|
|
652
663
|
data: Uint8Array;
|
|
653
664
|
filename?: string;
|
|
654
665
|
};
|
|
666
|
+
type ResourceInstallationPlanUpload = ResourcePackageUpload & {
|
|
667
|
+
installationId?: string;
|
|
668
|
+
prune?: boolean;
|
|
669
|
+
development?: boolean;
|
|
670
|
+
};
|
|
655
671
|
type ResourcePackageDiagnostic = {
|
|
656
672
|
severity: "error" | "warning";
|
|
657
673
|
code: string;
|
|
@@ -661,7 +677,7 @@ type ResourcePackageDiagnostic = {
|
|
|
661
677
|
type ResourcePackageCompileResult = {
|
|
662
678
|
valid: boolean;
|
|
663
679
|
format: "agents24.resource_package";
|
|
664
|
-
schema_version: "
|
|
680
|
+
schema_version: "2.0";
|
|
665
681
|
package: Record<string, unknown>;
|
|
666
682
|
resources: Array<Record<string, unknown>>;
|
|
667
683
|
requirements: string[];
|
|
@@ -704,13 +720,20 @@ type ResourceBundleDependency = {
|
|
|
704
720
|
};
|
|
705
721
|
type ResourceBundle = {
|
|
706
722
|
format: "agents24.resource_bundle";
|
|
707
|
-
schema_version: "
|
|
723
|
+
schema_version: "2.0";
|
|
708
724
|
exported_at?: string;
|
|
709
725
|
resources: ResourceBundleResource[];
|
|
710
726
|
dependencies: ResourceBundleDependency[];
|
|
711
727
|
warnings: string[];
|
|
712
728
|
tool_exports?: Array<Record<string, unknown>>;
|
|
713
729
|
callable_bindings?: Array<Record<string, unknown>>;
|
|
730
|
+
content_sets?: Array<{
|
|
731
|
+
resource_key: string;
|
|
732
|
+
files: Array<{
|
|
733
|
+
path: string;
|
|
734
|
+
sha256: string;
|
|
735
|
+
}>;
|
|
736
|
+
}>;
|
|
714
737
|
};
|
|
715
738
|
type ResourceBundlePlan = Omit<ResourceBundle, "resources"> & {
|
|
716
739
|
resources: Array<Omit<ResourceBundleResource, "document">>;
|
|
@@ -739,6 +762,124 @@ type ResourceBundleCandidateOptions = {
|
|
|
739
762
|
offset?: number;
|
|
740
763
|
requiredCapability?: "chat" | "embedding";
|
|
741
764
|
};
|
|
765
|
+
type ResourceInstallationBinding = {
|
|
766
|
+
resource_key: string;
|
|
767
|
+
kind: string;
|
|
768
|
+
resource_id: string;
|
|
769
|
+
source_hash?: string | null;
|
|
770
|
+
retained_orphan?: boolean;
|
|
771
|
+
};
|
|
772
|
+
type ResourceInstallationOperation = {
|
|
773
|
+
operation_id: string;
|
|
774
|
+
installation_id: string;
|
|
775
|
+
status: "planned" | "applying" | "waiting" | "completed" | "failed";
|
|
776
|
+
phase: string;
|
|
777
|
+
result: Record<string, unknown>;
|
|
778
|
+
failure_id?: string | null;
|
|
779
|
+
};
|
|
780
|
+
type ResourceInstallation = {
|
|
781
|
+
id: string;
|
|
782
|
+
package_name: string;
|
|
783
|
+
primary_resource_key?: string | null;
|
|
784
|
+
integration_mode: "bff" | "client-deployment" | "publish-only";
|
|
785
|
+
client_deployment_id?: string | null;
|
|
786
|
+
status: string;
|
|
787
|
+
last_package_hash?: string | null;
|
|
788
|
+
last_applied_at?: string | null;
|
|
789
|
+
last_published_package_hash?: string | null;
|
|
790
|
+
last_published_at?: string | null;
|
|
791
|
+
publication_state?: "never_published" | "current" | "draft_changes";
|
|
792
|
+
bindings?: ResourceInstallationBinding[];
|
|
793
|
+
development_connections?: ArtifactDevelopmentSession[];
|
|
794
|
+
remote_artifact_stages?: Array<{
|
|
795
|
+
resource_key: string;
|
|
796
|
+
artifact_id: string;
|
|
797
|
+
target: "development" | "production";
|
|
798
|
+
status: string;
|
|
799
|
+
manifest_hash: string;
|
|
800
|
+
base_url?: string | null;
|
|
801
|
+
}>;
|
|
802
|
+
latest_operation?: ResourceInstallationOperation | null;
|
|
803
|
+
};
|
|
804
|
+
type ResourceInstallationList = {
|
|
805
|
+
items: ResourceInstallation[];
|
|
806
|
+
};
|
|
807
|
+
type ResourceInstallationCreateRequest = {
|
|
808
|
+
package_name: string;
|
|
809
|
+
operation_id: string;
|
|
810
|
+
};
|
|
811
|
+
type ResourceInstallationPlan = {
|
|
812
|
+
installation_id: string | null;
|
|
813
|
+
operation_id: string;
|
|
814
|
+
package_name: string;
|
|
815
|
+
package_hash: string;
|
|
816
|
+
actions: Array<Record<string, unknown>>;
|
|
817
|
+
content: Array<Record<string, unknown>>;
|
|
818
|
+
external_requirements: Array<Record<string, unknown>>;
|
|
819
|
+
artifact_actions: Array<Record<string, unknown>>;
|
|
820
|
+
generated_tool_changes: Array<Record<string, unknown>>;
|
|
821
|
+
publication_order: string[];
|
|
822
|
+
deployment: Record<string, unknown>;
|
|
823
|
+
blockers: Array<Record<string, unknown>>;
|
|
824
|
+
can_apply: boolean;
|
|
825
|
+
prune: boolean;
|
|
826
|
+
};
|
|
827
|
+
type ResourceInstallationLinkRequest = {
|
|
828
|
+
resource_key: string;
|
|
829
|
+
resource_id: string;
|
|
830
|
+
};
|
|
831
|
+
type ResourceInstallationSecretsRequest = {
|
|
832
|
+
secrets: Record<string, string>;
|
|
833
|
+
};
|
|
834
|
+
type ResourceInstallationSecretStatus = {
|
|
835
|
+
installation_id: string;
|
|
836
|
+
configured: string[];
|
|
837
|
+
};
|
|
838
|
+
type ResourceInstallationApplyRequest = {
|
|
839
|
+
secrets?: Record<string, string>;
|
|
840
|
+
primary_resource_key?: string;
|
|
841
|
+
integration_mode?: "bff" | "client-deployment" | "publish-only";
|
|
842
|
+
development_sessions?: Record<string, string>;
|
|
843
|
+
};
|
|
844
|
+
type ResourceInstallationPublishRequest = {
|
|
845
|
+
package_hash: string;
|
|
846
|
+
};
|
|
847
|
+
type ResourceInstallationPublication = {
|
|
848
|
+
installation_id: string;
|
|
849
|
+
operation_id: string;
|
|
850
|
+
package_hash: string;
|
|
851
|
+
status: "published" | "already_published";
|
|
852
|
+
published_at?: string | null;
|
|
853
|
+
client_deployment_id?: string | null;
|
|
854
|
+
};
|
|
855
|
+
type ArtifactDevelopmentSessionPrepareRequest = {
|
|
856
|
+
resource_key: string;
|
|
857
|
+
machine_label: string;
|
|
858
|
+
};
|
|
859
|
+
type ArtifactDevelopmentSession = {
|
|
860
|
+
id?: string;
|
|
861
|
+
installation_id: string;
|
|
862
|
+
resource_key: string;
|
|
863
|
+
artifact_id?: string | null;
|
|
864
|
+
status: "prepared" | "connecting" | "verified_provisional" | "connected" | "disconnected" | "expired" | "superseded" | "revoked";
|
|
865
|
+
machine_label?: string;
|
|
866
|
+
manifest_hash?: string | null;
|
|
867
|
+
last_heartbeat_at?: string | null;
|
|
868
|
+
expires_at?: string | null;
|
|
869
|
+
};
|
|
870
|
+
type ArtifactDevelopmentSessionAdmission = ArtifactDevelopmentSession & {
|
|
871
|
+
id: string;
|
|
872
|
+
relay_token: string;
|
|
873
|
+
relay_path: string;
|
|
874
|
+
};
|
|
875
|
+
type ResourceInstallationDeploymentRequest = {
|
|
876
|
+
client_deployment_id?: string | null;
|
|
877
|
+
};
|
|
878
|
+
type ResourceInstallationResourceListOptions = {
|
|
879
|
+
kind: string;
|
|
880
|
+
query?: string;
|
|
881
|
+
limit?: number;
|
|
882
|
+
};
|
|
742
883
|
type ResourcePolicySummary = {
|
|
743
884
|
id: string;
|
|
744
885
|
name: string;
|
|
@@ -756,6 +897,12 @@ type SetCustomerResourcePolicyAssignmentRequest = CustomerIdentityRequest & {
|
|
|
756
897
|
type EffectiveCustomerResourcePolicyRequest = CustomerIdentityRequest & {
|
|
757
898
|
deployment_id: string;
|
|
758
899
|
};
|
|
900
|
+
type EmbedResourcePolicyRequest = {
|
|
901
|
+
external_user_id: string;
|
|
902
|
+
external_user_issuer?: string;
|
|
903
|
+
agent_version_id?: string;
|
|
904
|
+
runtime_target?: "draft" | "published";
|
|
905
|
+
};
|
|
759
906
|
type ResourcePolicySubjectRef = {
|
|
760
907
|
kind: "agent" | "client_deployment" | "organization_user" | "customer_principal";
|
|
761
908
|
id: string;
|
|
@@ -933,7 +1080,8 @@ declare class EmbedNamespace {
|
|
|
933
1080
|
private stream;
|
|
934
1081
|
resumeAgentRun(agentId: string, runId: string, payload: ResumeRunRequest, options?: RequestOptions): Promise<RunResumeResult>;
|
|
935
1082
|
startAgentRunMcpAuth(agentId: string, runId: string, serverId: string, payload: McpAuthStartRequest, options?: RequestOptions): Promise<McpAuthStartResult>;
|
|
936
|
-
getRuntimeBootstrap(agentId: string, agentVersionId?: string): Promise<EmbedRuntimeBootstrap>;
|
|
1083
|
+
getRuntimeBootstrap(agentId: string, agentVersionId?: string, runtimeTarget?: "draft" | "published"): Promise<EmbedRuntimeBootstrap>;
|
|
1084
|
+
getResourcePolicy(agentId: string, request: EmbedResourcePolicyRequest): Promise<EffectiveResourcePolicy>;
|
|
937
1085
|
listAgentThreads(agentId: string, options: ThreadListOptions): Promise<ThreadsResponse>;
|
|
938
1086
|
listAgentThreadsMulti(options: MultiAgentThreadListRequest): Promise<ThreadsResponse>;
|
|
939
1087
|
subscribeAgentThreadEvents(agentId: string, options: ThreadSummaryEventOptions, onEvent: (event: ThreadSummaryEvent) => void | Promise<void>): Promise<void>;
|
|
@@ -965,6 +1113,25 @@ declare class ResourcePackagesNamespace {
|
|
|
965
1113
|
compilePackage(upload: ResourcePackageUpload): Promise<ResourcePackageCompileResult>;
|
|
966
1114
|
}
|
|
967
1115
|
|
|
1116
|
+
declare class ResourceInstallationsNamespace {
|
|
1117
|
+
protected readonly http: Agents24HttpClient;
|
|
1118
|
+
constructor(http: Agents24HttpClient);
|
|
1119
|
+
list(): Promise<ResourceInstallationList>;
|
|
1120
|
+
create(request: ResourceInstallationCreateRequest, options?: RequestOptions): Promise<ResourceInstallation>;
|
|
1121
|
+
get(installationId: string): Promise<ResourceInstallation>;
|
|
1122
|
+
plan(upload: ResourceInstallationPlanUpload): Promise<ResourceInstallationPlan>;
|
|
1123
|
+
link(installationId: string, request: ResourceInstallationLinkRequest, options?: RequestOptions): Promise<ResourceInstallationBinding>;
|
|
1124
|
+
configureSecrets(installationId: string, request: ResourceInstallationSecretsRequest, options?: RequestOptions): Promise<ResourceInstallationSecretStatus>;
|
|
1125
|
+
apply(operationId: string, request: ResourceInstallationApplyRequest, options?: RequestOptions): Promise<ResourceInstallationOperation>;
|
|
1126
|
+
operationStatus(operationId: string): Promise<ResourceInstallationOperation>;
|
|
1127
|
+
publish(installationId: string, request: ResourceInstallationPublishRequest, options?: RequestOptions): Promise<ResourceInstallationPublication>;
|
|
1128
|
+
prepareDevelopmentSession(installationId: string, request: ArtifactDevelopmentSessionPrepareRequest, options?: RequestOptions): Promise<ArtifactDevelopmentSessionAdmission>;
|
|
1129
|
+
developmentSessionStatus(installationId: string, resourceKey: string): Promise<ArtifactDevelopmentSession>;
|
|
1130
|
+
revokeDevelopmentSession(installationId: string, sessionId: string, options?: RequestOptions): Promise<ArtifactDevelopmentSession>;
|
|
1131
|
+
bindDeployment(installationId: string, request: ResourceInstallationDeploymentRequest, options?: RequestOptions): Promise<ResourceInstallation>;
|
|
1132
|
+
resources(options: ResourceInstallationResourceListOptions): Promise<ResourceBundleCandidateList>;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
968
1135
|
declare class RunsNamespace {
|
|
969
1136
|
private readonly http;
|
|
970
1137
|
constructor(http: Agents24HttpClient);
|
|
@@ -1006,6 +1173,7 @@ declare class Agents24 {
|
|
|
1006
1173
|
readonly runs: RunsNamespace;
|
|
1007
1174
|
readonly resourceBundles: ResourceBundlesNamespace;
|
|
1008
1175
|
readonly resourcePackages: ResourcePackagesNamespace;
|
|
1176
|
+
readonly resourceInstallations: ResourceInstallationsNamespace;
|
|
1009
1177
|
readonly clientDeployments: ClientDeploymentsNamespace;
|
|
1010
1178
|
readonly clientSessions: ClientSessionsNamespace;
|
|
1011
1179
|
readonly instructions: InstructionsNamespace;
|
|
@@ -1015,4 +1183,4 @@ declare class Agents24 {
|
|
|
1015
1183
|
graph(): GraphBuilder;
|
|
1016
1184
|
}
|
|
1017
1185
|
|
|
1018
|
-
export {
|
|
1186
|
+
export { GraphBuilder as $, Agents24 as A, type BackendSessionRequestOptions as B, type ClearCustomerResourcePolicyAssignmentResult as C, type ClientDeploymentListQuery as D, type ClientDeploymentListResponse as E, type ClientNativeProfile as F, type ClientRuntimeNativeProfileInput as G, type ClientRuntimeOidcConfig as H, type ClientRuntimePolicyInput as I, type ClientSessionCredentials as J, type ControlPlaneRunEventsResponse as K, type CreateBackendClientSessionRequest as L, type CreateClientDeploymentRequest as M, type CustomerIdentityRequest as N, type CustomerResourcePolicyAssignment as O, type EffectiveCustomerResourcePolicyRequest as P, type EffectiveResourcePolicy as Q, type EmbedAttachmentContentAccessRequest as R, type EmbedResourcePolicyRequest as S, type EmbedRunCancelOptions as T, type EmbedRuntimeBootstrap as U, type EmbedStreamRequest as V, type EmbeddedResponseFeedbackInput as W, type FailureCategory as X, type FailureView as Y, type FeedbackRating as Z, type FeedbackReason as _, type AgentCreateRequest as a, type RunTrace as a$, type GraphDefinition as a0, type GraphEdge as a1, type GraphHints as a2, type GraphNode as a3, type GraphValueRef as a4, type HitlAction as a5, type HitlAnswer as a6, type LatestOrPinnedPolicy as a7, type McpAuthStartRequest as a8, type McpAuthStartResult as a9, type ResourceInstallationLinkRequest as aA, type ResourceInstallationList as aB, type ResourceInstallationOperation as aC, type ResourceInstallationPlan as aD, type ResourceInstallationPlanUpload as aE, type ResourceInstallationPublication as aF, type ResourceInstallationPublishRequest as aG, type ResourceInstallationResourceListOptions as aH, type ResourceInstallationSecretStatus as aI, type ResourceInstallationSecretsRequest as aJ, type ResourcePackageArchive as aK, type ResourcePackageCompileResult as aL, type ResourcePackageDiagnostic as aM, type ResourcePackageExportRequest as aN, type ResourcePackageUpload as aO, type ResourcePolicyList as aP, type ResourcePolicyQuotaSchedule as aQ, type ResourcePolicyQuotaScheduleResult as aR, type ResourcePolicySubjectRef as aS, type ResourcePolicySummary as aT, type ResourceSelector as aU, type ResponseFeedback as aV, type ResponseFeedbackResult as aW, type ResumeRunRequest as aX, type RunCancelOptions as aY, type RunContextOptions as aZ, type RunStatus as a_, type MultiAgentThreadListRequest as aa, type MultiAgentThreadSummaryEventOptions as ab, type NativePlatform as ac, type NodeAuthoringSpec as ad, type NodeCatalogItem as ae, type NodeCatalogResponse as af, type NodeSchemaResponse as ag, type PortableResourceKind as ah, type RequestOptions as ai, type ResetResourcePolicyQuotaRequest as aj, type ResourceBundle as ak, type ResourceBundleCandidateList as al, type ResourceBundleCandidateOptions as am, type ResourceBundleDependency as an, type ResourceBundleExportRequest as ao, type ResourceBundleImportPreview as ap, type ResourceBundleImportRequest as aq, type ResourceBundleImportResult as ar, type ResourceBundleOrigin as as, type ResourceBundlePlan as at, type ResourceBundleResource as au, type ResourceInstallation as av, type ResourceInstallationApplyRequest as aw, type ResourceInstallationBinding as ax, type ResourceInstallationCreateRequest as ay, type ResourceInstallationDeploymentRequest as az, AgentDefinitionBuilder as b, type ServerAttachmentUploadOptions as b0, type ServerEmbedAttachmentUploadOptions as b1, type SetCustomerResourcePolicyAssignmentRequest as b2, type SetResourcePolicyQuotaScheduleRequest as b3, type StartRunResult as b4, type StateVariableDefinition as b5, type StreamRequestOptions as b6, type StreamResult as b7, type ThreadDeleteOptions as b8, type ThreadDetailOptions as b9, type ThreadListOptions as ba, type ThreadSummaryEventOptions as bb, type TraceContent as bc, type TraceError as bd, type TraceSpan as be, type TraceSpanKind as bf, type TraceSpanStatus as bg, type TraceView as bh, type UpdateClientDeploymentRequest as bi, type WorkflowInputDefinition as bj, type AgentDefinitionOptions as c, type AgentListResponse as d, type AgentRef as e, type AgentResponse as f, type AgentStreamRequest as g, type AgentSummary as h, type AgentToolsetAttachment as i, type AgentUpdateRequest as j, type AgentValidationIssue as k, type AgentValidationResult as l, Agents24SDKError as m, type Agents24NodeErrorKind as n, type Agents24NodeOptions as o, type Agents24Options as p, type Agents24SDKErrorKind as q, type Agents24SDKSerializedError as r, type ArtifactDevelopmentSession as s, type ArtifactDevelopmentSessionAdmission as t, type ArtifactDevelopmentSessionPrepareRequest as u, type AttachRunRequest as v, type AttachmentContentAccessRequest as w, type BranchingHint as x, type ClientAuthMode as y, type ClientDeployment as z };
|
package/dist/index.cjs
CHANGED
|
@@ -492,9 +492,15 @@ var EmbedNamespace = class {
|
|
|
492
492
|
startAgentRunMcpAuth(agentId, runId, serverId, payload, options) {
|
|
493
493
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/mcp/servers/${serverId}/auth/start`, { method: "POST", body: payload, options, mutation: true });
|
|
494
494
|
}
|
|
495
|
-
getRuntimeBootstrap(agentId, agentVersionId) {
|
|
495
|
+
getRuntimeBootstrap(agentId, agentVersionId, runtimeTarget = "published") {
|
|
496
496
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runtime/bootstrap`, {
|
|
497
|
-
query: { agent_version_id: agentVersionId }
|
|
497
|
+
query: { agent_version_id: agentVersionId, runtime_target: runtimeTarget }
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
getResourcePolicy(agentId, request) {
|
|
501
|
+
return this.http.requestJson(`/public/embed/agents/${agentId}/resource-policy`, {
|
|
502
|
+
method: "POST",
|
|
503
|
+
body: request
|
|
498
504
|
});
|
|
499
505
|
}
|
|
500
506
|
listAgentThreads(agentId, options) {
|
|
@@ -502,7 +508,8 @@ var EmbedNamespace = class {
|
|
|
502
508
|
external_user_id: options.externalUserId,
|
|
503
509
|
external_session_id: options.externalSessionId,
|
|
504
510
|
skip: options.skip ?? 0,
|
|
505
|
-
limit: options.limit ?? 20
|
|
511
|
+
limit: options.limit ?? 20,
|
|
512
|
+
runtime_target: options.runtimeTarget
|
|
506
513
|
} });
|
|
507
514
|
}
|
|
508
515
|
listAgentThreadsMulti(options) {
|
|
@@ -512,7 +519,8 @@ var EmbedNamespace = class {
|
|
|
512
519
|
const response = await this.http.fetchOrThrow(this.http.url(`/public/embed/agents/${agentId}/threads/events`, {
|
|
513
520
|
external_user_id: options.externalUserId,
|
|
514
521
|
external_session_id: options.externalSessionId,
|
|
515
|
-
cursor: options.cursor
|
|
522
|
+
cursor: options.cursor,
|
|
523
|
+
runtime_target: options.runtimeTarget
|
|
516
524
|
}), { method: "GET", headers: this.http.streamHeaders(), signal: options.signal }, "Failed to connect to the embedded-agent thread event endpoint.");
|
|
517
525
|
await assertOk(response);
|
|
518
526
|
await consumeThreadSummaryEventStream(response, onEvent, options.signal);
|
|
@@ -536,25 +544,29 @@ var EmbedNamespace = class {
|
|
|
536
544
|
include_subthreads: options.includeSubthreads,
|
|
537
545
|
subthread_depth: options.subthreadDepth,
|
|
538
546
|
subthread_turn_limit: options.subthreadTurnLimit,
|
|
539
|
-
subthread_child_limit: options.subthreadChildLimit
|
|
547
|
+
subthread_child_limit: options.subthreadChildLimit,
|
|
548
|
+
runtime_target: options.runtimeTarget
|
|
540
549
|
} });
|
|
541
550
|
}
|
|
542
551
|
deleteAgentThread(agentId, threadId, options, requestOptions) {
|
|
543
552
|
return this.http.requestJson(`/public/embed/agents/${agentId}/threads/${threadId}`, { method: "DELETE", query: {
|
|
544
553
|
external_user_id: options.externalUserId,
|
|
545
|
-
external_session_id: options.externalSessionId
|
|
554
|
+
external_session_id: options.externalSessionId,
|
|
555
|
+
runtime_target: options.runtimeTarget
|
|
546
556
|
}, options: requestOptions, mutation: true });
|
|
547
557
|
}
|
|
548
558
|
getAgentRunContext(agentId, runId, options) {
|
|
549
559
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/context`, { query: {
|
|
550
560
|
external_user_id: options.externalUserId,
|
|
551
|
-
external_session_id: options.externalSessionId
|
|
561
|
+
external_session_id: options.externalSessionId,
|
|
562
|
+
runtime_target: options.runtimeTarget
|
|
552
563
|
} });
|
|
553
564
|
}
|
|
554
565
|
cancelAgentRun(agentId, runId, options, requestOptions) {
|
|
555
566
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs/${runId}/cancel`, { method: "POST", query: {
|
|
556
567
|
external_user_id: options.externalUserId,
|
|
557
|
-
external_session_id: options.externalSessionId
|
|
568
|
+
external_session_id: options.externalSessionId,
|
|
569
|
+
runtime_target: options.runtimeTarget
|
|
558
570
|
}, body: {}, options: requestOptions, mutation: true });
|
|
559
571
|
}
|
|
560
572
|
setAgentRunFeedback(agentId, runId, payload) {
|
|
@@ -568,6 +580,7 @@ var EmbedNamespace = class {
|
|
|
568
580
|
form.set("external_user_id", options.externalUserId);
|
|
569
581
|
if (options.externalSessionId) form.set("external_session_id", options.externalSessionId);
|
|
570
582
|
if (options.threadId) form.set("thread_id", options.threadId);
|
|
583
|
+
if (options.runtimeTarget) form.set("runtime_target", options.runtimeTarget);
|
|
571
584
|
for (const file of options.files) form.append("files", file, file.name);
|
|
572
585
|
const response = await this.http.fetchOrThrow(this.http.url(`/public/embed/agents/${agentId}/attachments/upload`), {
|
|
573
586
|
method: "POST",
|
|
@@ -655,7 +668,7 @@ var ResourcePackagesNamespace = class {
|
|
|
655
668
|
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
656
669
|
formData.append("file", new Blob([archiveBytes]), filename);
|
|
657
670
|
const response = await this.http.fetchOrThrow(
|
|
658
|
-
this.http.url("/resource-packages/validate"),
|
|
671
|
+
this.http.url("/resource-packages/validate", void 0),
|
|
659
672
|
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
660
673
|
"Failed to upload the Agents24 resource package."
|
|
661
674
|
);
|
|
@@ -669,7 +682,7 @@ var ResourcePackagesNamespace = class {
|
|
|
669
682
|
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
670
683
|
formData.append("file", new Blob([archiveBytes]), filename);
|
|
671
684
|
const response = await this.http.fetchOrThrow(
|
|
672
|
-
this.http.url("/resource-packages/compile"),
|
|
685
|
+
this.http.url("/resource-packages/compile", void 0),
|
|
673
686
|
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
674
687
|
"Failed to upload the Agents24 resource package."
|
|
675
688
|
);
|
|
@@ -678,6 +691,116 @@ var ResourcePackagesNamespace = class {
|
|
|
678
691
|
}
|
|
679
692
|
};
|
|
680
693
|
|
|
694
|
+
// src/generated/resourceInstallations.ts
|
|
695
|
+
var ResourceInstallationsNamespace = class {
|
|
696
|
+
constructor(http) {
|
|
697
|
+
this.http = http;
|
|
698
|
+
}
|
|
699
|
+
http;
|
|
700
|
+
list() {
|
|
701
|
+
return this.http.requestJson("/resource-installations");
|
|
702
|
+
}
|
|
703
|
+
create(request, options) {
|
|
704
|
+
return this.http.requestJson("/resource-installations", {
|
|
705
|
+
method: "POST",
|
|
706
|
+
body: request,
|
|
707
|
+
options,
|
|
708
|
+
mutation: true
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
get(installationId) {
|
|
712
|
+
return this.http.requestJson(`/resource-installations/${installationId}`);
|
|
713
|
+
}
|
|
714
|
+
async plan(upload) {
|
|
715
|
+
const formData = new FormData();
|
|
716
|
+
const archiveBytes = upload.data.slice().buffer;
|
|
717
|
+
const candidate = upload.filename || "";
|
|
718
|
+
const filename = /^[A-Za-z0-9][A-Za-z0-9._-]{0,200}\.zip$/.test(candidate) ? candidate : "resource.agents24.zip";
|
|
719
|
+
formData.append("file", new Blob([archiveBytes]), filename);
|
|
720
|
+
const response = await this.http.fetchOrThrow(
|
|
721
|
+
this.http.url("/resource-installations/plan", {
|
|
722
|
+
installation_id: upload.installationId,
|
|
723
|
+
prune: upload.prune,
|
|
724
|
+
development: upload.development
|
|
725
|
+
}),
|
|
726
|
+
{ method: "POST", headers: this.http.multipartHeaders(), body: formData },
|
|
727
|
+
"Failed to upload the Agents24 resource package."
|
|
728
|
+
);
|
|
729
|
+
await assertOk(response);
|
|
730
|
+
return await response.json();
|
|
731
|
+
}
|
|
732
|
+
link(installationId, request, options) {
|
|
733
|
+
return this.http.requestJson(`/resource-installations/${installationId}/link`, {
|
|
734
|
+
method: "POST",
|
|
735
|
+
body: request,
|
|
736
|
+
options,
|
|
737
|
+
mutation: true
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
configureSecrets(installationId, request, options) {
|
|
741
|
+
return this.http.requestJson(`/resource-installations/${installationId}/secrets`, {
|
|
742
|
+
method: "PUT",
|
|
743
|
+
body: request,
|
|
744
|
+
options,
|
|
745
|
+
mutation: true
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
apply(operationId, request, options) {
|
|
749
|
+
return this.http.requestJson(`/resource-installations/operations/${operationId}/apply`, {
|
|
750
|
+
method: "POST",
|
|
751
|
+
body: request,
|
|
752
|
+
options,
|
|
753
|
+
mutation: true
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
operationStatus(operationId) {
|
|
757
|
+
return this.http.requestJson(`/resource-installations/operations/${operationId}/status`);
|
|
758
|
+
}
|
|
759
|
+
publish(installationId, request, options) {
|
|
760
|
+
return this.http.requestJson(`/resource-installations/${installationId}/publish`, {
|
|
761
|
+
method: "POST",
|
|
762
|
+
body: request,
|
|
763
|
+
options,
|
|
764
|
+
mutation: true
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
prepareDevelopmentSession(installationId, request, options) {
|
|
768
|
+
return this.http.requestJson(`/resource-installations/${installationId}/artifact-development-sessions`, {
|
|
769
|
+
method: "POST",
|
|
770
|
+
body: request,
|
|
771
|
+
options,
|
|
772
|
+
mutation: true
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
developmentSessionStatus(installationId, resourceKey) {
|
|
776
|
+
return this.http.requestJson(`/resource-installations/${installationId}/artifact-development-sessions/${resourceKey}`);
|
|
777
|
+
}
|
|
778
|
+
revokeDevelopmentSession(installationId, sessionId, options) {
|
|
779
|
+
return this.http.requestJson(`/resource-installations/${installationId}/artifact-development-sessions/${sessionId}`, {
|
|
780
|
+
method: "DELETE",
|
|
781
|
+
options,
|
|
782
|
+
mutation: true
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
bindDeployment(installationId, request, options) {
|
|
786
|
+
return this.http.requestJson(`/resource-installations/${installationId}/deployment`, {
|
|
787
|
+
method: "PUT",
|
|
788
|
+
body: request,
|
|
789
|
+
options,
|
|
790
|
+
mutation: true
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
resources(options) {
|
|
794
|
+
return this.http.requestJson("/resource-installations/resources/list", {
|
|
795
|
+
query: {
|
|
796
|
+
kind: options.kind,
|
|
797
|
+
query: options.query,
|
|
798
|
+
limit: options.limit
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
|
|
681
804
|
// src/runs.ts
|
|
682
805
|
var RunsNamespace = class {
|
|
683
806
|
constructor(http) {
|
|
@@ -781,6 +904,7 @@ var Agents24 = class {
|
|
|
781
904
|
runs;
|
|
782
905
|
resourceBundles;
|
|
783
906
|
resourcePackages;
|
|
907
|
+
resourceInstallations;
|
|
784
908
|
clientDeployments;
|
|
785
909
|
clientSessions;
|
|
786
910
|
instructions;
|
|
@@ -792,6 +916,7 @@ var Agents24 = class {
|
|
|
792
916
|
this.runs = new RunsNamespace(http);
|
|
793
917
|
this.resourceBundles = new ResourceBundlesNamespace(http);
|
|
794
918
|
this.resourcePackages = new ResourcePackagesNamespace(http);
|
|
919
|
+
this.resourceInstallations = new ResourceInstallationsNamespace(http);
|
|
795
920
|
this.clientDeployments = new ClientDeploymentsNamespace(http);
|
|
796
921
|
this.clientSessions = new ClientSessionsNamespace(http);
|
|
797
922
|
this.instructions = new InstructionsNamespace(http);
|
|
@@ -854,6 +979,7 @@ var SDK_OPERATION_IDS = [
|
|
|
854
979
|
"embed.delete_agent_thread",
|
|
855
980
|
"embed.get_agent_run_context",
|
|
856
981
|
"embed.get_agent_thread",
|
|
982
|
+
"embed.get_resource_policy",
|
|
857
983
|
"embed.get_runtime_bootstrap",
|
|
858
984
|
"embed.list_agent_threads",
|
|
859
985
|
"embed.list_agent_threads_multi",
|
|
@@ -870,6 +996,20 @@ var SDK_OPERATION_IDS = [
|
|
|
870
996
|
"resource_bundles.export_plan",
|
|
871
997
|
"resource_bundles.import",
|
|
872
998
|
"resource_bundles.import_preview",
|
|
999
|
+
"resource_installations.apply",
|
|
1000
|
+
"resource_installations.bind_deployment",
|
|
1001
|
+
"resource_installations.configure_secrets",
|
|
1002
|
+
"resource_installations.create",
|
|
1003
|
+
"resource_installations.development_session_status",
|
|
1004
|
+
"resource_installations.get",
|
|
1005
|
+
"resource_installations.link",
|
|
1006
|
+
"resource_installations.list",
|
|
1007
|
+
"resource_installations.operation_status",
|
|
1008
|
+
"resource_installations.plan",
|
|
1009
|
+
"resource_installations.prepare_development_session",
|
|
1010
|
+
"resource_installations.publish",
|
|
1011
|
+
"resource_installations.resources",
|
|
1012
|
+
"resource_installations.revoke_development_session",
|
|
873
1013
|
"resource_packages.compile",
|
|
874
1014
|
"resource_packages.export",
|
|
875
1015
|
"resource_packages.validate",
|