@agents24/node 0.5.7 → 0.5.9

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.
@@ -52,14 +52,22 @@ type AgentStreamRequest = {
52
52
  tool_inputs?: ToolInputOverrides;
53
53
  requested_model_id?: string;
54
54
  requested_model_node_id?: string;
55
- external_user_id?: string;
56
- external_session_id?: string;
57
- metadata?: Record<string, unknown>;
58
55
  client?: Record<string, unknown>;
59
56
  node_state?: Record<string, unknown>;
60
57
  runtime_target?: "draft" | "published";
61
58
  agent_version_id?: string;
62
59
  };
60
+ type ControlPlaneAgentRunRequest = {
61
+ input?: string;
62
+ messages?: Array<Record<string, unknown>>;
63
+ thread_id?: string;
64
+ runtime_context?: Record<string, unknown>;
65
+ tool_inputs?: ToolInputOverrides;
66
+ requested_model_id?: string;
67
+ requested_model_node_id?: string;
68
+ runtime_target?: "draft" | "published";
69
+ agent_version_id?: string;
70
+ };
63
71
  type StreamResult = {
64
72
  threadId: string | null;
65
73
  runId: string | null;
@@ -70,7 +78,6 @@ type EmbedStreamRequest = {
70
78
  messages?: Array<Record<string, unknown>>;
71
79
  attachment_ids?: string[];
72
80
  thread_id?: string;
73
- runtime_context?: Record<string, unknown>;
74
81
  tool_inputs?: ToolInputOverrides;
75
82
  requested_model_id?: string;
76
83
  requested_model_node_id?: string;
@@ -81,6 +88,9 @@ type EmbedStreamRequest = {
81
88
  runtime_target?: "draft" | "published";
82
89
  integration_id: string;
83
90
  };
91
+ type EmbedRunStartRequest = Omit<EmbedStreamRequest, "thread_id"> & {
92
+ thread_id?: string;
93
+ };
84
94
  type AttachRunRequest = {
85
95
  external_user_id: string;
86
96
  external_session_id?: string;
@@ -1207,7 +1217,7 @@ declare class AgentsNamespace {
1207
1217
  schema(nodeTypes: string[]): Promise<NodeSchemaResponse>;
1208
1218
  validate(agentId: string): Promise<AgentValidationResult>;
1209
1219
  publish(agentId: string, options?: RequestOptions): Promise<AgentResponse>;
1210
- startRun(agentId: string, payload: AgentStreamRequest, options?: RequestOptions): Promise<StartRunResult>;
1220
+ startRun(agentId: string, payload: ControlPlaneAgentRunRequest, options?: RequestOptions): Promise<StartRunResult>;
1211
1221
  stream(agentId: string, payload: AgentStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, mode?: "debug" | "production" | string, options?: StreamRequestOptions): Promise<StreamResult>;
1212
1222
  resumeRun(runId: string, payload: Record<string, unknown>, options?: RequestOptions): Promise<Record<string, unknown>>;
1213
1223
  cancelRun(runId: string, options?: RunCancelOptions): Promise<RunCancelResult>;
@@ -1261,6 +1271,7 @@ declare class EmbedNamespace {
1261
1271
  private readonly http;
1262
1272
  constructor(http: Agents24HttpClient);
1263
1273
  streamAgent(agentId: string, payload: EmbedStreamRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
1274
+ startAgentRun(agentId: string, payload: EmbedRunStartRequest, options?: RequestOptions): Promise<StartRunResult>;
1264
1275
  attachAgentRun(agentId: string, runId: string, payload: AttachRunRequest, onEvent?: (event: RuntimeEvent) => void | Promise<void>, options?: StreamRequestOptions): Promise<StreamResult>;
1265
1276
  private stream;
1266
1277
  resumeAgentRun(agentId: string, runId: string, payload: ResumeRunRequest, options?: RequestOptions): Promise<RunResumeResult>;
@@ -1381,4 +1392,4 @@ declare class Agents24 {
1381
1392
  graph(): GraphBuilder;
1382
1393
  }
1383
1394
 
1384
- export { type EmbedAgentAliasResolution 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 ConversationRunRequest as L, type ConversationRunResult as M, type ConversationRuntimeSelectionRequest as N, type ConversationRuntimeSelectionResult as O, type ConversationThreadOptions as P, type CreateBackendClientSessionRequest as Q, type CreateClientDeploymentRequest as R, type CustomerIdentityRequest as S, type CustomerPrincipalRefRequest as T, type CustomerProfile as U, type CustomerProfileList as V, type CustomerProfilePatch as W, type CustomerProfileSearchOptions as X, type CustomerResourcePolicyAssignment as Y, type EffectiveCustomerResourcePolicyRequest as Z, type EffectiveResourcePolicy as _, type AgentCreateRequest as a, type ResourcePackageImportUpload as a$, type EmbedAttachmentContentAccessRequest as a0, type EmbedCustomerPrincipalResolveRequest as a1, type EmbedCustomerPrincipalResolveResponse as a2, type EmbedResourcePolicyRequest as a3, type EmbedRunCancelOptions as a4, type EmbedRuntimeBootstrap as a5, type EmbedStreamRequest as a6, type EmbeddedResponseFeedbackInput as a7, type FailureCategory as a8, type FailureView as a9, type ResourceInstallation as aA, type ResourceInstallationApplyRequest as aB, type ResourceInstallationBinding as aC, type ResourceInstallationCreateRequest as aD, type ResourceInstallationDeploymentRequest as aE, type ResourceInstallationLinkRequest as aF, type ResourceInstallationList as aG, type ResourceInstallationOperation as aH, type ResourceInstallationPlan as aI, type ResourceInstallationPlanUpload as aJ, type ResourceInstallationPublication as aK, type ResourceInstallationPublishRequest as aL, type ResourceInstallationPullAcceptRequest as aM, type ResourceInstallationPullChange as aN, type ResourceInstallationPullPayload as aO, type ResourceInstallationPullPlan as aP, type ResourceInstallationResourceListOptions as aQ, type ResourceInstallationSecretStatus as aR, type ResourceInstallationSecretsRequest as aS, type ResourcePackageArchive as aT, type ResourcePackageCandidateOptions as aU, type ResourcePackageDependency as aV, type ResourcePackageDiagnostic as aW, type ResourcePackageExportPlan as aX, type ResourcePackageExportRequest as aY, type ResourcePackageImportPreview as aZ, type ResourcePackageImportResult as a_, type FeedbackRating as aa, type FeedbackReason as ab, GraphBuilder as ac, type GraphDefinition as ad, type GraphEdge as ae, type GraphHints as af, type GraphNode as ag, type GraphValueRef as ah, type HitlAction as ai, type HitlAnswer as aj, type LatestOrPinnedPolicy as ak, type McpAuthStartRequest as al, type McpAuthStartResult as am, type MultiAgentThreadListRequest as an, type MultiAgentThreadSummaryEventOptions as ao, type NativePlatform as ap, type NodeAuthoringSpec as aq, type NodeCatalogItem as ar, type NodeCatalogResponse as as, type NodeSchemaResponse as at, type PortableResourceKind as au, type RequestOptions as av, type ResetResourcePolicyQuotaRequest as aw, type ResourceCallableBinding as ax, type ResourceCallableBindingStatus as ay, type ResourceCandidateList as az, AgentDefinitionBuilder as b, type ResourcePackageUpload as b0, type ResourcePackageValidationResult as b1, type ResourcePolicyList as b2, type ResourcePolicyQuotaSchedule as b3, type ResourcePolicyQuotaScheduleResult as b4, type ResourcePolicySubjectRef as b5, type ResourcePolicySummary as b6, type ResourceSelector as b7, type ResourceToolExport as b8, type ResponseFeedback as b9, type ResponseFeedbackResult as ba, type ResumeRunRequest as bb, type RunCancelOptions as bc, type RunContextOptions as bd, type RunStatus as be, type RunTrace as bf, type ServerAttachmentUploadOptions as bg, type ServerEmbedAttachmentUploadOptions as bh, type SetCustomerResourcePolicyAssignmentRequest as bi, type SetResourcePolicyQuotaScheduleRequest as bj, type StartRunResult as bk, type StateVariableDefinition as bl, type StreamRequestOptions as bm, type StreamResult as bn, type ThreadDeleteOptions as bo, type ThreadDetailOptions as bp, type ThreadListOptions as bq, type ThreadSummaryEventOptions as br, type TraceContent as bs, type TraceError as bt, type TraceSpan as bu, type TraceSpanKind as bv, type TraceSpanStatus as bw, type TraceView as bx, type UpdateClientDeploymentRequest as by, type WorkflowInputDefinition as bz, 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 };
1395
+ export { type EffectiveResourcePolicy 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 ControlPlaneAgentRunRequest as K, type ControlPlaneRunEventsResponse as L, type ConversationRunRequest as M, type ConversationRunResult as N, type ConversationRuntimeSelectionRequest as O, type ConversationRuntimeSelectionResult as P, type ConversationThreadOptions as Q, type CreateBackendClientSessionRequest as R, type CreateClientDeploymentRequest as S, type CustomerIdentityRequest as T, type CustomerPrincipalRefRequest as U, type CustomerProfile as V, type CustomerProfileList as W, type CustomerProfilePatch as X, type CustomerProfileSearchOptions as Y, type CustomerResourcePolicyAssignment as Z, type EffectiveCustomerResourcePolicyRequest as _, type AgentCreateRequest as a, type ResourcePackageImportPreview as a$, type EmbedAgentAliasResolution as a0, type EmbedAttachmentContentAccessRequest as a1, type EmbedCustomerPrincipalResolveRequest as a2, type EmbedCustomerPrincipalResolveResponse as a3, type EmbedResourcePolicyRequest as a4, type EmbedRunCancelOptions as a5, type EmbedRunStartRequest as a6, type EmbedRuntimeBootstrap as a7, type EmbedStreamRequest as a8, type EmbeddedResponseFeedbackInput as a9, type ResourceCallableBindingStatus as aA, type ResourceCandidateList as aB, type ResourceInstallation as aC, type ResourceInstallationApplyRequest as aD, type ResourceInstallationBinding as aE, type ResourceInstallationCreateRequest as aF, type ResourceInstallationDeploymentRequest as aG, type ResourceInstallationLinkRequest as aH, type ResourceInstallationList as aI, type ResourceInstallationOperation as aJ, type ResourceInstallationPlan as aK, type ResourceInstallationPlanUpload as aL, type ResourceInstallationPublication as aM, type ResourceInstallationPublishRequest as aN, type ResourceInstallationPullAcceptRequest as aO, type ResourceInstallationPullChange as aP, type ResourceInstallationPullPayload as aQ, type ResourceInstallationPullPlan as aR, type ResourceInstallationResourceListOptions as aS, type ResourceInstallationSecretStatus as aT, type ResourceInstallationSecretsRequest as aU, type ResourcePackageArchive as aV, type ResourcePackageCandidateOptions as aW, type ResourcePackageDependency as aX, type ResourcePackageDiagnostic as aY, type ResourcePackageExportPlan as aZ, type ResourcePackageExportRequest as a_, type FailureCategory as aa, type FailureView as ab, type FeedbackRating as ac, type FeedbackReason as ad, GraphBuilder as ae, type GraphDefinition as af, type GraphEdge as ag, type GraphHints as ah, type GraphNode as ai, type GraphValueRef as aj, type HitlAction as ak, type HitlAnswer as al, type LatestOrPinnedPolicy as am, type McpAuthStartRequest as an, type McpAuthStartResult as ao, type MultiAgentThreadListRequest as ap, type MultiAgentThreadSummaryEventOptions as aq, type NativePlatform as ar, type NodeAuthoringSpec as as, type NodeCatalogItem as at, type NodeCatalogResponse as au, type NodeSchemaResponse as av, type PortableResourceKind as aw, type RequestOptions as ax, type ResetResourcePolicyQuotaRequest as ay, type ResourceCallableBinding as az, AgentDefinitionBuilder as b, type ResourcePackageImportResult as b0, type ResourcePackageImportUpload as b1, type ResourcePackageUpload as b2, type ResourcePackageValidationResult as b3, type ResourcePolicyList as b4, type ResourcePolicyQuotaSchedule as b5, type ResourcePolicyQuotaScheduleResult as b6, type ResourcePolicySubjectRef as b7, type ResourcePolicySummary as b8, type ResourceSelector as b9, type UpdateClientDeploymentRequest as bA, type WorkflowInputDefinition as bB, type ResourceToolExport as ba, type ResponseFeedback as bb, type ResponseFeedbackResult as bc, type ResumeRunRequest as bd, type RunCancelOptions as be, type RunContextOptions as bf, type RunStatus as bg, type RunTrace as bh, type ServerAttachmentUploadOptions as bi, type ServerEmbedAttachmentUploadOptions as bj, type SetCustomerResourcePolicyAssignmentRequest as bk, type SetResourcePolicyQuotaScheduleRequest as bl, type StartRunResult as bm, type StateVariableDefinition as bn, type StreamRequestOptions as bo, type StreamResult as bp, type ThreadDeleteOptions as bq, type ThreadDetailOptions as br, type ThreadListOptions as bs, type ThreadSummaryEventOptions as bt, type TraceContent as bu, type TraceError as bv, type TraceSpan as bw, type TraceSpanKind as bx, type TraceSpanStatus as by, type TraceView as bz, 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
@@ -468,6 +468,14 @@ var EmbedNamespace = class {
468
468
  async streamAgent(agentId, payload, onEvent, options = {}) {
469
469
  return this.stream(`/public/embed/agents/${agentId}/chat/stream`, payload, onEvent, options);
470
470
  }
471
+ startAgentRun(agentId, payload, options) {
472
+ return this.http.requestJson(`/public/embed/agents/${agentId}/runs`, {
473
+ method: "POST",
474
+ body: payload,
475
+ options,
476
+ mutation: true
477
+ });
478
+ }
471
479
  async attachAgentRun(agentId, runId, payload, onEvent, options = {}) {
472
480
  return this.stream(`/public/embed/agents/${agentId}/runs/${runId}/stream`, payload, onEvent, options);
473
481
  }
@@ -1094,6 +1102,7 @@ var SDK_OPERATION_IDS = [
1094
1102
  "embed.resume_agent_run",
1095
1103
  "embed.set_agent_run_feedback",
1096
1104
  "embed.set_conversation_runtime_selection",
1105
+ "embed.start_agent_run",
1097
1106
  "embed.start_agent_run_mcp_auth",
1098
1107
  "embed.stream_agent",
1099
1108
  "embed.stream_agent_thread_events",