@newheap/platform-ai-chat 0.18.0 → 0.20.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
@@ -3,6 +3,7 @@ import { InjectionToken, Type, EnvironmentProviders, Signal, AfterViewInit, OnDe
3
3
  import { Observable } from 'rxjs';
4
4
  import { TranslationObject } from '@ngx-translate/core';
5
5
  import { TemplatePortal } from '@angular/cdk/portal';
6
+ import { SafeHtml } from '@angular/platform-browser';
6
7
 
7
8
  /**
8
9
  * Contracts of the agent-run endpoints of `NewHeap.Platform.AI.Chat.AspNet`: threads about a
@@ -11,7 +12,7 @@ import { TemplatePortal } from '@angular/cdk/portal';
11
12
  /** The caller's role on the subject of a thread. */
12
13
  type AgentSubjectRole = 'none' | 'reader' | 'participant' | 'approver';
13
14
  type AgentRunStatus = 'queued' | 'running' | 'waiting-for-approval' | 'completed' | 'failed' | 'cancelled';
14
- type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | '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';
15
16
  type AgentGrantSource = 'none' | 'delegated' | 'agent' | 'delegated-read' | 'accountable';
16
17
  /**
17
18
  * How a run worked: `model` through the language model, `rule` through the agent's rules without a
@@ -53,6 +54,10 @@ interface AgentRun {
53
54
  skillVersion?: number | null;
54
55
  /** The run evaluated a candidate version of its skill in the shadow thread. */
55
56
  skillCandidate?: boolean;
57
+ /** The version of the trigger defined as data that started the run; absent for a trigger in code. */
58
+ triggerVersion?: number | null;
59
+ /** The run evaluated a candidate version of its data trigger in the shadow thread. */
60
+ triggerCandidate?: boolean;
56
61
  /** The agent that handed the run's work off; missing or null for a run no agent asked for. */
57
62
  requestedByAgentId?: string | null;
58
63
  /**
@@ -440,6 +445,14 @@ interface AgentProposal {
440
445
  decidedAt: string | null;
441
446
  executionResultCode: string | null;
442
447
  executedAt: string | null;
448
+ /**
449
+ * For a proposal the application executes (`ExecuteInApplication`), until when its report of the
450
+ * latest hand-off is due: while it is `awaiting-application` the moment it becomes
451
+ * `execution-unknown`, afterwards the sign that an approver resolves it with `hand-to-application`
452
+ * instead of `re-execute`. `null` for a proposal never handed to the application; missing on older
453
+ * servers.
454
+ */
455
+ executionReportDueAt?: string | null;
443
456
  /**
444
457
  * The consultation that proposed it, when another assistant consulted the agent for
445
458
  * `initiatorActorId`; `consultationRoute` says who decides it and whose rights execute it.
@@ -610,6 +623,8 @@ interface AgentConsultationList {
610
623
  interface AgentInbox {
611
624
  items: AgentProposal[];
612
625
  total: number;
626
+ /** The status the page lists. Missing on older servers, which list pending proposals only. */
627
+ status?: AgentInboxStatus;
613
628
  /**
614
629
  * The scope whose visits mark what is new: `global`, or `division:{id}` for an inbox filtered on a
615
630
  * division. Missing on older servers.
@@ -665,7 +680,18 @@ interface AgentInboxSubjectGroup {
665
680
  continuesFromPreviousPage: boolean;
666
681
  continuesOnNextPage: boolean;
667
682
  }
683
+ /**
684
+ * What the approval inbox lists (`AgentInboxFilter.status`): proposals that wait for a decision
685
+ * (the default), approved proposals of tools the application executes that wait for its report, and
686
+ * proposals whose execution is uncertain until an approver resolves it.
687
+ */
688
+ type AgentInboxStatus = 'pending' | 'awaiting-application' | 'execution-unknown';
668
689
  interface AgentInboxFilter {
690
+ /**
691
+ * The status the inbox lists, with the same visibility: `pending` by expiry (the default),
692
+ * `awaiting-application` by report deadline, `execution-unknown` by decision.
693
+ */
694
+ status?: AgentInboxStatus;
669
695
  subjectType?: string;
670
696
  agentId?: string;
671
697
  /** Only proposals on subjects of this division; the inbox's visits are then those of the division. */
@@ -707,8 +733,12 @@ interface AgentArtifact {
707
733
  }
708
734
  /** `resume` continues the run from its last checkpoint; `restart` starts a new run in the thread. */
709
735
  type AgentRunRetryMode = 'resume' | 'restart';
710
- /** `re-execute` runs the proposal again; `mark-resolved` confirms its outcome without running it. */
711
- type AgentExecutionResolution = 're-execute' | 'mark-resolved';
736
+ /**
737
+ * `re-execute` runs the proposal again; `hand-to-application` hands a proposal the application
738
+ * executes (one with `executionReportDueAt`) to the application again; `mark-resolved` confirms its
739
+ * outcome without running it.
740
+ */
741
+ type AgentExecutionResolution = 're-execute' | 'hand-to-application' | 'mark-resolved';
712
742
  /** A board of a group of agents the caller may open (`getBoards`). */
713
743
  interface AgentBoardSummary {
714
744
  /** The group id, such as `project-management`. */
@@ -887,6 +917,11 @@ interface Conversation extends ConversationSummary {
887
917
  agentVersion: number;
888
918
  messages: Message[];
889
919
  pendingApproval: ApprovalPart | null;
920
+ /**
921
+ * The question the waiting turn asked with `ask_question` and waits for (`run.AllowQuestions()` on
922
+ * the server); missing when the conversation waits for no question and on older servers.
923
+ */
924
+ pendingQuestion?: QuestionPart | null;
890
925
  /** The owner followed by the participants; empty while the conversation is not shared. */
891
926
  members?: ConversationMember[];
892
927
  /** The current invitation-link token; only for the owner. */
@@ -962,6 +997,11 @@ interface Message {
962
997
  authorKind?: MessageAuthorKind | null;
963
998
  /** The title, sender, link and trusted flag of a message the application posted; missing for other messages. */
964
999
  application?: ApplicationMessageDetails | null;
1000
+ /**
1001
+ * The skill an agent message of a person's chat worked in at its end (`run.SkillsInChat()` on the
1002
+ * server); missing for a message without a skill.
1003
+ */
1004
+ skillId?: string | null;
965
1005
  }
966
1006
  /**
967
1007
  * `person` for a message a person wrote; `trigger` for one a trigger wrote into an agent thread;
@@ -990,7 +1030,38 @@ interface ApplicationMessageLink {
990
1030
  /** The text of the link; the chat shows its own text without one. */
991
1031
  label: string | null;
992
1032
  }
993
- type MessagePart = TextPart | ToolCallPart | ApprovalPart | ConnectionRequiredPart | FilePart;
1033
+ type MessagePart = TextPart | ToolCallPart | ApprovalPart | ConnectionRequiredPart | FilePart | QuestionPart;
1034
+ /**
1035
+ * `pending` while the turn waits for the answer; `answered` once the addressee chose; `expired` when
1036
+ * nobody answered within the turn's wait limit; `cancelled` when the turn was stopped.
1037
+ */
1038
+ type QuestionStatus = 'pending' | 'answered' | 'expired' | 'cancelled';
1039
+ /**
1040
+ * A question the agent asked with `ask_question` in a person's chat. Only the addressee answers it,
1041
+ * with `NhAssistantApiService.answerQuestion`; the turn waits for the answer as for an approval and
1042
+ * continues with it. Everyone else sees it read-only.
1043
+ */
1044
+ interface QuestionPart {
1045
+ type: 'question';
1046
+ questionId: string;
1047
+ question: string;
1048
+ /** Two to six answers, in order; the answer names the index of one. */
1049
+ choices: string[];
1050
+ /** The person who answers: by default the person whose turn asked. */
1051
+ addresseeActorId: string;
1052
+ /** After this moment an answer is refused with `assistant-question-expired`. */
1053
+ expiresAt: string;
1054
+ status: QuestionStatus;
1055
+ /** The zero-based index of the chosen answer; only sent once it was answered. */
1056
+ answerIndex?: number | null;
1057
+ /** When it was answered, expired or cancelled; only sent then. */
1058
+ closedAt?: string | null;
1059
+ }
1060
+ /** Body of `POST conversations/{id}/questions/{questionId}/answer`. */
1061
+ interface AnswerQuestionRequest {
1062
+ /** The zero-based index of the chosen answer. */
1063
+ choice: number;
1064
+ }
994
1065
  /**
995
1066
  * A file a person attached to a message: its name, media type and size in bytes, never its content.
996
1067
  * The application keeps the file; a later turn opens it again with the rights of that turn.
@@ -1025,9 +1096,10 @@ interface TextPart {
1025
1096
  * `awaiting-approval` waits for a person. A call whose agent proposal closed without running ends
1026
1097
  * as `rejected`, as `not-executed` when the proposal expired, was withdrawn or became stale, or as
1027
1098
  * `failed` when its execution failed before it started; its `resultCode` is then
1028
- * `assistant-proposal-<approval status>`, for example `assistant-proposal-expired`.
1099
+ * `assistant-proposal-<approval status>`, for example `assistant-proposal-expired`. An `ask_question`
1100
+ * call waits as `awaiting-answer` for the person it asked.
1029
1101
  */
1030
- type ToolCallStatus = 'running' | 'succeeded' | 'failed' | 'awaiting-approval' | 'rejected' | 'not-executed';
1102
+ type ToolCallStatus = 'running' | 'succeeded' | 'failed' | 'awaiting-approval' | 'awaiting-answer' | 'rejected' | 'not-executed';
1031
1103
  interface ToolCallPart {
1032
1104
  type: 'tool-call';
1033
1105
  invocationId: string;
@@ -1049,9 +1121,10 @@ interface ToolCallPart {
1049
1121
  /**
1050
1122
  * Chat approvals are `pending`, `approved`, `rejected` or `expired`; proposals of agents that run on
1051
1123
  * their own continue through execution (`executing`, `executed`, `execution-failed`,
1052
- * `execution-unknown`, `resolved`) or end as `withdrawn`, `stale` or `shadow`.
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`.
1053
1126
  */
1054
- type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
1127
+ type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
1055
1128
  interface ApprovalPresentationField {
1056
1129
  label: string;
1057
1130
  value: string;
@@ -1094,6 +1167,29 @@ interface ApprovalPart {
1094
1167
  * in the person's own request with their own rights. Missing for the conversation's own proposals.
1095
1168
  */
1096
1169
  consultation?: ApprovalConsultation | null;
1170
+ /**
1171
+ * The result of the execution, such as the application's code or `report-overdue`. Only sent once the
1172
+ * proposal executed or was handed to the application; missing on older servers.
1173
+ */
1174
+ executionResultCode?: string;
1175
+ /** Until when the application's report is due, for a proposal handed to the application. Only sent then. */
1176
+ executionReportDueAt?: string;
1177
+ /**
1178
+ * `true` when the current user may resolve this uncertain execution in the chat (`resolveApproval`):
1179
+ * they approved it here, it was handed to the application and its outcome is unknown. Only sent then.
1180
+ */
1181
+ canResolve?: boolean;
1182
+ }
1183
+ /**
1184
+ * How the person who approved a proposal in their chat resolves its uncertain hand-off: hand it to the
1185
+ * application again, with a new attempt and report deadline, or confirm its outcome without running it.
1186
+ */
1187
+ type ApprovalResolution = 'hand-to-application' | 'mark-resolved';
1188
+ /** Body of `POST conversations/{id}/approvals/{approvalId}/resolve`. */
1189
+ interface ResolveApprovalRequest {
1190
+ action: ApprovalResolution;
1191
+ /** Why, at most 500 characters. */
1192
+ reason?: string;
1097
1193
  }
1098
1194
  /**
1099
1195
  * How a consulted agent's proposal is decided and whose rights execute it: `asker-decides`, the person
@@ -1229,6 +1325,10 @@ interface ToolCompletedEvent {
1229
1325
  resultPreview: string | null;
1230
1326
  }
1231
1327
  type ApprovalRequiredEvent = ApprovalPart;
1328
+ /** The agent asked a person of the conversation a question; the turn waits for the answer. */
1329
+ type QuestionAskedEvent = QuestionPart;
1330
+ /** The addressee answered the question; the turn continues with the answer. */
1331
+ type QuestionAnsweredEvent = QuestionPart;
1232
1332
  /** The person who asked has to connect an MCP server before the agent can use it. */
1233
1333
  interface ConnectionRequiredEvent {
1234
1334
  serverId: string;
@@ -1264,6 +1364,8 @@ interface NhAssistantSseEventMap {
1264
1364
  'tool.started': ToolStartedEvent;
1265
1365
  'tool.completed': ToolCompletedEvent;
1266
1366
  'approval.required': ApprovalRequiredEvent;
1367
+ 'question.asked': QuestionAskedEvent;
1368
+ 'question.answered': QuestionAnsweredEvent;
1267
1369
  'connection.required': ConnectionRequiredEvent;
1268
1370
  'turn.completed': TurnCompletedEvent;
1269
1371
  'error': AssistantErrorEvent;
@@ -1365,6 +1467,346 @@ interface LiveConversationEvent {
1365
1467
  data: unknown;
1366
1468
  }
1367
1469
 
1470
+ /**
1471
+ * Agent packages (S7-2): several agents with their configuration as data in one versioned package,
1472
+ * exported with `POST admin/agent-packages/export`, previewed and imported on another host with
1473
+ * `POST admin/agent-packages/preview` and `.../import` through the same validators as saving, and
1474
+ * parts the package locks against local changes until an administrator unlinks them with
1475
+ * `POST admin/agents/{id}/package/unlink`. The names are those of the server's JSON (camelCase).
1476
+ */
1477
+
1478
+ /** The `format` of every agent package. */
1479
+ declare const NH_ASSISTANT_AGENT_PACKAGE_FORMAT = "newheap.assistant.agent-package";
1480
+ /** The format version this library reads and writes; a newer one is refused. */
1481
+ declare const NH_ASSISTANT_AGENT_PACKAGE_FORMAT_VERSION = 1;
1482
+ /** The largest package in bytes of its UTF-8 JSON: 1 MB (`assistant-package-too-large` above). */
1483
+ declare const NH_ASSISTANT_AGENT_PACKAGE_MAX_BYTES = 1048576;
1484
+ /** The most agents of one package. */
1485
+ declare const NH_ASSISTANT_AGENT_PACKAGE_MAX_AGENTS = 20;
1486
+ /**
1487
+ * The kinds of part of an agent in a package. A part key is `agent`, `runSettings`, or
1488
+ * `{kind}:{id}` for a skill or trigger id, the subject type of a consultation or hand-off and the
1489
+ * name of an entry of agent metadata, such as `skill:triage`.
1490
+ */
1491
+ type AgentPackagePartKind = 'agent' | 'runSettings' | 'skill' | 'trigger' | 'consultation' | 'handOff' | 'metadata';
1492
+ /** The lock of a whole part, instead of a list of its fields. */
1493
+ declare const NH_ASSISTANT_PACKAGE_LOCK_ALL = "*";
1494
+ /**
1495
+ * The fields a package may lock per part kind (`NhAssistantPackageLockFields`). A save that changes a
1496
+ * locked field is refused with the field error `{field}: locked`, named as here; `worksOn`,
1497
+ * `dailyBudget`, `files` and `limits` each stand for the fields the forms show together. An agent in
1498
+ * code carries only the first six fields of `agent`.
1499
+ */
1500
+ declare const NH_ASSISTANT_PACKAGE_LOCK_FIELDS: Readonly<Record<AgentPackagePartKind, readonly string[]>>;
1501
+ /**
1502
+ * A versioned agent package: several agents with what belongs to each of them as data. It never holds
1503
+ * history, candidates, runs, feedback, run state, shadow overrides, MCP server definitions, the
1504
+ * technical account or secrets; references travel as names. The server reads it strictly: an unknown
1505
+ * property, a missing required one, another `format` or a newer `formatVersion` is refused with
1506
+ * `assistant-package-format-unsupported`.
1507
+ */
1508
+ interface AgentPackage {
1509
+ /** Always `newheap.assistant.agent-package`. */
1510
+ format: string;
1511
+ formatVersion: number;
1512
+ package: AgentPackageInfo;
1513
+ /** 1 to 20 agents, each id once. */
1514
+ agents: PackageAgent[];
1515
+ }
1516
+ /** The identity of an agent package. */
1517
+ interface AgentPackageInfo {
1518
+ /** A dash-case id, at most 128 characters; by default the first agent's id. */
1519
+ id: string;
1520
+ /** 1 or higher; an upgrade of a linked package has a higher version. */
1521
+ version: number;
1522
+ /** What the package is for, at most 500 characters. */
1523
+ description?: string | null;
1524
+ }
1525
+ /**
1526
+ * One agent in a package: an agent created in the administration travels whole, an agent in code as
1527
+ * an overlay of what data may change on it, which the import applies to the same agent in code.
1528
+ */
1529
+ interface PackageAgent {
1530
+ /** The agent's id, kept on import. */
1531
+ id: string;
1532
+ /** `admin` for an agent created in the administration, `code` for an overlay of an agent in code. */
1533
+ source: 'admin' | 'code';
1534
+ /** The definition of an agent created here, or the overrides of an agent in code (part `agent`). */
1535
+ definition?: PackageAgentDefinition | null;
1536
+ /** The run settings of an agent created here, without the technical account (part `runSettings`). */
1537
+ runSettings?: PackageRunSettings | null;
1538
+ skills?: PackageSkill[] | null;
1539
+ triggers?: PackageTrigger[] | null;
1540
+ consultations?: PackageConsultation[] | null;
1541
+ /** The hand-offs defined as data that the agent accepts. */
1542
+ handOffs?: PackageHandOff[] | null;
1543
+ /** Its values of entries of agent metadata by name; for an agent in code only overrides of editable entries. */
1544
+ metadata?: Record<string, unknown> | null;
1545
+ /** The groups of agents it is in, by id. */
1546
+ groups?: string[] | null;
1547
+ /** The locked fields per part key, each `['*']` or fields of `NH_ASSISTANT_PACKAGE_LOCK_FIELDS`. */
1548
+ locks?: Record<string, string[]> | null;
1549
+ /** The SHA-256 of each part's canonical JSON by part key, lowercase hex; optional for a package a tool writes. */
1550
+ hashes?: Record<string, string> | null;
1551
+ }
1552
+ /**
1553
+ * The definition of an agent. For an agent in code only `displayName`, `description`, `instructions`,
1554
+ * `toolSelectors`, `requiredPolicy` and `autonomy` apply; a missing value keeps the code's.
1555
+ */
1556
+ interface PackageAgentDefinition {
1557
+ displayName?: string | null;
1558
+ description?: string | null;
1559
+ instructions?: string | null;
1560
+ instructionsAsset?: InstructionAssetReference | null;
1561
+ toolSelectors?: string[] | null;
1562
+ requiredPolicy?: string | null;
1563
+ autonomy?: AssistantAutonomy | null;
1564
+ offeredInChat?: boolean | null;
1565
+ worksOnSubjectTypes?: string[] | null;
1566
+ worksOnAllSubjects?: boolean | null;
1567
+ worksOnApplication?: boolean | null;
1568
+ perDivision?: boolean | null;
1569
+ runPolicy?: string | null;
1570
+ viewPolicy?: string | null;
1571
+ profile?: string | null;
1572
+ dataClassification?: AssistantDataClassification | null;
1573
+ /** For a new agent: it starts off. */
1574
+ startsOff?: boolean | null;
1575
+ /** For a new agent: it starts in shadow. */
1576
+ startsInShadow?: boolean | null;
1577
+ /** The live agent a data shadow variant belongs to: another agent of the package or one the host has. */
1578
+ shadowOf?: string | null;
1579
+ }
1580
+ /** The run settings of an agent created in the administration; the technical account never travels. */
1581
+ interface PackageRunSettings {
1582
+ accountability: AgentAccountability;
1583
+ delegateFromInitiator?: boolean;
1584
+ allowGatewayReads?: boolean;
1585
+ elevatedReads?: AgentElevatedReads | null;
1586
+ approvalPolicy?: string | null;
1587
+ retryCount?: number | null;
1588
+ dailyToolCalls?: number | null;
1589
+ dailyTokens?: number | null;
1590
+ maxConcurrentRuns?: number | null;
1591
+ maxRunsPerSubjectPerDay?: number | null;
1592
+ maxTokensPerRun?: number | null;
1593
+ triageProfile?: string | null;
1594
+ ruleHandler?: string | null;
1595
+ acceptsFiles?: boolean;
1596
+ maxFileBytes?: number | null;
1597
+ maxFilePages?: number | null;
1598
+ maxFilesPerTurn?: number | null;
1599
+ maxFileTokensPerTurn?: number | null;
1600
+ }
1601
+ /** The live version of a data skill. */
1602
+ interface PackageSkill {
1603
+ id: string;
1604
+ description: string;
1605
+ instructions?: string | null;
1606
+ instructionsAsset?: InstructionAssetReference | null;
1607
+ tools?: string[] | null;
1608
+ profile?: string | null;
1609
+ ruleHandler?: string | null;
1610
+ maxTokensPerRun?: number | null;
1611
+ dailyToolCalls?: number | null;
1612
+ dailyTokens?: number | null;
1613
+ approvalPolicy?: string | null;
1614
+ dataClassification?: AssistantDataClassification | null;
1615
+ acceptsFiles?: boolean;
1616
+ maxFileBytes?: number | null;
1617
+ maxFilePages?: number | null;
1618
+ maxFilesPerTurn?: number | null;
1619
+ maxFileTokensPerTurn?: number | null;
1620
+ /** For a new skill: it starts off. */
1621
+ startsOff?: boolean | null;
1622
+ }
1623
+ /** The live version of a data trigger; its id stays on import. */
1624
+ interface PackageTrigger {
1625
+ id: string;
1626
+ source: 'event' | 'schedule';
1627
+ skill?: string | null;
1628
+ event?: string | null;
1629
+ filters?: string[] | null;
1630
+ cron?: string | null;
1631
+ timeZone?: string | null;
1632
+ subjectSet?: string | null;
1633
+ message?: string | null;
1634
+ conflict?: TriggerConflict | null;
1635
+ debounceSeconds?: number | null;
1636
+ }
1637
+ /** A consultation defined as data. */
1638
+ interface PackageConsultation {
1639
+ subjectType: string;
1640
+ description: string;
1641
+ instructions?: string | null;
1642
+ minimumRole?: ConsultationSubjectRole | null;
1643
+ askerPolicy?: string | null;
1644
+ routes?: NhAssistantConsultationRoute[] | null;
1645
+ proposalRole?: ConsultationSubjectRole | null;
1646
+ proposalPolicy?: string | null;
1647
+ toolSelectors?: string[] | null;
1648
+ maxToolCalls?: number | null;
1649
+ timeoutSeconds?: number | null;
1650
+ maxAnswerChars?: number | null;
1651
+ maxHistoryMessages?: number | null;
1652
+ allowRequests?: boolean;
1653
+ exposeToMcp?: boolean;
1654
+ dataClassification?: AssistantDataClassification | null;
1655
+ /** For a new consultation: it starts off. */
1656
+ startsOff?: boolean | null;
1657
+ }
1658
+ /** A hand-off defined as data that the agent accepts; a source may be another agent of the package. */
1659
+ interface PackageHandOff {
1660
+ subjectType: string;
1661
+ sources: string[];
1662
+ description?: string | null;
1663
+ notifySource?: boolean;
1664
+ maxPerSubjectPerDay?: number | null;
1665
+ }
1666
+ /** How an export builds its package. */
1667
+ interface AgentPackageExportOptions {
1668
+ /** By default the id of the package the first agent is linked to, otherwise the first agent's id. */
1669
+ packageId?: string | null;
1670
+ /** By default the next version after the linked package's, otherwise 1. */
1671
+ version?: number | null;
1672
+ /** At most 500 characters. */
1673
+ description?: string | null;
1674
+ /** Per agent id, the locked fields per part key, each `['*']` or lockable fields of the part's kind. */
1675
+ locks?: Record<string, Record<string, string[]>> | null;
1676
+ }
1677
+ /** Body of `POST admin/agent-packages/export`. */
1678
+ interface AgentPackageExportRequest {
1679
+ /** The agents to export, 1 to 20; exactly these. */
1680
+ agentIds: string[];
1681
+ options?: AgentPackageExportOptions | null;
1682
+ }
1683
+ /** What a reference to an agent outside the exported selection is. */
1684
+ type AgentPackageWarningCode = 'hand-off-source' | 'shadow-of' | 'consultation-asker' | 'shadow-variant' | (string & {});
1685
+ /** A reference of an exported agent to an agent outside the selection, which must exist where the package is imported. */
1686
+ interface AgentPackageWarning {
1687
+ /** The exported agent. */
1688
+ agentId: string;
1689
+ /** The part that makes the reference, such as `handOff:project`. */
1690
+ part: string;
1691
+ code: AgentPackageWarningCode;
1692
+ /** The agent outside the selection. */
1693
+ referencedAgentId: string;
1694
+ }
1695
+ /**
1696
+ * An exported package as `exportAgentPackage` answers it: the package, its JSON exactly as the server
1697
+ * wrote it for the download, and the references to agents outside the selection.
1698
+ */
1699
+ interface AgentPackageExport {
1700
+ package: AgentPackage;
1701
+ /** The JSON of the download, `agent-package-{packageId}.json`. */
1702
+ json: string;
1703
+ /** Every reference to an agent outside the selection (header `X-NewHeap-Package-Warnings`). */
1704
+ warnings: AgentPackageWarning[];
1705
+ }
1706
+ /** A part of an agent; without `part` every part of the agent. */
1707
+ interface PackagePartReference {
1708
+ agentId: string;
1709
+ part?: string | null;
1710
+ }
1711
+ /** How an import applies a package. */
1712
+ interface AgentPackageImportOptions {
1713
+ /**
1714
+ * Per agent id, the technical account on this host for run settings that answer to one; without it
1715
+ * such run settings are refused with `serviceAccountActorId: required`.
1716
+ */
1717
+ serviceAccounts?: Record<string, string> | null;
1718
+ /**
1719
+ * `live` (default): a changed skill or trigger becomes its new live version; `shadow`: its candidate
1720
+ * next to the live version. New skills and triggers start in shadow either way.
1721
+ */
1722
+ apply?: SkillApplyMode | null;
1723
+ /** Unlinked parts that take the package's version again instead of staying `kept-local`. */
1724
+ relink?: PackagePartReference[] | null;
1725
+ }
1726
+ /** Body of `POST admin/agent-packages/preview` and `POST admin/agent-packages/import`. */
1727
+ interface AgentPackageImportRequest {
1728
+ /** The package as JSON; the server reads it strictly. */
1729
+ package: AgentPackage;
1730
+ options?: AgentPackageImportOptions | null;
1731
+ }
1732
+ /** What an import does or did with one part. */
1733
+ type AgentPackagePartOutcome = 'created' | 'changed' | 'unchanged' | 'kept-local' | 'left-behind' | 'refused';
1734
+ /** The outcome of one part in a preview or an import. */
1735
+ interface AgentPackagePart {
1736
+ agentId: string;
1737
+ /** The part key, such as `agent` or `skill:triage`. */
1738
+ part: string;
1739
+ outcome: AgentPackagePartOutcome;
1740
+ /** The host's part changed after the last import: the import overwrites its unlocked fields. */
1741
+ changedLocally: boolean;
1742
+ /** For a refused part without field errors: its failure code, such as `assistant-agent-exists`. */
1743
+ code: string | null;
1744
+ /** For a refused part: the field errors of the save validators, by field. */
1745
+ errors: Record<string, string[]> | null;
1746
+ /** The fields the package locks on the part, `['*']` for all. */
1747
+ lockedFields: string[];
1748
+ /** For a skill or trigger an import makes a candidate of (`apply: shadow`): the candidate's version. */
1749
+ candidateVersion?: number | null;
1750
+ }
1751
+ /** What an import would do: the parts per agent in dependency order, left-behind agents and parts last. */
1752
+ interface AgentPackagePreview {
1753
+ packageId: string;
1754
+ packageVersion: number;
1755
+ /** The version of the package the host has; `null` for a package it does not have. */
1756
+ installedVersion: number | null;
1757
+ /** No part is refused. */
1758
+ importable: boolean;
1759
+ parts: AgentPackagePart[];
1760
+ }
1761
+ /** What an import did: every part's outcome, as the preview showed it. */
1762
+ interface AgentPackageImport {
1763
+ packageId: string;
1764
+ packageVersion: number;
1765
+ /** The SHA-256 of the package's canonical JSON, lowercase hex, as audited. */
1766
+ hash: string;
1767
+ parts: AgentPackagePart[];
1768
+ }
1769
+ /** Body of `POST admin/agents/{id}/package/unlink`. */
1770
+ interface AgentPackageUnlinkRequest {
1771
+ /** The part key to unlink; `null` or missing unlinks the whole agent. */
1772
+ part?: string | null;
1773
+ /** At most 500 characters. */
1774
+ reason?: string | null;
1775
+ }
1776
+ /** The parts an unlink took out of their package. */
1777
+ interface AgentPackageUnlink {
1778
+ agentId: string;
1779
+ packageId: string;
1780
+ /** The part keys that are now local. */
1781
+ parts: string[];
1782
+ }
1783
+ /**
1784
+ * The package link of one part, as the administration shows it next to the part: the package it came
1785
+ * from and the fields that stay read-only.
1786
+ */
1787
+ interface PackagePartLink {
1788
+ part: string;
1789
+ packageId: string;
1790
+ /** The version of the package the part was imported from. */
1791
+ packageVersion: number;
1792
+ /** The locked fields, `['*']` for all; empty when the package locks none. */
1793
+ lockedFields: string[];
1794
+ /** The SHA-256 of the part's canonical JSON at import. */
1795
+ hash: string;
1796
+ /** The part changed after its import; the next upgrade overwrites its unlocked fields. */
1797
+ changedLocally: boolean;
1798
+ linkedAt: string;
1799
+ linkedBy: string;
1800
+ }
1801
+ /** The package an agent belongs to, with the link of every part that is still linked. */
1802
+ interface AgentPackageLink {
1803
+ packageId: string;
1804
+ /** The version of the package the host has. */
1805
+ packageVersion: number;
1806
+ /** The linked parts, ordered by part key. */
1807
+ parts: PackagePartLink[];
1808
+ }
1809
+
1368
1810
  type AssistantStyle = 'default' | 'direct' | 'personal' | 'detailed';
1369
1811
  type AssistantAddressForm = 'informal' | 'formal';
1370
1812
  type AssistantResponseLength = 'short' | 'normal' | 'long';
@@ -1486,6 +1928,20 @@ interface AdminAgentInput {
1486
1928
  * update.
1487
1929
  */
1488
1930
  startsOff?: boolean;
1931
+ /**
1932
+ * On create only: the new agent starts in shadow, so once it has run settings, also when they are
1933
+ * saved right after, its runs work in its shadow threads, where nobody is notified and nothing
1934
+ * executes, until someone puts it live with `setAgentShadow`. Omitted starts it live; ignored on
1935
+ * update.
1936
+ */
1937
+ startsInShadow?: boolean;
1938
+ /**
1939
+ * For an agent created in the administration: values of the run catalog's `agentMetadata` entries
1940
+ * by name, saved with the definition's version; `null` removes one, entries left out keep theirs.
1941
+ * Field errors are `metadata.<name>`. An agent in code changes its editable entries one by one with
1942
+ * `saveAgentMetadata`.
1943
+ */
1944
+ metadata?: Record<string, unknown>;
1489
1945
  /**
1490
1946
  * For an agent created in the administration: the model profile of its model calls, one of the run
1491
1947
  * catalog's `profiles` (`profile: not-found` otherwise). Omitted keeps it on update; a new agent uses
@@ -1499,6 +1955,66 @@ interface AdminAgentInput {
1499
1955
  * Agents in code take it from their code.
1500
1956
  */
1501
1957
  dataClassification?: AssistantDataClassification | null;
1958
+ /**
1959
+ * On create only: the live agent the new agent is a data shadow variant of, within the ceiling in
1960
+ * code (`UseShadowVariantsAsData`). The variant receives every trigger of the live agent once it has
1961
+ * run settings, always works in shadow, is never offered in the chat and never changes its live
1962
+ * agent. Outside the ceiling it fails with `assistant-shadow-variants-not-allowed`, beyond its number
1963
+ * of variants with `assistant-configuration-limit`, and with the field errors `shadowOf: not-found`
1964
+ * and `shadowOf: invalid` for a live agent without a run configuration or one that is no live agent.
1965
+ * Ignored on update.
1966
+ */
1967
+ shadowOf?: string | null;
1968
+ /**
1969
+ * For an agent created in the administration, when the run catalog reports `instructionAssets`:
1970
+ * the application's asset its instructions come from instead of `instructions`, which is then
1971
+ * empty. The save checks it with the application (`instructionsAsset: not-found`,
1972
+ * `instructionsAsset.hash: invalid`). Omitted or `null` keeps or makes the instructions text.
1973
+ */
1974
+ instructionsAsset?: InstructionAssetReference | null;
1975
+ }
1976
+ /**
1977
+ * The asset of the application a skill version or an agent created in the administration takes its
1978
+ * instructions from: its id, exact version and the SHA-256 of its content. A new version of the asset
1979
+ * takes effect only when an administrator saves it as the next version.
1980
+ */
1981
+ interface InstructionAssetReference {
1982
+ assetId: string;
1983
+ version: number;
1984
+ /** The SHA-256 of the asset's content, lowercase hex. */
1985
+ hash: string;
1986
+ }
1987
+ /**
1988
+ * Why instructions from an asset are not available: the application no longer has a source, the asset
1989
+ * is missing, its text changed since it was saved, it cannot be instructions, or the source failed.
1990
+ */
1991
+ type InstructionAssetProblem = 'no-asset-source' | 'asset-missing' | 'asset-changed' | 'asset-invalid' | 'asset-unavailable';
1992
+ /** One of the application's assets, without its content (`GET admin/instruction-assets`). */
1993
+ interface InstructionAssetSummary {
1994
+ assetId: string;
1995
+ version: number;
1996
+ /** The hash its manifest states; a save checks it against the content. */
1997
+ hash: string;
1998
+ /** The asset that replaces it, when the application deprecated it. */
1999
+ replacedByAssetId?: string | null;
2000
+ deprecatedAt?: string | null;
2001
+ }
2002
+ /** The application's assets an administrator may choose as instructions. */
2003
+ interface InstructionAssetList {
2004
+ /** Whether the application registered a text asset source. */
2005
+ supported: boolean;
2006
+ /** The assets it lists, in its order; empty when it lists none, so the id and version are typed. */
2007
+ assets: InstructionAssetSummary[];
2008
+ }
2009
+ /** The text of one asset, read-only (`GET admin/instruction-assets/{id}/versions/{version}`). */
2010
+ interface InstructionAssetText {
2011
+ assetId: string;
2012
+ version: number;
2013
+ /** The SHA-256 of `content`: the hash a reference stores. */
2014
+ hash: string;
2015
+ content: string;
2016
+ /** `asset-invalid` when the asset cannot be instructions, so a save refuses it. */
2017
+ problem?: InstructionAssetProblem | null;
1502
2018
  }
1503
2019
  /** Body of `PUT admin/agents/{id}`. */
1504
2020
  type UpdateAdminAgentRequest = AdminAgentInput & {
@@ -1580,6 +2096,18 @@ interface AdminAgent extends AdminAgentInput {
1580
2096
  * its classification. A warning never refuses a save; missing on older servers.
1581
2097
  */
1582
2098
  warnings?: AssistantConfigurationWarning[];
2099
+ /**
2100
+ * Why the instructions of `instructionsAsset` are not available: the agent then starts no model
2101
+ * turn and `instructions` is empty. `null` when they resolve; missing on older servers. With an
2102
+ * asset that resolves, `instructions` is its text, read-only.
2103
+ */
2104
+ instructionsProblem?: InstructionAssetProblem | null;
2105
+ /**
2106
+ * The agent package the agent belongs to, with every linked part and its locked fields, which the
2107
+ * administration shows read-only; missing for an agent that belongs to none. Its part `agent` locks
2108
+ * fields of the definition.
2109
+ */
2110
+ package?: AgentPackageLink | null;
1583
2111
  }
1584
2112
  /** The groups one agent is in, as `setAgentGroups` answers. */
1585
2113
  interface AdminAgentGroups {
@@ -2262,6 +2790,78 @@ interface RunCatalog {
2262
2790
  * older servers.
2263
2791
  */
2264
2792
  consultationCeiling?: ConsultationCeiling | null;
2793
+ /**
2794
+ * The entries of agent metadata the application registers with `AddAgentMetadata`, ordered by name:
2795
+ * the slots of the agent editor; missing on older servers.
2796
+ */
2797
+ agentMetadata?: AgentMetadataEntry[];
2798
+ /**
2799
+ * Whether the application registered a text asset source, so skills and agents created here may take
2800
+ * their instructions from its assets; missing on older servers.
2801
+ */
2802
+ instructionAssets?: boolean;
2803
+ }
2804
+ /** An entry of agent metadata registered in code with `AddAgentMetadata`. */
2805
+ interface AgentMetadataEntry {
2806
+ /** The entry's dash-case name. */
2807
+ name: string;
2808
+ /** Administrators may change it on agents in code, as an override. */
2809
+ editable: boolean;
2810
+ /** The largest value in bytes of its JSON. */
2811
+ maxBytes: number;
2812
+ /** It declares a searchable value with `IndexBy`, or several with `IndexByEach`. */
2813
+ indexed: boolean;
2814
+ /** It declares several searchable values with `IndexByEach`. */
2815
+ indexedByEach?: boolean;
2816
+ }
2817
+ /** Where the value of an agent's metadata entry comes from. */
2818
+ type AgentMetadataSource = 'code' | 'override' | 'data';
2819
+ /**
2820
+ * One entry of agent metadata of one agent (`GET admin/agents/{id}/metadata`): the application's own
2821
+ * data about the agent, which NewHeap stores and checks but never interprets.
2822
+ */
2823
+ interface AgentMetadata {
2824
+ name: string;
2825
+ /**
2826
+ * Whether it changes here: always for an agent created here, for an agent in code only when the
2827
+ * entry is editable.
2828
+ */
2829
+ editable: boolean;
2830
+ maxBytes: number;
2831
+ /** Where the value in effect comes from; `null` without a value. */
2832
+ source: AgentMetadataSource | null;
2833
+ /** The value in effect, in the shape of the entry's type; `null` without one. */
2834
+ value: unknown;
2835
+ /**
2836
+ * The version a change sends as `expectedVersion`: the agent's version for an agent created here,
2837
+ * the override's version for an agent in code, `null` while it has no override.
2838
+ */
2839
+ version: number | null;
2840
+ /** The agent's version: a change of an agent created here makes its next version. */
2841
+ agentVersion: number;
2842
+ /** The value in code of an agent in code, next to an override. */
2843
+ codeValue?: unknown;
2844
+ indexed?: boolean;
2845
+ /** The searchable value of the value in effect, trimmed and in lowercase. */
2846
+ indexValue?: string | null;
2847
+ /** Whether the entry declares several searchable values with `IndexByEach`. */
2848
+ indexedByEach?: boolean;
2849
+ /** The searchable values of an `IndexByEach` entry's value in effect, trimmed, in lowercase and ordered. */
2850
+ indexValues?: string[];
2851
+ changedAt?: string | null;
2852
+ changedBy?: string | null;
2853
+ /**
2854
+ * The link of the entry (part `metadata:{name}`) to the agent package it was imported from, with its locked
2855
+ * fields, which the administration shows read-only; missing when it is not linked.
2856
+ */
2857
+ package?: PackagePartLink | null;
2858
+ }
2859
+ /** Body of `PUT admin/agents/{id}/metadata/{name}`. */
2860
+ interface AgentMetadataRequest {
2861
+ /** The value in the shape of the entry's type (camelCase); required. */
2862
+ value: unknown;
2863
+ /** The entry's `version` the change was made on; `null` for a new override of an agent in code. */
2864
+ expectedVersion: number | null;
2265
2865
  }
2266
2866
  /**
2267
2867
  * A ceiling in code of consultations defined as data: the routes their proposals may use (empty allows
@@ -2284,6 +2884,11 @@ interface ConsultationCeiling {
2284
2884
  maxConsultations: number;
2285
2885
  /** The longest instructions of a consultation defined as data. */
2286
2886
  maxInstructionsLength: number;
2887
+ /**
2888
+ * Every new consultation defined as data starts off until an administrator switches it on
2889
+ * (`StartOff()` in code); missing on older servers.
2890
+ */
2891
+ startsOff?: boolean;
2287
2892
  }
2288
2893
  /**
2289
2894
  * File limits: the largest file in bytes, the most pages of one file, the most files of one turn and
@@ -2366,7 +2971,7 @@ interface AssistantAccount {
2366
2971
  detail: string | null;
2367
2972
  }
2368
2973
  /** Which part of the run configuration a problem concerns. */
2369
- type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger' | 'consultation';
2974
+ type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger' | 'trigger-candidate' | 'consultation' | 'hand-off';
2370
2975
  /**
2371
2976
  * Data that is out of effect because it no longer fits the code, for example after a deploy removed
2372
2977
  * a profile, policy, rule handler, event or subject set it names. A consultation defined as data may
@@ -2414,6 +3019,11 @@ interface AgentRunSettings extends LowerFileLimits {
2414
3019
  * agent.
2415
3020
  */
2416
3021
  acceptsFiles?: boolean;
3022
+ /**
3023
+ * The link of the run settings (part `runSettings`) to the agent package it was imported from, with its locked
3024
+ * fields, which the administration shows read-only; missing when it is not linked.
3025
+ */
3026
+ package?: PackagePartLink | null;
2417
3027
  }
2418
3028
  /** Body of `PUT admin/agents/{id}/run-settings`. */
2419
3029
  interface AgentRunSettingsRequest extends LowerFileLimits {
@@ -2539,6 +3149,17 @@ interface DataSkill extends LowerFileLimits {
2539
3149
  * classification, or else its agent's. A warning never refuses a save; missing on older servers.
2540
3150
  */
2541
3151
  warnings?: AssistantConfigurationWarning[];
3152
+ /**
3153
+ * The application's asset the version takes its instructions from; `null` for inline instructions
3154
+ * or none, missing on older servers. `problem` says when it no longer resolves to
3155
+ * `instructionsHash`; read its text with `getInstructionAsset`.
3156
+ */
3157
+ instructionsAsset?: InstructionAssetReference | null;
3158
+ /**
3159
+ * The link of the skill (part `skill:{id}`) to the agent package it was imported from, with its locked
3160
+ * fields, which the administration shows read-only; missing when it is not linked, and on a candidate.
3161
+ */
3162
+ package?: PackagePartLink | null;
2542
3163
  }
2543
3164
  /** How a change of a skill takes effect: at once, or as a candidate in shadow next to the live version. */
2544
3165
  type SkillApplyMode = 'live' | 'shadow';
@@ -2573,6 +3194,13 @@ interface DataSkillRequest extends LowerFileLimits {
2573
3194
  dataClassification?: AssistantDataClassification | null;
2574
3195
  /** A run in the skill reads files when its agent accepts them too; `false` by default. */
2575
3196
  acceptsFiles?: boolean;
3197
+ /**
3198
+ * The application's asset the version takes its instructions from, instead of `instructions`
3199
+ * (`instructions: not-allowed` next to it), when the run catalog reports `instructionAssets`. The
3200
+ * save checks it with the application: `instructionsAsset: not-found`, `instructionsAsset.hash:
3201
+ * invalid` and `instructionsAsset: invalid`.
3202
+ */
3203
+ instructionsAsset?: InstructionAssetReference | null;
2576
3204
  }
2577
3205
  type DataSkillVersionStatus = 'live' | 'candidate' | 'superseded' | 'discarded';
2578
3206
  /** One version in the history of a skill defined as data. */
@@ -2584,6 +3212,8 @@ interface DataSkillVersion {
2584
3212
  createdAt: string;
2585
3213
  createdBy: string;
2586
3214
  reason: string | null;
3215
+ /** The application's asset the version takes its instructions from; missing on older servers. */
3216
+ instructionsAsset?: InstructionAssetReference | null;
2587
3217
  }
2588
3218
  /** Body of `POST admin/agents/{id}/skills/{skillId}/candidate/promote` and `.../discard`. */
2589
3219
  interface SkillCandidateRequest {
@@ -2658,6 +3288,20 @@ interface DataTrigger {
2658
3288
  * Missing on older servers.
2659
3289
  */
2660
3290
  filters?: string[];
3291
+ /**
3292
+ * The candidate version that fires in shadow next to this live version, for the trigger's own agent
3293
+ * and into its shadow threads; missing or null without one. Its `inEffect` and `problem` are its own
3294
+ * (kind `trigger-candidate`), and its `shadow` is always `true`.
3295
+ */
3296
+ candidate?: DataTrigger | null;
3297
+ /** When the version was stored and by whom; missing on older servers. */
3298
+ createdAt?: string;
3299
+ createdBy?: string;
3300
+ /**
3301
+ * The link of the trigger (part `trigger:{id}`) to the agent package it was imported from, with its locked
3302
+ * fields, which the administration shows read-only; missing when it is not linked, and on a candidate.
3303
+ */
3304
+ package?: PackagePartLink | null;
2661
3305
  }
2662
3306
  /** Body of `PUT admin/agents/{id}/triggers/{triggerId}`. */
2663
3307
  interface DataTriggerRequest {
@@ -2689,6 +3333,52 @@ interface DataTriggerRequest {
2689
3333
  * `assistant-trigger-filter-not-found`; a schedule takes none.
2690
3334
  */
2691
3335
  filters?: string[] | null;
3336
+ /**
3337
+ * For a change of a trigger, `live` by default: the version takes effect at once in the trigger's
3338
+ * mode; `shadow` makes it the candidate that fires in shadow next to the live version, which keeps
3339
+ * working, until it is promoted or discarded. A new trigger fails with `apply: invalid`.
3340
+ */
3341
+ apply?: SkillApplyMode;
3342
+ }
3343
+ /** One version in the history of a trigger defined as data, with its definition. */
3344
+ interface DataTriggerVersion {
3345
+ version: number;
3346
+ status: DataSkillVersionStatus;
3347
+ skillId: string | null;
3348
+ source: 'event' | 'schedule';
3349
+ event: string | null;
3350
+ filters: string[];
3351
+ cron: string | null;
3352
+ timeZone: string | null;
3353
+ subjectSet: string | null;
3354
+ message: string | null;
3355
+ conflict: TriggerConflict;
3356
+ debounceSeconds: number;
3357
+ createdAt: string;
3358
+ createdBy: string;
3359
+ reason: string | null;
3360
+ }
3361
+ /** Body of `POST admin/agents/{id}/triggers/{triggerId}/candidate/promote` and `.../discard`. */
3362
+ type TriggerCandidateRequest = SkillCandidateRequest;
3363
+ /**
3364
+ * Response of `GET admin/agents/{id}/triggers/{triggerId}/candidate/comparison`: the live version and
3365
+ * the candidate on the runs they started, with the version statistics of the skill comparison. Counts
3366
+ * only.
3367
+ */
3368
+ interface TriggerComparison {
3369
+ agentId: string;
3370
+ triggerId: string;
3371
+ from: string;
3372
+ to: string;
3373
+ live: SkillVersionStats;
3374
+ candidate: SkillVersionStats;
3375
+ /** The events both versions started a run for. */
3376
+ pairedEvents: number;
3377
+ /** The events only the live version started a run for, such as those a filter of the candidate refuses. */
3378
+ liveOnlyEvents: number;
3379
+ /** The events only the candidate started a run for. */
3380
+ candidateOnlyEvents: number;
3381
+ tools: SkillComparisonTool[];
2692
3382
  }
2693
3383
  /** Body of `POST admin/agents/{id}/triggers/{triggerId}/shadow`. */
2694
3384
  interface DataTriggerShadowRequest {
@@ -2750,6 +3440,11 @@ interface CodeConsultation {
2750
3440
  requestToolId: string | null;
2751
3441
  /** The agents whose tool selectors select the consult tool now, by id. */
2752
3442
  askingAgents: string[];
3443
+ /**
3444
+ * The tools the consulted agent is offered, from `Tools(...)` in code; `null` offers every tool of the
3445
+ * agent. Missing on older servers.
3446
+ */
3447
+ toolSelectors?: string[] | null;
2753
3448
  }
2754
3449
  /**
2755
3450
  * A consultation defined as data: other assistants may consult the agent about subjects of one type.
@@ -2799,6 +3494,14 @@ interface DataConsultation {
2799
3494
  problems: string[];
2800
3495
  /** The routes in effect: those saved that still fit the ceiling and the agent, before its route switches. */
2801
3496
  routesInEffect: NhAssistantConsultationRoute[];
3497
+ /** The tool selection as saved; `null` offers every tool of the agent. Missing on older servers. */
3498
+ toolSelectors?: string[] | null;
3499
+ /**
3500
+ * The tool selection in effect: the saved selectors the agent's own selectors still cover. `null`
3501
+ * offers every tool of the agent; empty offers none, when every selector dropped with the problem
3502
+ * `tools-not-allowed`, or while the consultation is out of effect. Missing on older servers.
3503
+ */
3504
+ toolSelectorsInEffect?: string[] | null;
2802
3505
  /** The id of the generated consult tool, which asking agents select. */
2803
3506
  consultToolId: string;
2804
3507
  /** The id of the generated request tool while requests are in effect. */
@@ -2807,6 +3510,24 @@ interface DataConsultation {
2807
3510
  askingAgents: string[];
2808
3511
  createdAt: string;
2809
3512
  createdBy: string;
3513
+ /**
3514
+ * The consultation is switched off: it is not offered until an administrator switches it on with
3515
+ * `setDataConsultationState`; `inEffect` is then `false` without a problem. Missing on older servers.
3516
+ */
3517
+ off?: boolean;
3518
+ /**
3519
+ * The link of the consultation (part `consultation:{subjectType}`) to the agent package it was imported from, with its locked
3520
+ * fields, which the administration shows read-only; missing when it is not linked.
3521
+ */
3522
+ package?: PackagePartLink | null;
3523
+ }
3524
+ /** The state of a consultation defined as data an administrator switches. */
3525
+ type DataConsultationState = 'on' | 'off';
3526
+ /** Body of `POST admin/agents/{id}/consultations/{subjectType}/state`. */
3527
+ interface DataConsultationStateRequest {
3528
+ state: DataConsultationState;
3529
+ /** Optional, at most 500 characters. */
3530
+ reason?: string | null;
2810
3531
  }
2811
3532
  /**
2812
3533
  * Body of `PUT admin/agents/{id}/consultations/{subjectType}`. Limits left out start at the code's
@@ -2831,6 +3552,12 @@ interface DataConsultationRequest {
2831
3552
  proposalRole?: ConsultationSubjectRole | null;
2832
3553
  /** A registered approval policy; `null` uses the agent's. */
2833
3554
  proposalPolicy?: string | null;
3555
+ /**
3556
+ * The tools the consulted agent is offered, by id or `prefix.*` selector, each covered by the
3557
+ * agent's own selectors; one outside them fails with `toolSelectors: not-allowed`. `null` or empty
3558
+ * offers every tool of the agent.
3559
+ */
3560
+ toolSelectors?: string[] | null;
2834
3561
  /** 0 to 32, at most the ceiling's. */
2835
3562
  maxToolCalls?: number | null;
2836
3563
  /** 1 to 600, at most the ceiling's. */
@@ -2849,6 +3576,201 @@ interface DataConsultationRequest {
2849
3576
  expectedVersion?: number | null;
2850
3577
  /** Optional, at most 500 characters. */
2851
3578
  reason?: string | null;
3579
+ /**
3580
+ * For a new consultation only: it starts off, so it is not offered until an administrator switches it
3581
+ * on, also when the ceiling does not make every new one start off. A change fails with
3582
+ * `startsOff: invalid`; it keeps whether the consultation is on.
3583
+ */
3584
+ startsOff?: boolean;
3585
+ }
3586
+
3587
+ /**
3588
+ * Hand-offs defined as data and the shadow variants of an agent, as the administration reads and
3589
+ * changes them (`admin/agents/{id}/hand-offs` and `admin/agents/{id}/shadow-variants`).
3590
+ */
3591
+
3592
+ /** A hand-off the agent accepts in code (`AcceptHandOffs`), read only. */
3593
+ interface CodeHandOff {
3594
+ subjectType: string;
3595
+ /** The agents that may hand work off, by id. */
3596
+ sources: string[];
3597
+ description: string | null;
3598
+ /** The source gets a follow-up when the agent's run for the hand-off ends. */
3599
+ notifySource: boolean;
3600
+ /** Hand-offs one source may make about one subject per 24 hours. */
3601
+ maxPerSubjectPerDay: number;
3602
+ /** The generated tool the sources' tool selectors select. */
3603
+ toolId: string;
3604
+ }
3605
+ /**
3606
+ * A hand-off defined as data within the ceiling in code (`UseHandOffsAsData`). It works as one in
3607
+ * code; one that no longer fits the ceiling or the code is out of effect as a whole.
3608
+ */
3609
+ interface DataHandOff extends CodeHandOff {
3610
+ version: number;
3611
+ changedAt: string;
3612
+ changedBy: string;
3613
+ reason: string | null;
3614
+ /** `false` with `problem` when it no longer fits the ceiling or the code. */
3615
+ inEffect: boolean;
3616
+ /** Such as `outside-ceiling`, `unknown-source` or `limit-above-ceiling`. */
3617
+ problem: string | null;
3618
+ createdAt: string;
3619
+ createdBy: string;
3620
+ /**
3621
+ * The link of the hand-off (part `handOff:{subjectType}`) to the agent package it was imported from, with its locked
3622
+ * fields, which the administration shows read-only; missing when it is not linked.
3623
+ */
3624
+ package?: PackagePartLink | null;
3625
+ }
3626
+ /** The agents the ceiling lets hand work about one subject type to the agent. */
3627
+ interface HandOffAllowance {
3628
+ subjectType: string;
3629
+ /** The agents with a run configuration that may hand off now, by id; never the agent itself. */
3630
+ sources: string[];
3631
+ /** Every agent created in the administration with run settings may hand off, also those created later. */
3632
+ sourcesCreatedInAdministration: boolean;
3633
+ }
3634
+ /** What the ceiling in code lets the agent accept as data. */
3635
+ interface HandOffCeiling {
3636
+ subjectTypes: HandOffAllowance[];
3637
+ /** The highest daily limit per source and subject. */
3638
+ maxPerSubjectPerDay: number;
3639
+ /** The most hand-offs defined as data of one agent. */
3640
+ maxHandOffs: number;
3641
+ /** The most sources of one hand-off. */
3642
+ maxSources: number;
3643
+ maxDescriptionLength: number;
3644
+ }
3645
+ /** `GET admin/agents/{id}/hand-offs`. */
3646
+ interface AgentHandOffs {
3647
+ agentId: string;
3648
+ codeHandOffs: CodeHandOff[];
3649
+ dataHandOffs: DataHandOff[];
3650
+ /** `null` when the agent may accept no hand-offs as data. */
3651
+ ceiling: HandOffCeiling | null;
3652
+ /** Whether the agent has the run configuration a hand-off needs. */
3653
+ configured: boolean;
3654
+ }
3655
+ /** Body of `PUT admin/agents/{id}/hand-offs/{subjectType}`. */
3656
+ interface DataHandOffRequest {
3657
+ /** 1 to the ceiling's `maxSources` agents within the ceiling. */
3658
+ sources: string[];
3659
+ /** At most the ceiling's `maxDescriptionLength` characters. */
3660
+ description?: string | null;
3661
+ notifySource?: boolean;
3662
+ /** 1 to the ceiling's `maxPerSubjectPerDay`; 5 by default. */
3663
+ maxPerSubjectPerDay?: number | null;
3664
+ /** The hand-off's current version; `null` for a new one. */
3665
+ expectedVersion?: number | null;
3666
+ /** Optional, at most 500 characters. */
3667
+ reason?: string | null;
3668
+ }
3669
+ /** One shadow variant of a live agent. */
3670
+ interface ShadowVariant {
3671
+ agentId: string;
3672
+ displayName: string;
3673
+ /** `code` for `ShadowOf`, `data` for a variant created in the administration. */
3674
+ source: 'code' | 'data';
3675
+ /** A data variant receives the live agent's triggers only with run settings. */
3676
+ hasRunSettings: boolean;
3677
+ /** Whether the variant receives the live agent's triggers now. */
3678
+ inEffect: boolean;
3679
+ /** Why a data variant with run settings is out of effect, such as `outside-ceiling`. */
3680
+ problem: string | null;
3681
+ /** The version of the variant's definition, which a promotion sends as `expectedVariantVersion`. */
3682
+ version?: number;
3683
+ }
3684
+ /** `GET admin/agents/{id}/shadow-variants`. */
3685
+ interface AgentShadowVariants {
3686
+ agentId: string;
3687
+ /** Whether administrators may create variants of the agent as data (`UseShadowVariantsAsData`). */
3688
+ allowsDataVariants: boolean;
3689
+ /** The most data variants the agent may have; 0 when it may have none. */
3690
+ maxDataVariants: number;
3691
+ /** The variants in code first, then the data variants. */
3692
+ variants: ShadowVariant[];
3693
+ }
3694
+ /** `POST admin/agents/{id}/promote`: a data shadow variant becomes its live agent's next version. */
3695
+ interface ShadowVariantPromotionRequest {
3696
+ /** The live agent's version the promotion was decided on. */
3697
+ expectedVersion: number;
3698
+ /**
3699
+ * The variant's data skills become the next live versions of the live agent's skills with the same
3700
+ * id, or new skills, which start in shadow; otherwise they go with the variant.
3701
+ */
3702
+ moveSkills?: boolean;
3703
+ /** The variant's version that was evaluated; omitted skips the check. */
3704
+ expectedVariantVersion?: number | null;
3705
+ /** Optional, at most 500 characters, stored with the skill versions the promotion saves. */
3706
+ reason?: string | null;
3707
+ }
3708
+ /** The answer of a promotion: the live agent after it, and what moved. */
3709
+ interface ShadowVariantPromotion {
3710
+ /** The live agent with the variant's definition as its new version. */
3711
+ agent: AdminAgent;
3712
+ /** The variant, which was deleted: it never goes live itself. */
3713
+ variantId: string;
3714
+ /** The skills that moved to the live agent, ordered by id. */
3715
+ movedSkills: string[];
3716
+ }
3717
+
3718
+ /**
3719
+ * Draws diagrams of fenced code blocks for `nh-assistant-document`, such as ```` ```mermaid ````.
3720
+ * The application supplies it and loads its drawing library lazily inside `render`, so a page
3721
+ * without diagrams never downloads it; the library itself depends on no diagram package.
3722
+ */
3723
+ interface NhAssistantDiagramRenderer {
3724
+ /**
3725
+ * The languages of the fenced code blocks it draws, compared without case, for example
3726
+ * `['mermaid']`. Blocks of other languages stay code.
3727
+ */
3728
+ readonly languages: readonly string[];
3729
+ /**
3730
+ * Draws one diagram as SVG markup. The document sanitizes the result before it shows it, so
3731
+ * scripts, event handlers, foreign content and external references never run or load.
3732
+ * Reject, or throw, with a short reason when the source cannot be drawn: the document then
3733
+ * shows the source with that reason.
3734
+ *
3735
+ * @param source The text of the block, untrusted like the rest of the document.
3736
+ * @param language The block's language in lower case.
3737
+ */
3738
+ render(source: string, language: string): Promise<string>;
3739
+ }
3740
+ /** A heading of the rendered document, in document order, for example for a table of contents. */
3741
+ interface NhAssistantDocumentHeading {
3742
+ /** The element id of the heading in the page, unique per document component. */
3743
+ readonly id: string;
3744
+ /** The fragment that links to it within the document, as in `[Setup](#setup)`. */
3745
+ readonly fragment: string;
3746
+ /** 1 to 6. */
3747
+ readonly level: number;
3748
+ /** The heading as plain text. */
3749
+ readonly text: string;
3750
+ }
3751
+ /**
3752
+ * What a link of the document leads to:
3753
+ * - `document`: another document of the bundle, one of the sibling paths;
3754
+ * - `anchor`: a heading of this document;
3755
+ * - `external`: an `https:`, `http:` or `mailto:` address, which opens in a new tab.
3756
+ */
3757
+ type NhAssistantDocumentLinkKind = 'document' | 'anchor' | 'external';
3758
+ /**
3759
+ * A link the reader activated. For `document` and `anchor` links the document prevents the
3760
+ * browser's navigation: the application opens the sibling document, and the document scrolls
3761
+ * to its own heading. An `external` link opens unless the handler calls
3762
+ * `event.preventDefault()`.
3763
+ */
3764
+ interface NhAssistantDocumentLinkEvent {
3765
+ readonly kind: NhAssistantDocumentLinkKind;
3766
+ /** The address as rendered: the bundle path with its fragment, `#fragment` or the external URL. */
3767
+ readonly href: string;
3768
+ /** The sibling path for a `document` link, otherwise `null`. */
3769
+ readonly path: string | null;
3770
+ /** The fragment without `#`, or `null`. */
3771
+ readonly fragment: string | null;
3772
+ /** The click, so the handler can prevent an external link from opening. */
3773
+ readonly event: MouseEvent;
2852
3774
  }
2853
3775
 
2854
3776
  /** Decides whether the current user may see and use the assistant. */
@@ -3140,6 +4062,19 @@ declare class NhAssistantApiService {
3140
4062
  */
3141
4063
  uploadFile(conversationId: string, file: Blob, name: string): Observable<NhAssistantUploadEvent>;
3142
4064
  decideApproval(conversationId: string, approvalId: string, request: DecideApprovalRequest): Observable<NhAssistantSseEvent>;
4065
+ /**
4066
+ * Answers the question the chat's waiting turn asked with `ask_question` with the index of one of
4067
+ * its choices, and streams the resumed turn like a decision. Only the question's addressee answers;
4068
+ * the server refuses others with `assistant-question-forbidden` and a question whose wait ended with
4069
+ * `assistant-question-expired`.
4070
+ */
4071
+ answerQuestion(conversationId: string, questionId: string, request: AnswerQuestionRequest): Observable<NhAssistantSseEvent>;
4072
+ /**
4073
+ * Resolves an uncertain hand-off of a proposal the caller approved in this chat (`canResolve`):
4074
+ * `hand-to-application` hands it to the application again, `mark-resolved` confirms its outcome.
4075
+ * Returns the conversation as it is afterwards.
4076
+ */
4077
+ resolveApproval(conversationId: string, approvalId: string, request: ResolveApprovalRequest): Observable<Conversation>;
3143
4078
  cancel(conversationId: string): Observable<void>;
3144
4079
  /** Raises the caller's read position to `sequence`, or to the latest message when omitted. */
3145
4080
  markRead(conversationId: string, sequence?: number): Observable<void>;
@@ -3254,6 +4189,23 @@ declare class NhAssistantAdminApiService {
3254
4189
  * on `groups` for an unknown group and with `assistant-shadow-variant` for a shadow variant.
3255
4190
  */
3256
4191
  setAgentGroups(agentId: string, groups: readonly string[]): Observable<AdminAgentGroups>;
4192
+ /**
4193
+ * Every entry of agent metadata the application registers, with the agent's value in effect, where
4194
+ * it comes from and whether it changes here (`GET admin/agents/{id}/metadata`).
4195
+ */
4196
+ getAgentMetadata(agentId: string): Observable<AgentMetadata[]>;
4197
+ /**
4198
+ * Saves the agent's value of one metadata entry after the checks in code: field errors `value` or
4199
+ * `value.<field>`. For an agent created here it makes the agent's next version (`expectedVersion` is
4200
+ * the agent's version); for an agent in code only an editable entry changes, as an override with a
4201
+ * version of its own (`assistant-metadata-read-only` otherwise).
4202
+ */
4203
+ saveAgentMetadata(agentId: string, name: string, request: AgentMetadataRequest): Observable<AgentMetadata>;
4204
+ /**
4205
+ * Removes the agent's stored value of one metadata entry, so an agent in code uses its value in code
4206
+ * again; answers the entry as it is now.
4207
+ */
4208
+ removeAgentMetadata(agentId: string, name: string, expectedVersion: number | null): Observable<AgentMetadata>;
3257
4209
  /** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
3258
4210
  deleteAgent(agentId: string): Observable<void>;
3259
4211
  getMcpServers(): Observable<McpServer[]>;
@@ -3326,6 +4278,17 @@ declare class NhAssistantAdminApiService {
3326
4278
  getAgentReplays(variantId: string): Observable<AgentReplayList>;
3327
4279
  /** The building blocks in code that run settings, skills and triggers defined as data can name. */
3328
4280
  getRunCatalog(): Observable<RunCatalog>;
4281
+ /**
4282
+ * The application's assets an administrator may choose as instructions, without their content
4283
+ * (`GET admin/instruction-assets`). Fails with `assistant-instructions-asset-unavailable` when the
4284
+ * application's source fails.
4285
+ */
4286
+ listInstructionAssets(): Observable<InstructionAssetList>;
4287
+ /**
4288
+ * The text of one asset, read-only, with the hash a reference stores. Fails with
4289
+ * `assistant-instructions-asset-not-found` for an asset or version the application does not have.
4290
+ */
4291
+ getInstructionAsset(assetId: string, version: number): Observable<InstructionAssetText>;
3329
4292
  /**
3330
4293
  * Accounts whose name or e-mail address contains `query` (2 to 100 characters), at most `limit`.
3331
4294
  * Fails with `assistant-account-search-unavailable` when the application offers no search; the
@@ -3356,7 +4319,10 @@ declare class NhAssistantAdminApiService {
3356
4319
  * `assistant-agent-not-found` for an unknown agent.
3357
4320
  */
3358
4321
  getAgentRuns(agentId: string, filter?: Omit<AgentRunFilter, 'agentId'>): Observable<AgentRunHistory>;
3359
- /** Removes the run settings; while data skills or triggers belong to the agent, `assistant-run-settings-in-use`. */
4322
+ /**
4323
+ * Removes the run settings; while data skills, triggers, consultations or hand-offs defined as data
4324
+ * belong to the agent, `assistant-run-settings-in-use`.
4325
+ */
3360
4326
  removeRunSettings(agentId: string, removal?: RunConfigurationRemoval): Observable<void>;
3361
4327
  /**
3362
4328
  * Adds a skill defined as data, which starts in shadow, or stores its next version: with `apply`
@@ -3373,8 +4339,20 @@ declare class NhAssistantAdminApiService {
3373
4339
  discardSkillCandidate(agentId: string, skillId: string, request: SkillCandidateRequest): Observable<void>;
3374
4340
  /** Compares the candidate with the live version on the runs they made in the period. */
3375
4341
  compareSkillCandidate(agentId: string, skillId: string, filter?: SkillComparisonFilter): Observable<SkillComparison>;
3376
- /** Adds a trigger defined as data, which starts in shadow, or changes one in the mode it has. */
4342
+ /**
4343
+ * Adds a trigger defined as data, which starts in shadow, or stores its next version: with `apply`
4344
+ * `live` (default) it takes effect at once in the trigger's mode; with `shadow` it becomes the
4345
+ * candidate that fires next to the live version until it is promoted or discarded.
4346
+ */
3377
4347
  saveDataTrigger(agentId: string, triggerId: string, request: DataTriggerRequest): Observable<DataTrigger>;
4348
+ /** Every version of a trigger defined as data, newest first, with its definition. */
4349
+ getDataTriggerVersions(agentId: string, triggerId: string): Observable<DataTriggerVersion[]>;
4350
+ /** Makes the candidate the live version of its trigger, in the trigger's mode. */
4351
+ promoteTriggerCandidate(agentId: string, triggerId: string, request: TriggerCandidateRequest): Observable<DataTrigger>;
4352
+ /** Discards the candidate of a trigger; it stays as history and fires no more. */
4353
+ discardTriggerCandidate(agentId: string, triggerId: string, request: TriggerCandidateRequest): Observable<void>;
4354
+ /** Compares the trigger's candidate with its live version on the runs they started in the period. */
4355
+ compareTriggerCandidate(agentId: string, triggerId: string, filter?: SkillComparisonFilter): Observable<TriggerComparison>;
3378
4356
  removeDataTrigger(agentId: string, triggerId: string, removal?: RunConfigurationRemoval): Observable<void>;
3379
4357
  /** Puts a trigger defined as data in shadow or live. */
3380
4358
  setDataTriggerShadow(agentId: string, triggerId: string, request: DataTriggerShadowRequest): Observable<DataTrigger>;
@@ -3389,12 +4367,87 @@ declare class NhAssistantAdminApiService {
3389
4367
  * a route outside the ceiling.
3390
4368
  */
3391
4369
  saveDataConsultation(agentId: string, subjectType: string, request: DataConsultationRequest): Observable<DataConsultation>;
4370
+ /**
4371
+ * Switches a consultation defined as data on or off, without a new version. Off, it is not offered,
4372
+ * while its recorded proposals can still be decided. Fails with `assistant-consultation-not-found`
4373
+ * without one and with `assistant-consultation-in-code` for a consultation in code.
4374
+ */
4375
+ setDataConsultationState(agentId: string, subjectType: string, request: DataConsultationStateRequest): Observable<DataConsultation>;
3392
4376
  /**
3393
4377
  * Removes a consultation defined as data: its tools disappear, while its recorded proposals can still
3394
4378
  * be decided. Fails with `assistant-consultation-not-found` without one and with
3395
4379
  * `assistant-consultation-in-code` for a consultation in code.
3396
4380
  */
3397
4381
  removeDataConsultation(agentId: string, subjectType: string, removal?: RunConfigurationRemoval): Observable<void>;
4382
+ /**
4383
+ * The hand-offs the agent accepts, in code and as data with their problems, and what the ceiling in
4384
+ * code (`UseHandOffsAsData`) lets administrators add; `ceiling` is `null` when it may accept none.
4385
+ */
4386
+ getAgentHandOffs(agentId: string): Observable<AgentHandOffs>;
4387
+ /**
4388
+ * Adds or changes the hand-off defined as data that the agent accepts about one subject type, within
4389
+ * the ceiling: in effect once saved, as one in code. An agent the ceiling connects to no agent fails
4390
+ * with `assistant-handoffs-not-allowed`, a type it accepts in code with `assistant-handoff-in-code`,
4391
+ * an agent without run configuration with `assistant-agent-not-configured`, more than the ceiling's
4392
+ * `maxHandOffs` with `assistant-configuration-limit`, a stale `expectedVersion` with
4393
+ * `assistant-version-conflict` and invalid input with field errors, such as `sources: not-allowed`
4394
+ * for a source outside the ceiling.
4395
+ */
4396
+ saveDataHandOff(agentId: string, subjectType: string, request: DataHandOffRequest): Observable<DataHandOff>;
4397
+ /**
4398
+ * Removes a hand-off defined as data; its tool disappears from the sources' next turns. Fails with
4399
+ * `assistant-handoff-not-found` without one and with `assistant-handoff-in-code` for one in code.
4400
+ */
4401
+ removeDataHandOff(agentId: string, subjectType: string, removal?: RunConfigurationRemoval): Observable<void>;
4402
+ /**
4403
+ * The agent's shadow variants, in code and created as data, and whether administrators may create
4404
+ * more (`UseShadowVariantsAsData`). Create a data variant with `createAgent` and `shadowOf`.
4405
+ */
4406
+ getShadowVariants(agentId: string): Observable<AgentShadowVariants>;
4407
+ /**
4408
+ * Promotes the data shadow variant `variantId` onto its live agent (`POST admin/agents/{id}/promote`):
4409
+ * its definition becomes the live agent's next version through the update path, with its checks,
4410
+ * locks and audit, its data skills move along when asked, and the variant is deleted. The live agent
4411
+ * keeps its name, MCP servers, metadata, run settings, triggers, state and shadow mode; an agent in
4412
+ * code takes only the fields it can override. Fails with `assistant-not-shadow-variant`,
4413
+ * `assistant-shadow-variants-not-allowed`, `assistant-version-conflict` and `assistant-skill-in-code`.
4414
+ */
4415
+ promoteShadowVariant(variantId: string, request: ShadowVariantPromotionRequest): Observable<ShadowVariantPromotion>;
4416
+ /**
4417
+ * Exports exactly `agentIds` (1 to 20) as one agent package (`POST admin/agent-packages/export`):
4418
+ * agents created here whole, agents in code as an overlay of what data changes on them; never
4419
+ * history, candidates, runs, run state, shadow overrides, MCP servers, the technical account or
4420
+ * secrets. The options set the package id, version and locks; left out, the id of the package the
4421
+ * first agent is linked to and its next version, otherwise the first agent's id and 1. Answers the
4422
+ * package, its JSON exactly as the server wrote it for the download, and every reference to an agent
4423
+ * outside the selection, which must exist where the package is imported. Fails with
4424
+ * `assistant-agent-not-found` for an unknown agent and with field errors for invalid options; the
4425
+ * server audits the export.
4426
+ */
4427
+ exportAgentPackage(agentIds: readonly string[], options?: AgentPackageExportOptions): Observable<AgentPackageExport>;
4428
+ /**
4429
+ * What importing the package would do, per agent and part (`POST admin/agent-packages/preview`):
4430
+ * `created`, `changed`, `unchanged`, `kept-local`, `left-behind` or `refused` with the field
4431
+ * errors of the save validators, after one check of the whole package against this host as it would
4432
+ * be after the import. Changes nothing. The server reads the package strictly: a package it does not
4433
+ * read fails with `assistant-package-format-unsupported`, one above 1 MB or 20 agents with
4434
+ * `assistant-package-too-large`.
4435
+ */
4436
+ previewAgentPackageImport(agentPackage: AgentPackage, options?: AgentPackageImportOptions): Observable<AgentPackagePreview>;
4437
+ /**
4438
+ * Imports the package in one transaction (`POST admin/agent-packages/import`): every agent and part
4439
+ * of it, or nothing. Fails as `previewAgentPackageImport` does, and with `assistant-package-refused`
4440
+ * and the field error `parts: invalid` when the check refuses a part; preview again to see which part
4441
+ * and why. Every part is audited as its save.
4442
+ */
4443
+ importAgentPackage(agentPackage: AgentPackage, options?: AgentPackageImportOptions): Observable<AgentPackageImport>;
4444
+ /**
4445
+ * Unlinks one part of the agent, or without `part` the whole agent, from its package
4446
+ * (`POST admin/agents/{id}/package/unlink`): its locks no longer hold and the next upgrade keeps it as
4447
+ * `kept-local` unless the import relinks it. Fails with `assistant-package-not-linked` for an agent
4448
+ * or part without a link and with the field error `part: invalid` for an unknown part key.
4449
+ */
4450
+ unlinkAgentPackage(agentId: string, request?: AgentPackageUnlinkRequest): Observable<AgentPackageUnlink>;
3398
4451
  private download;
3399
4452
  private request;
3400
4453
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminApiService, never>;
@@ -3517,7 +4570,9 @@ declare class NhAssistantAgentRunApiService {
3517
4570
  retryRun(runId: string, mode: AgentRunRetryMode): Observable<AgentTriggerReceipt>;
3518
4571
  /**
3519
4572
  * Pending proposals the caller may decide, sorted by expiry, or with `grouped` by parent and subject,
3520
- * with what is new since the caller's last visit (`visitInbox`).
4573
+ * with what is new since the caller's last visit (`visitInbox`). `status` lists the proposals that
4574
+ * wait for the application's report (`awaiting-application`) or for an approver to resolve an
4575
+ * uncertain execution (`execution-unknown`) instead, with the same visibility.
3521
4576
  */
3522
4577
  getInbox(filter?: AgentInboxFilter): Observable<AgentInbox>;
3523
4578
  /**
@@ -3570,6 +4625,11 @@ declare function applyNhAssistantEvent(conversation: Conversation, event: NhAssi
3570
4625
  * closes it, rejected in this conversation, and can no longer be left; the waiting tool call goes on.
3571
4626
  */
3572
4627
  declare function applyNhAssistantApprovalDecision(conversation: Conversation, approvalId: string, decision: ApprovalDecision): Conversation;
4628
+ /**
4629
+ * Records the addressee's answer to a question locally until the server state is reloaded: the
4630
+ * question reads as answered with the chosen index and the turn runs again.
4631
+ */
4632
+ declare function applyNhAssistantQuestionAnswer(conversation: Conversation, questionId: string, choice: number): Conversation;
3573
4633
  /**
3574
4634
  * Applies a live update of another session: `message.created` adds a participant's or the
3575
4635
  * application's message once, where its sequence number puts it; the turn events behave exactly
@@ -3916,6 +4976,13 @@ declare class NhAssistantStore {
3916
4976
  * turn, in an agent thread the server allows them as an approver.
3917
4977
  */
3918
4978
  readonly canDecide: _angular_core.Signal<boolean>;
4979
+ /**
4980
+ * True when the current user may answer the question the open chat waits for: it is addressed to
4981
+ * them and still pending (`ask_question`, `run.AllowQuestions()` on the server).
4982
+ */
4983
+ readonly canAnswer: _angular_core.Signal<boolean>;
4984
+ /** The member a pending question of the open conversation is addressed to, when it is someone else. */
4985
+ readonly questionAddressee: _angular_core.Signal<ConversationMember | null>;
3919
4986
  /** The member whose turn runs or waits in the open conversation, when it is someone else. */
3920
4987
  readonly activeMember: _angular_core.Signal<ConversationMember | null>;
3921
4988
  /** Conversations that need attention: running, waiting for approval or unread. Most recent first. */
@@ -3979,12 +5046,26 @@ declare class NhAssistantStore {
3979
5046
  * repeated calls while a decision is in flight.
3980
5047
  */
3981
5048
  decide(decision: ApprovalDecision, reason?: string, approvalId?: string): void;
5049
+ /**
5050
+ * Answers the question the open chat waits for with the choice at `choice` and streams the resumed
5051
+ * turn, as a decision does. Ignores another question, a question addressed to someone else, a choice
5052
+ * the question does not offer and calls while a turn or a decision is in flight. A refused answer,
5053
+ * such as an expired question, shows its error and reads the conversation again.
5054
+ */
5055
+ answerQuestion(questionId: string, choice: number): void;
3982
5056
  /**
3983
5057
  * Decides a proposal of an agent's run with `POST approvals/{id}/decisions`. An approved deferred
3984
5058
  * proposal executes later as a background operation; an inline one wakes the waiting run. The
3985
5059
  * reloaded snapshot shows the outcome and the proposals that remain open.
3986
5060
  */
3987
5061
  private decideProposal;
5062
+ /**
5063
+ * Resolves an uncertain hand-off in the open chat that the current user approved (`canResolve`):
5064
+ * `hand-to-application` hands it to the application again with a new report deadline,
5065
+ * `mark-resolved` confirms its outcome. The conversation the server returns replaces the shown one.
5066
+ * Ignores approvals the user may not resolve and calls while a decision or a turn is in flight.
5067
+ */
5068
+ resolveApproval(approvalId: string, resolution: ApprovalResolution, reason?: string): Promise<void>;
3988
5069
  /** Asks the server to stop the running turn or to abandon a waiting approval of the open conversation. */
3989
5070
  cancel(): Promise<void>;
3990
5071
  private cancelConversation;
@@ -4117,16 +5198,36 @@ declare class NhAssistantPushService {
4117
5198
  private readonly subscribedState;
4118
5199
  private readonly busyState;
4119
5200
  private readonly openSubject;
5201
+ private readonly openRunSubject;
4120
5202
  private registration?;
4121
5203
  private revision;
4122
5204
  private readonly onWorkerMessage;
4123
5205
  /** The caller's server-side choice, or `null` before it was loaded. */
4124
5206
  readonly settings: _angular_core.Signal<NotificationSettings | null>;
4125
5207
  readonly busy: _angular_core.Signal<boolean>;
4126
- /** Conversations a clicked notification asks to open. */
5208
+ /**
5209
+ * Conversations a clicked notification asks to open; the assistant panel opens them. A
5210
+ * notification about the proposals of a run goes to `openRun$` instead while the application
5211
+ * subscribes to it.
5212
+ */
4127
5213
  readonly openConversation$: Observable<string>;
5214
+ /**
5215
+ * Runs whose proposals a clicked notification is about, for the application to open its inbox of
5216
+ * the run, for example `nh-assistant-agent-inbox` with `[runId]`, which lists every proposal of the
5217
+ * run the person may decide. While the application subscribes, such a click emits the run here
5218
+ * instead of opening the conversation in the panel; without a subscriber it opens the conversation
5219
+ * as before. Subscribe in the application shell, so a notification that opens a new window finds
5220
+ * the subscription.
5221
+ */
5222
+ readonly openRun$: Observable<string>;
4128
5223
  readonly state: _angular_core.Signal<NhAssistantPushState>;
4129
5224
  constructor();
5225
+ /**
5226
+ * Opens what a clicked notification is about: the run through `openRun$` when the notification
5227
+ * names one and the application subscribes, otherwise the conversation through
5228
+ * `openConversation$`. The bundled worker and the panel's notification fragments call it.
5229
+ */
5230
+ openNotification(conversationId: string, runId?: string): void;
4130
5231
  /**
4131
5232
  * Loads the user's choice and, when permission was granted before, renews this browser's
4132
5233
  * subscription, which also moves it to the current user and to a rotated server key.
@@ -4262,6 +5363,12 @@ declare class NhAssistantSubjectSummaryService {
4262
5363
  declare const NH_ASSISTANT_JOIN_FRAGMENT = "nh-assistant-join";
4263
5364
  /** Fragment a clicked notification opens: `#nh-assistant-conversation=<id>`. */
4264
5365
  declare const NH_ASSISTANT_CONVERSATION_FRAGMENT = "nh-assistant-conversation";
5366
+ /**
5367
+ * Fragment a clicked notification about the proposals of a run opens:
5368
+ * `#nh-assistant-run=<runId>.<conversationId>`. The run goes to `NhAssistantPushService.openRun$`
5369
+ * while the application subscribes; otherwise the panel opens the conversation.
5370
+ */
5371
+ declare const NH_ASSISTANT_RUN_FRAGMENT = "nh-assistant-run";
4265
5372
  /** Builds the default invitation link: the current page with the join fragment. */
4266
5373
  declare function nhAssistantShareLink(conversationId: string, token: string): string;
4267
5374
 
@@ -4402,7 +5509,7 @@ declare function nhAssistantCodeKeys(code: string | null | undefined): string[];
4402
5509
  /** Dash-case identifiers as the contract requires for agent and MCP server ids. */
4403
5510
  declare const NH_ASSISTANT_DASH_CASE: RegExp;
4404
5511
 
4405
- type NhAssistantIconName = 'assistant' | 'close' | 'send' | 'stop' | 'plus' | 'list' | 'trash' | 'tool' | 'check' | 'x' | 'warning' | 'chevron-down' | 'clock' | 'settings' | 'admin' | 'edit' | 'refresh' | 'link' | 'page' | 'users' | 'copy' | 'bell' | 'leave' | 'attach' | 'file';
5512
+ type NhAssistantIconName = 'assistant' | 'close' | 'send' | 'stop' | 'plus' | 'list' | 'trash' | 'tool' | 'check' | 'x' | 'warning' | 'chevron-down' | 'clock' | 'settings' | 'admin' | 'edit' | 'refresh' | 'link' | 'page' | 'users' | 'copy' | 'bell' | 'leave' | 'attach' | 'file' | 'lock';
4406
5513
  /**
4407
5514
  * Optional icon classes of the host's icon library, for example `{ close: 'ph ph-x' }`.
4408
5515
  * Icons without a class use the library's small built-in outline glyphs.
@@ -4441,6 +5548,17 @@ interface NhAssistantApprovalChoice {
4441
5548
  approvalId: string;
4442
5549
  decision: ApprovalDecision;
4443
5550
  }
5551
+ /** The answer the user chose for a question of the thread. */
5552
+ interface NhAssistantQuestionAnswer {
5553
+ questionId: string;
5554
+ /** The zero-based index of the chosen answer. */
5555
+ choice: number;
5556
+ }
5557
+ /** How the user resolves the uncertain hand-off of one approval they made in this chat. */
5558
+ interface NhAssistantApprovalResolutionChoice {
5559
+ approvalId: string;
5560
+ resolution: ApprovalResolution;
5561
+ }
4444
5562
  /** Above this number of messages the thread renders through CDK virtual scrolling. */
4445
5563
  declare const NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD = 200;
4446
5564
  /**
@@ -4492,6 +5610,13 @@ declare class NhAssistantThreadComponent {
4492
5610
  readonly approvalDecision: _angular_core.OutputEmitterRef<ApprovalDecision>;
4493
5611
  /** The decision about an approval card together with its approval id. */
4494
5612
  readonly approvalChoice: _angular_core.OutputEmitterRef<NhAssistantApprovalChoice>;
5613
+ /** How the user resolves an uncertain hand-off they approved in this chat, with its approval id. */
5614
+ readonly approvalResolution: _angular_core.OutputEmitterRef<NhAssistantApprovalResolutionChoice>;
5615
+ /**
5616
+ * The answer the user chose for a question addressed to them, for example for
5617
+ * `NhAssistantStore.answerQuestion`. Only the addressee of a pending question gets choice buttons.
5618
+ */
5619
+ readonly questionAnswer: _angular_core.OutputEmitterRef<NhAssistantQuestionAnswer>;
4495
5620
  /**
4496
5621
  * The question to ask again after the viewer connected an MCP server from a connection card: the
4497
5622
  * text of the user message the card answered. The panel sends it.
@@ -4535,12 +5660,18 @@ declare class NhAssistantThreadComponent {
4535
5660
  /** Whether and why the current user may decide an approval card. */
4536
5661
  rightFor(approval: ApprovalPart): NhAssistantApprovalRight;
4537
5662
  choose(approval: ApprovalPart, decision: ApprovalDecision): void;
5663
+ resolveApproval(approval: ApprovalPart, resolution: ApprovalResolution): void;
5664
+ /** Whether the current user may answer the question: it waits and is addressed to them. */
5665
+ canAnswer(question: QuestionPart): boolean;
5666
+ /** The name of the person a question is addressed to, or `null` when the application provides none. */
5667
+ addresseeName(question: QuestionPart): string | null;
5668
+ answerQuestion(question: QuestionPart, choice: number): void;
4538
5669
  /** Display name of another person's message, or `null` when the application provides none. */
4539
5670
  authorName(message: Message): string | null;
4540
5671
  private scrollElement;
4541
5672
  private scrollToEnd;
4542
5673
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantThreadComponent, never>;
4543
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantThreadComponent, "nh-assistant-thread", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "deciding": { "alias": "deciding"; "required": false; "isSignal": true; }; "markdown": { "alias": "markdown"; "required": false; "isSignal": true; }; "members": { "alias": "members"; "required": false; "isSignal": true; }; "currentActorId": { "alias": "currentActorId"; "required": false; "isSignal": true; }; "canDecide": { "alias": "canDecide"; "required": false; "isSignal": true; }; "decisionOwner": { "alias": "decisionOwner"; "required": false; "isSignal": true; }; "approvalRights": { "alias": "approvalRights"; "required": false; "isSignal": true; }; "writingMessageId": { "alias": "writingMessageId"; "required": false; "isSignal": true; }; }, { "approvalDecision": "approvalDecision"; "approvalChoice": "approvalChoice"; "retryMessage": "retryMessage"; }, never, never, true, never>;
5674
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantThreadComponent, "nh-assistant-thread", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "deciding": { "alias": "deciding"; "required": false; "isSignal": true; }; "markdown": { "alias": "markdown"; "required": false; "isSignal": true; }; "members": { "alias": "members"; "required": false; "isSignal": true; }; "currentActorId": { "alias": "currentActorId"; "required": false; "isSignal": true; }; "canDecide": { "alias": "canDecide"; "required": false; "isSignal": true; }; "decisionOwner": { "alias": "decisionOwner"; "required": false; "isSignal": true; }; "approvalRights": { "alias": "approvalRights"; "required": false; "isSignal": true; }; "writingMessageId": { "alias": "writingMessageId"; "required": false; "isSignal": true; }; }, { "approvalDecision": "approvalDecision"; "approvalChoice": "approvalChoice"; "approvalResolution": "approvalResolution"; "questionAnswer": "questionAnswer"; "retryMessage": "retryMessage"; }, never, never, true, never>;
4544
5675
  }
4545
5676
 
4546
5677
  /**
@@ -4582,7 +5713,12 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
4582
5713
  readonly queuedDraft: _angular_core.WritableSignal<string>;
4583
5714
  private resumeAfterEditing;
4584
5715
  readonly validQueuedDraft: _angular_core.Signal<boolean>;
4585
- readonly composerStatus: _angular_core.Signal<"running" | "waiting-for-approval" | null>;
5716
+ readonly composerStatus: _angular_core.Signal<"running" | "waiting-for-approval" | "waiting-for-answer" | null>;
5717
+ /**
5718
+ * Who the composer says the conversation waits for, when it is someone else: the addressee of a
5719
+ * pending question, otherwise the person whose turn waits.
5720
+ */
5721
+ readonly composerStatusActor: _angular_core.Signal<string | null>;
4586
5722
  /** Name of another participant whose turn runs or waits, or `null`. */
4587
5723
  readonly activeMemberName: _angular_core.Signal<string | null>;
4588
5724
  /** The owner and the person who started the turn may stop it. */
@@ -4615,12 +5751,17 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
4615
5751
  cancelQueueEdit(): void;
4616
5752
  /**
4617
5753
  * Opens the panel for an invitation link or a clicked notification in the URL fragment and
4618
- * removes the fragment, so a reload or a shared screenshot does not reuse the token.
5754
+ * removes the fragment, so a reload or a shared screenshot does not reuse the token. A clicked
5755
+ * notification about the proposals of a run goes to `NhAssistantPushService.openRun$` while the
5756
+ * application subscribes, and otherwise opens its conversation.
4619
5757
  */
4620
5758
  private openFromLocation;
4621
5759
  decide(decision: ApprovalDecision): void;
4622
5760
  /** Decides the approval of a card; in an agent thread several proposals can be open. */
4623
5761
  decideApproval(choice: NhAssistantApprovalChoice): void;
5762
+ resolveApproval(choice: NhAssistantApprovalResolutionChoice): void;
5763
+ /** Answers the question the conversation waits for; only its addressee gets the choices. */
5764
+ answerQuestion(answer: NhAssistantQuestionAnswer): void;
4624
5765
  cancel(): void;
4625
5766
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantPanelComponent, never>;
4626
5767
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantPanelComponent, "nh-assistant-panel", never, {}, {}, never, never, true, never>;
@@ -4663,9 +5804,12 @@ declare class NhAssistantComposerComponent {
4663
5804
  readonly busy: _angular_core.InputSignal<boolean>;
4664
5805
  /** Keeps the send action available next to Stop so the host can queue messages. */
4665
5806
  readonly queueWhileBusy: _angular_core.InputSignal<boolean>;
4666
- /** Announces why sending is temporarily unavailable. */
4667
- readonly status: _angular_core.InputSignal<"running" | "waiting-for-approval" | null>;
4668
- /** Name of the participant whose turn runs or waits, when it is someone else. */
5807
+ /**
5808
+ * Announces why sending is temporarily unavailable: a running turn, a turn that waits for an
5809
+ * approval, or one that waits for the answer to a question the agent asked.
5810
+ */
5811
+ readonly status: _angular_core.InputSignal<"running" | "waiting-for-approval" | "waiting-for-answer" | null>;
5812
+ /** Name of the participant whose turn runs or waits, or who answers the question, when it is someone else. */
4669
5813
  readonly statusActor: _angular_core.InputSignal<string | null>;
4670
5814
  /** False when the user may not stop the running turn, such as another participant's turn. */
4671
5815
  readonly canStop: _angular_core.InputSignal<boolean>;
@@ -4747,9 +5891,9 @@ declare class NhAssistantToolCallCardComponent {
4747
5891
  /**
4748
5892
  * Overall state of a run of tool calls, from most to least urgent. `not-executed` means that every
4749
5893
  * call finished and at least one ended without running, because its proposal expired, was
4750
- * withdrawn or became stale.
5894
+ * withdrawn or became stale. `awaiting-answer` waits for the answer to a question the agent asked.
4751
5895
  */
4752
- type NhAssistantToolCallGroupState = 'awaiting-approval' | 'running' | 'failed' | 'not-executed' | 'succeeded';
5896
+ type NhAssistantToolCallGroupState = 'awaiting-approval' | 'awaiting-answer' | 'running' | 'failed' | 'not-executed' | 'succeeded';
4753
5897
  /**
4754
5898
  * Summarizes consecutive tool calls in one collapsed line that counts along live: the
4755
5899
  * tool that runs now while the assistant works, and how many tools were used and failed
@@ -4784,7 +5928,9 @@ declare function formatNhAssistantCountdown(milliseconds: number): string;
4784
5928
  * another agent the assistant consulted (`consultation`) names that agent and the subject, offers the
4785
5929
  * agent's answer and says that approving runs it with the user's own rights; with a
4786
5930
  * `consultation.leaveRoute` a third action leaves it for the subject's approvers (`leave`), after which
4787
- * the card says that it waits for them.
5931
+ * the card says that it waits for them. A proposal the user approved in their chat whose hand-off to the
5932
+ * application has an unknown outcome (`canResolve`) offers to hand it to the application again or to mark
5933
+ * it resolved (`resolve`).
4788
5934
  */
4789
5935
  declare class NhAssistantApprovalCardComponent {
4790
5936
  /** Names the consulted agent as the status does; the card also works outside `provideNhAssistant`. */
@@ -4811,6 +5957,8 @@ declare class NhAssistantApprovalCardComponent {
4811
5957
  */
4812
5958
  readonly canGiveFeedback: _angular_core.InputSignal<boolean>;
4813
5959
  readonly decide: _angular_core.OutputEmitterRef<ApprovalDecision>;
5960
+ /** How the user resolves an uncertain execution they approved in this chat (`canResolve`). */
5961
+ readonly resolve: _angular_core.OutputEmitterRef<ApprovalResolution>;
4814
5962
  private readonly now;
4815
5963
  private readonly submitted;
4816
5964
  /** The decision this card sent last, so a proposal left for the approvers reads as such at once. */
@@ -4854,6 +6002,11 @@ declare class NhAssistantApprovalCardComponent {
4854
6002
  /** The route at the subject the pending proposal may be left for; `null` when it can only be approved or rejected. */
4855
6003
  readonly leaveRoute: _angular_core.Signal<NhAssistantConsultationLeaveRoute | null>;
4856
6004
  readonly leaveHintId: string;
6005
+ /** The user may resolve this uncertain hand-off: the server says so for the person who approved it. */
6006
+ readonly resolvable: _angular_core.Signal<boolean>;
6007
+ readonly resolveDisabled: _angular_core.Signal<boolean>;
6008
+ readonly resolveHintId: string;
6009
+ private readonly resolving;
4857
6010
  readonly countdown: _angular_core.Signal<string>;
4858
6011
  readonly presentedSummary: _angular_core.Signal<string | null>;
4859
6012
  readonly feedbackAvailable: _angular_core.Signal<boolean>;
@@ -4862,6 +6015,8 @@ declare class NhAssistantApprovalCardComponent {
4862
6015
  /** Translation key of the text shown instead of the buttons when the current user cannot decide. */
4863
6016
  readonly waitingKey: _angular_core.Signal<"nh-assistant.approval.waiting-for-approver" | "nh-assistant.approval.waiting-for-other-approver" | "nh-assistant.approval.waiting-for-asker" | "nh-assistant.approval.waiting-for" | "nh-assistant.approval.waiting-for-participant">;
4864
6017
  constructor();
6018
+ /** Emits a resolution of an uncertain hand-off, at most once until the host reports it is done. */
6019
+ chooseResolution(resolution: ApprovalResolution): void;
4865
6020
  /** Emits a decision; `leave` only for a consulted agent's proposal with a route at the subject. */
4866
6021
  choose(decision: ApprovalDecision): void;
4867
6022
  toggleFeedback(): void;
@@ -4869,7 +6024,43 @@ declare class NhAssistantApprovalCardComponent {
4869
6024
  /** Collapses the question and returns focus to the action that opened it. */
4870
6025
  onFeedbackDismissed(): void;
4871
6026
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantApprovalCardComponent, never>;
4872
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantApprovalCardComponent, "nh-assistant-approval-card", never, { "approval": { "alias": "approval"; "required": true; "isSignal": true; }; "deciding": { "alias": "deciding"; "required": false; "isSignal": true; }; "canDecide": { "alias": "canDecide"; "required": false; "isSignal": true; }; "decisionOwner": { "alias": "decisionOwner"; "required": false; "isSignal": true; }; "waitingFor": { "alias": "waitingFor"; "required": false; "isSignal": true; }; "canGiveFeedback": { "alias": "canGiveFeedback"; "required": false; "isSignal": true; }; }, { "decide": "decide"; }, never, never, true, never>;
6027
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantApprovalCardComponent, "nh-assistant-approval-card", never, { "approval": { "alias": "approval"; "required": true; "isSignal": true; }; "deciding": { "alias": "deciding"; "required": false; "isSignal": true; }; "canDecide": { "alias": "canDecide"; "required": false; "isSignal": true; }; "decisionOwner": { "alias": "decisionOwner"; "required": false; "isSignal": true; }; "waitingFor": { "alias": "waitingFor"; "required": false; "isSignal": true; }; "canGiveFeedback": { "alias": "canGiveFeedback"; "required": false; "isSignal": true; }; }, { "decide": "decide"; "resolve": "resolve"; }, never, never, true, never>;
6028
+ }
6029
+
6030
+ /**
6031
+ * A question the agent asked with `ask_question`: the question with one button per choice for the
6032
+ * person it is addressed to (`canAnswer`), and read-only for everyone else, who sees whom it waits
6033
+ * for. It counts down to the end of its wait. Once answered it marks the chosen answer; an expired or
6034
+ * cancelled question says so. An answer is emitted at most once until the host reports that it is no
6035
+ * longer answering.
6036
+ */
6037
+ declare class NhAssistantQuestionCardComponent {
6038
+ readonly question: _angular_core.InputSignal<QuestionPart>;
6039
+ /** True when the current user is the addressee and may answer, for example `NhAssistantStore.canAnswer`. */
6040
+ readonly canAnswer: _angular_core.InputSignal<boolean>;
6041
+ /** Name of the person the question is addressed to, shown to everyone else; `null` when unknown. */
6042
+ readonly addresseeName: _angular_core.InputSignal<string | null>;
6043
+ /** True while the host submits an answer; disables the choices. */
6044
+ readonly answering: _angular_core.InputSignal<boolean>;
6045
+ /** The zero-based index of the chosen answer. */
6046
+ readonly answer: _angular_core.OutputEmitterRef<number>;
6047
+ readonly questionId: string;
6048
+ private readonly now;
6049
+ private readonly submitted;
6050
+ readonly remainingMs: _angular_core.Signal<number>;
6051
+ /** A pending question whose wait ended reads as expired before the server says so. */
6052
+ readonly effectiveStatus: _angular_core.Signal<QuestionStatus>;
6053
+ readonly actionable: _angular_core.Signal<boolean>;
6054
+ readonly statusIcon: _angular_core.Signal<NhAssistantIconName>;
6055
+ readonly disabled: _angular_core.Signal<boolean>;
6056
+ readonly chosen: _angular_core.Signal<number | null>;
6057
+ readonly chosenText: _angular_core.Signal<string | null>;
6058
+ readonly countdown: _angular_core.Signal<string>;
6059
+ constructor();
6060
+ /** Emits the chosen answer once. */
6061
+ choose(index: number): void;
6062
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantQuestionCardComponent, never>;
6063
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantQuestionCardComponent, "nh-assistant-question-card", never, { "question": { "alias": "question"; "required": true; "isSignal": true; }; "canAnswer": { "alias": "canAnswer"; "required": false; "isSignal": true; }; "addresseeName": { "alias": "addresseeName"; "required": false; "isSignal": true; }; "answering": { "alias": "answering"; "required": false; "isSignal": true; }; }, { "answer": "answer"; }, never, never, true, never>;
4873
6064
  }
4874
6065
 
4875
6066
  /** What `nh-assistant-proposal-feedback` stored. */
@@ -5151,6 +6342,61 @@ declare class NhAssistantSubjectBadgeComponent {
5151
6342
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantSubjectBadgeComponent, "nh-assistant-subject-badge", never, { "subjectType": { "alias": "subjectType"; "required": true; "isSignal": true; }; "subjectId": { "alias": "subjectId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
5152
6343
  }
5153
6344
 
6345
+ type DocumentPart = {
6346
+ readonly kind: 'html';
6347
+ readonly html: SafeHtml;
6348
+ } | {
6349
+ readonly kind: 'diagram';
6350
+ readonly language: string;
6351
+ readonly source: string;
6352
+ };
6353
+ /**
6354
+ * Renders an untrusted Markdown document, for example one file of a skill or knowledge bundle,
6355
+ * with the assistant's safety defaults: inline HTML shows as text, images as their alt text, and
6356
+ * a link keeps its address only for a heading of the document, a sibling of the bundle or an
6357
+ * `https:`, `http:` or `mailto:` address; `javascript:`, `data:` and every other scheme show as
6358
+ * text. Relative links resolve from the document's `path` against `siblingPaths`.
6359
+ *
6360
+ * Fenced code blocks of the languages of `diagramRenderer` become diagrams: the application's
6361
+ * renderer draws them, the document sanitizes its SVG and shows it in a shadow root, and a block
6362
+ * it cannot draw shows its source with the reason. Without a renderer they stay code.
6363
+ *
6364
+ * `linkClick` reports every link the reader activates; `headingsChange` the headings once they
6365
+ * are in the page. The texts are `nh-assistant.document.*`, which `provideNhAssistant` merges;
6366
+ * an application without it starts `NhAssistantTranslationMerger` or translates the keys itself.
6367
+ */
6368
+ declare class NhAssistantDocumentComponent {
6369
+ private readonly markdownRenderer;
6370
+ private readonly sanitizer;
6371
+ private readonly host;
6372
+ private readonly idPrefix;
6373
+ /** The document's Markdown. Treated as untrusted. */
6374
+ readonly markdown: _angular_core.InputSignal<string>;
6375
+ /** The document's own path in its bundle, for example `guides/setup.md`. */
6376
+ readonly path: _angular_core.InputSignal<string | null>;
6377
+ /** The paths of the other documents in the bundle that its links may open. */
6378
+ readonly siblingPaths: _angular_core.InputSignal<readonly string[]>;
6379
+ /** Draws the bundle's diagrams; the application loads its drawing library lazily. */
6380
+ readonly diagramRenderer: _angular_core.InputSignal<NhAssistantDiagramRenderer | null>;
6381
+ /** A link the reader activated; see `NhAssistantDocumentLinkEvent`. */
6382
+ readonly linkClick: _angular_core.OutputEmitterRef<NhAssistantDocumentLinkEvent>;
6383
+ /** The headings, in document order, each time they changed and are in the page. */
6384
+ readonly headingsChange: _angular_core.OutputEmitterRef<readonly NhAssistantDocumentHeading[]>;
6385
+ private readonly rendered;
6386
+ /** The headings of the rendered document. */
6387
+ readonly headings: _angular_core.Signal<readonly NhAssistantDocumentHeading[]>;
6388
+ readonly parts: _angular_core.Signal<readonly DocumentPart[]>;
6389
+ constructor();
6390
+ /**
6391
+ * Scrolls to a heading of the document by its fragment and focuses it; false when the
6392
+ * document has no such heading.
6393
+ */
6394
+ scrollToHeading(fragment: string): boolean;
6395
+ onClick(event: MouseEvent): void;
6396
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantDocumentComponent, never>;
6397
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantDocumentComponent, "nh-assistant-document", never, { "markdown": { "alias": "markdown"; "required": true; "isSignal": true; }; "path": { "alias": "path"; "required": false; "isSignal": true; }; "siblingPaths": { "alias": "siblingPaths"; "required": false; "isSignal": true; }; "diagramRenderer": { "alias": "diagramRenderer"; "required": false; "isSignal": true; }; }, { "linkClick": "linkClick"; "headingsChange": "headingsChange"; }, never, never, true, never>;
6398
+ }
6399
+
5154
6400
  /**
5155
6401
  * Translates the first key that has a translation and otherwise returns the fallback text.
5156
6402
  * Used for server-provided keys (agent names, error message keys, result codes) that the
@@ -5318,5 +6564,5 @@ declare class NhAssistantMarkdownPipe implements PipeTransform {
5318
6564
  */
5319
6565
  declare function nhAssistantMediaTypeOf(file: Pick<File, 'name' | 'type'>, acceptedMediaTypes: readonly string[], mappedExtensions?: readonly AgentUploadExtension[] | null): string;
5320
6566
 
5321
- export { NH_ASSISTANT_ACCESS_POLICY, 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_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_RESULT_PREVIEW_LENGTH, 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, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantMcpConnectService, NhAssistantMcpConnectionsComponent, NhAssistantMcpPopupAuthorizationWindow, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, 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 };
5322
- 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, AgentInbox, AgentInboxFilter, AgentInboxGroup, AgentInboxSubjectGroup, AgentInboxVisit, AgentInvalidationCount, AgentLatestRun, AgentObjectAgent, AgentObjectAgents, 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, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSearch, AgentSubjectSearchResult, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectType, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerOutcome, AgentTriggerReceipt, AgentUploadExtension, AgentUploads, ApplicationContext, ApplicationContextVersion, ApplicationMessageDetails, ApplicationMessageLink, ApprovalConsultation, ApprovalDecision, ApprovalPart, ApprovalPolicySummary, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, ApproverSummary, AssistantAccount, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantConfigurationWarning, AssistantDataClassification, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, CodeConsultation, CodeRunSettings, CodeSkill, CodeTrigger, ConnectionRequiredEvent, ConnectionRequiredPart, ConnectionRequiredReason, ConsultationCeiling, ConsultationExposure, ConsultationSubjectRole, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DataConsultation, DataConsultationRequest, DataSkill, DataSkillRequest, DataSkillVersion, DataSkillVersionStatus, DataTrigger, DataTriggerRequest, DataTriggerShadowRequest, DecideApprovalRequest, DirectoryEntry, FileLimits, FilePart, FileReference, 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, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantAttachment, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantConsultationLeaveRoute, NhAssistantConsultationRoute, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantMcpAuthorizationHandle, NhAssistantMcpAuthorizationOutcome, NhAssistantMcpAuthorizationWindow, NhAssistantMcpReturnOutcome, NhAssistantMessageEvent, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantSubjectLinkBuilder, NhAssistantSubjectRef, NhAssistantToolCallGroupState, NhAssistantUpload, NhAssistantUploadEvent, NhAssistantUploadRequest, NotificationSettings, PushSubscriptionRequest, RunBlock, RunCatalog, RunConfigurationProblem, RunConfigurationProblemKind, RunConfigurationRemoval, SendMessageRequest, SetAgentConsultationRoutesRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShareLink, SkillApplyMode, SkillCandidateRequest, SkillComparison, SkillComparisonFilter, SkillComparisonTool, SkillVersionStats, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TriggerConflict, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpConnectionRequest, UpdateMcpToolRequest, NhAssistantPickerOption as ɵNhAssistantPickerOption };
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 };
6568
+ 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 };