@cognidesk/core 0.0.3-dev.8 → 0.0.3-dev.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.
- package/dist/index.d.ts +20 -1
- package/dist/index.js +15 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -124,6 +124,7 @@ interface TelemetryContext {
|
|
|
124
124
|
declare const telemetrySpanNames: {
|
|
125
125
|
readonly runtimeInitialize: "cognidesk.runtime.initialize";
|
|
126
126
|
readonly runtimeCreateConversation: "cognidesk.runtime.create_conversation";
|
|
127
|
+
readonly runtimeListConversations: "cognidesk.runtime.list_conversations";
|
|
127
128
|
readonly runtimeEmitEvent: "cognidesk.runtime.emit_event";
|
|
128
129
|
readonly runtimeEmitIntermediateMessage: "cognidesk.runtime.emit_intermediate_message";
|
|
129
130
|
readonly runtimeEmitGeneratedPreamble: "cognidesk.runtime.emit_generated_preamble";
|
|
@@ -2835,6 +2836,20 @@ interface ListEventsOptions {
|
|
|
2835
2836
|
afterOffset?: number;
|
|
2836
2837
|
limit?: number;
|
|
2837
2838
|
}
|
|
2839
|
+
interface ConversationListCursor {
|
|
2840
|
+
updatedAt: string;
|
|
2841
|
+
id: string;
|
|
2842
|
+
}
|
|
2843
|
+
interface ListConversationsOptions {
|
|
2844
|
+
agentId?: string;
|
|
2845
|
+
before?: ConversationListCursor;
|
|
2846
|
+
after?: ConversationListCursor;
|
|
2847
|
+
/** Timestamp-only range filter. Use `before` for lossless cursor pagination. */
|
|
2848
|
+
beforeUpdatedAt?: string;
|
|
2849
|
+
/** Timestamp-only range filter. Use `after` for lossless cursor pagination. */
|
|
2850
|
+
afterUpdatedAt?: string;
|
|
2851
|
+
limit?: number;
|
|
2852
|
+
}
|
|
2838
2853
|
interface CreateConversationInput<TConversationContext = unknown> {
|
|
2839
2854
|
id?: string;
|
|
2840
2855
|
agentId: string;
|
|
@@ -2845,6 +2860,7 @@ interface StorageAdapter {
|
|
|
2845
2860
|
initialize?(): Promise<void> | void;
|
|
2846
2861
|
createConversation<TConversationContext = unknown>(input: CreateConversationInput<TConversationContext>): Promise<ConversationRecord<TConversationContext>>;
|
|
2847
2862
|
getConversation<TConversationContext = unknown>(conversationId: string): Promise<ConversationRecord<TConversationContext> | null>;
|
|
2863
|
+
listConversations<TConversationContext = unknown>(options?: ListConversationsOptions): Promise<ConversationRecord<TConversationContext>[]>;
|
|
2848
2864
|
updateConversationLifecycle(conversationId: string, lifecycle: ConversationLifecycle): Promise<ConversationRecord | null>;
|
|
2849
2865
|
appendEvent<TEvent extends RuntimeEventInput>(event: TEvent): Promise<RuntimeEvent>;
|
|
2850
2866
|
appendEventIfApprovalPending?<TEvent extends RuntimeEventInput<"approval.resolved">>(event: TEvent): Promise<RuntimeEvent | null>;
|
|
@@ -3109,6 +3125,8 @@ interface RuntimeConfigurationSource {
|
|
|
3109
3125
|
}
|
|
3110
3126
|
interface CreateRuntimeConversationInput<TConversationContext = unknown> extends CreateConversationInput<TConversationContext> {
|
|
3111
3127
|
}
|
|
3128
|
+
interface ListRuntimeConversationsOptions extends ListConversationsOptions {
|
|
3129
|
+
}
|
|
3112
3130
|
interface HandleUserMessageInput<TTurn = unknown> {
|
|
3113
3131
|
conversationId: string;
|
|
3114
3132
|
text: string;
|
|
@@ -3852,6 +3870,7 @@ declare class CognideskRuntime {
|
|
|
3852
3870
|
emitJourneyEvent<TEvent extends JourneyEventDefinition>(input: EmitJourneyEventInput<TEvent>): Promise<EmitJourneyEventResult>;
|
|
3853
3871
|
emitScheduledEvent<TEvent extends JourneyEventDefinition>(input: EmitScheduledEventInput<TEvent>): Promise<EmitScheduledEventResult>;
|
|
3854
3872
|
listEvents(conversationId: string, afterOffset?: number): Promise<RuntimeEvent[]>;
|
|
3873
|
+
listConversations<TConversationContext = unknown>(input?: ListRuntimeConversationsOptions): Promise<ConversationRecord<TConversationContext>[]>;
|
|
3855
3874
|
listPendingSupportActions(input: ListPendingSupportActionsInput | string): Promise<PendingSupportAction[]>;
|
|
3856
3875
|
resolvePendingSupportAction(input: ResolvePendingSupportActionInput): Promise<ResolvePendingSupportActionResult>;
|
|
3857
3876
|
replayConversation(input: ReplayConversationInput): Promise<ReplayConversationResult>;
|
|
@@ -4125,4 +4144,4 @@ declare function cron(expression: string, options?: {
|
|
|
4125
4144
|
declare function resolveScheduleDueAt(trigger: ScheduleTrigger, now?: Date): Date;
|
|
4126
4145
|
declare function createInMemoryScheduleAdapter(options?: InMemoryScheduleAdapterOptions): ScheduleAdapter;
|
|
4127
4146
|
|
|
4128
|
-
export { type ActionAudience, ActionAudienceSchema, type ActionDefinition, type ActivationMetadata, type AgentBehaviorOptions, AgentBuilder, type AgentChannelPolicyMap, type AgentChannelPolicyOptions, type AgentConfigurationOptions, type AgentHandoffPolicyOptions, type AgentLogLevel, type AgentModelAdapters, type AgentModelSet, type AgentOptions, type AgentPersonaOptions, type AgentPolicyValue, type AgentPostProcessingOptions, type AnyCustomRuntimeEvent, type AnyTool, type ApplicationContextParts, type ApprovalRequirement, type ApprovalResolutionMode, type BuildJourneyIndexOptions, type CandidateFilterPredicate, type CapabilityAvailability, type CapabilityAvailabilityInput, CapabilityAvailabilitySchema, type CapabilityAvailabilityStatus, CapabilityAvailabilityStatusSchema, CapabilityScope, type CapabilityUseDecision, type CapabilityUseRequest, type CapabilityUseRequestInput, CapabilityUseRequestSchema, type CategoryDataSourceDeclaration, type CategoryDataSourceDeclarationInput, CategoryDataSourceDeclarationSchema, type CategoryEventDeclaration, type CategoryEventDeclarationInput, CategoryEventDeclarationSchema, type CategoryEventDirection, CategoryEventDirectionSchema, type CategoryOperationCatalog, type CategoryOperationCatalogEntry, type CategoryOperationCatalogEntryInput, CategoryOperationCatalogEntrySchema, type CategoryOperationCatalogInput, CategoryOperationCatalogSchema, type CategoryOperationDeclaration, type CategoryOperationDeclarationInput, CategoryOperationDeclarationSchema, type CategoryOperationLevel, CategoryOperationLevelSchema, type CategoryOutputDeclaration, type CategoryOutputDeclarationInput, CategoryOutputDeclarationSchema, type ChannelAdapterVerificationResult, type ChannelAudience, ChannelAudienceSchema, type ChannelBehaviorPolicy, type ChannelBehaviorPolicyInput, ChannelBehaviorPolicySchema, type ChannelCapability, type ChannelCapabilityDeclaration, ChannelCapabilityDeclarationSchema, type ChannelCapabilityFlags, type ChannelCapabilityFlagsInput, ChannelCapabilityFlagsSchema, ChannelCapabilitySchema, type ChannelContext, type ChannelContextInput, ChannelContextSchema, type ChannelEvent, type ChannelEventActor, ChannelEventActorSchema, type ChannelEventActorType, ChannelEventActorTypeSchema, type ChannelEventBindingInput, type ChannelEventBindingOutcome, ChannelEventBindingOutcomeSchema, type ChannelEventBindingResult, type ChannelEventBindingStatus, ChannelEventBindingStatusSchema, type ChannelEventDirection, ChannelEventDirectionSchema, type ChannelEventEnvelope, type ChannelEventEnvelopeInput, ChannelEventEnvelopeInputSchema, type ChannelEventHandlingDisposition, type ChannelEventHandlingDispositionKind, ChannelEventHandlingDispositionKindSchema, type ChannelEventHandlingInput, type ChannelEventIdentity, ChannelEventIdentitySchema, type ChannelEventIntakeResult, type ChannelEventIntakeStatus, ChannelEventIntakeStatusSchema, type ChannelEventIntent, ChannelEventIntentSchema, type ChannelEventKind, type ChannelEventNature, ChannelEventNatureSchema, type ChannelEventRuntimeReceiver, type ChannelEventSource, type ChannelEventSourceBindInput, type ChannelEventSourceBinding, type ChannelEventSourceEvidence, ChannelEventSourceEvidenceSchema, type ChannelEventSourceHandleInput, type ChannelEventSourceNormalizeInput, type ChannelEventSourceType, ChannelEventSourceTypeSchema, type ChannelFlowActivation, type ChannelFlowActivationInput, ChannelFlowActivationSchema, type ChannelHandoffPolicy, type ChannelHandoffPolicyInput, ChannelHandoffPolicySchema, type ChannelOutboundPolicy, type ChannelOutboundPolicyInput, ChannelOutboundPolicySchema, type ChannelOutputDeliveryMode, ChannelOutputDeliveryModeSchema, type ChannelOutputIntent, type ChannelOutputIntentInput, ChannelOutputIntentInputSchema, type ChannelOutputIntentKind, ChannelOutputIntentKindSchema, type ChannelOutputIntentProducer, ChannelOutputIntentProducerSchema, type ChannelOutputPolicyReason, ChannelOutputPolicyReasonSchema, type ChannelOutputProducerType, ChannelOutputProducerTypeSchema, type ChannelOutputResolution, type ChannelOutputResolutionDecision, ChannelOutputResolutionDecisionInputSchema, type ChannelOutputResolutionOutcome, ChannelOutputResolutionOutcomeSchema, type ChannelOutputResolutionPayload, type ChannelOutputResolutionPolicyInput, type ChannelOutputResolutionStatus, ChannelOutputResolutionStatusSchema, type ChannelOutputResolverInput, type ChannelOutputResolverResult, type ChannelPolicyConfig, type ChannelPolicyConfigInput, ChannelPolicyConfigSchema, type ChannelProviderAdapter, type ChannelSetConfig, type ChannelSetConfigInput, ChannelSetConfigSchema, type ChannelSourceEvidence, CognideskRuntime, type CommitVoiceTranscriptInput, type CommitVoiceTranscriptReferenceInput, type CommitVoiceTranscriptResult, type CompactConversationInput, type CompactConversationResult, type CompiledActionRun, type CompiledAgent, type CompiledContextReusePolicy, type CompiledDelegation, type CompiledJourney, type CompiledJourneyEntry, type CompiledState, type CompiledToolRun, type CompiledTransition, type ConfirmationPolicy, type ContextPath, type ContextReusePolicy, type ContextReusePredicate, type ConversationChannel, type ConversationChannelInput, type ConversationChannelKind, ConversationChannelKindSchema, type ConversationCompactionSummary, type ConversationLifecycle, type ConversationRecord, type CoreChannelCapability, CoreChannelCapabilitySchema, type CoreChannelEventActor, type CoreChannelEventDirection, type CoreChannelEventIntent, type CoreChannelEventKind, type CoreChannelEventNature, type CoreChannelOutputIntentKind, type CoreConversationChannel, type CoreProviderCategory, type CreateConversationInput, type CreateRuntimeConversationInput, type CustomRuntimeEventDefinition, DefinitionError, DelegationJourneyBuilder, type DelegationJourneyOptions, type EmailAttachmentMetadata, type EmailAttachmentMetadataInput, type EmailQuoteTrimOptions, type EmailQuoteTrimResult, type EmailThreadContext, type EmailThreadContextMessage, type EmailThreadContextOptions, type EmailThreadMessageInput, type EmbeddingInput, type EmbeddingOutput, type EmitCustomEventInput, type EmitGeneratedPreambleInput, type EmitGeneratedPreambleResult, type EmitIntermediateMessageInput, type EmitJourneyEventInput, type EmitJourneyEventResult, type EmitScheduledEventInput, type EmitScheduledEventResult, type EventRoutingMode, type ExplainTurnInput, type ExplainTurnResult, type FieldCollectionOptions, type GuardContext, type GuardResult, type HandleChannelEventInput, type HandleChannelEventResult, type HandleUserMessageInput, type HandleUserMessageResult, type HandleVoiceUserMessageInput, type HandleVoiceUserMessageResult, type InMemoryScheduleAdapterOptions, type InferSchema, type IntegrationCategoryProfile, type IntegrationCategoryProfileInput, IntegrationCategoryProfileSchema, JOURNEY_INDEX_PROJECTION_VERSION, type JourneyActivationPredicate, type JourneyCandidate, type JourneyContextRecord, type JourneyEntryOptions, type JourneyEntryPredicate, type JourneyEventDefinition, type JourneyFragment, type JourneyFragmentOptions, type JourneyGraph, type JourneyGraphState, type JourneyGuardPredicate, type JourneyIndex, type JourneyIndexEmbedding, type JourneyIndexEntry, type JourneyIndexValidationResult, type JourneySummary, type KnowledgeItem, type KnowledgeSource, type ListCollectionOptions, type ListEventsOptions, type ListPendingSupportActionsInput, type MessageSegment, type ModelAdapter, type ModelMessage, type ModelPromptProfile, type ModelPromptProfileRender, type ModelPromptProfileRenderInput, type ModelRole, type ModelToolCall, type ModelToolDefinition, type ModelVisiblePromptPayload, type NormalizedChannelPayload, type NormalizedChannelPayloadInput, NormalizedChannelPayloadSchema, type ObjectSchema, type PendingSupportAction, type PrivacyHookContext, type PrivacyHooks, type PromptProfileRole, type PromptTask, type ProviderCapabilityCoverage, type ProviderCapabilityCoverageReport, ProviderCapabilityCoverageReportSchema, ProviderCapabilityCoverageSchema, type ProviderCategory, ProviderCategorySchema, type ProviderCoverage, type ProviderCoverageInput, ProviderCoverageSchema, type ProviderCoverageScope, ProviderCoverageScopeSchema, type ProviderCredentialRequirement, ProviderCredentialRequirementSchema, type ProviderCredentialState, ProviderCredentialStateSchema, type ProviderCredentialStatus, type ProviderCredentialStatusInput, ProviderCredentialStatusSchema, type ProviderDirection, ProviderDirectionSchema, type ProviderManifest, type ProviderManifestInput, ProviderManifestSchema, type ProviderObjectDescriptor, ProviderObjectDescriptorSchema, type ProviderOperationCoverageMismatch, ProviderOperationCoverageMismatchSchema, type ProviderOperationDeclaration, type ProviderOperationDeclarationInput, ProviderOperationDeclarationSchema, type ProviderReadiness, type ProviderReadinessInput, ProviderReadinessSchema, type ProviderRegistry, type ProviderRegistryQuery, type ProviderRegistryQueryInput, ProviderRegistryQuerySchema, type ProviderTrustLevel, ProviderTrustLevelSchema, type RecordVoiceInterruptionInput, type ReplayConversationInput, type ReplayConversationResult, type ReplayedMessage, type ReplayedPrompt, type RequestChannelHandoffInput, type RequestChannelHandoffReviewInput, type RequestHandoffInput, type RequestOutboundContactInput, type ResolveChannelOutputInput, type ResolveChannelOutputResult, type ResolvePendingSupportActionInput, type ResolvePendingSupportActionResult, type ResumeConversationInput, type RuntimeApprovalDecision, type RuntimeApprovalEvaluationInput, type RuntimeApprovalOutcome, type RuntimeConfigurationSource, type RuntimeContextOptions, type RuntimeContextResolveInput, type RuntimeEvent, type RuntimeEventBase, type RuntimeEventInput, type RuntimeEventTelemetry, type RuntimeLogContext, type RuntimeOptions, type RuntimeSnapshot, type RuntimeTelemetryOptions, type ScheduleAdapter, type ScheduleDefinition, type ScheduleTrigger, type ScheduledOperationIntent, type ScheduledSupportAction, type SdkLogLevel, type SdkLogger, type SelectJourneyCandidatesOptions, type SideEffectTool, type StartVoiceConversationInput, type StartVoiceResult, type StartVoiceSegmentInput, type StateActionUseOptions, StateBuilder, StateCollection, StateMachineJourneyBuilder, type StateMachineJourneyOptions, type StateReference, type StorageAdapter, type StructuredOutputPromptMetadata, type SubmitWidgetInput, type SupportReference, type TelemetryContentMode, type TelemetryContext, type TelemetryContextSpanOptions, type TelemetrySpanOptions, type TelemetrySpanRunner, type TextGenerationInput, type TextGenerationOutput, type ToolApprovalOptions, type ToolDefinition, type ToolExecutionContext, type ToolPolicyOptions, type ToolRunOptions, type ToolRunOptionsFor, type TransitionOptions, TypedStateRegistry, type UsageRecord, type ValidateJourneyIndexOptions, type VoiceChannelSegment, type VoiceConnection, type VoiceConnectionStatus, type VoiceIceServer, type VoiceModelSet, type VoiceProfile, type VoiceProfileOptions, type VoiceRecordingPolicy, type VoiceRuntimeEventInput, type VoiceSelection, type VoiceSocketMetadata, type VoiceSpeaker, type VoiceStartClientHints, type WidgetDefinition, type WidgetPromptDefinition, action, activeRuntimeEventTelemetry, addTelemetryContentEvent, after, at, buildJourneyIndex, builtInTools, builtInWidgets, capabilityAvailabilityStatuses, categoryEventDirections, categoryOperationLevels, channelAudiences, channelEventActorTypes, channelEventBindingOutcomes, channelEventBindingStatuses, channelEventDedupeKey, channelEventDirections, channelEventHandlingDispositionKinds, channelEventIntakeStatuses, channelEventSourceTypes, channelKindOf, channelOutputDeliveryModes, channelOutputProducerTypes, channelOutputResolutionOutcomes, channelOutputResolutionStatuses, checkProviderCapabilityCoverage, choiceWidget, collectEmailAttachmentMetadata, confirmationWidget, conversationCompactionSummarySchema, coreChannelCapabilities, coreChannelEventActors, coreChannelEventDirections, coreChannelEventIntents, coreChannelEventKinds, coreChannelEventNatures, coreChannelOutputIntentKinds, coreConversationChannels, coreProviderCategories, createAgent, createChannelEventInputFromSource, createEmailThreadContext, createInMemoryScheduleAdapter, createJourneyRoutingText, createMessageChannelEvent, createProviderRegistry, createRuntime, createRuntimeLogger, createScheduledChannelEvent, createTelemetryContext, cron, customRuntimeEvent, datePickerWidget, defaultChannelCapabilityFlags, defineCapabilityAvailability, defineChannelContext, defineChannelEvent, defineChannelEventSource, defineChannelOutputIntent, defineChannelOutputResolutionDecision, defineChannelPolicy, defineChannelProviderAdapter, defineIntegrationCategoryProfile, defineProviderPackage, defineSchedule, deriveProviderCapabilityCoverage, endConversationTool, evaluateCapabilityUse, formWidget, handleChannelEventFromSource, handoffTool, hashAgentRoutingDefinition, hashJourneyDefinition, isCoreChannelCapability, journeyContextViewerTool, journeyEvent, journeyFragment, journeyIndexEmbeddingSchema, journeyIndexEntrySchema, journeyIndexSchema, knowledgeSource, normalizeEmailAttachmentMetadata, providerCapabilityCoverageLevels, providerCredentialStatuses, providerDirections, providerTrustLevels, recordRuntimeEventMetric, resolveScheduleDueAt, runtimeLogger, selectJourneyCandidates, telemetryAttributes, telemetryContentMode, telemetryEnabled, telemetryEventNames, telemetrySpanNames, textInputWidget, tool, trimEmailQuote, validateJourneyIndex, widget, widgetPrompt, withTelemetrySpan };
|
|
4147
|
+
export { type ActionAudience, ActionAudienceSchema, type ActionDefinition, type ActivationMetadata, type AgentBehaviorOptions, AgentBuilder, type AgentChannelPolicyMap, type AgentChannelPolicyOptions, type AgentConfigurationOptions, type AgentHandoffPolicyOptions, type AgentLogLevel, type AgentModelAdapters, type AgentModelSet, type AgentOptions, type AgentPersonaOptions, type AgentPolicyValue, type AgentPostProcessingOptions, type AnyCustomRuntimeEvent, type AnyTool, type ApplicationContextParts, type ApprovalRequirement, type ApprovalResolutionMode, type BuildJourneyIndexOptions, type CandidateFilterPredicate, type CapabilityAvailability, type CapabilityAvailabilityInput, CapabilityAvailabilitySchema, type CapabilityAvailabilityStatus, CapabilityAvailabilityStatusSchema, CapabilityScope, type CapabilityUseDecision, type CapabilityUseRequest, type CapabilityUseRequestInput, CapabilityUseRequestSchema, type CategoryDataSourceDeclaration, type CategoryDataSourceDeclarationInput, CategoryDataSourceDeclarationSchema, type CategoryEventDeclaration, type CategoryEventDeclarationInput, CategoryEventDeclarationSchema, type CategoryEventDirection, CategoryEventDirectionSchema, type CategoryOperationCatalog, type CategoryOperationCatalogEntry, type CategoryOperationCatalogEntryInput, CategoryOperationCatalogEntrySchema, type CategoryOperationCatalogInput, CategoryOperationCatalogSchema, type CategoryOperationDeclaration, type CategoryOperationDeclarationInput, CategoryOperationDeclarationSchema, type CategoryOperationLevel, CategoryOperationLevelSchema, type CategoryOutputDeclaration, type CategoryOutputDeclarationInput, CategoryOutputDeclarationSchema, type ChannelAdapterVerificationResult, type ChannelAudience, ChannelAudienceSchema, type ChannelBehaviorPolicy, type ChannelBehaviorPolicyInput, ChannelBehaviorPolicySchema, type ChannelCapability, type ChannelCapabilityDeclaration, ChannelCapabilityDeclarationSchema, type ChannelCapabilityFlags, type ChannelCapabilityFlagsInput, ChannelCapabilityFlagsSchema, ChannelCapabilitySchema, type ChannelContext, type ChannelContextInput, ChannelContextSchema, type ChannelEvent, type ChannelEventActor, ChannelEventActorSchema, type ChannelEventActorType, ChannelEventActorTypeSchema, type ChannelEventBindingInput, type ChannelEventBindingOutcome, ChannelEventBindingOutcomeSchema, type ChannelEventBindingResult, type ChannelEventBindingStatus, ChannelEventBindingStatusSchema, type ChannelEventDirection, ChannelEventDirectionSchema, type ChannelEventEnvelope, type ChannelEventEnvelopeInput, ChannelEventEnvelopeInputSchema, type ChannelEventHandlingDisposition, type ChannelEventHandlingDispositionKind, ChannelEventHandlingDispositionKindSchema, type ChannelEventHandlingInput, type ChannelEventIdentity, ChannelEventIdentitySchema, type ChannelEventIntakeResult, type ChannelEventIntakeStatus, ChannelEventIntakeStatusSchema, type ChannelEventIntent, ChannelEventIntentSchema, type ChannelEventKind, type ChannelEventNature, ChannelEventNatureSchema, type ChannelEventRuntimeReceiver, type ChannelEventSource, type ChannelEventSourceBindInput, type ChannelEventSourceBinding, type ChannelEventSourceEvidence, ChannelEventSourceEvidenceSchema, type ChannelEventSourceHandleInput, type ChannelEventSourceNormalizeInput, type ChannelEventSourceType, ChannelEventSourceTypeSchema, type ChannelFlowActivation, type ChannelFlowActivationInput, ChannelFlowActivationSchema, type ChannelHandoffPolicy, type ChannelHandoffPolicyInput, ChannelHandoffPolicySchema, type ChannelOutboundPolicy, type ChannelOutboundPolicyInput, ChannelOutboundPolicySchema, type ChannelOutputDeliveryMode, ChannelOutputDeliveryModeSchema, type ChannelOutputIntent, type ChannelOutputIntentInput, ChannelOutputIntentInputSchema, type ChannelOutputIntentKind, ChannelOutputIntentKindSchema, type ChannelOutputIntentProducer, ChannelOutputIntentProducerSchema, type ChannelOutputPolicyReason, ChannelOutputPolicyReasonSchema, type ChannelOutputProducerType, ChannelOutputProducerTypeSchema, type ChannelOutputResolution, type ChannelOutputResolutionDecision, ChannelOutputResolutionDecisionInputSchema, type ChannelOutputResolutionOutcome, ChannelOutputResolutionOutcomeSchema, type ChannelOutputResolutionPayload, type ChannelOutputResolutionPolicyInput, type ChannelOutputResolutionStatus, ChannelOutputResolutionStatusSchema, type ChannelOutputResolverInput, type ChannelOutputResolverResult, type ChannelPolicyConfig, type ChannelPolicyConfigInput, ChannelPolicyConfigSchema, type ChannelProviderAdapter, type ChannelSetConfig, type ChannelSetConfigInput, ChannelSetConfigSchema, type ChannelSourceEvidence, CognideskRuntime, type CommitVoiceTranscriptInput, type CommitVoiceTranscriptReferenceInput, type CommitVoiceTranscriptResult, type CompactConversationInput, type CompactConversationResult, type CompiledActionRun, type CompiledAgent, type CompiledContextReusePolicy, type CompiledDelegation, type CompiledJourney, type CompiledJourneyEntry, type CompiledState, type CompiledToolRun, type CompiledTransition, type ConfirmationPolicy, type ContextPath, type ContextReusePolicy, type ContextReusePredicate, type ConversationChannel, type ConversationChannelInput, type ConversationChannelKind, ConversationChannelKindSchema, type ConversationCompactionSummary, type ConversationLifecycle, type ConversationListCursor, type ConversationRecord, type CoreChannelCapability, CoreChannelCapabilitySchema, type CoreChannelEventActor, type CoreChannelEventDirection, type CoreChannelEventIntent, type CoreChannelEventKind, type CoreChannelEventNature, type CoreChannelOutputIntentKind, type CoreConversationChannel, type CoreProviderCategory, type CreateConversationInput, type CreateRuntimeConversationInput, type CustomRuntimeEventDefinition, DefinitionError, DelegationJourneyBuilder, type DelegationJourneyOptions, type EmailAttachmentMetadata, type EmailAttachmentMetadataInput, type EmailQuoteTrimOptions, type EmailQuoteTrimResult, type EmailThreadContext, type EmailThreadContextMessage, type EmailThreadContextOptions, type EmailThreadMessageInput, type EmbeddingInput, type EmbeddingOutput, type EmitCustomEventInput, type EmitGeneratedPreambleInput, type EmitGeneratedPreambleResult, type EmitIntermediateMessageInput, type EmitJourneyEventInput, type EmitJourneyEventResult, type EmitScheduledEventInput, type EmitScheduledEventResult, type EventRoutingMode, type ExplainTurnInput, type ExplainTurnResult, type FieldCollectionOptions, type GuardContext, type GuardResult, type HandleChannelEventInput, type HandleChannelEventResult, type HandleUserMessageInput, type HandleUserMessageResult, type HandleVoiceUserMessageInput, type HandleVoiceUserMessageResult, type InMemoryScheduleAdapterOptions, type InferSchema, type IntegrationCategoryProfile, type IntegrationCategoryProfileInput, IntegrationCategoryProfileSchema, JOURNEY_INDEX_PROJECTION_VERSION, type JourneyActivationPredicate, type JourneyCandidate, type JourneyContextRecord, type JourneyEntryOptions, type JourneyEntryPredicate, type JourneyEventDefinition, type JourneyFragment, type JourneyFragmentOptions, type JourneyGraph, type JourneyGraphState, type JourneyGuardPredicate, type JourneyIndex, type JourneyIndexEmbedding, type JourneyIndexEntry, type JourneyIndexValidationResult, type JourneySummary, type KnowledgeItem, type KnowledgeSource, type ListCollectionOptions, type ListConversationsOptions, type ListEventsOptions, type ListPendingSupportActionsInput, type ListRuntimeConversationsOptions, type MessageSegment, type ModelAdapter, type ModelMessage, type ModelPromptProfile, type ModelPromptProfileRender, type ModelPromptProfileRenderInput, type ModelRole, type ModelToolCall, type ModelToolDefinition, type ModelVisiblePromptPayload, type NormalizedChannelPayload, type NormalizedChannelPayloadInput, NormalizedChannelPayloadSchema, type ObjectSchema, type PendingSupportAction, type PrivacyHookContext, type PrivacyHooks, type PromptProfileRole, type PromptTask, type ProviderCapabilityCoverage, type ProviderCapabilityCoverageReport, ProviderCapabilityCoverageReportSchema, ProviderCapabilityCoverageSchema, type ProviderCategory, ProviderCategorySchema, type ProviderCoverage, type ProviderCoverageInput, ProviderCoverageSchema, type ProviderCoverageScope, ProviderCoverageScopeSchema, type ProviderCredentialRequirement, ProviderCredentialRequirementSchema, type ProviderCredentialState, ProviderCredentialStateSchema, type ProviderCredentialStatus, type ProviderCredentialStatusInput, ProviderCredentialStatusSchema, type ProviderDirection, ProviderDirectionSchema, type ProviderManifest, type ProviderManifestInput, ProviderManifestSchema, type ProviderObjectDescriptor, ProviderObjectDescriptorSchema, type ProviderOperationCoverageMismatch, ProviderOperationCoverageMismatchSchema, type ProviderOperationDeclaration, type ProviderOperationDeclarationInput, ProviderOperationDeclarationSchema, type ProviderReadiness, type ProviderReadinessInput, ProviderReadinessSchema, type ProviderRegistry, type ProviderRegistryQuery, type ProviderRegistryQueryInput, ProviderRegistryQuerySchema, type ProviderTrustLevel, ProviderTrustLevelSchema, type RecordVoiceInterruptionInput, type ReplayConversationInput, type ReplayConversationResult, type ReplayedMessage, type ReplayedPrompt, type RequestChannelHandoffInput, type RequestChannelHandoffReviewInput, type RequestHandoffInput, type RequestOutboundContactInput, type ResolveChannelOutputInput, type ResolveChannelOutputResult, type ResolvePendingSupportActionInput, type ResolvePendingSupportActionResult, type ResumeConversationInput, type RuntimeApprovalDecision, type RuntimeApprovalEvaluationInput, type RuntimeApprovalOutcome, type RuntimeConfigurationSource, type RuntimeContextOptions, type RuntimeContextResolveInput, type RuntimeEvent, type RuntimeEventBase, type RuntimeEventInput, type RuntimeEventTelemetry, type RuntimeLogContext, type RuntimeOptions, type RuntimeSnapshot, type RuntimeTelemetryOptions, type ScheduleAdapter, type ScheduleDefinition, type ScheduleTrigger, type ScheduledOperationIntent, type ScheduledSupportAction, type SdkLogLevel, type SdkLogger, type SelectJourneyCandidatesOptions, type SideEffectTool, type StartVoiceConversationInput, type StartVoiceResult, type StartVoiceSegmentInput, type StateActionUseOptions, StateBuilder, StateCollection, StateMachineJourneyBuilder, type StateMachineJourneyOptions, type StateReference, type StorageAdapter, type StructuredOutputPromptMetadata, type SubmitWidgetInput, type SupportReference, type TelemetryContentMode, type TelemetryContext, type TelemetryContextSpanOptions, type TelemetrySpanOptions, type TelemetrySpanRunner, type TextGenerationInput, type TextGenerationOutput, type ToolApprovalOptions, type ToolDefinition, type ToolExecutionContext, type ToolPolicyOptions, type ToolRunOptions, type ToolRunOptionsFor, type TransitionOptions, TypedStateRegistry, type UsageRecord, type ValidateJourneyIndexOptions, type VoiceChannelSegment, type VoiceConnection, type VoiceConnectionStatus, type VoiceIceServer, type VoiceModelSet, type VoiceProfile, type VoiceProfileOptions, type VoiceRecordingPolicy, type VoiceRuntimeEventInput, type VoiceSelection, type VoiceSocketMetadata, type VoiceSpeaker, type VoiceStartClientHints, type WidgetDefinition, type WidgetPromptDefinition, action, activeRuntimeEventTelemetry, addTelemetryContentEvent, after, at, buildJourneyIndex, builtInTools, builtInWidgets, capabilityAvailabilityStatuses, categoryEventDirections, categoryOperationLevels, channelAudiences, channelEventActorTypes, channelEventBindingOutcomes, channelEventBindingStatuses, channelEventDedupeKey, channelEventDirections, channelEventHandlingDispositionKinds, channelEventIntakeStatuses, channelEventSourceTypes, channelKindOf, channelOutputDeliveryModes, channelOutputProducerTypes, channelOutputResolutionOutcomes, channelOutputResolutionStatuses, checkProviderCapabilityCoverage, choiceWidget, collectEmailAttachmentMetadata, confirmationWidget, conversationCompactionSummarySchema, coreChannelCapabilities, coreChannelEventActors, coreChannelEventDirections, coreChannelEventIntents, coreChannelEventKinds, coreChannelEventNatures, coreChannelOutputIntentKinds, coreConversationChannels, coreProviderCategories, createAgent, createChannelEventInputFromSource, createEmailThreadContext, createInMemoryScheduleAdapter, createJourneyRoutingText, createMessageChannelEvent, createProviderRegistry, createRuntime, createRuntimeLogger, createScheduledChannelEvent, createTelemetryContext, cron, customRuntimeEvent, datePickerWidget, defaultChannelCapabilityFlags, defineCapabilityAvailability, defineChannelContext, defineChannelEvent, defineChannelEventSource, defineChannelOutputIntent, defineChannelOutputResolutionDecision, defineChannelPolicy, defineChannelProviderAdapter, defineIntegrationCategoryProfile, defineProviderPackage, defineSchedule, deriveProviderCapabilityCoverage, endConversationTool, evaluateCapabilityUse, formWidget, handleChannelEventFromSource, handoffTool, hashAgentRoutingDefinition, hashJourneyDefinition, isCoreChannelCapability, journeyContextViewerTool, journeyEvent, journeyFragment, journeyIndexEmbeddingSchema, journeyIndexEntrySchema, journeyIndexSchema, knowledgeSource, normalizeEmailAttachmentMetadata, providerCapabilityCoverageLevels, providerCredentialStatuses, providerDirections, providerTrustLevels, recordRuntimeEventMetric, resolveScheduleDueAt, runtimeLogger, selectJourneyCandidates, telemetryAttributes, telemetryContentMode, telemetryEnabled, telemetryEventNames, telemetrySpanNames, textInputWidget, tool, trimEmailQuote, validateJourneyIndex, widget, widgetPrompt, withTelemetrySpan };
|
package/dist/index.js
CHANGED
|
@@ -1420,6 +1420,7 @@ import {
|
|
|
1420
1420
|
var telemetrySpanNames = {
|
|
1421
1421
|
runtimeInitialize: "cognidesk.runtime.initialize",
|
|
1422
1422
|
runtimeCreateConversation: "cognidesk.runtime.create_conversation",
|
|
1423
|
+
runtimeListConversations: "cognidesk.runtime.list_conversations",
|
|
1423
1424
|
runtimeEmitEvent: "cognidesk.runtime.emit_event",
|
|
1424
1425
|
runtimeEmitIntermediateMessage: "cognidesk.runtime.emit_intermediate_message",
|
|
1425
1426
|
runtimeEmitGeneratedPreamble: "cognidesk.runtime.emit_generated_preamble",
|
|
@@ -2282,6 +2283,9 @@ function listRuntimeEvents(options, conversationId, afterOffset) {
|
|
|
2282
2283
|
...afterOffset !== void 0 ? { afterOffset } : {}
|
|
2283
2284
|
});
|
|
2284
2285
|
}
|
|
2286
|
+
function listRuntimeConversations(options, input = {}) {
|
|
2287
|
+
return options.storage.listConversations(input);
|
|
2288
|
+
}
|
|
2285
2289
|
async function listAllRuntimeEvents(options, input) {
|
|
2286
2290
|
const events = [];
|
|
2287
2291
|
let afterOffset = input.afterOffset ?? 0;
|
|
@@ -3503,6 +3507,9 @@ function createPrivacyStorageAdapter(storage, privacy) {
|
|
|
3503
3507
|
getConversation(conversationId) {
|
|
3504
3508
|
return storage.getConversation(conversationId);
|
|
3505
3509
|
},
|
|
3510
|
+
listConversations(options) {
|
|
3511
|
+
return storage.listConversations(options);
|
|
3512
|
+
},
|
|
3506
3513
|
updateConversationLifecycle(conversationId, lifecycle) {
|
|
3507
3514
|
return storage.updateConversationLifecycle(conversationId, lifecycle);
|
|
3508
3515
|
},
|
|
@@ -4373,6 +4380,9 @@ function createRuntimeCore(options) {
|
|
|
4373
4380
|
listEvents(conversationId, afterOffset) {
|
|
4374
4381
|
return listRuntimeEvents(options, conversationId, afterOffset);
|
|
4375
4382
|
},
|
|
4383
|
+
listConversations(input = {}) {
|
|
4384
|
+
return listRuntimeConversations(options, input);
|
|
4385
|
+
},
|
|
4376
4386
|
replayConversation(input) {
|
|
4377
4387
|
return replayRuntimeConversation(options, core.requireConversationRecord, input);
|
|
4378
4388
|
},
|
|
@@ -9343,6 +9353,11 @@ var CognideskRuntime = class {
|
|
|
9343
9353
|
[telemetryAttributes.conversationId]: conversationId
|
|
9344
9354
|
}, () => this.kernel.listEvents(conversationId, afterOffset));
|
|
9345
9355
|
}
|
|
9356
|
+
listConversations(input = {}) {
|
|
9357
|
+
return this.runtimeOperation("list_conversations", telemetrySpanNames.runtimeListConversations, {
|
|
9358
|
+
...input.agentId ? { [telemetryAttributes.agentId]: input.agentId } : {}
|
|
9359
|
+
}, () => this.kernel.listConversations(input));
|
|
9360
|
+
}
|
|
9346
9361
|
listPendingSupportActions(input) {
|
|
9347
9362
|
const conversationId = typeof input === "string" ? input : input.conversationId;
|
|
9348
9363
|
return this.runtimeOperation("list_pending_support_actions", telemetrySpanNames.runtimeListEvents, {
|