@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/admin/index.d.ts CHANGED
@@ -1,9 +1,31 @@
1
+ import { TranslationObject } from '@ngx-translate/core';
1
2
  import * as _angular_core from '@angular/core';
2
3
  import { InjectionToken, Type, Signal, EnvironmentProviders, Injector, OnInit } from '@angular/core';
3
4
  import * as _newheap_platform_ai_chat from '@newheap/platform-ai-chat';
4
5
  import { NhAssistantStore, NhAssistantError, ApplicationContext, ApplicationContextVersion, AdminAgent, PackagePartLink, ToolCatalogEntry, McpServer, RunCatalog, SetAgentStateRequest, AgentSkillState, AgentShadowMode, ShadowVariantPromotion, AgentShadowState, AssistantAutonomy, AssistantDataClassification, InstructionAssetReference, AgentMetadata, AgentMetadataEntry, NhAssistantAdminApiService, ɵnhAssistantErrorKeys as _nhAssistantErrorKeys, AgentEvaluation, AgentReplay, AgentEvaluationCost, AgentProposalFeedbackCategory, AgentFeedbackSummaryRow, AgentFeedbackItem, AgentFeedbackCategoryCount, StaleKind, AgentProposalFeedbackGroup, AgentSubjectType, AgentRunStatus, ɵnhAssistantCodeKeys as _nhAssistantCodeKeys, AgentRunHistoryItem, NhAssistantConsultationRoute, DataConsultation, CodeConsultation, DataTriggerVersion, DataSkill, AgentRunConfiguration, DataTrigger, SkillComparison, DataSkillVersion, TriggerComparison, ɵNhAssistantPickerOption as _NhAssistantPickerOption, McpServerTestResult, McpConnectionsSummary, McpBuiltInAuthMode, McpCustomAuthMode, McpAuthMode, McpTransport, McpConnectionScope, McpHeadlessUse, McpDiscovery, McpTool, McpToolEffect } from '@newheap/platform-ai-chat';
5
6
  import { ɵNhAssistantRunNowAgent as _NhAssistantRunNowAgent } from '@newheap/platform-ai-chat/agent-runs';
6
7
 
8
+ /**
9
+ * The administration's own translation bundles, keyed by language. All keys live under
10
+ * `nh-assistant.admin.`. They ship with this entry point, so they load with the administration's
11
+ * lazy route instead of with the panel; `NH_ASSISTANT_TRANSLATIONS` holds the other texts.
12
+ */
13
+ declare const NH_ASSISTANT_ADMIN_TRANSLATIONS: Readonly<Record<'en' | 'nl', TranslationObject>>;
14
+ /**
15
+ * Merges the administration's texts into `TranslateService` whenever the host loads or replaces a
16
+ * language, like `NhAssistantTranslationMerger` does for the other assistant texts. Keys the host
17
+ * defines under `nh-assistant.admin.` win. The administration's components start it themselves
18
+ * unless the assistant leaves translations to the host (`translations: 'host'`).
19
+ */
20
+ declare class NhAssistantAdminTranslationMerger {
21
+ private readonly translate;
22
+ private readonly destroyRef;
23
+ private started;
24
+ start(): void;
25
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminTranslationMerger, never>;
26
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NhAssistantAdminTranslationMerger>;
27
+ }
28
+
7
29
  type NhAssistantAdminTab = 'context' | 'agents' | 'mcp-servers';
8
30
  /**
9
31
  * The assistant administration page with the tabs Context, Agents and MCP servers. The host
@@ -202,7 +224,8 @@ interface StateChange {
202
224
  * opens the import dialog of agent packages, and "Export as package" on an agent the export dialog
203
225
  * with that agent chosen. An agent that belongs to a package says so on its card with "Unlink the
204
226
  * agent"; it cannot be deleted until it is unlinked, nor reset while its package locks fields of
205
- * its definition.
227
+ * its definition. A chat-only agent (`chatOnly`) says so instead of what it works on and offers no
228
+ * "Run now", runs, run state changes or shadow mode: it never runs on its own.
206
229
  */
207
230
  declare class NhAssistantAdminAgentsComponent {
208
231
  private readonly admin;
@@ -500,7 +523,9 @@ type WorksOnScope = 'all' | 'types';
500
523
  * of agent metadata, where the application's own editor saves the value; a change of a field of an
501
524
  * agent created here is its next version, which the next save of the definition continues on. Fields
502
525
  * of the definition that the agent's package locks show read-only with a lock and the package's id and
503
- * version, with "Unlink" for the definition; a save keeps their values.
526
+ * version, with "Unlink" for the definition; a save keeps their values. A new agent is created with its
527
+ * MCP servers; an existing agent's save sends no `mcpServerIds`, so an assignment made since the editor
528
+ * opened stays, and then assigns or unassigns only the servers the administrator changed, one by one.
504
529
  */
505
530
  declare class NhAssistantAdminAgentEditorComponent {
506
531
  private readonly admin;
@@ -577,8 +602,14 @@ declare class NhAssistantAdminAgentEditorComponent {
577
602
  readonly saving: _angular_core.WritableSignal<boolean>;
578
603
  readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
579
604
  /**
580
- * A new agent that was created while its groups could not be saved yet: the next save completes it
581
- * as an existing agent.
605
+ * The definition was saved, but a change of the MCP servers failed; the next save retries the
606
+ * changes that are left.
607
+ */
608
+ readonly assignmentsFailed: _angular_core.WritableSignal<boolean>;
609
+ /**
610
+ * The agent as a save left it when part of the save failed: a new agent that was created while its
611
+ * groups could not be saved yet, or an agent whose definition was saved while a change of its MCP
612
+ * servers failed. The next save completes it as an existing agent.
582
613
  */
583
614
  private readonly created;
584
615
  /** The agent the next save updates; `null` while a new agent is not created yet. */
@@ -677,6 +708,14 @@ declare class NhAssistantAdminAgentEditorComponent {
677
708
  /** An application field of an agent created here made the agent's next version. */
678
709
  fieldsChanged(agentVersion: number): void;
679
710
  save(): void;
711
+ /**
712
+ * The MCP servers the administrator added or removed, after the definition was saved, one call per
713
+ * server: removals first, so an agent with as many servers as allowed can swap one, then additions.
714
+ * Only the assignments change, never the agent's version. The first failure stops the rest: the
715
+ * editor then keeps the saved agent with the changes that succeeded, so the next save continues on
716
+ * its version with the changes that are left.
717
+ */
718
+ private saveAssignments;
680
719
  /** What the agent works on, as the six fields the server reads together. */
681
720
  private worksOnInput;
682
721
  private reset;
@@ -1703,7 +1742,9 @@ interface ToolDraft {
1703
1742
  /**
1704
1743
  * The tools of one MCP server. Every tool starts disabled as a change that needs approval;
1705
1744
  * the administrator enables it and chooses the effect. Remote annotations appear as hints
1706
- * only, and a changed remote input schema is shown as a warning.
1745
+ * only, and a changed remote input schema is shown as a warning. A tool whose settings were reviewed
1746
+ * before any sync saw it (`awaitingSync`) shows as not seen yet: its settings change here, and the
1747
+ * first sync that finds it on the server makes it available with them.
1707
1748
  */
1708
1749
  declare class NhAssistantAdminMcpToolsComponent {
1709
1750
  private readonly admin;
@@ -1738,5 +1779,5 @@ declare class NhAssistantAdminMcpToolsComponent {
1738
1779
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAdminMcpToolsComponent, "nh-assistant-admin-mcp-tools", never, { "server": { "alias": "server"; "required": true; "isSignal": true; }; }, { "closed": "closed"; "synced": "synced"; }, never, never, true, never>;
1739
1780
  }
1740
1781
 
1741
- export { NH_ASSISTANT_AGENT_METADATA_EDITORS, NH_ASSISTANT_MAX_INSTRUCTIONS, NhAssistantAdminAgentEditorComponent, NhAssistantAdminAgentsComponent, NhAssistantAdminComponent, NhAssistantAdminContextComponent, NhAssistantAdminMcpServerEditorComponent, NhAssistantAdminMcpServersComponent, NhAssistantAdminMcpToolsComponent, NhAssistantAgentEvaluationComponent, NhAssistantAgentFeedbackReportComponent, NhAssistantAgentMetadataComponent, NhAssistantAgentMetadataSlot, NhAssistantAgentRunConfigurationComponent, NhAssistantAgentRunHistoryComponent, nhAssistantSelectorMatches, provideNhAssistantAgentMetadataEditors };
1782
+ export { NH_ASSISTANT_ADMIN_TRANSLATIONS, NH_ASSISTANT_AGENT_METADATA_EDITORS, NH_ASSISTANT_MAX_INSTRUCTIONS, NhAssistantAdminAgentEditorComponent, NhAssistantAdminAgentsComponent, NhAssistantAdminComponent, NhAssistantAdminContextComponent, NhAssistantAdminMcpServerEditorComponent, NhAssistantAdminMcpServersComponent, NhAssistantAdminMcpToolsComponent, NhAssistantAdminTranslationMerger, NhAssistantAgentEvaluationComponent, NhAssistantAgentFeedbackReportComponent, NhAssistantAgentMetadataComponent, NhAssistantAgentMetadataSlot, NhAssistantAgentRunConfigurationComponent, NhAssistantAgentRunHistoryComponent, nhAssistantSelectorMatches, provideNhAssistantAgentMetadataEditors };
1742
1783
  export type { AgentUse, NhAssistantAdminTab, NhAssistantAgentMetadataEditor, NhAssistantAgentMetadataStatus, NhAssistantEvaluationPeriod, NhAssistantFeedbackPeriod, NhAssistantReaderDraft, NhAssistantSecretAction, NhAssistantSecretSource, WorksOnScope };