@pluno/product-agent-web 0.1.315 → 0.1.316

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.
@@ -26,7 +26,6 @@ export declare const PA_COMPATIBILITY_OPERATION_ROUTES: {
26
26
  readonly "runtimeClient.getState": "projection";
27
27
  readonly "runtimeClient.connect": "engine_command";
28
28
  readonly "runtimeClient.destroy": "platform_shell";
29
- readonly "runtimeClient.warmup": "engine_command";
30
29
  readonly "runtimeClient.recordWidgetLifecycle": "platform_shell";
31
30
  readonly "runtimeClient.recordPromptPresented": "engine_command";
32
31
  readonly "runtimeClient.sendMessage": "engine_command";
@@ -57,7 +56,6 @@ export declare const PA_COMPATIBILITY_OPERATION_ROUTES: {
57
56
  readonly "sessionEngine.connect": "engine_command";
58
57
  readonly "sessionEngine.disconnect": "engine_command";
59
58
  readonly "sessionEngine.destroy": "platform_shell";
60
- readonly "sessionEngine.warmup": "engine_command";
61
59
  readonly "sessionEngine.recordWidgetLifecycle": "platform_shell";
62
60
  readonly "sessionEngine.recordPromptPresented": "engine_command";
63
61
  readonly "sessionEngine.reportOperationTiming": "platform_shell";
@@ -87,7 +85,6 @@ export declare const PA_COMPATIBILITY_OPERATION_ROUTES: {
87
85
  readonly "sessionEngine.refreshAccount": "engine_query";
88
86
  readonly "sessionEngine.loadSession": "engine_command";
89
87
  readonly "runtime.connect": "engine_command";
90
- readonly "runtime.warmup": "engine_command";
91
88
  readonly "runtime.widget_lifecycle": "platform_shell";
92
89
  readonly "runtime.prompt_presented": "engine_command";
93
90
  readonly "runtime.report_operation_timing": "platform_shell";
@@ -1,6 +1,4 @@
1
1
  import type { PAStage7Slices, PAStage7Command, PAStage7Effects, PAStage7Ports } from '../core/features/contracts';
2
- import { type PAActiveUsersState, type PAActiveUsersCommand, type PAActiveUsersEffects } from "../core/active-users/reducer";
3
- import type { PAEffectHandlers } from "../core/kernel/effects";
4
2
  import { type PAModelSelectionState } from "../core/model-selection/state";
5
3
  import type { PAModelCommand } from "../core/model-selection/commands";
6
4
  import type { PAModelEvent } from "../core/model-selection/events";
@@ -13,7 +11,6 @@ export type PASliceOwner = "legacy" | "core";
13
11
  export declare const PA_SLICE_OWNERSHIP: Readonly<{
14
12
  readonly modelSelection: "core";
15
13
  readonly directory: "core";
16
- readonly activeUsers: "core";
17
14
  readonly conversation: "core";
18
15
  readonly account: "core";
19
16
  readonly interactions: "core";
@@ -29,23 +26,21 @@ export type PAClientSlices = PAStage7Slices & Readonly<{
29
26
  modelSelection: PAModelSelectionState;
30
27
  directory: PADirectoryState;
31
28
  conversation: PAConversationState;
32
- activeUsers: PAActiveUsersState;
33
29
  }>;
34
- export type PAClientCommand = PAStage7Command | PAModelCommand | PADirectoryCommand | PAConversationCommand | PAActiveUsersCommand;
30
+ export type PAClientCommand = PAStage7Command | PAModelCommand | PADirectoryCommand | PAConversationCommand;
35
31
  export type PAClientEvent = PAModelEvent | PADirectoryEvent | PAConversationEvent;
36
- type PAClientEffects = PAStage7Effects & PADirectoryEffects & PAConversationEffects & PAActiveUsersEffects;
32
+ type PAClientEffects = PAStage7Effects & PADirectoryEffects & PAConversationEffects;
37
33
  export type PAClientProjection = PAStage7Slices & Readonly<{
38
34
  modelSelection: PAModelSelectionState;
39
35
  directory: PADirectoryProjection;
40
36
  conversation: ReturnType<typeof selectConversation>;
41
- activeUsers: PAActiveUsersState;
42
37
  }>;
43
38
  export declare class PAClientRuntime {
44
39
  readonly engine: PAEngine<PAEngineState<PAClientSlices>, PAClientCommand, PAClientEvent, PAClientEffects, PAClientProjection>;
45
40
  private readonly disposeListeners;
46
41
  private conversationPorts;
47
42
  private featurePorts;
48
- constructor(directoryPorts?: PADirectoryPorts, conversationPorts?: Partial<PAConversationPorts>, activeUsersPorts?: PAEffectHandlers<PAActiveUsersEffects>, stage7Ports?: Partial<PAStage7Ports>);
43
+ constructor(directoryPorts?: PADirectoryPorts, conversationPorts?: Partial<PAConversationPorts>, stage7Ports?: Partial<PAStage7Ports>);
49
44
  private disposed;
50
45
  installConversationPorts(ports: PAConversationPorts): void;
51
46
  installFeaturePorts(ports: Partial<PAStage7Ports>): void;
@@ -8,7 +8,7 @@ export declare const getRuntimeModelScope: (runtime: PAClientRuntime, clientScop
8
8
  selectedModel?: PAProductAgentModel;
9
9
  submissions: Readonly<Record<string, import("../core/model-selection/state").PAModelSubmission>>;
10
10
  }>;
11
- export declare const getRuntimeModel: (runtime: PAClientRuntime, clientScopeId: PAClientScopeId) => "gpt-6-sol" | "gpt-6-luna" | "deepseek/deepseek-v4-flash" | "anthropic/claude-opus-5.5" | "gpt-5.6-sol" | "gpt-5.6-terra" | "anthropic/claude-sonnet-5" | "anthropic/claude-opus-5" | "deepseek/deepseek-chat-v3.1" | "gpt-5.4-nano" | "gpt-5.4-mini" | "gpt-5.4" | "gpt-5.6-luna" | "gpt-6.1-sol" | undefined;
11
+ export declare const getRuntimeModel: (runtime: PAClientRuntime, clientScopeId: PAClientScopeId) => "anthropic/claude-opus-5" | "anthropic/claude-opus-5.5" | "anthropic/claude-sonnet-5" | "deepseek/deepseek-chat-v3.1" | "deepseek/deepseek-v4-flash" | "gpt-5.4-nano" | "gpt-5.4-mini" | "gpt-5.4" | "gpt-5.6-luna" | "gpt-5.6-terra" | "gpt-5.6-sol" | "gpt-6.1-sol" | "gpt-6-sol" | "gpt-6-luna" | undefined;
12
12
  export declare function captureRequestedModel(runtime: PAClientRuntime, clientScopeId: PAClientScopeId, clientMessageId: string, requestedModel?: PAProductAgentModel | null): PAProductAgentModel | undefined;
13
13
  export declare function acceptModelRouting(runtime: PAClientRuntime, clientScopeId: PAClientScopeId, sessionId: string, clientMessageId: string, value: unknown, updatedAt?: string): void;
14
14
  export declare function hydrateModelRouting(runtime: PAClientRuntime, clientScopeId: PAClientScopeId, sessionId: string, turns: unknown): void;
@@ -33,10 +33,6 @@ export type ProductAgentRuntimeCommand = {
33
33
  uiInvariant?: UiInvariantEvidence;
34
34
  reason: string;
35
35
  clientMessageId?: string;
36
- } | {
37
- type: "runtime.warmup";
38
- reason: "panel_open" | "extension_install" | "composer_input";
39
- requestedModel?: ProductAgentModel;
40
36
  } | {
41
37
  type: "runtime.widget_lifecycle";
42
38
  action: ProductAgentWidgetLifecycleAction;
@@ -139,7 +135,6 @@ export type ProductAgentRuntimeClient = {
139
135
  reportResponseVisibility?(observation: ResponseVisibilityObservation): void;
140
136
  reportInvalidStateTransition?(reason: string, clientMessageId?: string, uiInvariant?: UiInvariantEvidence): void;
141
137
  reportDisplayedError?(reason: string, errorFingerprint: string, displayedMessage?: string, renderedError?: RenderedErrorEvidence, historyRefreshFailure?: HistoryRefreshFailure): void;
142
- warmup(reason?: "panel_open" | "extension_install" | "composer_input", requestedModel?: ProductAgentModel): void;
143
138
  recordPromptPresented?(feature: "notifications" | "tab_grouping", openingGeneration: number): void;
144
139
  recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
145
140
  sendMessage(content: string, options?: {
@@ -222,7 +217,6 @@ export declare class ProductAgentRemoteRuntimeClient implements ProductAgentRunt
222
217
  updateProjection(state: ProductAgentState, model?: ProductAgentModel, sessionHistoryState?: ProductAgentQueryState<ProductAgentEntityQueryData<ProductAgentSessionHistoryEntry>>, interactions?: readonly ProductAgentInteraction[], account?: ProductAgentAccountProjection | null): void;
223
218
  connect(): Promise<void>;
224
219
  destroy(): void;
225
- warmup(reason?: "panel_open" | "extension_install" | "composer_input", requestedModel?: ProductAgentModel): Promise<void>;
226
220
  recordPromptPresented(feature: "notifications" | "tab_grouping", openingGeneration: number): void;
227
221
  recordWidgetLifecycle(action: ProductAgentWidgetLifecycleAction, trigger: ProductAgentWidgetLifecycleTrigger): void;
228
222
  reportOperationTiming(timing: OperationTiming): void;
package/dist/widget.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { ProductAgentTokenProviderError, type ProductAgentAttachment, type ProductAgentIntegrationAuthRequest, type ProductAgentPersonalChannelConnectionRequest, type ProductAgentInitOptions, type ProductAgentModel, type ProductAgentRuntimeAdapters, type ProductAgentRuntimeClient, type ProductAgentWidgetLifecycleTrigger } from "./index";
2
2
  import { type PersonalProductAgentModel } from "./modelSelection";
3
3
  import { type ProductAgentShareCandidate } from "./shareCard";
4
- import { type ActiveUsersCounterValue } from "./activeUsersCounter";
5
4
  import { type ProductAgentInteraction, type ProductAgentAccountProjection } from "./runtimeState";
6
5
  export { ProductAgentTokenProviderError };
7
6
  export type ProductAgentWidgetOptions = {
@@ -52,7 +51,6 @@ export type ProductAgentWidgetOptions = {
52
51
  billingStatus?: ProductAgentWidgetBillingStatus | null;
53
52
  billingStatusLoader?: () => Promise<ProductAgentWidgetBillingStatus | null>;
54
53
  runtimeAdapters?: ProductAgentRuntimeAdapters;
55
- activeUsersLoader?: () => Promise<ActiveUsersCounterValue>;
56
54
  socialPostRewardsUrl?: string;
57
55
  extensionRuntime?: {
58
56
  ownerId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluno/product-agent-web",
3
- "version": "0.1.315",
3
+ "version": "0.1.316",
4
4
  "description": "Browser SDK and default widget for embedding Pluno Product Agent into customer web apps.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -25,9 +25,8 @@
25
25
  ],
26
26
  "scripts": {
27
27
  "build": "vite build --mode sdk && vite build --mode widget && vite build --mode runtime && tsc --emitDeclarationOnly",
28
- "check": "tsc --noEmit && npm run check:core && npm run check:architecture-reference",
28
+ "check": "tsc --noEmit && npm run check:core",
29
29
  "check:core": "tsc -p tsconfig.core.json && node scripts/check-core-boundaries.mjs",
30
- "check:architecture-reference": "tsc --noEmit --strict --target ES2020 --module ESNext --moduleResolution Bundler --lib ES2020,DOM ../spec/product-agent/client-core-architecture-reference.d.ts",
31
30
  "check:public-api": "node scripts/check-public-api-compatibility.mjs",
32
31
  "test": "vitest run",
33
32
  "verify:package": "node scripts/verify-package-contents.mjs && node scripts/verify-declaration-freshness.mjs",
@@ -1,4 +0,0 @@
1
- export type ActiveUsersCounterValue = {
2
- count: number;
3
- refreshAfterMs: number;
4
- };
@@ -1,4 +0,0 @@
1
- import type { PAEffectHandlers } from "../../core/kernel/effects";
2
- import type { PAActiveUsersEffects } from "../../core/active-users/reducer";
3
- export declare function createActiveUsersPorts(load: () => Promise<number>, random?: () => number, displayRandom?: () => number): PAEffectHandlers<PAActiveUsersEffects>;
4
- export declare function fetchActiveUsersCount(backendUrl: string, fetcher?: (input: URL, init?: RequestInit) => Promise<Response>): Promise<number>;
@@ -1,17 +0,0 @@
1
- import type { PAFeatureAuthority, PAFeaturePreferences } from '../../core/account/contracts';
2
- import type { PAFeatureMutation, PAStage7Ports } from '../../core/features/contracts';
3
- type LocalMutation = Extract<PAFeatureMutation, {
4
- kind: 'preference' | 'scribblePreference';
5
- }>;
6
- export type LocalPreferenceRecord = Readonly<{
7
- value: PAFeaturePreferences;
8
- pending: readonly LocalMutation[];
9
- }>;
10
- export type LocalPreferenceStorage = Readonly<{
11
- exclusive?: <T>(kind: 'local' | 'sync', work: () => Promise<T>) => Promise<T>;
12
- load: (userId: string) => Promise<LocalPreferenceRecord | null>;
13
- save: (userId: string, record: LocalPreferenceRecord) => Promise<void>;
14
- }>;
15
- type Ports = Pick<PAStage7Ports, 'stage7.query' | 'stage7.mutate'>;
16
- export declare function withLocalPreferences(ports: Ports, storage: LocalPreferenceStorage, current: () => PAFeatureAuthority | null, now: () => number): Ports;
17
- export {};
@@ -1,47 +0,0 @@
1
- import { type PAQueryState } from "../kernel/state";
2
- import type { PAEffect, PAEffectResultEvent } from "../kernel/effects";
3
- export declare const ACTIVE_USERS_POLL_MS = 10000;
4
- export declare const ACTIVE_USERS_DISPLAY_MS = 3000;
5
- export type PAActiveUsersState = Readonly<{
6
- authenticated: boolean;
7
- generation: number;
8
- sequence: number;
9
- displaySequence: number;
10
- backendCount: number | null;
11
- query: PAQueryState<"activeUsers", number>;
12
- }>;
13
- export type PAActiveUsersCommand = Readonly<{
14
- type: "activeUsers.authenticate";
15
- authenticated: boolean;
16
- }>;
17
- export type PAActiveUsersEffects = {
18
- "activeUsers.load": {
19
- input: {
20
- generation: number;
21
- };
22
- output: {
23
- count: number;
24
- updatedAt: number;
25
- offset: number;
26
- };
27
- };
28
- "activeUsers.displayWait": {
29
- input: {
30
- milliseconds: number;
31
- };
32
- output: {
33
- offset: number;
34
- };
35
- };
36
- "activeUsers.wait": {
37
- input: {
38
- milliseconds: number;
39
- };
40
- output: null;
41
- };
42
- };
43
- export declare function createActiveUsersState(): PAActiveUsersState;
44
- export declare function reduceActiveUsers(state: PAActiveUsersState, event: PAActiveUsersCommand | PAEffectResultEvent<PAActiveUsersEffects>): {
45
- state: PAActiveUsersState;
46
- effects: PAEffect<PAActiveUsersEffects>[];
47
- };