@newheap/platform-ai-chat 0.8.1 → 0.9.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 +185 -3
- package/admin/index.d.ts +79 -4
- package/agent-runs/index.d.ts +342 -0
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +231 -12
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs +905 -0
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs.map +1 -0
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +30 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +1746 -80
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +304 -8
- package/i18n/nl.json +304 -8
- package/index.d.ts +899 -67
- package/package.json +5 -1
- package/testing/index.d.ts +4 -2
package/README.md
CHANGED
|
@@ -75,6 +75,8 @@ export const appConfig: ApplicationConfig = {
|
|
|
75
75
|
| --- | --- | --- |
|
|
76
76
|
| `apiBaseUrl` | required | Base URL of the assistant endpoints. |
|
|
77
77
|
| `getAccessToken` | required | Returns the bearer token or `null`. Runs in the assistant's injection context before every request, so it may use `inject(...)`. |
|
|
78
|
+
| `getRequestHeaders` | none | Returns extra headers for every request and the live connection, for example `{ 'X-NH-ActiveDivisionId': divisionId }`. The library keeps `Authorization`, `Accept`, `Accept-Language` and `Content-Type`. Browsers do not send these headers with WebSockets; see `getHubQueryParameters`. |
|
|
79
|
+
| `getHubQueryParameters` | none | Returns query parameters for the live-update hub URL, for values the hub needs that WebSockets and server-sent events cannot carry as headers, for example `{ divisionId }`, which the NewHeap JWT handler copies to `X-NH-ActiveDivisionId` on `/hub` paths. Runs in the assistant's injection context when the connection starts; `access_token`, `id` and `negotiateVersion` are reserved. Never return a secret. |
|
|
78
80
|
| `accessPolicy` | always allowed | Injectable class whose `canUse()` returns a boolean or an observable. |
|
|
79
81
|
| `defaultAgentId` | first agent | Agent selected for new conversations. |
|
|
80
82
|
| `translations` | `'bundled'` | `'bundled'` merges the library's `en` and `nl` texts into `TranslateService`; `'host'` leaves all texts to the host. |
|
|
@@ -134,9 +136,26 @@ show a localized generic explanation. Tool ids, scope targets and bounded, redac
|
|
|
134
136
|
argument previews stay inside collapsed technical details and never become the
|
|
135
137
|
authorization basis.
|
|
136
138
|
|
|
139
|
+
In a chat only the person whose turn waits decides its approval. In an agent thread
|
|
140
|
+
(`conversation.kind === 'thread'`) the subject's approvers decide, and several proposals
|
|
141
|
+
can wait at once: the server reports in `conversation.thread.decisions` whether the
|
|
142
|
+
caller may decide each one. `NhAssistantStore.approvalRights` turns that into a right per
|
|
143
|
+
approval card, `decide(decision, reason, approvalId)` decides a run's proposal with its
|
|
144
|
+
proposal hash through `POST approvals/{id}/decisions` and reloads the thread, and cards
|
|
145
|
+
the caller may not decide say who does (`waitingFor`: an approver, or another approver
|
|
146
|
+
under four-eyes). Messages a trigger wrote (`authorKind: 'trigger'`) read as an event.
|
|
147
|
+
Custom layouts pass `[approvalRights]` to `nh-assistant-thread` and handle
|
|
148
|
+
`(approvalChoice)`, which carries the approval id.
|
|
149
|
+
|
|
150
|
+
A tool call whose agent proposal closed without running no longer waits: it ends as
|
|
151
|
+
`rejected`, as `not-executed` when the proposal expired, was withdrawn or became stale, or as
|
|
152
|
+
`failed` when its execution failed before it started, with the result code
|
|
153
|
+
`assistant-proposal-<status>`, for example `assistant-proposal-expired`. The tool-call card and
|
|
154
|
+
group show `not-executed` as a finished call that did not run, never as waiting.
|
|
155
|
+
|
|
137
156
|
`NhAssistantStore` exposes the state as signals (`enabled`, `agents`,
|
|
138
|
-
`conversations`, `activeConversation`, `streaming`, `pendingApproval`, `
|
|
139
|
-
more) and the actions `send`, `submit`, `pauseQueue`, `resumeQueue`,
|
|
157
|
+
`conversations`, `activeConversation`, `streaming`, `pendingApproval`, `approvalRights`,
|
|
158
|
+
`error` and more) and the actions `send`, `submit`, `pauseQueue`, `resumeQueue`,
|
|
140
159
|
`updateQueuedMessage`, `removeQueuedMessage`, `steerQueuedMessage`, `decide`, `cancel`, `openConversation`,
|
|
141
160
|
`startNewConversation` and `selectAgent`. The building blocks
|
|
142
161
|
`nh-assistant-thread`, `nh-assistant-composer`, `nh-assistant-conversation-list`,
|
|
@@ -234,9 +253,171 @@ bundle. Route to it lazily behind the host's admin permission and pass the route
|
|
|
234
253
|
`readOnlyHint` appear as hints only, and a changed remote input schema disables the
|
|
235
254
|
tool and shows a warning.
|
|
236
255
|
|
|
256
|
+
Each agent card also opens the agent's feedback report (see [Proposal feedback](#proposal-feedback)).
|
|
257
|
+
|
|
237
258
|
`NhAssistantAdminApiService` (main entry) is the typed client of the `admin/*`
|
|
238
259
|
endpoints. A `409` becomes the code `assistant-version-conflict`.
|
|
239
260
|
|
|
261
|
+
## Agent runs
|
|
262
|
+
|
|
263
|
+
`@newheap/platform-ai-chat/agent-runs` shows the work of agents that run on their own.
|
|
264
|
+
Load it on the routes that need it; it uses `NhAssistantAgentRunApiService` from the
|
|
265
|
+
`provideNhAssistant` scope.
|
|
266
|
+
|
|
267
|
+
```html
|
|
268
|
+
<nh-assistant-agent-inbox agentId="intake-reviewer" subjectType="project" />
|
|
269
|
+
<nh-assistant-agent-thread-view
|
|
270
|
+
agentId="intake-reviewer"
|
|
271
|
+
subjectType="project"
|
|
272
|
+
[subjectId]="projectId"
|
|
273
|
+
(openConversation)="panel.open($event)" />
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
The inbox lists the proposals waiting for the signed-in person. The thread view shows
|
|
277
|
+
one agent's thread on one subject: the caller's role, a start action for participants,
|
|
278
|
+
and tabs with proposals, runs, working memory and files. Proposals show the
|
|
279
|
+
application's presentation and keep the tool input under technical details; approve,
|
|
280
|
+
reject and resolve appear only for people who may decide, and each decision takes one
|
|
281
|
+
action. The proposals, run timeline, memory and files are also separate components for
|
|
282
|
+
custom layouts. Opened in the panel, the thread offers its proposals to the same people.
|
|
283
|
+
**Decided by** shows the name from the subject's member snapshot (`decidedByDisplayName`)
|
|
284
|
+
and falls back to the actor id.
|
|
285
|
+
|
|
286
|
+
With live updates the inbox, the thread view and its tabs reload by themselves when the hub
|
|
287
|
+
reports `AgentWorkChanged` for work they show, debounced, and after every reconnect. The
|
|
288
|
+
update names the thread, its subject (`subjectType`, `subjectId`) and whether a run, a
|
|
289
|
+
proposal or feedback changed, and carries no content;
|
|
290
|
+
`NhAssistantLiveService.agentWork$` exposes it as `LiveAgentWorkChanged`. These
|
|
291
|
+
reloads show no loading state, keep what is shown when they fail, wait for a decision of the
|
|
292
|
+
same list that is still in flight and never drop an open feedback question. The panel reloads
|
|
293
|
+
an open agent thread too, so its approval cards show decisions made in the inbox or by a
|
|
294
|
+
colleague. Without a connected hub nothing changes: the Refresh buttons stay.
|
|
295
|
+
|
|
296
|
+
## Agent work on your own pages
|
|
297
|
+
|
|
298
|
+
Show agent work where people already look, on the application's own subjects, instead of
|
|
299
|
+
only in the inbox. A list shows a badge per subject; a detail page or dialog shows the
|
|
300
|
+
subject's suggestions and opens the conversation with an agent about it.
|
|
301
|
+
|
|
302
|
+
```html
|
|
303
|
+
<!-- A list (main entry, small): every badge on the page shares one request. -->
|
|
304
|
+
@for (project of projects(); track project.id) {
|
|
305
|
+
<h3>{{ project.name }}</h3>
|
|
306
|
+
<nh-assistant-subject-badge subjectType="project" [subjectId]="project.id" />
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
<!-- A detail page or dialog: load the agent-runs entry point lazily. -->
|
|
310
|
+
@defer (on viewport) {
|
|
311
|
+
<nh-assistant-subject-suggestions
|
|
312
|
+
agentId="intake-reviewer"
|
|
313
|
+
subjectType="project"
|
|
314
|
+
[subjectId]="project.id"
|
|
315
|
+
(conversationOpened)="closeDialog()" />
|
|
316
|
+
} @placeholder {
|
|
317
|
+
<div class="suggestions-placeholder"></div>
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
`nh-assistant-subject-badge` shows nothing while the subject has no agent work, the assistant
|
|
322
|
+
is disabled or the access policy denies the user. Otherwise it shows the number of proposals
|
|
323
|
+
the viewer may decide in the accent color or, when they may decide none, a neutral count of
|
|
324
|
+
the open proposals, plus a small indicator while an agent works on the subject. Its tooltip
|
|
325
|
+
and accessible name say both counts, for example "Proposals to decide: 2 of 3 open."
|
|
326
|
+
`NhAssistantSubjectSummaryService` (main entry, provided by `provideNhAssistant`) does the
|
|
327
|
+
work: every `summary(subjectType, subjectId)` asked for in the same tick becomes one
|
|
328
|
+
`POST subjects/{type}/summary` per subject type, in chunks of
|
|
329
|
+
`NH_ASSISTANT_MAX_SUBJECT_SUMMARY` (200). Results are cached per subject and shared by everyone
|
|
330
|
+
who shows it. A live `AgentWorkChanged` refetches only the subjects it names that are shown,
|
|
331
|
+
batched after a short pause, and a reconnect refetches every shown subject. Call
|
|
332
|
+
`refresh(subjectType, subjectIds?)` after the application changed subjects itself.
|
|
333
|
+
|
|
334
|
+
`nh-assistant-subject-suggestions` (`@newheap/platform-ai-chat/agent-runs`) loads
|
|
335
|
+
`GET subjects/{type}/{id}/work` and shows the open proposals of every agent on the subject in
|
|
336
|
+
`nh-assistant-agent-proposals`, each with the viewer's own live decision right. A proposal the
|
|
337
|
+
viewer may not decide says who does: an approver, or another approver when four-eyes keeps out
|
|
338
|
+
the person who started the work. Rejecting asks the optional feedback question, also after the
|
|
339
|
+
proposal left the list. Each agent with a thread on the subject, and `agentId` also before it
|
|
340
|
+
worked on the subject, gets **Open conversation** and, for participants who may start it,
|
|
341
|
+
**Start the agent**. Readers open only an existing conversation. The component has loading,
|
|
342
|
+
empty, unavailable (no role on the subject), error and disabled states, and reloads by itself,
|
|
343
|
+
debounced, when live agent work names its subject and after every reconnect.
|
|
344
|
+
|
|
345
|
+
Custom layouts pass per-proposal rights to the proposals list themselves. A right overrides
|
|
346
|
+
`canDecide` for its proposal:
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
const work = await firstValueFrom(agentRuns.getSubjectWork('project', projectId, 'intake-reviewer'));
|
|
350
|
+
const rights = new Map(work.openProposals.map(item => [item.proposal.approvalId, item]));
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
```html
|
|
354
|
+
<nh-assistant-agent-proposals [proposals]="proposals" [decisionRights]="rights" (changed)="reload()" />
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Open the conversation about a subject from your own code with
|
|
358
|
+
`NhAssistantPanelService.openSubject(agentId, { type, id })`. It calls `POST threads/open`,
|
|
359
|
+
which returns the agent's thread about the subject and creates it without starting a run, so
|
|
360
|
+
nothing costs model time until someone types. Creating needs the participant role. The promise
|
|
361
|
+
resolves with the `AgentThreadLookup` once the panel opens the conversation, and rejects with
|
|
362
|
+
`NhAssistantApiError` (for example `assistant-subject-access-denied`) without opening the panel,
|
|
363
|
+
so show its `messageKey` where the person asked:
|
|
364
|
+
|
|
365
|
+
```typescript
|
|
366
|
+
try {
|
|
367
|
+
await this.panel.openSubject('intake-reviewer', { type: 'project', id: projectId });
|
|
368
|
+
} catch (error) {
|
|
369
|
+
this.error.set(error instanceof NhAssistantApiError ? error.messageKey : 'nh-assistant.errors.generic');
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
The panel is a CDK overlay drawer. A host dialog on a higher layer closes when the conversation
|
|
374
|
+
opens, as the suggestions' `conversationOpened` output allows, or raises the overlay container.
|
|
375
|
+
`NhAssistantAgentRunApiService` offers the endpoints as `getSubjectWork`, `summarizeSubjects` and
|
|
376
|
+
`openThread`. The SampleProjectManagement management portal shows badges in its project
|
|
377
|
+
directory and the suggestions in its project dialog (sample case SPM-280).
|
|
378
|
+
|
|
379
|
+
## Proposal feedback
|
|
380
|
+
|
|
381
|
+
People who reject an agent proposal may say what was wrong. The question is optional,
|
|
382
|
+
comes after the rejection and never blocks it:
|
|
383
|
+
|
|
384
|
+
- After a reject, single or bulk, `nh-assistant-agent-proposals` shows
|
|
385
|
+
`nh-assistant-proposal-feedback` above the list, also when the inbox drops the rejected
|
|
386
|
+
proposals. Skip removes it; a saved answer thanks the person and emits `changed`.
|
|
387
|
+
- Closed proposals with `canGiveFeedback` keep a low-key **Give feedback** action
|
|
388
|
+
(**Change feedback** once `feedback` holds the caller's own answer), and the card shows
|
|
389
|
+
that answer.
|
|
390
|
+
- In the panel, the approval card of a proposal the user rejected in this session offers
|
|
391
|
+
**What was wrong?** (`NhAssistantApprovalRight.canGiveFeedback`). Chat approvals never ask.
|
|
392
|
+
|
|
393
|
+
The answer is a category from `NH_ASSISTANT_FEEDBACK_CATEGORIES` (`incorrect`,
|
|
394
|
+
`wrong-value`, `not-needed`, `not-now`, `already-done`, `not-allowed`, `other`) plus an
|
|
395
|
+
optional text of at most 1,000 characters. `not-now` and `already-done` mean "right, but
|
|
396
|
+
not now" and never count as the agent being wrong. One proposal is sent with
|
|
397
|
+
`NhAssistantAgentRunApiService.giveFeedback` (`PUT approvals/{id}/feedback`), proposals
|
|
398
|
+
rejected together once with `giveFeedbackMany` (`POST approvals/feedback`), stored per
|
|
399
|
+
proposal as bulk feedback. Custom layouts use the component directly:
|
|
400
|
+
|
|
401
|
+
```html
|
|
402
|
+
<nh-assistant-proposal-feedback [approvalIds]="[approvalId]" [initial]="proposal.feedback" (saved)="reload()" (dismissed)="close()" />
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Administrators read the answers per agent in `nh-assistant-agent-feedback-report` from
|
|
406
|
+
`@newheap/platform-ai-chat/admin`, also on its own:
|
|
407
|
+
|
|
408
|
+
```html
|
|
409
|
+
<nh-assistant-agent-feedback-report agentId="intake-reviewer" />
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
It shows, per tool and agent version, the approved, rejected and expired proposals, the
|
|
413
|
+
rejection rate, the rejections with feedback, the number of different people and the most
|
|
414
|
+
frequent categories, followed by the feedback itself with its author's name
|
|
415
|
+
(`authorDisplayName`, falling back to the actor id), filtered by period, tool and category,
|
|
416
|
+
and an export as JSON Lines. Comparing agent versions shows whether a change to the prompt,
|
|
417
|
+
tools or policy helped. `NhAssistantAdminApiService.getAgentFeedbackSummary`,
|
|
418
|
+
`getAgentFeedback` and `exportAgentFeedback` are the typed client; the server requires the
|
|
419
|
+
admin policy, reports only the caller's scopes and audits the export, which holds subject data.
|
|
420
|
+
|
|
240
421
|
## Theme
|
|
241
422
|
|
|
242
423
|
The components define light and dark defaults and follow `prefers-color-scheme`.
|
|
@@ -325,7 +506,8 @@ providers: [
|
|
|
325
506
|
Steps are `text`, `tool`, `approval`, `error` and `fail`. The optional `preferences`
|
|
326
507
|
and `admin` parts of the scenario seed the preference and administration endpoints:
|
|
327
508
|
context, tool catalog, agents, MCP servers with simulated remote tools, known
|
|
328
|
-
policies and hosts that may receive the user's token.
|
|
509
|
+
policies and hosts that may receive the user's token. Agents of the mock never run
|
|
510
|
+
on their own, so their feedback report is empty. The mock answers every
|
|
329
511
|
endpoint in memory and sends each turn as contract events over a chunked
|
|
330
512
|
`text/event-stream` response, so the real client, parser and store run unchanged.
|
|
331
513
|
Inject `NhAssistantMockBackend` to switch the simulated feature flag with
|
package/admin/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { NhAssistantStore, NhAssistantError, ApplicationContext, ApplicationContextVersion, AdminAgent, ToolCatalogEntry, McpServer, AssistantAutonomy, McpServerTestResult, McpAuthMode, McpToolEffect, McpTool } from '@newheap/platform-ai-chat';
|
|
2
|
+
import { NhAssistantStore, NhAssistantError, ApplicationContext, ApplicationContextVersion, AdminAgent, ToolCatalogEntry, McpServer, AssistantAutonomy, AgentProposalFeedbackCategory, AgentFeedbackSummaryRow, AgentFeedbackItem, AgentFeedbackCategoryCount, AgentProposalFeedbackGroup, McpServerTestResult, McpAuthMode, McpToolEffect, McpTool } from '@newheap/platform-ai-chat';
|
|
3
3
|
|
|
4
4
|
type NhAssistantAdminTab = 'context' | 'agents' | 'mcp-servers';
|
|
5
5
|
/**
|
|
@@ -61,11 +61,15 @@ declare class NhAssistantAdminContextComponent {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Agent administration: code agents (override, disable, reset) and agents created here
|
|
64
|
-
* (edit, disable, delete). Editing opens `nh-assistant-admin-agent-editor
|
|
64
|
+
* (edit, disable, delete). Editing opens `nh-assistant-admin-agent-editor`; the feedback action
|
|
65
|
+
* opens `nh-assistant-agent-feedback-report` for the agent.
|
|
65
66
|
*/
|
|
66
67
|
declare class NhAssistantAdminAgentsComponent {
|
|
67
68
|
private readonly admin;
|
|
68
69
|
private readonly store;
|
|
70
|
+
private readonly injector;
|
|
71
|
+
private readonly host;
|
|
72
|
+
private readonly backButton;
|
|
69
73
|
private subscription?;
|
|
70
74
|
private actionSubscription?;
|
|
71
75
|
readonly id: string;
|
|
@@ -76,6 +80,8 @@ declare class NhAssistantAdminAgentsComponent {
|
|
|
76
80
|
readonly servers: _angular_core.WritableSignal<McpServer[]>;
|
|
77
81
|
/** `undefined`: list; `null`: new agent; an agent: editing that agent. */
|
|
78
82
|
readonly editing: _angular_core.WritableSignal<AdminAgent | null | undefined>;
|
|
83
|
+
/** The agent whose feedback report is shown instead of the list. */
|
|
84
|
+
readonly reporting: _angular_core.WritableSignal<AdminAgent | null>;
|
|
79
85
|
readonly confirming: _angular_core.WritableSignal<{
|
|
80
86
|
agentId: string;
|
|
81
87
|
action: "delete" | "reset";
|
|
@@ -87,6 +93,10 @@ declare class NhAssistantAdminAgentsComponent {
|
|
|
87
93
|
load(): void;
|
|
88
94
|
create(): void;
|
|
89
95
|
edit(agent: AdminAgent): void;
|
|
96
|
+
/** Shows what people said when they rejected the agent's proposals. */
|
|
97
|
+
openReport(agent: AdminAgent): void;
|
|
98
|
+
/** Returns to the list and to the feedback action of the agent whose report was open. */
|
|
99
|
+
closeReport(): void;
|
|
90
100
|
onSaved(agent: AdminAgent): void;
|
|
91
101
|
setEnabled(agent: AdminAgent, isEnabled: boolean): void;
|
|
92
102
|
confirm(agentId: string, action: 'delete' | 'reset'): void;
|
|
@@ -158,6 +168,71 @@ declare class NhAssistantAdminAgentEditorComponent {
|
|
|
158
168
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAdminAgentEditorComponent, "nh-assistant-admin-agent-editor", never, { "agent": { "alias": "agent"; "required": false; "isSignal": true; }; "tools": { "alias": "tools"; "required": false; "isSignal": true; }; "servers": { "alias": "servers"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
159
169
|
}
|
|
160
170
|
|
|
171
|
+
/** Periods the report offers, in days before now. */
|
|
172
|
+
type NhAssistantFeedbackPeriod = 7 | 30 | 90;
|
|
173
|
+
/** A summary row with its most frequent feedback categories. */
|
|
174
|
+
interface NhAssistantFeedbackSummaryView extends AgentFeedbackSummaryRow {
|
|
175
|
+
topCategories: AgentFeedbackCategoryCount[];
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* What people said when they rejected an agent's proposals, for the agent's administrators: per
|
|
179
|
+
* tool and agent version the decisions, the rejection rate, the share of rejections with feedback,
|
|
180
|
+
* the number of different people and the most frequent categories, followed by the feedback itself
|
|
181
|
+
* and a JSON Lines export. Comparing agent versions shows whether a change to the prompt, tools or
|
|
182
|
+
* policy helped. The server requires the assistant admin policy and reports only the caller's scopes.
|
|
183
|
+
*/
|
|
184
|
+
declare class NhAssistantAgentFeedbackReportComponent {
|
|
185
|
+
private readonly admin;
|
|
186
|
+
private readonly document;
|
|
187
|
+
private summarySubscription?;
|
|
188
|
+
private listSubscription?;
|
|
189
|
+
readonly agentId: _angular_core.InputSignal<string>;
|
|
190
|
+
/** Feedback per page; the server allows at most 100. */
|
|
191
|
+
readonly itemsPerPage: _angular_core.InputSignal<number>;
|
|
192
|
+
readonly id: string;
|
|
193
|
+
readonly periods: readonly NhAssistantFeedbackPeriod[];
|
|
194
|
+
readonly categories: readonly AgentProposalFeedbackCategory[];
|
|
195
|
+
readonly period: _angular_core.WritableSignal<NhAssistantFeedbackPeriod>;
|
|
196
|
+
readonly toolId: _angular_core.WritableSignal<string>;
|
|
197
|
+
readonly category: _angular_core.WritableSignal<"" | AgentProposalFeedbackCategory>;
|
|
198
|
+
readonly page: _angular_core.WritableSignal<number>;
|
|
199
|
+
readonly summaryLoading: _angular_core.WritableSignal<boolean>;
|
|
200
|
+
readonly summaryError: _angular_core.WritableSignal<NhAssistantError | null>;
|
|
201
|
+
readonly summaryErrorKeys: _angular_core.Signal<string[]>;
|
|
202
|
+
readonly rows: _angular_core.WritableSignal<AgentFeedbackSummaryRow[]>;
|
|
203
|
+
readonly listLoading: _angular_core.WritableSignal<boolean>;
|
|
204
|
+
readonly listError: _angular_core.WritableSignal<NhAssistantError | null>;
|
|
205
|
+
readonly listErrorKeys: _angular_core.Signal<string[]>;
|
|
206
|
+
readonly items: _angular_core.WritableSignal<AgentFeedbackItem[]>;
|
|
207
|
+
readonly total: _angular_core.WritableSignal<number>;
|
|
208
|
+
readonly pages: _angular_core.Signal<number>;
|
|
209
|
+
readonly exporting: _angular_core.WritableSignal<boolean>;
|
|
210
|
+
readonly exportError: _angular_core.WritableSignal<NhAssistantError | null>;
|
|
211
|
+
readonly exportErrorKeys: _angular_core.Signal<string[]>;
|
|
212
|
+
readonly canExport: _angular_core.Signal<boolean>;
|
|
213
|
+
/** Tools with proposals in the period, plus the chosen tool when the period has none of it. */
|
|
214
|
+
readonly tools: _angular_core.Signal<string[]>;
|
|
215
|
+
readonly visibleRows: _angular_core.Signal<NhAssistantFeedbackSummaryView[]>;
|
|
216
|
+
readonly filtered: _angular_core.Signal<boolean>;
|
|
217
|
+
/** The period the last load asked for, so the list, summary and export agree. */
|
|
218
|
+
private range;
|
|
219
|
+
constructor();
|
|
220
|
+
/** Reloads the summary and the first page of feedback for the chosen period. */
|
|
221
|
+
load(): void;
|
|
222
|
+
onPeriod(event: Event): void;
|
|
223
|
+
onTool(event: Event): void;
|
|
224
|
+
onCategory(event: Event): void;
|
|
225
|
+
goTo(page: number): void;
|
|
226
|
+
loadSummary(): void;
|
|
227
|
+
loadList(): void;
|
|
228
|
+
/** Downloads the feedback of the period and filters as a JSON Lines file. */
|
|
229
|
+
export(): Promise<void>;
|
|
230
|
+
/** Badge color of a feedback group: wrong and not allowed are failures, not now is a warning. */
|
|
231
|
+
groupClass(group: AgentProposalFeedbackGroup): string;
|
|
232
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAgentFeedbackReportComponent, never>;
|
|
233
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAgentFeedbackReportComponent, "nh-assistant-agent-feedback-report", never, { "agentId": { "alias": "agentId"; "required": true; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
234
|
+
}
|
|
235
|
+
|
|
161
236
|
/** Result of the latest connection test per server. */
|
|
162
237
|
interface TestState {
|
|
163
238
|
running: boolean;
|
|
@@ -290,5 +365,5 @@ declare class NhAssistantAdminMcpToolsComponent {
|
|
|
290
365
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantAdminMcpToolsComponent, "nh-assistant-admin-mcp-tools", never, { "server": { "alias": "server"; "required": true; "isSignal": true; }; }, { "closed": "closed"; "synced": "synced"; }, never, never, true, never>;
|
|
291
366
|
}
|
|
292
367
|
|
|
293
|
-
export { NH_ASSISTANT_MAX_INSTRUCTIONS, NhAssistantAdminAgentEditorComponent, NhAssistantAdminAgentsComponent, NhAssistantAdminComponent, NhAssistantAdminContextComponent, NhAssistantAdminMcpServerEditorComponent, NhAssistantAdminMcpServersComponent, NhAssistantAdminMcpToolsComponent, nhAssistantSelectorMatches };
|
|
294
|
-
export type { NhAssistantAdminTab, NhAssistantSecretAction };
|
|
368
|
+
export { NH_ASSISTANT_MAX_INSTRUCTIONS, NhAssistantAdminAgentEditorComponent, NhAssistantAdminAgentsComponent, NhAssistantAdminComponent, NhAssistantAdminContextComponent, NhAssistantAdminMcpServerEditorComponent, NhAssistantAdminMcpServersComponent, NhAssistantAdminMcpToolsComponent, NhAssistantAgentFeedbackReportComponent, nhAssistantSelectorMatches };
|
|
369
|
+
export type { NhAssistantAdminTab, NhAssistantFeedbackPeriod, NhAssistantSecretAction };
|