@gengage/assistant-fe 0.6.27 → 0.6.29
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/agent-ui-steps-WKbTVOS4.js +3197 -0
- package/dist/agentic/context/context-store.d.ts +25 -0
- package/dist/agentic/index.d.ts +15 -1
- package/dist/agentic/index.js +164 -150
- package/dist/agentic/types.d.ts +31 -3
- package/dist/agentic/worker/agent-ui-steps.d.ts +43 -0
- package/dist/agentic/worker/agent-ui.d.ts +44 -0
- package/dist/agentic/worker/be-client.d.ts +16 -4
- package/dist/agentic/worker/coalesce.d.ts +25 -0
- package/dist/agentic/worker/compaction.d.ts +12 -0
- package/dist/agentic/worker/pdp-hydrate.d.ts +30 -0
- package/dist/agentic/worker/rpc.d.ts +4 -1
- package/dist/agentic/worker/tool-schema.d.ts +19 -0
- package/dist/agentic/worker.d.ts +15 -1
- package/dist/agentic/worker.js +292 -264
- package/dist/agentic.iife.js +9 -9
- package/dist/{api-paths-C9NwnH29.js → api-paths-DdJr0XJ-.js} +1 -1
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +1 -1
- package/dist/chat.js +1 -1
- package/dist/{common-Bhl1mzk2.js → common-DlxPSm8-.js} +1 -1
- package/dist/common.js +5 -5
- package/dist/{connection-warning-D-0Mxk-A.js → connection-warning-B5i-GYl3.js} +1 -1
- package/dist/{fastIntent-bAlwVoje.js → fastIntent-BXTc79jM.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/native.iife.js +1 -1
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +1 -1
- package/dist/qna.js +1 -1
- package/dist/{runtime-BAFZ7iOP.js → runtime-2RYLgot8.js} +3 -3
- package/dist/{runtime-oEtmgT4U.js → runtime-BMBmZgp7.js} +3 -3
- package/dist/{runtime-CUNLK1KR.js → runtime-DzSiJPPm.js} +3 -3
- package/dist/{simbut-Dt8e5uSk.js → simbut-Bwpt8E03.js} +1 -1
- package/dist/simbut.iife.js +1 -1
- package/dist/simbut.js +1 -1
- package/dist/{simrel-txr23_xG.js → simrel-D0G7CUSn.js} +1 -1
- package/dist/simrel-runtime.js +1 -1
- package/dist/simrel.iife.js +1 -1
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-56tkaZZB.js → widget-base-XYJ0Ou6y.js} +1 -1
- package/package.json +1 -1
- package/dist/route-params-5K4Du1Xa.js +0 -2476
|
@@ -12,6 +12,19 @@ interface ContextStoreOptions {
|
|
|
12
12
|
threadTtlMs?: number | undefined;
|
|
13
13
|
}
|
|
14
14
|
type PatchInput = Partial<ChatContext> | null | undefined | ((current: ChatContext) => Partial<ChatContext> | null | undefined);
|
|
15
|
+
export type PendingMessageKind = 'steer' | 'follow_up';
|
|
16
|
+
export type QueueMode = 'all' | 'one-at-a-time';
|
|
17
|
+
export interface PendingMessage {
|
|
18
|
+
kind: PendingMessageKind;
|
|
19
|
+
text: string;
|
|
20
|
+
enqueuedAt: number;
|
|
21
|
+
}
|
|
22
|
+
export interface SavePointEntry<TPayload = unknown> {
|
|
23
|
+
threadId: string;
|
|
24
|
+
turnIndex: number;
|
|
25
|
+
payload: TPayload;
|
|
26
|
+
createdAt: number;
|
|
27
|
+
}
|
|
15
28
|
export declare class ContextStore {
|
|
16
29
|
#private;
|
|
17
30
|
constructor({ accountId, locale, parentUrl, rpc, persistentPanelKeys, panelKeyLimits, messageLimit, maxThreads, threadTtlMs, }: ContextStoreOptions);
|
|
@@ -24,9 +37,21 @@ export declare class ContextStore {
|
|
|
24
37
|
}) | null | undefined): Promise<ChatContext>;
|
|
25
38
|
patch(threadId: string | null | undefined, patch: PatchInput): ChatContext | null;
|
|
26
39
|
appendUserMessage(threadId: string | null | undefined, text: string): ChatContext | null;
|
|
40
|
+
appendToolResult(threadId: string | null | undefined, entry: {
|
|
41
|
+
name: string;
|
|
42
|
+
content?: string;
|
|
43
|
+
details?: unknown;
|
|
44
|
+
}): ChatContext | null;
|
|
27
45
|
commit(threadId: string | null | undefined): Promise<ChatContext | null>;
|
|
28
46
|
delete(threadId: string | null | undefined): boolean;
|
|
29
47
|
clear(): void;
|
|
48
|
+
enqueueSteer(threadId: string | null | undefined, text: string, mode?: QueueMode): void;
|
|
49
|
+
enqueueFollowUp(threadId: string | null | undefined, text: string, mode?: QueueMode): void;
|
|
50
|
+
drainPending(threadId: string | null | undefined, kind: PendingMessageKind): PendingMessage | null;
|
|
51
|
+
peekPending(threadId?: string | null | undefined): readonly PendingMessage[];
|
|
52
|
+
savepoint<T>(threadId: string, turnIndex: number, payload: T): Promise<void>;
|
|
53
|
+
restoreSavepoint<T>(threadId: string, turnIndex?: number): Promise<SavePointEntry<T> | null>;
|
|
54
|
+
clearSavepoint(threadId: string, turnIndex?: number): Promise<void>;
|
|
30
55
|
pruneExpired(now?: number): number;
|
|
31
56
|
}
|
|
32
57
|
export {};
|
package/dist/agentic/index.d.ts
CHANGED
|
@@ -46,6 +46,20 @@ export { createLocalRefStore, isRef } from './util/common/ref-store.js';
|
|
|
46
46
|
export { anonymousRequestText as retailAnonymousRequestText, anonymizeMessages as retailAnonymizeMessages, redactPii as retailRedactPii, } from './util/common/retail-privacy.js';
|
|
47
47
|
export { firstArrayValue, routeFlowParams, routeSkuList } from './util/common/route-params.js';
|
|
48
48
|
export { createSiteAwarenessTools } from './util/common/site-awareness.js';
|
|
49
|
+
export { validateToolArgs } from './worker/tool-schema.js';
|
|
50
|
+
export type { ToolArgSchema, ToolArgValidationResult } from './worker/tool-schema.js';
|
|
51
|
+
export { __resetAllCartCoalescersForTesting, coalesceAddToCart, singleFlight } from './worker/coalesce.js';
|
|
52
|
+
export type { SingleFlightExecutor, SingleFlightKeyFn, SingleFlightOptions } from './worker/coalesce.js';
|
|
53
|
+
export { __resetAllPdpHydratorsForTesting, wrapResolveProductsWithPdpHydration } from './worker/pdp-hydrate.js';
|
|
54
|
+
export type { PdpHydrationOptions, WrappedResolveProducts } from './worker/pdp-hydrate.js';
|
|
55
|
+
export type { BeClientInterceptors, InvokeBeOpArgs } from './worker/be-client.js';
|
|
56
|
+
export type { PendingMessage, PendingMessageKind, QueueMode, SavePointEntry } from './context/context-store.js';
|
|
57
|
+
export { mergeRoundProducts, searchFollowUpPills, withSimilarsAppend } from './worker/agent-ui.js';
|
|
58
|
+
export type { RoundObservation, SearchFollowUpAccountConfig, SearchFollowUpContext, SearchFollowUpPill, SearchFollowUpProduct, } from './worker/agent-ui.js';
|
|
59
|
+
export { applyCompactionResult, buildCompactionRequest, shouldCompact } from './worker/compaction.js';
|
|
60
|
+
export type { CompactionOptions, CompactionRequest } from './worker/compaction.js';
|
|
61
|
+
export { buildPdpFollowupSteps, buildToolUiSteps } from './worker/agent-ui-steps.js';
|
|
62
|
+
export type { ToolObservationEnvelope, ToolUiStepsDeps } from './worker/agent-ui-steps.js';
|
|
49
63
|
export type { MainRpcMemory } from './worker/rpc.js';
|
|
50
64
|
export type { BeOpInputBase, CompareInput, CompareOutput, GssInstallmentOption, GssProductDetails, GssProductFeature, GssProductQuestionAnswer, GssProductReview, GssProductSeller, GssShippingOption, IntentOpInput, IntentOpOutput, LocaleCode, MoneyValue, ProductAnswerInput, ProductAnswerOutput, RefPayload, UiSpec, UiSpecElement, UiSpecElementType, UiSpecEvent, } from './contracts/agentic-contracts.js';
|
|
51
|
-
export type { AccountModule, AgentLoopPatch, AgentLoopPredicate, AgentLoopStep, AgentConfirmationRequest, AgentConfirmationResult, AgentMemoryProvider, AgentTraceCallback, AgentTraceEvent, AdapterStep, AgentBeaconPayload, Awaitable, BeaconCallback, BeClient, BeOpStep, BranchStep, BrowserCachePolicy, ChatContext, ChatMessage, ChatMeta, ChatPanel, ChatThread, CommitStep, EmitStep, Flow, FlowAdapterFn, FlowAdapterMap, FlowConfirmationGate, FlowConfirmationRequest, FlowConfirmationValue, FlowPatch, FlowStep, FlowStepCtx, FlowValue, MemoryTier, ParallelStep, RefusalStep, ToolFn, ToolMap, ToolStep, UiSpecEnvelope, } from './types.js';
|
|
65
|
+
export type { AccountModule, AfterBeOpResult, AfterToolCallResult, AgentHooks, AgentLoopPatch, AgentLoopPredicate, AgentLoopStep, AgentConfirmationRequest, AgentConfirmationResult, AgentMemoryProvider, AgentTraceCallback, AgentTraceEvent, AdapterStep, AgentBeaconPayload, BeforeBeOpResult, BeforeToolCallResult, Awaitable, BeaconCallback, BeClient, BeOpStep, BranchStep, BrowserCachePolicy, ChatContext, ChatMessage, ChatMeta, ChatPanel, ChatThread, CommitStep, EmitStep, Flow, FlowAdapterFn, FlowAdapterMap, FlowConfirmationGate, FlowConfirmationRequest, FlowConfirmationValue, FlowPatch, FlowStep, FlowStepCtx, FlowValue, MemoryTier, ParallelStep, RefusalStep, ToolFn, ToolMap, ToolStep, UiSpecEnvelope, } from './types.js';
|