@dudousxd/nestjs-agent-core 0.22.0 → 0.23.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/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as ModelMessage, a as ToolDefinition, b as ToolCallRequest, c as MessageUsage, d as AgentUiComponent, e as AiToolCtx, f as AgentStreamEvent, A as Actor, g as ThreadSummary, h as ThreadDetail, S as StoredMessage, i as ToolResult, j as MessageAttachment, k as ToolCallStatus, U as UsagePurpose,
|
|
2
|
-
export {
|
|
1
|
+
import { M as ModelMessage, a as ToolDefinition, b as ToolCallRequest, c as MessageUsage, d as AgentUiComponent, e as AiToolCtx, f as AgentStreamEvent, A as Actor, g as ThreadSummary, h as ThreadDetail, S as StoredMessage, i as ToolResult, j as MessageAttachment, k as MessageFeedback, l as ToolCallStatus, U as UsagePurpose, m as ToolSpec, Q as QuotaState, n as AgentRunInput, H as HumanReply, o as ToolKind, p as ToolCallApproval, T as ToolHandler, q as HistoryPolicy, O as OutputProcessor, P as ProcessorContext, I as InputProcessor, r as ProcessedPrompt, s as ModelAnswer, t as PageContext, u as AgentDefinition, v as AgentDelegation, D as DetachedDelivery, w as PromptBuilder, x as PromptContributor, y as ToolTransientRetrySetting, z as AgentIntake, B as Decision, E as ElicitationRequest, L as LlmStepEnvelope, C as ToolStepEnvelope } from './tool-BdW-LV1J.cjs';
|
|
2
|
+
export { F as ASK_TOOL_DESCRIPTION, G as ASK_TOOL_NAME, J as AgentApprovalRequest, K as AgentApprovalSettlement, N as AgentCatalogEntry, R as AgentHistoryWindow, V as AskToolInput, W as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, X as DEFAULT_INTAKE_PREAMBLE, Y as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, Z as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, _ as ELICITATION_INPUT_TYPES, $ as ElicitationInput, a0 as ElicitationInputType, a1 as ElicitationOption, a2 as ElicitationOutcome, a3 as ElicitationQuestion, a4 as ElicitationReply, a5 as ElicitationResult, a6 as HistoryPolicyContext, a7 as HistorySelection, a8 as HistorySummary, a9 as IncrementalGating, aa as InvokeWithTransientRetryOptions, ab as MAX_ASK_QUESTIONS, ac as MessageFeedbackValue, ad as MessageRole, ae as OutputRejectedError, af as OutputVerdict, ag as ProcessorFailedError, ah as PromptContext, ai as QuotaView, aj as ToolCallApprovalStatus, ak as ToolCatalogEntry, al as ToolConfirmation, am as ToolPresentation, an as ToolPresentationTone, ao as ToolResultField, ap as ToolResultView, aq as ToolStepCtx, ar as ToolTransientRetryNumbers, as as ToolTransientRetryOptions, at as askInputSchema, au as askToolDefinition, av as decodeStreamEvent, aw as encodeStreamEvent, ax as invokeWithTransientRetry, ay as isTransientToolError, az as isTypedQuestion, aA as normalizeElicitationReply, aB as questionOptions, aC as readElicitationInput, aD as readElicitationQuestions, aE as renderElicitationAnswers, aF as resolveElicitation, aG as resolveToolTransientRetryNumbers, aH as settleElicitation, aI as validateElicitationAnswer, aJ as validateElicitationValue } from './tool-BdW-LV1J.cjs';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import { ChannelRegistry } from '@dudousxd/nestjs-diagnostics';
|
|
5
5
|
|
|
@@ -512,6 +512,18 @@ interface AgentStore {
|
|
|
512
512
|
*/
|
|
513
513
|
setMessageUi?(messageId: string, ui: AgentUiComponent[]): Promise<void>;
|
|
514
514
|
truncateFrom(threadId: string, messageId: string): Promise<void>;
|
|
515
|
+
/**
|
|
516
|
+
* OPTIONAL: the thread a message belongs to, or `null` when there is no such message. The
|
|
517
|
+
* authorization seam for message-scoped routes (feedback): the service resolves the thread's owner
|
|
518
|
+
* from it. Implement it together with {@link setMessageFeedback}.
|
|
519
|
+
*/
|
|
520
|
+
threadOfMessage?(messageId: string): Promise<string | null>;
|
|
521
|
+
/**
|
|
522
|
+
* OPTIONAL: set (or, with `null`, clear) the rating on a message — see
|
|
523
|
+
* {@link import('../types.js').StoredMessage.feedback}. Absent → `POST /messages/:id/feedback`
|
|
524
|
+
* answers `501`.
|
|
525
|
+
*/
|
|
526
|
+
setMessageFeedback?(messageId: string, feedback: MessageFeedback | null): Promise<void>;
|
|
515
527
|
recordToolCall(input: RecordToolCallInput): Promise<void>;
|
|
516
528
|
updateToolCall(input: UpdateToolCallInput): Promise<void>;
|
|
517
529
|
/**
|
|
@@ -3331,4 +3343,4 @@ type AgentDiagnosticKey = `agent:${AgentDiagnosticEvent}`;
|
|
|
3331
3343
|
*/
|
|
3332
3344
|
declare function agentDiagnosticKey(event: AgentDiagnosticEvent): AgentDiagnosticKey;
|
|
3333
3345
|
|
|
3334
|
-
export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, type AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, type AppendMessageInput, type ApprovalDecisionRef, type ApprovalPolicy, type ApprovalRequirement, type ApprovalThreadRef, type ApprovalToolRef, type ApprovalWhere, type AttachmentRef, type AttachmentStagingStore, type BufferedModelTurnResult, type BuildMemoryBlockInput, type CostUsage, type CreateThreadInput, type CurrentModelPrice, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, Decision, DefaultApprovalPolicy, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type ForgetMemoryInput, type FrameBuffer, GLOBAL_SCOPE, type GovernancePage, type GovernancePageQuery, type GovernanceRange, type GovernanceRunDetail, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceUsageInput, HistoryPolicy, HumanReply, type IncrementalGate, InputProcessor, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageUsage, ModelAnswer, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QuotaExceededError, QuotaState, type QuotaStore, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, REQUESTER_APPROVER, type RecentRunRow, type RecordRunEndInput, type RecordRunStartInput, type RecordToolCallInput, type RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, type SettledTask, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadTurnPage, type ThreadTurnQuery, type ThreadTurnReader, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApproval, type ToolCallApprovalColumns, type ToolCallApprovalState, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolDefinition, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputInvalidError, ToolKind, type ToolKindDeps, ToolNotFoundError, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, type UpdateThreadInput, type UpdateToolCallInput, UsagePurpose, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actorScope, agentDiagnosticKey, agentFailureCode, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, compositeSkillProvider, createFrameBuffer, createIncrementalGate, createUiCollector, dayBoundsUtc, defaultCanDecide, defaultScopeResolver, detachedDelivered, detachedStarted, detachedUnsettled, estimateCost, estimateMessageTokens, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, gateFollowUps, gateTail, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, mayDecideApproval, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolveSkillCatalog, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, seedModelPrices, settleAll, settleUnsettledDelegation, skillInputSchema, skillToolDefinition, skillWriteVerdict, stampToolKinds, staticSkillProvider, summarizeWithModel, tenantScope, toolCallApprovalFromRow, traceLlmTurn, traceToolExecution, truncateDetailContent, unwrapToolStepOutput, validateStructured, windowHistory, withAskTool, withMemoryTool, withSkillTool, withToolTimeout, withTurnFrames, wrapToolStepOutput, writeMemory };
|
|
3346
|
+
export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, type AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, type AppendMessageInput, type ApprovalDecisionRef, type ApprovalPolicy, type ApprovalRequirement, type ApprovalThreadRef, type ApprovalToolRef, type ApprovalWhere, type AttachmentRef, type AttachmentStagingStore, type BufferedModelTurnResult, type BuildMemoryBlockInput, type CostUsage, type CreateThreadInput, type CurrentModelPrice, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, Decision, DefaultApprovalPolicy, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type ForgetMemoryInput, type FrameBuffer, GLOBAL_SCOPE, type GovernancePage, type GovernancePageQuery, type GovernanceRange, type GovernanceRunDetail, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceUsageInput, HistoryPolicy, HumanReply, type IncrementalGate, InputProcessor, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageFeedback, MessageUsage, ModelAnswer, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QuotaExceededError, QuotaState, type QuotaStore, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, REQUESTER_APPROVER, type RecentRunRow, type RecordRunEndInput, type RecordRunStartInput, type RecordToolCallInput, type RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, type SettledTask, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadTurnPage, type ThreadTurnQuery, type ThreadTurnReader, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApproval, type ToolCallApprovalColumns, type ToolCallApprovalState, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolDefinition, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputInvalidError, ToolKind, type ToolKindDeps, ToolNotFoundError, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, type UpdateThreadInput, type UpdateToolCallInput, UsagePurpose, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actorScope, agentDiagnosticKey, agentFailureCode, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, compositeSkillProvider, createFrameBuffer, createIncrementalGate, createUiCollector, dayBoundsUtc, defaultCanDecide, defaultScopeResolver, detachedDelivered, detachedStarted, detachedUnsettled, estimateCost, estimateMessageTokens, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, gateFollowUps, gateTail, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, mayDecideApproval, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolveSkillCatalog, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, seedModelPrices, settleAll, settleUnsettledDelegation, skillInputSchema, skillToolDefinition, skillWriteVerdict, stampToolKinds, staticSkillProvider, summarizeWithModel, tenantScope, toolCallApprovalFromRow, traceLlmTurn, traceToolExecution, truncateDetailContent, unwrapToolStepOutput, validateStructured, windowHistory, withAskTool, withMemoryTool, withSkillTool, withToolTimeout, withTurnFrames, wrapToolStepOutput, writeMemory };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as ModelMessage, a as ToolDefinition, b as ToolCallRequest, c as MessageUsage, d as AgentUiComponent, e as AiToolCtx, f as AgentStreamEvent, A as Actor, g as ThreadSummary, h as ThreadDetail, S as StoredMessage, i as ToolResult, j as MessageAttachment, k as ToolCallStatus, U as UsagePurpose,
|
|
2
|
-
export {
|
|
1
|
+
import { M as ModelMessage, a as ToolDefinition, b as ToolCallRequest, c as MessageUsage, d as AgentUiComponent, e as AiToolCtx, f as AgentStreamEvent, A as Actor, g as ThreadSummary, h as ThreadDetail, S as StoredMessage, i as ToolResult, j as MessageAttachment, k as MessageFeedback, l as ToolCallStatus, U as UsagePurpose, m as ToolSpec, Q as QuotaState, n as AgentRunInput, H as HumanReply, o as ToolKind, p as ToolCallApproval, T as ToolHandler, q as HistoryPolicy, O as OutputProcessor, P as ProcessorContext, I as InputProcessor, r as ProcessedPrompt, s as ModelAnswer, t as PageContext, u as AgentDefinition, v as AgentDelegation, D as DetachedDelivery, w as PromptBuilder, x as PromptContributor, y as ToolTransientRetrySetting, z as AgentIntake, B as Decision, E as ElicitationRequest, L as LlmStepEnvelope, C as ToolStepEnvelope } from './tool-BdW-LV1J.js';
|
|
2
|
+
export { F as ASK_TOOL_DESCRIPTION, G as ASK_TOOL_NAME, J as AgentApprovalRequest, K as AgentApprovalSettlement, N as AgentCatalogEntry, R as AgentHistoryWindow, V as AskToolInput, W as DEFAULT_INCREMENTAL_LOOKBACK_CHARS, X as DEFAULT_INTAKE_PREAMBLE, Y as DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS, Z as DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS, _ as ELICITATION_INPUT_TYPES, $ as ElicitationInput, a0 as ElicitationInputType, a1 as ElicitationOption, a2 as ElicitationOutcome, a3 as ElicitationQuestion, a4 as ElicitationReply, a5 as ElicitationResult, a6 as HistoryPolicyContext, a7 as HistorySelection, a8 as HistorySummary, a9 as IncrementalGating, aa as InvokeWithTransientRetryOptions, ab as MAX_ASK_QUESTIONS, ac as MessageFeedbackValue, ad as MessageRole, ae as OutputRejectedError, af as OutputVerdict, ag as ProcessorFailedError, ah as PromptContext, ai as QuotaView, aj as ToolCallApprovalStatus, ak as ToolCatalogEntry, al as ToolConfirmation, am as ToolPresentation, an as ToolPresentationTone, ao as ToolResultField, ap as ToolResultView, aq as ToolStepCtx, ar as ToolTransientRetryNumbers, as as ToolTransientRetryOptions, at as askInputSchema, au as askToolDefinition, av as decodeStreamEvent, aw as encodeStreamEvent, ax as invokeWithTransientRetry, ay as isTransientToolError, az as isTypedQuestion, aA as normalizeElicitationReply, aB as questionOptions, aC as readElicitationInput, aD as readElicitationQuestions, aE as renderElicitationAnswers, aF as resolveElicitation, aG as resolveToolTransientRetryNumbers, aH as settleElicitation, aI as validateElicitationAnswer, aJ as validateElicitationValue } from './tool-BdW-LV1J.js';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
4
|
import { ChannelRegistry } from '@dudousxd/nestjs-diagnostics';
|
|
5
5
|
|
|
@@ -512,6 +512,18 @@ interface AgentStore {
|
|
|
512
512
|
*/
|
|
513
513
|
setMessageUi?(messageId: string, ui: AgentUiComponent[]): Promise<void>;
|
|
514
514
|
truncateFrom(threadId: string, messageId: string): Promise<void>;
|
|
515
|
+
/**
|
|
516
|
+
* OPTIONAL: the thread a message belongs to, or `null` when there is no such message. The
|
|
517
|
+
* authorization seam for message-scoped routes (feedback): the service resolves the thread's owner
|
|
518
|
+
* from it. Implement it together with {@link setMessageFeedback}.
|
|
519
|
+
*/
|
|
520
|
+
threadOfMessage?(messageId: string): Promise<string | null>;
|
|
521
|
+
/**
|
|
522
|
+
* OPTIONAL: set (or, with `null`, clear) the rating on a message — see
|
|
523
|
+
* {@link import('../types.js').StoredMessage.feedback}. Absent → `POST /messages/:id/feedback`
|
|
524
|
+
* answers `501`.
|
|
525
|
+
*/
|
|
526
|
+
setMessageFeedback?(messageId: string, feedback: MessageFeedback | null): Promise<void>;
|
|
515
527
|
recordToolCall(input: RecordToolCallInput): Promise<void>;
|
|
516
528
|
updateToolCall(input: UpdateToolCallInput): Promise<void>;
|
|
517
529
|
/**
|
|
@@ -3331,4 +3343,4 @@ type AgentDiagnosticKey = `agent:${AgentDiagnosticEvent}`;
|
|
|
3331
3343
|
*/
|
|
3332
3344
|
declare function agentDiagnosticKey(event: AgentDiagnosticEvent): AgentDiagnosticKey;
|
|
3333
3345
|
|
|
3334
|
-
export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, type AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, type AppendMessageInput, type ApprovalDecisionRef, type ApprovalPolicy, type ApprovalRequirement, type ApprovalThreadRef, type ApprovalToolRef, type ApprovalWhere, type AttachmentRef, type AttachmentStagingStore, type BufferedModelTurnResult, type BuildMemoryBlockInput, type CostUsage, type CreateThreadInput, type CurrentModelPrice, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, Decision, DefaultApprovalPolicy, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type ForgetMemoryInput, type FrameBuffer, GLOBAL_SCOPE, type GovernancePage, type GovernancePageQuery, type GovernanceRange, type GovernanceRunDetail, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceUsageInput, HistoryPolicy, HumanReply, type IncrementalGate, InputProcessor, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageUsage, ModelAnswer, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QuotaExceededError, QuotaState, type QuotaStore, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, REQUESTER_APPROVER, type RecentRunRow, type RecordRunEndInput, type RecordRunStartInput, type RecordToolCallInput, type RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, type SettledTask, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadTurnPage, type ThreadTurnQuery, type ThreadTurnReader, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApproval, type ToolCallApprovalColumns, type ToolCallApprovalState, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolDefinition, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputInvalidError, ToolKind, type ToolKindDeps, ToolNotFoundError, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, type UpdateThreadInput, type UpdateToolCallInput, UsagePurpose, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actorScope, agentDiagnosticKey, agentFailureCode, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, compositeSkillProvider, createFrameBuffer, createIncrementalGate, createUiCollector, dayBoundsUtc, defaultCanDecide, defaultScopeResolver, detachedDelivered, detachedStarted, detachedUnsettled, estimateCost, estimateMessageTokens, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, gateFollowUps, gateTail, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, mayDecideApproval, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolveSkillCatalog, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, seedModelPrices, settleAll, settleUnsettledDelegation, skillInputSchema, skillToolDefinition, skillWriteVerdict, stampToolKinds, staticSkillProvider, summarizeWithModel, tenantScope, toolCallApprovalFromRow, traceLlmTurn, traceToolExecution, truncateDetailContent, unwrapToolStepOutput, validateStructured, windowHistory, withAskTool, withMemoryTool, withSkillTool, withToolTimeout, withTurnFrames, wrapToolStepOutput, writeMemory };
|
|
3346
|
+
export { AGENT_ACTOR_DIRECTORY, AGENT_ACTOR_RESOLVER, AGENT_APPROVAL_PORT, AGENT_ATTACHMENT_STAGING, AGENT_DEPS_FACTORY, AGENT_DIAGNOSTIC_EVENTS, AGENT_DURABLE_RUNNER, AGENT_EMBEDDING_PROVIDER, AGENT_GOVERNANCE_QUERIES, AGENT_MEMORY, AGENT_MODEL, AGENT_OPTIONS, AGENT_PRICING_STORE, AGENT_PROMPT_CONTRIBUTORS, AGENT_QUOTA_STORE, AGENT_REGISTRY, AGENT_RETRIEVER, AGENT_ROLES_POLICY, AGENT_RUNNER, AGENT_SINK, AGENT_SKILLS, AGENT_SKILL_SOURCES, AGENT_SPAN_EVENTS, AGENT_STORE, AGENT_TOOL_REGISTRY, APPROVAL_EXPIRED_REASON, Actor, type ActorDirectory, type ActorResolver, type ActorSpendRow, type AgentApprovalPort, AgentDefinition, type AgentDelegated, AgentDelegation, type AgentDiagnosticEvent, type AgentDiagnosticKey, type AgentFollowUpsSpan, type AgentGovernanceQueries, AgentIntake, type AgentLlmTurnSpan, type AgentLoopDeps, type AgentLoopHooks, type AgentLoopResult, type AgentMemoryResolved, type AgentMemoryWritten, type AgentMessageEvent, type AgentPricingStore, type AgentQuotaExceeded, AgentRegistry, type AgentRetrievalSpan, type AgentRetrieved, type AgentRunFailed, type AgentRunFinished, AgentRunInput, type AgentRunStarted, type AgentRunner, type AgentSkillsResolved, type AgentSpanEvent, type AgentStore, AgentStreamError, AgentStreamEvent, type AgentStructuredOutputSpan, type AgentToolCallEvent, type AgentToolExecutionSpan, type AgentToolRetry, AgentUiComponent, AiToolCtx, type AppendMessageInput, type ApprovalDecisionRef, type ApprovalPolicy, type ApprovalRequirement, type ApprovalThreadRef, type ApprovalToolRef, type ApprovalWhere, type AttachmentRef, type AttachmentStagingStore, type BufferedModelTurnResult, type BuildMemoryBlockInput, type CostUsage, type CreateThreadInput, type CurrentModelPrice, DEFAULT_HISTORY_SUMMARY_INSTRUCTION, DEFAULT_MAX_FACT_CHARS, DEFAULT_MAX_MEMORIES, DEFAULT_MAX_SKILLS, DEFAULT_REFUSAL_REASON, DEFAULT_STRUCTURED_OUTPUT_INSTRUCTION, Decision, DefaultApprovalPolicy, DefaultRolesPolicy, type DetachedDelegationOutcome, type DetachedDelegationReceipt, DetachedDelivery, type DetailThreadRef, ElicitationRequest, type EmbeddingProvider, type EmitUi, type ForgetMemoryInput, type FrameBuffer, GLOBAL_SCOPE, type GovernancePage, type GovernancePageQuery, type GovernanceRange, type GovernanceRunDetail, type GovernanceThreadDetail, type GovernanceThreadDetailQuery, type GovernanceUsageInput, HistoryPolicy, HumanReply, type IncrementalGate, InputProcessor, type ListMemoriesInput, type ListSkillsInput, type ListStagedAttachmentsInput, LlmStepEnvelope, type LoadSkillInput, type MemoryAuthor, type MemoryConfig, type MemoryDigest, type MemoryDigestEntry, type MemoryFact, type MemoryForgetRequest, type MemoryOrigin, type MemoryProvider, type MemoryRecord, type MemoryVerdict, type MemoryWriteOutcome, type MemoryWriteRequest, MessageAttachment, MessageFeedback, MessageUsage, ModelAnswer, ModelMessage, type ModelPrice, type ModelPriceInput, type ModelProvider, type ModelSpendRow, type ModelTurnArgs, type ModelTurnResult, type ObservedTurnFrames, type OfferMemoriesInput, type OutputGateMode, type OutputGateResult, OutputProcessor, type OverriddenMemory, PageContext, type Passage, type PendingApprovalRow, ProcessedPrompt, ProcessorContext, PromptBuilder, PromptContributor, QuotaExceededError, QuotaState, type QuotaStore, REMEMBER_TOOL_DESCRIPTION, REMEMBER_TOOL_NAME, REQUESTER_APPROVER, type RecentRunRow, type RecordRunEndInput, type RecordRunStartInput, type RecordToolCallInput, type RecordUsageInput, type RememberToolInput, type RerankOptions, type Reranker, type ResolveAttachmentInput, type ResolveMemoryDigestInput, type ResolvedDelegation, type RetrieveOptions, type Retriever, type RolesPolicy, type RunAgentBreakdownRow, RunCancelledError, type RunErrorBreakdownRow, type RunMetrics, type RunToolCallRow, type RunTrendPoint, type RunWhere, SKILL_TOOL_DESCRIPTION, SKILL_TOOL_NAME, type ScopeContext, type ScopeResolver, type SearchMemoriesInput, type SettledTask, type SinkWriter, type Skill, type SkillAuthor, type SkillCatalogEntry, type SkillContext, type SkillLoadOutcome, type SkillOffer, type SkillProvider, type SkillSummary, type SkillToolInput, type SkillWriteRequest, type SkillWriteVerdict, type SkillsConfig, type StageAttachmentInput, type StagedAttachment, type StoreMemoryInput, StoredMessage, type StreamError, type StructuredOutcome, StructuredOutputError, THREAD_DETAIL_CONTENT_CHARS, type ThreadActivityRow, ThreadDetail, type ThreadMessageRow, type ThreadMeta, type ThreadSpendRow, ThreadSummary, type ThreadTurnPage, type ThreadTurnQuery, type ThreadTurnReader, type ThreadUsageRollup, type ThreadWhere, type TokenStreamSink, type ToolCallActivityRow, ToolCallApproval, type ToolCallApprovalColumns, type ToolCallApprovalState, ToolCallRequest, ToolCallStatus, type ToolCallWhere, ToolDefinition, ToolDisabledError, ToolForbiddenError, ToolHandler, ToolInputInvalidError, ToolKind, type ToolKindDeps, ToolNotFoundError, ToolRegistry, ToolResult, ToolSpec, type ToolStatRow, ToolStepEnvelope, ToolTransientRetrySetting, type TurnFrameSummary, type UiCollector, type UpdateThreadInput, type UpdateToolCallInput, UsagePurpose, type UsageTrendPoint, type WindowHistoryOptions, type WithMemoryToolInput, type WriteMemoryInput, actorScope, agentDiagnosticKey, agentFailureCode, bucketByActor, bucketByModel, bucketByThread, bucketUsageTrend, buildMemoryBlock, buildSkillsBlock, canActorUseTool, compositeSkillProvider, createFrameBuffer, createIncrementalGate, createUiCollector, dayBoundsUtc, defaultCanDecide, defaultScopeResolver, detachedDelivered, detachedStarted, detachedUnsettled, estimateCost, estimateMessageTokens, extractJson, filterToolsByAllowList, filterToolsByCanUse, filterToolsByEnabled, filterToolsByRole, gateFollowUps, gateTail, isControlFlowSignal, isReplayIntegrityError, isToolEnabled, loadSkill, mayDecideApproval, memoryForgetVerdict, memoryWriteVerdict, mergeUi, normalizeDelegation, observeTurnFrames, offerMemories, offerSkills, publishAgentDelegated, publishAgentMemoryResolved, publishAgentMemoryWritten, publishAgentMessage, publishAgentQuotaExceeded, publishAgentRetrieved, publishAgentRunFailed, publishAgentRunFinished, publishAgentRunStarted, publishAgentSkillsResolved, publishAgentToolCall, publishAgentToolRetry, releaseGatedFrames, rememberInputSchema, rememberToolDefinition, repairInstruction, resolveGateLookback, resolveMemoryDigest, resolveOutputGateMode, resolveSkillCatalog, rollupThreadUsage, runAgentLoop, runInputProcessors, runOutputProcessors, seedModelPrices, settleAll, settleUnsettledDelegation, skillInputSchema, skillToolDefinition, skillWriteVerdict, stampToolKinds, staticSkillProvider, summarizeWithModel, tenantScope, toolCallApprovalFromRow, traceLlmTurn, traceToolExecution, truncateDetailContent, unwrapToolStepOutput, validateStructured, windowHistory, withAskTool, withMemoryTool, withSkillTool, withToolTimeout, withTurnFrames, wrapToolStepOutput, writeMemory };
|
|
@@ -1198,8 +1198,22 @@ interface StoredMessage {
|
|
|
1198
1198
|
* for one, or on a store that does not record approvals.
|
|
1199
1199
|
*/
|
|
1200
1200
|
approvals?: ToolCallApproval[];
|
|
1201
|
+
/**
|
|
1202
|
+
* The thread owner's rating of this message (`POST <base>/messages/:id/feedback`). Absent when
|
|
1203
|
+
* nobody rated it, or on a store that does not record feedback.
|
|
1204
|
+
*/
|
|
1205
|
+
feedback?: MessageFeedback;
|
|
1201
1206
|
createdAt: string;
|
|
1202
1207
|
}
|
|
1208
|
+
/** A thumbs-up/down on one message, with an optional free-text comment. */
|
|
1209
|
+
type MessageFeedbackValue = 'up' | 'down';
|
|
1210
|
+
/** What {@link StoredMessage.feedback} holds. Not copied when a thread is forked. */
|
|
1211
|
+
interface MessageFeedback {
|
|
1212
|
+
value: MessageFeedbackValue;
|
|
1213
|
+
comment?: string;
|
|
1214
|
+
/** ISO-8601 instant the rating was last set. */
|
|
1215
|
+
updatedAt: string;
|
|
1216
|
+
}
|
|
1203
1217
|
/**
|
|
1204
1218
|
* How one approval stands. `pending` → still parked; `approved` → someone said yes (or a remembered
|
|
1205
1219
|
* approval did); `rejected` → someone said no; `expired` → nobody answered before `expiresAt`.
|
|
@@ -1510,4 +1524,4 @@ interface ToolHandler<I = unknown> {
|
|
|
1510
1524
|
canUse?(actor: Actor): boolean | Promise<boolean>;
|
|
1511
1525
|
}
|
|
1512
1526
|
|
|
1513
|
-
export { type
|
|
1527
|
+
export { type ElicitationInput as $, type Actor as A, type Decision as B, type ToolStepEnvelope as C, type DetachedDelivery as D, type ElicitationRequest as E, ASK_TOOL_DESCRIPTION as F, ASK_TOOL_NAME as G, type HumanReply as H, type InputProcessor as I, type AgentApprovalRequest as J, type AgentApprovalSettlement as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentCatalogEntry as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AgentHistoryWindow as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, type AskToolInput as V, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as W, DEFAULT_INTAKE_PREAMBLE as X, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as Y, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Z, ELICITATION_INPUT_TYPES as _, type ToolDefinition as a, type ElicitationInputType as a0, type ElicitationOption as a1, type ElicitationOutcome as a2, type ElicitationQuestion as a3, type ElicitationReply as a4, type ElicitationResult as a5, type HistoryPolicyContext as a6, type HistorySelection as a7, type HistorySummary as a8, type IncrementalGating as a9, normalizeElicitationReply as aA, questionOptions as aB, readElicitationInput as aC, readElicitationQuestions as aD, renderElicitationAnswers as aE, resolveElicitation as aF, resolveToolTransientRetryNumbers as aG, settleElicitation as aH, validateElicitationAnswer as aI, validateElicitationValue as aJ, type InvokeWithTransientRetryOptions as aa, MAX_ASK_QUESTIONS as ab, type MessageFeedbackValue as ac, type MessageRole as ad, OutputRejectedError as ae, type OutputVerdict as af, ProcessorFailedError as ag, type PromptContext as ah, type QuotaView as ai, type ToolCallApprovalStatus as aj, type ToolCatalogEntry as ak, type ToolConfirmation as al, type ToolPresentation as am, type ToolPresentationTone as an, type ToolResultField as ao, type ToolResultView as ap, type ToolStepCtx as aq, type ToolTransientRetryNumbers as ar, type ToolTransientRetryOptions as as, askInputSchema as at, askToolDefinition as au, decodeStreamEvent as av, encodeStreamEvent as aw, invokeWithTransientRetry as ax, isTransientToolError as ay, isTypedQuestion as az, type ToolCallRequest as b, type MessageUsage as c, type AgentUiComponent as d, type AiToolCtx as e, type AgentStreamEvent as f, type ThreadSummary as g, type ThreadDetail as h, type ToolResult as i, type MessageAttachment as j, type MessageFeedback as k, type ToolCallStatus as l, type ToolSpec as m, type AgentRunInput as n, type ToolKind as o, type ToolCallApproval as p, type HistoryPolicy as q, type ProcessedPrompt as r, type ModelAnswer as s, type PageContext as t, type AgentDefinition as u, type AgentDelegation as v, type PromptBuilder as w, type PromptContributor as x, type ToolTransientRetrySetting as y, type AgentIntake as z };
|
|
@@ -1198,8 +1198,22 @@ interface StoredMessage {
|
|
|
1198
1198
|
* for one, or on a store that does not record approvals.
|
|
1199
1199
|
*/
|
|
1200
1200
|
approvals?: ToolCallApproval[];
|
|
1201
|
+
/**
|
|
1202
|
+
* The thread owner's rating of this message (`POST <base>/messages/:id/feedback`). Absent when
|
|
1203
|
+
* nobody rated it, or on a store that does not record feedback.
|
|
1204
|
+
*/
|
|
1205
|
+
feedback?: MessageFeedback;
|
|
1201
1206
|
createdAt: string;
|
|
1202
1207
|
}
|
|
1208
|
+
/** A thumbs-up/down on one message, with an optional free-text comment. */
|
|
1209
|
+
type MessageFeedbackValue = 'up' | 'down';
|
|
1210
|
+
/** What {@link StoredMessage.feedback} holds. Not copied when a thread is forked. */
|
|
1211
|
+
interface MessageFeedback {
|
|
1212
|
+
value: MessageFeedbackValue;
|
|
1213
|
+
comment?: string;
|
|
1214
|
+
/** ISO-8601 instant the rating was last set. */
|
|
1215
|
+
updatedAt: string;
|
|
1216
|
+
}
|
|
1203
1217
|
/**
|
|
1204
1218
|
* How one approval stands. `pending` → still parked; `approved` → someone said yes (or a remembered
|
|
1205
1219
|
* approval did); `rejected` → someone said no; `expired` → nobody answered before `expiresAt`.
|
|
@@ -1510,4 +1524,4 @@ interface ToolHandler<I = unknown> {
|
|
|
1510
1524
|
canUse?(actor: Actor): boolean | Promise<boolean>;
|
|
1511
1525
|
}
|
|
1512
1526
|
|
|
1513
|
-
export { type
|
|
1527
|
+
export { type ElicitationInput as $, type Actor as A, type Decision as B, type ToolStepEnvelope as C, type DetachedDelivery as D, type ElicitationRequest as E, ASK_TOOL_DESCRIPTION as F, ASK_TOOL_NAME as G, type HumanReply as H, type InputProcessor as I, type AgentApprovalRequest as J, type AgentApprovalSettlement as K, type LlmStepEnvelope as L, type ModelMessage as M, type AgentCatalogEntry as N, type OutputProcessor as O, type ProcessorContext as P, type QuotaState as Q, type AgentHistoryWindow as R, type StoredMessage as S, type ToolHandler as T, type UsagePurpose as U, type AskToolInput as V, DEFAULT_INCREMENTAL_LOOKBACK_CHARS as W, DEFAULT_INTAKE_PREAMBLE as X, DEFAULT_TOOL_TRANSIENT_RETRY_ATTEMPTS as Y, DEFAULT_TOOL_TRANSIENT_RETRY_BACKOFF_MS as Z, ELICITATION_INPUT_TYPES as _, type ToolDefinition as a, type ElicitationInputType as a0, type ElicitationOption as a1, type ElicitationOutcome as a2, type ElicitationQuestion as a3, type ElicitationReply as a4, type ElicitationResult as a5, type HistoryPolicyContext as a6, type HistorySelection as a7, type HistorySummary as a8, type IncrementalGating as a9, normalizeElicitationReply as aA, questionOptions as aB, readElicitationInput as aC, readElicitationQuestions as aD, renderElicitationAnswers as aE, resolveElicitation as aF, resolveToolTransientRetryNumbers as aG, settleElicitation as aH, validateElicitationAnswer as aI, validateElicitationValue as aJ, type InvokeWithTransientRetryOptions as aa, MAX_ASK_QUESTIONS as ab, type MessageFeedbackValue as ac, type MessageRole as ad, OutputRejectedError as ae, type OutputVerdict as af, ProcessorFailedError as ag, type PromptContext as ah, type QuotaView as ai, type ToolCallApprovalStatus as aj, type ToolCatalogEntry as ak, type ToolConfirmation as al, type ToolPresentation as am, type ToolPresentationTone as an, type ToolResultField as ao, type ToolResultView as ap, type ToolStepCtx as aq, type ToolTransientRetryNumbers as ar, type ToolTransientRetryOptions as as, askInputSchema as at, askToolDefinition as au, decodeStreamEvent as av, encodeStreamEvent as aw, invokeWithTransientRetry as ax, isTransientToolError as ay, isTypedQuestion as az, type ToolCallRequest as b, type MessageUsage as c, type AgentUiComponent as d, type AiToolCtx as e, type AgentStreamEvent as f, type ThreadSummary as g, type ThreadDetail as h, type ToolResult as i, type MessageAttachment as j, type MessageFeedback as k, type ToolCallStatus as l, type ToolSpec as m, type AgentRunInput as n, type ToolKind as o, type ToolCallApproval as p, type HistoryPolicy as q, type ProcessedPrompt as r, type ModelAnswer as s, type PageContext as t, type AgentDefinition as u, type AgentDelegation as v, type PromptBuilder as w, type PromptContributor as x, type ToolTransientRetrySetting as y, type AgentIntake as z };
|