@newheap/platform-ai-chat 0.19.0 → 0.21.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/README.md +19 -2
- package/admin/i18n/en.json +1738 -0
- package/admin/i18n/nl.json +1738 -0
- package/admin/index.d.ts +59 -7
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +3729 -39
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +700 -24
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +1187 -3515
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +49 -1714
- package/i18n/nl.json +49 -1714
- package/index.d.ts +473 -29
- package/package.json +4 -1
- package/testing/index.d.ts +59 -2
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
|
-
import { NhAssistantStore, NhAssistantError, ApplicationContext, ApplicationContextVersion, AdminAgent, PackagePartLink, ToolCatalogEntry, McpServer, RunCatalog, SetAgentStateRequest, AgentSkillState, AgentShadowMode, 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
|
+
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;
|
|
@@ -370,6 +393,11 @@ declare class NhAssistantAdminAgentsComponent {
|
|
|
370
393
|
* configuration's guided setup, since it receives the live agent's events only with run settings.
|
|
371
394
|
*/
|
|
372
395
|
onVariantCreated(variant: AdminAgent): void;
|
|
396
|
+
/**
|
|
397
|
+
* A data shadow variant promoted onto the agent whose run configuration is open: the agent shows its
|
|
398
|
+
* new version there and in the list, and the variant, which was removed, leaves the list.
|
|
399
|
+
*/
|
|
400
|
+
onVariantPromoted(promotion: ShadowVariantPromotion): void;
|
|
373
401
|
/** The run configuration of a data shadow variant of the agent whose run configuration is open. */
|
|
374
402
|
variantFromRunConfiguration(variantId: string): void;
|
|
375
403
|
/** The flow of the agent's run configuration opens its runs; going back returns there. */
|
|
@@ -495,7 +523,9 @@ type WorksOnScope = 'all' | 'types';
|
|
|
495
523
|
* of agent metadata, where the application's own editor saves the value; a change of a field of an
|
|
496
524
|
* agent created here is its next version, which the next save of the definition continues on. Fields
|
|
497
525
|
* of the definition that the agent's package locks show read-only with a lock and the package's id and
|
|
498
|
-
* 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.
|
|
499
529
|
*/
|
|
500
530
|
declare class NhAssistantAdminAgentEditorComponent {
|
|
501
531
|
private readonly admin;
|
|
@@ -523,6 +553,12 @@ declare class NhAssistantAdminAgentEditorComponent {
|
|
|
523
553
|
readonly cancelled: _angular_core.OutputEmitterRef<void>;
|
|
524
554
|
readonly uses: readonly AgentUse[];
|
|
525
555
|
readonly id: string;
|
|
556
|
+
private readonly language;
|
|
557
|
+
/**
|
|
558
|
+
* The agent's name in the title, as the agent list shows it: an agent in code names itself with a
|
|
559
|
+
* translation key, which reads in the reader's language.
|
|
560
|
+
*/
|
|
561
|
+
readonly titleName: _angular_core.Signal<string>;
|
|
526
562
|
readonly max = 20000;
|
|
527
563
|
readonly autonomyLevels: readonly AssistantAutonomy[];
|
|
528
564
|
readonly classifications: readonly AssistantDataClassification[];
|
|
@@ -566,8 +602,14 @@ declare class NhAssistantAdminAgentEditorComponent {
|
|
|
566
602
|
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
567
603
|
readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
|
|
568
604
|
/**
|
|
569
|
-
*
|
|
570
|
-
*
|
|
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.
|
|
571
613
|
*/
|
|
572
614
|
private readonly created;
|
|
573
615
|
/** The agent the next save updates; `null` while a new agent is not created yet. */
|
|
@@ -666,6 +708,14 @@ declare class NhAssistantAdminAgentEditorComponent {
|
|
|
666
708
|
/** An application field of an agent created here made the agent's next version. */
|
|
667
709
|
fieldsChanged(agentVersion: number): void;
|
|
668
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;
|
|
669
719
|
/** What the agent works on, as the six fields the server reads together. */
|
|
670
720
|
private worksOnInput;
|
|
671
721
|
private reset;
|
|
@@ -1692,7 +1742,9 @@ interface ToolDraft {
|
|
|
1692
1742
|
/**
|
|
1693
1743
|
* The tools of one MCP server. Every tool starts disabled as a change that needs approval;
|
|
1694
1744
|
* the administrator enables it and chooses the effect. Remote annotations appear as hints
|
|
1695
|
-
* 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.
|
|
1696
1748
|
*/
|
|
1697
1749
|
declare class NhAssistantAdminMcpToolsComponent {
|
|
1698
1750
|
private readonly admin;
|
|
@@ -1727,5 +1779,5 @@ declare class NhAssistantAdminMcpToolsComponent {
|
|
|
1727
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>;
|
|
1728
1780
|
}
|
|
1729
1781
|
|
|
1730
|
-
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 };
|
|
1731
1783
|
export type { AgentUse, NhAssistantAdminTab, NhAssistantAgentMetadataEditor, NhAssistantAgentMetadataStatus, NhAssistantEvaluationPeriod, NhAssistantFeedbackPeriod, NhAssistantReaderDraft, NhAssistantSecretAction, NhAssistantSecretSource, WorksOnScope };
|