@newheap/platform-ai-chat 0.14.0 → 0.16.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
@@ -83,6 +83,16 @@ interface AgentThread {
83
83
  * nobody is notified and nothing proposed in it executes.
84
84
  */
85
85
  shadow?: boolean;
86
+ /**
87
+ * The name of the subject type in the caller's language, such as "Project", when the application
88
+ * named the type; `null` or missing otherwise.
89
+ */
90
+ subjectTypeName?: string | null;
91
+ /**
92
+ * Where the application shows the subject, from the type's link template; `null` or missing
93
+ * without one. `provideNhAssistant({ subjectLinks })` may replace it with a router link.
94
+ */
95
+ subjectLink?: string | null;
86
96
  }
87
97
  interface AgentThreadLookup {
88
98
  thread: AgentThread | null;
@@ -101,6 +111,12 @@ interface AgentProposalDecisionRight {
101
111
  /** One agent on a subject: its thread, `null` before it worked on the subject, and whether the caller may start it. */
102
112
  interface AgentSubjectWorkAgent {
103
113
  agentId: string;
114
+ /**
115
+ * The agent's name: a translation key for an agent in code, the text itself for an agent created in
116
+ * the administration. It names an agent kept out of the chat as well, which the status does not list;
117
+ * missing from servers before it was added.
118
+ */
119
+ displayNameKey?: string | null;
104
120
  thread: AgentThread | null;
105
121
  canStart: boolean;
106
122
  /**
@@ -134,6 +150,16 @@ interface AgentSubjectWork {
134
150
  subjectType: string;
135
151
  subjectId: string;
136
152
  subjectDisplayName: string | null;
153
+ /**
154
+ * The name of the subject type in the caller's language, such as "Project", when the application
155
+ * named the type; `null` or missing otherwise.
156
+ */
157
+ subjectTypeName?: string | null;
158
+ /**
159
+ * Where the application shows the subject, from the type's link template; `null` or missing
160
+ * without one. `provideNhAssistant({ subjectLinks })` may replace it with a router link.
161
+ */
162
+ subjectLink?: string | null;
137
163
  /** The caller's live role. Without a role the server answers `404 assistant-subject-not-found`. */
138
164
  role: Exclude<AgentSubjectRole, 'none'>;
139
165
  agents: AgentSubjectWorkAgent[];
@@ -156,17 +182,216 @@ interface AgentSubjectSummaryList {
156
182
  }
157
183
  /** Maximum number of subjects one `POST subjects/{type}/summary` request accepts. */
158
184
  declare const NH_ASSISTANT_MAX_SUBJECT_SUMMARY = 200;
185
+ /** One subject a search found (`GET subjects/{type}/search`). */
186
+ interface AgentSubjectSearchResult {
187
+ type: string;
188
+ id: string;
189
+ /** The name the application gives the subject; show the id without one. */
190
+ displayName: string | null;
191
+ /** The subject's isolation key: `tenant:…`, `division:…` or `global`. */
192
+ scopeKey: string;
193
+ divisionId: string | null;
194
+ /** Where the application shows the subject; `null` without a link template. */
195
+ link?: string | null;
196
+ }
197
+ /** The subjects of one type a search found that the caller may read, in the application's order. */
198
+ interface AgentSubjectSearch {
199
+ subjectType: string;
200
+ items: AgentSubjectSearchResult[];
201
+ }
202
+ /** The shortest and longest text `searchSubjects` accepts, and the most results it returns. */
203
+ declare const NH_ASSISTANT_SUBJECT_SEARCH: {
204
+ readonly minQueryLength: 2;
205
+ readonly maxQueryLength: 100;
206
+ readonly maxLimit: 50;
207
+ };
208
+ /** The platform's subject type of the whole application, which the server registers itself. */
209
+ declare const NH_ASSISTANT_SYSTEM_SUBJECT_TYPE = "nh-system";
210
+ /** The whole application as one subject, for an agent that works app-wide. */
211
+ declare const NH_ASSISTANT_SYSTEM_GLOBAL_ID = "global";
212
+ /** The most characters of a run's result that `getObjectAgents` returns for its latest run. */
213
+ declare const NH_ASSISTANT_RESULT_PREVIEW_LENGTH = 300;
214
+ /** The newest run of an agent on a subject, with the beginning of its result. */
215
+ interface AgentLatestRun {
216
+ runId: string;
217
+ conversationId: string;
218
+ triggerId: string;
219
+ status: AgentRunStatus;
220
+ failureCode: string | null;
221
+ /** When the run ended, or started, or was queued. */
222
+ at: string;
223
+ /**
224
+ * The first `NH_ASSISTANT_RESULT_PREVIEW_LENGTH` characters of the run's stored answer: model
225
+ * output, to show as text. For a run without one, such as a run that ended before runs kept their
226
+ * answer, the summary it ended with; `null` while the run has none. `getRunResult` returns all of it.
227
+ */
228
+ result: string | null;
229
+ /** The result is longer than `result`. */
230
+ resultTruncated: boolean;
231
+ /** The run worked in the agent's shadow thread, which only administrators see. */
232
+ shadow: boolean;
233
+ }
234
+ /** One agent that works on a subject, as `getObjectAgents` lists it. */
235
+ interface AgentObjectAgent {
236
+ agentId: string;
237
+ /** A translation key for an agent in code, the text itself for one created in the administration. */
238
+ displayNameKey: string;
239
+ descriptionKey: string;
240
+ /** Whether the caller may run the agent on the subject now. */
241
+ canStart: boolean;
242
+ /** The agent's thread about the subject that people open; `null` before it worked on it. */
243
+ conversationId: string | null;
244
+ /** The agent's newest run on the subject; `null` before its first. */
245
+ latestRun: AgentLatestRun | null;
246
+ /** The agent's proposals on the subject that wait for a decision. */
247
+ openProposals: number;
248
+ }
249
+ /**
250
+ * The agents that work on one subject and that the caller may use (`GET subjects/{type}/{id}/agents`),
251
+ * ordered by id. The subject is an object or the whole application.
252
+ */
253
+ interface AgentObjectAgents {
254
+ subjectType: string;
255
+ subjectId: string;
256
+ subjectDisplayName: string | null;
257
+ subjectTypeName?: string | null;
258
+ subjectLink?: string | null;
259
+ /** The caller's live role. Without a role the server answers `404 assistant-subject-not-found`. */
260
+ role: Exclude<AgentSubjectRole, 'none'>;
261
+ agents: AgentObjectAgent[];
262
+ }
263
+ /** The most characters of a run's answer that `getRunResult` returns; a longer answer is cut. */
264
+ declare const NH_ASSISTANT_RUN_RESULT_MAX_LENGTH = 20000;
265
+ /** The most runs one page of a run history holds. */
266
+ declare const NH_ASSISTANT_RUN_HISTORY_MAX_PAGE = 50;
267
+ /**
268
+ * Which runs a run history lists. Every part is optional: an agent, a subject type (`nh-system` for
269
+ * the whole application) or one subject of it, a status, and a period by when runs were created
270
+ * (`from` inclusive, `to` exclusive, ISO 8601). `page` starts at 1; `itemsPerPage` is 1 to
271
+ * `NH_ASSISTANT_RUN_HISTORY_MAX_PAGE` (default 20).
272
+ */
273
+ interface AgentRunFilter {
274
+ agentId?: string;
275
+ subjectType?: string;
276
+ subjectId?: string;
277
+ status?: AgentRunStatus;
278
+ from?: string;
279
+ to?: string;
280
+ page?: number;
281
+ itemsPerPage?: number;
282
+ }
283
+ /**
284
+ * A personal MCP server a background run left out, and why: `assistant-mcp-consent-required` (the
285
+ * person has not allowed background use), `assistant-mcp-connection-required` or
286
+ * `assistant-mcp-reauthorization-required` (the person's connection is missing or ended), or
287
+ * `assistant-mcp-initiator-only` (the run acted for someone other than the person who asked). The
288
+ * person whose consent or connection is missing is told once a day.
289
+ */
290
+ interface AgentRunMcpSkip {
291
+ serverId: string;
292
+ /** The server's name when the run left it out. */
293
+ serverDisplayName: string;
294
+ code: string;
295
+ }
296
+ /** One run in a run history: its agent, subject, trigger, status, usage, times and result preview. */
297
+ interface AgentRunHistoryItem {
298
+ id: string;
299
+ conversationId: string;
300
+ agentId: string;
301
+ /**
302
+ * The agent's name: a translation key for an agent in code, the text itself for one created in the
303
+ * administration; `null` for an agent that no longer exists.
304
+ */
305
+ agentDisplayNameKey?: string | null;
306
+ subjectType: string;
307
+ subjectId: string;
308
+ subjectDisplayName: string | null;
309
+ subjectTypeName?: string | null;
310
+ subjectLink?: string | null;
311
+ triggerId: string;
312
+ status: AgentRunStatus;
313
+ failureClass: string | null;
314
+ failureCode: string | null;
315
+ kind: AgentRunKind;
316
+ skill: string | null;
317
+ initiatorActorId: string | null;
318
+ toolCalls: number;
319
+ modelCalls: number;
320
+ inputTokens: number;
321
+ outputTokens: number;
322
+ proposalCount: number;
323
+ /**
324
+ * The first `NH_ASSISTANT_RESULT_PREVIEW_LENGTH` characters of the run's answer, model output to
325
+ * show as text; for a run without a stored answer, the summary it ended with.
326
+ */
327
+ result: string | null;
328
+ /** The answer is longer than `result`. */
329
+ resultTruncated: boolean;
330
+ /** The run worked in the agent's shadow thread: nothing it proposed executes. */
331
+ shadow: boolean;
332
+ createdAt: string;
333
+ startedAt: string | null;
334
+ endedAt: string | null;
335
+ /** The personal MCP servers the run left out; missing on older servers. */
336
+ mcpConnectionSkips?: AgentRunMcpSkip[];
337
+ }
338
+ /**
339
+ * A page of a run history, newest first (`getRunHistory` for people, the administration's
340
+ * `getAgentRuns` for every run of an agent).
341
+ */
342
+ interface AgentRunHistory {
343
+ items: AgentRunHistoryItem[];
344
+ /** The runs that match the filter and that the caller may see. */
345
+ total: number;
346
+ /**
347
+ * People's history considered only the agent threads with the most recent matching runs; a
348
+ * narrower filter, such as one object or a period, reaches older ones.
349
+ */
350
+ limited: boolean;
351
+ }
352
+ /** One run with its whole result, its proposals and its files (`getRunResult`). */
353
+ interface AgentRunResult {
354
+ run: AgentRunHistoryItem;
355
+ /**
356
+ * The run's whole answer as Markdown, at most `NH_ASSISTANT_RUN_RESULT_MAX_LENGTH` characters:
357
+ * model output, untrusted. Render it only with the assistant's safe Markdown rendering
358
+ * (`nh-assistant-run-result` does), never as HTML. `null` while the run has none.
359
+ */
360
+ result: string | null;
361
+ /** The answer was longer and `result` is its beginning. */
362
+ resultTruncated: boolean;
363
+ /** The bounded summary the run ended with, which the agent's next runs start from. */
364
+ summary: string | null;
365
+ /** The proposals the caller may see: in the run's own thread and placed at objects the caller reads. */
366
+ proposals: AgentProposal[];
367
+ /** The proposals the run placed at objects the caller may not read. */
368
+ hiddenProposals: number;
369
+ /** The files the run saved; `restricted` ones cannot be downloaded by the caller. */
370
+ artifacts: AgentArtifact[];
371
+ /** Whether the caller may open the run's thread conversation. */
372
+ canOpenConversation: boolean;
373
+ }
159
374
  interface StartAgentRequest {
160
375
  agentId: string;
161
376
  subjectType: string;
162
377
  subjectId: string;
163
378
  message?: string | null;
164
379
  }
380
+ /**
381
+ * What became of a start by hand (`POST threads/start`, `POST runs/{id}/retry` with `restart`):
382
+ * `started`, `queued`, `coalesced` with a run about to start, `superseded` the current run,
383
+ * `ignored` or `deduplicated`; `waiting` while the agent or its skill is paused (`reasonCode`
384
+ * `assistant-agent-paused` or `assistant-skill-paused`), so the run starts when it resumes; and
385
+ * `deferred` until the application's transaction commits, without a run or thread yet. A refused
386
+ * start is an HTTP error with its code, never a receipt.
387
+ */
388
+ type AgentTriggerOutcome = 'started' | 'queued' | 'coalesced' | 'superseded' | 'ignored' | 'deduplicated' | 'waiting' | 'deferred';
165
389
  interface AgentTriggerReceipt {
166
390
  triggerId: string;
167
- outcome: 'started' | 'queued' | 'coalesced' | 'superseded' | 'ignored' | 'deduplicated' | 'rejected';
391
+ outcome: AgentTriggerOutcome;
168
392
  runId: string | null;
169
393
  conversationId: string | null;
394
+ /** Why the run did not start yet, such as `assistant-agent-paused` with `waiting`; `null` otherwise. */
170
395
  reasonCode: string | null;
171
396
  }
172
397
  interface AgentProposal {
@@ -179,6 +404,16 @@ interface AgentProposal {
179
404
  subjectType: string;
180
405
  subjectId: string;
181
406
  subjectDisplayName: string | null;
407
+ /**
408
+ * The name of the subject type in the caller's language, such as "Project", when the application
409
+ * named the type; `null` or missing otherwise.
410
+ */
411
+ subjectTypeName?: string | null;
412
+ /**
413
+ * Where the application shows the subject, from the type's link template; `null` or missing
414
+ * without one. `provideNhAssistant({ subjectLinks })` may replace it with a router link.
415
+ */
416
+ subjectLink?: string | null;
182
417
  toolId: string;
183
418
  summary: string;
184
419
  /**
@@ -248,6 +483,29 @@ interface AgentProposal {
248
483
  * Missing on older servers.
249
484
  */
250
485
  rationale?: string | null;
486
+ /**
487
+ * The run that placed this proposal here from another subject, such as a run for the whole
488
+ * application; `null` for a proposal made in this thread. Missing on older servers.
489
+ */
490
+ placedBy?: AgentProposalOrigin | null;
491
+ }
492
+ /**
493
+ * The run that placed a proposal at another object than its own, and the thread it ran in. Its subject
494
+ * is named only for the whole application (`subjectType` `nh-system`); for another object only its kind
495
+ * is known, because a reader of this object may not read that one.
496
+ */
497
+ interface AgentProposalOrigin {
498
+ /** The thread of the run that placed the proposal; opening it checks the reader's access. */
499
+ conversationId: string;
500
+ runId: string | null;
501
+ /** The run's subject type; `null` when its thread no longer exists. */
502
+ subjectType: string | null;
503
+ /** The run's subject id for the whole application (`global` or `division-…`); `null` otherwise. */
504
+ subjectId?: string | null;
505
+ /** The name of the whole application or its division in the caller's language; `null` otherwise. */
506
+ subjectDisplayName?: string | null;
507
+ /** The name of the run's subject type in the caller's language, when the application named it. */
508
+ subjectTypeName?: string | null;
251
509
  }
252
510
  /** An application object a proposal changes, such as `{ type: 'project-task', id: '4711' }`. */
253
511
  interface AgentProposalObject {
@@ -355,6 +613,89 @@ interface AgentArtifact {
355
613
  type AgentRunRetryMode = 'resume' | 'restart';
356
614
  /** `re-execute` runs the proposal again; `mark-resolved` confirms its outcome without running it. */
357
615
  type AgentExecutionResolution = 're-execute' | 'mark-resolved';
616
+ /** A board of a group of agents the caller may open (`getBoards`). */
617
+ interface AgentBoardSummary {
618
+ /** The group id, such as `project-management`. */
619
+ id: string;
620
+ /** The group's name in the request's language. */
621
+ name: string;
622
+ /** What the group's agents do, when the application described it. */
623
+ description: string | null;
624
+ /** How many of the group's agents the caller sees on its board. */
625
+ agentCount: number;
626
+ }
627
+ /** The boards the caller may open, ordered by name. */
628
+ interface AgentBoardList {
629
+ items: AgentBoardSummary[];
630
+ }
631
+ /** A kind of object as a board names it. */
632
+ interface AgentBoardSubjectType {
633
+ id: string;
634
+ /** The name of one object in the request's language; the id without a name. */
635
+ name: string;
636
+ /** The name of several objects, when the application gave one. */
637
+ pluralName: string | null;
638
+ }
639
+ /** What an agent on a board works on. */
640
+ interface AgentBoardWorksOn {
641
+ /** Every kind of object. */
642
+ allObjects: boolean;
643
+ /** The whole application. */
644
+ application: boolean;
645
+ /** Per division instead of app-wide. */
646
+ perDivision: boolean;
647
+ /** The kinds of objects it names, by id. */
648
+ subjectTypes: AgentBoardSubjectType[];
649
+ }
650
+ /** One agent on a board. */
651
+ interface AgentBoardAgent {
652
+ agentId: string;
653
+ /** A translation key for an agent in code, the text itself for one created in the administration. */
654
+ displayNameKey: string;
655
+ descriptionKey: string;
656
+ worksOn: AgentBoardWorksOn;
657
+ /**
658
+ * `nh-system` when the agent works on the whole application in the board's scope; `null` for an
659
+ * agent without such work there, which the board shows without a result or a start.
660
+ */
661
+ subjectType: string | null;
662
+ /** `global` for an app-wide agent, `division-…` for a per-division agent on a division's board. */
663
+ subjectId: string | null;
664
+ /** The name of that subject in the request's language. */
665
+ subjectDisplayName: string | null;
666
+ /** Whether the caller may run the agent for that subject now. */
667
+ canStart: boolean;
668
+ /** The agent's thread of that subject, when the caller may open it. */
669
+ conversationId: string | null;
670
+ /** The agent's newest run for that subject; `null` before its first. */
671
+ latestRun: AgentLatestRun | null;
672
+ /** The open proposals of that thread. */
673
+ openProposals: number;
674
+ /**
675
+ * Whether the latest run ended, or a proposal was made, after the caller's last visit of the board
676
+ * in this scope; before the first visit everything shown is new.
677
+ */
678
+ isNew: boolean;
679
+ }
680
+ /** The board of one group in one scope (`getBoard`). */
681
+ interface AgentBoard {
682
+ id: string;
683
+ name: string;
684
+ description: string | null;
685
+ /** `global`, or `division:{id}` for the board of one division. */
686
+ scopeKey: string;
687
+ divisionId: string | null;
688
+ /** When the caller last looked at this board in this scope, before this read; `null` before the first visit. */
689
+ lastVisitedAt: string | null;
690
+ /** The group's agents the caller sees, ordered by id. */
691
+ agents: AgentBoardAgent[];
692
+ }
693
+ /** A recorded visit of a board (`visitBoard`). */
694
+ interface AgentBoardVisit {
695
+ groupId: string;
696
+ scopeKey: string;
697
+ visitedAt: string;
698
+ }
358
699
 
359
700
  interface AssistantStatus {
360
701
  enabled: boolean;
@@ -386,6 +727,33 @@ interface AgentSummary {
386
727
  displayNameKey: string;
387
728
  descriptionKey: string;
388
729
  canMutate: boolean;
730
+ /**
731
+ * What people may attach to a message to this agent; `null` or missing when they can attach
732
+ * nothing: the application keeps no files for the assistant, accepts no uploads, or the agent
733
+ * accepts no files.
734
+ */
735
+ uploads?: AgentUploads | null;
736
+ }
737
+ /** What people may upload with `POST conversations/{id}/files` and attach to one message to an agent. */
738
+ interface AgentUploads {
739
+ /** Lowercase media types, for example `application/pdf`. */
740
+ acceptedMediaTypes: string[];
741
+ /** The largest file in bytes. */
742
+ maxFileBytes: number;
743
+ /** The most files of one message. */
744
+ maxFiles: number;
745
+ }
746
+ /**
747
+ * A file the application keeps, as the upload endpoint returns it and a message names it in
748
+ * `files`. It never carries content.
749
+ */
750
+ interface FileReference {
751
+ id: string;
752
+ name: string;
753
+ mediaType: string;
754
+ size: number;
755
+ /** The application's hash of the content, when it keeps one. */
756
+ hash?: string | null;
389
757
  }
390
758
  interface ConversationSummary {
391
759
  id: string;
@@ -437,6 +805,10 @@ interface ConversationThread {
437
805
  role: AgentSubjectRole;
438
806
  /** Each open proposal of the thread and whether the caller may decide it now, oldest first. */
439
807
  decisions: ConversationThreadDecision[];
808
+ /** The name of the subject type in the caller's language, when the application named it. */
809
+ subjectTypeName?: string | null;
810
+ /** Where the application shows the subject, when the type has a link template. */
811
+ subjectLink?: string | null;
440
812
  }
441
813
  /**
442
814
  * The caller's right to decide one open proposal of an agent thread, checked like the decision
@@ -482,7 +854,33 @@ interface Message {
482
854
  * `rule` for an assistant message the agent's rules wrote without a model.
483
855
  */
484
856
  type MessageAuthorKind = 'person' | 'trigger' | 'rule';
485
- type MessagePart = TextPart | ToolCallPart | ApprovalPart;
857
+ type MessagePart = TextPart | ToolCallPart | ApprovalPart | ConnectionRequiredPart | FilePart;
858
+ /**
859
+ * A file a person attached to a message: its name, media type and size in bytes, never its content.
860
+ * The application keeps the file; a later turn opens it again with the rights of that turn.
861
+ */
862
+ interface FilePart {
863
+ type: 'file';
864
+ name: string;
865
+ mediaType: string;
866
+ size: number;
867
+ }
868
+ /**
869
+ * Why a turn asks the person to connect an MCP server: never connected, the connection ended, or
870
+ * the server asked for permissions the connection lacks.
871
+ */
872
+ type ConnectionRequiredReason = 'not-connected' | 'reauthorization-required' | 'insufficient-scope';
873
+ /**
874
+ * An MCP server, which each person connects to with their own account, that the person who asked had
875
+ * to connect before the agent could use it. The turn went on without its tools; the card connects
876
+ * the viewer's own account.
877
+ */
878
+ interface ConnectionRequiredPart {
879
+ type: 'connection-required';
880
+ serverId: string;
881
+ displayName: string;
882
+ reason: ConnectionRequiredReason;
883
+ }
486
884
  interface TextPart {
487
885
  type: 'text';
488
886
  text: string;
@@ -594,6 +992,8 @@ interface SendMessageRequest {
594
992
  clientMessageId: string;
595
993
  /** Page context of this message; `null` when the user left it out. */
596
994
  clientContext?: ClientContext | null;
995
+ /** Files the person attaches, as `POST conversations/{id}/files` returned them. */
996
+ files?: FileReference[];
597
997
  }
598
998
  type ApprovalDecision = 'approve' | 'reject';
599
999
  /** Body of `POST conversations/{id}/approvals/{approvalId}/decide`. */
@@ -654,6 +1054,12 @@ interface ToolCompletedEvent {
654
1054
  resultPreview: string | null;
655
1055
  }
656
1056
  type ApprovalRequiredEvent = ApprovalPart;
1057
+ /** The person who asked has to connect an MCP server before the agent can use it. */
1058
+ interface ConnectionRequiredEvent {
1059
+ serverId: string;
1060
+ displayName: string;
1061
+ reason: ConnectionRequiredReason;
1062
+ }
657
1063
  type TurnCompletionStatus = 'completed' | 'waiting-for-approval' | 'cancelled' | 'failed';
658
1064
  interface TurnUsage {
659
1065
  inputTokens: number;
@@ -670,6 +1076,12 @@ interface AssistantErrorEvent {
670
1076
  code: string;
671
1077
  messageKey: string;
672
1078
  }
1079
+ /**
1080
+ * The server accepted a message for the next run of the agent that works in the thread, with its
1081
+ * files, instead of starting a turn: it answered `202` with the trigger receipt. The client emits it
1082
+ * in place of a stream, which then ends; a server never streams it.
1083
+ */
1084
+ type MessageQueuedEvent = AgentTriggerReceipt;
673
1085
  /** Map from SSE event name to its data payload. */
674
1086
  interface NhAssistantSseEventMap {
675
1087
  'turn.started': TurnStartedEvent;
@@ -677,6 +1089,7 @@ interface NhAssistantSseEventMap {
677
1089
  'tool.started': ToolStartedEvent;
678
1090
  'tool.completed': ToolCompletedEvent;
679
1091
  'approval.required': ApprovalRequiredEvent;
1092
+ 'connection.required': ConnectionRequiredEvent;
680
1093
  'turn.completed': TurnCompletedEvent;
681
1094
  'error': AssistantErrorEvent;
682
1095
  }
@@ -688,6 +1101,14 @@ type NhAssistantSseEvent = {
688
1101
  data: NhAssistantSseEventMap[K];
689
1102
  };
690
1103
  }[NhAssistantSseEventType];
1104
+ /**
1105
+ * What `NhAssistantApiService.sendMessage` emits: the events of the turn it started, or, when the
1106
+ * message waits for the next run of the agent working in the thread, one `message.queued` event.
1107
+ */
1108
+ type NhAssistantMessageEvent = NhAssistantSseEvent | {
1109
+ type: 'message.queued';
1110
+ data: MessageQueuedEvent;
1111
+ };
691
1112
  declare const NH_ASSISTANT_SSE_EVENT_TYPES: readonly NhAssistantSseEventType[];
692
1113
  /**
693
1114
  * Stable client-side failure codes. The client emits these as `error` events when the
@@ -706,6 +1127,10 @@ declare const NhAssistantClientErrorCodes: {
706
1127
  readonly server: "assistant-server";
707
1128
  /** The open conversation was deleted by its owner, or the user left or was removed. */
708
1129
  readonly conversationRemoved: "assistant-conversation-removed";
1130
+ /** The person closed the authorization window of an MCP connection before it finished. */
1131
+ readonly mcpAuthorizationCancelled: "assistant-mcp-authorization-cancelled";
1132
+ /** The browser blocked the authorization window of an MCP connection. */
1133
+ readonly mcpPopupBlocked: "assistant-mcp-popup-blocked";
709
1134
  };
710
1135
  type NhAssistantClientErrorCode = typeof NhAssistantClientErrorCodes[keyof typeof NhAssistantClientErrorCodes];
711
1136
 
@@ -745,6 +1170,14 @@ interface LiveAgentWorkChanged {
745
1170
  subjectType: string;
746
1171
  subjectId: string;
747
1172
  }
1173
+ /**
1174
+ * The hub's answer to `WatchAgentWork`: how many agents' work of the whole application the connection
1175
+ * follows now, and when to renew the watch so the server checks the person's rights again.
1176
+ */
1177
+ interface LiveAgentWorkWatch {
1178
+ watched: number;
1179
+ refreshAfterSeconds: number;
1180
+ }
748
1181
  /**
749
1182
  * `ConversationEvent`: one turn event with the same `type` and `data` as the server-sent events
750
1183
  * of the starting request, or `message.created` with a `Message` when a participant's message
@@ -767,6 +1200,38 @@ interface AssistantPreferences {
767
1200
  /** At most 1,000 characters. Steers style only; it never overrides the fixed rules. */
768
1201
  customInstructions: string | null;
769
1202
  }
1203
+ /**
1204
+ * An MCP server that agents may use in background runs with the caller's own account once the
1205
+ * caller allows it (`GET mcp-connections`). The consent holds for the server as it is configured
1206
+ * now; a changed address or authentication shows it as not allowed again.
1207
+ */
1208
+ interface McpConnection {
1209
+ serverId: string;
1210
+ displayName: string;
1211
+ /** The server's host name, for example `planning.example.org`. */
1212
+ host: string;
1213
+ allowBackgroundUse: boolean;
1214
+ /** When the caller allowed it; `null` while not allowed. */
1215
+ consentedAt: string | null;
1216
+ /** The agents the caller may use that have the server. */
1217
+ agentIds: string[];
1218
+ /**
1219
+ * For a server each person connects to with OAuth: the caller's connection; `null` for a server
1220
+ * that forwards the caller's sign-in.
1221
+ */
1222
+ connectionStatus: McpConnectionStatus | null;
1223
+ /** The scopes the caller's connection grants. */
1224
+ grantedScopes: string | null;
1225
+ /** Scopes the server asked for that the connection lacks; connecting again adds them. */
1226
+ requiredScopes: string | null;
1227
+ connectedAt: string | null;
1228
+ /** Whether background use is offered for the server at all. */
1229
+ offersBackgroundUse: boolean;
1230
+ }
1231
+ /** Body of `PUT mcp-connections/{serverId}`. */
1232
+ interface UpdateMcpConnectionRequest {
1233
+ allowBackgroundUse: boolean;
1234
+ }
770
1235
  interface ApplicationContext {
771
1236
  text: string;
772
1237
  version: number;
@@ -791,6 +1256,12 @@ interface ToolCatalogEntry {
791
1256
  source: 'local' | 'bridge' | 'mcp';
792
1257
  effect: ToolCatalogEffect;
793
1258
  description: string;
1259
+ /**
1260
+ * The object type a call of the tool names (`[NhAiSubject]`): a run places its proposal for another
1261
+ * object at that object. `null` when the tool declares none, as MCP tools never do; their proposals
1262
+ * stay in the run's own thread. Missing on older servers.
1263
+ */
1264
+ subjectType?: string | null;
794
1265
  }
795
1266
  /** Equals `NhAiAutonomyLevel`. */
796
1267
  type AssistantAutonomy = 'observe' | 'explain' | 'propose' | 'simulate' | 'execute';
@@ -808,6 +1279,51 @@ interface AdminAgentInput {
808
1279
  * resume an agent with `setAgentState`. A new agent starts active.
809
1280
  */
810
1281
  isEnabled?: boolean;
1282
+ /**
1283
+ * Whether people can choose an agent created in the administration in the chat. Omitted keeps it on
1284
+ * update; a new agent is offered. An agent that is not offered keeps working on its triggers.
1285
+ */
1286
+ offeredInChat?: boolean;
1287
+ /**
1288
+ * The object types an agent created in the administration works on, from the run catalog's
1289
+ * `subjectTypes`, at most 20. What an agent works on is sent together: omitting all of
1290
+ * `worksOnSubjectTypes`, `worksOnAllSubjects`, `worksOnApplication`, `perDivision`, `runPolicy`
1291
+ * and `viewPolicy` keeps it on update and lets a new agent work on all object types. Agents in
1292
+ * code take it from their code.
1293
+ */
1294
+ worksOnSubjectTypes?: string[];
1295
+ /** The agent works on every object type; not next to `worksOnSubjectTypes`. */
1296
+ worksOnAllSubjects?: boolean;
1297
+ /** The agent works on the whole application. */
1298
+ worksOnApplication?: boolean;
1299
+ /**
1300
+ * The agent works per division; only when the run catalog reports `divisions`. Its work for the
1301
+ * whole application, such as a schedule without a subject set, then runs once per listed division.
1302
+ */
1303
+ perDivision?: boolean;
1304
+ /** Who may run the agent for the whole application, from the run catalog's `agentPolicies`; `null`: the administration policy. */
1305
+ runPolicy?: string | null;
1306
+ /** Who sees its results for the whole application, from the run catalog's `agentPolicies`; `null`: the agent's required policy. */
1307
+ viewPolicy?: string | null;
1308
+ /**
1309
+ * On create only: the new agent starts off, so its events, schedules and other triggers are
1310
+ * ignored until someone switches it on with `setAgentState`. Omitted starts it active; ignored on
1311
+ * update.
1312
+ */
1313
+ startsOff?: boolean;
1314
+ /**
1315
+ * For an agent created in the administration: the model profile of its model calls, one of the run
1316
+ * catalog's `profiles` (`profile: not-found` otherwise). Omitted keeps it on update; a new agent uses
1317
+ * the application's chat profile. Agents in code take it from their code.
1318
+ */
1319
+ profile?: string | null;
1320
+ /**
1321
+ * For an agent created in the administration: the classification of the data its model calls carry,
1322
+ * in people's chats with it and in its runs (`dataClassification: invalid` for another value). A
1323
+ * skill's own wins. Omitted keeps it on update; a new agent has none, so its calls are `internal`.
1324
+ * Agents in code take it from their code.
1325
+ */
1326
+ dataClassification?: AssistantDataClassification | null;
811
1327
  }
812
1328
  /** Body of `PUT admin/agents/{id}`. */
813
1329
  type UpdateAdminAgentRequest = AdminAgentInput & {
@@ -815,10 +1331,13 @@ type UpdateAdminAgentRequest = AdminAgentInput & {
815
1331
  };
816
1332
  /**
817
1333
  * The run state of an agent. `paused`: no new runs; events wait and run after the resume.
818
- * `stopped`: active runs were cancelled and events are refused. `configured-off`: disabled in the
819
- * application's code until the next deployment; it cannot be resumed here.
1334
+ * `stopped`: active runs were cancelled and events are refused. `off`: events, schedules and other
1335
+ * triggers are ignored and nothing waits, while running runs finish, proposals stay decidable and
1336
+ * people still chat with it and start it by hand; switching it on replays nothing.
1337
+ * `configured-off`: disabled in the application's code until the next deployment; it cannot be
1338
+ * resumed here.
820
1339
  */
821
- type AgentRunState = 'active' | 'paused' | 'stopped' | 'configured-off';
1340
+ type AgentRunState = 'active' | 'paused' | 'stopped' | 'off' | 'configured-off';
822
1341
  interface AdminAgent extends AdminAgentInput {
823
1342
  /** `false` while the agent is stopped; read `runState` for the full state. */
824
1343
  isEnabled: boolean;
@@ -841,6 +1360,54 @@ interface AdminAgent extends AdminAgentInput {
841
1360
  shadow?: AgentShadowState | null;
842
1361
  /** The technical account that answers for the agent's new runs; null when it answers to none. */
843
1362
  serviceAccount?: AgentServiceAccountState | null;
1363
+ /**
1364
+ * Whether people can choose the agent in the chat; missing means offered. Agents in code decide
1365
+ * it with `HideFromChat()`.
1366
+ */
1367
+ offeredInChat?: boolean;
1368
+ /**
1369
+ * Whether the agent says what it works on: always for an agent created here, for an agent in code
1370
+ * only with `WorksOn`, `WorksOnAllObjects` or `WorksOnApplication`. An agent that does not say
1371
+ * works on all object types; missing on older servers.
1372
+ */
1373
+ worksOnDeclared?: boolean;
1374
+ /**
1375
+ * The object types the agent is known to work on, as a hint next to "All objects": those it
1376
+ * accepts hand-offs and consultations about, those its triggers name and those of its threads.
1377
+ */
1378
+ knownSubjectTypes?: string[];
1379
+ /**
1380
+ * The groups of agents the agent is in now, by id: an administrator's choice per group, otherwise
1381
+ * its `InGroup` in code; missing on older servers. Change them with `setAgentGroups`.
1382
+ */
1383
+ groups?: string[];
1384
+ /** The groups the agent joins in code, by id; empty for an agent created here. */
1385
+ codeGroups?: string[];
1386
+ /**
1387
+ * The model profile of the agent's model calls: from its code, or chosen here for an agent created
1388
+ * here; missing on older servers.
1389
+ */
1390
+ profile?: string;
1391
+ /**
1392
+ * The classification of the data the agent's model calls carry: from its code, or chosen here for
1393
+ * an agent created here; `null` when it has none, so its calls are `internal`. Missing on older
1394
+ * servers.
1395
+ */
1396
+ dataClassification?: AssistantDataClassification | null;
1397
+ /**
1398
+ * Why the agent, saved and in effect, may still not work as configured (`AssistantConfigurationWarning`):
1399
+ * `classification-not-permitted` when neither its model profile nor the profile's fallbacks permit
1400
+ * its classification. A warning never refuses a save; missing on older servers.
1401
+ */
1402
+ warnings?: AssistantConfigurationWarning[];
1403
+ }
1404
+ /** The groups one agent is in, as `setAgentGroups` answers. */
1405
+ interface AdminAgentGroups {
1406
+ agentId: string;
1407
+ /** The groups the agent is in now, by id. */
1408
+ groups: string[];
1409
+ /** The groups it joins in code, by id. */
1410
+ codeGroups: string[];
844
1411
  }
845
1412
  /** The shadow modes an administrator chooses; `code` lets the mode in code decide again. */
846
1413
  type AgentShadowMode = 'shadow' | 'live' | 'code';
@@ -877,7 +1444,7 @@ interface AgentServiceAccountState {
877
1444
  interface AgentSkillState {
878
1445
  skillId: string;
879
1446
  description: string;
880
- runState: 'active' | 'paused' | 'stopped';
1447
+ runState: 'active' | 'paused' | 'stopped' | 'off';
881
1448
  changedAt: string | null;
882
1449
  changedBy: string | null;
883
1450
  reason: string | null;
@@ -925,13 +1492,142 @@ interface SetAgentServiceAccountRequest {
925
1492
  /** Optional, at most 500 characters. */
926
1493
  reason?: string | null;
927
1494
  }
928
- /** Body of `POST admin/agents/{id}/state`. `active` resumes the agent. */
1495
+ /** Body of `POST admin/agents/{id}/state`. `active` resumes the agent or switches it on. */
929
1496
  interface SetAgentStateRequest {
930
- state: 'active' | 'paused' | 'stopped';
1497
+ state: 'active' | 'paused' | 'stopped' | 'off';
931
1498
  /** Optional, at most 500 characters. */
932
1499
  reason?: string | null;
933
1500
  }
934
- type McpAuthMode = 'none' | 'bearer' | 'api-key' | 'forward-user-token';
1501
+ /**
1502
+ * The built-in authentication modes. `oauth` connects with the authorization code flow: once for the
1503
+ * organization or once per person (`McpConnectionScope`). `oauth-client-credentials` connects the
1504
+ * organization with the host's own client credentials.
1505
+ */
1506
+ type McpBuiltInAuthMode = 'none' | 'bearer' | 'api-key' | 'basic' | 'forward-user-token' | 'oauth' | 'oauth-client-credentials';
1507
+ /**
1508
+ * The authentication mode of a server: a built-in mode, or a mode the application registered in code
1509
+ * (`AddMcpCredentialProvider`), which `NhAssistantAdminApiService.getMcpAuthModes` lists.
1510
+ */
1511
+ type McpAuthMode = McpBuiltInAuthMode | (string & {});
1512
+ /**
1513
+ * An authentication mode the application registered in code. Its provider supplies the credential, so
1514
+ * a server of the mode takes no secret, user name or OAuth settings in the editor. `organization`: one
1515
+ * credential every caller shares, which may serve background runs (`headlessUse: organization`);
1516
+ * `person`: each person's own credential, which serves only that person's background runs with their
1517
+ * consent (`headlessUse: personal`).
1518
+ */
1519
+ interface McpCustomAuthMode {
1520
+ mode: string;
1521
+ ownership: 'organization' | 'person';
1522
+ }
1523
+ /** For `oauth`: one connection for everyone (`organization`), or each person connects (`user`). */
1524
+ type McpConnectionScope = 'organization' | 'user';
1525
+ /** The state of an OAuth connection; it never carries tokens. */
1526
+ type McpConnectionStatus = 'not-connected' | 'active' | 'reauthorization-required' | 'issuer-changed';
1527
+ /**
1528
+ * OAuth settings of a server. Omitted or `null` values keep the stored value, `""` clears it.
1529
+ * `clientSecret` is write-only. `confirmAuthorization` runs discovery again and pins the
1530
+ * authorization server and resource it finds; a new OAuth server and a changed address need it.
1531
+ */
1532
+ interface McpOAuthInput {
1533
+ clientId?: string | null;
1534
+ clientSecret?: string | null;
1535
+ clientSecretReference?: string | null;
1536
+ /** Space-separated scopes the host may request; empty leaves the choice to the authorization server. */
1537
+ scopes?: string | null;
1538
+ /** Which account the organization connects, shown to everyone using it; required for an organization `oauth` server. */
1539
+ organizationAccountLabel?: string | null;
1540
+ confirmAuthorization?: boolean;
1541
+ }
1542
+ /** The OAuth settings of a server as returned: never the client secret. */
1543
+ interface McpOAuthSettings {
1544
+ clientId: string | null;
1545
+ hasClientSecret: boolean;
1546
+ clientSecretReference: string | null;
1547
+ scopes: string | null;
1548
+ organizationAccountLabel: string | null;
1549
+ }
1550
+ /** The authorization server and resource an administrator confirmed. */
1551
+ interface McpAuthorization {
1552
+ issuer: string;
1553
+ resource: string;
1554
+ confirmedAt: string;
1555
+ confirmedBy: string | null;
1556
+ }
1557
+ /** The organization's OAuth connection of a server, without tokens. */
1558
+ interface McpOrganizationConnection {
1559
+ status: McpConnectionStatus;
1560
+ connectedAt: string | null;
1561
+ connectedBy: string | null;
1562
+ grantedScopes: string | null;
1563
+ requiredScopes: string | null;
1564
+ accessTokenExpiresAt: string | null;
1565
+ lastFailureCode: string | null;
1566
+ }
1567
+ /** Body of `POST admin/mcp-servers/discover`. */
1568
+ interface McpDiscoverRequest {
1569
+ url: string;
1570
+ }
1571
+ /** What discovery found for a server address; nothing is stored until the server is saved with `confirmAuthorization`. */
1572
+ interface McpDiscovery {
1573
+ resource: string;
1574
+ issuer: string;
1575
+ authorizationServers: string[];
1576
+ challengedScopes: string[];
1577
+ scopesSupported: string[];
1578
+ grantTypesSupported: string[];
1579
+ pkceSupported: boolean;
1580
+ clientIdMetadataDocumentSupported: boolean;
1581
+ dynamicRegistrationSupported: boolean;
1582
+ tokenEndpointAuthMethods: string[];
1583
+ }
1584
+ /**
1585
+ * Body of an authorize request. `returnUrl` chooses redirect mode: the callback returns there with
1586
+ * the flow and completion code in the fragment; its origin must be allowed by the host.
1587
+ */
1588
+ interface McpAuthorizeRequest {
1589
+ returnUrl?: string | null;
1590
+ /** For a personal connection: the consent to background use, recorded with the connection. */
1591
+ allowBackgroundUse?: boolean | null;
1592
+ }
1593
+ /** The flow and the URL the owner's browser opens; it expires at `expiresAt`. */
1594
+ interface McpAuthorizationStart {
1595
+ flowId: string;
1596
+ authorizationUrl: string;
1597
+ expiresAt: string;
1598
+ /** The origin of the assistant's callback page: the only origin whose message is accepted. */
1599
+ callbackOrigin: string;
1600
+ }
1601
+ /** Body of `POST mcp-connections/complete`. */
1602
+ interface McpCompleteRequest {
1603
+ flowId: string;
1604
+ completionCode: string;
1605
+ }
1606
+ /** The connection a completed authorization activated. */
1607
+ interface McpCompletion {
1608
+ serverId: string;
1609
+ ownerKind: 'organization' | 'user';
1610
+ status: McpConnectionStatus;
1611
+ grantedScopes: string | null;
1612
+ }
1613
+ /** The personal connections of a server per status. */
1614
+ interface McpConnectionsSummary {
1615
+ active: number;
1616
+ reauthorizationRequired: number;
1617
+ issuerChanged: number;
1618
+ }
1619
+ /**
1620
+ * Whether a server's tools are offered in background runs. `organization` is only valid for
1621
+ * `none`, `bearer`, `api-key` and `basic`; the agent then also needs a grant in code
1622
+ * (`mcp.<server>.*`). `personal` is only valid for `forward-user-token`: the run then sends a
1623
+ * short-lived token of the person it acts for, once that person allowed it (`McpConnection`).
1624
+ */
1625
+ type McpHeadlessUse = 'never' | 'organization' | 'personal';
1626
+ /**
1627
+ * `streamable-http`, or `auto` to fall back to the deprecated HTTP+SSE transport for servers
1628
+ * that do not offer Streamable HTTP yet.
1629
+ */
1630
+ type McpTransport = 'streamable-http' | 'auto';
935
1631
  interface McpServerInput {
936
1632
  id: string;
937
1633
  displayName: string;
@@ -942,6 +1638,52 @@ interface McpServerInput {
942
1638
  secret?: string | null;
943
1639
  requiredPolicy: string | null;
944
1640
  isEnabled: boolean;
1641
+ /** Omit to keep the stored value; a new server starts at `never`. */
1642
+ headlessUse?: McpHeadlessUse;
1643
+ /** The user name of `basic`; the password is `secret`. Omit to keep the stored value. */
1644
+ userName?: string | null;
1645
+ /**
1646
+ * Where the secret is instead of storing it: `config:<name>` or a prefix the application
1647
+ * registered. Omit to keep, `""` to clear; a new stored secret replaces it and vice versa.
1648
+ */
1649
+ secretReference?: string | null;
1650
+ /** The name of a client certificate the host configured for mutual TLS. Omit to keep, `""` to clear. */
1651
+ clientCertificateReference?: string | null;
1652
+ /** Omit to keep the stored value; a new server starts at `streamable-http`. */
1653
+ transport?: McpTransport;
1654
+ /** For `oauth`; omit to keep the stored value. A new server starts at `organization`. */
1655
+ connectionScope?: McpConnectionScope;
1656
+ /** The OAuth settings of `oauth` and `oauth-client-credentials`; omit to keep them. */
1657
+ oauth?: McpOAuthInput | null;
1658
+ /**
1659
+ * The readers of the server, at most 16; omit to keep them, `[]` removes them all. A refused save
1660
+ * names the field of a reader with its index, such as `readers[0].toolName`.
1661
+ */
1662
+ readers?: McpReaderInput[] | null;
1663
+ }
1664
+ /**
1665
+ * One reader of an MCP server: its synced tool `toolName` turns files of `mediaTypes` into text for
1666
+ * models that do not read those types themselves. A file above `maxClassification` is never sent to
1667
+ * it; sending a file to an MCP server is data leaving the application. The assistant asks the
1668
+ * application's own readers first, then the MCP readers by `priority`, highest first, then by server
1669
+ * id and tool name.
1670
+ */
1671
+ interface McpReader {
1672
+ mediaTypes: string[];
1673
+ toolName: string;
1674
+ maxClassification: AssistantDataClassification;
1675
+ priority: number;
1676
+ }
1677
+ /**
1678
+ * A reader as saved: one to 16 media types; `toolName` must name a tool synced from the server, one
1679
+ * reader per tool; the tool receives `name`, `mediaType` and the base64 `content` of a file and returns
1680
+ * its text. `priority` is a whole number from -1000 to 1000; omitted it is 0.
1681
+ */
1682
+ interface McpReaderInput {
1683
+ mediaTypes: string[];
1684
+ toolName: string | null;
1685
+ maxClassification: AssistantDataClassification | null;
1686
+ priority?: number | null;
945
1687
  }
946
1688
  interface McpServer {
947
1689
  id: string;
@@ -955,6 +1697,26 @@ interface McpServer {
955
1697
  lastSyncAt: string | null;
956
1698
  lastSyncStatus: 'ok' | 'failed' | null;
957
1699
  assignedAgentIds: string[];
1700
+ headlessUse: McpHeadlessUse;
1701
+ /** When a test, a sync or a turn with the shared credential last connected. */
1702
+ lastConnectAt: string | null;
1703
+ /** The failure code of that connection; `null` when it succeeded or never ran. */
1704
+ lastConnectCode: string | null;
1705
+ /** The user name of `basic`; the password is never returned. */
1706
+ userName: string | null;
1707
+ /** The secret reference; it names where the secret is, it is not the secret. */
1708
+ secretReference: string | null;
1709
+ clientCertificateReference: string | null;
1710
+ transport: McpTransport;
1711
+ connectionScope: McpConnectionScope;
1712
+ /** The OAuth settings; `null` for other modes. */
1713
+ oauth: McpOAuthSettings | null;
1714
+ /** The confirmed authorization server; `null` until an administrator confirmed it. */
1715
+ authorization: McpAuthorization | null;
1716
+ /** The organization's OAuth connection; `null` for servers without one. */
1717
+ organizationConnection: McpOrganizationConnection | null;
1718
+ /** The readers of the server, by priority, highest first; empty when it reads no files. */
1719
+ readers: McpReader[];
958
1720
  }
959
1721
  interface McpServerTestResult {
960
1722
  ok: boolean;
@@ -1221,6 +1983,11 @@ interface AgentFeedbackList {
1221
1983
  interface RunBlock {
1222
1984
  name: string;
1223
1985
  description: string;
1986
+ /**
1987
+ * For a trigger event that names its object type up front, that type: data triggers on it fit only
1988
+ * agents that work on it. Missing or `null` when the type is known only when the event fires.
1989
+ */
1990
+ subjectType?: string | null;
1224
1991
  }
1225
1992
  /** Response of `GET admin/run-catalog`: what skills, triggers and run settings defined as data can name. */
1226
1993
  interface RunCatalog {
@@ -1230,6 +1997,112 @@ interface RunCatalog {
1230
1997
  approvalPolicies: string[];
1231
1998
  /** Chat profiles with function calling and streaming. */
1232
1999
  profiles: string[];
2000
+ /** Per approval policy who decides, how long a proposal waits and how; missing on older servers. */
2001
+ approvalPolicySummaries?: ApprovalPolicySummary[];
2002
+ /** Whether `searchAccounts` can find accounts by name; otherwise an account is chosen by its id. */
2003
+ accountSearch?: boolean;
2004
+ /**
2005
+ * The subject types the application registered, by id, with the platform's `nh-system` (the whole
2006
+ * application, `isSystem`); missing on older servers. Choices of object types leave out `isSystem` types.
2007
+ */
2008
+ subjectTypes?: AgentSubjectType[];
2009
+ /**
2010
+ * The policies the application lists for the run and view policy of agents created here, by name;
2011
+ * missing on older servers.
2012
+ */
2013
+ agentPolicies?: RunBlock[];
2014
+ /** Whether the application lists its divisions, so an agent may work per division. */
2015
+ divisions?: boolean;
2016
+ /**
2017
+ * The groups of agents the application registers in code, by id, with their names in the request's
2018
+ * language: what an administrator may put an agent in; missing on older servers.
2019
+ */
2020
+ agentGroups?: AgentGroup[];
2021
+ /**
2022
+ * The application's file limits: the run settings of an agent created here and a skill defined here
2023
+ * can only lower them; missing on older servers.
2024
+ */
2025
+ fileLimits?: FileLimits | null;
2026
+ }
2027
+ /**
2028
+ * File limits: the largest file in bytes, the most pages of one file, the most files of one turn and
2029
+ * the most estimated file tokens of one turn.
2030
+ */
2031
+ interface FileLimits {
2032
+ maxFileBytes: number;
2033
+ maxFilePages: number;
2034
+ maxFilesPerTurn: number;
2035
+ maxFileTokensPerTurn: number;
2036
+ }
2037
+ /**
2038
+ * Lower file limits of an agent or a skill that accepts files; `null` or missing keeps the
2039
+ * application's (for a skill: the agent's). Each is at most the application's limit.
2040
+ */
2041
+ interface LowerFileLimits {
2042
+ maxFileBytes?: number | null;
2043
+ maxFilePages?: number | null;
2044
+ maxFilesPerTurn?: number | null;
2045
+ maxFileTokensPerTurn?: number | null;
2046
+ }
2047
+ /** A group of agents the application registers in code, as people see it. */
2048
+ interface AgentGroup {
2049
+ /** The dash-case group id, such as `project-management`. */
2050
+ id: string;
2051
+ /** The group's name in the request's language. */
2052
+ name: string;
2053
+ /** What the group's agents do, when the application described it. */
2054
+ description: string | null;
2055
+ }
2056
+ /** A subject type as people see it, from the run catalog. */
2057
+ interface AgentSubjectType {
2058
+ /** The dash-case type id, such as `project`. */
2059
+ id: string;
2060
+ /** The name of one subject in the request's language; the id when the application did not name the type. */
2061
+ name: string;
2062
+ /** The name of several subjects, when the application gave one. */
2063
+ pluralName: string | null;
2064
+ /** The short type name of the entity the type stands for, as the NewHeap log records `ObjectType`. */
2065
+ entityType: string | null;
2066
+ /** The full type name of that entity, as `ObjectTypeFull`. */
2067
+ entityTypeFull: string | null;
2068
+ /** The link template with `{id}`; `null` without one. */
2069
+ link: string | null;
2070
+ /** Whether `searchSubjects` finds subjects of this type by name; otherwise people give an id. */
2071
+ searchable: boolean;
2072
+ /**
2073
+ * Whether the type belongs to the platform instead of the application, such as `nh-system`, the
2074
+ * whole application; it is not offered as a kind of object.
2075
+ */
2076
+ isSystem: boolean;
2077
+ }
2078
+ /** Who may decide a proposal under an approval policy. */
2079
+ interface ApproverSummary {
2080
+ /** `initiator`: the person who caused the run; `subject-role`: a role on the subject; `policy`: an authorization policy. */
2081
+ kind: 'initiator' | 'subject-role' | 'policy' | string;
2082
+ /** For `subject-role`: at least `reader`, `participant` or `approver`. */
2083
+ role?: string | null;
2084
+ /** For `subject-role`: the application's role name, when one is required. */
2085
+ namedRole?: string | null;
2086
+ /** For `policy`: the authorization policy. */
2087
+ policy?: string | null;
2088
+ }
2089
+ /** What an approval policy means, so an administration can explain the choice. */
2090
+ interface ApprovalPolicySummary {
2091
+ name: string;
2092
+ approvers: ApproverSummary[];
2093
+ /** How long a proposal waits for a decision. */
2094
+ lifetimeMinutes: number;
2095
+ /** The person who caused a proposal may not decide it. */
2096
+ fourEyes: boolean;
2097
+ /** `inline`: the run waits for the decision; `deferred`: people decide later. */
2098
+ mode: 'inline' | 'deferred' | string;
2099
+ }
2100
+ /** An account an agent can answer to, from `GET admin/accounts`. */
2101
+ interface AssistantAccount {
2102
+ actorId: string;
2103
+ displayName: string;
2104
+ /** The e-mail address, when the application knows it. */
2105
+ detail: string | null;
1233
2106
  }
1234
2107
  /** Which part of the run configuration a problem concerns. */
1235
2108
  type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger';
@@ -1253,7 +2126,7 @@ type AgentElevatedReads = 'restricted' | 'deny';
1253
2126
  * The run settings of an agent created in the administration. Grants are never data: in headless
1254
2127
  * runs the agent acts with the rights of the account it answers to, within its tool selectors.
1255
2128
  */
1256
- interface AgentRunSettings {
2129
+ interface AgentRunSettings extends LowerFileLimits {
1257
2130
  version: number;
1258
2131
  accountability: AgentAccountability;
1259
2132
  serviceAccountActorId: string | null;
@@ -1274,9 +2147,14 @@ interface AgentRunSettings {
1274
2147
  reason: string | null;
1275
2148
  inEffect: boolean;
1276
2149
  problem: string | null;
2150
+ /**
2151
+ * People's messages and the agent's tools may give it files; missing on older servers. Off for a new
2152
+ * agent.
2153
+ */
2154
+ acceptsFiles?: boolean;
1277
2155
  }
1278
2156
  /** Body of `PUT admin/agents/{id}/run-settings`. */
1279
- interface AgentRunSettingsRequest {
2157
+ interface AgentRunSettingsRequest extends LowerFileLimits {
1280
2158
  accountability: AgentAccountability;
1281
2159
  /** For `service-account` only: an account that exists and may sign in. */
1282
2160
  serviceAccountActorId?: string | null;
@@ -1301,20 +2179,68 @@ interface AgentRunSettingsRequest {
1301
2179
  expectedVersion?: number | null;
1302
2180
  /** Optional, at most 500 characters. */
1303
2181
  reason?: string | null;
2182
+ /** People's messages and the agent's tools may give it files; `false` by default. */
2183
+ acceptsFiles?: boolean;
1304
2184
  }
1305
2185
  /** A skill the agent declares in code; it cannot change here. */
1306
2186
  interface CodeSkill {
1307
2187
  skillId: string;
1308
2188
  description: string;
2189
+ /**
2190
+ * The skill starts off in code (`StartsOff()`): it was off when the application first saw it. Its
2191
+ * state now is in the skill's state; missing on older servers.
2192
+ */
2193
+ startsOff?: boolean;
2194
+ /** The skill accepts files in code (`AcceptsFiles()`); missing on older servers. */
2195
+ acceptsFiles?: boolean;
1309
2196
  }
1310
2197
  /** A trigger registered in code; it cannot change here. */
1311
2198
  interface CodeTrigger {
1312
2199
  triggerId: string;
1313
2200
  source: 'event' | 'schedule' | 'webhook';
1314
2201
  skillId: string | null;
2202
+ /**
2203
+ * The subject type the trigger names up front: an object type, or `nh-system` for a schedule that
2204
+ * runs for the whole application (once per division for an agent that works per division). `null`
2205
+ * when the type is known only when it fires; missing on older servers.
2206
+ */
2207
+ subjectType?: string | null;
1315
2208
  }
2209
+ /**
2210
+ * How an agent in code runs, as its code says; it changes only in code. The technical account, which
2211
+ * an administrator may replace, is the agent's `serviceAccount`.
2212
+ */
2213
+ interface CodeRunSettings {
2214
+ /** Whose rights its runs use. */
2215
+ accountability: AgentAccountability;
2216
+ /** Its runs also use what the person who started them may use. */
2217
+ delegateFromInitiator: boolean;
2218
+ /** The agent's approval policy; `null` for the platform's default. */
2219
+ approvalPolicy: string | null;
2220
+ /** It works by a rule handler in code instead of the model. */
2221
+ usesRules: boolean;
2222
+ /**
2223
+ * The agent starts off in code (`StartsOff()`): it was off when the application first saw it. Its
2224
+ * state now is the agent's `runState`; missing on older servers.
2225
+ */
2226
+ startsOff?: boolean;
2227
+ /** The agent accepts files in code (`AcceptsFiles()`); missing on older servers. */
2228
+ acceptsFiles?: boolean;
2229
+ }
2230
+ /**
2231
+ * How sensitive the data is that a model call carries (`NhAiDataClassification`); the model profile of
2232
+ * the call must permit it.
2233
+ */
2234
+ type AssistantDataClassification = 'public' | 'internal' | 'confidential' | 'restricted';
2235
+ /**
2236
+ * Why an agent or a skill that is saved and in effect may still not work as configured
2237
+ * (`NhAssistantConfigurationWarnings`). `classification-not-permitted`: neither its model profile nor
2238
+ * the profile's fallbacks permit its data classification, so its model calls are refused. A newer
2239
+ * server may report other codes.
2240
+ */
2241
+ type AssistantConfigurationWarning = 'classification-not-permitted' | (string & {});
1316
2242
  /** One version of a skill defined as data. */
1317
- interface DataSkill {
2243
+ interface DataSkill extends LowerFileLimits {
1318
2244
  skillId: string;
1319
2245
  version: number;
1320
2246
  description: string;
@@ -1335,11 +2261,27 @@ interface DataSkill {
1335
2261
  problem: string | null;
1336
2262
  /** The candidate that runs in shadow next to this live version; missing or null without one. */
1337
2263
  candidate?: DataSkill | null;
2264
+ /**
2265
+ * The classification of the data the skill's model calls carry; `null` uses the agent's, missing on
2266
+ * older servers.
2267
+ */
2268
+ dataClassification?: AssistantDataClassification | null;
2269
+ /**
2270
+ * A run in the skill reads files when its agent accepts them too; missing on older servers. Off for a
2271
+ * new skill.
2272
+ */
2273
+ acceptsFiles?: boolean;
2274
+ /**
2275
+ * Why the skill, saved and in effect, may still not work as configured: `classification-not-permitted`
2276
+ * when neither its model profile, or else its agent's, nor the profile's fallbacks permit its
2277
+ * classification, or else its agent's. A warning never refuses a save; missing on older servers.
2278
+ */
2279
+ warnings?: AssistantConfigurationWarning[];
1338
2280
  }
1339
2281
  /** How a change of a skill takes effect: at once, or as a candidate in shadow next to the live version. */
1340
2282
  type SkillApplyMode = 'live' | 'shadow';
1341
2283
  /** Body of `PUT admin/agents/{id}/skills/{skillId}`. */
1342
- interface DataSkillRequest {
2284
+ interface DataSkillRequest extends LowerFileLimits {
1343
2285
  /** At most 300 characters; triage and `use_skill` choose by it. */
1344
2286
  description: string;
1345
2287
  /** At most 20,000 characters. */
@@ -1357,6 +2299,18 @@ interface DataSkillRequest {
1357
2299
  reason?: string | null;
1358
2300
  /** For a change of a skill; `live` by default. */
1359
2301
  apply?: SkillApplyMode;
2302
+ /**
2303
+ * For a new skill only: it starts off, so triggers that name it are ignored and rules and triage do
2304
+ * not route to it until someone switches it on. A change of a skill fails with `startsOff: invalid`.
2305
+ */
2306
+ startsOff?: boolean;
2307
+ /**
2308
+ * The classification of the data the skill's model calls carry; `null` uses the agent's. The model
2309
+ * profile of its runs must permit it, or its model calls are refused.
2310
+ */
2311
+ dataClassification?: AssistantDataClassification | null;
2312
+ /** A run in the skill reads files when its agent accepts them too; `false` by default. */
2313
+ acceptsFiles?: boolean;
1360
2314
  }
1361
2315
  type DataSkillVersionStatus = 'live' | 'candidate' | 'superseded' | 'discarded';
1362
2316
  /** One version in the history of a skill defined as data. */
@@ -1420,6 +2374,10 @@ interface DataTrigger {
1420
2374
  event: string | null;
1421
2375
  cron: string | null;
1422
2376
  timeZone: string | null;
2377
+ /**
2378
+ * The subject set a schedule runs for; `null` for an event, and for a schedule that runs for the
2379
+ * whole application (once per division for an agent that works per division).
2380
+ */
1423
2381
  subjectSet: string | null;
1424
2382
  message: string | null;
1425
2383
  conflict: TriggerConflict;
@@ -1444,7 +2402,10 @@ interface DataTriggerRequest {
1444
2402
  cron?: string | null;
1445
2403
  /** For a schedule: an IANA or Windows time zone; UTC by default. */
1446
2404
  timeZone?: string | null;
1447
- /** For a schedule: a registered subject set. */
2405
+ /**
2406
+ * For a schedule: a registered subject set. Without one the schedule runs for the whole
2407
+ * application, which only an agent that works on it may do (`subjectSet: required` otherwise).
2408
+ */
1448
2409
  subjectSet?: string | null;
1449
2410
  /** For a schedule: what every run receives, at most 2,000 characters. */
1450
2411
  message?: string | null;
@@ -1481,6 +2442,8 @@ interface AgentRunConfiguration {
1481
2442
  source: 'code' | 'admin';
1482
2443
  /** The run settings of an agent created in the administration; `null` for an agent in code and one that only chats. */
1483
2444
  runSettings: AgentRunSettings | null;
2445
+ /** How an agent in code runs, as its code says; `null` for an agent created here, missing on older servers. */
2446
+ codeRunSettings?: CodeRunSettings | null;
1484
2447
  }
1485
2448
 
1486
2449
  /** Decides whether the current user may see and use the assistant. */
@@ -1569,7 +2532,35 @@ interface NhAssistantConfig {
1569
2532
  * `#nh-assistant-join=<conversationId>.<token>`; the panel joins when the page opens with it.
1570
2533
  */
1571
2534
  buildShareLink?: (conversationId: string, token: string) => string;
2535
+ /**
2536
+ * Replaces the server's links to subjects, which come from the link template of the subject type
2537
+ * (`AddSubjectType(...).OpenAt("/projects/{id}")`), with the host's own routes, per subject type:
2538
+ * for example `{ project: subject => ['/projects', subject.id] }`. Return router commands or a URL
2539
+ * within the application, `null` to show no link, or `undefined` to keep the server's link.
2540
+ * Runs in the assistant's injection context. Default: the server's links.
2541
+ */
2542
+ subjectLinks?: Record<string, NhAssistantSubjectLinkBuilder>;
2543
+ /**
2544
+ * How MCP authorizations open. `popup` (default) opens a window from the click and stays on the
2545
+ * page. `redirect` sends the page to the authorization server and back to `mcpConnectReturnUrl`,
2546
+ * where the assistant completes the connection; its origin must be in
2547
+ * `NewHeap:AI:Assistant:Mcp:OAuth:ReturnOrigins`.
2548
+ */
2549
+ mcpConnectMode?: 'popup' | 'redirect';
2550
+ /** The page a redirect-mode authorization returns to. Default: the current address without its fragment. */
2551
+ mcpConnectReturnUrl?: () => string;
2552
+ }
2553
+ /** A subject an agent works on, by its type and id. */
2554
+ interface NhAssistantSubjectRef {
2555
+ type: string;
2556
+ id: string;
1572
2557
  }
2558
+ /**
2559
+ * Builds the link to one subject in the host application: router commands such as
2560
+ * `['/projects', subject.id]`, a URL such as `/projects/7`, `null` for no link, or `undefined` to keep
2561
+ * the server's link.
2562
+ */
2563
+ type NhAssistantSubjectLinkBuilder = (subject: NhAssistantSubjectRef) => readonly unknown[] | string | null | undefined;
1573
2564
  interface NhAssistantPushConfig {
1574
2565
  /** URL of the bundled worker, for example `/nh-assistant/nh-assistant-push-worker.js`. */
1575
2566
  serviceWorkerUrl: string;
@@ -1594,6 +2585,25 @@ type NhAssistantFetch = (input: string, init: RequestInit) => Promise<Response>;
1594
2585
  * `@newheap/platform-ai-chat/testing` replace it.
1595
2586
  */
1596
2587
  declare const NH_ASSISTANT_FETCH: InjectionToken<NhAssistantFetch>;
2588
+ /** One file upload of the assistant client, which reports how much of the body was sent. */
2589
+ interface NhAssistantUploadRequest {
2590
+ url: string;
2591
+ /** The request headers; never `Content-Type`, which the browser sets with the multipart boundary. */
2592
+ headers: Record<string, string>;
2593
+ body: FormData;
2594
+ signal: AbortSignal;
2595
+ /** Called while the body is sent, with the bytes sent so far and the total. */
2596
+ onProgress: (loaded: number, total: number) => void;
2597
+ }
2598
+ /** Sends an upload and resolves with the server's response; rejects when the request did not reach the server. */
2599
+ type NhAssistantUpload = (request: NhAssistantUploadRequest) => Promise<Response>;
2600
+ /**
2601
+ * Sends the uploads of the assistant client. The default uses `XMLHttpRequest`, because `fetch` does
2602
+ * not report upload progress. The mock API from `@newheap/platform-ai-chat/testing` replaces it.
2603
+ */
2604
+ declare const NH_ASSISTANT_UPLOAD: InjectionToken<NhAssistantUpload>;
2605
+ /** The default upload: `XMLHttpRequest` with upload progress, answered as a `Response`. */
2606
+ declare function nhAssistantXhrUpload(request: NhAssistantUploadRequest): Promise<Response>;
1597
2607
  /** Default policy: every user who can reach the host may use the assistant. */
1598
2608
  declare class NhAssistantAllowAllAccessPolicy implements NhAssistantAccessPolicy {
1599
2609
  canUse(): boolean;
@@ -1625,6 +2635,16 @@ declare class NhAssistantTranslationMerger {
1625
2635
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<NhAssistantTranslationMerger>;
1626
2636
  }
1627
2637
 
2638
+ /**
2639
+ * Failure codes the assistant back-end sends in error bodies, SSE `error` events and tool
2640
+ * result codes (`NhAssistantErrorCodes`, `NhAssistantAdminErrorCodes` and the runtime codes
2641
+ * of `NewHeap.Platform.AI.Chat`). Every code needs a text under `nh-assistant.errors.<code>`
2642
+ * in each bundled language; the translation tests enforce that.
2643
+ */
2644
+ declare const NH_ASSISTANT_SERVER_ERROR_CODES: readonly string[];
2645
+ /** Every code the assistant UI can show: server codes and client-side transport codes. */
2646
+ declare const NH_ASSISTANT_ERROR_CODES: readonly string[];
2647
+
1628
2648
  /** One raw server-sent event before its data is interpreted. */
1629
2649
  interface NhAssistantRawSseMessage {
1630
2650
  event: string;
@@ -1650,20 +2670,29 @@ declare class NhAssistantSseParser {
1650
2670
  private dispatch;
1651
2671
  }
1652
2672
 
2673
+ /**
2674
+ * The request header every upload carries. A browser cannot send it with a cross-site form, so the
2675
+ * upload endpoint keeps the posture of the JSON endpoints.
2676
+ */
2677
+ declare const NH_ASSISTANT_UPLOAD_HEADER = "X-NH-Assistant-Upload";
1653
2678
  /** A failed JSON request of the assistant API. Carries a stable code, never response text. */
1654
2679
  declare class NhAssistantApiError extends Error {
1655
2680
  readonly status: number;
1656
2681
  readonly code: string;
1657
2682
  readonly messageKey: string;
1658
2683
  /**
1659
- * The field errors of an `assistant-validation` response: camelCase field names with stable
1660
- * values such as `required`, `invalid`, `too-long` or `not-found`. Empty otherwise.
2684
+ * The field errors of the error body, whatever its code (for example `assistant-validation` or
2685
+ * `assistant-run-filter-invalid`): camelCase field names, dotted for nested settings such as
2686
+ * `oauth.clientId`, with stable values such as `required`, `invalid`, `too-long` or `not-found`.
2687
+ * Empty when the body names none.
1661
2688
  */
1662
2689
  readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
1663
2690
  constructor(status: number, code: string, messageKey: string,
1664
2691
  /**
1665
- * The field errors of an `assistant-validation` response: camelCase field names with stable
1666
- * values such as `required`, `invalid`, `too-long` or `not-found`. Empty otherwise.
2692
+ * The field errors of the error body, whatever its code (for example `assistant-validation` or
2693
+ * `assistant-run-filter-invalid`): camelCase field names, dotted for nested settings such as
2694
+ * `oauth.clientId`, with stable values such as `required`, `invalid`, `too-long` or `not-found`.
2695
+ * Empty when the body names none.
1667
2696
  */
1668
2697
  fieldErrors?: Readonly<Record<string, readonly string[]>>);
1669
2698
  }
@@ -1674,6 +2703,15 @@ declare function nhAssistantCodeForStatus(status: number): string;
1674
2703
  /** Status-specific codes that replace the generic mapping for one endpoint. */
1675
2704
  type NhAssistantStatusCodes = Partial<Record<number, string>>;
1676
2705
 
2706
+ /** The progress of one upload, then the file the application stored. */
2707
+ type NhAssistantUploadEvent = {
2708
+ type: 'progress';
2709
+ loaded: number;
2710
+ total: number;
2711
+ } | {
2712
+ type: 'uploaded';
2713
+ file: FileReference;
2714
+ };
1677
2715
  /**
1678
2716
  * Client for the assistant HTTP API. JSON endpoints return cold observables that abort
1679
2717
  * their request on unsubscribe. Streaming endpoints emit every contract event and complete
@@ -1688,7 +2726,14 @@ declare class NhAssistantApiService {
1688
2726
  createConversation(request: CreateConversationRequest): Observable<Conversation>;
1689
2727
  getConversation(conversationId: string): Observable<Conversation>;
1690
2728
  deleteConversation(conversationId: string): Observable<void>;
1691
- sendMessage(conversationId: string, request: SendMessageRequest): Observable<NhAssistantSseEvent>;
2729
+ sendMessage(conversationId: string, request: SendMessageRequest): Observable<NhAssistantMessageEvent>;
2730
+ /**
2731
+ * Uploads one file to a conversation as `multipart/form-data` (`POST conversations/{id}/files`):
2732
+ * emits the progress while the file is sent and then the stored file, whose reference a message
2733
+ * carries in `files`. Fails with `NhAssistantApiError`; unsubscribing aborts the upload. The
2734
+ * media type of `file` is the one the upload declares.
2735
+ */
2736
+ uploadFile(conversationId: string, file: Blob, name: string): Observable<NhAssistantUploadEvent>;
1692
2737
  decideApproval(conversationId: string, approvalId: string, request: DecideApprovalRequest): Observable<NhAssistantSseEvent>;
1693
2738
  cancel(conversationId: string): Observable<void>;
1694
2739
  /** Raises the caller's read position to `sequence`, or to the latest message when omitted. */
@@ -1717,8 +2762,31 @@ declare class NhAssistantApiService {
1717
2762
  getPreferences(): Observable<AssistantPreferences>;
1718
2763
  /** Replaces the caller's own assistant preferences and returns the stored values. */
1719
2764
  updatePreferences(preferences: AssistantPreferences): Observable<AssistantPreferences>;
2765
+ /** MCP servers that agents may use in background runs with the caller's own account. */
2766
+ getMcpConnections(): Observable<McpConnection[]>;
2767
+ /** Allows or withdraws background use of an MCP server with the caller's own account. */
2768
+ updateMcpConnection(serverId: string, request: UpdateMcpConnectionRequest): Observable<McpConnection>;
2769
+ /**
2770
+ * Starts the caller's authorization of a server each person connects to. Prefer
2771
+ * `NhAssistantMcpConnectService.connect`, which opens and completes it.
2772
+ */
2773
+ authorizeMcpConnection(serverId: string, request?: McpAuthorizeRequest): Observable<McpAuthorizationStart>;
2774
+ /** Removes the caller's own connection of a server and revokes its tokens. */
2775
+ disconnectMcpConnection(serverId: string): Observable<void>;
2776
+ /** Activates the connection of an authorization the caller started, with the callback's completion code. */
2777
+ completeMcpAuthorization(request: McpCompleteRequest): Observable<McpCompletion>;
2778
+ /**
2779
+ * Streams a turn. With `queuedReceipt` a `202` answer with a trigger receipt becomes
2780
+ * `message.queued`; without it, a stream is required.
2781
+ */
1720
2782
  private requestStream;
1721
2783
  private executeStream;
2784
+ /**
2785
+ * A message to an agent's thread whose run works waits for the next run: the server answers `202`
2786
+ * with the trigger receipt instead of a stream. A receipt the run takes the message with becomes
2787
+ * `message.queued`; one that refused it becomes an `error` with its code.
2788
+ */
2789
+ private readQueuedReceipt;
1722
2790
  private readStream;
1723
2791
  private emitClientError;
1724
2792
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantApiService, never>;
@@ -1733,6 +2801,7 @@ declare class NhAssistantApiService {
1733
2801
  */
1734
2802
  declare class NhAssistantAdminApiService {
1735
2803
  private readonly transport;
2804
+ private readonly api;
1736
2805
  getContext(): Observable<ApplicationContext>;
1737
2806
  /** Saves a new context version; fails with `assistant-version-conflict` when `expectedVersion` is stale. */
1738
2807
  updateContext(request: UpdateApplicationContextRequest): Observable<ApplicationContext>;
@@ -1767,9 +2836,20 @@ declare class NhAssistantAdminApiService {
1767
2836
  * account that does not exist or may not sign in.
1768
2837
  */
1769
2838
  setServiceAccount(agentId: string, request: SetAgentServiceAccountRequest): Observable<AgentState>;
2839
+ /**
2840
+ * Puts an agent, in code or created here, in exactly `groups` of the run catalog's `agentGroups`
2841
+ * and out of the others. The choice wins over the agent's `InGroup` in code. Fails with a field error
2842
+ * on `groups` for an unknown group and with `assistant-shadow-variant` for a shadow variant.
2843
+ */
2844
+ setAgentGroups(agentId: string, groups: readonly string[]): Observable<AdminAgentGroups>;
1770
2845
  /** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
1771
2846
  deleteAgent(agentId: string): Observable<void>;
1772
2847
  getMcpServers(): Observable<McpServer[]>;
2848
+ /**
2849
+ * The authentication modes the application registered in code (`GET admin/mcp-auth-modes`), which
2850
+ * administrators choose next to the built-in modes.
2851
+ */
2852
+ getMcpAuthModes(): Observable<McpCustomAuthMode[]>;
1773
2853
  createMcpServer(input: McpServerInput): Observable<McpServer>;
1774
2854
  /** Omit `secret` to keep the stored secret; send `""` to clear it. */
1775
2855
  updateMcpServer(serverId: string, input: McpServerInput): Observable<McpServer>;
@@ -1778,6 +2858,30 @@ declare class NhAssistantAdminApiService {
1778
2858
  /** Reads the remote tool list. New tools start disabled; a changed input schema disables a tool. */
1779
2859
  syncMcpServer(serverId: string): Observable<McpTool[]>;
1780
2860
  getMcpTools(serverId: string): Observable<McpTool[]>;
2861
+ /**
2862
+ * Reads the protected resource metadata of a server address and its authorization server without
2863
+ * storing anything. Save the server with `oauth.confirmAuthorization` to pin what was found.
2864
+ */
2865
+ discoverMcpServer(url: string): Observable<McpDiscovery>;
2866
+ /** The organization's OAuth connection of a server, without tokens. */
2867
+ getMcpOrganizationConnection(serverId: string): Observable<McpOrganizationConnection>;
2868
+ /**
2869
+ * Starts the administrator's authorization of the organization connection. Open
2870
+ * `authorizationUrl` in the administrator's browser, then complete with `completeMcpAuthorization`.
2871
+ */
2872
+ authorizeMcpOrganizationConnection(serverId: string, request?: McpAuthorizeRequest): Observable<McpAuthorizationStart>;
2873
+ /** Removes the organization connection and revokes its tokens. */
2874
+ disconnectMcpOrganizationConnection(serverId: string): Observable<void>;
2875
+ /** The personal connections of a server per status. */
2876
+ getMcpConnectionsSummary(serverId: string): Observable<McpConnectionsSummary>;
2877
+ /** Revokes every person's connection of a server; each person connects again. */
2878
+ revokeMcpConnections(serverId: string): Observable<void>;
2879
+ /**
2880
+ * Activates the connection of an authorization the caller started with the completion code the
2881
+ * callback handed to the browser. An organization connection also needs the admin policy. The same
2882
+ * call as `NhAssistantApiService.completeMcpAuthorization`, with the same failure codes.
2883
+ */
2884
+ completeMcpAuthorization(request: McpCompleteRequest): Observable<McpCompletion>;
1781
2885
  updateMcpTool(serverId: string, remoteName: string, request: UpdateMcpToolRequest): Observable<McpTool>;
1782
2886
  /**
1783
2887
  * The agent's proposals per tool and agent version in the period: decisions, the rejection rate,
@@ -1810,6 +2914,18 @@ declare class NhAssistantAdminApiService {
1810
2914
  getAgentReplays(variantId: string): Observable<AgentReplayList>;
1811
2915
  /** The building blocks in code that run settings, skills and triggers defined as data can name. */
1812
2916
  getRunCatalog(): Observable<RunCatalog>;
2917
+ /**
2918
+ * Accounts whose name or e-mail address contains `query` (2 to 100 characters), at most `limit`.
2919
+ * Fails with `assistant-account-search-unavailable` when the application offers no search; the
2920
+ * run catalog's `accountSearch` tells beforehand.
2921
+ */
2922
+ searchAccounts(query: string, limit?: number): Observable<AssistantAccount[]>;
2923
+ /**
2924
+ * The names the application knows for these account ids; unknown ids are left out. The server reads
2925
+ * at most 50 ids per request, so more ids are asked for in parts of 50 and the answers merged in
2926
+ * the order of the ids. Fails with `NhAssistantApiError` when any part fails.
2927
+ */
2928
+ getAccounts(actorIds: readonly string[]): Observable<AssistantAccount[]>;
1813
2929
  /**
1814
2930
  * The agent's run settings, skills and triggers, in code and as data, and the data that no longer
1815
2931
  * fits the code. An agent in code without a run configuration answers `assistant-agent-not-found`.
@@ -1821,6 +2937,13 @@ declare class NhAssistantAdminApiService {
1821
2937
  * `assistant-service-account-not-found`.
1822
2938
  */
1823
2939
  saveRunSettings(agentId: string, request: AgentRunSettingsRequest): Observable<AgentRunSettings>;
2940
+ /**
2941
+ * Every run of the agent, live and shadow, newest first, for its runs view. Read one run's whole
2942
+ * result with `NhAssistantAgentRunApiService.getRunResult`. The server checks the filter first:
2943
+ * `assistant-run-filter-invalid` with the refused parts in `fieldErrors`, then
2944
+ * `assistant-agent-not-found` for an unknown agent.
2945
+ */
2946
+ getAgentRuns(agentId: string, filter?: Omit<AgentRunFilter, 'agentId'>): Observable<AgentRunHistory>;
1824
2947
  /** Removes the run settings; while data skills or triggers belong to the agent, `assistant-run-settings-in-use`. */
1825
2948
  removeRunSettings(agentId: string, removal?: RunConfigurationRemoval): Observable<void>;
1826
2949
  /**
@@ -1864,7 +2987,16 @@ declare class NhAssistantAgentRunApiService {
1864
2987
  * role; readers may open an existing one. Errors with `assistant-subject-access-denied` otherwise.
1865
2988
  */
1866
2989
  openThread(agentId: string, subjectType: string, subjectId: string): Observable<AgentThreadLookup>;
1867
- /** Starts the agent on the subject with the caller as initiator; needs the participant role. */
2990
+ /**
2991
+ * Runs the agent now on the subject with the caller as initiator. On an object it needs the
2992
+ * participant role; on the whole application (`nh-system`) the agent's run policy, by default the
2993
+ * administration policy. The receipt says what became of the start (`AgentTriggerOutcome`), for
2994
+ * example `waiting` while the agent is paused. A refusal errors with `NhAssistantApiError`:
2995
+ * `assistant-agent-does-not-work-on`, `assistant-agent-stopped`, `assistant-trigger-rate-limited`
2996
+ * and the other conflicts (409), `assistant-subject-access-denied` or `assistant-agent-forbidden`
2997
+ * (403), `assistant-agent-not-found` or `assistant-subject-not-found` (404),
2998
+ * `assistant-subject-invalid` (400) and `assistant-trigger-rolled-back` (503).
2999
+ */
1868
3000
  startAgent(request: StartAgentRequest): Observable<AgentTriggerReceipt>;
1869
3001
  /**
1870
3002
  * All agent work on one subject: the caller's role, every agent with a thread on it plus
@@ -1872,12 +3004,27 @@ declare class NhAssistantAgentRunApiService {
1872
3004
  * with `assistant-subject-not-found` when the caller has no role on the subject.
1873
3005
  */
1874
3006
  getSubjectWork(subjectType: string, subjectId: string, agentId?: string): Observable<AgentSubjectWork>;
3007
+ /**
3008
+ * The agents that work on the subject and that the caller may use, with whether the caller may run
3009
+ * each now, its newest run with the beginning of its result and its open proposals. The subject is
3010
+ * an object or the whole application (`nh-system`, `global` or `division-…`). Errors with
3011
+ * `assistant-subject-not-found` when the caller has no role on the subject.
3012
+ */
3013
+ getObjectAgents(subjectType: string, subjectId: string): Observable<AgentObjectAgents>;
1875
3014
  /**
1876
3015
  * Counts the agent work on at most `NH_ASSISTANT_MAX_SUBJECT_SUMMARY` subjects of one type in one
1877
3016
  * request, for badges in a list; one item per id in request order. `NhAssistantSubjectSummaryService`
1878
3017
  * batches and caches these requests for many badges.
1879
3018
  */
1880
3019
  summarizeSubjects(subjectType: string, subjectIds: readonly string[]): Observable<AgentSubjectSummaryList>;
3020
+ /**
3021
+ * Finds subjects of one type by name, at most `limit` (default 20, at most 50), among those the
3022
+ * caller may read; `query` has 2 to 100 characters. Errors with `assistant-subject-search-unavailable`
3023
+ * for a type the application does not search (people then give the subject's id), with
3024
+ * `assistant-subject-type-unknown` for an unknown type and with `assistant-validation` for a
3025
+ * query of the wrong length.
3026
+ */
3027
+ searchSubjects(subjectType: string, query: string, limit?: number): Observable<AgentSubjectSearch>;
1881
3028
  getRuns(conversationId: string): Observable<AgentRunList>;
1882
3029
  /** Who consulted the thread's agent through another assistant, newest first. */
1883
3030
  getConsultations(conversationId: string, page?: number, itemsPerPage?: number): Observable<AgentConsultationList>;
@@ -1895,11 +3042,49 @@ declare class NhAssistantAgentRunApiService {
1895
3042
  lookupProposals(approvalIds: readonly string[]): Observable<AgentProposalLookup>;
1896
3043
  getMemory(conversationId: string): Observable<AgentThreadMemory>;
1897
3044
  getArtifacts(conversationId: string): Observable<AgentArtifact[]>;
1898
- /** Downloads one artifact version with the host's credentials. */
3045
+ /**
3046
+ * Downloads one artifact version with the host's credentials. Rejects with `NhAssistantApiError`,
3047
+ * for example `assistant-artifact-not-found` or `assistant-network`.
3048
+ */
1899
3049
  downloadArtifact(conversationId: string, artifactId: string): Promise<Blob>;
3050
+ /**
3051
+ * The agent runs the caller may see, newest first: runs on objects the caller reads and runs for
3052
+ * the whole application whose agent's view policy the caller passes. Errors with
3053
+ * `assistant-run-filter-invalid` for an invalid filter, with the refused parts in `fieldErrors`
3054
+ * (`page`, `itemsPerPage`, `agentId`, `subjectType`, `subjectId`, `status`, `to`).
3055
+ */
3056
+ getRunHistory(filter?: AgentRunFilter): Observable<AgentRunHistory>;
3057
+ /**
3058
+ * The boards of the groups of agents the caller sees at least one agent of, ordered by name: an
3059
+ * agent that works on the whole application by its view policy, another by its required policy.
3060
+ */
3061
+ getBoards(): Observable<AgentBoardList>;
3062
+ /**
3063
+ * The board of one group: per agent what it works on, its latest result for the whole application,
3064
+ * its open proposals, whether the caller may run it now and whether something is new since the
3065
+ * caller's last visit. `divisionId` opens the board of one division the caller may work in. Fails
3066
+ * with `assistant-board-not-found` for an unknown group or one the caller sees no agent of, and with
3067
+ * `assistant-board-scope-invalid` for a malformed division id.
3068
+ */
3069
+ getBoard(groupId: string, divisionId?: string | null): Observable<AgentBoard>;
3070
+ /** Records that the caller looked at the board now, so it marks what is new after this visit. */
3071
+ visitBoard(groupId: string, divisionId?: string | null): Observable<AgentBoardVisit>;
3072
+ /**
3073
+ * One run with its whole result, its proposals and its files. Fails with `assistant-run-not-found`
3074
+ * for an unknown run and for one the caller may not see.
3075
+ */
3076
+ getRunResult(runId: string): Observable<AgentRunResult>;
3077
+ /**
3078
+ * Downloads one file a run saved, with the host's credentials. Rejects with `NhAssistantApiError`,
3079
+ * for example `assistant-artifact-not-found`, `assistant-run-not-found` or `assistant-network`.
3080
+ */
3081
+ downloadRunArtifact(runId: string, artifactId: string): Promise<Blob>;
1900
3082
  /** Cancels a run at its next safe point and withdraws its open proposals; needs the participant role. */
1901
3083
  cancelRun(runId: string): Observable<void>;
1902
- /** Resumes or restarts a failed or cancelled run; needs the approver role. */
3084
+ /**
3085
+ * Resumes or restarts a failed or cancelled run; needs the approver role. A restart starts the agent
3086
+ * again like `startAgent`, with the same outcomes and refusals; a resume answers `queued`.
3087
+ */
1903
3088
  retryRun(runId: string, mode: AgentRunRetryMode): Observable<AgentTriggerReceipt>;
1904
3089
  /** Pending proposals the caller may decide, sorted by expiry. */
1905
3090
  getInbox(filter?: AgentInboxFilter): Observable<AgentInbox>;
@@ -1979,7 +3164,8 @@ type NhAssistantLiveState = 'off' | 'connecting' | 'connected' | 'reconnecting'
1979
3164
  * Live updates of the assistant hub: conversation changes, read positions, removals, the turn
1980
3165
  * events of other sessions and changes to the work of agents that run on their own. Connects only
1981
3166
  * while the store asks for it, reconnects on its own and emits `resync` after every (re)connect,
1982
- * because updates sent while disconnected are lost.
3167
+ * because updates sent while disconnected are lost. The work of agents for the whole application
3168
+ * lists no members, so it arrives only while a screen watches it (`watchAgentWork`).
1983
3169
  */
1984
3170
  declare class NhAssistantLiveService {
1985
3171
  private readonly config;
@@ -1997,6 +3183,9 @@ declare class NhAssistantLiveService {
1997
3183
  private hubUrl;
1998
3184
  private revision;
1999
3185
  private restartTimer?;
3186
+ /** The screens that watch the work of agents for the whole application. */
3187
+ private agentWorkWatchers;
3188
+ private watchTimer?;
2000
3189
  readonly changed$: Observable<LiveConversationChanged>;
2001
3190
  readonly read$: Observable<LiveConversationRead>;
2002
3191
  readonly removed$: Observable<LiveConversationRemoved>;
@@ -2016,8 +3205,24 @@ declare class NhAssistantLiveService {
2016
3205
  * signed-in user changed.
2017
3206
  */
2018
3207
  connect(hubPath: string | null, restart?: boolean): Promise<void>;
3208
+ /**
3209
+ * Follows the work of agents for the whole application, such as their proposals and runs, while the
3210
+ * returned function has not been called; a screen that shows it, such as the approval inbox or a
3211
+ * board, watches it while it is shown. The whole application lists no members, so the hub sends its
3212
+ * agents' work only to connections that watch it: it joins the work the server decides the person
3213
+ * may read, the agent's view policy included, renews the watch when the server says and after every
3214
+ * reconnect, and so checks the person's rights again. The watch ends when the last screen releases
3215
+ * it. Without a connection nothing arrives and screens keep their own reload.
3216
+ */
3217
+ watchAgentWork(): () => void;
2019
3218
  stop(): Promise<void>;
2020
3219
  private build;
3220
+ /**
3221
+ * Asks the hub to watch the work of agents for the whole application for the screens that watch it,
3222
+ * and schedules the renewal the server asks for. An older server without watching, or a failed call,
3223
+ * is tried again later; live updates stay optional.
3224
+ */
3225
+ private renewAgentWorkWatch;
2021
3226
  /** Starts over after the automatic reconnect gave up or the first start failed. */
2022
3227
  private scheduleRestart;
2023
3228
  private token;
@@ -2050,9 +3255,37 @@ interface NhAssistantQueuedMessage {
2050
3255
  conversationId: string;
2051
3256
  text: string;
2052
3257
  state: 'preparing' | 'queued' | 'sending' | 'failed';
3258
+ /** The files the message carries, uploaded before it was queued. */
3259
+ files?: readonly FileReference[];
3260
+ }
3261
+ /**
3262
+ * A file the person attaches to the next message of the open conversation: while it uploads, once
3263
+ * the application stored it, or why it cannot be attached. Attachments live only in this tab's
3264
+ * memory.
3265
+ */
3266
+ interface NhAssistantAttachment {
3267
+ /** The attachment's id in this tab. */
3268
+ id: string;
3269
+ name: string;
3270
+ /** The media type the upload declares, lowercase. */
3271
+ mediaType: string;
3272
+ /** The size in bytes. */
3273
+ size: number;
3274
+ state: 'uploading' | 'uploaded' | 'failed';
3275
+ /** The share of the file sent so far, from 0 to 1. */
3276
+ progress: number;
3277
+ /** The stored file, once uploaded; the message carries its reference. */
3278
+ file: FileReference | null;
3279
+ /** Why the file is not attached, for a failed attachment. */
3280
+ error: NhAssistantError | null;
2053
3281
  }
2054
3282
  /** Notice code for a completed turn that produced no answer text and no server code. */
2055
3283
  declare const NH_ASSISTANT_NO_ANSWER_NOTICE_CODE = "assistant-no-answer";
3284
+ /**
3285
+ * Notice code for a message that waits for the next run of the agent working in its thread: the
3286
+ * server answered `202` with the trigger receipt, and the run adds the message, with its files.
3287
+ */
3288
+ declare const NH_ASSISTANT_MESSAGE_QUEUED_NOTICE_CODE = "assistant-message-queued";
2056
3289
  /**
2057
3290
  * Who decides an approval the current user cannot decide: `turn`, the person whose turn created
2058
3291
  * it in a chat; `approver`, an approver of the agent thread's subject; `other-approver`, another
@@ -2131,7 +3364,12 @@ declare class NhAssistantStore {
2131
3364
  private readonly submittingState;
2132
3365
  /** Agent proposals the current user rejected in this session and may give feedback on. */
2133
3366
  private readonly feedbackApprovalsState;
3367
+ /** The attachments of the next message per conversation; `''` for a new conversation. */
3368
+ private readonly attachmentsState;
2134
3369
  private destroyed;
3370
+ private readonly uploadSubscriptions;
3371
+ /** The conversation an attachment of a new conversation creates, once for every file chosen meanwhile. */
3372
+ private attachmentConversation;
2135
3373
  private readonly streams;
2136
3374
  private readonly cancelTimers;
2137
3375
  /** Pending reloads of agent threads after live agent-work updates, per conversation. */
@@ -2195,6 +3433,19 @@ declare class NhAssistantStore {
2195
3433
  readonly queuePaused: _angular_core.Signal<boolean>;
2196
3434
  /** Steering cancels the active turn before sending the selected correction. */
2197
3435
  readonly canSteer: _angular_core.Signal<boolean>;
3436
+ /**
3437
+ * What the person may attach to the next message: the uploads of the open conversation's agent, or
3438
+ * of the selected agent for a new conversation. `null` when nothing can be attached: the server
3439
+ * offers no uploads for the agent, the conversation is archived, or the person only reads the
3440
+ * agent's thread.
3441
+ */
3442
+ readonly uploads: _angular_core.Signal<AgentUploads | null>;
3443
+ /** The attachments of the next message of the open conversation, in the order they were chosen. */
3444
+ readonly attachments: _angular_core.Signal<readonly NhAssistantAttachment[]>;
3445
+ /** The stored files of the open conversation's next message, for `submit`. */
3446
+ readonly attachedFiles: _angular_core.Signal<FileReference[]>;
3447
+ /** True while a file of the next message still uploads; the message waits for it. */
3448
+ readonly uploading: _angular_core.Signal<boolean>;
2198
3449
  /** The owner and participants of the open conversation; empty while it is not shared. */
2199
3450
  readonly members: _angular_core.Signal<ConversationMember[]>;
2200
3451
  /** True when the current user owns the open conversation (or it is new). */
@@ -2244,16 +3495,18 @@ declare class NhAssistantStore {
2244
3495
  /**
2245
3496
  * Sends a user message. Creates a conversation with the selected agent when none is open,
2246
3497
  * shows the message optimistically and applies the streamed events. Other conversations keep
2247
- * their own turns. Resolves `false` when the message was not accepted.
3498
+ * their own turns. Resolves `false` when the message was not accepted. `files` are uploaded
3499
+ * attachments, such as `attachedFiles()`; once the message is accepted, the attachments of the
3500
+ * conversation leave the composer.
2248
3501
  */
2249
- send(text: string): Promise<boolean>;
3502
+ send(text: string, files?: readonly FileReference[]): Promise<boolean>;
2250
3503
  /**
2251
3504
  * Sends immediately when the conversation accepts a message, otherwise appends to the
2252
3505
  * conversation's FIFO queue. A shown error alone does not hold a message back while nothing is
2253
3506
  * queued: the person asks again, for example after a failed turn. Queued messages still wait
2254
- * for an explicit `resumeQueue` after Stop or a failure.
3507
+ * for an explicit `resumeQueue` after Stop or a failure. A queued message keeps its `files`.
2255
3508
  */
2256
- submit(text: string): Promise<boolean>;
3509
+ submit(text: string, files?: readonly FileReference[]): Promise<boolean>;
2257
3510
  /** Edits an unsent queued message without replacing the composer's current draft. */
2258
3511
  updateQueuedMessage(id: string, text: string): boolean;
2259
3512
  removeQueuedMessage(id: string): void;
@@ -2306,6 +3559,27 @@ declare class NhAssistantStore {
2306
3559
  setPageContextExcluded(excluded: boolean): void;
2307
3560
  /** Returns and clears the draft of a message that was not accepted. */
2308
3561
  consumeRestoredDraft(): string | null;
3562
+ /**
3563
+ * Attaches files to the next message of the open conversation and uploads them at once. Each
3564
+ * file is checked first against `uploads()`: the most files of one message, the accepted media
3565
+ * types and the largest size; a file that fails stays as a failed attachment with its code and
3566
+ * is never uploaded. A new conversation is created first, because an upload belongs to one.
3567
+ */
3568
+ attach(files: readonly File[]): Promise<void>;
3569
+ /** Removes an attachment of the next message; an upload in progress stops. */
3570
+ removeAttachment(attachmentId: string): void;
3571
+ private startUpload;
3572
+ private attachmentsOf;
3573
+ private patchAttachments;
3574
+ /** Moves the attachments of a new conversation to the conversation that was created for them. */
3575
+ private moveAttachments;
3576
+ /**
3577
+ * The attachments a message took leave the composer, and with them the failed ones; files that
3578
+ * still upload stay for the next message.
3579
+ */
3580
+ private releaseAttachments;
3581
+ /** Stops the uploads of a conversation, or of every conversation, and forgets their attachments. */
3582
+ private dropAttachments;
2309
3583
  private loadConversation;
2310
3584
  private setActive;
2311
3585
  /**
@@ -2532,7 +3806,144 @@ declare const NH_ASSISTANT_CONVERSATION_FRAGMENT = "nh-assistant-conversation";
2532
3806
  /** Builds the default invitation link: the current page with the join fragment. */
2533
3807
  declare function nhAssistantShareLink(conversationId: string, token: string): string;
2534
3808
 
2535
- 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';
3809
+ /** The `type` of the message the assistant's OAuth callback page posts to its opener. */
3810
+ declare const NH_ASSISTANT_MCP_AUTHORIZATION_MESSAGE = "nh-assistant-mcp-authorization";
3811
+ /**
3812
+ * What an authorization window reports: the flow and its one-time completion code, which
3813
+ * `POST mcp-connections/complete` turns into the connection with the caller's own session, or the
3814
+ * failure code of the callback (for example `assistant-mcp-authorization-failed`).
3815
+ */
3816
+ type NhAssistantMcpAuthorizationOutcome = {
3817
+ flowId: string;
3818
+ completionCode: string;
3819
+ code?: undefined;
3820
+ } | {
3821
+ flowId: string | null;
3822
+ code: string;
3823
+ completionCode?: undefined;
3824
+ };
3825
+ /** A window opened for one authorization. */
3826
+ interface NhAssistantMcpAuthorizationHandle {
3827
+ /** Shows the authorization and emits its outcome once, then completes. */
3828
+ authorize(start: McpAuthorizationStart): Observable<NhAssistantMcpAuthorizationOutcome>;
3829
+ /** Closes the window, for example when starting the authorization failed. */
3830
+ close(): void;
3831
+ }
3832
+ /**
3833
+ * Opens MCP authorizations in the person's browser. `open()` runs in the click handler, before the
3834
+ * authorization URL is known, so popup blockers allow the window.
3835
+ */
3836
+ interface NhAssistantMcpAuthorizationWindow {
3837
+ open(): NhAssistantMcpAuthorizationHandle;
3838
+ }
3839
+ /**
3840
+ * The authorization window of the assistant components. The default opens a popup and waits for the
3841
+ * callback page's message; the testing package replaces it for the mock back-end.
3842
+ */
3843
+ declare const NH_ASSISTANT_MCP_AUTHORIZATION_WINDOW: InjectionToken<NhAssistantMcpAuthorizationWindow>;
3844
+ /**
3845
+ * Opens the authorization in a popup. Only a message from that popup, sent by the assistant's
3846
+ * callback page (`callbackOrigin`), with the started flow is accepted; the completion code is useless
3847
+ * without the starter's own session. A closed popup
3848
+ * without a message reports `assistant-mcp-authorization-cancelled`, a blocked one
3849
+ * `assistant-mcp-popup-blocked`.
3850
+ */
3851
+ declare class NhAssistantMcpPopupAuthorizationWindow implements NhAssistantMcpAuthorizationWindow {
3852
+ private readonly document;
3853
+ constructor(document: Document);
3854
+ open(): NhAssistantMcpAuthorizationHandle;
3855
+ }
3856
+ /**
3857
+ * Reads the outcome of a redirect-mode authorization from a URL fragment
3858
+ * (`#nh-mcp-flow=…&nh-mcp-code=…` or `#nh-mcp-error=…&nh-mcp-message-key=…`); null when the fragment
3859
+ * has none. The text of a failure comes from its code. Remove the fragment from the address bar after
3860
+ * reading it.
3861
+ */
3862
+ declare function nhAssistantMcpAuthorizationFromFragment(fragment: string): NhAssistantMcpAuthorizationOutcome | null;
3863
+ /**
3864
+ * Runs one authorization: starts it, shows it in the window opened before, and completes it with
3865
+ * the caller's own session. Errors with `NhAssistantApiError`, also for the window's failure codes.
3866
+ */
3867
+ declare function nhAssistantConnectMcp(handle: NhAssistantMcpAuthorizationHandle, start: Observable<McpAuthorizationStart>, complete: (request: McpCompleteRequest) => Observable<McpCompletion>): Observable<McpCompletion>;
3868
+
3869
+ /**
3870
+ * The outcome of an authorization the page returned from in redirect mode: the activated connection,
3871
+ * or the failure code to show. `serverId` names the server whose connection the page left for, when
3872
+ * this browser tab remembered it, so a screen shows the outcome at that server only.
3873
+ */
3874
+ type NhAssistantMcpReturnOutcome = {
3875
+ completion: McpCompletion;
3876
+ code?: undefined;
3877
+ serverId?: string | null;
3878
+ } | {
3879
+ code: string;
3880
+ completion?: undefined;
3881
+ serverId?: string | null;
3882
+ };
3883
+ /**
3884
+ * Connects MCP accounts the way the host configured (`mcpConnectMode`): in a popup that the click
3885
+ * opens, or by sending the page to the authorization server and back. Every authorization completes
3886
+ * with the caller's own session.
3887
+ */
3888
+ declare class NhAssistantMcpConnectService {
3889
+ private readonly api;
3890
+ private readonly config;
3891
+ private readonly authorizationWindow;
3892
+ private readonly document;
3893
+ /**
3894
+ * The outcome of the redirect-mode authorization this page opened with, until a screen showed it.
3895
+ * `nh-assistant-connection-required` shows the outcome of its server without taking it; the
3896
+ * connection lists of the preferences and the administration show it and take it.
3897
+ */
3898
+ readonly returned: _angular_core.WritableSignal<NhAssistantMcpReturnOutcome | null>;
3899
+ /** Whether authorizations leave the page instead of opening a popup. */
3900
+ get redirects(): boolean;
3901
+ /**
3902
+ * Connects the caller's own account to a server each person connects to. Call it in the click
3903
+ * handler, so the popup is allowed. In redirect mode the page leaves and the observable never
3904
+ * emits; the page completes the authorization when it returns.
3905
+ */
3906
+ connect(serverId: string, options?: {
3907
+ allowBackgroundUse?: boolean;
3908
+ }): Observable<McpCompletion>;
3909
+ /**
3910
+ * Runs any authorization start, for example an administrator's organization connection, in the
3911
+ * configured mode. `serverId` lets the page show the outcome at that server after a redirect.
3912
+ */
3913
+ run(start: (request: McpAuthorizeRequest) => Observable<McpAuthorizationStart>, serverId?: string): Observable<McpCompletion>;
3914
+ /** Leaves the page for an authorization in redirect mode. */
3915
+ navigate(url: string): void;
3916
+ /**
3917
+ * Completes a redirect-mode authorization when the page opened with its fragment, removes the
3918
+ * fragment from the address and records the outcome in `returned`: the connection, or the code of
3919
+ * whatever failed, also when completing it failed. Emits null without a fragment and never errors.
3920
+ */
3921
+ completeReturn(): Observable<NhAssistantMcpReturnOutcome | null>;
3922
+ private record;
3923
+ private removeFragment;
3924
+ /** Remembers in this tab which server's connection the page leaves for. */
3925
+ private rememberLeftFor;
3926
+ /** The server this tab left for, forgotten once read. */
3927
+ private takeLeftFor;
3928
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantMcpConnectService, never>;
3929
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NhAssistantMcpConnectService>;
3930
+ }
3931
+
3932
+ /** Converts any failure into a user-facing code and translation key, never raw text. */
3933
+ declare function toNhAssistantError(error: unknown): NhAssistantError;
3934
+ /** The error of a code without a message key of its own, such as a code a callback page reported. */
3935
+ declare function nhAssistantErrorOf(code: string): NhAssistantError;
3936
+ /** Translation keys for an error, from the most to the least specific. */
3937
+ declare function nhAssistantErrorKeys(error: NhAssistantError | null): string[];
3938
+ /**
3939
+ * Translation keys for a bare failure code, such as a run's `failureCode`: the registered text of
3940
+ * the code, then the generic text. Empty without a code.
3941
+ */
3942
+ declare function nhAssistantCodeKeys(code: string | null | undefined): string[];
3943
+ /** Dash-case identifiers as the contract requires for agent and MCP server ids. */
3944
+ declare const NH_ASSISTANT_DASH_CASE: RegExp;
3945
+
3946
+ 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';
2536
3947
  /**
2537
3948
  * Optional icon classes of the host's icon library, for example `{ close: 'ph ph-x' }`.
2538
3949
  * Icons without a class use the library's small built-in outline glyphs.
@@ -2558,7 +3969,7 @@ declare class NhAssistantLauncherComponent {
2558
3969
  readonly store: NhAssistantStore;
2559
3970
  readonly panel: NhAssistantPanelService;
2560
3971
  readonly waitingForApproval: _angular_core.Signal<boolean>;
2561
- readonly badge: _angular_core.Signal<"running" | "unread" | "waiting" | null>;
3972
+ readonly badge: _angular_core.Signal<"running" | "waiting" | "unread" | null>;
2562
3973
  readonly unreadLabel: _angular_core.Signal<string>;
2563
3974
  readonly label: _angular_core.Signal<"nh-assistant.launcher.close" | "nh-assistant.launcher.open">;
2564
3975
  constructor();
@@ -2576,12 +3987,19 @@ declare const NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD = 200;
2576
3987
  /**
2577
3988
  * The messages of a conversation as a live log. Assistant text renders as sanitized
2578
3989
  * Markdown, consecutive tool calls as one collapsible group that counts along, and
2579
- * approvals as cards. Messages a trigger wrote into an agent thread read as events, not as
2580
- * a person. While a turn runs without visible progress, a working indicator shows the
2581
- * elapsed time. The thread follows new content while the user is at the bottom.
3990
+ * approvals as cards. The files a person attached show by name, type and size. Messages a
3991
+ * trigger wrote into an agent thread read as events, not as a person. While a turn runs
3992
+ * without visible progress, a working indicator shows the elapsed time. The thread follows
3993
+ * new content while the user is at the bottom.
2582
3994
  */
2583
3995
  declare class NhAssistantThreadComponent {
2584
3996
  private readonly injector;
3997
+ private readonly translate;
3998
+ /** The type and size of an attached file, in the current language. */
3999
+ fileMeta(file: FilePart): {
4000
+ type: string;
4001
+ size: string;
4002
+ };
2585
4003
  readonly messages: _angular_core.InputSignal<readonly Message[]>;
2586
4004
  readonly streaming: _angular_core.InputSignal<boolean>;
2587
4005
  readonly deciding: _angular_core.InputSignal<boolean>;
@@ -2605,7 +4023,14 @@ declare class NhAssistantThreadComponent {
2605
4023
  readonly approvalDecision: _angular_core.OutputEmitterRef<ApprovalDecision>;
2606
4024
  /** The decision about an approval card together with its approval id. */
2607
4025
  readonly approvalChoice: _angular_core.OutputEmitterRef<NhAssistantApprovalChoice>;
4026
+ /**
4027
+ * The question to ask again after the viewer connected an MCP server from a connection card: the
4028
+ * text of the user message the card answered. The panel sends it.
4029
+ */
4030
+ readonly retryMessage: _angular_core.OutputEmitterRef<string>;
2608
4031
  private readonly names;
4032
+ /** Asks the question again that the assistant message with a connection card answered. */
4033
+ retryAfterConnect(message: Message): void;
2609
4034
  readonly virtualThreshold = 200;
2610
4035
  readonly virtual: _angular_core.Signal<boolean>;
2611
4036
  /**
@@ -2636,7 +4061,7 @@ declare class NhAssistantThreadComponent {
2636
4061
  private scrollElement;
2637
4062
  private scrollToEnd;
2638
4063
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantThreadComponent, never>;
2639
- 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; }; }, { "approvalDecision": "approvalDecision"; "approvalChoice": "approvalChoice"; }, never, never, true, never>;
4064
+ 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; }; }, { "approvalDecision": "approvalDecision"; "approvalChoice": "approvalChoice"; "retryMessage": "retryMessage"; }, never, never, true, never>;
2640
4065
  }
2641
4066
 
2642
4067
  /**
@@ -2658,7 +4083,7 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
2658
4083
  readonly showConversations: _angular_core.WritableSignal<boolean>;
2659
4084
  readonly showPreferences: _angular_core.WritableSignal<boolean>;
2660
4085
  readonly showShare: _angular_core.WritableSignal<boolean>;
2661
- readonly shareSection: _angular_core.WritableSignal<"members" | "link" | "all">;
4086
+ readonly shareSection: _angular_core.WritableSignal<"members" | "all" | "link">;
2662
4087
  readonly notificationError: _angular_core.WritableSignal<NhAssistantError | null>;
2663
4088
  readonly notificationsLabel: _angular_core.Signal<"nh-assistant.panel.notifications-off" | "nh-assistant.panel.notifications-on">;
2664
4089
  readonly adminRoute: string | any[] | null;
@@ -2701,6 +4126,10 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
2701
4126
  openConversation(conversationId: string): void;
2702
4127
  deleteConversation(conversationId: string): void;
2703
4128
  send(text: string): void;
4129
+ /** Uploads the files the person attached to the next message. */
4130
+ attach(files: File[]): void;
4131
+ /** The names of the files a queued message carries, as the queue lists them. */
4132
+ fileNames(files: readonly FileReference[]): string;
2704
4133
  editQueuedMessage(id: string, text: string): void;
2705
4134
  changeQueuedDraft(event: Event): void;
2706
4135
  saveQueuedMessage(id: string): void;
@@ -2741,7 +4170,10 @@ declare class NhAssistantConversationListComponent {
2741
4170
 
2742
4171
  /**
2743
4172
  * Message input. Enter sends when sending is available; Shift+Enter inserts a new line.
2744
- * Drafting remains available while the assistant runs or waits for approval.
4173
+ * Drafting remains available while the assistant runs or waits for approval. With `uploads`, an
4174
+ * attach button chooses files for the next message; the host uploads them and passes them back as
4175
+ * `attachments`, which show their progress, or why they cannot be attached, at the control. Sending
4176
+ * waits while a file uploads.
2745
4177
  */
2746
4178
  declare class NhAssistantComposerComponent {
2747
4179
  /** Disables the editor only when the conversation itself cannot accept a draft. */
@@ -2761,20 +4193,45 @@ declare class NhAssistantComposerComponent {
2761
4193
  readonly maxLength: _angular_core.InputSignal<number | null>;
2762
4194
  /** Text to put back into the input, for example a message the server did not accept. */
2763
4195
  readonly restore: _angular_core.InputSignal<string | null>;
4196
+ /**
4197
+ * What the person may attach, for example `NhAssistantStore.uploads()`; `null` hides the attach
4198
+ * button.
4199
+ */
4200
+ readonly uploads: _angular_core.InputSignal<AgentUploads | null>;
4201
+ /** The attachments of the next message, for example `NhAssistantStore.attachments()`. */
4202
+ readonly attachments: _angular_core.InputSignal<readonly NhAssistantAttachment[]>;
2764
4203
  readonly send: _angular_core.OutputEmitterRef<string>;
2765
4204
  readonly cancel: _angular_core.OutputEmitterRef<void>;
2766
4205
  readonly restored: _angular_core.OutputEmitterRef<void>;
4206
+ /** Files the person chose to attach, for example for `NhAssistantStore.attach`. */
4207
+ readonly attach: _angular_core.OutputEmitterRef<File[]>;
4208
+ /** The id of an attachment the person removed, for example for `NhAssistantStore.removeAttachment`. */
4209
+ readonly removeAttachment: _angular_core.OutputEmitterRef<string>;
2767
4210
  private readonly host;
4211
+ private readonly translate;
2768
4212
  private readonly textarea;
4213
+ private readonly attachButton;
2769
4214
  private ownedFocus;
2770
4215
  private previousBusy;
2771
4216
  readonly inputId: string;
2772
4217
  readonly hintId: string;
4218
+ readonly attachHintId: string;
4219
+ readonly attachmentsId: string;
2773
4220
  readonly text: _angular_core.WritableSignal<string>;
2774
4221
  readonly length: _angular_core.Signal<number>;
2775
4222
  readonly tooLong: _angular_core.Signal<boolean>;
2776
4223
  readonly showCounter: _angular_core.Signal<boolean>;
4224
+ /** True while a file of the next message still uploads. */
4225
+ readonly uploading: _angular_core.Signal<boolean>;
2777
4226
  readonly canSend: _angular_core.Signal<boolean>;
4227
+ /** The `accept` attribute of the file input. */
4228
+ readonly accept: _angular_core.Signal<string>;
4229
+ /** The values the attachment texts name: the accepted types, the largest size and the most files. */
4230
+ readonly uploadParams: _angular_core.Signal<{
4231
+ types: string;
4232
+ max: string;
4233
+ count: number;
4234
+ }>;
2778
4235
  constructor();
2779
4236
  onFocusIn(): void;
2780
4237
  onFocusOut(event: FocusEvent): void;
@@ -2782,9 +4239,18 @@ declare class NhAssistantComposerComponent {
2782
4239
  onKeydown(event: KeyboardEvent): void;
2783
4240
  onSubmit(event: SubmitEvent): void;
2784
4241
  submit(): void;
4242
+ /** Hands the chosen files to the host and empties the input, so the same file can be chosen again. */
4243
+ onFilesChosen(event: Event): void;
4244
+ /** Removes an attachment and keeps the keyboard in the composer, on the attach button. */
4245
+ remove(attachment: NhAssistantAttachment): void;
4246
+ /** The translation keys of why an attachment failed, from the composer's own text to the generic one. */
4247
+ errorKeys(attachment: NhAssistantAttachment): string[];
4248
+ percent(attachment: NhAssistantAttachment): number;
4249
+ /** A size in bytes in the current language, such as `1.4 MB`. */
4250
+ size(bytes: number): string;
2785
4251
  private restoreOwnedFocus;
2786
4252
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantComposerComponent, never>;
2787
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantComposerComponent, "nh-assistant-composer", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "sendDisabled": { "alias": "sendDisabled"; "required": false; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; "queueWhileBusy": { "alias": "queueWhileBusy"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "statusActor": { "alias": "statusActor"; "required": false; "isSignal": true; }; "canStop": { "alias": "canStop"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "restore": { "alias": "restore"; "required": false; "isSignal": true; }; }, { "send": "send"; "cancel": "cancel"; "restored": "restored"; }, never, ["[nhAssistantComposerControls]"], true, never>;
4253
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantComposerComponent, "nh-assistant-composer", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "sendDisabled": { "alias": "sendDisabled"; "required": false; "isSignal": true; }; "busy": { "alias": "busy"; "required": false; "isSignal": true; }; "queueWhileBusy": { "alias": "queueWhileBusy"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "statusActor": { "alias": "statusActor"; "required": false; "isSignal": true; }; "canStop": { "alias": "canStop"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "restore": { "alias": "restore"; "required": false; "isSignal": true; }; "uploads": { "alias": "uploads"; "required": false; "isSignal": true; }; "attachments": { "alias": "attachments"; "required": false; "isSignal": true; }; }, { "send": "send"; "cancel": "cancel"; "restored": "restored"; "attach": "attach"; "removeAttachment": "removeAttachment"; }, never, ["[nhAssistantComposerControls]"], true, never>;
2788
4254
  }
2789
4255
 
2790
4256
  /** Shows one tool invocation with its status and expandable input and result previews. */
@@ -2980,8 +4446,9 @@ declare class NhAssistantAgentPickerComponent {
2980
4446
  /** Maximum length of the user's own instructions. */
2981
4447
  declare const NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS = 1000;
2982
4448
  /**
2983
- * The user's own assistant preferences: desktop notifications, style, form of address,
2984
- * answer length and optional instructions. Notifications apply immediately; the other
4449
+ * The user's own assistant preferences: desktop notifications, background use of MCP servers
4450
+ * with the user's own account, style, form of address, answer length and optional instructions.
4451
+ * Notifications and background use apply immediately; the other
2985
4452
  * preferences steer style only and are saved together, below the application context and
2986
4453
  * agent instructions.
2987
4454
  */
@@ -3027,6 +4494,75 @@ declare class NhAssistantPreferencesComponent {
3027
4494
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantPreferencesComponent, "nh-assistant-preferences", never, {}, { "closed": "closed"; "saved": "saved"; }, never, never, true, never>;
3028
4495
  }
3029
4496
 
4497
+ /**
4498
+ * The caller's own MCP accounts: servers each person connects to with OAuth, with Connect,
4499
+ * Connect again and Disconnect, and the consent to background use of servers that run with the
4500
+ * caller's own account. Each change applies at once. Renders nothing while no server asks for it,
4501
+ * so most applications never show it.
4502
+ */
4503
+ declare class NhAssistantMcpConnectionsComponent {
4504
+ private readonly api;
4505
+ private readonly connector;
4506
+ private readonly store;
4507
+ private loadSubscription?;
4508
+ private updateSubscription?;
4509
+ readonly id: string;
4510
+ readonly connections: _angular_core.WritableSignal<McpConnection[]>;
4511
+ readonly loadFailed: _angular_core.WritableSignal<boolean>;
4512
+ /** The server whose consent or connection is being changed. */
4513
+ readonly busy: _angular_core.WritableSignal<string | null>;
4514
+ readonly confirmingDisconnect: _angular_core.WritableSignal<string | null>;
4515
+ /** The latest change to announce, per server. */
4516
+ readonly notice: _angular_core.WritableSignal<{
4517
+ serverId: string;
4518
+ key: string;
4519
+ } | null>;
4520
+ readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
4521
+ readonly errorKeys: _angular_core.Signal<string[]>;
4522
+ /** Whether any listed server is one the caller connects with OAuth. */
4523
+ readonly connectsAccounts: _angular_core.Signal<boolean>;
4524
+ constructor();
4525
+ load(): void;
4526
+ /** The agents' names as the chat shows them; an agent the chat does not list shows its id. */
4527
+ agentKeys(connection: McpConnection): string[];
4528
+ toggle(connection: McpConnection, event: Event): void;
4529
+ /** Connects the caller's own account; call from the click, so the popup is allowed. */
4530
+ connect(connection: McpConnection): void;
4531
+ disconnect(connection: McpConnection): void;
4532
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantMcpConnectionsComponent, never>;
4533
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantMcpConnectionsComponent, "nh-assistant-mcp-connections", never, {}, {}, never, never, true, never>;
4534
+ }
4535
+
4536
+ /**
4537
+ * The card of a turn that went on without an MCP server the person who asked has to connect. It
4538
+ * connects the viewer's own account, in a popup or by redirect as the host configured, and then
4539
+ * offers to ask again. After a redirect the page returns to, the card of that server shows how the
4540
+ * connection ended: connected, or the failure with its translated code.
4541
+ */
4542
+ declare class NhAssistantConnectionRequiredComponent {
4543
+ private readonly connections;
4544
+ private subscription?;
4545
+ readonly part: _angular_core.InputSignal<ConnectionRequiredPart>;
4546
+ /** Whether "Ask again" is offered once the account is connected. */
4547
+ readonly canRetry: _angular_core.InputSignal<boolean>;
4548
+ /** Asks the question of the turn again after the account was connected. */
4549
+ readonly retry: _angular_core.OutputEmitterRef<void>;
4550
+ readonly id: string;
4551
+ readonly state: _angular_core.WritableSignal<"failed" | "idle" | "connected" | "connecting">;
4552
+ /** Why connecting failed, as a code and translation key. */
4553
+ readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
4554
+ /** The code of `error`. */
4555
+ readonly errorCode: _angular_core.Signal<string | null>;
4556
+ readonly errorKeys: _angular_core.Signal<string[]>;
4557
+ /** The connect button names connecting again when the person had connected before. */
4558
+ readonly again: _angular_core.Signal<boolean>;
4559
+ constructor();
4560
+ connect(): void;
4561
+ private showReturned;
4562
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantConnectionRequiredComponent, never>;
4563
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantConnectionRequiredComponent, "nh-assistant-connection-required", never, { "part": { "alias": "part"; "required": true; "isSignal": true; }; "canRetry": { "alias": "canRetry"; "required": false; "isSignal": true; }; }, { "retry": "retry"; }, never, never, true, never>;
4564
+ }
4565
+
3030
4566
  /**
3031
4567
  * Sharing of the open conversation. The owner creates, copies, renews or stops an invitation
3032
4568
  * link, invites colleagues through the application's directory when it offers one, and removes
@@ -3040,7 +4576,7 @@ declare class NhAssistantShareComponent {
3040
4576
  /** Emitted when the user leaves the view. */
3041
4577
  readonly closed: _angular_core.OutputEmitterRef<void>;
3042
4578
  /** Show the invitation link, participants, or both (the default for custom hosts). */
3043
- readonly section: _angular_core.InputSignal<"members" | "link" | "all">;
4579
+ readonly section: _angular_core.InputSignal<"members" | "all" | "link">;
3044
4580
  readonly id: string;
3045
4581
  readonly conversation: _angular_core.Signal<Conversation | null>;
3046
4582
  readonly isOwner: _angular_core.Signal<boolean>;
@@ -3126,6 +4662,13 @@ declare class NhAssistantTranslatePipe implements PipeTransform {
3126
4662
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantTranslatePipe, "nhAssistantTranslate", true>;
3127
4663
  }
3128
4664
 
4665
+ /**
4666
+ * Watches the work of agents for the whole application while the calling component lives, so their
4667
+ * proposals and runs arrive as live agent-work updates although the whole application lists no
4668
+ * members (see `NhAssistantLiveService.watchAgentWork`). Call it in an injection context, for example
4669
+ * a component constructor, of a screen that shows that work, such as the approval inbox or a board.
4670
+ */
4671
+ declare function nhAssistantWatchAgentWork(): void;
3129
4672
  /**
3130
4673
  * Calls `reload` once a burst of live agent-work updates that `matches` has settled, and after
3131
4674
  * every (re)connect of the hub, because updates sent while it was disconnected are lost. Without a
@@ -3134,12 +4677,128 @@ declare class NhAssistantTranslatePipe implements PipeTransform {
3134
4677
  */
3135
4678
  declare function nhAssistantReloadOnAgentWork(matches: (change: LiveAgentWorkChanged) => boolean, reload: () => void): void;
3136
4679
 
3137
- /** Converts any failure into a user-facing code and translation key, never raw text. */
3138
- declare function toNhAssistantError(error: unknown): NhAssistantError;
3139
- /** Translation keys for an error, from the most to the least specific. */
3140
- declare function nhAssistantErrorKeys(error: NhAssistantError | null): string[];
3141
- /** Dash-case identifiers as the contract requires for agent and MCP server ids. */
3142
- declare const NH_ASSISTANT_DASH_CASE: RegExp;
4680
+ /** One choice of a picker: the stored value, its name and what it means. */
4681
+ interface NhAssistantPickerOption {
4682
+ value: string;
4683
+ label: string;
4684
+ description?: string | null;
4685
+ }
4686
+ /**
4687
+ * A searchable choice for the administration (internal): a combobox with a listbox popup in the ARIA
4688
+ * 1.2 pattern. Typing filters the options on name and description, the arrow keys move, Enter
4689
+ * chooses and Escape closes. With `search` it asks the server instead, after `minQueryLength`
4690
+ * characters; a failed search says why below the field, with its translated code, and offers to
4691
+ * search again instead of claiming that nothing was found. `noneLabel` adds an explicit empty
4692
+ * choice, emitted as `''`.
4693
+ */
4694
+ declare class NhAssistantPickerComponent {
4695
+ private readonly host;
4696
+ private searchTimer?;
4697
+ private searchSubscription?;
4698
+ /** The text of the latest search, for searching again after a failure. */
4699
+ private lastQuery;
4700
+ private readonly field;
4701
+ /** The id of the text field, for the label's `for`. */
4702
+ readonly inputId: _angular_core.InputSignal<string>;
4703
+ readonly options: _angular_core.InputSignal<readonly NhAssistantPickerOption[]>;
4704
+ readonly value: _angular_core.InputSignal<string | null>;
4705
+ /** The name to show for a value that is not among the options, such as a found account. */
4706
+ readonly selectedLabel: _angular_core.InputSignal<string | null>;
4707
+ /** The label of the empty choice; without it there is none. */
4708
+ readonly noneLabel: _angular_core.InputSignal<string | null>;
4709
+ readonly placeholder: _angular_core.InputSignal<string | null>;
4710
+ /** Searches the server; the options are ignored while it is set. */
4711
+ readonly search: _angular_core.InputSignal<((query: string) => Observable<NhAssistantPickerOption[]>) | null>;
4712
+ readonly minQueryLength: _angular_core.InputSignal<number>;
4713
+ readonly invalid: _angular_core.InputSignal<boolean>;
4714
+ readonly describedBy: _angular_core.InputSignal<string | null>;
4715
+ readonly disabled: _angular_core.InputSignal<boolean>;
4716
+ readonly valueChange: _angular_core.OutputEmitterRef<string>;
4717
+ /** The chosen option, also for a search result the options do not contain. */
4718
+ readonly optionChange: _angular_core.OutputEmitterRef<NhAssistantPickerOption | null>;
4719
+ readonly listId: string;
4720
+ readonly open: _angular_core.WritableSignal<boolean>;
4721
+ /** The text typed since the list opened; `null` shows the chosen option's name. */
4722
+ readonly query: _angular_core.WritableSignal<string | null>;
4723
+ readonly active: _angular_core.WritableSignal<number>;
4724
+ readonly searching: _angular_core.WritableSignal<boolean>;
4725
+ readonly results: _angular_core.WritableSignal<NhAssistantPickerOption[]>;
4726
+ /** Why the latest search failed; `null` after a search that answered. */
4727
+ readonly searchError: _angular_core.WritableSignal<NhAssistantError | null>;
4728
+ readonly searchErrorKeys: _angular_core.Signal<string[]>;
4729
+ readonly searchErrorId: string;
4730
+ /** The field describes itself with the host's ids and, after a failed search, with its reason. */
4731
+ readonly fieldDescribedBy: _angular_core.Signal<string | null>;
4732
+ private readonly chosen;
4733
+ readonly selected: _angular_core.Signal<NhAssistantPickerOption | null>;
4734
+ readonly inputText: _angular_core.Signal<string>;
4735
+ readonly visible: _angular_core.Signal<NhAssistantPickerOption[]>;
4736
+ /** Why the list is empty: still typing, searching, the search failed, or nothing found. */
4737
+ readonly emptyKey: _angular_core.Signal<"nh-assistant.picker.searching" | "nh-assistant.picker.search-failed" | "nh-assistant.picker.type-more" | "nh-assistant.picker.no-results">;
4738
+ readonly activeId: _angular_core.Signal<string | null>;
4739
+ constructor();
4740
+ optionId(index: number): string;
4741
+ /** Moves the focus to the text field, for example after a refused save. */
4742
+ focus(): void;
4743
+ toggle(): void;
4744
+ openList(): void;
4745
+ onInput(event: Event): void;
4746
+ onKeydown(event: KeyboardEvent): void;
4747
+ onBlur(): void;
4748
+ /** Searches the latest text again after a failed search and shows the list. */
4749
+ retrySearch(): void;
4750
+ choose(option: NhAssistantPickerOption): void;
4751
+ private close;
4752
+ private startSearch;
4753
+ private scrollActiveIntoView;
4754
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantPickerComponent, never>;
4755
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantPickerComponent, "nh-assistant-picker", never, { "inputId": { "alias": "inputId"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "selectedLabel": { "alias": "selectedLabel"; "required": false; "isSignal": true; }; "noneLabel": { "alias": "noneLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "minQueryLength": { "alias": "minQueryLength"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "describedBy": { "alias": "describedBy"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "optionChange": "optionChange"; }, never, never, true, never>;
4756
+ }
4757
+
4758
+ /** Where a subject link leads: a route of the host application or an `https` address elsewhere. */
4759
+ interface NhAssistantSubjectTarget {
4760
+ href: string;
4761
+ /** The URL the router navigates to; `null` for an address outside the application. */
4762
+ route: string | null;
4763
+ }
4764
+ /**
4765
+ * The name of a subject with the name of its type, linked to where the application shows the
4766
+ * subject (internal). The host's `subjectLinks` builder wins over the server's link; a link within
4767
+ * the application navigates through the router, an `https` link leaves it, and anything else shows
4768
+ * no link. Ctrl-, Cmd-, Shift- and middle-clicks keep the browser's behavior, such as a new tab.
4769
+ * A name that already says the type, as "The whole application" does for the application as a
4770
+ * whole, is shown once.
4771
+ */
4772
+ declare class NhAssistantSubjectLinkComponent {
4773
+ private readonly config;
4774
+ private readonly router;
4775
+ private readonly locationStrategy;
4776
+ private readonly injector;
4777
+ readonly subjectType: _angular_core.InputSignal<string>;
4778
+ readonly subjectId: _angular_core.InputSignal<string>;
4779
+ /** The text people read, usually the subject's display name. */
4780
+ readonly label: _angular_core.InputSignal<string>;
4781
+ /** The name of the subject type, such as "Project"; nothing is shown without one. */
4782
+ readonly typeName: _angular_core.InputSignal<string | null | undefined>;
4783
+ /** The server's link to the subject. */
4784
+ readonly link: _angular_core.InputSignal<string | null | undefined>;
4785
+ /** The type's name, unless the subject's name is the type's name itself, as for the whole application. */
4786
+ readonly shownTypeName: _angular_core.Signal<string | null>;
4787
+ readonly target: _angular_core.Signal<NhAssistantSubjectTarget | null>;
4788
+ open(event: MouseEvent, target: NhAssistantSubjectTarget): void;
4789
+ private urlTarget;
4790
+ private routeTarget;
4791
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantSubjectLinkComponent, never>;
4792
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantSubjectLinkComponent, "nh-assistant-subject-link", never, { "subjectType": { "alias": "subjectType"; "required": true; "isSignal": true; }; "subjectId": { "alias": "subjectId"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "typeName": { "alias": "typeName"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
4793
+ }
4794
+
4795
+ /** Renders model text into sanitized HTML. Pure, so unchanged text is not rendered again. */
4796
+ declare class NhAssistantMarkdownPipe implements PipeTransform {
4797
+ private readonly renderer;
4798
+ transform(text: string): string;
4799
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantMarkdownPipe, never>;
4800
+ static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantMarkdownPipe, "nhAssistantMarkdown", true>;
4801
+ }
3143
4802
 
3144
- export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, 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_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConversationListComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantShareLink, normalizeNhAssistantClientContext, provideNhAssistant, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, toNhAssistantError as ɵtoNhAssistantError };
3145
- export type { AdminAgent, AdminAgentInput, AgentAccountability, AgentArtifact, AgentConsultation, AgentConsultationList, AgentConsultationStatus, AgentDecisionOutcome, AgentElevatedReads, AgentEvaluation, AgentEvaluationCost, AgentEvaluationDecisions, AgentEvaluationDifference, AgentEvaluationFilter, AgentEvaluationRouting, AgentEvaluationRuns, AgentEvaluationTool, AgentExecutionResolution, AgentFeedbackCategoryCount, AgentFeedbackExportFilter, AgentFeedbackFilter, AgentFeedbackItem, AgentFeedbackList, AgentFeedbackListFilter, AgentFeedbackOutcome, AgentFeedbackSummary, AgentFeedbackSummaryRow, AgentGrantSource, AgentInbox, AgentInboxFilter, AgentInvalidationCount, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalStatus, AgentReplay, AgentReplayList, AgentReplayRequest, AgentRun, AgentRunConfiguration, AgentRunKind, AgentRunList, AgentRunRetryMode, AgentRunSettings, AgentRunSettingsRequest, AgentRunState, AgentRunStatus, AgentServiceAccountState, AgentShadowMode, AgentShadowState, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerReceipt, ApplicationContext, ApplicationContextVersion, ApprovalDecision, ApprovalPart, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, CodeSkill, CodeTrigger, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DataSkill, DataSkillRequest, DataSkillVersion, DataSkillVersionStatus, DataTrigger, DataTriggerRequest, DataTriggerShadowRequest, DecideApprovalRequest, DirectoryEntry, LiveAgentWorkChanged, LiveAgentWorkReason, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, McpAuthMode, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantToolCallGroupState, NotificationSettings, PushSubscriptionRequest, RunBlock, RunCatalog, RunConfigurationProblem, RunConfigurationProblemKind, RunConfigurationRemoval, SendMessageRequest, 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, UpdateMcpToolRequest };
4803
+ 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, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, nhAssistantWatchAgentWork as ɵnhAssistantWatchAgentWork, toNhAssistantError as ɵtoNhAssistantError };
4804
+ export type { AdminAgent, AdminAgentGroups, AdminAgentInput, AgentAccountability, AgentArtifact, AgentBoard, AgentBoardAgent, AgentBoardList, AgentBoardSubjectType, AgentBoardSummary, AgentBoardVisit, AgentBoardWorksOn, AgentConsultation, AgentConsultationList, 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, AgentInvalidationCount, AgentLatestRun, AgentObjectAgent, AgentObjectAgents, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalOrigin, 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, AgentUploads, ApplicationContext, ApplicationContextVersion, ApprovalDecision, ApprovalPart, ApprovalPolicySummary, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, ApproverSummary, AssistantAccount, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantConfigurationWarning, AssistantDataClassification, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, CodeRunSettings, CodeSkill, CodeTrigger, ConnectionRequiredEvent, ConnectionRequiredPart, ConnectionRequiredReason, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, 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, 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, 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 };