@newheap/platform-ai-chat 0.20.0 → 0.22.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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, Type, EnvironmentProviders, Signal, AfterViewInit, OnDestroy, PipeTransform } from '@angular/core';
2
+ import { InjectionToken, Type, EnvironmentProviders, DestroyRef, Signal, AfterViewInit, OnDestroy, PipeTransform } from '@angular/core';
3
3
  import { Observable } from 'rxjs';
4
- import { TranslationObject } from '@ngx-translate/core';
4
+ import { TranslationObject, TranslateService } from '@ngx-translate/core';
5
5
  import { TemplatePortal } from '@angular/cdk/portal';
6
6
  import { SafeHtml } from '@angular/platform-browser';
7
7
 
@@ -12,7 +12,7 @@ import { SafeHtml } from '@angular/platform-browser';
12
12
  /** The caller's role on the subject of a thread. */
13
13
  type AgentSubjectRole = 'none' | 'reader' | 'participant' | 'approver';
14
14
  type AgentRunStatus = 'queued' | 'running' | 'waiting-for-approval' | 'completed' | 'failed' | 'cancelled';
15
- type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
15
+ type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow' | 'shadow-superseded';
16
16
  type AgentGrantSource = 'none' | 'delegated' | 'agent' | 'delegated-read' | 'accountable';
17
17
  /**
18
18
  * How a run worked: `model` through the language model, `rule` through the agent's rules without a
@@ -1122,9 +1122,10 @@ interface ToolCallPart {
1122
1122
  * Chat approvals are `pending`, `approved`, `rejected` or `expired`; proposals of agents that run on
1123
1123
  * their own continue through execution (`executing`, `executed`, `execution-failed`,
1124
1124
  * `execution-unknown`, `resolved`, and `awaiting-application` while the application executes the
1125
- * proposal of a tool it declared with `ExecuteInApplication`) or end as `withdrawn`, `stale` or `shadow`.
1125
+ * proposal of a tool it declared with `ExecuteInApplication`) or end as `withdrawn`, `stale` or `shadow`;
1126
+ * a shadow proposal that a newer one for the same objects replaced is `shadow-superseded`.
1126
1127
  */
1127
- type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
1128
+ type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow' | 'shadow-superseded';
1128
1129
  interface ApprovalPresentationField {
1129
1130
  label: string;
1130
1131
  value: string;
@@ -1888,7 +1889,12 @@ interface AdminAgentInput {
1888
1889
  description: string;
1889
1890
  instructions: string;
1890
1891
  toolSelectors: string[];
1891
- mcpServerIds: string[];
1892
+ /**
1893
+ * The MCP servers assigned to the agent, at most 32. Omitted keeps the agent's assignments on update,
1894
+ * which `assignMcpServer` and `unassignMcpServer` change one by one, and assigns none to a new agent;
1895
+ * an empty list removes them all.
1896
+ */
1897
+ mcpServerIds?: string[];
1892
1898
  requiredPolicy: string | null;
1893
1899
  autonomy: AssistantAutonomy;
1894
1900
  /**
@@ -2030,6 +2036,8 @@ type UpdateAdminAgentRequest = AdminAgentInput & {
2030
2036
  */
2031
2037
  type AgentRunState = 'active' | 'paused' | 'stopped' | 'off' | 'configured-off';
2032
2038
  interface AdminAgent extends AdminAgentInput {
2039
+ /** The MCP servers assigned to the agent. */
2040
+ mcpServerIds: string[];
2033
2041
  /** `false` while the agent is stopped; read `runState` for the full state. */
2034
2042
  isEnabled: boolean;
2035
2043
  version: number;
@@ -2067,6 +2075,12 @@ interface AdminAgent extends AdminAgentInput {
2067
2075
  * works on all object types; missing on older servers.
2068
2076
  */
2069
2077
  worksOnDeclared?: boolean;
2078
+ /**
2079
+ * Whether the agent works in people's chats only (`ChatOnly()` in code): it works on no subject,
2080
+ * so it has no triggers, is on no object's page and is never run now, handed work, consulted, put
2081
+ * in shadow or replayed. Missing on older servers and always `false` for an agent created here.
2082
+ */
2083
+ chatOnly?: boolean;
2070
2084
  /**
2071
2085
  * The object types the agent is known to work on, as a hint next to "All objects": those it
2072
2086
  * accepts hand-offs and consultations about, those its triggers name and those of its threads.
@@ -2490,8 +2504,17 @@ interface McpTool {
2490
2504
  status: McpToolStatus;
2491
2505
  /** Remote annotation. Untrusted: shown as a hint only, never used as a default. */
2492
2506
  readOnlyHint: boolean | null;
2507
+ /**
2508
+ * The tool's reviewed settings were stored before any sync of its server saw it, for example for a
2509
+ * server the host cannot reach yet: its status is `missing` and no agent is offered it until the first
2510
+ * sync that sees it makes it `available` with these settings. Missing on older servers.
2511
+ */
2512
+ awaitingSync?: boolean;
2493
2513
  }
2494
- /** Body of `PUT admin/mcp-servers/{id}/tools/{remoteName}`. */
2514
+ /**
2515
+ * Body of `PUT admin/mcp-servers/{id}/tools/{remoteName}`. For a remote name that no sync has seen yet
2516
+ * these are the reviewed settings the first sync that sees the tool keeps.
2517
+ */
2495
2518
  interface UpdateMcpToolRequest {
2496
2519
  isEnabled: boolean;
2497
2520
  effect: McpToolEffect;
@@ -3676,6 +3699,14 @@ interface ShadowVariant {
3676
3699
  hasRunSettings: boolean;
3677
3700
  /** Whether the variant receives the live agent's triggers now. */
3678
3701
  inEffect: boolean;
3702
+ /**
3703
+ * The agent package a data variant's parts are linked to: a promotion may then take it as that
3704
+ * package's next version of the live agent (`asPackageVersion`). `null` or missing without links
3705
+ * and on older servers.
3706
+ */
3707
+ packageId?: string | null;
3708
+ /** The version of `packageId` the variant's parts are linked to. */
3709
+ packageVersion?: number | null;
3679
3710
  /** Why a data variant with run settings is out of effect, such as `outside-ceiling`. */
3680
3711
  problem: string | null;
3681
3712
  /** The version of the variant's definition, which a promotion sends as `expectedVariantVersion`. */
@@ -3704,6 +3735,12 @@ interface ShadowVariantPromotionRequest {
3704
3735
  expectedVariantVersion?: number | null;
3705
3736
  /** Optional, at most 500 characters, stored with the skill versions the promotion saves. */
3706
3737
  reason?: string | null;
3738
+ /**
3739
+ * The variant's parts, every one linked to one agent package, become that package's next version
3740
+ * of the live agent with the import's rules: locks, run settings, skills, triggers and metadata; the
3741
+ * live agent keeps its name and is linked to the variant's package version. Not with `moveSkills`.
3742
+ */
3743
+ asPackageVersion?: boolean;
3707
3744
  }
3708
3745
  /** The answer of a promotion: the live agent after it, and what moved. */
3709
3746
  interface ShadowVariantPromotion {
@@ -3713,6 +3750,11 @@ interface ShadowVariantPromotion {
3713
3750
  variantId: string;
3714
3751
  /** The skills that moved to the live agent, ordered by id. */
3715
3752
  movedSkills: string[];
3753
+ /**
3754
+ * For a promotion as the package's version: the package the live agent is linked to now, with every
3755
+ * part's outcome; missing otherwise.
3756
+ */
3757
+ package?: AgentPackageImport;
3716
3758
  }
3717
3759
 
3718
3760
  /**
@@ -3943,8 +3985,20 @@ declare class NhAssistantAllowAllAccessPolicy implements NhAssistantAccessPolicy
3943
3985
  */
3944
3986
  declare function provideNhAssistant(config: NhAssistantConfig): EnvironmentProviders;
3945
3987
 
3946
- /** The library's own translation bundles, keyed by language. All keys live under `nh-assistant.`. */
3947
- declare const NH_ASSISTANT_TRANSLATIONS: Readonly<Record<'en' | 'nl', TranslationObject>>;
3988
+ /** Translation bundles of one entry point, keyed by language. All keys live under `nh-assistant.`. */
3989
+ type NhAssistantTranslationBundles = Readonly<Record<'en' | 'nl', TranslationObject>>;
3990
+ /**
3991
+ * The library's own translation bundles, keyed by language. All keys live under `nh-assistant.`.
3992
+ * The administration's `nh-assistant.admin.` texts come with `@newheap/platform-ai-chat/admin` as
3993
+ * `NH_ASSISTANT_ADMIN_TRANSLATIONS`, so they load with the administration instead of with the panel.
3994
+ */
3995
+ declare const NH_ASSISTANT_TRANSLATIONS: NhAssistantTranslationBundles;
3996
+ /**
3997
+ * Merges `bundles` into `TranslateService` whenever the host loads or replaces a language, and
3998
+ * into the current language at once, until `destroyRef` is destroyed. Keys the host defines under
3999
+ * `nh-assistant.` win. Shared with the secondary entry points that bring texts of their own.
4000
+ */
4001
+ declare function nhAssistantMergeTranslations(translate: TranslateService, bundles: NhAssistantTranslationBundles, destroyRef: DestroyRef): void;
3948
4002
  /**
3949
4003
  * Merges the bundled texts into `TranslateService` whenever the host loads or replaces a
3950
4004
  * language. Host loaders never lose the library texts, the library never pre-empts the
@@ -3957,7 +4011,6 @@ declare class NhAssistantTranslationMerger {
3957
4011
  private readonly destroyRef;
3958
4012
  private started;
3959
4013
  start(): void;
3960
- private ensure;
3961
4014
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantTranslationMerger, never>;
3962
4015
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<NhAssistantTranslationMerger>;
3963
4016
  }
@@ -4150,6 +4203,10 @@ declare class NhAssistantAdminApiService {
4150
4203
  getTools(): Observable<ToolCatalogEntry[]>;
4151
4204
  getAgents(): Observable<AdminAgent[]>;
4152
4205
  createAgent(input: AdminAgentInput): Observable<AdminAgent>;
4206
+ /**
4207
+ * Saves an agent's definition when `expectedVersion` is current. Omit `mcpServerIds` to keep its MCP
4208
+ * assignments, which `assignMcpServer` and `unassignMcpServer` change one by one; `[]` removes them.
4209
+ */
4153
4210
  updateAgent(agentId: string, request: UpdateAdminAgentRequest): Observable<AdminAgent>;
4154
4211
  /** Restores a code agent to its definition in code. The run state stays as it is. */
4155
4212
  resetAgent(agentId: string): Observable<AdminAgent>;
@@ -4173,7 +4230,8 @@ declare class NhAssistantAdminApiService {
4173
4230
  /**
4174
4231
  * Changes the technical account that answers for the agent's new runs, or with `actorId: null`
4175
4232
  * uses the account in code again. Fails with `assistant-service-account-not-found` for an
4176
- * account that does not exist or may not sign in.
4233
+ * account that does not exist or may not sign in, and with `assistant-service-account-not-permitted`
4234
+ * for an account that would lend the agent rights the administrator does not hold.
4177
4235
  */
4178
4236
  setServiceAccount(agentId: string, request: SetAgentServiceAccountRequest): Observable<AgentState>;
4179
4237
  /**
@@ -4246,7 +4304,22 @@ declare class NhAssistantAdminApiService {
4246
4304
  * call as `NhAssistantApiService.completeMcpAuthorization`, with the same failure codes.
4247
4305
  */
4248
4306
  completeMcpAuthorization(request: McpCompleteRequest): Observable<McpCompletion>;
4307
+ /**
4308
+ * Enables or disables a tool, sets its effect and its description. A remote name that no sync has
4309
+ * seen yet stores these reviewed settings as a tool that awaits its sync (`awaitingSync`).
4310
+ */
4249
4311
  updateMcpTool(serverId: string, remoteName: string, request: UpdateMcpToolRequest): Observable<McpTool>;
4312
+ /**
4313
+ * Assigns a server to an agent (`PUT admin/mcp-servers/{id}/agents/{agentId}`). Only the assignment
4314
+ * changes, never the agent's definition or version; assigning an assigned server changes nothing.
4315
+ * Answers the server with its `assignedAgentIds`.
4316
+ */
4317
+ assignMcpServer(serverId: string, agentId: string): Observable<McpServer>;
4318
+ /**
4319
+ * Removes a server's assignment to an agent (`DELETE admin/mcp-servers/{id}/agents/{agentId}`); the
4320
+ * agent's definition and version stay. Answers the server with its `assignedAgentIds`.
4321
+ */
4322
+ unassignMcpServer(serverId: string, agentId: string): Observable<McpServer>;
4250
4323
  /**
4251
4324
  * The agent's proposals per tool and agent version in the period: decisions, the rejection rate,
4252
4325
  * feedback per category and the number of different people who gave it.
@@ -4309,7 +4382,8 @@ declare class NhAssistantAdminApiService {
4309
4382
  /**
4310
4383
  * Adds or changes the run settings of an agent created in the administration. An agent in code
4311
4384
  * fails with `assistant-run-settings-in-code`; an unknown technical account with
4312
- * `assistant-service-account-not-found`.
4385
+ * `assistant-service-account-not-found`, and one that would lend the agent rights the
4386
+ * administrator does not hold with `assistant-service-account-not-permitted`.
4313
4387
  */
4314
4388
  saveRunSettings(agentId: string, request: AgentRunSettingsRequest): Observable<AgentRunSettings>;
4315
4389
  /**
@@ -4867,6 +4941,11 @@ declare class NhAssistantStore {
4867
4941
  private readonly queueDispatchState;
4868
4942
  private readonly steeringState;
4869
4943
  private readonly submittingState;
4944
+ /**
4945
+ * The client's clock as the store last read it, moved forward when the wait of an open conversation
4946
+ * ends, so a message is sent instead of queued from then on.
4947
+ */
4948
+ private readonly clockState;
4870
4949
  /** Agent proposals the current user rejected in this session and may give feedback on. */
4871
4950
  private readonly feedbackApprovalsState;
4872
4951
  /** The attachments of the next message per conversation; `''` for a new conversation. */
@@ -4937,6 +5016,12 @@ declare class NhAssistantStore {
4937
5016
  * conversation whose last turn failed accepts a new message; an archived one does not.
4938
5017
  */
4939
5018
  readonly canSend: _angular_core.Signal<boolean>;
5019
+ /**
5020
+ * True while the open chat waits for a question or an approval whose lifetime passed by the
5021
+ * client's clock: a message is then sent at once, and the server closes the wait as expired before
5022
+ * the message's turn starts. The composer no longer says that the conversation waits.
5023
+ */
5024
+ readonly waitExpired: _angular_core.Signal<boolean>;
4940
5025
  /** Messages not yet accepted by the server, for the open conversation. Never persisted. */
4941
5026
  readonly queuedMessages: _angular_core.Signal<readonly NhAssistantQueuedMessage[]>;
4942
5027
  /** Sending or queueing is available during a turn and while an approval waits. */
@@ -5693,7 +5778,7 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
5693
5778
  readonly showConversations: _angular_core.WritableSignal<boolean>;
5694
5779
  readonly showPreferences: _angular_core.WritableSignal<boolean>;
5695
5780
  readonly showShare: _angular_core.WritableSignal<boolean>;
5696
- readonly shareSection: _angular_core.WritableSignal<"members" | "all" | "link">;
5781
+ readonly shareSection: _angular_core.WritableSignal<"members" | "link" | "all">;
5697
5782
  readonly notificationError: _angular_core.WritableSignal<NhAssistantError | null>;
5698
5783
  readonly notificationsLabel: _angular_core.Signal<"nh-assistant.panel.notifications-off" | "nh-assistant.panel.notifications-on">;
5699
5784
  readonly adminRoute: string | any[] | null;
@@ -6246,7 +6331,7 @@ declare class NhAssistantConnectionRequiredComponent {
6246
6331
  /** Asks the question of the turn again after the account was connected. */
6247
6332
  readonly retry: _angular_core.OutputEmitterRef<void>;
6248
6333
  readonly id: string;
6249
- readonly state: _angular_core.WritableSignal<"failed" | "idle" | "connected" | "connecting">;
6334
+ readonly state: _angular_core.WritableSignal<"failed" | "idle" | "connecting" | "connected">;
6250
6335
  /** Why connecting failed, as a code and translation key. */
6251
6336
  readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
6252
6337
  /** The code of `error`. */
@@ -6274,7 +6359,7 @@ declare class NhAssistantShareComponent {
6274
6359
  /** Emitted when the user leaves the view. */
6275
6360
  readonly closed: _angular_core.OutputEmitterRef<void>;
6276
6361
  /** Show the invitation link, participants, or both (the default for custom hosts). */
6277
- readonly section: _angular_core.InputSignal<"members" | "all" | "link">;
6362
+ readonly section: _angular_core.InputSignal<"members" | "link" | "all">;
6278
6363
  readonly id: string;
6279
6364
  readonly conversation: _angular_core.Signal<Conversation | null>;
6280
6365
  readonly isOwner: _angular_core.Signal<boolean>;
@@ -6564,5 +6649,5 @@ declare class NhAssistantMarkdownPipe implements PipeTransform {
6564
6649
  */
6565
6650
  declare function nhAssistantMediaTypeOf(file: Pick<File, 'name' | 'type'>, acceptedMediaTypes: readonly string[], mappedExtensions?: readonly AgentUploadExtension[] | null): string;
6566
6651
 
6567
- export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_AGENT_PACKAGE_FORMAT, NH_ASSISTANT_AGENT_PACKAGE_FORMAT_VERSION, NH_ASSISTANT_AGENT_PACKAGE_MAX_AGENTS, NH_ASSISTANT_AGENT_PACKAGE_MAX_BYTES, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, NH_ASSISTANT_ERROR_CODES, NH_ASSISTANT_FEEDBACK_CATEGORIES, NH_ASSISTANT_FEEDBACK_GROUPS, NH_ASSISTANT_FETCH, NH_ASSISTANT_ICONS, NH_ASSISTANT_JOIN_FRAGMENT, NH_ASSISTANT_MAX_BULK_FEEDBACK, NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS, NH_ASSISTANT_MAX_FEEDBACK_TEXT, NH_ASSISTANT_MAX_PROPOSAL_LOOKUP, NH_ASSISTANT_MAX_SUBJECT_SUMMARY, NH_ASSISTANT_MCP_AUTHORIZATION_MESSAGE, NH_ASSISTANT_MCP_AUTHORIZATION_WINDOW, NH_ASSISTANT_MESSAGE_QUEUED_NOTICE_CODE, NH_ASSISTANT_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PACKAGE_LOCK_ALL, NH_ASSISTANT_PACKAGE_LOCK_FIELDS, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_RESULT_PREVIEW_LENGTH, NH_ASSISTANT_RUN_FRAGMENT, NH_ASSISTANT_RUN_HISTORY_MAX_PAGE, NH_ASSISTANT_RUN_RESULT_MAX_LENGTH, NH_ASSISTANT_SERVER_ERROR_CODES, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_SUBJECT_SEARCH, NH_ASSISTANT_SYSTEM_GLOBAL_ID, NH_ASSISTANT_SYSTEM_SUBJECT_TYPE, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_UPLOAD, NH_ASSISTANT_UPLOAD_HEADER, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConnectionRequiredComponent, NhAssistantConversationListComponent, NhAssistantDocumentComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantMcpConnectService, NhAssistantMcpConnectionsComponent, NhAssistantMcpPopupAuthorizationWindow, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantQuestionCardComponent, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, applyNhAssistantQuestionAnswer, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantConnectMcp, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantMcpAuthorizationFromFragment, nhAssistantShareLink, nhAssistantXhrUpload, normalizeNhAssistantClientContext, provideNhAssistant, toNhAssistantError, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantMarkdownPipe as ɵNhAssistantMarkdownPipe, NhAssistantPickerComponent as ɵNhAssistantPickerComponent, NhAssistantSubjectLinkComponent as ɵNhAssistantSubjectLinkComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantCodeKeys as ɵnhAssistantCodeKeys, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantErrorOf as ɵnhAssistantErrorOf, nhAssistantMediaTypeOf as ɵnhAssistantMediaTypeOf, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, nhAssistantWatchAgentWork as ɵnhAssistantWatchAgentWork, toNhAssistantError as ɵtoNhAssistantError };
6652
+ export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_AGENT_PACKAGE_FORMAT, NH_ASSISTANT_AGENT_PACKAGE_FORMAT_VERSION, NH_ASSISTANT_AGENT_PACKAGE_MAX_AGENTS, NH_ASSISTANT_AGENT_PACKAGE_MAX_BYTES, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, NH_ASSISTANT_ERROR_CODES, NH_ASSISTANT_FEEDBACK_CATEGORIES, NH_ASSISTANT_FEEDBACK_GROUPS, NH_ASSISTANT_FETCH, NH_ASSISTANT_ICONS, NH_ASSISTANT_JOIN_FRAGMENT, NH_ASSISTANT_MAX_BULK_FEEDBACK, NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS, NH_ASSISTANT_MAX_FEEDBACK_TEXT, NH_ASSISTANT_MAX_PROPOSAL_LOOKUP, NH_ASSISTANT_MAX_SUBJECT_SUMMARY, NH_ASSISTANT_MCP_AUTHORIZATION_MESSAGE, NH_ASSISTANT_MCP_AUTHORIZATION_WINDOW, NH_ASSISTANT_MESSAGE_QUEUED_NOTICE_CODE, NH_ASSISTANT_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PACKAGE_LOCK_ALL, NH_ASSISTANT_PACKAGE_LOCK_FIELDS, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_RESULT_PREVIEW_LENGTH, NH_ASSISTANT_RUN_FRAGMENT, NH_ASSISTANT_RUN_HISTORY_MAX_PAGE, NH_ASSISTANT_RUN_RESULT_MAX_LENGTH, NH_ASSISTANT_SERVER_ERROR_CODES, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_SUBJECT_SEARCH, NH_ASSISTANT_SYSTEM_GLOBAL_ID, NH_ASSISTANT_SYSTEM_SUBJECT_TYPE, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_UPLOAD, NH_ASSISTANT_UPLOAD_HEADER, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConnectionRequiredComponent, NhAssistantConversationListComponent, NhAssistantDocumentComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantMcpConnectService, NhAssistantMcpConnectionsComponent, NhAssistantMcpPopupAuthorizationWindow, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantQuestionCardComponent, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, applyNhAssistantQuestionAnswer, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantConnectMcp, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantMcpAuthorizationFromFragment, nhAssistantShareLink, nhAssistantXhrUpload, normalizeNhAssistantClientContext, provideNhAssistant, toNhAssistantError, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantMarkdownPipe as ɵNhAssistantMarkdownPipe, NhAssistantPickerComponent as ɵNhAssistantPickerComponent, NhAssistantSubjectLinkComponent as ɵNhAssistantSubjectLinkComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantCodeKeys as ɵnhAssistantCodeKeys, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantErrorOf as ɵnhAssistantErrorOf, nhAssistantMediaTypeOf as ɵnhAssistantMediaTypeOf, nhAssistantMergeTranslations as ɵnhAssistantMergeTranslations, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, nhAssistantWatchAgentWork as ɵnhAssistantWatchAgentWork, toNhAssistantError as ɵtoNhAssistantError };
6568
6653
  export type { AdminAgent, AdminAgentGroups, AdminAgentInput, AgentAccountability, AgentArtifact, AgentBoard, AgentBoardAgent, AgentBoardList, AgentBoardSubjectType, AgentBoardSummary, AgentBoardVisit, AgentBoardWorksOn, AgentConsultation, AgentConsultationList, AgentConsultationRouteState, AgentConsultationRouteSwitch, AgentConsultationRoutesState, AgentConsultationStatus, AgentDecisionOutcome, AgentElevatedReads, AgentEvaluation, AgentEvaluationCost, AgentEvaluationDecisions, AgentEvaluationDifference, AgentEvaluationFilter, AgentEvaluationRouting, AgentEvaluationRuns, AgentEvaluationTool, AgentExecutionResolution, AgentFeedbackCategoryCount, AgentFeedbackExportFilter, AgentFeedbackFilter, AgentFeedbackItem, AgentFeedbackList, AgentFeedbackListFilter, AgentFeedbackOutcome, AgentFeedbackSummary, AgentFeedbackSummaryRow, AgentGrantSource, AgentGroup, AgentHandOffs, AgentInbox, AgentInboxFilter, AgentInboxGroup, AgentInboxStatus, AgentInboxSubjectGroup, AgentInboxVisit, AgentInvalidationCount, AgentLatestRun, AgentMetadata, AgentMetadataEntry, AgentMetadataRequest, AgentMetadataSource, AgentObjectAgent, AgentObjectAgents, AgentPackage, AgentPackageExport, AgentPackageExportOptions, AgentPackageExportRequest, AgentPackageImport, AgentPackageImportOptions, AgentPackageImportRequest, AgentPackageInfo, AgentPackageLink, AgentPackagePart, AgentPackagePartKind, AgentPackagePartOutcome, AgentPackagePreview, AgentPackageUnlink, AgentPackageUnlinkRequest, AgentPackageWarning, AgentPackageWarningCode, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalOrigin, AgentProposalParent, AgentProposalStatus, AgentReplay, AgentReplayList, AgentReplayRequest, AgentRun, AgentRunConfiguration, AgentRunFilter, AgentRunHistory, AgentRunHistoryItem, AgentRunKind, AgentRunList, AgentRunMcpSkip, AgentRunResult, AgentRunRetryMode, AgentRunSettings, AgentRunSettingsRequest, AgentRunState, AgentRunStatus, AgentServiceAccountState, AgentShadowMode, AgentShadowState, AgentShadowVariants, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSearch, AgentSubjectSearchResult, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectType, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerOutcome, AgentTriggerReceipt, AgentUploadExtension, AgentUploads, AnswerQuestionRequest, ApplicationContext, ApplicationContextVersion, ApplicationMessageDetails, ApplicationMessageLink, ApprovalConsultation, ApprovalDecision, ApprovalPart, ApprovalPolicySummary, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalResolution, ApprovalStatus, ApproverSummary, AssistantAccount, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantConfigurationWarning, AssistantDataClassification, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, CodeConsultation, CodeHandOff, CodeRunSettings, CodeSkill, CodeTrigger, ConnectionRequiredEvent, ConnectionRequiredPart, ConnectionRequiredReason, ConsultationCeiling, ConsultationExposure, ConsultationSubjectRole, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DataConsultation, DataConsultationRequest, DataConsultationState, DataConsultationStateRequest, DataHandOff, DataHandOffRequest, DataSkill, DataSkillRequest, DataSkillVersion, DataSkillVersionStatus, DataTrigger, DataTriggerRequest, DataTriggerShadowRequest, DataTriggerVersion, DecideApprovalRequest, DirectoryEntry, FileLimits, FilePart, FileReference, HandOffAllowance, HandOffCeiling, InstructionAssetList, InstructionAssetProblem, InstructionAssetReference, InstructionAssetSummary, InstructionAssetText, LiveAgentWorkChanged, LiveAgentWorkReason, LiveAgentWorkWatch, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, LowerFileLimits, McpAuthMode, McpAuthorization, McpAuthorizationStart, McpAuthorizeRequest, McpBuiltInAuthMode, McpCompleteRequest, McpCompletion, McpConnection, McpConnectionScope, McpConnectionStatus, McpConnectionsSummary, McpCustomAuthMode, McpDiscoverRequest, McpDiscovery, McpHeadlessUse, McpOAuthInput, McpOAuthSettings, McpOrganizationConnection, McpReader, McpReaderInput, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, McpTransport, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, MessageQueuedEvent, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalResolutionChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantAttachment, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantConsultationLeaveRoute, NhAssistantConsultationRoute, NhAssistantDiagramRenderer, NhAssistantDocumentHeading, NhAssistantDocumentLinkEvent, NhAssistantDocumentLinkKind, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantMcpAuthorizationHandle, NhAssistantMcpAuthorizationOutcome, NhAssistantMcpAuthorizationWindow, NhAssistantMcpReturnOutcome, NhAssistantMessageEvent, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQuestionAnswer, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantSubjectLinkBuilder, NhAssistantSubjectRef, NhAssistantToolCallGroupState, NhAssistantUpload, NhAssistantUploadEvent, NhAssistantUploadRequest, NotificationSettings, PackageAgent, PackageAgentDefinition, PackageConsultation, PackageHandOff, PackagePartLink, PackagePartReference, PackageRunSettings, PackageSkill, PackageTrigger, PushSubscriptionRequest, QuestionAnsweredEvent, QuestionAskedEvent, QuestionPart, QuestionStatus, ResolveApprovalRequest, RunBlock, RunCatalog, RunConfigurationProblem, RunConfigurationProblemKind, RunConfigurationRemoval, SendMessageRequest, SetAgentConsultationRoutesRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShadowVariant, ShadowVariantPromotion, ShadowVariantPromotionRequest, ShareLink, SkillApplyMode, SkillCandidateRequest, SkillComparison, SkillComparisonFilter, SkillComparisonTool, SkillVersionStats, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TriggerCandidateRequest, TriggerComparison, TriggerConflict, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpConnectionRequest, UpdateMcpToolRequest, NhAssistantPickerOption as ɵNhAssistantPickerOption };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newheap/platform-ai-chat",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^20.2.14",
6
6
  "@angular/common": "^20.3.28",
@@ -20,6 +20,9 @@
20
20
  "./i18n/*.json": {
21
21
  "default": "./i18n/*.json"
22
22
  },
23
+ "./admin/i18n/*.json": {
24
+ "default": "./admin/i18n/*.json"
25
+ },
23
26
  "./push/*": {
24
27
  "default": "./push/*"
25
28
  },
@@ -247,6 +247,11 @@ interface NhAssistantMockAdminAgent extends AdminAgentInput {
247
247
  worksOnDeclared?: boolean;
248
248
  /** The object types the agent is known to work on, shown as a hint next to "All objects". */
249
249
  knownSubjectTypes?: string[];
250
+ /**
251
+ * A code agent that works in people's chats only (`ChatOnly()`): it works on no subject, so the
252
+ * mock refuses its starts, its shadow mode and lists it on no object's page, as the server does.
253
+ */
254
+ chatOnly?: boolean;
250
255
  /**
251
256
  * How a code agent runs, as its code says (`codeRunSettings` of its run configuration). By default
252
257
  * it answers to its `serviceAccount` when it has one and to itself otherwise, with the platform's
@@ -778,6 +783,11 @@ interface NhAssistantMockProposal {
778
783
  executionReportDueAt?: string | null;
779
784
  /** The execution's result code, such as `report-overdue`. Default none. */
780
785
  executionResultCode?: string | null;
786
+ /**
787
+ * The newer proposal for the same objects that replaced this one, as the server names it for a
788
+ * `withdrawn` proposal and a `shadow-superseded` shadow proposal. Default none.
789
+ */
790
+ supersededByApprovalId?: string | null;
781
791
  }
782
792
  /** One request the mock API received, for assertions in tests. */
783
793
  interface NhAssistantMockRequest {
@@ -945,6 +955,12 @@ declare class NhAssistantMockBackend {
945
955
  * conversation. The answer resumes the turn with the step's answered steps.
946
956
  */
947
957
  private answer;
958
+ /**
959
+ * Closes the question or the approval a chat waits for once its lifetime passed, as a late answer or
960
+ * decision closes it on the server; one that is still valid keeps the chat busy. Agent threads keep
961
+ * their own rules.
962
+ */
963
+ private closeExpiredWait;
948
964
  private cancel;
949
965
  private playSteps;
950
966
  private pauseForApproval;