@newheap/platform-ai-chat 0.18.0 → 0.19.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,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit } from '@angular/core';
2
+ import { InjectionToken, Type, Signal, EnvironmentProviders, Injector, OnInit } from '@angular/core';
3
3
  import * as _newheap_platform_ai_chat from '@newheap/platform-ai-chat';
4
- import { NhAssistantStore, NhAssistantError, ApplicationContext, ApplicationContextVersion, AdminAgent, ToolCatalogEntry, McpServer, RunCatalog, SetAgentStateRequest, AgentSkillState, AgentShadowMode, AgentShadowState, AssistantAutonomy, AssistantDataClassification, AgentEvaluation, AgentReplay, AgentEvaluationCost, AgentProposalFeedbackCategory, AgentFeedbackSummaryRow, AgentFeedbackItem, AgentFeedbackCategoryCount, StaleKind, AgentProposalFeedbackGroup, AgentSubjectType, AgentRunStatus, ɵnhAssistantCodeKeys as _nhAssistantCodeKeys, AgentRunHistoryItem, NhAssistantConsultationRoute, DataConsultation, CodeConsultation, DataSkill, AgentRunConfiguration, DataTrigger, SkillComparison, DataSkillVersion, ɵNhAssistantPickerOption as _NhAssistantPickerOption, McpServerTestResult, McpConnectionsSummary, McpBuiltInAuthMode, McpCustomAuthMode, McpAuthMode, McpTransport, McpConnectionScope, McpHeadlessUse, McpDiscovery, McpTool, McpToolEffect } 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
5
  import { ɵNhAssistantRunNowAgent as _NhAssistantRunNowAgent } from '@newheap/platform-ai-chat/agent-runs';
6
6
 
7
7
  type NhAssistantAdminTab = 'context' | 'agents' | 'mcp-servers';
@@ -153,6 +153,27 @@ interface WorksOnSummary {
153
153
  viewPolicy: string | null;
154
154
  }
155
155
 
156
+ /** How a package links one part on this host, as the forms and lists show it. */
157
+ interface PackageLockView {
158
+ packageId: string;
159
+ packageVersion: number;
160
+ /** The whole part is locked. */
161
+ whole: boolean;
162
+ /** The locked fields by their names in the format; empty while the whole part or nothing is locked. */
163
+ fields: readonly string[];
164
+ /** The part changed here after its import; the next upgrade overwrites its unlocked fields. */
165
+ changedLocally: boolean;
166
+ }
167
+ /** The lock a part's link shows, or `null` for a part no package links. */
168
+ declare function packageLockOf(link: PackagePartLink | null | undefined): PackageLockView | null;
169
+ /**
170
+ * The package an agent belongs to, as the notice of the whole agent shows it: the package's id and
171
+ * the version this host has, without locks of its own.
172
+ */
173
+ declare function agentPackageOf(agent: AdminAgent | null | undefined): PackageLockView | null;
174
+ /** Whether a lock keeps anything of its part from changing, so the part cannot be removed. */
175
+ declare function isPackageLocked(lock: PackageLockView | null | undefined): boolean;
176
+
156
177
  type AgentStateAction = SetAgentStateRequest['state'];
157
178
  /** A state change being entered, of the agent or one of its skills, with the state it changes from. */
158
179
  interface StateChange {
@@ -177,7 +198,11 @@ interface StateChange {
177
198
  * code and offers to read it again; until then it offers no "Run now" and the editor leaves what an
178
199
  * agent works on and its groups as they are. The run configuration opens with the agent's flow, whose
179
200
  * entry points open the editor, the runs and the technical account here and return to the run
180
- * configuration afterwards; `openMcpServers` asks the host to show the MCP servers.
201
+ * configuration afterwards; `openMcpServers` asks the host to show the MCP servers. "Import package"
202
+ * opens the import dialog of agent packages, and "Export as package" on an agent the export dialog
203
+ * with that agent chosen. An agent that belongs to a package says so on its card with "Unlink the
204
+ * agent"; it cannot be deleted until it is unlinked, nor reset while its package locks fields of
205
+ * its definition.
181
206
  */
182
207
  declare class NhAssistantAdminAgentsComponent {
183
208
  private readonly admin;
@@ -255,6 +280,11 @@ declare class NhAssistantAdminAgentsComponent {
255
280
  readonly accountNames: _angular_core.Signal<ReadonlyMap<string, string>>;
256
281
  /** The agent whose last action failed, so its error shows on its card. */
257
282
  readonly errorAgentId: _angular_core.WritableSignal<string | null>;
283
+ /** The agent whose export dialog is open, chosen in it; `null` while it is closed. */
284
+ readonly exporting: _angular_core.WritableSignal<AdminAgent | null>;
285
+ /** Whether the import dialog of agent packages is open. */
286
+ readonly importing: _angular_core.WritableSignal<boolean>;
287
+ readonly agentPackageOf: typeof agentPackageOf;
258
288
  /** The agent the run-now dialog runs; `null` while it is closed. */
259
289
  readonly runningNow: _angular_core.WritableSignal<AdminAgent | null>;
260
290
  /** The agent of the run-now dialog as the dialog needs it: its name and what it works on. */
@@ -294,6 +324,18 @@ declare class NhAssistantAdminAgentsComponent {
294
324
  * that is off still runs for a person. The server decides the rest when the run starts.
295
325
  */
296
326
  canRunNow(agent: AdminAgent): boolean;
327
+ /** Opens the export dialog with the agent chosen. */
328
+ exportPackage(agent: AdminAgent): void;
329
+ /** Opens the import dialog of agent packages. */
330
+ importPackage(): void;
331
+ /** A package was imported: its agents and their parts are read again. */
332
+ onPackageImported(): void;
333
+ /** The agent or a part of it was unlinked from its package. */
334
+ onPackageUnlinked(): void;
335
+ /** A package the agent belongs to keeps it from being deleted until it is unlinked. */
336
+ deleteLocked(agent: AdminAgent): boolean;
337
+ /** A reset would give fields the package locks the code's values, which the server refuses. */
338
+ resetLocked(agent: AdminAgent): boolean;
297
339
  /** Opens the run-now dialog of the agent. */
298
340
  runNow(agent: AdminAgent): void;
299
341
  /** Opens the conversation the run works in, in the assistant panel. */
@@ -323,6 +365,13 @@ declare class NhAssistantAdminAgentsComponent {
323
365
  * configuration it came from.
324
366
  */
325
367
  askerFromRunConfiguration(agent: AdminAgent, askerId: string): void;
368
+ /**
369
+ * A data shadow variant created in the agent's run configuration continues in its own run
370
+ * configuration's guided setup, since it receives the live agent's events only with run settings.
371
+ */
372
+ onVariantCreated(variant: AdminAgent): void;
373
+ /** The run configuration of a data shadow variant of the agent whose run configuration is open. */
374
+ variantFromRunConfiguration(variantId: string): void;
326
375
  /** The flow of the agent's run configuration opens its runs; going back returns there. */
327
376
  runsFromRunConfiguration(agent: AdminAgent): void;
328
377
  /** The flow of an agent in code opens the form that replaces its technical account on its card. */
@@ -418,6 +467,15 @@ declare class NhAssistantAdminAgentsComponent {
418
467
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAdminAgentsComponent, "nh-assistant-admin-agents", never, {}, { "openMcpServers": "openMcpServers"; }, never, never, true, never>;
419
468
  }
420
469
 
470
+ /** A field error: a code such as `required`, with its translation parameters. */
471
+ interface RunConfigFieldError {
472
+ code: string;
473
+ params?: Record<string, unknown>;
474
+ }
475
+
476
+ /** Where the instructions of a skill version or an agent created here come from. */
477
+ type InstructionsSource = 'inline' | 'asset';
478
+
421
479
  /** True when a tool id matches a selector glob (`*` matches any characters). */
422
480
  declare function nhAssistantSelectorMatches(toolId: string, selector: string): boolean;
423
481
  /** How an agent created in the administration is used: chosen in the chat, working on its own, or both. */
@@ -432,7 +490,12 @@ type WorksOnScope = 'all' | 'types';
432
490
  * patterns, and assigned MCP servers. A new agent meant to work on its own continues with
433
491
  * `workRequested`. An agent in code names and describes itself with translation keys: the editor
434
492
  * shows their translation and sends the key back unless the administrator changed the text, so the
435
- * agent stays translated; what it works on comes from its code and is not edited here.
493
+ * agent stays translated; what it works on comes from its code and is not edited here. Below the form,
494
+ * an existing agent shows the application's fields (`nh-assistant-agent-metadata`): one slot per entry
495
+ * of agent metadata, where the application's own editor saves the value; a change of a field of an
496
+ * agent created here is its next version, which the next save of the definition continues on. Fields
497
+ * 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.
436
499
  */
437
500
  declare class NhAssistantAdminAgentEditorComponent {
438
501
  private readonly admin;
@@ -467,11 +530,20 @@ declare class NhAssistantAdminAgentEditorComponent {
467
530
  readonly displayName: _angular_core.WritableSignal<string>;
468
531
  readonly description: _angular_core.WritableSignal<string>;
469
532
  readonly instructions: _angular_core.WritableSignal<string>;
533
+ /** Whether the instructions of an agent created here are written here or come from an asset of the application. */
534
+ readonly instructionsSource: _angular_core.WritableSignal<InstructionsSource>;
535
+ /** The application's asset the agent names, once chosen and read. */
536
+ readonly instructionsAsset: _angular_core.WritableSignal<InstructionAssetReference | null>;
470
537
  readonly autonomy: _angular_core.WritableSignal<AssistantAutonomy>;
471
538
  /** How the agent is used: in the chat, on its own, or both. */
472
539
  readonly use: _angular_core.WritableSignal<AgentUse>;
473
540
  /** A new agent takes its triggers at once; without it, it starts off until someone switches it on. */
474
541
  readonly switchOnNow: _angular_core.WritableSignal<boolean>;
542
+ /**
543
+ * A new agent starts in shadow: once it has run settings its runs work in its shadow threads, where
544
+ * nobody is notified and nothing executes, until someone puts it live.
545
+ */
546
+ readonly startsInShadow: _angular_core.WritableSignal<boolean>;
475
547
  /** The model profile of an agent created here; empty uses the application's chat profile. */
476
548
  readonly profile: _angular_core.WritableSignal<string>;
477
549
  /** The classification of the model calls of an agent created here; `internal` when it has none. */
@@ -500,12 +572,36 @@ declare class NhAssistantAdminAgentEditorComponent {
500
572
  private readonly created;
501
573
  /** The agent the next save updates; `null` while a new agent is not created yet. */
502
574
  private readonly editing;
575
+ /**
576
+ * The agent's version after one of its application fields changed, which made its next version;
577
+ * `null` while no field changed.
578
+ */
579
+ private readonly fieldsVersion;
580
+ /** The definition was unlinked from its package here, so it no longer locks. */
581
+ private readonly unlinked;
582
+ /** What the agent's package locks of its definition (part `agent`); `null` without a link. */
583
+ readonly lock: _angular_core.Signal<PackageLockView | null>;
584
+ /** The agent whose application fields show below the form; `null` for a new agent. */
585
+ readonly metadataAgent: _angular_core.Signal<AdminAgent | null>;
586
+ /** The entries of agent metadata the application registers, for a new agent. */
587
+ readonly metadataEntries: _angular_core.Signal<_newheap_platform_ai_chat.AgentMetadataEntry[]>;
503
588
  readonly isNew: _angular_core.Signal<boolean>;
504
589
  /** Only agents created here choose whether they are offered in the chat; code decides for the others. */
505
590
  readonly choosesUse: _angular_core.Signal<boolean>;
506
591
  readonly idInvalid: _angular_core.Signal<boolean>;
507
592
  readonly nameMissing: _angular_core.Signal<boolean>;
508
593
  readonly tooLong: _angular_core.Signal<boolean>;
594
+ /**
595
+ * Only an agent created here takes its instructions from an asset, when the application offers its
596
+ * assets; one that names an asset keeps showing it.
597
+ */
598
+ readonly assetsAvailable: _angular_core.Signal<boolean>;
599
+ /** An asset is the source, but none is chosen and read yet. */
600
+ readonly assetMissing: _angular_core.Signal<boolean>;
601
+ /** The problem of the asset the saved agent names, while it is still the choice. */
602
+ readonly assetProblem: _angular_core.Signal<_newheap_platform_ai_chat.InstructionAssetProblem | null>;
603
+ /** The error of the asset choice: chosen none, or the save's refusal of the reference. */
604
+ readonly assetError: _angular_core.Signal<RunConfigFieldError | null>;
509
605
  readonly selectorInvalid: _angular_core.Signal<boolean>;
510
606
  /**
511
607
  * The application's own object types, by name; the platform's types, such as the whole
@@ -559,8 +655,16 @@ declare class NhAssistantAdminAgentEditorComponent {
559
655
  toggleServer(serverId: string, checked: boolean): void;
560
656
  value(event: Event): string;
561
657
  checked(event: Event): boolean;
658
+ /** Whether the agent's package locks a field of its definition, which then shows read-only. */
659
+ locked(field: string): boolean;
660
+ /** The lock the mark next to a field's label shows; `null` for a field that changes here. */
661
+ lockOf(field: string): PackageLockView | null;
662
+ /** The definition was unlinked from its package: its fields change here again. */
663
+ onUnlinked(): void;
562
664
  /** The first error the server reported for a field, as a translation key. */
563
665
  fieldError(field: string): string | null;
666
+ /** An application field of an agent created here made the agent's next version. */
667
+ fieldsChanged(agentVersion: number): void;
564
668
  save(): void;
565
669
  /** What the agent works on, as the six fields the server reads together. */
566
670
  private worksOnInput;
@@ -571,6 +675,140 @@ declare class NhAssistantAdminAgentEditorComponent {
571
675
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAdminAgentEditorComponent, "nh-assistant-admin-agent-editor", never, { "agent": { "alias": "agent"; "required": false; "isSignal": true; }; "tools": { "alias": "tools"; "required": false; "isSignal": true; }; "servers": { "alias": "servers"; "required": false; "isSignal": true; }; "catalog": { "alias": "catalog"; "required": false; "isSignal": true; }; "catalogUnavailable": { "alias": "catalogUnavailable"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "workRequested": "workRequested"; "cancelled": "cancelled"; }, never, never, true, never>;
572
676
  }
573
677
 
678
+ /**
679
+ * The application's editor of one entry of agent metadata (`AddAgentMetadata`): a standalone
680
+ * component that the agent editor renders in the entry's slot. It injects
681
+ * `NhAssistantAgentMetadataSlot` for the entry's value and saves the value with it; the library has no
682
+ * generic form for metadata.
683
+ */
684
+ interface NhAssistantAgentMetadataEditor {
685
+ /** The entry's name, as the application registers it with `AddAgentMetadata`. */
686
+ name: string;
687
+ /** The application's standalone component that shows and edits the value. */
688
+ component: Type<unknown>;
689
+ /** A translation key of the slot's title; the entry's name without one. */
690
+ label?: string;
691
+ }
692
+ /** The editors the application registers for its entries of agent metadata, by entry name. */
693
+ declare const NH_ASSISTANT_AGENT_METADATA_EDITORS: InjectionToken<NhAssistantAgentMetadataEditor[]>;
694
+ /**
695
+ * Registers the application's editors of agent metadata, where the administration is provided (in
696
+ * the application's configuration or the providers of its administration route). The agent editor
697
+ * renders one slot per registered entry; an entry without an editor shows that the application shows
698
+ * none. Several calls add their editors.
699
+ */
700
+ declare function provideNhAssistantAgentMetadataEditors(...editors: NhAssistantAgentMetadataEditor[]): EnvironmentProviders;
701
+ /** What the last change of an entry did, for the slot's status line. */
702
+ type NhAssistantAgentMetadataStatus = 'saved' | 'removed';
703
+ /**
704
+ * The slot of one entry of agent metadata, which an application's editor injects: the entry's value
705
+ * as the server answered it, whether it may change, and `save` and `remove`, which go through
706
+ * `NhAssistantAdminApiService` with the entry's version and keep the slot up to date. A refusal shows
707
+ * in `error`, with the validator's codes in `fieldErrors`.
708
+ */
709
+ declare abstract class NhAssistantAgentMetadataSlot {
710
+ /** The agent's id. */
711
+ abstract readonly agentId: string;
712
+ /** The entry with its value in effect, where it comes from and its version. */
713
+ abstract readonly entry: Signal<AgentMetadata>;
714
+ /**
715
+ * Whether the value is read-only here: an entry of an agent in code that is not editable, or one
716
+ * whose value the agent's package locks until an administrator unlinks it.
717
+ */
718
+ abstract readonly readOnly: Signal<boolean>;
719
+ /** Whether a change is being saved. */
720
+ abstract readonly saving: Signal<boolean>;
721
+ /** The refusal of the last change, or `null`. */
722
+ abstract readonly error: Signal<NhAssistantError | null>;
723
+ /** What the last change did, until the next one starts. */
724
+ abstract readonly status: Signal<NhAssistantAgentMetadataStatus | null>;
725
+ /**
726
+ * Saves `value`, in the shape of the entry's type, with the entry's version: an agent created here
727
+ * gets its next version, an agent in code an override. Ignored while read-only or saving.
728
+ */
729
+ abstract save(value: unknown): void;
730
+ /** Removes the stored value: an agent in code uses its value in code again. */
731
+ abstract remove(): void;
732
+ /**
733
+ * The codes the server reported for the whole value, or for one of its fields by camelCase path
734
+ * such as `code`; empty without a refusal.
735
+ */
736
+ abstract fieldErrors(field?: string): readonly string[];
737
+ }
738
+
739
+ /**
740
+ * The slot of one entry: its state as the server answered it, saved through the administration API
741
+ * with the entry's version.
742
+ */
743
+ declare class NhAssistantAgentMetadataSlotRef extends NhAssistantAgentMetadataSlot {
744
+ readonly agentId: string;
745
+ private readonly admin;
746
+ private readonly changed;
747
+ private subscription?;
748
+ readonly entry: _angular_core.WritableSignal<AgentMetadata>;
749
+ readonly saving: _angular_core.WritableSignal<boolean>;
750
+ readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
751
+ readonly status: _angular_core.WritableSignal<NhAssistantAgentMetadataStatus | null>;
752
+ /** The lock of the entry's package link (part `metadata:{name}`); `null` without one. */
753
+ readonly lock: _angular_core.Signal<PackageLockView | null>;
754
+ readonly readOnly: _angular_core.Signal<boolean>;
755
+ constructor(agentId: string, entry: AgentMetadata, admin: NhAssistantAdminApiService, changed: (entry: AgentMetadata) => void);
756
+ save(value: unknown): void;
757
+ remove(): void;
758
+ fieldErrors(field?: string): readonly string[];
759
+ /** The agent's next version after another entry of an agent created here changed. */
760
+ followAgentVersion(agentVersion: number): void;
761
+ dispose(): void;
762
+ private run;
763
+ }
764
+ /** One slot as the frame shows it. */
765
+ interface NhAssistantAgentMetadataSlotView {
766
+ name: string;
767
+ label: string | null;
768
+ component: Type<unknown> | null;
769
+ slot: NhAssistantAgentMetadataSlotRef;
770
+ injector: Injector;
771
+ }
772
+ /**
773
+ * The application fields of an agent in the agent editor (MD3): one slot per entry of agent
774
+ * metadata the application registers with `AddAgentMetadata`, where the application's own editor,
775
+ * registered with `provideNhAssistantAgentMetadataEditors`, shows the value and saves it through
776
+ * `NhAssistantAgentMetadataSlot`. The frame names the entry, says where its value comes from, marks
777
+ * an entry of an agent in code that only code changes, and shows what a save did. A change of an
778
+ * agent created here is its next version: `agentVersionChanged` tells the agent editor. A new agent
779
+ * shows its entries once it is saved. An entry the agent's package locks is read-only for its editor,
780
+ * with the package's id and version and "Unlink".
781
+ */
782
+ declare class NhAssistantAgentMetadataComponent {
783
+ private readonly admin;
784
+ private readonly injector;
785
+ private readonly editors;
786
+ private subscription?;
787
+ /** The agent whose fields are shown; `null` for a new agent, which is saved first. */
788
+ readonly agent: _angular_core.InputSignal<AdminAgent | null>;
789
+ /** The run catalog's `agentMetadata`: the entries a new agent will have. */
790
+ readonly entries: _angular_core.InputSignal<readonly AgentMetadataEntry[]>;
791
+ /** The agent's version after a field of an agent created here changed. */
792
+ readonly agentVersionChanged: _angular_core.OutputEmitterRef<number>;
793
+ readonly id: string;
794
+ readonly loading: _angular_core.WritableSignal<boolean>;
795
+ readonly loadFailed: _angular_core.WritableSignal<boolean>;
796
+ readonly slots: _angular_core.WritableSignal<readonly NhAssistantAgentMetadataSlotView[]>;
797
+ readonly sourceKey: (entry: AgentMetadata) => string;
798
+ readonly errorKeys: typeof _nhAssistantErrorKeys;
799
+ constructor();
800
+ load(): void;
801
+ private slotOf;
802
+ /**
803
+ * A field of an agent created here made the agent's next version: the other fields and the agent
804
+ * editor continue on it. An override of an agent in code has a version of its own.
805
+ */
806
+ private onChanged;
807
+ private disposeSlots;
808
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAgentMetadataComponent, never>;
809
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAgentMetadataComponent, "nh-assistant-agent-metadata", never, { "agent": { "alias": "agent"; "required": false; "isSignal": true; }; "entries": { "alias": "entries"; "required": false; "isSignal": true; }; }, { "agentVersionChanged": "agentVersionChanged"; }, never, never, true, never>;
810
+ }
811
+
574
812
  /** Periods the evaluation offers, in days before now; the server allows at most 92. */
575
813
  type NhAssistantEvaluationPeriod = 7 | 30 | 90;
576
814
  /** One row of the cost comparison: a measure of the live agent next to the variant's. */
@@ -812,7 +1050,17 @@ interface ConsultationRow {
812
1050
  /** The agents whose tool selectors select its consult tool now. */
813
1051
  askingAgents: string[];
814
1052
  inEffect: boolean;
1053
+ /**
1054
+ * The consultation defined as data is switched off: it is not offered until an administrator switches
1055
+ * it on. Its routes and tools are then those it was saved with, which it offers once it is on.
1056
+ */
1057
+ off: boolean;
815
1058
  problems: string[];
1059
+ /**
1060
+ * The tools the consulted agent is offered: the selection in code, or the one of the data that the
1061
+ * agent's own selectors still cover. `null` offers every tool of the agent; empty offers none.
1062
+ */
1063
+ toolSelectors: string[] | null;
816
1064
  /** The consultation defined as data; `null` for one in code. */
817
1065
  data: DataConsultation | null;
818
1066
  code: CodeConsultation | null;
@@ -826,6 +1074,20 @@ interface ConsultationRow {
826
1074
  */
827
1075
  type ConsultationsClosed = 'application' | 'agent' | 'needs-settings' | 'limit' | 'no-types';
828
1076
 
1077
+ /** A part of a trigger's definition that a candidate changes. */
1078
+ type TriggerField = 'source' | 'event' | 'filters' | 'debounce' | 'cron' | 'time-zone' | 'subject-set' | 'message' | 'skill' | 'conflict';
1079
+ /**
1080
+ * One difference between the live version of a trigger and its candidate, with the values as stored:
1081
+ * a skill id, a conflict or a source the page names in the reader's language, `null` for none.
1082
+ */
1083
+ interface TriggerChange {
1084
+ field: TriggerField;
1085
+ live: string | null;
1086
+ candidate: string | null;
1087
+ }
1088
+ /** The short definition of a version in the history: what starts it and when. */
1089
+ declare function versionSummary(version: DataTriggerVersion): string;
1090
+
829
1091
  /**
830
1092
  * What an entry point of the flow opens: the run configuration opens its own forms; the agent editor,
831
1093
  * the technical account, the runs view and the MCP servers belong to the page that hosts it.
@@ -876,7 +1138,7 @@ interface SkillFormSaved {
876
1138
  type Form = 'setup' | 'settings' | 'skill' | 'trigger' | 'consultation';
877
1139
  /** A removal, promotion or discard that waits for its confirmation. */
878
1140
  interface Confirmation {
879
- action: 'remove-settings' | 'remove-skill' | 'remove-trigger' | 'remove-consultation' | 'promote' | 'discard';
1141
+ action: 'remove-settings' | 'remove-skill' | 'remove-trigger' | 'remove-consultation' | 'promote' | 'discard' | 'promote-trigger' | 'discard-trigger';
880
1142
  id: string;
881
1143
  }
882
1144
  /**
@@ -891,11 +1153,14 @@ interface Confirmation {
891
1153
  * they compare with the live version and promote or discard; they add data triggers on the
892
1154
  * application's events or on a schedule and put them live; a schedule without a subject set runs for
893
1155
  * the whole application, or for every division of an agent that works per division. New skills and
894
- * triggers start in shadow; `changed` tells the agents page to reload the agent's skill states. Its
1156
+ * triggers start in shadow; a change of a trigger applies at once or fires as a candidate in shadow next
1157
+ * to the live version, which they compare, promote or discard, and every trigger shows its history.
1158
+ * `changed` tells the agents page to reload the agent's skill states. Its
895
1159
  * consultations (AC20) show what other assistants may consult it about: those in code read only, and
896
1160
  * those defined as data, which administrators add, change and remove within the agent's ceiling in
897
- * code, each with the agents that ask it (`openAgent` opens the editor of one) and its problems,
898
- * followed by the switches that turn a route off for all of its consultations.
1161
+ * code, each with the agents that ask it (`openAgent` opens the editor of one) and its problems, and
1162
+ * switch on or off (a new one may start off), followed by the switches that turn a route off for all of
1163
+ * its consultations.
899
1164
  */
900
1165
  declare class NhAssistantAgentRunConfigurationComponent implements OnInit {
901
1166
  private readonly admin;
@@ -982,6 +1247,18 @@ declare class NhAssistantAgentRunConfigurationComponent implements OnInit {
982
1247
  items: DataSkillVersion[] | null;
983
1248
  failed: boolean;
984
1249
  } | null>;
1250
+ readonly triggerComparison: _angular_core.WritableSignal<{
1251
+ triggerId: string;
1252
+ result: TriggerComparison | null;
1253
+ failed: boolean;
1254
+ } | null>;
1255
+ readonly triggerVersions: _angular_core.WritableSignal<{
1256
+ triggerId: string;
1257
+ items: DataTriggerVersion[] | null;
1258
+ failed: boolean;
1259
+ } | null>;
1260
+ readonly triggerFieldKeys: Record<TriggerField, string>;
1261
+ readonly versionSummary: typeof versionSummary;
985
1262
  private readonly language;
986
1263
  readonly isAdminAgent: _angular_core.Signal<boolean>;
987
1264
  /** An agent created in the administration gets skills and triggers once it has run settings. */
@@ -1006,6 +1283,10 @@ declare class NhAssistantAgentRunConfigurationComponent implements OnInit {
1006
1283
  readonly settingsPolicy: _angular_core.Signal<string | null>;
1007
1284
  constructor();
1008
1285
  ngOnInit(): void;
1286
+ /** The lock a part's package link shows, for the lists and the forms. */
1287
+ readonly packageLockOf: typeof packageLockOf;
1288
+ /** Whether a part's package locks it, so it cannot be removed until it is unlinked. */
1289
+ readonly isPackageLocked: typeof isPackageLocked;
1009
1290
  load(openSetup?: boolean): void;
1010
1291
  openSetup(): void;
1011
1292
  editSettings(): void;
@@ -1020,11 +1301,23 @@ declare class NhAssistantAgentRunConfigurationComponent implements OnInit {
1020
1301
  /** Shows or hides the version history of a skill. */
1021
1302
  toggleVersions(skill: DataSkill): void;
1022
1303
  addTrigger(): void;
1304
+ /** What a trigger's candidate changes against its live version. */
1305
+ triggerChanges(trigger: DataTrigger): TriggerChange[];
1306
+ /** A value of a changed field as people read it: a skill's name, a conflict, a source, or none. */
1307
+ changeValue(change: TriggerChange, value: string | null): string;
1308
+ promoteTrigger(trigger: DataTrigger): void;
1309
+ discardTrigger(trigger: DataTrigger): void;
1310
+ /** Shows or hides the comparison of a trigger's candidate with its live version. */
1311
+ toggleTriggerComparison(trigger: DataTrigger): void;
1312
+ /** Shows or hides the version history of a trigger. */
1313
+ toggleTriggerVersions(trigger: DataTrigger): void;
1023
1314
  editTrigger(trigger: DataTrigger): void;
1024
1315
  setTriggerShadow(trigger: DataTrigger, shadow: boolean): void;
1025
1316
  removeTrigger(trigger: DataTrigger): void;
1026
1317
  addConsultation(): void;
1027
1318
  editConsultation(consultation: DataConsultation): void;
1319
+ /** Switches a consultation defined as data on or off; off, asking agents get none of its tools. */
1320
+ setConsultationState(consultation: DataConsultation, on: boolean): void;
1028
1321
  removeConsultation(consultation: DataConsultation): void;
1029
1322
  onConsultationSaved(result: ConsultationFormSaved): void;
1030
1323
  /** The name of a subject type, as the run catalog names it in the reader's language. */
@@ -1039,7 +1332,10 @@ declare class NhAssistantAgentRunConfigurationComponent implements OnInit {
1039
1332
  onSetupCompleted(live: boolean): void;
1040
1333
  onSettingsSaved(): void;
1041
1334
  onSkillSaved(result: SkillFormSaved): void;
1042
- onTriggerSaved(added: boolean): void;
1335
+ onTriggerSaved(result: {
1336
+ added: boolean;
1337
+ candidate: boolean;
1338
+ }): void;
1043
1339
  confirm(action: Confirmation['action'], id: string): void;
1044
1340
  isConfirming(action: Confirmation['action'], id: string): boolean;
1045
1341
  /**
@@ -1062,6 +1358,8 @@ declare class NhAssistantAgentRunConfigurationComponent implements OnInit {
1062
1358
  private finish;
1063
1359
  /** Opens one form at a time and moves the focus into it. */
1064
1360
  private open;
1361
+ /** One comparison or history is shown at a time. */
1362
+ private closeDetails;
1065
1363
  /** Whether the last failed action concerned this item, so its error shows there. */
1066
1364
  failed(target: string): boolean;
1067
1365
  /** Runs a change and reloads the configuration, which every change may affect. */
@@ -1429,5 +1727,5 @@ declare class NhAssistantAdminMcpToolsComponent {
1429
1727
  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>;
1430
1728
  }
1431
1729
 
1432
- export { NH_ASSISTANT_MAX_INSTRUCTIONS, NhAssistantAdminAgentEditorComponent, NhAssistantAdminAgentsComponent, NhAssistantAdminComponent, NhAssistantAdminContextComponent, NhAssistantAdminMcpServerEditorComponent, NhAssistantAdminMcpServersComponent, NhAssistantAdminMcpToolsComponent, NhAssistantAgentEvaluationComponent, NhAssistantAgentFeedbackReportComponent, NhAssistantAgentRunConfigurationComponent, NhAssistantAgentRunHistoryComponent, nhAssistantSelectorMatches };
1433
- export type { AgentUse, NhAssistantAdminTab, NhAssistantEvaluationPeriod, NhAssistantFeedbackPeriod, NhAssistantReaderDraft, NhAssistantSecretAction, NhAssistantSecretSource, WorksOnScope };
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 };
1731
+ export type { AgentUse, NhAssistantAdminTab, NhAssistantAgentMetadataEditor, NhAssistantAgentMetadataStatus, NhAssistantEvaluationPeriod, NhAssistantFeedbackPeriod, NhAssistantReaderDraft, NhAssistantSecretAction, NhAssistantSecretSource, WorksOnScope };
@@ -366,6 +366,11 @@ declare class NhAssistantAgentProposalsComponent {
366
366
  decide(proposal: AgentProposal, decision: AgentProposalDecision): void;
367
367
  decideSelected(decision: AgentProposalDecision): void;
368
368
  resolve(proposal: AgentProposal, action: AgentExecutionResolution): void;
369
+ /**
370
+ * Whether the application executes the proposal: it was handed to the application, so an approver
371
+ * resolves an unknown outcome by handing it to the application again instead of running it.
372
+ */
373
+ executedByApplication(proposal: AgentProposal): boolean;
369
374
  /** Opens the feedback question in the card of a closed proposal, with the caller's own feedback. */
370
375
  giveFeedback(proposal: AgentProposal): void;
371
376
  /** True while the feedback question for this proposal is open, above the list or in its card. */