@agents24/node 0.5.31 → 0.5.32
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/compatibility.json +5 -5
- package/dist/artifacts.cjs +12 -0
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.d.cts +13 -1
- package/dist/artifacts.d.ts +13 -1
- package/dist/artifacts.js +12 -1
- package/dist/artifacts.js.map +1 -1
- package/dist/bff.cjs +185 -131
- package/dist/bff.cjs.map +1 -1
- package/dist/bff.d.cts +13 -7
- package/dist/bff.d.ts +13 -7
- package/dist/bff.js +185 -132
- package/dist/bff.js.map +1 -1
- package/dist/{client-vFBe6Sfx.d.cts → client-BhE-CjMz.d.cts} +65 -16
- package/dist/{client-vFBe6Sfx.d.ts → client-BhE-CjMz.d.ts} +65 -16
- package/dist/index.cjs +45 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +46 -5
- package/dist/index.js.map +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js.map +1 -1
- package/dist/types/artifacts.d.ts +12 -0
- package/dist/types/artifacts.d.ts.map +1 -1
- package/dist/types/bff-agent-resolution.d.ts +3 -0
- package/dist/types/bff-agent-resolution.d.ts.map +1 -1
- package/dist/types/bff-bootstrap.d.ts +17 -0
- package/dist/types/bff-bootstrap.d.ts.map +1 -0
- package/dist/types/bff-conversation-submission.d.ts +16 -0
- package/dist/types/bff-conversation-submission.d.ts.map +1 -0
- package/dist/types/bff-errors.d.ts +1 -1
- package/dist/types/bff-errors.d.ts.map +1 -1
- package/dist/types/bff-multi-agent.d.ts +11 -0
- package/dist/types/bff-multi-agent.d.ts.map +1 -0
- package/dist/types/bff-request.d.ts +3 -1
- package/dist/types/bff-request.d.ts.map +1 -1
- package/dist/types/bff-resolver.d.ts +9 -0
- package/dist/types/bff-resolver.d.ts.map +1 -0
- package/dist/types/bff-single-agent.d.ts +5 -0
- package/dist/types/bff-single-agent.d.ts.map +1 -0
- package/dist/types/bff.d.ts +2 -4
- package/dist/types/bff.d.ts.map +1 -1
- package/dist/types/embed-types.d.ts +1 -0
- package/dist/types/embed-types.d.ts.map +1 -1
- package/dist/types/embed.d.ts +2 -2
- package/dist/types/embed.d.ts.map +1 -1
- package/dist/types/generated/embed.d.ts +8 -0
- package/dist/types/generated/embed.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/streams.d.ts +1 -1
- package/dist/types/streams.d.ts.map +1 -1
- package/dist/types/types.d.ts +41 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import * as _agents24_client from '@agents24/client';
|
|
2
|
-
import { ClientInputFeature } from '@agents24/client';
|
|
3
1
|
import * as _agents24_client_protocol from '@agents24/client/protocol';
|
|
4
2
|
import { ToolInputOverrides, PublicResponseBlock, ContextWindow, RuntimeEvent, ThreadMessagesPage, ThreadMessageSubmission, ThreadMessage, RunCancelResult, AttachmentUploadResult, AttachmentContentAccess, RunResumeResult, ThreadsResponse, ThreadSummaryEvent, ThreadDetail, ThreadDeleteResult, RunContext } from '@agents24/client/protocol';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
source?: "exact" | "estimated" | "unknown";
|
|
8
|
-
input_tokens?: number | null;
|
|
9
|
-
output_tokens?: number | null;
|
|
10
|
-
total_tokens?: number;
|
|
11
|
-
cached_input_tokens?: number | null;
|
|
12
|
-
cache_write_input_tokens?: number | null;
|
|
13
|
-
cache_write_input_tokens_by_ttl?: Record<string, number>;
|
|
14
|
-
cached_output_tokens?: number | null;
|
|
15
|
-
reasoning_tokens?: number | null;
|
|
16
|
-
};
|
|
3
|
+
import * as _agents24_client from '@agents24/client';
|
|
4
|
+
import { ClientInputFeature } from '@agents24/client';
|
|
17
5
|
|
|
18
6
|
type EmbedStreamRequest = {
|
|
7
|
+
trusted_context?: Record<string, unknown>;
|
|
19
8
|
customer_tenant?: {
|
|
20
9
|
issuer: string;
|
|
21
10
|
subject: string;
|
|
@@ -340,6 +329,18 @@ type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
|
|
|
340
329
|
chatScope?: string;
|
|
341
330
|
};
|
|
342
331
|
|
|
332
|
+
type RunUsage = {
|
|
333
|
+
source?: "exact" | "estimated" | "unknown";
|
|
334
|
+
input_tokens?: number | null;
|
|
335
|
+
output_tokens?: number | null;
|
|
336
|
+
total_tokens?: number;
|
|
337
|
+
cached_input_tokens?: number | null;
|
|
338
|
+
cache_write_input_tokens?: number | null;
|
|
339
|
+
cache_write_input_tokens_by_ttl?: Record<string, number>;
|
|
340
|
+
cached_output_tokens?: number | null;
|
|
341
|
+
reasoning_tokens?: number | null;
|
|
342
|
+
};
|
|
343
|
+
|
|
343
344
|
type DelegationStatus = "queued" | "running" | "waiting" | "paused" | "interrupt_requested" | "interrupted" | "completed" | "failed" | "cancelling" | "cancelled";
|
|
344
345
|
interface DelegationCapabilities {
|
|
345
346
|
cancel: boolean;
|
|
@@ -601,6 +602,7 @@ type Agents24NodeOptions = {
|
|
|
601
602
|
/** @deprecated Use Agents24NodeOptions. */
|
|
602
603
|
type Agents24Options = Agents24NodeOptions;
|
|
603
604
|
type RequestOptions = {
|
|
605
|
+
streamFeatures?: string;
|
|
604
606
|
signal?: AbortSignal;
|
|
605
607
|
idempotencyKey?: string;
|
|
606
608
|
dryRun?: boolean;
|
|
@@ -611,6 +613,7 @@ type BackendSessionRequestOptions = RequestOptions & {
|
|
|
611
613
|
dpopProof?: string;
|
|
612
614
|
};
|
|
613
615
|
type StreamRequestOptions = RequestOptions & {
|
|
616
|
+
onPreview?: (frame: _agents24_client_protocol.AssistantPreview) => void | Promise<void>;
|
|
614
617
|
signal?: AbortSignal;
|
|
615
618
|
leaseSeconds?: number;
|
|
616
619
|
onControl?: (control: _agents24_client_protocol.ObservationControl) => void | Promise<void>;
|
|
@@ -1645,6 +1648,46 @@ type ArtifactRelayOptionsQuery = {
|
|
|
1645
1648
|
agentVersionId?: string;
|
|
1646
1649
|
};
|
|
1647
1650
|
|
|
1651
|
+
/** Server-only identity and allowlist, never accepted from browser payloads. */
|
|
1652
|
+
type EmbedRuntimeBootstrapRequest = {
|
|
1653
|
+
identity: EmbedCustomerPrincipalResolveRequest;
|
|
1654
|
+
agents: Array<{
|
|
1655
|
+
agent_id?: string;
|
|
1656
|
+
agent_alias?: string;
|
|
1657
|
+
agent_version_id?: string;
|
|
1658
|
+
}>;
|
|
1659
|
+
selected_agent?: string;
|
|
1660
|
+
runtime_target?: "draft" | "published";
|
|
1661
|
+
};
|
|
1662
|
+
type EmbedRuntimeBootstrapResult = {
|
|
1663
|
+
bootstrap: _agents24_client.ClientBootstrap;
|
|
1664
|
+
customer_principal_ref: string;
|
|
1665
|
+
resolved_agents: Array<{
|
|
1666
|
+
agent_id: string;
|
|
1667
|
+
agent_alias: string;
|
|
1668
|
+
agent_aliases: string[];
|
|
1669
|
+
agent_version_id?: string | null;
|
|
1670
|
+
}>;
|
|
1671
|
+
};
|
|
1672
|
+
type ExternalToolCompletionRequest = {
|
|
1673
|
+
artifact_id: string;
|
|
1674
|
+
completion_ref: string;
|
|
1675
|
+
external_job_ref: string;
|
|
1676
|
+
result: unknown;
|
|
1677
|
+
};
|
|
1678
|
+
type ExternalToolCompletionReceipt = {
|
|
1679
|
+
invocation_id: string;
|
|
1680
|
+
accepted: boolean;
|
|
1681
|
+
duplicate: boolean;
|
|
1682
|
+
};
|
|
1683
|
+
/** The BFF owns the returned readable response and must close/cancel its body. */
|
|
1684
|
+
type RuntimeSubmissionResponse = Response;
|
|
1685
|
+
type ConversationSubmissionRequest = Omit<EmbedStreamRequest, "thread_id"> & {
|
|
1686
|
+
agent_ids: string[];
|
|
1687
|
+
agent_versions?: Record<string, string>;
|
|
1688
|
+
requested_agent_id?: string;
|
|
1689
|
+
};
|
|
1690
|
+
|
|
1648
1691
|
type RequestConfig = {
|
|
1649
1692
|
method?: string;
|
|
1650
1693
|
query?: Record<string, unknown>;
|
|
@@ -1774,7 +1817,13 @@ declare class EmbedDelegationsNamespace {
|
|
|
1774
1817
|
actAgentDelegation(agentId: string, threadId: string, handle: string, request: DelegationActionRequest, options: EmbedDelegationOptions): Promise<DelegationActionReceipt>;
|
|
1775
1818
|
}
|
|
1776
1819
|
|
|
1777
|
-
declare class EmbedNamespace extends EmbedDelegationsNamespace {
|
|
1820
|
+
declare class EmbedNamespace$1 extends EmbedDelegationsNamespace {
|
|
1821
|
+
completeToolInvocation(invocationId: string, request: ExternalToolCompletionRequest, options?: RequestOptions): Promise<ExternalToolCompletionReceipt>;
|
|
1822
|
+
openConversationSubmission(threadId: string, request: ConversationSubmissionRequest, options?: RequestOptions): Promise<RuntimeSubmissionResponse>;
|
|
1823
|
+
bootstrapRuntime(request: EmbedRuntimeBootstrapRequest): Promise<EmbedRuntimeBootstrapResult>;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
declare class EmbedNamespace extends EmbedNamespace$1 {
|
|
1778
1827
|
constructor(http: Agents24HttpClient);
|
|
1779
1828
|
streamAgent(agentId: string, payload: EmbedStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
1780
1829
|
startAgentRun(agentId: string, payload: EmbedRunStartRequest, options?: RequestOptions): Promise<StartRunResult>;
|
|
@@ -2767,4 +2816,4 @@ declare class Agents24 extends GeneratedIntegrationNamespaces {
|
|
|
2767
2816
|
graph(): GraphBuilder;
|
|
2768
2817
|
}
|
|
2769
2818
|
|
|
2770
|
-
export { type
|
|
2819
|
+
export { type ConversationSubmissionRequest as $, Agents24 as A, type ArtifactRelayTicketRequest as B, type AttachRunRequest as C, type AttachmentContentAccessRequest as D, type EmbeddedRunSnapshot as E, type BackendSessionRequestOptions as F, type BranchingHint as G, type CapacityWait as H, type ClearCustomerResourcePolicyAssignmentResult as I, type ClientAuthMode as J, type ClientDeployment as K, type ClientDeploymentListQuery as L, type ClientDeploymentListResponse as M, type ClientNativeProfile as N, type ClientRuntimeNativeProfileInput as O, type ClientRuntimeOidcConfig as P, type ClientRuntimePolicyInput as Q, type RelayOptions as R, type ClientSessionCredentials as S, type ContentChunk as T, type ContentSegment as U, type ControlPlaneAgentRunRequest as V, type ControlPlaneRunEventsResponse as W, type ConversationRunRequest as X, type ConversationRunResult as Y, type ConversationRuntimeSelectionRequest as Z, type ConversationRuntimeSelectionResult as _, type AgentCreateRequest as a, type IngestionBatchPage as a$, type ConversationThreadOptions as a0, type CreateBackendClientSessionRequest as a1, type CreateClientDeploymentRequest as a2, type CustomerIdentityRequest as a3, type CustomerPrincipalRefRequest as a4, type CustomerProfile as a5, type CustomerProfileList as a6, type CustomerProfilePatch as a7, type CustomerProfileSearchOptions as a8, type CustomerResourcePolicyAssignment as a9, type EmbeddedResponseFeedbackInput as aA, type EvidenceLocation as aB, type ExternalToolCompletionReceipt as aC, type ExternalToolCompletionRequest as aD, type FailureCategory as aE, type FailureView as aF, type FeedbackRating as aG, type FeedbackReason as aH, type FileAssetReference as aI, GraphBuilder as aJ, type GraphDefinition as aK, type GraphEdge as aL, type GraphHints as aM, type GraphNode as aN, type GraphValueRef as aO, type HitlAction as aP, type HitlAnswer as aQ, type HostedArtifactDraft as aR, HostedArtifactsNamespace as aS, type IndexedCleanupAck as aT, type IndexedContent as aU, type IndexedContentListOptions as aV, type IndexedContentPage as aW, type IndexedRecordIdListOptions as aX, type IndexedRecordIdPage as aY, type IngestionBatch as aZ, type IngestionBatchListOptions as a_, type DelegationAction as aa, type DelegationActionReceipt as ab, type DelegationActionRequest as ac, type DelegationEvents as ad, type DelegationHistory as ae, type DelegationHistoryTurn as af, type DelegationStatus as ag, type DelegationTask as ah, type DelegationTaskList as ai, type EffectiveCustomerResourcePolicyRequest as aj, type EffectiveResourcePolicy as ak, type EmbedAgentAliasResolution as al, type EmbedAttachmentContentAccessRequest as am, type EmbedCustomerPrincipalResolveRequest as an, type EmbedCustomerPrincipalResolveResponse as ao, type EmbedDelegationOptions as ap, type EmbedResourcePolicyRequest as aq, type EmbedRunCancelOptions as ar, type EmbedRunStartRequest as as, type EmbedRuntimeBootstrap as at, type EmbedRuntimeBootstrapRequest as au, type EmbedRuntimeBootstrapResult as av, type EmbedStreamRequest as aw, type EmbedThreadMessageEdit as ax, type EmbedThreadMessageScope as ay, type EmbedThreadMessageSubmit as az, AgentDefinitionBuilder as b, type ProcessingInputSource as b$, type IngestionJob as b0, type IngestionJobAcknowledgment as b1, type IngestionJobGetOptions as b2, type IngestionJobListOptions as b3, type IngestionJobPage as b4, type IngestionJobStart as b5, type JobFieldData as b6, type JobPayloadDownload as b7, type JobResult as b8, type JobResultOptions as b9, type MultiAgentThreadListRequest as bA, type MultiAgentThreadSummaryEventOptions as bB, type NamespaceDataStats as bC, type NamespaceInput as bD, type NamespaceListOptions as bE, type NamespacePage as bF, type NamespaceSummary as bG, type NativePlatform as bH, type NodeAuthoringSpec as bI, type NodeCatalogItem as bJ, type NodeCatalogResponse as bK, type NodeSchemaResponse as bL, type OCROptions as bM, type PayloadAvailability as bN, type PipelineInputField as bO, type PipelineInputSchema as bP, type PipelineInputStep as bQ, type PipelineInputUpload as bR, type PipelineListOptions as bS, type PipelinePage as bT, type PipelineResultPage as bU, type PipelineSummary as bV, type PortableResourceKind as bW, type ProcessedContent as bX, type ProcessedContentOptions as bY, type ProcessedContentReference as bZ, type ProcessingInput as b_, type JobStep as ba, type JobStepData as bb, type JobStepDataOptions as bc, type JobStepDownloadOptions as bd, type JobStepFieldOptions as be, type JobSteps as bf, type KnowledgeStore as bg, type KnowledgeStoreChunking as bh, type KnowledgeStoreCreate as bi, type KnowledgeStoreListOptions as bj, type KnowledgeStoreNamespace as bk, type KnowledgeStorePage as bl, type KnowledgeStoreStats as bm, type KnowledgeStoreUpdate as bn, type LatestOrPinnedPolicy as bo, type McpAuthStartRequest as bp, type McpAuthStartResult as bq, type ModelCapabilitiesV1 as br, type ModelOffering as bs, type ModelPricingDimension as bt, type ModelProviderCreate as bu, type ModelProviderRoute as bv, type ModelRequirements as bw, type ModelRuntimeKind as bx, type ModelSummary as by, ModelsNamespace as bz, type AgentDefinitionOptions as c, type RetrievalEvidence as c$, type ProcessingProgress as c0, type PublishedExecutable as c1, type RagRetention as c2, type RawVectorMatch as c3, type RawVectorRecord as c4, type RecordBatchResult as c5, type RecordCapabilities as c6, type RecordDeleteRequest as c7, type RecordFetchRequest as c8, type RecordFetchResult as c9, type ResourceInstallationPullChange as cA, type ResourceInstallationPullPayload as cB, type ResourceInstallationPullPlan as cC, type ResourceInstallationResourceListOptions as cD, type ResourceInstallationSecretStatus as cE, type ResourceInstallationSecretsRequest as cF, type ResourcePackageArchive as cG, type ResourcePackageCandidateOptions as cH, type ResourcePackageDependency as cI, type ResourcePackageDiagnostic as cJ, type ResourcePackageExportPlan as cK, type ResourcePackageExportRequest as cL, type ResourcePackageImportPreview as cM, type ResourcePackageImportResult as cN, type ResourcePackageImportUpload as cO, type ResourcePackageUpload as cP, type ResourcePackageValidationResult as cQ, type ResourcePolicyList as cR, type ResourcePolicyQuotaSchedule as cS, type ResourcePolicyQuotaScheduleResult as cT, type ResourcePolicySubjectRef as cU, type ResourcePolicySummary as cV, type ResourceSelector as cW, type ResourceToolExport as cX, type ResponseFeedback as cY, type ResponseFeedbackResult as cZ, type ResumeRunRequest as c_, type RecordListRequest as ca, type RecordMutationAck as cb, type RecordPage as cc, type RecordQueryRequest as cd, type RecordQueryResult as ce, type RecordUpdateRequest as cf, type RecordUpsertRequest as cg, type RequestOptions as ch, type ResetResourcePolicyQuotaRequest as ci, type ResourceCallableBinding as cj, type ResourceCallableBindingStatus as ck, type ResourceCandidateList as cl, type ResourceInstallation as cm, type ResourceInstallationApplication as cn, type ResourceInstallationApplyRequest as co, type ResourceInstallationBinding as cp, type ResourceInstallationCreateRequest as cq, type ResourceInstallationDeploymentRequest as cr, type ResourceInstallationLinkRequest as cs, type ResourceInstallationList as ct, type ResourceInstallationOperation as cu, type ResourceInstallationPlan as cv, type ResourceInstallationPlanUpload as cw, type ResourceInstallationPublication as cx, type ResourceInstallationPublishRequest as cy, type ResourceInstallationPullAcceptRequest as cz, type AgentListResponse as d, type RunCancelOptions as d0, type RunContextOptions as d1, type RunExecutionLimits as d2, type RunStatus as d3, type RunTrace as d4, type RunUsage as d5, type RuntimeSubmissionResponse as d6, type ServerAttachmentUploadOptions as d7, type ServerEmbedAttachmentUploadOptions as d8, type SetCustomerResourcePolicyAssignmentRequest as d9, type UploadPartAck as dA, type UploadSession as dB, type UploadSessionStart as dC, type WaitForAgentRunOptions as dD, type WorkflowInputDefinition as dE, type SetResourcePolicyQuotaScheduleRequest as da, type SourceDescriptor as db, type SourceOutcome as dc, type StartRunResult as dd, type StateVariableDefinition as de, type StreamRequestOptions as df, type StreamResult as dg, type ThreadComputerContentAccess as dh, type ThreadComputerFile as di, type ThreadComputerFileOptions as dj, type ThreadComputerFileText as dk, type ThreadComputerFiles as dl, type ThreadComputerStatus as dm, type ThreadDeleteOptions as dn, type ThreadDetailOptions as dp, type ThreadListOptions as dq, type ThreadSummaryEventOptions as dr, type TraceContent as ds, type TraceError as dt, type TraceSpan as du, type TraceSpanKind as dv, type TraceSpanStatus as dw, type TraceView as dx, type UpdateClientDeploymentRequest as dy, type UploadPart as dz, 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 ArtifactRelayClientCreate as v, type ArtifactRelayClientList as w, type ArtifactRelayClientStatus as x, type ArtifactRelayConnectionTicket as y, type ArtifactRelayOptionsQuery as z };
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import * as _agents24_client from '@agents24/client';
|
|
2
|
-
import { ClientInputFeature } from '@agents24/client';
|
|
3
1
|
import * as _agents24_client_protocol from '@agents24/client/protocol';
|
|
4
2
|
import { ToolInputOverrides, PublicResponseBlock, ContextWindow, RuntimeEvent, ThreadMessagesPage, ThreadMessageSubmission, ThreadMessage, RunCancelResult, AttachmentUploadResult, AttachmentContentAccess, RunResumeResult, ThreadsResponse, ThreadSummaryEvent, ThreadDetail, ThreadDeleteResult, RunContext } from '@agents24/client/protocol';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
source?: "exact" | "estimated" | "unknown";
|
|
8
|
-
input_tokens?: number | null;
|
|
9
|
-
output_tokens?: number | null;
|
|
10
|
-
total_tokens?: number;
|
|
11
|
-
cached_input_tokens?: number | null;
|
|
12
|
-
cache_write_input_tokens?: number | null;
|
|
13
|
-
cache_write_input_tokens_by_ttl?: Record<string, number>;
|
|
14
|
-
cached_output_tokens?: number | null;
|
|
15
|
-
reasoning_tokens?: number | null;
|
|
16
|
-
};
|
|
3
|
+
import * as _agents24_client from '@agents24/client';
|
|
4
|
+
import { ClientInputFeature } from '@agents24/client';
|
|
17
5
|
|
|
18
6
|
type EmbedStreamRequest = {
|
|
7
|
+
trusted_context?: Record<string, unknown>;
|
|
19
8
|
customer_tenant?: {
|
|
20
9
|
issuer: string;
|
|
21
10
|
subject: string;
|
|
@@ -340,6 +329,18 @@ type ServerEmbedAttachmentUploadOptions = ServerAttachmentUploadOptions & {
|
|
|
340
329
|
chatScope?: string;
|
|
341
330
|
};
|
|
342
331
|
|
|
332
|
+
type RunUsage = {
|
|
333
|
+
source?: "exact" | "estimated" | "unknown";
|
|
334
|
+
input_tokens?: number | null;
|
|
335
|
+
output_tokens?: number | null;
|
|
336
|
+
total_tokens?: number;
|
|
337
|
+
cached_input_tokens?: number | null;
|
|
338
|
+
cache_write_input_tokens?: number | null;
|
|
339
|
+
cache_write_input_tokens_by_ttl?: Record<string, number>;
|
|
340
|
+
cached_output_tokens?: number | null;
|
|
341
|
+
reasoning_tokens?: number | null;
|
|
342
|
+
};
|
|
343
|
+
|
|
343
344
|
type DelegationStatus = "queued" | "running" | "waiting" | "paused" | "interrupt_requested" | "interrupted" | "completed" | "failed" | "cancelling" | "cancelled";
|
|
344
345
|
interface DelegationCapabilities {
|
|
345
346
|
cancel: boolean;
|
|
@@ -601,6 +602,7 @@ type Agents24NodeOptions = {
|
|
|
601
602
|
/** @deprecated Use Agents24NodeOptions. */
|
|
602
603
|
type Agents24Options = Agents24NodeOptions;
|
|
603
604
|
type RequestOptions = {
|
|
605
|
+
streamFeatures?: string;
|
|
604
606
|
signal?: AbortSignal;
|
|
605
607
|
idempotencyKey?: string;
|
|
606
608
|
dryRun?: boolean;
|
|
@@ -611,6 +613,7 @@ type BackendSessionRequestOptions = RequestOptions & {
|
|
|
611
613
|
dpopProof?: string;
|
|
612
614
|
};
|
|
613
615
|
type StreamRequestOptions = RequestOptions & {
|
|
616
|
+
onPreview?: (frame: _agents24_client_protocol.AssistantPreview) => void | Promise<void>;
|
|
614
617
|
signal?: AbortSignal;
|
|
615
618
|
leaseSeconds?: number;
|
|
616
619
|
onControl?: (control: _agents24_client_protocol.ObservationControl) => void | Promise<void>;
|
|
@@ -1645,6 +1648,46 @@ type ArtifactRelayOptionsQuery = {
|
|
|
1645
1648
|
agentVersionId?: string;
|
|
1646
1649
|
};
|
|
1647
1650
|
|
|
1651
|
+
/** Server-only identity and allowlist, never accepted from browser payloads. */
|
|
1652
|
+
type EmbedRuntimeBootstrapRequest = {
|
|
1653
|
+
identity: EmbedCustomerPrincipalResolveRequest;
|
|
1654
|
+
agents: Array<{
|
|
1655
|
+
agent_id?: string;
|
|
1656
|
+
agent_alias?: string;
|
|
1657
|
+
agent_version_id?: string;
|
|
1658
|
+
}>;
|
|
1659
|
+
selected_agent?: string;
|
|
1660
|
+
runtime_target?: "draft" | "published";
|
|
1661
|
+
};
|
|
1662
|
+
type EmbedRuntimeBootstrapResult = {
|
|
1663
|
+
bootstrap: _agents24_client.ClientBootstrap;
|
|
1664
|
+
customer_principal_ref: string;
|
|
1665
|
+
resolved_agents: Array<{
|
|
1666
|
+
agent_id: string;
|
|
1667
|
+
agent_alias: string;
|
|
1668
|
+
agent_aliases: string[];
|
|
1669
|
+
agent_version_id?: string | null;
|
|
1670
|
+
}>;
|
|
1671
|
+
};
|
|
1672
|
+
type ExternalToolCompletionRequest = {
|
|
1673
|
+
artifact_id: string;
|
|
1674
|
+
completion_ref: string;
|
|
1675
|
+
external_job_ref: string;
|
|
1676
|
+
result: unknown;
|
|
1677
|
+
};
|
|
1678
|
+
type ExternalToolCompletionReceipt = {
|
|
1679
|
+
invocation_id: string;
|
|
1680
|
+
accepted: boolean;
|
|
1681
|
+
duplicate: boolean;
|
|
1682
|
+
};
|
|
1683
|
+
/** The BFF owns the returned readable response and must close/cancel its body. */
|
|
1684
|
+
type RuntimeSubmissionResponse = Response;
|
|
1685
|
+
type ConversationSubmissionRequest = Omit<EmbedStreamRequest, "thread_id"> & {
|
|
1686
|
+
agent_ids: string[];
|
|
1687
|
+
agent_versions?: Record<string, string>;
|
|
1688
|
+
requested_agent_id?: string;
|
|
1689
|
+
};
|
|
1690
|
+
|
|
1648
1691
|
type RequestConfig = {
|
|
1649
1692
|
method?: string;
|
|
1650
1693
|
query?: Record<string, unknown>;
|
|
@@ -1774,7 +1817,13 @@ declare class EmbedDelegationsNamespace {
|
|
|
1774
1817
|
actAgentDelegation(agentId: string, threadId: string, handle: string, request: DelegationActionRequest, options: EmbedDelegationOptions): Promise<DelegationActionReceipt>;
|
|
1775
1818
|
}
|
|
1776
1819
|
|
|
1777
|
-
declare class EmbedNamespace extends EmbedDelegationsNamespace {
|
|
1820
|
+
declare class EmbedNamespace$1 extends EmbedDelegationsNamespace {
|
|
1821
|
+
completeToolInvocation(invocationId: string, request: ExternalToolCompletionRequest, options?: RequestOptions): Promise<ExternalToolCompletionReceipt>;
|
|
1822
|
+
openConversationSubmission(threadId: string, request: ConversationSubmissionRequest, options?: RequestOptions): Promise<RuntimeSubmissionResponse>;
|
|
1823
|
+
bootstrapRuntime(request: EmbedRuntimeBootstrapRequest): Promise<EmbedRuntimeBootstrapResult>;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
declare class EmbedNamespace extends EmbedNamespace$1 {
|
|
1778
1827
|
constructor(http: Agents24HttpClient);
|
|
1779
1828
|
streamAgent(agentId: string, payload: EmbedStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
|
|
1780
1829
|
startAgentRun(agentId: string, payload: EmbedRunStartRequest, options?: RequestOptions): Promise<StartRunResult>;
|
|
@@ -2767,4 +2816,4 @@ declare class Agents24 extends GeneratedIntegrationNamespaces {
|
|
|
2767
2816
|
graph(): GraphBuilder;
|
|
2768
2817
|
}
|
|
2769
2818
|
|
|
2770
|
-
export { type
|
|
2819
|
+
export { type ConversationSubmissionRequest as $, Agents24 as A, type ArtifactRelayTicketRequest as B, type AttachRunRequest as C, type AttachmentContentAccessRequest as D, type EmbeddedRunSnapshot as E, type BackendSessionRequestOptions as F, type BranchingHint as G, type CapacityWait as H, type ClearCustomerResourcePolicyAssignmentResult as I, type ClientAuthMode as J, type ClientDeployment as K, type ClientDeploymentListQuery as L, type ClientDeploymentListResponse as M, type ClientNativeProfile as N, type ClientRuntimeNativeProfileInput as O, type ClientRuntimeOidcConfig as P, type ClientRuntimePolicyInput as Q, type RelayOptions as R, type ClientSessionCredentials as S, type ContentChunk as T, type ContentSegment as U, type ControlPlaneAgentRunRequest as V, type ControlPlaneRunEventsResponse as W, type ConversationRunRequest as X, type ConversationRunResult as Y, type ConversationRuntimeSelectionRequest as Z, type ConversationRuntimeSelectionResult as _, type AgentCreateRequest as a, type IngestionBatchPage as a$, type ConversationThreadOptions as a0, type CreateBackendClientSessionRequest as a1, type CreateClientDeploymentRequest as a2, type CustomerIdentityRequest as a3, type CustomerPrincipalRefRequest as a4, type CustomerProfile as a5, type CustomerProfileList as a6, type CustomerProfilePatch as a7, type CustomerProfileSearchOptions as a8, type CustomerResourcePolicyAssignment as a9, type EmbeddedResponseFeedbackInput as aA, type EvidenceLocation as aB, type ExternalToolCompletionReceipt as aC, type ExternalToolCompletionRequest as aD, type FailureCategory as aE, type FailureView as aF, type FeedbackRating as aG, type FeedbackReason as aH, type FileAssetReference as aI, GraphBuilder as aJ, type GraphDefinition as aK, type GraphEdge as aL, type GraphHints as aM, type GraphNode as aN, type GraphValueRef as aO, type HitlAction as aP, type HitlAnswer as aQ, type HostedArtifactDraft as aR, HostedArtifactsNamespace as aS, type IndexedCleanupAck as aT, type IndexedContent as aU, type IndexedContentListOptions as aV, type IndexedContentPage as aW, type IndexedRecordIdListOptions as aX, type IndexedRecordIdPage as aY, type IngestionBatch as aZ, type IngestionBatchListOptions as a_, type DelegationAction as aa, type DelegationActionReceipt as ab, type DelegationActionRequest as ac, type DelegationEvents as ad, type DelegationHistory as ae, type DelegationHistoryTurn as af, type DelegationStatus as ag, type DelegationTask as ah, type DelegationTaskList as ai, type EffectiveCustomerResourcePolicyRequest as aj, type EffectiveResourcePolicy as ak, type EmbedAgentAliasResolution as al, type EmbedAttachmentContentAccessRequest as am, type EmbedCustomerPrincipalResolveRequest as an, type EmbedCustomerPrincipalResolveResponse as ao, type EmbedDelegationOptions as ap, type EmbedResourcePolicyRequest as aq, type EmbedRunCancelOptions as ar, type EmbedRunStartRequest as as, type EmbedRuntimeBootstrap as at, type EmbedRuntimeBootstrapRequest as au, type EmbedRuntimeBootstrapResult as av, type EmbedStreamRequest as aw, type EmbedThreadMessageEdit as ax, type EmbedThreadMessageScope as ay, type EmbedThreadMessageSubmit as az, AgentDefinitionBuilder as b, type ProcessingInputSource as b$, type IngestionJob as b0, type IngestionJobAcknowledgment as b1, type IngestionJobGetOptions as b2, type IngestionJobListOptions as b3, type IngestionJobPage as b4, type IngestionJobStart as b5, type JobFieldData as b6, type JobPayloadDownload as b7, type JobResult as b8, type JobResultOptions as b9, type MultiAgentThreadListRequest as bA, type MultiAgentThreadSummaryEventOptions as bB, type NamespaceDataStats as bC, type NamespaceInput as bD, type NamespaceListOptions as bE, type NamespacePage as bF, type NamespaceSummary as bG, type NativePlatform as bH, type NodeAuthoringSpec as bI, type NodeCatalogItem as bJ, type NodeCatalogResponse as bK, type NodeSchemaResponse as bL, type OCROptions as bM, type PayloadAvailability as bN, type PipelineInputField as bO, type PipelineInputSchema as bP, type PipelineInputStep as bQ, type PipelineInputUpload as bR, type PipelineListOptions as bS, type PipelinePage as bT, type PipelineResultPage as bU, type PipelineSummary as bV, type PortableResourceKind as bW, type ProcessedContent as bX, type ProcessedContentOptions as bY, type ProcessedContentReference as bZ, type ProcessingInput as b_, type JobStep as ba, type JobStepData as bb, type JobStepDataOptions as bc, type JobStepDownloadOptions as bd, type JobStepFieldOptions as be, type JobSteps as bf, type KnowledgeStore as bg, type KnowledgeStoreChunking as bh, type KnowledgeStoreCreate as bi, type KnowledgeStoreListOptions as bj, type KnowledgeStoreNamespace as bk, type KnowledgeStorePage as bl, type KnowledgeStoreStats as bm, type KnowledgeStoreUpdate as bn, type LatestOrPinnedPolicy as bo, type McpAuthStartRequest as bp, type McpAuthStartResult as bq, type ModelCapabilitiesV1 as br, type ModelOffering as bs, type ModelPricingDimension as bt, type ModelProviderCreate as bu, type ModelProviderRoute as bv, type ModelRequirements as bw, type ModelRuntimeKind as bx, type ModelSummary as by, ModelsNamespace as bz, type AgentDefinitionOptions as c, type RetrievalEvidence as c$, type ProcessingProgress as c0, type PublishedExecutable as c1, type RagRetention as c2, type RawVectorMatch as c3, type RawVectorRecord as c4, type RecordBatchResult as c5, type RecordCapabilities as c6, type RecordDeleteRequest as c7, type RecordFetchRequest as c8, type RecordFetchResult as c9, type ResourceInstallationPullChange as cA, type ResourceInstallationPullPayload as cB, type ResourceInstallationPullPlan as cC, type ResourceInstallationResourceListOptions as cD, type ResourceInstallationSecretStatus as cE, type ResourceInstallationSecretsRequest as cF, type ResourcePackageArchive as cG, type ResourcePackageCandidateOptions as cH, type ResourcePackageDependency as cI, type ResourcePackageDiagnostic as cJ, type ResourcePackageExportPlan as cK, type ResourcePackageExportRequest as cL, type ResourcePackageImportPreview as cM, type ResourcePackageImportResult as cN, type ResourcePackageImportUpload as cO, type ResourcePackageUpload as cP, type ResourcePackageValidationResult as cQ, type ResourcePolicyList as cR, type ResourcePolicyQuotaSchedule as cS, type ResourcePolicyQuotaScheduleResult as cT, type ResourcePolicySubjectRef as cU, type ResourcePolicySummary as cV, type ResourceSelector as cW, type ResourceToolExport as cX, type ResponseFeedback as cY, type ResponseFeedbackResult as cZ, type ResumeRunRequest as c_, type RecordListRequest as ca, type RecordMutationAck as cb, type RecordPage as cc, type RecordQueryRequest as cd, type RecordQueryResult as ce, type RecordUpdateRequest as cf, type RecordUpsertRequest as cg, type RequestOptions as ch, type ResetResourcePolicyQuotaRequest as ci, type ResourceCallableBinding as cj, type ResourceCallableBindingStatus as ck, type ResourceCandidateList as cl, type ResourceInstallation as cm, type ResourceInstallationApplication as cn, type ResourceInstallationApplyRequest as co, type ResourceInstallationBinding as cp, type ResourceInstallationCreateRequest as cq, type ResourceInstallationDeploymentRequest as cr, type ResourceInstallationLinkRequest as cs, type ResourceInstallationList as ct, type ResourceInstallationOperation as cu, type ResourceInstallationPlan as cv, type ResourceInstallationPlanUpload as cw, type ResourceInstallationPublication as cx, type ResourceInstallationPublishRequest as cy, type ResourceInstallationPullAcceptRequest as cz, type AgentListResponse as d, type RunCancelOptions as d0, type RunContextOptions as d1, type RunExecutionLimits as d2, type RunStatus as d3, type RunTrace as d4, type RunUsage as d5, type RuntimeSubmissionResponse as d6, type ServerAttachmentUploadOptions as d7, type ServerEmbedAttachmentUploadOptions as d8, type SetCustomerResourcePolicyAssignmentRequest as d9, type UploadPartAck as dA, type UploadSession as dB, type UploadSessionStart as dC, type WaitForAgentRunOptions as dD, type WorkflowInputDefinition as dE, type SetResourcePolicyQuotaScheduleRequest as da, type SourceDescriptor as db, type SourceOutcome as dc, type StartRunResult as dd, type StateVariableDefinition as de, type StreamRequestOptions as df, type StreamResult as dg, type ThreadComputerContentAccess as dh, type ThreadComputerFile as di, type ThreadComputerFileOptions as dj, type ThreadComputerFileText as dk, type ThreadComputerFiles as dl, type ThreadComputerStatus as dm, type ThreadDeleteOptions as dn, type ThreadDetailOptions as dp, type ThreadListOptions as dq, type ThreadSummaryEventOptions as dr, type TraceContent as ds, type TraceError as dt, type TraceSpan as du, type TraceSpanKind as dv, type TraceSpanStatus as dw, type TraceView as dx, type UpdateClientDeploymentRequest as dy, type UploadPart as dz, 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 ArtifactRelayClientCreate as v, type ArtifactRelayClientList as w, type ArtifactRelayClientStatus as x, type ArtifactRelayConnectionTicket as y, type ArtifactRelayOptionsQuery as z };
|
package/dist/index.cjs
CHANGED
|
@@ -195,8 +195,18 @@ async function consumePayloads(response, onPayload, signal, onControl) {
|
|
|
195
195
|
reader.releaseLock();
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
async function consumeRuntimeEventStream(response, onEvent, signal, onControl) {
|
|
198
|
+
async function consumeRuntimeEventStream(response, onEvent, signal, onControl, onPreview) {
|
|
199
199
|
await consumePayloads(response, async (payload) => {
|
|
200
|
+
if (payload.includes('"assistant-preview.v1"')) {
|
|
201
|
+
const value = protocol.parseProtocolJson(payload);
|
|
202
|
+
if (value?.version === "assistant-preview.v1") {
|
|
203
|
+
const preview = protocol.parseAssistantPreview(value);
|
|
204
|
+
if (preview) {
|
|
205
|
+
await onPreview?.(preview);
|
|
206
|
+
}
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
200
210
|
const event = protocol.parseRuntimeSsePayload(payload);
|
|
201
211
|
if (onEvent) await onEvent(event);
|
|
202
212
|
}, signal, onControl);
|
|
@@ -650,7 +660,34 @@ var EmbedDelegationsNamespace = class {
|
|
|
650
660
|
});
|
|
651
661
|
}
|
|
652
662
|
};
|
|
663
|
+
|
|
664
|
+
// src/generated/embed.ts
|
|
653
665
|
var EmbedNamespace = class extends EmbedDelegationsNamespace {
|
|
666
|
+
completeToolInvocation(invocationId, request, options) {
|
|
667
|
+
return this.http.requestJson(`/public/embed/tool-invocations/${encodeURIComponent(invocationId)}/completion`, {
|
|
668
|
+
method: "POST",
|
|
669
|
+
body: request,
|
|
670
|
+
options,
|
|
671
|
+
mutation: true
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
async openConversationSubmission(threadId, request, options) {
|
|
675
|
+
const response = await this.http.fetchOrThrow(
|
|
676
|
+
this.http.url(`/public/embed/threads/${encodeURIComponent(threadId)}/messages/stream`, { stream_features: options?.streamFeatures ?? "assistant-completion-v1" }),
|
|
677
|
+
{ method: "POST", headers: this.http.streamHeaders(void 0, options, true), body: JSON.stringify(request), signal: options?.signal },
|
|
678
|
+
"Failed to connect to the conversation endpoint."
|
|
679
|
+
);
|
|
680
|
+
await assertOk(response);
|
|
681
|
+
return response;
|
|
682
|
+
}
|
|
683
|
+
bootstrapRuntime(request) {
|
|
684
|
+
return this.http.requestJson("/public/embed/runtime/bootstrap", {
|
|
685
|
+
method: "POST",
|
|
686
|
+
body: request
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
var EmbedNamespace2 = class extends EmbedNamespace {
|
|
654
691
|
constructor(http) {
|
|
655
692
|
super(http);
|
|
656
693
|
}
|
|
@@ -660,6 +697,7 @@ var EmbedNamespace = class extends EmbedDelegationsNamespace {
|
|
|
660
697
|
startAgentRun(agentId, payload, options) {
|
|
661
698
|
return this.http.requestJson(`/public/embed/agents/${agentId}/runs`, {
|
|
662
699
|
method: "POST",
|
|
700
|
+
query: { stream_features: options?.streamFeatures },
|
|
663
701
|
body: this.namespacePayload(payload),
|
|
664
702
|
options,
|
|
665
703
|
mutation: true
|
|
@@ -679,7 +717,7 @@ var EmbedNamespace = class extends EmbedDelegationsNamespace {
|
|
|
679
717
|
};
|
|
680
718
|
}
|
|
681
719
|
async stream(path, payload, onEvent, options) {
|
|
682
|
-
const response = await this.http.fetchOrThrow(this.http.url(path, { stream_features: "assistant-completion-v1", lease_seconds: options.leaseSeconds }), {
|
|
720
|
+
const response = await this.http.fetchOrThrow(this.http.url(path, { stream_features: options.streamFeatures ?? "assistant-completion-v1", lease_seconds: options.leaseSeconds }), {
|
|
683
721
|
method: "POST",
|
|
684
722
|
headers: this.http.streamHeaders(void 0, options, true),
|
|
685
723
|
body: JSON.stringify(this.namespacePayload(payload)),
|
|
@@ -703,7 +741,7 @@ var EmbedNamespace = class extends EmbedDelegationsNamespace {
|
|
|
703
741
|
await consumeRuntimeEventStream(response, async (event) => {
|
|
704
742
|
runId ||= event.run_id;
|
|
705
743
|
if (onEvent) await onEvent(event);
|
|
706
|
-
}, options.signal);
|
|
744
|
+
}, options.signal, options.onControl, options.onPreview);
|
|
707
745
|
return { threadId: response.headers.get("X-Thread-ID"), runId };
|
|
708
746
|
}
|
|
709
747
|
resumeAgentRun(agentId, runId, payload, options) {
|
|
@@ -1951,7 +1989,7 @@ var Agents24 = class extends GeneratedIntegrationNamespaces {
|
|
|
1951
1989
|
super(http);
|
|
1952
1990
|
this.agents = new AgentsNamespace(http);
|
|
1953
1991
|
this.relayClients = new RelayClientsNamespace(http);
|
|
1954
|
-
this.embed = new
|
|
1992
|
+
this.embed = new EmbedNamespace2(http);
|
|
1955
1993
|
this.runs = new RunsNamespace(http);
|
|
1956
1994
|
this.delegations = new DelegationsNamespace(http);
|
|
1957
1995
|
this.resourcePackages = new ResourcePackagesNamespace(http);
|
|
@@ -2039,7 +2077,9 @@ var SDK_OPERATION_IDS = [
|
|
|
2039
2077
|
"delegations.inspect",
|
|
2040
2078
|
"delegations.list",
|
|
2041
2079
|
"embed.attach_agent_run",
|
|
2080
|
+
"embed.bootstrap_runtime",
|
|
2042
2081
|
"embed.cancel_agent_run",
|
|
2082
|
+
"embed.complete_tool_invocation",
|
|
2043
2083
|
"embed.create_agent_computer_content_access",
|
|
2044
2084
|
"embed.create_attachment_content_access",
|
|
2045
2085
|
"embed.create_conversation_computer_content_access",
|
|
@@ -2057,6 +2097,7 @@ var SDK_OPERATION_IDS = [
|
|
|
2057
2097
|
"embed.list_agent_threads",
|
|
2058
2098
|
"embed.list_agent_threads_multi",
|
|
2059
2099
|
"embed.list_conversation_computer_files",
|
|
2100
|
+
"embed.open_conversation_submission",
|
|
2060
2101
|
"embed.read_agent_computer_file",
|
|
2061
2102
|
"embed.read_conversation_computer_file",
|
|
2062
2103
|
"embed.resolve_agent_alias",
|