@newheap/platform-ai-chat 0.13.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/README.md +32 -0
- package/admin/index.d.ts +762 -14
- package/agent-runs/index.d.ts +450 -17
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +3634 -125
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs +1288 -61
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +4394 -586
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +3754 -674
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +919 -20
- package/i18n/nl.json +919 -20
- package/index.d.ts +1623 -20
- package/package.json +1 -1
- package/testing/index.d.ts +389 -20
package/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { TemplatePortal } from '@angular/cdk/portal';
|
|
|
12
12
|
type AgentSubjectRole = 'none' | 'reader' | 'participant' | 'approver';
|
|
13
13
|
type AgentRunStatus = 'queued' | 'running' | 'waiting-for-approval' | 'completed' | 'failed' | 'cancelled';
|
|
14
14
|
type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
|
|
15
|
-
type AgentGrantSource = 'none' | 'delegated' | 'agent' | 'delegated-read';
|
|
15
|
+
type AgentGrantSource = 'none' | 'delegated' | 'agent' | 'delegated-read' | 'accountable';
|
|
16
16
|
/**
|
|
17
17
|
* How a run worked: `model` through the language model, `rule` through the agent's rules without a
|
|
18
18
|
* model, `rule-then-model` when the rules handed the run over to the model.
|
|
@@ -49,6 +49,10 @@ interface AgentRun {
|
|
|
49
49
|
/** The skill of the agent the run worked in; missing or null for the agent's own tools. */
|
|
50
50
|
skill?: string | null;
|
|
51
51
|
skillChosenBy?: AgentSkillChooser | null;
|
|
52
|
+
/** The version of a skill defined as data the run worked in; absent for a skill in code. */
|
|
53
|
+
skillVersion?: number | null;
|
|
54
|
+
/** The run evaluated a candidate version of its skill in the shadow thread. */
|
|
55
|
+
skillCandidate?: boolean;
|
|
52
56
|
/** The agent that handed the run's work off; missing or null for a run no agent asked for. */
|
|
53
57
|
requestedByAgentId?: string | null;
|
|
54
58
|
/**
|
|
@@ -79,6 +83,16 @@ interface AgentThread {
|
|
|
79
83
|
* nobody is notified and nothing proposed in it executes.
|
|
80
84
|
*/
|
|
81
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;
|
|
82
96
|
}
|
|
83
97
|
interface AgentThreadLookup {
|
|
84
98
|
thread: AgentThread | null;
|
|
@@ -97,6 +111,12 @@ interface AgentProposalDecisionRight {
|
|
|
97
111
|
/** One agent on a subject: its thread, `null` before it worked on the subject, and whether the caller may start it. */
|
|
98
112
|
interface AgentSubjectWorkAgent {
|
|
99
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;
|
|
100
120
|
thread: AgentThread | null;
|
|
101
121
|
canStart: boolean;
|
|
102
122
|
/**
|
|
@@ -130,6 +150,16 @@ interface AgentSubjectWork {
|
|
|
130
150
|
subjectType: string;
|
|
131
151
|
subjectId: string;
|
|
132
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;
|
|
133
163
|
/** The caller's live role. Without a role the server answers `404 assistant-subject-not-found`. */
|
|
134
164
|
role: Exclude<AgentSubjectRole, 'none'>;
|
|
135
165
|
agents: AgentSubjectWorkAgent[];
|
|
@@ -152,17 +182,216 @@ interface AgentSubjectSummaryList {
|
|
|
152
182
|
}
|
|
153
183
|
/** Maximum number of subjects one `POST subjects/{type}/summary` request accepts. */
|
|
154
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
|
+
}
|
|
155
374
|
interface StartAgentRequest {
|
|
156
375
|
agentId: string;
|
|
157
376
|
subjectType: string;
|
|
158
377
|
subjectId: string;
|
|
159
378
|
message?: string | null;
|
|
160
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';
|
|
161
389
|
interface AgentTriggerReceipt {
|
|
162
390
|
triggerId: string;
|
|
163
|
-
outcome:
|
|
391
|
+
outcome: AgentTriggerOutcome;
|
|
164
392
|
runId: string | null;
|
|
165
393
|
conversationId: string | null;
|
|
394
|
+
/** Why the run did not start yet, such as `assistant-agent-paused` with `waiting`; `null` otherwise. */
|
|
166
395
|
reasonCode: string | null;
|
|
167
396
|
}
|
|
168
397
|
interface AgentProposal {
|
|
@@ -175,6 +404,16 @@ interface AgentProposal {
|
|
|
175
404
|
subjectType: string;
|
|
176
405
|
subjectId: string;
|
|
177
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;
|
|
178
417
|
toolId: string;
|
|
179
418
|
summary: string;
|
|
180
419
|
/**
|
|
@@ -244,6 +483,29 @@ interface AgentProposal {
|
|
|
244
483
|
* Missing on older servers.
|
|
245
484
|
*/
|
|
246
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;
|
|
247
509
|
}
|
|
248
510
|
/** An application object a proposal changes, such as `{ type: 'project-task', id: '4711' }`. */
|
|
249
511
|
interface AgentProposalObject {
|
|
@@ -351,6 +613,89 @@ interface AgentArtifact {
|
|
|
351
613
|
type AgentRunRetryMode = 'resume' | 'restart';
|
|
352
614
|
/** `re-execute` runs the proposal again; `mark-resolved` confirms its outcome without running it. */
|
|
353
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
|
+
}
|
|
354
699
|
|
|
355
700
|
interface AssistantStatus {
|
|
356
701
|
enabled: boolean;
|
|
@@ -433,6 +778,10 @@ interface ConversationThread {
|
|
|
433
778
|
role: AgentSubjectRole;
|
|
434
779
|
/** Each open proposal of the thread and whether the caller may decide it now, oldest first. */
|
|
435
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;
|
|
436
785
|
}
|
|
437
786
|
/**
|
|
438
787
|
* The caller's right to decide one open proposal of an agent thread, checked like the decision
|
|
@@ -478,7 +827,23 @@ interface Message {
|
|
|
478
827
|
* `rule` for an assistant message the agent's rules wrote without a model.
|
|
479
828
|
*/
|
|
480
829
|
type MessageAuthorKind = 'person' | 'trigger' | 'rule';
|
|
481
|
-
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
|
+
}
|
|
482
847
|
interface TextPart {
|
|
483
848
|
type: 'text';
|
|
484
849
|
text: string;
|
|
@@ -504,7 +869,7 @@ interface ToolCallPart {
|
|
|
504
869
|
* `delegated`, `agent` or `delegated-read` when an agent used rights beyond the caller's own:
|
|
505
870
|
* the initiator's, its own grant, or a person's through a gateway read.
|
|
506
871
|
*/
|
|
507
|
-
grantSource?: 'delegated' | 'agent' | 'delegated-read' | null;
|
|
872
|
+
grantSource?: 'delegated' | 'agent' | 'delegated-read' | 'accountable' | null;
|
|
508
873
|
/** The result came from rights this viewer does not have and is shielded from them. */
|
|
509
874
|
restricted?: boolean;
|
|
510
875
|
}
|
|
@@ -650,6 +1015,12 @@ interface ToolCompletedEvent {
|
|
|
650
1015
|
resultPreview: string | null;
|
|
651
1016
|
}
|
|
652
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
|
+
}
|
|
653
1024
|
type TurnCompletionStatus = 'completed' | 'waiting-for-approval' | 'cancelled' | 'failed';
|
|
654
1025
|
interface TurnUsage {
|
|
655
1026
|
inputTokens: number;
|
|
@@ -673,6 +1044,7 @@ interface NhAssistantSseEventMap {
|
|
|
673
1044
|
'tool.started': ToolStartedEvent;
|
|
674
1045
|
'tool.completed': ToolCompletedEvent;
|
|
675
1046
|
'approval.required': ApprovalRequiredEvent;
|
|
1047
|
+
'connection.required': ConnectionRequiredEvent;
|
|
676
1048
|
'turn.completed': TurnCompletedEvent;
|
|
677
1049
|
'error': AssistantErrorEvent;
|
|
678
1050
|
}
|
|
@@ -702,6 +1074,10 @@ declare const NhAssistantClientErrorCodes: {
|
|
|
702
1074
|
readonly server: "assistant-server";
|
|
703
1075
|
/** The open conversation was deleted by its owner, or the user left or was removed. */
|
|
704
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";
|
|
705
1081
|
};
|
|
706
1082
|
type NhAssistantClientErrorCode = typeof NhAssistantClientErrorCodes[keyof typeof NhAssistantClientErrorCodes];
|
|
707
1083
|
|
|
@@ -741,6 +1117,14 @@ interface LiveAgentWorkChanged {
|
|
|
741
1117
|
subjectType: string;
|
|
742
1118
|
subjectId: string;
|
|
743
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
|
+
}
|
|
744
1128
|
/**
|
|
745
1129
|
* `ConversationEvent`: one turn event with the same `type` and `data` as the server-sent events
|
|
746
1130
|
* of the starting request, or `message.created` with a `Message` when a participant's message
|
|
@@ -763,6 +1147,38 @@ interface AssistantPreferences {
|
|
|
763
1147
|
/** At most 1,000 characters. Steers style only; it never overrides the fixed rules. */
|
|
764
1148
|
customInstructions: string | null;
|
|
765
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
|
+
}
|
|
766
1182
|
interface ApplicationContext {
|
|
767
1183
|
text: string;
|
|
768
1184
|
version: number;
|
|
@@ -787,6 +1203,12 @@ interface ToolCatalogEntry {
|
|
|
787
1203
|
source: 'local' | 'bridge' | 'mcp';
|
|
788
1204
|
effect: ToolCatalogEffect;
|
|
789
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;
|
|
790
1212
|
}
|
|
791
1213
|
/** Equals `NhAiAutonomyLevel`. */
|
|
792
1214
|
type AssistantAutonomy = 'observe' | 'explain' | 'propose' | 'simulate' | 'execute';
|
|
@@ -804,6 +1226,32 @@ interface AdminAgentInput {
|
|
|
804
1226
|
* resume an agent with `setAgentState`. A new agent starts active.
|
|
805
1227
|
*/
|
|
806
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;
|
|
807
1255
|
}
|
|
808
1256
|
/** Body of `PUT admin/agents/{id}`. */
|
|
809
1257
|
type UpdateAdminAgentRequest = AdminAgentInput & {
|
|
@@ -837,6 +1285,37 @@ interface AdminAgent extends AdminAgentInput {
|
|
|
837
1285
|
shadow?: AgentShadowState | null;
|
|
838
1286
|
/** The technical account that answers for the agent's new runs; null when it answers to none. */
|
|
839
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[];
|
|
840
1319
|
}
|
|
841
1320
|
/** The shadow modes an administrator chooses; `code` lets the mode in code decide again. */
|
|
842
1321
|
type AgentShadowMode = 'shadow' | 'live' | 'code';
|
|
@@ -927,7 +1406,136 @@ interface SetAgentStateRequest {
|
|
|
927
1406
|
/** Optional, at most 500 characters. */
|
|
928
1407
|
reason?: string | null;
|
|
929
1408
|
}
|
|
930
|
-
|
|
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';
|
|
931
1539
|
interface McpServerInput {
|
|
932
1540
|
id: string;
|
|
933
1541
|
displayName: string;
|
|
@@ -938,6 +1546,23 @@ interface McpServerInput {
|
|
|
938
1546
|
secret?: string | null;
|
|
939
1547
|
requiredPolicy: string | null;
|
|
940
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;
|
|
941
1566
|
}
|
|
942
1567
|
interface McpServer {
|
|
943
1568
|
id: string;
|
|
@@ -951,6 +1576,24 @@ interface McpServer {
|
|
|
951
1576
|
lastSyncAt: string | null;
|
|
952
1577
|
lastSyncStatus: 'ok' | 'failed' | null;
|
|
953
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;
|
|
954
1597
|
}
|
|
955
1598
|
interface McpServerTestResult {
|
|
956
1599
|
ok: boolean;
|
|
@@ -1213,6 +1856,386 @@ interface AgentFeedbackList {
|
|
|
1213
1856
|
items: AgentFeedbackItem[];
|
|
1214
1857
|
total: number;
|
|
1215
1858
|
}
|
|
1859
|
+
/** A building block registered in code that run configuration as data names. */
|
|
1860
|
+
interface RunBlock {
|
|
1861
|
+
name: string;
|
|
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;
|
|
1868
|
+
}
|
|
1869
|
+
/** Response of `GET admin/run-catalog`: what skills, triggers and run settings defined as data can name. */
|
|
1870
|
+
interface RunCatalog {
|
|
1871
|
+
triggerEvents: RunBlock[];
|
|
1872
|
+
subjectSets: RunBlock[];
|
|
1873
|
+
ruleHandlers: RunBlock[];
|
|
1874
|
+
approvalPolicies: string[];
|
|
1875
|
+
/** Chat profiles with function calling and streaming. */
|
|
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;
|
|
1958
|
+
}
|
|
1959
|
+
/** Which part of the run configuration a problem concerns. */
|
|
1960
|
+
type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger';
|
|
1961
|
+
/**
|
|
1962
|
+
* Data that is out of effect because it no longer fits the code, for example after a deploy removed
|
|
1963
|
+
* a profile, policy, rule handler, event or subject set it names.
|
|
1964
|
+
*/
|
|
1965
|
+
interface RunConfigurationProblem {
|
|
1966
|
+
agentId: string;
|
|
1967
|
+
kind: RunConfigurationProblemKind;
|
|
1968
|
+
/** The agent, skill or trigger id. */
|
|
1969
|
+
id: string;
|
|
1970
|
+
/** Such as `unknown-event` or `tool-not-covered`. */
|
|
1971
|
+
code: string;
|
|
1972
|
+
}
|
|
1973
|
+
/** Whom an agent answers to. */
|
|
1974
|
+
type AgentAccountability = 'agent' | 'subject-responsible' | 'service-account';
|
|
1975
|
+
/** Reads with rights beyond the thread's readers: shielded from them, or refused. */
|
|
1976
|
+
type AgentElevatedReads = 'restricted' | 'deny';
|
|
1977
|
+
/**
|
|
1978
|
+
* The run settings of an agent created in the administration. Grants are never data: in headless
|
|
1979
|
+
* runs the agent acts with the rights of the account it answers to, within its tool selectors.
|
|
1980
|
+
*/
|
|
1981
|
+
interface AgentRunSettings {
|
|
1982
|
+
version: number;
|
|
1983
|
+
accountability: AgentAccountability;
|
|
1984
|
+
serviceAccountActorId: string | null;
|
|
1985
|
+
delegateFromInitiator: boolean;
|
|
1986
|
+
allowGatewayReads: boolean;
|
|
1987
|
+
elevatedReads: AgentElevatedReads;
|
|
1988
|
+
approvalPolicy: string | null;
|
|
1989
|
+
retryCount: number;
|
|
1990
|
+
dailyToolCalls: number | null;
|
|
1991
|
+
dailyTokens: number | null;
|
|
1992
|
+
maxConcurrentRuns: number;
|
|
1993
|
+
maxRunsPerSubjectPerDay: number;
|
|
1994
|
+
maxTokensPerRun: number | null;
|
|
1995
|
+
triageProfile: string | null;
|
|
1996
|
+
ruleHandler: string | null;
|
|
1997
|
+
changedAt: string;
|
|
1998
|
+
changedBy: string;
|
|
1999
|
+
reason: string | null;
|
|
2000
|
+
inEffect: boolean;
|
|
2001
|
+
problem: string | null;
|
|
2002
|
+
}
|
|
2003
|
+
/** Body of `PUT admin/agents/{id}/run-settings`. */
|
|
2004
|
+
interface AgentRunSettingsRequest {
|
|
2005
|
+
accountability: AgentAccountability;
|
|
2006
|
+
/** For `service-account` only: an account that exists and may sign in. */
|
|
2007
|
+
serviceAccountActorId?: string | null;
|
|
2008
|
+
delegateFromInitiator?: boolean;
|
|
2009
|
+
/** Not for an agent that answers to itself. */
|
|
2010
|
+
allowGatewayReads?: boolean;
|
|
2011
|
+
elevatedReads?: AgentElevatedReads;
|
|
2012
|
+
approvalPolicy?: string | null;
|
|
2013
|
+
/** 0 to 10; 3 by default. */
|
|
2014
|
+
retryCount?: number | null;
|
|
2015
|
+
/** With `dailyTokens`, the daily budget per scope. */
|
|
2016
|
+
dailyToolCalls?: number | null;
|
|
2017
|
+
dailyTokens?: number | null;
|
|
2018
|
+
/** 1 to 100; 4 by default. */
|
|
2019
|
+
maxConcurrentRuns?: number | null;
|
|
2020
|
+
/** 1 to 1,000; 10 by default. */
|
|
2021
|
+
maxRunsPerSubjectPerDay?: number | null;
|
|
2022
|
+
maxTokensPerRun?: number | null;
|
|
2023
|
+
triageProfile?: string | null;
|
|
2024
|
+
ruleHandler?: string | null;
|
|
2025
|
+
/** The settings' current version; `null` for new settings. */
|
|
2026
|
+
expectedVersion?: number | null;
|
|
2027
|
+
/** Optional, at most 500 characters. */
|
|
2028
|
+
reason?: string | null;
|
|
2029
|
+
}
|
|
2030
|
+
/** A skill the agent declares in code; it cannot change here. */
|
|
2031
|
+
interface CodeSkill {
|
|
2032
|
+
skillId: string;
|
|
2033
|
+
description: string;
|
|
2034
|
+
}
|
|
2035
|
+
/** A trigger registered in code; it cannot change here. */
|
|
2036
|
+
interface CodeTrigger {
|
|
2037
|
+
triggerId: string;
|
|
2038
|
+
source: 'event' | 'schedule' | 'webhook';
|
|
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;
|
|
2060
|
+
}
|
|
2061
|
+
/** One version of a skill defined as data. */
|
|
2062
|
+
interface DataSkill {
|
|
2063
|
+
skillId: string;
|
|
2064
|
+
version: number;
|
|
2065
|
+
description: string;
|
|
2066
|
+
instructions: string | null;
|
|
2067
|
+
instructionsHash: string | null;
|
|
2068
|
+
tools: string[];
|
|
2069
|
+
profile: string | null;
|
|
2070
|
+
ruleHandler: string | null;
|
|
2071
|
+
maxTokensPerRun: number | null;
|
|
2072
|
+
dailyToolCalls: number | null;
|
|
2073
|
+
dailyTokens: number | null;
|
|
2074
|
+
approvalPolicy: string | null;
|
|
2075
|
+
changedAt: string;
|
|
2076
|
+
changedBy: string;
|
|
2077
|
+
reason: string | null;
|
|
2078
|
+
/** `false` with `problem` when the version no longer fits the code. */
|
|
2079
|
+
inEffect: boolean;
|
|
2080
|
+
problem: string | null;
|
|
2081
|
+
/** The candidate that runs in shadow next to this live version; missing or null without one. */
|
|
2082
|
+
candidate?: DataSkill | null;
|
|
2083
|
+
}
|
|
2084
|
+
/** How a change of a skill takes effect: at once, or as a candidate in shadow next to the live version. */
|
|
2085
|
+
type SkillApplyMode = 'live' | 'shadow';
|
|
2086
|
+
/** Body of `PUT admin/agents/{id}/skills/{skillId}`. */
|
|
2087
|
+
interface DataSkillRequest {
|
|
2088
|
+
/** At most 300 characters; triage and `use_skill` choose by it. */
|
|
2089
|
+
description: string;
|
|
2090
|
+
/** At most 20,000 characters. */
|
|
2091
|
+
instructions?: string | null;
|
|
2092
|
+
/** Within the agent's own tool selectors; empty uses the agent's. */
|
|
2093
|
+
tools?: string[];
|
|
2094
|
+
profile?: string | null;
|
|
2095
|
+
ruleHandler?: string | null;
|
|
2096
|
+
maxTokensPerRun?: number | null;
|
|
2097
|
+
dailyToolCalls?: number | null;
|
|
2098
|
+
dailyTokens?: number | null;
|
|
2099
|
+
approvalPolicy?: string | null;
|
|
2100
|
+
/** The live version the change was made on; `null` for a new skill. */
|
|
2101
|
+
expectedVersion?: number | null;
|
|
2102
|
+
reason?: string | null;
|
|
2103
|
+
/** For a change of a skill; `live` by default. */
|
|
2104
|
+
apply?: SkillApplyMode;
|
|
2105
|
+
}
|
|
2106
|
+
type DataSkillVersionStatus = 'live' | 'candidate' | 'superseded' | 'discarded';
|
|
2107
|
+
/** One version in the history of a skill defined as data. */
|
|
2108
|
+
interface DataSkillVersion {
|
|
2109
|
+
version: number;
|
|
2110
|
+
status: DataSkillVersionStatus;
|
|
2111
|
+
description: string;
|
|
2112
|
+
instructionsHash: string | null;
|
|
2113
|
+
createdAt: string;
|
|
2114
|
+
createdBy: string;
|
|
2115
|
+
reason: string | null;
|
|
2116
|
+
}
|
|
2117
|
+
/** Body of `POST admin/agents/{id}/skills/{skillId}/candidate/promote` and `.../discard`. */
|
|
2118
|
+
interface SkillCandidateRequest {
|
|
2119
|
+
/** The candidate version the change is for. */
|
|
2120
|
+
version: number;
|
|
2121
|
+
reason?: string | null;
|
|
2122
|
+
}
|
|
2123
|
+
/** The runs of one version in a comparison. */
|
|
2124
|
+
interface SkillVersionStats {
|
|
2125
|
+
version: number;
|
|
2126
|
+
runs: number;
|
|
2127
|
+
completed: number;
|
|
2128
|
+
failed: number;
|
|
2129
|
+
proposals: number;
|
|
2130
|
+
toolCalls: number;
|
|
2131
|
+
tokens: number;
|
|
2132
|
+
}
|
|
2133
|
+
/** The proposals of both versions for one tool. */
|
|
2134
|
+
interface SkillComparisonTool {
|
|
2135
|
+
toolId: string;
|
|
2136
|
+
liveProposals: number;
|
|
2137
|
+
candidateProposals: number;
|
|
2138
|
+
liveApproved: number;
|
|
2139
|
+
liveRejected: number;
|
|
2140
|
+
}
|
|
2141
|
+
/** Response of `GET admin/agents/{id}/skills/{skillId}/candidate/comparison`. Counts only. */
|
|
2142
|
+
interface SkillComparison {
|
|
2143
|
+
agentId: string;
|
|
2144
|
+
skillId: string;
|
|
2145
|
+
from: string;
|
|
2146
|
+
to: string;
|
|
2147
|
+
live: SkillVersionStats;
|
|
2148
|
+
candidate: SkillVersionStats;
|
|
2149
|
+
/** The events both versions handled. */
|
|
2150
|
+
pairedEvents: number;
|
|
2151
|
+
tools: SkillComparisonTool[];
|
|
2152
|
+
}
|
|
2153
|
+
/** Optional period of a comparison; it starts when the candidate was saved by default. */
|
|
2154
|
+
interface SkillComparisonFilter {
|
|
2155
|
+
from?: string;
|
|
2156
|
+
to?: string;
|
|
2157
|
+
}
|
|
2158
|
+
/** What happens to an event while a run on the subject is active. */
|
|
2159
|
+
type TriggerConflict = 'coalesce' | 'queue' | 'supersede' | 'ignore';
|
|
2160
|
+
/** A trigger defined as data: a named event or a schedule that starts the agent. */
|
|
2161
|
+
interface DataTrigger {
|
|
2162
|
+
triggerId: string;
|
|
2163
|
+
skillId: string | null;
|
|
2164
|
+
source: 'event' | 'schedule';
|
|
2165
|
+
event: string | null;
|
|
2166
|
+
cron: string | null;
|
|
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
|
+
*/
|
|
2172
|
+
subjectSet: string | null;
|
|
2173
|
+
message: string | null;
|
|
2174
|
+
conflict: TriggerConflict;
|
|
2175
|
+
debounceSeconds: number;
|
|
2176
|
+
/** In shadow its runs work in the agent's shadow threads. A new trigger starts in shadow. */
|
|
2177
|
+
shadow: boolean;
|
|
2178
|
+
version: number;
|
|
2179
|
+
changedAt: string;
|
|
2180
|
+
changedBy: string;
|
|
2181
|
+
reason: string | null;
|
|
2182
|
+
inEffect: boolean;
|
|
2183
|
+
problem: string | null;
|
|
2184
|
+
}
|
|
2185
|
+
/** Body of `PUT admin/agents/{id}/triggers/{triggerId}`. */
|
|
2186
|
+
interface DataTriggerRequest {
|
|
2187
|
+
source: 'event' | 'schedule';
|
|
2188
|
+
/** The skill the runs work in; empty lets the agent's rules or triage choose. */
|
|
2189
|
+
skill?: string | null;
|
|
2190
|
+
/** For an event trigger: a registered trigger event. */
|
|
2191
|
+
event?: string | null;
|
|
2192
|
+
/** For a schedule: a five- or six-field cron expression. */
|
|
2193
|
+
cron?: string | null;
|
|
2194
|
+
/** For a schedule: an IANA or Windows time zone; UTC by default. */
|
|
2195
|
+
timeZone?: string | null;
|
|
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
|
+
*/
|
|
2200
|
+
subjectSet?: string | null;
|
|
2201
|
+
/** For a schedule: what every run receives, at most 2,000 characters. */
|
|
2202
|
+
message?: string | null;
|
|
2203
|
+
conflict?: TriggerConflict | null;
|
|
2204
|
+
/** For an event trigger: at most 3,600; 120 by default. */
|
|
2205
|
+
debounceSeconds?: number | null;
|
|
2206
|
+
/** The trigger's current version; `null` for a new trigger. */
|
|
2207
|
+
expectedVersion?: number | null;
|
|
2208
|
+
reason?: string | null;
|
|
2209
|
+
}
|
|
2210
|
+
/** Body of `POST admin/agents/{id}/triggers/{triggerId}/shadow`. */
|
|
2211
|
+
interface DataTriggerShadowRequest {
|
|
2212
|
+
mode: 'shadow' | 'live';
|
|
2213
|
+
reason?: string | null;
|
|
2214
|
+
}
|
|
2215
|
+
/** Query of the removals of run settings, data skills and data triggers. */
|
|
2216
|
+
interface RunConfigurationRemoval {
|
|
2217
|
+
expectedVersion?: number | null;
|
|
2218
|
+
reason?: string | null;
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* Response of `GET admin/agents/{id}/configuration`: the agent's run settings, skills and triggers,
|
|
2222
|
+
* in code and as data, and the data that no longer fits the code.
|
|
2223
|
+
*/
|
|
2224
|
+
interface AgentRunConfiguration {
|
|
2225
|
+
agentId: string;
|
|
2226
|
+
/** The agent's own tool selectors; a data skill's tools stay within them. */
|
|
2227
|
+
toolSelectors: string[];
|
|
2228
|
+
codeSkills: CodeSkill[];
|
|
2229
|
+
dataSkills: DataSkill[];
|
|
2230
|
+
codeTriggers: CodeTrigger[];
|
|
2231
|
+
dataTriggers: DataTrigger[];
|
|
2232
|
+
problems: RunConfigurationProblem[];
|
|
2233
|
+
source: 'code' | 'admin';
|
|
2234
|
+
/** The run settings of an agent created in the administration; `null` for an agent in code and one that only chats. */
|
|
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;
|
|
2238
|
+
}
|
|
1216
2239
|
|
|
1217
2240
|
/** Decides whether the current user may see and use the assistant. */
|
|
1218
2241
|
interface NhAssistantAccessPolicy {
|
|
@@ -1300,7 +2323,35 @@ interface NhAssistantConfig {
|
|
|
1300
2323
|
* `#nh-assistant-join=<conversationId>.<token>`; the panel joins when the page opens with it.
|
|
1301
2324
|
*/
|
|
1302
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;
|
|
1303
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;
|
|
1304
2355
|
interface NhAssistantPushConfig {
|
|
1305
2356
|
/** URL of the bundled worker, for example `/nh-assistant/nh-assistant-push-worker.js`. */
|
|
1306
2357
|
serviceWorkerUrl: string;
|
|
@@ -1386,7 +2437,21 @@ declare class NhAssistantApiError extends Error {
|
|
|
1386
2437
|
readonly status: number;
|
|
1387
2438
|
readonly code: string;
|
|
1388
2439
|
readonly messageKey: string;
|
|
1389
|
-
|
|
2440
|
+
/**
|
|
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.
|
|
2445
|
+
*/
|
|
2446
|
+
readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
|
|
2447
|
+
constructor(status: number, code: string, messageKey: string,
|
|
2448
|
+
/**
|
|
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.
|
|
2453
|
+
*/
|
|
2454
|
+
fieldErrors?: Readonly<Record<string, readonly string[]>>);
|
|
1390
2455
|
}
|
|
1391
2456
|
/** Translation key that belongs to a failure code. */
|
|
1392
2457
|
declare function nhAssistantErrorMessageKey(code: string): string;
|
|
@@ -1438,6 +2503,19 @@ declare class NhAssistantApiService {
|
|
|
1438
2503
|
getPreferences(): Observable<AssistantPreferences>;
|
|
1439
2504
|
/** Replaces the caller's own assistant preferences and returns the stored values. */
|
|
1440
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>;
|
|
1441
2519
|
private requestStream;
|
|
1442
2520
|
private executeStream;
|
|
1443
2521
|
private readStream;
|
|
@@ -1454,6 +2532,7 @@ declare class NhAssistantApiService {
|
|
|
1454
2532
|
*/
|
|
1455
2533
|
declare class NhAssistantAdminApiService {
|
|
1456
2534
|
private readonly transport;
|
|
2535
|
+
private readonly api;
|
|
1457
2536
|
getContext(): Observable<ApplicationContext>;
|
|
1458
2537
|
/** Saves a new context version; fails with `assistant-version-conflict` when `expectedVersion` is stale. */
|
|
1459
2538
|
updateContext(request: UpdateApplicationContextRequest): Observable<ApplicationContext>;
|
|
@@ -1488,9 +2567,20 @@ declare class NhAssistantAdminApiService {
|
|
|
1488
2567
|
* account that does not exist or may not sign in.
|
|
1489
2568
|
*/
|
|
1490
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>;
|
|
1491
2576
|
/** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
|
|
1492
2577
|
deleteAgent(agentId: string): Observable<void>;
|
|
1493
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[]>;
|
|
1494
2584
|
createMcpServer(input: McpServerInput): Observable<McpServer>;
|
|
1495
2585
|
/** Omit `secret` to keep the stored secret; send `""` to clear it. */
|
|
1496
2586
|
updateMcpServer(serverId: string, input: McpServerInput): Observable<McpServer>;
|
|
@@ -1499,6 +2589,30 @@ declare class NhAssistantAdminApiService {
|
|
|
1499
2589
|
/** Reads the remote tool list. New tools start disabled; a changed input schema disables a tool. */
|
|
1500
2590
|
syncMcpServer(serverId: string): Observable<McpTool[]>;
|
|
1501
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>;
|
|
1502
2616
|
updateMcpTool(serverId: string, remoteName: string, request: UpdateMcpToolRequest): Observable<McpTool>;
|
|
1503
2617
|
/**
|
|
1504
2618
|
* The agent's proposals per tool and agent version in the period: decisions, the rejection rate,
|
|
@@ -1529,6 +2643,60 @@ declare class NhAssistantAdminApiService {
|
|
|
1529
2643
|
startAgentReplay(variantId: string, request: AgentReplayRequest): Observable<AgentReplay>;
|
|
1530
2644
|
/** The latest replays into a shadow variant, newest first. */
|
|
1531
2645
|
getAgentReplays(variantId: string): Observable<AgentReplayList>;
|
|
2646
|
+
/** The building blocks in code that run settings, skills and triggers defined as data can name. */
|
|
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[]>;
|
|
2660
|
+
/**
|
|
2661
|
+
* The agent's run settings, skills and triggers, in code and as data, and the data that no longer
|
|
2662
|
+
* fits the code. An agent in code without a run configuration answers `assistant-agent-not-found`.
|
|
2663
|
+
*/
|
|
2664
|
+
getAgentConfiguration(agentId: string): Observable<AgentRunConfiguration>;
|
|
2665
|
+
/**
|
|
2666
|
+
* Adds or changes the run settings of an agent created in the administration. An agent in code
|
|
2667
|
+
* fails with `assistant-run-settings-in-code`; an unknown technical account with
|
|
2668
|
+
* `assistant-service-account-not-found`.
|
|
2669
|
+
*/
|
|
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>;
|
|
2678
|
+
/** Removes the run settings; while data skills or triggers belong to the agent, `assistant-run-settings-in-use`. */
|
|
2679
|
+
removeRunSettings(agentId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
2680
|
+
/**
|
|
2681
|
+
* Adds a skill defined as data, which starts in shadow, or stores its next version: with `apply`
|
|
2682
|
+
* `live` at once, with `shadow` as the candidate that runs in shadow next to the live version.
|
|
2683
|
+
*/
|
|
2684
|
+
saveDataSkill(agentId: string, skillId: string, request: DataSkillRequest): Observable<DataSkill>;
|
|
2685
|
+
/** Takes a skill defined as data out of effect; while a data trigger names it, `assistant-skill-in-use`. */
|
|
2686
|
+
removeDataSkill(agentId: string, skillId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
2687
|
+
/** Every version of a skill defined as data, newest first. */
|
|
2688
|
+
getDataSkillVersions(agentId: string, skillId: string): Observable<DataSkillVersion[]>;
|
|
2689
|
+
/** Makes the candidate the live version of its skill. */
|
|
2690
|
+
promoteSkillCandidate(agentId: string, skillId: string, request: SkillCandidateRequest): Observable<DataSkill>;
|
|
2691
|
+
/** Discards the candidate; it stays as history. */
|
|
2692
|
+
discardSkillCandidate(agentId: string, skillId: string, request: SkillCandidateRequest): Observable<void>;
|
|
2693
|
+
/** Compares the candidate with the live version on the runs they made in the period. */
|
|
2694
|
+
compareSkillCandidate(agentId: string, skillId: string, filter?: SkillComparisonFilter): Observable<SkillComparison>;
|
|
2695
|
+
/** Adds a trigger defined as data, which starts in shadow, or changes one in the mode it has. */
|
|
2696
|
+
saveDataTrigger(agentId: string, triggerId: string, request: DataTriggerRequest): Observable<DataTrigger>;
|
|
2697
|
+
removeDataTrigger(agentId: string, triggerId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
2698
|
+
/** Puts a trigger defined as data in shadow or live. */
|
|
2699
|
+
setDataTriggerShadow(agentId: string, triggerId: string, request: DataTriggerShadowRequest): Observable<DataTrigger>;
|
|
1532
2700
|
private download;
|
|
1533
2701
|
private request;
|
|
1534
2702
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminApiService, never>;
|
|
@@ -1550,7 +2718,16 @@ declare class NhAssistantAgentRunApiService {
|
|
|
1550
2718
|
* role; readers may open an existing one. Errors with `assistant-subject-access-denied` otherwise.
|
|
1551
2719
|
*/
|
|
1552
2720
|
openThread(agentId: string, subjectType: string, subjectId: string): Observable<AgentThreadLookup>;
|
|
1553
|
-
/**
|
|
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
|
+
*/
|
|
1554
2731
|
startAgent(request: StartAgentRequest): Observable<AgentTriggerReceipt>;
|
|
1555
2732
|
/**
|
|
1556
2733
|
* All agent work on one subject: the caller's role, every agent with a thread on it plus
|
|
@@ -1558,12 +2735,27 @@ declare class NhAssistantAgentRunApiService {
|
|
|
1558
2735
|
* with `assistant-subject-not-found` when the caller has no role on the subject.
|
|
1559
2736
|
*/
|
|
1560
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>;
|
|
1561
2745
|
/**
|
|
1562
2746
|
* Counts the agent work on at most `NH_ASSISTANT_MAX_SUBJECT_SUMMARY` subjects of one type in one
|
|
1563
2747
|
* request, for badges in a list; one item per id in request order. `NhAssistantSubjectSummaryService`
|
|
1564
2748
|
* batches and caches these requests for many badges.
|
|
1565
2749
|
*/
|
|
1566
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>;
|
|
1567
2759
|
getRuns(conversationId: string): Observable<AgentRunList>;
|
|
1568
2760
|
/** Who consulted the thread's agent through another assistant, newest first. */
|
|
1569
2761
|
getConsultations(conversationId: string, page?: number, itemsPerPage?: number): Observable<AgentConsultationList>;
|
|
@@ -1581,11 +2773,49 @@ declare class NhAssistantAgentRunApiService {
|
|
|
1581
2773
|
lookupProposals(approvalIds: readonly string[]): Observable<AgentProposalLookup>;
|
|
1582
2774
|
getMemory(conversationId: string): Observable<AgentThreadMemory>;
|
|
1583
2775
|
getArtifacts(conversationId: string): Observable<AgentArtifact[]>;
|
|
1584
|
-
/**
|
|
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
|
+
*/
|
|
1585
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>;
|
|
1586
2813
|
/** Cancels a run at its next safe point and withdraws its open proposals; needs the participant role. */
|
|
1587
2814
|
cancelRun(runId: string): Observable<void>;
|
|
1588
|
-
/**
|
|
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
|
+
*/
|
|
1589
2819
|
retryRun(runId: string, mode: AgentRunRetryMode): Observable<AgentTriggerReceipt>;
|
|
1590
2820
|
/** Pending proposals the caller may decide, sorted by expiry. */
|
|
1591
2821
|
getInbox(filter?: AgentInboxFilter): Observable<AgentInbox>;
|
|
@@ -1665,7 +2895,8 @@ type NhAssistantLiveState = 'off' | 'connecting' | 'connected' | 'reconnecting'
|
|
|
1665
2895
|
* Live updates of the assistant hub: conversation changes, read positions, removals, the turn
|
|
1666
2896
|
* events of other sessions and changes to the work of agents that run on their own. Connects only
|
|
1667
2897
|
* while the store asks for it, reconnects on its own and emits `resync` after every (re)connect,
|
|
1668
|
-
* 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`).
|
|
1669
2900
|
*/
|
|
1670
2901
|
declare class NhAssistantLiveService {
|
|
1671
2902
|
private readonly config;
|
|
@@ -1683,6 +2914,9 @@ declare class NhAssistantLiveService {
|
|
|
1683
2914
|
private hubUrl;
|
|
1684
2915
|
private revision;
|
|
1685
2916
|
private restartTimer?;
|
|
2917
|
+
/** The screens that watch the work of agents for the whole application. */
|
|
2918
|
+
private agentWorkWatchers;
|
|
2919
|
+
private watchTimer?;
|
|
1686
2920
|
readonly changed$: Observable<LiveConversationChanged>;
|
|
1687
2921
|
readonly read$: Observable<LiveConversationRead>;
|
|
1688
2922
|
readonly removed$: Observable<LiveConversationRemoved>;
|
|
@@ -1702,8 +2936,24 @@ declare class NhAssistantLiveService {
|
|
|
1702
2936
|
* signed-in user changed.
|
|
1703
2937
|
*/
|
|
1704
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;
|
|
1705
2949
|
stop(): Promise<void>;
|
|
1706
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;
|
|
1707
2957
|
/** Starts over after the automatic reconnect gave up or the first start failed. */
|
|
1708
2958
|
private scheduleRestart;
|
|
1709
2959
|
private token;
|
|
@@ -1722,6 +2972,8 @@ declare class NhAssistantLiveService {
|
|
|
1722
2972
|
interface NhAssistantError {
|
|
1723
2973
|
code: string;
|
|
1724
2974
|
messageKey: string;
|
|
2975
|
+
/** The field errors of an `assistant-validation` failure, by camelCase field name. */
|
|
2976
|
+
fieldErrors?: Readonly<Record<string, readonly string[]>>;
|
|
1725
2977
|
}
|
|
1726
2978
|
/**
|
|
1727
2979
|
* A non-blocking remark about a turn that completed normally, for example a limit that cut the
|
|
@@ -1867,7 +3119,10 @@ declare class NhAssistantStore {
|
|
|
1867
3119
|
readonly pageContextExcluded: _angular_core.Signal<boolean>;
|
|
1868
3120
|
/** Whether the drawer was open when this account last left the application. */
|
|
1869
3121
|
readonly restorePanelOpen: _angular_core.Signal<boolean>;
|
|
1870
|
-
/**
|
|
3122
|
+
/**
|
|
3123
|
+
* True while the user can send: enabled, an agent is chosen and no turn runs or waits. A
|
|
3124
|
+
* conversation whose last turn failed accepts a new message; an archived one does not.
|
|
3125
|
+
*/
|
|
1871
3126
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
1872
3127
|
/** Messages not yet accepted by the server, for the open conversation. Never persisted. */
|
|
1873
3128
|
readonly queuedMessages: _angular_core.Signal<readonly NhAssistantQueuedMessage[]>;
|
|
@@ -1928,7 +3183,12 @@ declare class NhAssistantStore {
|
|
|
1928
3183
|
* their own turns. Resolves `false` when the message was not accepted.
|
|
1929
3184
|
*/
|
|
1930
3185
|
send(text: string): Promise<boolean>;
|
|
1931
|
-
/**
|
|
3186
|
+
/**
|
|
3187
|
+
* Sends immediately when the conversation accepts a message, otherwise appends to the
|
|
3188
|
+
* conversation's FIFO queue. A shown error alone does not hold a message back while nothing is
|
|
3189
|
+
* queued: the person asks again, for example after a failed turn. Queued messages still wait
|
|
3190
|
+
* for an explicit `resumeQueue` after Stop or a failure.
|
|
3191
|
+
*/
|
|
1932
3192
|
submit(text: string): Promise<boolean>;
|
|
1933
3193
|
/** Edits an unsent queued message without replacing the composer's current draft. */
|
|
1934
3194
|
updateQueuedMessage(id: string, text: string): boolean;
|
|
@@ -2208,6 +3468,129 @@ declare const NH_ASSISTANT_CONVERSATION_FRAGMENT = "nh-assistant-conversation";
|
|
|
2208
3468
|
/** Builds the default invitation link: the current page with the join fragment. */
|
|
2209
3469
|
declare function nhAssistantShareLink(conversationId: string, token: string): string;
|
|
2210
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
|
+
|
|
2211
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';
|
|
2212
3595
|
/**
|
|
2213
3596
|
* Optional icon classes of the host's icon library, for example `{ close: 'ph ph-x' }`.
|
|
@@ -2234,7 +3617,7 @@ declare class NhAssistantLauncherComponent {
|
|
|
2234
3617
|
readonly store: NhAssistantStore;
|
|
2235
3618
|
readonly panel: NhAssistantPanelService;
|
|
2236
3619
|
readonly waitingForApproval: _angular_core.Signal<boolean>;
|
|
2237
|
-
readonly badge: _angular_core.Signal<"running" | "
|
|
3620
|
+
readonly badge: _angular_core.Signal<"running" | "waiting" | "unread" | null>;
|
|
2238
3621
|
readonly unreadLabel: _angular_core.Signal<string>;
|
|
2239
3622
|
readonly label: _angular_core.Signal<"nh-assistant.launcher.close" | "nh-assistant.launcher.open">;
|
|
2240
3623
|
constructor();
|
|
@@ -2281,7 +3664,14 @@ declare class NhAssistantThreadComponent {
|
|
|
2281
3664
|
readonly approvalDecision: _angular_core.OutputEmitterRef<ApprovalDecision>;
|
|
2282
3665
|
/** The decision about an approval card together with its approval id. */
|
|
2283
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>;
|
|
2284
3672
|
private readonly names;
|
|
3673
|
+
/** Asks the question again that the assistant message with a connection card answered. */
|
|
3674
|
+
retryAfterConnect(message: Message): void;
|
|
2285
3675
|
readonly virtualThreshold = 200;
|
|
2286
3676
|
readonly virtual: _angular_core.Signal<boolean>;
|
|
2287
3677
|
/**
|
|
@@ -2312,7 +3702,7 @@ declare class NhAssistantThreadComponent {
|
|
|
2312
3702
|
private scrollElement;
|
|
2313
3703
|
private scrollToEnd;
|
|
2314
3704
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantThreadComponent, never>;
|
|
2315
|
-
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>;
|
|
2316
3706
|
}
|
|
2317
3707
|
|
|
2318
3708
|
/**
|
|
@@ -2334,15 +3724,21 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
|
|
|
2334
3724
|
readonly showConversations: _angular_core.WritableSignal<boolean>;
|
|
2335
3725
|
readonly showPreferences: _angular_core.WritableSignal<boolean>;
|
|
2336
3726
|
readonly showShare: _angular_core.WritableSignal<boolean>;
|
|
2337
|
-
readonly shareSection: _angular_core.WritableSignal<"members" | "
|
|
3727
|
+
readonly shareSection: _angular_core.WritableSignal<"members" | "all" | "link">;
|
|
2338
3728
|
readonly notificationError: _angular_core.WritableSignal<NhAssistantError | null>;
|
|
2339
3729
|
readonly notificationsLabel: _angular_core.Signal<"nh-assistant.panel.notifications-off" | "nh-assistant.panel.notifications-on">;
|
|
2340
3730
|
readonly adminRoute: string | any[] | null;
|
|
2341
3731
|
readonly conversation: _angular_core.Signal<Conversation | null>;
|
|
2342
3732
|
private readonly conversationId;
|
|
2343
3733
|
readonly messages: _angular_core.Signal<Message[]>;
|
|
3734
|
+
/** An archived conversation takes no new messages. A failed one does: the person asks again. */
|
|
2344
3735
|
readonly closed: _angular_core.Signal<boolean>;
|
|
2345
3736
|
readonly busy: _angular_core.Signal<boolean>;
|
|
3737
|
+
/**
|
|
3738
|
+
* The last turn failed and no error bar explains it, for example after the conversation was
|
|
3739
|
+
* reopened. The panel then says so, while the composer stays available.
|
|
3740
|
+
*/
|
|
3741
|
+
readonly lastTurnFailed: _angular_core.Signal<boolean>;
|
|
2346
3742
|
readonly composerDisabled: _angular_core.Signal<boolean>;
|
|
2347
3743
|
readonly editingQueuedId: _angular_core.WritableSignal<string | null>;
|
|
2348
3744
|
readonly queuedDraft: _angular_core.WritableSignal<string>;
|
|
@@ -2650,8 +4046,9 @@ declare class NhAssistantAgentPickerComponent {
|
|
|
2650
4046
|
/** Maximum length of the user's own instructions. */
|
|
2651
4047
|
declare const NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS = 1000;
|
|
2652
4048
|
/**
|
|
2653
|
-
* The user's own assistant preferences: desktop notifications,
|
|
2654
|
-
* answer length and optional instructions.
|
|
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
|
|
2655
4052
|
* preferences steer style only and are saved together, below the application context and
|
|
2656
4053
|
* agent instructions.
|
|
2657
4054
|
*/
|
|
@@ -2697,6 +4094,75 @@ declare class NhAssistantPreferencesComponent {
|
|
|
2697
4094
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantPreferencesComponent, "nh-assistant-preferences", never, {}, { "closed": "closed"; "saved": "saved"; }, never, never, true, never>;
|
|
2698
4095
|
}
|
|
2699
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
|
+
|
|
2700
4166
|
/**
|
|
2701
4167
|
* Sharing of the open conversation. The owner creates, copies, renews or stops an invitation
|
|
2702
4168
|
* link, invites colleagues through the application's directory when it offers one, and removes
|
|
@@ -2710,7 +4176,7 @@ declare class NhAssistantShareComponent {
|
|
|
2710
4176
|
/** Emitted when the user leaves the view. */
|
|
2711
4177
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
2712
4178
|
/** Show the invitation link, participants, or both (the default for custom hosts). */
|
|
2713
|
-
readonly section: _angular_core.InputSignal<"members" | "
|
|
4179
|
+
readonly section: _angular_core.InputSignal<"members" | "all" | "link">;
|
|
2714
4180
|
readonly id: string;
|
|
2715
4181
|
readonly conversation: _angular_core.Signal<Conversation | null>;
|
|
2716
4182
|
readonly isOwner: _angular_core.Signal<boolean>;
|
|
@@ -2796,6 +4262,13 @@ declare class NhAssistantTranslatePipe implements PipeTransform {
|
|
|
2796
4262
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantTranslatePipe, "nhAssistantTranslate", true>;
|
|
2797
4263
|
}
|
|
2798
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;
|
|
2799
4272
|
/**
|
|
2800
4273
|
* Calls `reload` once a burst of live agent-work updates that `matches` has settled, and after
|
|
2801
4274
|
* every (re)connect of the hub, because updates sent while it was disconnected are lost. Without a
|
|
@@ -2804,12 +4277,142 @@ declare class NhAssistantTranslatePipe implements PipeTransform {
|
|
|
2804
4277
|
*/
|
|
2805
4278
|
declare function nhAssistantReloadOnAgentWork(matches: (change: LiveAgentWorkChanged) => boolean, reload: () => void): void;
|
|
2806
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
|
+
|
|
2807
4403
|
/** Converts any failure into a user-facing code and translation key, never raw text. */
|
|
2808
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;
|
|
2809
4407
|
/** Translation keys for an error, from the most to the least specific. */
|
|
2810
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[];
|
|
2811
4414
|
/** Dash-case identifiers as the contract requires for agent and MCP server ids. */
|
|
2812
4415
|
declare const NH_ASSISTANT_DASH_CASE: RegExp;
|
|
2813
4416
|
|
|
2814
|
-
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 };
|
|
2815
|
-
export type { AdminAgent, AdminAgentInput, AgentArtifact, AgentConsultation, AgentConsultationList, AgentConsultationStatus, AgentDecisionOutcome, 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, AgentRunKind, AgentRunList, AgentRunRetryMode, 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, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, 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, SendMessageRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShareLink, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, 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 };
|