@newheap/platform-ai-chat 0.14.0 → 0.15.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;
@@ -437,6 +778,10 @@ interface ConversationThread {
437
778
  role: AgentSubjectRole;
438
779
  /** Each open proposal of the thread and whether the caller may decide it now, oldest first. */
439
780
  decisions: ConversationThreadDecision[];
781
+ /** The name of the subject type in the caller's language, when the application named it. */
782
+ subjectTypeName?: string | null;
783
+ /** Where the application shows the subject, when the type has a link template. */
784
+ subjectLink?: string | null;
440
785
  }
441
786
  /**
442
787
  * The caller's right to decide one open proposal of an agent thread, checked like the decision
@@ -482,7 +827,23 @@ interface Message {
482
827
  * `rule` for an assistant message the agent's rules wrote without a model.
483
828
  */
484
829
  type MessageAuthorKind = 'person' | 'trigger' | 'rule';
485
- type MessagePart = TextPart | ToolCallPart | ApprovalPart;
830
+ type MessagePart = TextPart | ToolCallPart | ApprovalPart | ConnectionRequiredPart;
831
+ /**
832
+ * Why a turn asks the person to connect an MCP server: never connected, the connection ended, or
833
+ * the server asked for permissions the connection lacks.
834
+ */
835
+ type ConnectionRequiredReason = 'not-connected' | 'reauthorization-required' | 'insufficient-scope';
836
+ /**
837
+ * An MCP server, which each person connects to with their own account, that the person who asked had
838
+ * to connect before the agent could use it. The turn went on without its tools; the card connects
839
+ * the viewer's own account.
840
+ */
841
+ interface ConnectionRequiredPart {
842
+ type: 'connection-required';
843
+ serverId: string;
844
+ displayName: string;
845
+ reason: ConnectionRequiredReason;
846
+ }
486
847
  interface TextPart {
487
848
  type: 'text';
488
849
  text: string;
@@ -654,6 +1015,12 @@ interface ToolCompletedEvent {
654
1015
  resultPreview: string | null;
655
1016
  }
656
1017
  type ApprovalRequiredEvent = ApprovalPart;
1018
+ /** The person who asked has to connect an MCP server before the agent can use it. */
1019
+ interface ConnectionRequiredEvent {
1020
+ serverId: string;
1021
+ displayName: string;
1022
+ reason: ConnectionRequiredReason;
1023
+ }
657
1024
  type TurnCompletionStatus = 'completed' | 'waiting-for-approval' | 'cancelled' | 'failed';
658
1025
  interface TurnUsage {
659
1026
  inputTokens: number;
@@ -677,6 +1044,7 @@ interface NhAssistantSseEventMap {
677
1044
  'tool.started': ToolStartedEvent;
678
1045
  'tool.completed': ToolCompletedEvent;
679
1046
  'approval.required': ApprovalRequiredEvent;
1047
+ 'connection.required': ConnectionRequiredEvent;
680
1048
  'turn.completed': TurnCompletedEvent;
681
1049
  'error': AssistantErrorEvent;
682
1050
  }
@@ -706,6 +1074,10 @@ declare const NhAssistantClientErrorCodes: {
706
1074
  readonly server: "assistant-server";
707
1075
  /** The open conversation was deleted by its owner, or the user left or was removed. */
708
1076
  readonly conversationRemoved: "assistant-conversation-removed";
1077
+ /** The person closed the authorization window of an MCP connection before it finished. */
1078
+ readonly mcpAuthorizationCancelled: "assistant-mcp-authorization-cancelled";
1079
+ /** The browser blocked the authorization window of an MCP connection. */
1080
+ readonly mcpPopupBlocked: "assistant-mcp-popup-blocked";
709
1081
  };
710
1082
  type NhAssistantClientErrorCode = typeof NhAssistantClientErrorCodes[keyof typeof NhAssistantClientErrorCodes];
711
1083
 
@@ -745,6 +1117,14 @@ interface LiveAgentWorkChanged {
745
1117
  subjectType: string;
746
1118
  subjectId: string;
747
1119
  }
1120
+ /**
1121
+ * The hub's answer to `WatchAgentWork`: how many agents' work of the whole application the connection
1122
+ * follows now, and when to renew the watch so the server checks the person's rights again.
1123
+ */
1124
+ interface LiveAgentWorkWatch {
1125
+ watched: number;
1126
+ refreshAfterSeconds: number;
1127
+ }
748
1128
  /**
749
1129
  * `ConversationEvent`: one turn event with the same `type` and `data` as the server-sent events
750
1130
  * of the starting request, or `message.created` with a `Message` when a participant's message
@@ -767,6 +1147,38 @@ interface AssistantPreferences {
767
1147
  /** At most 1,000 characters. Steers style only; it never overrides the fixed rules. */
768
1148
  customInstructions: string | null;
769
1149
  }
1150
+ /**
1151
+ * An MCP server that agents may use in background runs with the caller's own account once the
1152
+ * caller allows it (`GET mcp-connections`). The consent holds for the server as it is configured
1153
+ * now; a changed address or authentication shows it as not allowed again.
1154
+ */
1155
+ interface McpConnection {
1156
+ serverId: string;
1157
+ displayName: string;
1158
+ /** The server's host name, for example `planning.example.org`. */
1159
+ host: string;
1160
+ allowBackgroundUse: boolean;
1161
+ /** When the caller allowed it; `null` while not allowed. */
1162
+ consentedAt: string | null;
1163
+ /** The agents the caller may use that have the server. */
1164
+ agentIds: string[];
1165
+ /**
1166
+ * For a server each person connects to with OAuth: the caller's connection; `null` for a server
1167
+ * that forwards the caller's sign-in.
1168
+ */
1169
+ connectionStatus: McpConnectionStatus | null;
1170
+ /** The scopes the caller's connection grants. */
1171
+ grantedScopes: string | null;
1172
+ /** Scopes the server asked for that the connection lacks; connecting again adds them. */
1173
+ requiredScopes: string | null;
1174
+ connectedAt: string | null;
1175
+ /** Whether background use is offered for the server at all. */
1176
+ offersBackgroundUse: boolean;
1177
+ }
1178
+ /** Body of `PUT mcp-connections/{serverId}`. */
1179
+ interface UpdateMcpConnectionRequest {
1180
+ allowBackgroundUse: boolean;
1181
+ }
770
1182
  interface ApplicationContext {
771
1183
  text: string;
772
1184
  version: number;
@@ -791,6 +1203,12 @@ interface ToolCatalogEntry {
791
1203
  source: 'local' | 'bridge' | 'mcp';
792
1204
  effect: ToolCatalogEffect;
793
1205
  description: string;
1206
+ /**
1207
+ * The object type a call of the tool names (`[NhAiSubject]`): a run places its proposal for another
1208
+ * object at that object. `null` when the tool declares none, as MCP tools never do; their proposals
1209
+ * stay in the run's own thread. Missing on older servers.
1210
+ */
1211
+ subjectType?: string | null;
794
1212
  }
795
1213
  /** Equals `NhAiAutonomyLevel`. */
796
1214
  type AssistantAutonomy = 'observe' | 'explain' | 'propose' | 'simulate' | 'execute';
@@ -808,6 +1226,32 @@ interface AdminAgentInput {
808
1226
  * resume an agent with `setAgentState`. A new agent starts active.
809
1227
  */
810
1228
  isEnabled?: boolean;
1229
+ /**
1230
+ * Whether people can choose an agent created in the administration in the chat. Omitted keeps it on
1231
+ * update; a new agent is offered. An agent that is not offered keeps working on its triggers.
1232
+ */
1233
+ offeredInChat?: boolean;
1234
+ /**
1235
+ * The object types an agent created in the administration works on, from the run catalog's
1236
+ * `subjectTypes`, at most 20. What an agent works on is sent together: omitting all of
1237
+ * `worksOnSubjectTypes`, `worksOnAllSubjects`, `worksOnApplication`, `perDivision`, `runPolicy`
1238
+ * and `viewPolicy` keeps it on update and lets a new agent work on all object types. Agents in
1239
+ * code take it from their code.
1240
+ */
1241
+ worksOnSubjectTypes?: string[];
1242
+ /** The agent works on every object type; not next to `worksOnSubjectTypes`. */
1243
+ worksOnAllSubjects?: boolean;
1244
+ /** The agent works on the whole application. */
1245
+ worksOnApplication?: boolean;
1246
+ /**
1247
+ * The agent works per division; only when the run catalog reports `divisions`. Its work for the
1248
+ * whole application, such as a schedule without a subject set, then runs once per listed division.
1249
+ */
1250
+ perDivision?: boolean;
1251
+ /** Who may run the agent for the whole application, from the run catalog's `agentPolicies`; `null`: the administration policy. */
1252
+ runPolicy?: string | null;
1253
+ /** Who sees its results for the whole application, from the run catalog's `agentPolicies`; `null`: the agent's required policy. */
1254
+ viewPolicy?: string | null;
811
1255
  }
812
1256
  /** Body of `PUT admin/agents/{id}`. */
813
1257
  type UpdateAdminAgentRequest = AdminAgentInput & {
@@ -841,6 +1285,37 @@ interface AdminAgent extends AdminAgentInput {
841
1285
  shadow?: AgentShadowState | null;
842
1286
  /** The technical account that answers for the agent's new runs; null when it answers to none. */
843
1287
  serviceAccount?: AgentServiceAccountState | null;
1288
+ /**
1289
+ * Whether people can choose the agent in the chat; missing means offered. Agents in code decide
1290
+ * it with `HideFromChat()`.
1291
+ */
1292
+ offeredInChat?: boolean;
1293
+ /**
1294
+ * Whether the agent says what it works on: always for an agent created here, for an agent in code
1295
+ * only with `WorksOn`, `WorksOnAllObjects` or `WorksOnApplication`. An agent that does not say
1296
+ * works on all object types; missing on older servers.
1297
+ */
1298
+ worksOnDeclared?: boolean;
1299
+ /**
1300
+ * The object types the agent is known to work on, as a hint next to "All objects": those it
1301
+ * accepts hand-offs and consultations about, those its triggers name and those of its threads.
1302
+ */
1303
+ knownSubjectTypes?: string[];
1304
+ /**
1305
+ * The groups of agents the agent is in now, by id: an administrator's choice per group, otherwise
1306
+ * its `InGroup` in code; missing on older servers. Change them with `setAgentGroups`.
1307
+ */
1308
+ groups?: string[];
1309
+ /** The groups the agent joins in code, by id; empty for an agent created here. */
1310
+ codeGroups?: string[];
1311
+ }
1312
+ /** The groups one agent is in, as `setAgentGroups` answers. */
1313
+ interface AdminAgentGroups {
1314
+ agentId: string;
1315
+ /** The groups the agent is in now, by id. */
1316
+ groups: string[];
1317
+ /** The groups it joins in code, by id. */
1318
+ codeGroups: string[];
844
1319
  }
845
1320
  /** The shadow modes an administrator chooses; `code` lets the mode in code decide again. */
846
1321
  type AgentShadowMode = 'shadow' | 'live' | 'code';
@@ -931,7 +1406,136 @@ interface SetAgentStateRequest {
931
1406
  /** Optional, at most 500 characters. */
932
1407
  reason?: string | null;
933
1408
  }
934
- type McpAuthMode = 'none' | 'bearer' | 'api-key' | 'forward-user-token';
1409
+ /**
1410
+ * The built-in authentication modes. `oauth` connects with the authorization code flow: once for the
1411
+ * organization or once per person (`McpConnectionScope`). `oauth-client-credentials` connects the
1412
+ * organization with the host's own client credentials.
1413
+ */
1414
+ type McpBuiltInAuthMode = 'none' | 'bearer' | 'api-key' | 'basic' | 'forward-user-token' | 'oauth' | 'oauth-client-credentials';
1415
+ /**
1416
+ * The authentication mode of a server: a built-in mode, or a mode the application registered in code
1417
+ * (`AddMcpCredentialProvider`), which `NhAssistantAdminApiService.getMcpAuthModes` lists.
1418
+ */
1419
+ type McpAuthMode = McpBuiltInAuthMode | (string & {});
1420
+ /**
1421
+ * An authentication mode the application registered in code. Its provider supplies the credential, so
1422
+ * a server of the mode takes no secret, user name or OAuth settings in the editor. `organization`: one
1423
+ * credential every caller shares, which may serve background runs (`headlessUse: organization`);
1424
+ * `person`: each person's own credential, which serves only that person's background runs with their
1425
+ * consent (`headlessUse: personal`).
1426
+ */
1427
+ interface McpCustomAuthMode {
1428
+ mode: string;
1429
+ ownership: 'organization' | 'person';
1430
+ }
1431
+ /** For `oauth`: one connection for everyone (`organization`), or each person connects (`user`). */
1432
+ type McpConnectionScope = 'organization' | 'user';
1433
+ /** The state of an OAuth connection; it never carries tokens. */
1434
+ type McpConnectionStatus = 'not-connected' | 'active' | 'reauthorization-required' | 'issuer-changed';
1435
+ /**
1436
+ * OAuth settings of a server. Omitted or `null` values keep the stored value, `""` clears it.
1437
+ * `clientSecret` is write-only. `confirmAuthorization` runs discovery again and pins the
1438
+ * authorization server and resource it finds; a new OAuth server and a changed address need it.
1439
+ */
1440
+ interface McpOAuthInput {
1441
+ clientId?: string | null;
1442
+ clientSecret?: string | null;
1443
+ clientSecretReference?: string | null;
1444
+ /** Space-separated scopes the host may request; empty leaves the choice to the authorization server. */
1445
+ scopes?: string | null;
1446
+ /** Which account the organization connects, shown to everyone using it; required for an organization `oauth` server. */
1447
+ organizationAccountLabel?: string | null;
1448
+ confirmAuthorization?: boolean;
1449
+ }
1450
+ /** The OAuth settings of a server as returned: never the client secret. */
1451
+ interface McpOAuthSettings {
1452
+ clientId: string | null;
1453
+ hasClientSecret: boolean;
1454
+ clientSecretReference: string | null;
1455
+ scopes: string | null;
1456
+ organizationAccountLabel: string | null;
1457
+ }
1458
+ /** The authorization server and resource an administrator confirmed. */
1459
+ interface McpAuthorization {
1460
+ issuer: string;
1461
+ resource: string;
1462
+ confirmedAt: string;
1463
+ confirmedBy: string | null;
1464
+ }
1465
+ /** The organization's OAuth connection of a server, without tokens. */
1466
+ interface McpOrganizationConnection {
1467
+ status: McpConnectionStatus;
1468
+ connectedAt: string | null;
1469
+ connectedBy: string | null;
1470
+ grantedScopes: string | null;
1471
+ requiredScopes: string | null;
1472
+ accessTokenExpiresAt: string | null;
1473
+ lastFailureCode: string | null;
1474
+ }
1475
+ /** Body of `POST admin/mcp-servers/discover`. */
1476
+ interface McpDiscoverRequest {
1477
+ url: string;
1478
+ }
1479
+ /** What discovery found for a server address; nothing is stored until the server is saved with `confirmAuthorization`. */
1480
+ interface McpDiscovery {
1481
+ resource: string;
1482
+ issuer: string;
1483
+ authorizationServers: string[];
1484
+ challengedScopes: string[];
1485
+ scopesSupported: string[];
1486
+ grantTypesSupported: string[];
1487
+ pkceSupported: boolean;
1488
+ clientIdMetadataDocumentSupported: boolean;
1489
+ dynamicRegistrationSupported: boolean;
1490
+ tokenEndpointAuthMethods: string[];
1491
+ }
1492
+ /**
1493
+ * Body of an authorize request. `returnUrl` chooses redirect mode: the callback returns there with
1494
+ * the flow and completion code in the fragment; its origin must be allowed by the host.
1495
+ */
1496
+ interface McpAuthorizeRequest {
1497
+ returnUrl?: string | null;
1498
+ /** For a personal connection: the consent to background use, recorded with the connection. */
1499
+ allowBackgroundUse?: boolean | null;
1500
+ }
1501
+ /** The flow and the URL the owner's browser opens; it expires at `expiresAt`. */
1502
+ interface McpAuthorizationStart {
1503
+ flowId: string;
1504
+ authorizationUrl: string;
1505
+ expiresAt: string;
1506
+ /** The origin of the assistant's callback page: the only origin whose message is accepted. */
1507
+ callbackOrigin: string;
1508
+ }
1509
+ /** Body of `POST mcp-connections/complete`. */
1510
+ interface McpCompleteRequest {
1511
+ flowId: string;
1512
+ completionCode: string;
1513
+ }
1514
+ /** The connection a completed authorization activated. */
1515
+ interface McpCompletion {
1516
+ serverId: string;
1517
+ ownerKind: 'organization' | 'user';
1518
+ status: McpConnectionStatus;
1519
+ grantedScopes: string | null;
1520
+ }
1521
+ /** The personal connections of a server per status. */
1522
+ interface McpConnectionsSummary {
1523
+ active: number;
1524
+ reauthorizationRequired: number;
1525
+ issuerChanged: number;
1526
+ }
1527
+ /**
1528
+ * Whether a server's tools are offered in background runs. `organization` is only valid for
1529
+ * `none`, `bearer`, `api-key` and `basic`; the agent then also needs a grant in code
1530
+ * (`mcp.<server>.*`). `personal` is only valid for `forward-user-token`: the run then sends a
1531
+ * short-lived token of the person it acts for, once that person allowed it (`McpConnection`).
1532
+ */
1533
+ type McpHeadlessUse = 'never' | 'organization' | 'personal';
1534
+ /**
1535
+ * `streamable-http`, or `auto` to fall back to the deprecated HTTP+SSE transport for servers
1536
+ * that do not offer Streamable HTTP yet.
1537
+ */
1538
+ type McpTransport = 'streamable-http' | 'auto';
935
1539
  interface McpServerInput {
936
1540
  id: string;
937
1541
  displayName: string;
@@ -942,6 +1546,23 @@ interface McpServerInput {
942
1546
  secret?: string | null;
943
1547
  requiredPolicy: string | null;
944
1548
  isEnabled: boolean;
1549
+ /** Omit to keep the stored value; a new server starts at `never`. */
1550
+ headlessUse?: McpHeadlessUse;
1551
+ /** The user name of `basic`; the password is `secret`. Omit to keep the stored value. */
1552
+ userName?: string | null;
1553
+ /**
1554
+ * Where the secret is instead of storing it: `config:<name>` or a prefix the application
1555
+ * registered. Omit to keep, `""` to clear; a new stored secret replaces it and vice versa.
1556
+ */
1557
+ secretReference?: string | null;
1558
+ /** The name of a client certificate the host configured for mutual TLS. Omit to keep, `""` to clear. */
1559
+ clientCertificateReference?: string | null;
1560
+ /** Omit to keep the stored value; a new server starts at `streamable-http`. */
1561
+ transport?: McpTransport;
1562
+ /** For `oauth`; omit to keep the stored value. A new server starts at `organization`. */
1563
+ connectionScope?: McpConnectionScope;
1564
+ /** The OAuth settings of `oauth` and `oauth-client-credentials`; omit to keep them. */
1565
+ oauth?: McpOAuthInput | null;
945
1566
  }
946
1567
  interface McpServer {
947
1568
  id: string;
@@ -955,6 +1576,24 @@ interface McpServer {
955
1576
  lastSyncAt: string | null;
956
1577
  lastSyncStatus: 'ok' | 'failed' | null;
957
1578
  assignedAgentIds: string[];
1579
+ headlessUse: McpHeadlessUse;
1580
+ /** When a test, a sync or a turn with the shared credential last connected. */
1581
+ lastConnectAt: string | null;
1582
+ /** The failure code of that connection; `null` when it succeeded or never ran. */
1583
+ lastConnectCode: string | null;
1584
+ /** The user name of `basic`; the password is never returned. */
1585
+ userName: string | null;
1586
+ /** The secret reference; it names where the secret is, it is not the secret. */
1587
+ secretReference: string | null;
1588
+ clientCertificateReference: string | null;
1589
+ transport: McpTransport;
1590
+ connectionScope: McpConnectionScope;
1591
+ /** The OAuth settings; `null` for other modes. */
1592
+ oauth: McpOAuthSettings | null;
1593
+ /** The confirmed authorization server; `null` until an administrator confirmed it. */
1594
+ authorization: McpAuthorization | null;
1595
+ /** The organization's OAuth connection; `null` for servers without one. */
1596
+ organizationConnection: McpOrganizationConnection | null;
958
1597
  }
959
1598
  interface McpServerTestResult {
960
1599
  ok: boolean;
@@ -1221,6 +1860,11 @@ interface AgentFeedbackList {
1221
1860
  interface RunBlock {
1222
1861
  name: string;
1223
1862
  description: string;
1863
+ /**
1864
+ * For a trigger event that names its object type up front, that type: data triggers on it fit only
1865
+ * agents that work on it. Missing or `null` when the type is known only when the event fires.
1866
+ */
1867
+ subjectType?: string | null;
1224
1868
  }
1225
1869
  /** Response of `GET admin/run-catalog`: what skills, triggers and run settings defined as data can name. */
1226
1870
  interface RunCatalog {
@@ -1230,6 +1874,87 @@ interface RunCatalog {
1230
1874
  approvalPolicies: string[];
1231
1875
  /** Chat profiles with function calling and streaming. */
1232
1876
  profiles: string[];
1877
+ /** Per approval policy who decides, how long a proposal waits and how; missing on older servers. */
1878
+ approvalPolicySummaries?: ApprovalPolicySummary[];
1879
+ /** Whether `searchAccounts` can find accounts by name; otherwise an account is chosen by its id. */
1880
+ accountSearch?: boolean;
1881
+ /**
1882
+ * The subject types the application registered, by id, with the platform's `nh-system` (the whole
1883
+ * application, `isSystem`); missing on older servers. Choices of object types leave out `isSystem` types.
1884
+ */
1885
+ subjectTypes?: AgentSubjectType[];
1886
+ /**
1887
+ * The policies the application lists for the run and view policy of agents created here, by name;
1888
+ * missing on older servers.
1889
+ */
1890
+ agentPolicies?: RunBlock[];
1891
+ /** Whether the application lists its divisions, so an agent may work per division. */
1892
+ divisions?: boolean;
1893
+ /**
1894
+ * The groups of agents the application registers in code, by id, with their names in the request's
1895
+ * language: what an administrator may put an agent in; missing on older servers.
1896
+ */
1897
+ agentGroups?: AgentGroup[];
1898
+ }
1899
+ /** A group of agents the application registers in code, as people see it. */
1900
+ interface AgentGroup {
1901
+ /** The dash-case group id, such as `project-management`. */
1902
+ id: string;
1903
+ /** The group's name in the request's language. */
1904
+ name: string;
1905
+ /** What the group's agents do, when the application described it. */
1906
+ description: string | null;
1907
+ }
1908
+ /** A subject type as people see it, from the run catalog. */
1909
+ interface AgentSubjectType {
1910
+ /** The dash-case type id, such as `project`. */
1911
+ id: string;
1912
+ /** The name of one subject in the request's language; the id when the application did not name the type. */
1913
+ name: string;
1914
+ /** The name of several subjects, when the application gave one. */
1915
+ pluralName: string | null;
1916
+ /** The short type name of the entity the type stands for, as the NewHeap log records `ObjectType`. */
1917
+ entityType: string | null;
1918
+ /** The full type name of that entity, as `ObjectTypeFull`. */
1919
+ entityTypeFull: string | null;
1920
+ /** The link template with `{id}`; `null` without one. */
1921
+ link: string | null;
1922
+ /** Whether `searchSubjects` finds subjects of this type by name; otherwise people give an id. */
1923
+ searchable: boolean;
1924
+ /**
1925
+ * Whether the type belongs to the platform instead of the application, such as `nh-system`, the
1926
+ * whole application; it is not offered as a kind of object.
1927
+ */
1928
+ isSystem: boolean;
1929
+ }
1930
+ /** Who may decide a proposal under an approval policy. */
1931
+ interface ApproverSummary {
1932
+ /** `initiator`: the person who caused the run; `subject-role`: a role on the subject; `policy`: an authorization policy. */
1933
+ kind: 'initiator' | 'subject-role' | 'policy' | string;
1934
+ /** For `subject-role`: at least `reader`, `participant` or `approver`. */
1935
+ role?: string | null;
1936
+ /** For `subject-role`: the application's role name, when one is required. */
1937
+ namedRole?: string | null;
1938
+ /** For `policy`: the authorization policy. */
1939
+ policy?: string | null;
1940
+ }
1941
+ /** What an approval policy means, so an administration can explain the choice. */
1942
+ interface ApprovalPolicySummary {
1943
+ name: string;
1944
+ approvers: ApproverSummary[];
1945
+ /** How long a proposal waits for a decision. */
1946
+ lifetimeMinutes: number;
1947
+ /** The person who caused a proposal may not decide it. */
1948
+ fourEyes: boolean;
1949
+ /** `inline`: the run waits for the decision; `deferred`: people decide later. */
1950
+ mode: 'inline' | 'deferred' | string;
1951
+ }
1952
+ /** An account an agent can answer to, from `GET admin/accounts`. */
1953
+ interface AssistantAccount {
1954
+ actorId: string;
1955
+ displayName: string;
1956
+ /** The e-mail address, when the application knows it. */
1957
+ detail: string | null;
1233
1958
  }
1234
1959
  /** Which part of the run configuration a problem concerns. */
1235
1960
  type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger';
@@ -1312,6 +2037,26 @@ interface CodeTrigger {
1312
2037
  triggerId: string;
1313
2038
  source: 'event' | 'schedule' | 'webhook';
1314
2039
  skillId: string | null;
2040
+ /**
2041
+ * The subject type the trigger names up front: an object type, or `nh-system` for a schedule that
2042
+ * runs for the whole application (once per division for an agent that works per division). `null`
2043
+ * when the type is known only when it fires; missing on older servers.
2044
+ */
2045
+ subjectType?: string | null;
2046
+ }
2047
+ /**
2048
+ * How an agent in code runs, as its code says; it changes only in code. The technical account, which
2049
+ * an administrator may replace, is the agent's `serviceAccount`.
2050
+ */
2051
+ interface CodeRunSettings {
2052
+ /** Whose rights its runs use. */
2053
+ accountability: AgentAccountability;
2054
+ /** Its runs also use what the person who started them may use. */
2055
+ delegateFromInitiator: boolean;
2056
+ /** The agent's approval policy; `null` for the platform's default. */
2057
+ approvalPolicy: string | null;
2058
+ /** It works by a rule handler in code instead of the model. */
2059
+ usesRules: boolean;
1315
2060
  }
1316
2061
  /** One version of a skill defined as data. */
1317
2062
  interface DataSkill {
@@ -1420,6 +2165,10 @@ interface DataTrigger {
1420
2165
  event: string | null;
1421
2166
  cron: string | null;
1422
2167
  timeZone: string | null;
2168
+ /**
2169
+ * The subject set a schedule runs for; `null` for an event, and for a schedule that runs for the
2170
+ * whole application (once per division for an agent that works per division).
2171
+ */
1423
2172
  subjectSet: string | null;
1424
2173
  message: string | null;
1425
2174
  conflict: TriggerConflict;
@@ -1444,7 +2193,10 @@ interface DataTriggerRequest {
1444
2193
  cron?: string | null;
1445
2194
  /** For a schedule: an IANA or Windows time zone; UTC by default. */
1446
2195
  timeZone?: string | null;
1447
- /** For a schedule: a registered subject set. */
2196
+ /**
2197
+ * For a schedule: a registered subject set. Without one the schedule runs for the whole
2198
+ * application, which only an agent that works on it may do (`subjectSet: required` otherwise).
2199
+ */
1448
2200
  subjectSet?: string | null;
1449
2201
  /** For a schedule: what every run receives, at most 2,000 characters. */
1450
2202
  message?: string | null;
@@ -1481,6 +2233,8 @@ interface AgentRunConfiguration {
1481
2233
  source: 'code' | 'admin';
1482
2234
  /** The run settings of an agent created in the administration; `null` for an agent in code and one that only chats. */
1483
2235
  runSettings: AgentRunSettings | null;
2236
+ /** How an agent in code runs, as its code says; `null` for an agent created here, missing on older servers. */
2237
+ codeRunSettings?: CodeRunSettings | null;
1484
2238
  }
1485
2239
 
1486
2240
  /** Decides whether the current user may see and use the assistant. */
@@ -1569,7 +2323,35 @@ interface NhAssistantConfig {
1569
2323
  * `#nh-assistant-join=<conversationId>.<token>`; the panel joins when the page opens with it.
1570
2324
  */
1571
2325
  buildShareLink?: (conversationId: string, token: string) => string;
2326
+ /**
2327
+ * Replaces the server's links to subjects, which come from the link template of the subject type
2328
+ * (`AddSubjectType(...).OpenAt("/projects/{id}")`), with the host's own routes, per subject type:
2329
+ * for example `{ project: subject => ['/projects', subject.id] }`. Return router commands or a URL
2330
+ * within the application, `null` to show no link, or `undefined` to keep the server's link.
2331
+ * Runs in the assistant's injection context. Default: the server's links.
2332
+ */
2333
+ subjectLinks?: Record<string, NhAssistantSubjectLinkBuilder>;
2334
+ /**
2335
+ * How MCP authorizations open. `popup` (default) opens a window from the click and stays on the
2336
+ * page. `redirect` sends the page to the authorization server and back to `mcpConnectReturnUrl`,
2337
+ * where the assistant completes the connection; its origin must be in
2338
+ * `NewHeap:AI:Assistant:Mcp:OAuth:ReturnOrigins`.
2339
+ */
2340
+ mcpConnectMode?: 'popup' | 'redirect';
2341
+ /** The page a redirect-mode authorization returns to. Default: the current address without its fragment. */
2342
+ mcpConnectReturnUrl?: () => string;
2343
+ }
2344
+ /** A subject an agent works on, by its type and id. */
2345
+ interface NhAssistantSubjectRef {
2346
+ type: string;
2347
+ id: string;
1572
2348
  }
2349
+ /**
2350
+ * Builds the link to one subject in the host application: router commands such as
2351
+ * `['/projects', subject.id]`, a URL such as `/projects/7`, `null` for no link, or `undefined` to keep
2352
+ * the server's link.
2353
+ */
2354
+ type NhAssistantSubjectLinkBuilder = (subject: NhAssistantSubjectRef) => readonly unknown[] | string | null | undefined;
1573
2355
  interface NhAssistantPushConfig {
1574
2356
  /** URL of the bundled worker, for example `/nh-assistant/nh-assistant-push-worker.js`. */
1575
2357
  serviceWorkerUrl: string;
@@ -1656,14 +2438,18 @@ declare class NhAssistantApiError extends Error {
1656
2438
  readonly code: string;
1657
2439
  readonly messageKey: string;
1658
2440
  /**
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.
2441
+ * The field errors of the error body, whatever its code (for example `assistant-validation` or
2442
+ * `assistant-run-filter-invalid`): camelCase field names, dotted for nested settings such as
2443
+ * `oauth.clientId`, with stable values such as `required`, `invalid`, `too-long` or `not-found`.
2444
+ * Empty when the body names none.
1661
2445
  */
1662
2446
  readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
1663
2447
  constructor(status: number, code: string, messageKey: string,
1664
2448
  /**
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.
2449
+ * The field errors of the error body, whatever its code (for example `assistant-validation` or
2450
+ * `assistant-run-filter-invalid`): camelCase field names, dotted for nested settings such as
2451
+ * `oauth.clientId`, with stable values such as `required`, `invalid`, `too-long` or `not-found`.
2452
+ * Empty when the body names none.
1667
2453
  */
1668
2454
  fieldErrors?: Readonly<Record<string, readonly string[]>>);
1669
2455
  }
@@ -1717,6 +2503,19 @@ declare class NhAssistantApiService {
1717
2503
  getPreferences(): Observable<AssistantPreferences>;
1718
2504
  /** Replaces the caller's own assistant preferences and returns the stored values. */
1719
2505
  updatePreferences(preferences: AssistantPreferences): Observable<AssistantPreferences>;
2506
+ /** MCP servers that agents may use in background runs with the caller's own account. */
2507
+ getMcpConnections(): Observable<McpConnection[]>;
2508
+ /** Allows or withdraws background use of an MCP server with the caller's own account. */
2509
+ updateMcpConnection(serverId: string, request: UpdateMcpConnectionRequest): Observable<McpConnection>;
2510
+ /**
2511
+ * Starts the caller's authorization of a server each person connects to. Prefer
2512
+ * `NhAssistantMcpConnectService.connect`, which opens and completes it.
2513
+ */
2514
+ authorizeMcpConnection(serverId: string, request?: McpAuthorizeRequest): Observable<McpAuthorizationStart>;
2515
+ /** Removes the caller's own connection of a server and revokes its tokens. */
2516
+ disconnectMcpConnection(serverId: string): Observable<void>;
2517
+ /** Activates the connection of an authorization the caller started, with the callback's completion code. */
2518
+ completeMcpAuthorization(request: McpCompleteRequest): Observable<McpCompletion>;
1720
2519
  private requestStream;
1721
2520
  private executeStream;
1722
2521
  private readStream;
@@ -1733,6 +2532,7 @@ declare class NhAssistantApiService {
1733
2532
  */
1734
2533
  declare class NhAssistantAdminApiService {
1735
2534
  private readonly transport;
2535
+ private readonly api;
1736
2536
  getContext(): Observable<ApplicationContext>;
1737
2537
  /** Saves a new context version; fails with `assistant-version-conflict` when `expectedVersion` is stale. */
1738
2538
  updateContext(request: UpdateApplicationContextRequest): Observable<ApplicationContext>;
@@ -1767,9 +2567,20 @@ declare class NhAssistantAdminApiService {
1767
2567
  * account that does not exist or may not sign in.
1768
2568
  */
1769
2569
  setServiceAccount(agentId: string, request: SetAgentServiceAccountRequest): Observable<AgentState>;
2570
+ /**
2571
+ * Puts an agent, in code or created here, in exactly `groups` of the run catalog's `agentGroups`
2572
+ * and out of the others. The choice wins over the agent's `InGroup` in code. Fails with a field error
2573
+ * on `groups` for an unknown group and with `assistant-shadow-variant` for a shadow variant.
2574
+ */
2575
+ setAgentGroups(agentId: string, groups: readonly string[]): Observable<AdminAgentGroups>;
1770
2576
  /** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
1771
2577
  deleteAgent(agentId: string): Observable<void>;
1772
2578
  getMcpServers(): Observable<McpServer[]>;
2579
+ /**
2580
+ * The authentication modes the application registered in code (`GET admin/mcp-auth-modes`), which
2581
+ * administrators choose next to the built-in modes.
2582
+ */
2583
+ getMcpAuthModes(): Observable<McpCustomAuthMode[]>;
1773
2584
  createMcpServer(input: McpServerInput): Observable<McpServer>;
1774
2585
  /** Omit `secret` to keep the stored secret; send `""` to clear it. */
1775
2586
  updateMcpServer(serverId: string, input: McpServerInput): Observable<McpServer>;
@@ -1778,6 +2589,30 @@ declare class NhAssistantAdminApiService {
1778
2589
  /** Reads the remote tool list. New tools start disabled; a changed input schema disables a tool. */
1779
2590
  syncMcpServer(serverId: string): Observable<McpTool[]>;
1780
2591
  getMcpTools(serverId: string): Observable<McpTool[]>;
2592
+ /**
2593
+ * Reads the protected resource metadata of a server address and its authorization server without
2594
+ * storing anything. Save the server with `oauth.confirmAuthorization` to pin what was found.
2595
+ */
2596
+ discoverMcpServer(url: string): Observable<McpDiscovery>;
2597
+ /** The organization's OAuth connection of a server, without tokens. */
2598
+ getMcpOrganizationConnection(serverId: string): Observable<McpOrganizationConnection>;
2599
+ /**
2600
+ * Starts the administrator's authorization of the organization connection. Open
2601
+ * `authorizationUrl` in the administrator's browser, then complete with `completeMcpAuthorization`.
2602
+ */
2603
+ authorizeMcpOrganizationConnection(serverId: string, request?: McpAuthorizeRequest): Observable<McpAuthorizationStart>;
2604
+ /** Removes the organization connection and revokes its tokens. */
2605
+ disconnectMcpOrganizationConnection(serverId: string): Observable<void>;
2606
+ /** The personal connections of a server per status. */
2607
+ getMcpConnectionsSummary(serverId: string): Observable<McpConnectionsSummary>;
2608
+ /** Revokes every person's connection of a server; each person connects again. */
2609
+ revokeMcpConnections(serverId: string): Observable<void>;
2610
+ /**
2611
+ * Activates the connection of an authorization the caller started with the completion code the
2612
+ * callback handed to the browser. An organization connection also needs the admin policy. The same
2613
+ * call as `NhAssistantApiService.completeMcpAuthorization`, with the same failure codes.
2614
+ */
2615
+ completeMcpAuthorization(request: McpCompleteRequest): Observable<McpCompletion>;
1781
2616
  updateMcpTool(serverId: string, remoteName: string, request: UpdateMcpToolRequest): Observable<McpTool>;
1782
2617
  /**
1783
2618
  * The agent's proposals per tool and agent version in the period: decisions, the rejection rate,
@@ -1810,6 +2645,18 @@ declare class NhAssistantAdminApiService {
1810
2645
  getAgentReplays(variantId: string): Observable<AgentReplayList>;
1811
2646
  /** The building blocks in code that run settings, skills and triggers defined as data can name. */
1812
2647
  getRunCatalog(): Observable<RunCatalog>;
2648
+ /**
2649
+ * Accounts whose name or e-mail address contains `query` (2 to 100 characters), at most `limit`.
2650
+ * Fails with `assistant-account-search-unavailable` when the application offers no search; the
2651
+ * run catalog's `accountSearch` tells beforehand.
2652
+ */
2653
+ searchAccounts(query: string, limit?: number): Observable<AssistantAccount[]>;
2654
+ /**
2655
+ * The names the application knows for these account ids; unknown ids are left out. The server reads
2656
+ * at most 50 ids per request, so more ids are asked for in parts of 50 and the answers merged in
2657
+ * the order of the ids. Fails with `NhAssistantApiError` when any part fails.
2658
+ */
2659
+ getAccounts(actorIds: readonly string[]): Observable<AssistantAccount[]>;
1813
2660
  /**
1814
2661
  * The agent's run settings, skills and triggers, in code and as data, and the data that no longer
1815
2662
  * fits the code. An agent in code without a run configuration answers `assistant-agent-not-found`.
@@ -1821,6 +2668,13 @@ declare class NhAssistantAdminApiService {
1821
2668
  * `assistant-service-account-not-found`.
1822
2669
  */
1823
2670
  saveRunSettings(agentId: string, request: AgentRunSettingsRequest): Observable<AgentRunSettings>;
2671
+ /**
2672
+ * Every run of the agent, live and shadow, newest first, for its runs view. Read one run's whole
2673
+ * result with `NhAssistantAgentRunApiService.getRunResult`. The server checks the filter first:
2674
+ * `assistant-run-filter-invalid` with the refused parts in `fieldErrors`, then
2675
+ * `assistant-agent-not-found` for an unknown agent.
2676
+ */
2677
+ getAgentRuns(agentId: string, filter?: Omit<AgentRunFilter, 'agentId'>): Observable<AgentRunHistory>;
1824
2678
  /** Removes the run settings; while data skills or triggers belong to the agent, `assistant-run-settings-in-use`. */
1825
2679
  removeRunSettings(agentId: string, removal?: RunConfigurationRemoval): Observable<void>;
1826
2680
  /**
@@ -1864,7 +2718,16 @@ declare class NhAssistantAgentRunApiService {
1864
2718
  * role; readers may open an existing one. Errors with `assistant-subject-access-denied` otherwise.
1865
2719
  */
1866
2720
  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. */
2721
+ /**
2722
+ * Runs the agent now on the subject with the caller as initiator. On an object it needs the
2723
+ * participant role; on the whole application (`nh-system`) the agent's run policy, by default the
2724
+ * administration policy. The receipt says what became of the start (`AgentTriggerOutcome`), for
2725
+ * example `waiting` while the agent is paused. A refusal errors with `NhAssistantApiError`:
2726
+ * `assistant-agent-does-not-work-on`, `assistant-agent-stopped`, `assistant-trigger-rate-limited`
2727
+ * and the other conflicts (409), `assistant-subject-access-denied` or `assistant-agent-forbidden`
2728
+ * (403), `assistant-agent-not-found` or `assistant-subject-not-found` (404),
2729
+ * `assistant-subject-invalid` (400) and `assistant-trigger-rolled-back` (503).
2730
+ */
1868
2731
  startAgent(request: StartAgentRequest): Observable<AgentTriggerReceipt>;
1869
2732
  /**
1870
2733
  * All agent work on one subject: the caller's role, every agent with a thread on it plus
@@ -1872,12 +2735,27 @@ declare class NhAssistantAgentRunApiService {
1872
2735
  * with `assistant-subject-not-found` when the caller has no role on the subject.
1873
2736
  */
1874
2737
  getSubjectWork(subjectType: string, subjectId: string, agentId?: string): Observable<AgentSubjectWork>;
2738
+ /**
2739
+ * The agents that work on the subject and that the caller may use, with whether the caller may run
2740
+ * each now, its newest run with the beginning of its result and its open proposals. The subject is
2741
+ * an object or the whole application (`nh-system`, `global` or `division-…`). Errors with
2742
+ * `assistant-subject-not-found` when the caller has no role on the subject.
2743
+ */
2744
+ getObjectAgents(subjectType: string, subjectId: string): Observable<AgentObjectAgents>;
1875
2745
  /**
1876
2746
  * Counts the agent work on at most `NH_ASSISTANT_MAX_SUBJECT_SUMMARY` subjects of one type in one
1877
2747
  * request, for badges in a list; one item per id in request order. `NhAssistantSubjectSummaryService`
1878
2748
  * batches and caches these requests for many badges.
1879
2749
  */
1880
2750
  summarizeSubjects(subjectType: string, subjectIds: readonly string[]): Observable<AgentSubjectSummaryList>;
2751
+ /**
2752
+ * Finds subjects of one type by name, at most `limit` (default 20, at most 50), among those the
2753
+ * caller may read; `query` has 2 to 100 characters. Errors with `assistant-subject-search-unavailable`
2754
+ * for a type the application does not search (people then give the subject's id), with
2755
+ * `assistant-subject-type-unknown` for an unknown type and with `assistant-validation` for a
2756
+ * query of the wrong length.
2757
+ */
2758
+ searchSubjects(subjectType: string, query: string, limit?: number): Observable<AgentSubjectSearch>;
1881
2759
  getRuns(conversationId: string): Observable<AgentRunList>;
1882
2760
  /** Who consulted the thread's agent through another assistant, newest first. */
1883
2761
  getConsultations(conversationId: string, page?: number, itemsPerPage?: number): Observable<AgentConsultationList>;
@@ -1895,11 +2773,49 @@ declare class NhAssistantAgentRunApiService {
1895
2773
  lookupProposals(approvalIds: readonly string[]): Observable<AgentProposalLookup>;
1896
2774
  getMemory(conversationId: string): Observable<AgentThreadMemory>;
1897
2775
  getArtifacts(conversationId: string): Observable<AgentArtifact[]>;
1898
- /** Downloads one artifact version with the host's credentials. */
2776
+ /**
2777
+ * Downloads one artifact version with the host's credentials. Rejects with `NhAssistantApiError`,
2778
+ * for example `assistant-artifact-not-found` or `assistant-network`.
2779
+ */
1899
2780
  downloadArtifact(conversationId: string, artifactId: string): Promise<Blob>;
2781
+ /**
2782
+ * The agent runs the caller may see, newest first: runs on objects the caller reads and runs for
2783
+ * the whole application whose agent's view policy the caller passes. Errors with
2784
+ * `assistant-run-filter-invalid` for an invalid filter, with the refused parts in `fieldErrors`
2785
+ * (`page`, `itemsPerPage`, `agentId`, `subjectType`, `subjectId`, `status`, `to`).
2786
+ */
2787
+ getRunHistory(filter?: AgentRunFilter): Observable<AgentRunHistory>;
2788
+ /**
2789
+ * The boards of the groups of agents the caller sees at least one agent of, ordered by name: an
2790
+ * agent that works on the whole application by its view policy, another by its required policy.
2791
+ */
2792
+ getBoards(): Observable<AgentBoardList>;
2793
+ /**
2794
+ * The board of one group: per agent what it works on, its latest result for the whole application,
2795
+ * its open proposals, whether the caller may run it now and whether something is new since the
2796
+ * caller's last visit. `divisionId` opens the board of one division the caller may work in. Fails
2797
+ * with `assistant-board-not-found` for an unknown group or one the caller sees no agent of, and with
2798
+ * `assistant-board-scope-invalid` for a malformed division id.
2799
+ */
2800
+ getBoard(groupId: string, divisionId?: string | null): Observable<AgentBoard>;
2801
+ /** Records that the caller looked at the board now, so it marks what is new after this visit. */
2802
+ visitBoard(groupId: string, divisionId?: string | null): Observable<AgentBoardVisit>;
2803
+ /**
2804
+ * One run with its whole result, its proposals and its files. Fails with `assistant-run-not-found`
2805
+ * for an unknown run and for one the caller may not see.
2806
+ */
2807
+ getRunResult(runId: string): Observable<AgentRunResult>;
2808
+ /**
2809
+ * Downloads one file a run saved, with the host's credentials. Rejects with `NhAssistantApiError`,
2810
+ * for example `assistant-artifact-not-found`, `assistant-run-not-found` or `assistant-network`.
2811
+ */
2812
+ downloadRunArtifact(runId: string, artifactId: string): Promise<Blob>;
1900
2813
  /** Cancels a run at its next safe point and withdraws its open proposals; needs the participant role. */
1901
2814
  cancelRun(runId: string): Observable<void>;
1902
- /** Resumes or restarts a failed or cancelled run; needs the approver role. */
2815
+ /**
2816
+ * Resumes or restarts a failed or cancelled run; needs the approver role. A restart starts the agent
2817
+ * again like `startAgent`, with the same outcomes and refusals; a resume answers `queued`.
2818
+ */
1903
2819
  retryRun(runId: string, mode: AgentRunRetryMode): Observable<AgentTriggerReceipt>;
1904
2820
  /** Pending proposals the caller may decide, sorted by expiry. */
1905
2821
  getInbox(filter?: AgentInboxFilter): Observable<AgentInbox>;
@@ -1979,7 +2895,8 @@ type NhAssistantLiveState = 'off' | 'connecting' | 'connected' | 'reconnecting'
1979
2895
  * Live updates of the assistant hub: conversation changes, read positions, removals, the turn
1980
2896
  * events of other sessions and changes to the work of agents that run on their own. Connects only
1981
2897
  * 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.
2898
+ * because updates sent while disconnected are lost. The work of agents for the whole application
2899
+ * lists no members, so it arrives only while a screen watches it (`watchAgentWork`).
1983
2900
  */
1984
2901
  declare class NhAssistantLiveService {
1985
2902
  private readonly config;
@@ -1997,6 +2914,9 @@ declare class NhAssistantLiveService {
1997
2914
  private hubUrl;
1998
2915
  private revision;
1999
2916
  private restartTimer?;
2917
+ /** The screens that watch the work of agents for the whole application. */
2918
+ private agentWorkWatchers;
2919
+ private watchTimer?;
2000
2920
  readonly changed$: Observable<LiveConversationChanged>;
2001
2921
  readonly read$: Observable<LiveConversationRead>;
2002
2922
  readonly removed$: Observable<LiveConversationRemoved>;
@@ -2016,8 +2936,24 @@ declare class NhAssistantLiveService {
2016
2936
  * signed-in user changed.
2017
2937
  */
2018
2938
  connect(hubPath: string | null, restart?: boolean): Promise<void>;
2939
+ /**
2940
+ * Follows the work of agents for the whole application, such as their proposals and runs, while the
2941
+ * returned function has not been called; a screen that shows it, such as the approval inbox or a
2942
+ * board, watches it while it is shown. The whole application lists no members, so the hub sends its
2943
+ * agents' work only to connections that watch it: it joins the work the server decides the person
2944
+ * may read, the agent's view policy included, renews the watch when the server says and after every
2945
+ * reconnect, and so checks the person's rights again. The watch ends when the last screen releases
2946
+ * it. Without a connection nothing arrives and screens keep their own reload.
2947
+ */
2948
+ watchAgentWork(): () => void;
2019
2949
  stop(): Promise<void>;
2020
2950
  private build;
2951
+ /**
2952
+ * Asks the hub to watch the work of agents for the whole application for the screens that watch it,
2953
+ * and schedules the renewal the server asks for. An older server without watching, or a failed call,
2954
+ * is tried again later; live updates stay optional.
2955
+ */
2956
+ private renewAgentWorkWatch;
2021
2957
  /** Starts over after the automatic reconnect gave up or the first start failed. */
2022
2958
  private scheduleRestart;
2023
2959
  private token;
@@ -2532,6 +3468,129 @@ declare const NH_ASSISTANT_CONVERSATION_FRAGMENT = "nh-assistant-conversation";
2532
3468
  /** Builds the default invitation link: the current page with the join fragment. */
2533
3469
  declare function nhAssistantShareLink(conversationId: string, token: string): string;
2534
3470
 
3471
+ /** The `type` of the message the assistant's OAuth callback page posts to its opener. */
3472
+ declare const NH_ASSISTANT_MCP_AUTHORIZATION_MESSAGE = "nh-assistant-mcp-authorization";
3473
+ /**
3474
+ * What an authorization window reports: the flow and its one-time completion code, which
3475
+ * `POST mcp-connections/complete` turns into the connection with the caller's own session, or the
3476
+ * failure code of the callback (for example `assistant-mcp-authorization-failed`).
3477
+ */
3478
+ type NhAssistantMcpAuthorizationOutcome = {
3479
+ flowId: string;
3480
+ completionCode: string;
3481
+ code?: undefined;
3482
+ } | {
3483
+ flowId: string | null;
3484
+ code: string;
3485
+ completionCode?: undefined;
3486
+ };
3487
+ /** A window opened for one authorization. */
3488
+ interface NhAssistantMcpAuthorizationHandle {
3489
+ /** Shows the authorization and emits its outcome once, then completes. */
3490
+ authorize(start: McpAuthorizationStart): Observable<NhAssistantMcpAuthorizationOutcome>;
3491
+ /** Closes the window, for example when starting the authorization failed. */
3492
+ close(): void;
3493
+ }
3494
+ /**
3495
+ * Opens MCP authorizations in the person's browser. `open()` runs in the click handler, before the
3496
+ * authorization URL is known, so popup blockers allow the window.
3497
+ */
3498
+ interface NhAssistantMcpAuthorizationWindow {
3499
+ open(): NhAssistantMcpAuthorizationHandle;
3500
+ }
3501
+ /**
3502
+ * The authorization window of the assistant components. The default opens a popup and waits for the
3503
+ * callback page's message; the testing package replaces it for the mock back-end.
3504
+ */
3505
+ declare const NH_ASSISTANT_MCP_AUTHORIZATION_WINDOW: InjectionToken<NhAssistantMcpAuthorizationWindow>;
3506
+ /**
3507
+ * Opens the authorization in a popup. Only a message from that popup, sent by the assistant's
3508
+ * callback page (`callbackOrigin`), with the started flow is accepted; the completion code is useless
3509
+ * without the starter's own session. A closed popup
3510
+ * without a message reports `assistant-mcp-authorization-cancelled`, a blocked one
3511
+ * `assistant-mcp-popup-blocked`.
3512
+ */
3513
+ declare class NhAssistantMcpPopupAuthorizationWindow implements NhAssistantMcpAuthorizationWindow {
3514
+ private readonly document;
3515
+ constructor(document: Document);
3516
+ open(): NhAssistantMcpAuthorizationHandle;
3517
+ }
3518
+ /**
3519
+ * Reads the outcome of a redirect-mode authorization from a URL fragment
3520
+ * (`#nh-mcp-flow=…&nh-mcp-code=…` or `#nh-mcp-error=…&nh-mcp-message-key=…`); null when the fragment
3521
+ * has none. The text of a failure comes from its code. Remove the fragment from the address bar after
3522
+ * reading it.
3523
+ */
3524
+ declare function nhAssistantMcpAuthorizationFromFragment(fragment: string): NhAssistantMcpAuthorizationOutcome | null;
3525
+ /**
3526
+ * Runs one authorization: starts it, shows it in the window opened before, and completes it with
3527
+ * the caller's own session. Errors with `NhAssistantApiError`, also for the window's failure codes.
3528
+ */
3529
+ declare function nhAssistantConnectMcp(handle: NhAssistantMcpAuthorizationHandle, start: Observable<McpAuthorizationStart>, complete: (request: McpCompleteRequest) => Observable<McpCompletion>): Observable<McpCompletion>;
3530
+
3531
+ /**
3532
+ * The outcome of an authorization the page returned from in redirect mode: the activated connection,
3533
+ * or the failure code to show. `serverId` names the server whose connection the page left for, when
3534
+ * this browser tab remembered it, so a screen shows the outcome at that server only.
3535
+ */
3536
+ type NhAssistantMcpReturnOutcome = {
3537
+ completion: McpCompletion;
3538
+ code?: undefined;
3539
+ serverId?: string | null;
3540
+ } | {
3541
+ code: string;
3542
+ completion?: undefined;
3543
+ serverId?: string | null;
3544
+ };
3545
+ /**
3546
+ * Connects MCP accounts the way the host configured (`mcpConnectMode`): in a popup that the click
3547
+ * opens, or by sending the page to the authorization server and back. Every authorization completes
3548
+ * with the caller's own session.
3549
+ */
3550
+ declare class NhAssistantMcpConnectService {
3551
+ private readonly api;
3552
+ private readonly config;
3553
+ private readonly authorizationWindow;
3554
+ private readonly document;
3555
+ /**
3556
+ * The outcome of the redirect-mode authorization this page opened with, until a screen showed it.
3557
+ * `nh-assistant-connection-required` shows the outcome of its server without taking it; the
3558
+ * connection lists of the preferences and the administration show it and take it.
3559
+ */
3560
+ readonly returned: _angular_core.WritableSignal<NhAssistantMcpReturnOutcome | null>;
3561
+ /** Whether authorizations leave the page instead of opening a popup. */
3562
+ get redirects(): boolean;
3563
+ /**
3564
+ * Connects the caller's own account to a server each person connects to. Call it in the click
3565
+ * handler, so the popup is allowed. In redirect mode the page leaves and the observable never
3566
+ * emits; the page completes the authorization when it returns.
3567
+ */
3568
+ connect(serverId: string, options?: {
3569
+ allowBackgroundUse?: boolean;
3570
+ }): Observable<McpCompletion>;
3571
+ /**
3572
+ * Runs any authorization start, for example an administrator's organization connection, in the
3573
+ * configured mode. `serverId` lets the page show the outcome at that server after a redirect.
3574
+ */
3575
+ run(start: (request: McpAuthorizeRequest) => Observable<McpAuthorizationStart>, serverId?: string): Observable<McpCompletion>;
3576
+ /** Leaves the page for an authorization in redirect mode. */
3577
+ navigate(url: string): void;
3578
+ /**
3579
+ * Completes a redirect-mode authorization when the page opened with its fragment, removes the
3580
+ * fragment from the address and records the outcome in `returned`: the connection, or the code of
3581
+ * whatever failed, also when completing it failed. Emits null without a fragment and never errors.
3582
+ */
3583
+ completeReturn(): Observable<NhAssistantMcpReturnOutcome | null>;
3584
+ private record;
3585
+ private removeFragment;
3586
+ /** Remembers in this tab which server's connection the page leaves for. */
3587
+ private rememberLeftFor;
3588
+ /** The server this tab left for, forgotten once read. */
3589
+ private takeLeftFor;
3590
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantMcpConnectService, never>;
3591
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NhAssistantMcpConnectService>;
3592
+ }
3593
+
2535
3594
  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';
2536
3595
  /**
2537
3596
  * Optional icon classes of the host's icon library, for example `{ close: 'ph ph-x' }`.
@@ -2558,7 +3617,7 @@ declare class NhAssistantLauncherComponent {
2558
3617
  readonly store: NhAssistantStore;
2559
3618
  readonly panel: NhAssistantPanelService;
2560
3619
  readonly waitingForApproval: _angular_core.Signal<boolean>;
2561
- readonly badge: _angular_core.Signal<"running" | "unread" | "waiting" | null>;
3620
+ readonly badge: _angular_core.Signal<"running" | "waiting" | "unread" | null>;
2562
3621
  readonly unreadLabel: _angular_core.Signal<string>;
2563
3622
  readonly label: _angular_core.Signal<"nh-assistant.launcher.close" | "nh-assistant.launcher.open">;
2564
3623
  constructor();
@@ -2605,7 +3664,14 @@ declare class NhAssistantThreadComponent {
2605
3664
  readonly approvalDecision: _angular_core.OutputEmitterRef<ApprovalDecision>;
2606
3665
  /** The decision about an approval card together with its approval id. */
2607
3666
  readonly approvalChoice: _angular_core.OutputEmitterRef<NhAssistantApprovalChoice>;
3667
+ /**
3668
+ * The question to ask again after the viewer connected an MCP server from a connection card: the
3669
+ * text of the user message the card answered. The panel sends it.
3670
+ */
3671
+ readonly retryMessage: _angular_core.OutputEmitterRef<string>;
2608
3672
  private readonly names;
3673
+ /** Asks the question again that the assistant message with a connection card answered. */
3674
+ retryAfterConnect(message: Message): void;
2609
3675
  readonly virtualThreshold = 200;
2610
3676
  readonly virtual: _angular_core.Signal<boolean>;
2611
3677
  /**
@@ -2636,7 +3702,7 @@ declare class NhAssistantThreadComponent {
2636
3702
  private scrollElement;
2637
3703
  private scrollToEnd;
2638
3704
  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>;
3705
+ 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
3706
  }
2641
3707
 
2642
3708
  /**
@@ -2658,7 +3724,7 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
2658
3724
  readonly showConversations: _angular_core.WritableSignal<boolean>;
2659
3725
  readonly showPreferences: _angular_core.WritableSignal<boolean>;
2660
3726
  readonly showShare: _angular_core.WritableSignal<boolean>;
2661
- readonly shareSection: _angular_core.WritableSignal<"members" | "link" | "all">;
3727
+ readonly shareSection: _angular_core.WritableSignal<"members" | "all" | "link">;
2662
3728
  readonly notificationError: _angular_core.WritableSignal<NhAssistantError | null>;
2663
3729
  readonly notificationsLabel: _angular_core.Signal<"nh-assistant.panel.notifications-off" | "nh-assistant.panel.notifications-on">;
2664
3730
  readonly adminRoute: string | any[] | null;
@@ -2980,8 +4046,9 @@ declare class NhAssistantAgentPickerComponent {
2980
4046
  /** Maximum length of the user's own instructions. */
2981
4047
  declare const NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS = 1000;
2982
4048
  /**
2983
- * The user's own assistant preferences: desktop notifications, style, form of address,
2984
- * answer length and optional instructions. Notifications apply immediately; the other
4049
+ * The user's own assistant preferences: desktop notifications, background use of MCP servers
4050
+ * with the user's own account, style, form of address, answer length and optional instructions.
4051
+ * Notifications and background use apply immediately; the other
2985
4052
  * preferences steer style only and are saved together, below the application context and
2986
4053
  * agent instructions.
2987
4054
  */
@@ -3027,6 +4094,75 @@ declare class NhAssistantPreferencesComponent {
3027
4094
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantPreferencesComponent, "nh-assistant-preferences", never, {}, { "closed": "closed"; "saved": "saved"; }, never, never, true, never>;
3028
4095
  }
3029
4096
 
4097
+ /**
4098
+ * The caller's own MCP accounts: servers each person connects to with OAuth, with Connect,
4099
+ * Connect again and Disconnect, and the consent to background use of servers that run with the
4100
+ * caller's own account. Each change applies at once. Renders nothing while no server asks for it,
4101
+ * so most applications never show it.
4102
+ */
4103
+ declare class NhAssistantMcpConnectionsComponent {
4104
+ private readonly api;
4105
+ private readonly connector;
4106
+ private readonly store;
4107
+ private loadSubscription?;
4108
+ private updateSubscription?;
4109
+ readonly id: string;
4110
+ readonly connections: _angular_core.WritableSignal<McpConnection[]>;
4111
+ readonly loadFailed: _angular_core.WritableSignal<boolean>;
4112
+ /** The server whose consent or connection is being changed. */
4113
+ readonly busy: _angular_core.WritableSignal<string | null>;
4114
+ readonly confirmingDisconnect: _angular_core.WritableSignal<string | null>;
4115
+ /** The latest change to announce, per server. */
4116
+ readonly notice: _angular_core.WritableSignal<{
4117
+ serverId: string;
4118
+ key: string;
4119
+ } | null>;
4120
+ readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
4121
+ readonly errorKeys: _angular_core.Signal<string[]>;
4122
+ /** Whether any listed server is one the caller connects with OAuth. */
4123
+ readonly connectsAccounts: _angular_core.Signal<boolean>;
4124
+ constructor();
4125
+ load(): void;
4126
+ /** The agents' names as the chat shows them; an agent the chat does not list shows its id. */
4127
+ agentKeys(connection: McpConnection): string[];
4128
+ toggle(connection: McpConnection, event: Event): void;
4129
+ /** Connects the caller's own account; call from the click, so the popup is allowed. */
4130
+ connect(connection: McpConnection): void;
4131
+ disconnect(connection: McpConnection): void;
4132
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantMcpConnectionsComponent, never>;
4133
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantMcpConnectionsComponent, "nh-assistant-mcp-connections", never, {}, {}, never, never, true, never>;
4134
+ }
4135
+
4136
+ /**
4137
+ * The card of a turn that went on without an MCP server the person who asked has to connect. It
4138
+ * connects the viewer's own account, in a popup or by redirect as the host configured, and then
4139
+ * offers to ask again. After a redirect the page returns to, the card of that server shows how the
4140
+ * connection ended: connected, or the failure with its translated code.
4141
+ */
4142
+ declare class NhAssistantConnectionRequiredComponent {
4143
+ private readonly connections;
4144
+ private subscription?;
4145
+ readonly part: _angular_core.InputSignal<ConnectionRequiredPart>;
4146
+ /** Whether "Ask again" is offered once the account is connected. */
4147
+ readonly canRetry: _angular_core.InputSignal<boolean>;
4148
+ /** Asks the question of the turn again after the account was connected. */
4149
+ readonly retry: _angular_core.OutputEmitterRef<void>;
4150
+ readonly id: string;
4151
+ readonly state: _angular_core.WritableSignal<"failed" | "idle" | "connected" | "connecting">;
4152
+ /** Why connecting failed, as a code and translation key. */
4153
+ readonly error: _angular_core.WritableSignal<NhAssistantError | null>;
4154
+ /** The code of `error`. */
4155
+ readonly errorCode: _angular_core.Signal<string | null>;
4156
+ readonly errorKeys: _angular_core.Signal<string[]>;
4157
+ /** The connect button names connecting again when the person had connected before. */
4158
+ readonly again: _angular_core.Signal<boolean>;
4159
+ constructor();
4160
+ connect(): void;
4161
+ private showReturned;
4162
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantConnectionRequiredComponent, never>;
4163
+ 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>;
4164
+ }
4165
+
3030
4166
  /**
3031
4167
  * Sharing of the open conversation. The owner creates, copies, renews or stops an invitation
3032
4168
  * link, invites colleagues through the application's directory when it offers one, and removes
@@ -3040,7 +4176,7 @@ declare class NhAssistantShareComponent {
3040
4176
  /** Emitted when the user leaves the view. */
3041
4177
  readonly closed: _angular_core.OutputEmitterRef<void>;
3042
4178
  /** Show the invitation link, participants, or both (the default for custom hosts). */
3043
- readonly section: _angular_core.InputSignal<"members" | "link" | "all">;
4179
+ readonly section: _angular_core.InputSignal<"members" | "all" | "link">;
3044
4180
  readonly id: string;
3045
4181
  readonly conversation: _angular_core.Signal<Conversation | null>;
3046
4182
  readonly isOwner: _angular_core.Signal<boolean>;
@@ -3126,6 +4262,13 @@ declare class NhAssistantTranslatePipe implements PipeTransform {
3126
4262
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantTranslatePipe, "nhAssistantTranslate", true>;
3127
4263
  }
3128
4264
 
4265
+ /**
4266
+ * Watches the work of agents for the whole application while the calling component lives, so their
4267
+ * proposals and runs arrive as live agent-work updates although the whole application lists no
4268
+ * members (see `NhAssistantLiveService.watchAgentWork`). Call it in an injection context, for example
4269
+ * a component constructor, of a screen that shows that work, such as the approval inbox or a board.
4270
+ */
4271
+ declare function nhAssistantWatchAgentWork(): void;
3129
4272
  /**
3130
4273
  * Calls `reload` once a burst of live agent-work updates that `matches` has settled, and after
3131
4274
  * every (re)connect of the hub, because updates sent while it was disconnected are lost. Without a
@@ -3134,12 +4277,142 @@ declare class NhAssistantTranslatePipe implements PipeTransform {
3134
4277
  */
3135
4278
  declare function nhAssistantReloadOnAgentWork(matches: (change: LiveAgentWorkChanged) => boolean, reload: () => void): void;
3136
4279
 
4280
+ /** One choice of a picker: the stored value, its name and what it means. */
4281
+ interface NhAssistantPickerOption {
4282
+ value: string;
4283
+ label: string;
4284
+ description?: string | null;
4285
+ }
4286
+ /**
4287
+ * A searchable choice for the administration (internal): a combobox with a listbox popup in the ARIA
4288
+ * 1.2 pattern. Typing filters the options on name and description, the arrow keys move, Enter
4289
+ * chooses and Escape closes. With `search` it asks the server instead, after `minQueryLength`
4290
+ * characters; a failed search says why below the field, with its translated code, and offers to
4291
+ * search again instead of claiming that nothing was found. `noneLabel` adds an explicit empty
4292
+ * choice, emitted as `''`.
4293
+ */
4294
+ declare class NhAssistantPickerComponent {
4295
+ private readonly host;
4296
+ private searchTimer?;
4297
+ private searchSubscription?;
4298
+ /** The text of the latest search, for searching again after a failure. */
4299
+ private lastQuery;
4300
+ private readonly field;
4301
+ /** The id of the text field, for the label's `for`. */
4302
+ readonly inputId: _angular_core.InputSignal<string>;
4303
+ readonly options: _angular_core.InputSignal<readonly NhAssistantPickerOption[]>;
4304
+ readonly value: _angular_core.InputSignal<string | null>;
4305
+ /** The name to show for a value that is not among the options, such as a found account. */
4306
+ readonly selectedLabel: _angular_core.InputSignal<string | null>;
4307
+ /** The label of the empty choice; without it there is none. */
4308
+ readonly noneLabel: _angular_core.InputSignal<string | null>;
4309
+ readonly placeholder: _angular_core.InputSignal<string | null>;
4310
+ /** Searches the server; the options are ignored while it is set. */
4311
+ readonly search: _angular_core.InputSignal<((query: string) => Observable<NhAssistantPickerOption[]>) | null>;
4312
+ readonly minQueryLength: _angular_core.InputSignal<number>;
4313
+ readonly invalid: _angular_core.InputSignal<boolean>;
4314
+ readonly describedBy: _angular_core.InputSignal<string | null>;
4315
+ readonly disabled: _angular_core.InputSignal<boolean>;
4316
+ readonly valueChange: _angular_core.OutputEmitterRef<string>;
4317
+ /** The chosen option, also for a search result the options do not contain. */
4318
+ readonly optionChange: _angular_core.OutputEmitterRef<NhAssistantPickerOption | null>;
4319
+ readonly listId: string;
4320
+ readonly open: _angular_core.WritableSignal<boolean>;
4321
+ /** The text typed since the list opened; `null` shows the chosen option's name. */
4322
+ readonly query: _angular_core.WritableSignal<string | null>;
4323
+ readonly active: _angular_core.WritableSignal<number>;
4324
+ readonly searching: _angular_core.WritableSignal<boolean>;
4325
+ readonly results: _angular_core.WritableSignal<NhAssistantPickerOption[]>;
4326
+ /** Why the latest search failed; `null` after a search that answered. */
4327
+ readonly searchError: _angular_core.WritableSignal<NhAssistantError | null>;
4328
+ readonly searchErrorKeys: _angular_core.Signal<string[]>;
4329
+ readonly searchErrorId: string;
4330
+ /** The field describes itself with the host's ids and, after a failed search, with its reason. */
4331
+ readonly fieldDescribedBy: _angular_core.Signal<string | null>;
4332
+ private readonly chosen;
4333
+ readonly selected: _angular_core.Signal<NhAssistantPickerOption | null>;
4334
+ readonly inputText: _angular_core.Signal<string>;
4335
+ readonly visible: _angular_core.Signal<NhAssistantPickerOption[]>;
4336
+ /** Why the list is empty: still typing, searching, the search failed, or nothing found. */
4337
+ readonly emptyKey: _angular_core.Signal<"nh-assistant.picker.searching" | "nh-assistant.picker.search-failed" | "nh-assistant.picker.type-more" | "nh-assistant.picker.no-results">;
4338
+ readonly activeId: _angular_core.Signal<string | null>;
4339
+ constructor();
4340
+ optionId(index: number): string;
4341
+ /** Moves the focus to the text field, for example after a refused save. */
4342
+ focus(): void;
4343
+ toggle(): void;
4344
+ openList(): void;
4345
+ onInput(event: Event): void;
4346
+ onKeydown(event: KeyboardEvent): void;
4347
+ onBlur(): void;
4348
+ /** Searches the latest text again after a failed search and shows the list. */
4349
+ retrySearch(): void;
4350
+ choose(option: NhAssistantPickerOption): void;
4351
+ private close;
4352
+ private startSearch;
4353
+ private scrollActiveIntoView;
4354
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantPickerComponent, never>;
4355
+ 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>;
4356
+ }
4357
+
4358
+ /** Where a subject link leads: a route of the host application or an `https` address elsewhere. */
4359
+ interface NhAssistantSubjectTarget {
4360
+ href: string;
4361
+ /** The URL the router navigates to; `null` for an address outside the application. */
4362
+ route: string | null;
4363
+ }
4364
+ /**
4365
+ * The name of a subject with the name of its type, linked to where the application shows the
4366
+ * subject (internal). The host's `subjectLinks` builder wins over the server's link; a link within
4367
+ * the application navigates through the router, an `https` link leaves it, and anything else shows
4368
+ * no link. Ctrl-, Cmd-, Shift- and middle-clicks keep the browser's behavior, such as a new tab.
4369
+ * A name that already says the type, as "The whole application" does for the application as a
4370
+ * whole, is shown once.
4371
+ */
4372
+ declare class NhAssistantSubjectLinkComponent {
4373
+ private readonly config;
4374
+ private readonly router;
4375
+ private readonly locationStrategy;
4376
+ private readonly injector;
4377
+ readonly subjectType: _angular_core.InputSignal<string>;
4378
+ readonly subjectId: _angular_core.InputSignal<string>;
4379
+ /** The text people read, usually the subject's display name. */
4380
+ readonly label: _angular_core.InputSignal<string>;
4381
+ /** The name of the subject type, such as "Project"; nothing is shown without one. */
4382
+ readonly typeName: _angular_core.InputSignal<string | null | undefined>;
4383
+ /** The server's link to the subject. */
4384
+ readonly link: _angular_core.InputSignal<string | null | undefined>;
4385
+ /** The type's name, unless the subject's name is the type's name itself, as for the whole application. */
4386
+ readonly shownTypeName: _angular_core.Signal<string | null>;
4387
+ readonly target: _angular_core.Signal<NhAssistantSubjectTarget | null>;
4388
+ open(event: MouseEvent, target: NhAssistantSubjectTarget): void;
4389
+ private urlTarget;
4390
+ private routeTarget;
4391
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantSubjectLinkComponent, never>;
4392
+ 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>;
4393
+ }
4394
+
4395
+ /** Renders model text into sanitized HTML. Pure, so unchanged text is not rendered again. */
4396
+ declare class NhAssistantMarkdownPipe implements PipeTransform {
4397
+ private readonly renderer;
4398
+ transform(text: string): string;
4399
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantMarkdownPipe, never>;
4400
+ static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantMarkdownPipe, "nhAssistantMarkdown", true>;
4401
+ }
4402
+
3137
4403
  /** Converts any failure into a user-facing code and translation key, never raw text. */
3138
4404
  declare function toNhAssistantError(error: unknown): NhAssistantError;
4405
+ /** The error of a code without a message key of its own, such as a code a callback page reported. */
4406
+ declare function nhAssistantErrorOf(code: string): NhAssistantError;
3139
4407
  /** Translation keys for an error, from the most to the least specific. */
3140
4408
  declare function nhAssistantErrorKeys(error: NhAssistantError | null): string[];
4409
+ /**
4410
+ * Translation keys for a bare failure code, such as a run's `failureCode`: the registered text of
4411
+ * the code, then the generic text. Empty without a code.
4412
+ */
4413
+ declare function nhAssistantCodeKeys(code: string | null | undefined): string[];
3141
4414
  /** Dash-case identifiers as the contract requires for agent and MCP server ids. */
3142
4415
  declare const NH_ASSISTANT_DASH_CASE: RegExp;
3143
4416
 
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 };
4417
+ 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_MCP_AUTHORIZATION_MESSAGE, NH_ASSISTANT_MCP_AUTHORIZATION_WINDOW, 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_SSE_EVENT_TYPES, NH_ASSISTANT_SUBJECT_SEARCH, NH_ASSISTANT_SYSTEM_GLOBAL_ID, NH_ASSISTANT_SYSTEM_SUBJECT_TYPE, NH_ASSISTANT_TRANSLATIONS, 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, normalizeNhAssistantClientContext, provideNhAssistant, 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 };
4418
+ 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, ApplicationContext, ApplicationContextVersion, ApprovalDecision, ApprovalPart, ApprovalPolicySummary, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, ApproverSummary, AssistantAccount, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, 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, LiveAgentWorkChanged, LiveAgentWorkReason, LiveAgentWorkWatch, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, McpAuthMode, McpAuthorization, McpAuthorizationStart, McpAuthorizeRequest, McpBuiltInAuthMode, McpCompleteRequest, McpCompletion, McpConnection, McpConnectionScope, McpConnectionStatus, McpConnectionsSummary, McpCustomAuthMode, McpDiscoverRequest, McpDiscovery, McpHeadlessUse, McpOAuthInput, McpOAuthSettings, McpOrganizationConnection, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, McpTransport, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantMcpAuthorizationHandle, NhAssistantMcpAuthorizationOutcome, NhAssistantMcpAuthorizationWindow, NhAssistantMcpReturnOutcome, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantSubjectLinkBuilder, NhAssistantSubjectRef, 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, UpdateMcpConnectionRequest, UpdateMcpToolRequest, NhAssistantPickerOption as ɵNhAssistantPickerOption };