@newheap/platform-ai-chat 0.17.0 → 0.18.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 +11 -1
- package/admin/index.d.ts +92 -6
- package/agent-runs/index.d.ts +43 -7
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +837 -155
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs +120 -35
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +870 -48
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +1018 -184
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +236 -12
- package/i18n/nl.json +236 -12
- package/index.d.ts +439 -31
- package/package.json +1 -1
- package/testing/index.d.ts +130 -3
package/index.d.ts
CHANGED
|
@@ -103,8 +103,9 @@ interface AgentThreadLookup {
|
|
|
103
103
|
interface AgentProposalDecisionRight {
|
|
104
104
|
canDecide: boolean;
|
|
105
105
|
/**
|
|
106
|
-
* Why the caller may not decide, for example `assistant-four-eyes-required
|
|
107
|
-
* `assistant-approval-policy-denied
|
|
106
|
+
* Why the caller may not decide, for example `assistant-four-eyes-required`,
|
|
107
|
+
* `assistant-approval-policy-denied` or `assistant-consult-asker-decides` for a consultation's
|
|
108
|
+
* proposal that the person who asked decides in their own chat; `null` when they may.
|
|
108
109
|
*/
|
|
109
110
|
reasonCode: string | null;
|
|
110
111
|
}
|
|
@@ -441,9 +442,17 @@ interface AgentProposal {
|
|
|
441
442
|
executedAt: string | null;
|
|
442
443
|
/**
|
|
443
444
|
* The consultation that proposed it, when another assistant consulted the agent for
|
|
444
|
-
* `initiatorActorId`;
|
|
445
|
+
* `initiatorActorId`; `consultationRoute` says who decides it and whose rights execute it.
|
|
445
446
|
*/
|
|
446
447
|
consultationId?: string | null;
|
|
448
|
+
/**
|
|
449
|
+
* How a consultation's proposal is decided and whose rights execute it: `asker-decides`, the person
|
|
450
|
+
* who asked (`initiatorActorId`) decides it in their own chat, nobody decides it here;
|
|
451
|
+
* `subject-asker-rights`, the subject's approvers decide it and it runs with the asker's rights;
|
|
452
|
+
* `subject-agent-rights`, the subject's approvers other than the asker decide it and it runs with the
|
|
453
|
+
* agent's own rights (`grantSource`). `null` for a run's proposal; missing on older servers.
|
|
454
|
+
*/
|
|
455
|
+
consultationRoute?: NhAssistantConsultationRoute | null;
|
|
447
456
|
/** The caller's own feedback on the proposal; `null` when they gave none. Missing on older servers. */
|
|
448
457
|
feedback?: AgentProposalFeedback | null;
|
|
449
458
|
/**
|
|
@@ -588,6 +597,11 @@ interface AgentConsultation {
|
|
|
588
597
|
proposalCount: number;
|
|
589
598
|
createdAt: string;
|
|
590
599
|
endedAt: string | null;
|
|
600
|
+
/**
|
|
601
|
+
* The proposals the consultation left per route, such as `{ 'asker-decides': 1 }`; routes without
|
|
602
|
+
* proposals are left out. Missing on older servers.
|
|
603
|
+
*/
|
|
604
|
+
proposalsByRoute?: Partial<Record<NhAssistantConsultationRoute, number>>;
|
|
591
605
|
}
|
|
592
606
|
interface AgentConsultationList {
|
|
593
607
|
items: AgentConsultation[];
|
|
@@ -824,6 +838,20 @@ interface AgentUploads {
|
|
|
824
838
|
maxFileBytes: number;
|
|
825
839
|
/** The most files of one message. */
|
|
826
840
|
maxFiles: number;
|
|
841
|
+
/**
|
|
842
|
+
* The file name extensions the application mapped to one of `acceptedMediaTypes`
|
|
843
|
+
* (`NhAssistantUploadOptions.MapExtension` on the server). A file without a usable type takes the
|
|
844
|
+
* type of its extension from them before the platform's table, as on the server, and the file picker
|
|
845
|
+
* offers them. Empty, or missing from an older server, when the application maps none.
|
|
846
|
+
*/
|
|
847
|
+
mappedExtensions?: AgentUploadExtension[] | null;
|
|
848
|
+
}
|
|
849
|
+
/** A file name extension the application mapped to an accepted media type for uploads. */
|
|
850
|
+
interface AgentUploadExtension {
|
|
851
|
+
/** The extension in lowercase with its dot, for example `.dwg`. */
|
|
852
|
+
extension: string;
|
|
853
|
+
/** The accepted media type it names, for example `application/acad`. */
|
|
854
|
+
mediaType: string;
|
|
827
855
|
}
|
|
828
856
|
/**
|
|
829
857
|
* A file the application keeps, as the upload endpoint returns it and a message names it in
|
|
@@ -918,7 +946,8 @@ interface ConversationMember {
|
|
|
918
946
|
}
|
|
919
947
|
interface Message {
|
|
920
948
|
id: string;
|
|
921
|
-
|
|
949
|
+
/** `application` for a message the application posted into the conversation. */
|
|
950
|
+
role: 'user' | 'assistant' | 'tool' | 'application';
|
|
922
951
|
createdAt: string;
|
|
923
952
|
parts: MessagePart[];
|
|
924
953
|
/** Position in the conversation; missing on optimistic messages and old servers. */
|
|
@@ -927,15 +956,40 @@ interface Message {
|
|
|
927
956
|
authorActorId?: string | null;
|
|
928
957
|
/**
|
|
929
958
|
* Who wrote the message: a person or a trigger of an agent for user messages, `rule` for the
|
|
930
|
-
* summary an agent's rules wrote instead of the model
|
|
959
|
+
* summary an agent's rules wrote instead of the model, `application` for a message the
|
|
960
|
+
* application posted; missing on old servers.
|
|
931
961
|
*/
|
|
932
962
|
authorKind?: MessageAuthorKind | null;
|
|
963
|
+
/** The title, sender, link and trusted flag of a message the application posted; missing for other messages. */
|
|
964
|
+
application?: ApplicationMessageDetails | null;
|
|
933
965
|
}
|
|
934
966
|
/**
|
|
935
967
|
* `person` for a message a person wrote; `trigger` for one a trigger wrote into an agent thread;
|
|
936
|
-
* `rule` for an assistant message the agent's rules wrote without a model
|
|
968
|
+
* `rule` for an assistant message the agent's rules wrote without a model; `application` for a
|
|
969
|
+
* message the application posted into the conversation.
|
|
970
|
+
*/
|
|
971
|
+
type MessageAuthorKind = 'person' | 'trigger' | 'rule' | 'application';
|
|
972
|
+
/**
|
|
973
|
+
* What the application said about a message it posted, besides its text: an optional heading, who in
|
|
974
|
+
* the application posted it, where people continue and whether the assistant follows it. The text is
|
|
975
|
+
* the message's `text` part.
|
|
937
976
|
*/
|
|
938
|
-
|
|
977
|
+
interface ApplicationMessageDetails {
|
|
978
|
+
title: string | null;
|
|
979
|
+
senderName: string | null;
|
|
980
|
+
link: ApplicationMessageLink | null;
|
|
981
|
+
/**
|
|
982
|
+
* The assistant follows the message as the application's instruction (`Trusted` on the server);
|
|
983
|
+
* `false` for a message the assistant reads as information. The thread labels a trusted message.
|
|
984
|
+
*/
|
|
985
|
+
trusted: boolean;
|
|
986
|
+
}
|
|
987
|
+
/** A path within the application, which the chat opens through the router, or an `https` address. */
|
|
988
|
+
interface ApplicationMessageLink {
|
|
989
|
+
url: string;
|
|
990
|
+
/** The text of the link; the chat shows its own text without one. */
|
|
991
|
+
label: string | null;
|
|
992
|
+
}
|
|
939
993
|
type MessagePart = TextPart | ToolCallPart | ApprovalPart | ConnectionRequiredPart | FilePart;
|
|
940
994
|
/**
|
|
941
995
|
* A file a person attached to a message: its name, media type and size in bytes, never its content.
|
|
@@ -1034,6 +1088,41 @@ interface ApprovalPart {
|
|
|
1034
1088
|
rationale?: string;
|
|
1035
1089
|
/** The newer proposal for the same objects that replaced this withdrawn one. Only sent then. */
|
|
1036
1090
|
supersededByApprovalId?: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* The consultation that proposed it, when the conversation's assistant consulted another agent and
|
|
1093
|
+
* the person who asked decides that agent's proposal here (`asker-decides`). Approving executes it
|
|
1094
|
+
* in the person's own request with their own rights. Missing for the conversation's own proposals.
|
|
1095
|
+
*/
|
|
1096
|
+
consultation?: ApprovalConsultation | null;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* How a consulted agent's proposal is decided and whose rights execute it: `asker-decides`, the person
|
|
1100
|
+
* who asked decides it in their own chat and it runs with their own rights; `subject-agent-rights`, the
|
|
1101
|
+
* subject's approvers other than the asker decide it and it runs with the agent's own rights;
|
|
1102
|
+
* `subject-asker-rights`, the subject's approvers decide it and it runs with the asker's rights.
|
|
1103
|
+
*/
|
|
1104
|
+
type NhAssistantConsultationRoute = 'asker-decides' | 'subject-agent-rights' | 'subject-asker-rights';
|
|
1105
|
+
/** The routes at the subject a person may leave a consulted agent's proposal for (`decision: 'leave'`). */
|
|
1106
|
+
type NhAssistantConsultationLeaveRoute = Exclude<NhAssistantConsultationRoute, 'asker-decides'>;
|
|
1107
|
+
/** Where a proposal the person who asked decides in their own conversation comes from. */
|
|
1108
|
+
interface ApprovalConsultation {
|
|
1109
|
+
/** The consultation record in the consulted agent's thread. */
|
|
1110
|
+
consultationId: string;
|
|
1111
|
+
/** The consulted agent that proposed it. */
|
|
1112
|
+
agentId: string;
|
|
1113
|
+
subjectType: string;
|
|
1114
|
+
subjectId: string;
|
|
1115
|
+
/** The subject's name as the consulted agent's thread knows it; `null` when unknown. */
|
|
1116
|
+
subjectDisplayName: string | null;
|
|
1117
|
+
/**
|
|
1118
|
+
* The route at the subject the person may leave the pending proposal for with the decision `leave`;
|
|
1119
|
+
* `null` when they can only approve or reject it.
|
|
1120
|
+
*/
|
|
1121
|
+
leaveRoute: NhAssistantConsultationLeaveRoute | null;
|
|
1122
|
+
/** The consulted agent's answer, bounded, when the consultation's classification allows a preview. */
|
|
1123
|
+
answer: string | null;
|
|
1124
|
+
/** The proposal that waits at the subject since the person left this one for its approvers. */
|
|
1125
|
+
movedToApprovalId: string | null;
|
|
1037
1126
|
}
|
|
1038
1127
|
/** Response of `GET conversations?page=&itemsPerPage=`. */
|
|
1039
1128
|
interface ConversationPage {
|
|
@@ -1077,7 +1166,11 @@ interface SendMessageRequest {
|
|
|
1077
1166
|
/** Files the person attaches, as `POST conversations/{id}/files` returned them. */
|
|
1078
1167
|
files?: FileReference[];
|
|
1079
1168
|
}
|
|
1080
|
-
|
|
1169
|
+
/**
|
|
1170
|
+
* `approve` or `reject`; for a consulted agent's proposal with a `consultation.leaveRoute` also
|
|
1171
|
+
* `leave`, which leaves it for the subject's approvers instead of deciding it.
|
|
1172
|
+
*/
|
|
1173
|
+
type ApprovalDecision = 'approve' | 'reject' | 'leave';
|
|
1081
1174
|
/** Body of `POST conversations/{id}/approvals/{approvalId}/decide`. */
|
|
1082
1175
|
interface DecideApprovalRequest {
|
|
1083
1176
|
decision: ApprovalDecision;
|
|
@@ -1434,6 +1527,11 @@ interface AdminAgent extends AdminAgentInput {
|
|
|
1434
1527
|
stateReason: string | null;
|
|
1435
1528
|
/** Events that wait while the agent is paused. */
|
|
1436
1529
|
waitingInputs: number;
|
|
1530
|
+
/**
|
|
1531
|
+
* `true` while the agent is stopped and was off when it stopped: releasing the kill switch switches
|
|
1532
|
+
* it back off, while resuming switches it on. `false` otherwise; missing on older servers.
|
|
1533
|
+
*/
|
|
1534
|
+
offBeforeStop?: boolean;
|
|
1437
1535
|
/** The agent's skills with their states and today's usage; missing or empty without skills. */
|
|
1438
1536
|
skills?: AgentSkillState[];
|
|
1439
1537
|
/** The live agent this agent is a shadow variant of; missing or null for an agent that is no variant. */
|
|
@@ -1556,11 +1654,58 @@ interface AgentState {
|
|
|
1556
1654
|
cancelledRuns: number;
|
|
1557
1655
|
/** The runs this change started for waiting events by resuming the agent. */
|
|
1558
1656
|
startedRuns: number;
|
|
1657
|
+
/**
|
|
1658
|
+
* `true` while the agent is stopped and was off when it stopped: releasing the kill switch switches
|
|
1659
|
+
* it back off, while resuming switches it on. `false` otherwise; missing on older servers.
|
|
1660
|
+
*/
|
|
1661
|
+
offBeforeStop?: boolean;
|
|
1559
1662
|
skills?: AgentSkillState[];
|
|
1560
1663
|
shadowOf?: string | null;
|
|
1561
1664
|
/** `null` for an agent without runs, which only chats. */
|
|
1562
1665
|
shadow?: AgentShadowState | null;
|
|
1563
1666
|
serviceAccount?: AgentServiceAccountState | null;
|
|
1667
|
+
/**
|
|
1668
|
+
* The routes of the agent's consultations, as its consultations in code and as data allow them and
|
|
1669
|
+
* an administrator switched them; `null` when nobody can consult the agent: it has no consultation
|
|
1670
|
+
* in code and none defined as data in effect. Missing on older servers.
|
|
1671
|
+
*/
|
|
1672
|
+
consultationRoutes?: AgentConsultationRoutesState | null;
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* The routes of an agent's consultations: one entry per route, and the last change at runtime. The
|
|
1676
|
+
* consultations are the ceiling: a route none of them allows can never be switched on.
|
|
1677
|
+
*/
|
|
1678
|
+
interface AgentConsultationRoutesState {
|
|
1679
|
+
routes: AgentConsultationRouteState[];
|
|
1680
|
+
/** When the routes last changed at runtime; `null` while they follow the code. */
|
|
1681
|
+
changedAt: string | null;
|
|
1682
|
+
changedBy: string | null;
|
|
1683
|
+
reason: string | null;
|
|
1684
|
+
}
|
|
1685
|
+
/** One route of an agent's consultations. */
|
|
1686
|
+
interface AgentConsultationRouteState {
|
|
1687
|
+
route: NhAssistantConsultationRoute;
|
|
1688
|
+
/** Whether a consultation of the agent, in code or as data in effect, allows the route: the ceiling. */
|
|
1689
|
+
allowed: boolean;
|
|
1690
|
+
/** The switch an administrator set: `true` on, `false` off, `null` following the code. */
|
|
1691
|
+
override: boolean | null;
|
|
1692
|
+
/** Whether consultations use the route now: allowed and not switched off. */
|
|
1693
|
+
on: boolean;
|
|
1694
|
+
/** The subject types whose consultation allows the route. */
|
|
1695
|
+
subjectTypes: string[];
|
|
1696
|
+
}
|
|
1697
|
+
/** A switch of a consultation route: on, off, or back to the setting in code. */
|
|
1698
|
+
type AgentConsultationRouteSwitch = 'on' | 'off' | 'code';
|
|
1699
|
+
/**
|
|
1700
|
+
* Body of `POST admin/agents/{id}/consultation-routes`. A route left out keeps its switch; switching
|
|
1701
|
+
* on a route that code does not allow fails with `409 assistant-consult-route-not-allowed`.
|
|
1702
|
+
*/
|
|
1703
|
+
interface SetAgentConsultationRoutesRequest {
|
|
1704
|
+
askerDecides?: AgentConsultationRouteSwitch;
|
|
1705
|
+
subjectAgentRights?: AgentConsultationRouteSwitch;
|
|
1706
|
+
subjectAskerRights?: AgentConsultationRouteSwitch;
|
|
1707
|
+
/** Optional, at most 500 characters. */
|
|
1708
|
+
reason?: string | null;
|
|
1564
1709
|
}
|
|
1565
1710
|
/** Body of `POST admin/agents/{id}/shadow` and `POST admin/agents/{id}/skills/{skillId}/shadow`. */
|
|
1566
1711
|
interface SetAgentShadowRequest {
|
|
@@ -2111,6 +2256,34 @@ interface RunCatalog {
|
|
|
2111
2256
|
* can only lower them; missing on older servers.
|
|
2112
2257
|
*/
|
|
2113
2258
|
fileLimits?: FileLimits | null;
|
|
2259
|
+
/**
|
|
2260
|
+
* The application's ceiling of consultations defined as data (`UseConsultationsAsData`): what agents
|
|
2261
|
+
* created here may be consulted with. `null` while consultations exist in code only; missing on
|
|
2262
|
+
* older servers.
|
|
2263
|
+
*/
|
|
2264
|
+
consultationCeiling?: ConsultationCeiling | null;
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* A ceiling in code of consultations defined as data: the routes their proposals may use (empty allows
|
|
2268
|
+
* answers only), whether they may generate the request tool and be seen by MCP clients, and their
|
|
2269
|
+
* highest limits.
|
|
2270
|
+
*/
|
|
2271
|
+
interface ConsultationCeiling {
|
|
2272
|
+
routes: NhAssistantConsultationRoute[];
|
|
2273
|
+
allowRequests: boolean;
|
|
2274
|
+
allowMcp: boolean;
|
|
2275
|
+
/** The most tool calls of one consultation. */
|
|
2276
|
+
maxToolCalls: number;
|
|
2277
|
+
/** The longest consultation, in seconds. */
|
|
2278
|
+
maxTimeoutSeconds: number;
|
|
2279
|
+
/** The longest answer, in characters. */
|
|
2280
|
+
maxAnswerChars: number;
|
|
2281
|
+
/** The most thread messages a consulted agent reads. */
|
|
2282
|
+
maxHistoryMessages: number;
|
|
2283
|
+
/** The most consultations defined as data of one agent. */
|
|
2284
|
+
maxConsultations: number;
|
|
2285
|
+
/** The longest instructions of a consultation defined as data. */
|
|
2286
|
+
maxInstructionsLength: number;
|
|
2114
2287
|
}
|
|
2115
2288
|
/**
|
|
2116
2289
|
* File limits: the largest file in bytes, the most pages of one file, the most files of one turn and
|
|
@@ -2193,15 +2366,16 @@ interface AssistantAccount {
|
|
|
2193
2366
|
detail: string | null;
|
|
2194
2367
|
}
|
|
2195
2368
|
/** Which part of the run configuration a problem concerns. */
|
|
2196
|
-
type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger';
|
|
2369
|
+
type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger' | 'consultation';
|
|
2197
2370
|
/**
|
|
2198
2371
|
* Data that is out of effect because it no longer fits the code, for example after a deploy removed
|
|
2199
|
-
* a profile, policy, rule handler, event or subject set it names.
|
|
2372
|
+
* a profile, policy, rule handler, event or subject set it names. A consultation defined as data may
|
|
2373
|
+
* also stay in effect without the parts that no longer fit, each with a problem.
|
|
2200
2374
|
*/
|
|
2201
2375
|
interface RunConfigurationProblem {
|
|
2202
2376
|
agentId: string;
|
|
2203
2377
|
kind: RunConfigurationProblemKind;
|
|
2204
|
-
/** The agent, skill or trigger id. */
|
|
2378
|
+
/** The agent, skill or trigger id; the subject type of a consultation. */
|
|
2205
2379
|
id: string;
|
|
2206
2380
|
/** Such as `unknown-event` or `tool-not-covered`. */
|
|
2207
2381
|
code: string;
|
|
@@ -2521,7 +2695,7 @@ interface DataTriggerShadowRequest {
|
|
|
2521
2695
|
mode: 'shadow' | 'live';
|
|
2522
2696
|
reason?: string | null;
|
|
2523
2697
|
}
|
|
2524
|
-
/** Query of the removals of run settings, data skills and data
|
|
2698
|
+
/** Query of the removals of run settings, data skills, data triggers and data consultations. */
|
|
2525
2699
|
interface RunConfigurationRemoval {
|
|
2526
2700
|
expectedVersion?: number | null;
|
|
2527
2701
|
reason?: string | null;
|
|
@@ -2544,6 +2718,137 @@ interface AgentRunConfiguration {
|
|
|
2544
2718
|
runSettings: AgentRunSettings | null;
|
|
2545
2719
|
/** How an agent in code runs, as its code says; `null` for an agent created here, missing on older servers. */
|
|
2546
2720
|
codeRunSettings?: CodeRunSettings | null;
|
|
2721
|
+
/** The consultations the agent allows in code, read-only, by subject type; missing on older servers. */
|
|
2722
|
+
codeConsultations?: CodeConsultation[];
|
|
2723
|
+
/** The consultations of the agent defined as data, by subject type; missing on older servers. */
|
|
2724
|
+
dataConsultations?: DataConsultation[];
|
|
2725
|
+
/**
|
|
2726
|
+
* The ceiling within which the agent may get consultations as data: the application's for an agent
|
|
2727
|
+
* created here, the application's and its own together for an agent in code that is consultable as
|
|
2728
|
+
* data. `null` when it may get none; missing on older servers.
|
|
2729
|
+
*/
|
|
2730
|
+
consultationCeiling?: ConsultationCeiling | null;
|
|
2731
|
+
}
|
|
2732
|
+
/** The role a person needs on the subject: to ask a consulted agent, or before it may propose. */
|
|
2733
|
+
type ConsultationSubjectRole = Exclude<AgentSubjectRole, 'none'>;
|
|
2734
|
+
/** Where the generated tools of a consultation are offered. */
|
|
2735
|
+
type ConsultationExposure = 'local' | 'agent' | 'mcp';
|
|
2736
|
+
/**
|
|
2737
|
+
* A consultation the agent allows in code with `AllowConsultation`; it cannot change here, apart from
|
|
2738
|
+
* the agent's route switches.
|
|
2739
|
+
*/
|
|
2740
|
+
interface CodeConsultation {
|
|
2741
|
+
subjectType: string;
|
|
2742
|
+
description: string | null;
|
|
2743
|
+
/** The routes its registration allows, before the agent's route switches. */
|
|
2744
|
+
allowedRoutes: NhAssistantConsultationRoute[];
|
|
2745
|
+
allowRequests: boolean;
|
|
2746
|
+
exposure: ConsultationExposure[];
|
|
2747
|
+
/** The id of the generated consult tool, which asking agents select. */
|
|
2748
|
+
consultToolId: string;
|
|
2749
|
+
/** The id of the generated request tool; `null` without requests. */
|
|
2750
|
+
requestToolId: string | null;
|
|
2751
|
+
/** The agents whose tool selectors select the consult tool now, by id. */
|
|
2752
|
+
askingAgents: string[];
|
|
2753
|
+
}
|
|
2754
|
+
/**
|
|
2755
|
+
* A consultation defined as data: other assistants may consult the agent about subjects of one type.
|
|
2756
|
+
* It is in effect once saved and answers only when an asking agent selects its consult tool.
|
|
2757
|
+
*/
|
|
2758
|
+
interface DataConsultation {
|
|
2759
|
+
subjectType: string;
|
|
2760
|
+
version: number;
|
|
2761
|
+
/** What the asking model reads about when to consult the agent. */
|
|
2762
|
+
description: string;
|
|
2763
|
+
/** Extra instructions of the consulted agent. */
|
|
2764
|
+
instructions: string | null;
|
|
2765
|
+
instructionsHash: string | null;
|
|
2766
|
+
/** The role the asking person needs on the subject. */
|
|
2767
|
+
minimumRole: ConsultationSubjectRole;
|
|
2768
|
+
/**
|
|
2769
|
+
* The policy the asking person must pass, one the application lists with `AddAgentPolicy`; `null`
|
|
2770
|
+
* uses the agent's required policy, else the assistant's access policy.
|
|
2771
|
+
*/
|
|
2772
|
+
askerPolicy: string | null;
|
|
2773
|
+
/** The routes as saved; empty for a consultation that only answers. */
|
|
2774
|
+
routes: NhAssistantConsultationRoute[];
|
|
2775
|
+
/** The role the asking person needs before the agent may propose. */
|
|
2776
|
+
proposalRole: ConsultationSubjectRole;
|
|
2777
|
+
/** The approval policy of its proposals; `null` uses the agent's. */
|
|
2778
|
+
proposalPolicy: string | null;
|
|
2779
|
+
maxToolCalls: number;
|
|
2780
|
+
timeoutSeconds: number;
|
|
2781
|
+
maxAnswerChars: number;
|
|
2782
|
+
maxHistoryMessages: number;
|
|
2783
|
+
allowRequests: boolean;
|
|
2784
|
+
/** MCP clients may see its tools, while the ceiling allows MCP. */
|
|
2785
|
+
exposeToMcp: boolean;
|
|
2786
|
+
/** The classification of its answers; `null` uses the agent's. */
|
|
2787
|
+
dataClassification: AssistantDataClassification | null;
|
|
2788
|
+
changedAt: string;
|
|
2789
|
+
changedBy: string;
|
|
2790
|
+
reason: string | null;
|
|
2791
|
+
/** `false` with `problem` when the consultation no longer fits the code. */
|
|
2792
|
+
inEffect: boolean;
|
|
2793
|
+
/** The first problem: the reason it is out of effect when it is. */
|
|
2794
|
+
problem: string | null;
|
|
2795
|
+
/**
|
|
2796
|
+
* Every problem: the reason it is out of effect, or each part that no longer fits and was dropped or
|
|
2797
|
+
* capped, such as `route-not-allowed` or `limit-above-ceiling`.
|
|
2798
|
+
*/
|
|
2799
|
+
problems: string[];
|
|
2800
|
+
/** The routes in effect: those saved that still fit the ceiling and the agent, before its route switches. */
|
|
2801
|
+
routesInEffect: NhAssistantConsultationRoute[];
|
|
2802
|
+
/** The id of the generated consult tool, which asking agents select. */
|
|
2803
|
+
consultToolId: string;
|
|
2804
|
+
/** The id of the generated request tool while requests are in effect. */
|
|
2805
|
+
requestToolId: string | null;
|
|
2806
|
+
/** The agents whose tool selectors select the consult tool now, by id: the consultation's second key. */
|
|
2807
|
+
askingAgents: string[];
|
|
2808
|
+
createdAt: string;
|
|
2809
|
+
createdBy: string;
|
|
2810
|
+
}
|
|
2811
|
+
/**
|
|
2812
|
+
* Body of `PUT admin/agents/{id}/consultations/{subjectType}`. Limits left out start at the code's
|
|
2813
|
+
* defaults within the ceiling.
|
|
2814
|
+
*/
|
|
2815
|
+
interface DataConsultationRequest {
|
|
2816
|
+
/** Required, at most 1,000 characters. */
|
|
2817
|
+
description: string;
|
|
2818
|
+
/** At most the ceiling's `maxInstructionsLength`, 4,000 characters. */
|
|
2819
|
+
instructions?: string | null;
|
|
2820
|
+
/** `reader` by default. */
|
|
2821
|
+
minimumRole?: ConsultationSubjectRole | null;
|
|
2822
|
+
/** A policy of the run catalog's `agentPolicies`; `null` uses the agent's required policy. */
|
|
2823
|
+
askerPolicy?: string | null;
|
|
2824
|
+
/**
|
|
2825
|
+
* `asker-decides` and at most one of `subject-asker-rights` and `subject-agent-rights`, within the
|
|
2826
|
+
* ceiling; empty keeps the consultation read-only. A route outside the ceiling fails with
|
|
2827
|
+
* `routes: not-allowed`.
|
|
2828
|
+
*/
|
|
2829
|
+
routes?: NhAssistantConsultationRoute[];
|
|
2830
|
+
/** `participant` by default. */
|
|
2831
|
+
proposalRole?: ConsultationSubjectRole | null;
|
|
2832
|
+
/** A registered approval policy; `null` uses the agent's. */
|
|
2833
|
+
proposalPolicy?: string | null;
|
|
2834
|
+
/** 0 to 32, at most the ceiling's. */
|
|
2835
|
+
maxToolCalls?: number | null;
|
|
2836
|
+
/** 1 to 600, at most the ceiling's. */
|
|
2837
|
+
timeoutSeconds?: number | null;
|
|
2838
|
+
/** 200 to 32,000, at most the ceiling's. */
|
|
2839
|
+
maxAnswerChars?: number | null;
|
|
2840
|
+
/** 0 to 200, at most the ceiling's. */
|
|
2841
|
+
maxHistoryMessages?: number | null;
|
|
2842
|
+
/** Also generates the request tool; only when the ceiling allows requests. */
|
|
2843
|
+
allowRequests?: boolean;
|
|
2844
|
+
/** MCP clients may see its tools; only when the ceiling allows MCP. */
|
|
2845
|
+
exposeToMcp?: boolean;
|
|
2846
|
+
/** `null` uses the agent's. */
|
|
2847
|
+
dataClassification?: AssistantDataClassification | null;
|
|
2848
|
+
/** The consultation's current version; `null` for a new consultation. */
|
|
2849
|
+
expectedVersion?: number | null;
|
|
2850
|
+
/** Optional, at most 500 characters. */
|
|
2851
|
+
reason?: string | null;
|
|
2547
2852
|
}
|
|
2548
2853
|
|
|
2549
2854
|
/** Decides whether the current user may see and use the assistant. */
|
|
@@ -2936,6 +3241,13 @@ declare class NhAssistantAdminApiService {
|
|
|
2936
3241
|
* account that does not exist or may not sign in.
|
|
2937
3242
|
*/
|
|
2938
3243
|
setServiceAccount(agentId: string, request: SetAgentServiceAccountRequest): Observable<AgentState>;
|
|
3244
|
+
/**
|
|
3245
|
+
* Switches the routes of the agent's consultations on, off or back to the setting in code; a route
|
|
3246
|
+
* left out keeps its switch. Code is the ceiling: switching on a route that no consultation in code
|
|
3247
|
+
* allows fails with `assistant-consult-route-not-allowed`. Returns the agent's state with its
|
|
3248
|
+
* `consultationRoutes`.
|
|
3249
|
+
*/
|
|
3250
|
+
setConsultationRoutes(agentId: string, request: SetAgentConsultationRoutesRequest): Observable<AgentState>;
|
|
2939
3251
|
/**
|
|
2940
3252
|
* Puts an agent, in code or created here, in exactly `groups` of the run catalog's `agentGroups`
|
|
2941
3253
|
* and out of the others. The choice wins over the agent's `InGroup` in code. Fails with a field error
|
|
@@ -3066,6 +3378,23 @@ declare class NhAssistantAdminApiService {
|
|
|
3066
3378
|
removeDataTrigger(agentId: string, triggerId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
3067
3379
|
/** Puts a trigger defined as data in shadow or live. */
|
|
3068
3380
|
setDataTriggerShadow(agentId: string, triggerId: string, request: DataTriggerShadowRequest): Observable<DataTrigger>;
|
|
3381
|
+
/**
|
|
3382
|
+
* Adds or changes the consultation defined as data of an agent about one subject type, within the
|
|
3383
|
+
* agent's `consultationCeiling`. It is in effect once saved and answers when an asking agent selects
|
|
3384
|
+
* its consult tool. An agent that may get none fails with `assistant-consultations-not-allowed`, an
|
|
3385
|
+
* agent created here without run settings with `assistant-agent-not-configured`, a type the agent
|
|
3386
|
+
* allows consultation about in code with `assistant-consultation-in-code`, more than the ceiling's
|
|
3387
|
+
* `maxConsultations` with `assistant-configuration-limit`, a stale `expectedVersion` with
|
|
3388
|
+
* `assistant-version-conflict` and invalid input with field errors, such as `routes: not-allowed` for
|
|
3389
|
+
* a route outside the ceiling.
|
|
3390
|
+
*/
|
|
3391
|
+
saveDataConsultation(agentId: string, subjectType: string, request: DataConsultationRequest): Observable<DataConsultation>;
|
|
3392
|
+
/**
|
|
3393
|
+
* Removes a consultation defined as data: its tools disappear, while its recorded proposals can still
|
|
3394
|
+
* be decided. Fails with `assistant-consultation-not-found` without one and with
|
|
3395
|
+
* `assistant-consultation-in-code` for a consultation in code.
|
|
3396
|
+
*/
|
|
3397
|
+
removeDataConsultation(agentId: string, subjectType: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
3069
3398
|
private download;
|
|
3070
3399
|
private request;
|
|
3071
3400
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminApiService, never>;
|
|
@@ -3235,11 +3564,16 @@ declare class NhAssistantAgentRunApiService {
|
|
|
3235
3564
|
* replaced by the server's `userMessageId` when `turn.started` arrives.
|
|
3236
3565
|
*/
|
|
3237
3566
|
declare function applyNhAssistantEvent(conversation: Conversation, event: NhAssistantSseEvent, clientMessageId?: string): Conversation;
|
|
3238
|
-
/** Records the user's approval decision locally until the server state is reloaded. */
|
|
3239
|
-
declare function applyNhAssistantApprovalDecision(conversation: Conversation, approvalId: string, decision: 'approve' | 'reject'): Conversation;
|
|
3240
3567
|
/**
|
|
3241
|
-
*
|
|
3242
|
-
*
|
|
3568
|
+
* Records the user's approval decision locally until the server state is reloaded. A consulted
|
|
3569
|
+
* agent's proposal that the user left for the subject's approvers (`leave`) closes here as the server
|
|
3570
|
+
* closes it, rejected in this conversation, and can no longer be left; the waiting tool call goes on.
|
|
3571
|
+
*/
|
|
3572
|
+
declare function applyNhAssistantApprovalDecision(conversation: Conversation, approvalId: string, decision: ApprovalDecision): Conversation;
|
|
3573
|
+
/**
|
|
3574
|
+
* Applies a live update of another session: `message.created` adds a participant's or the
|
|
3575
|
+
* application's message once, where its sequence number puts it; the turn events behave exactly
|
|
3576
|
+
* like the starting request's stream. Unknown types are ignored.
|
|
3243
3577
|
*/
|
|
3244
3578
|
declare function applyNhAssistantLiveEvent(conversation: Conversation, event: LiveConversationEvent): Conversation;
|
|
3245
3579
|
/** Applies the shared state of a conversation that a live update announced. */
|
|
@@ -3399,9 +3733,10 @@ declare const NH_ASSISTANT_MESSAGE_QUEUED_NOTICE_CODE = "assistant-message-queue
|
|
|
3399
3733
|
/**
|
|
3400
3734
|
* Who decides an approval the current user cannot decide: `turn`, the person whose turn created
|
|
3401
3735
|
* it in a chat; `approver`, an approver of the agent thread's subject; `other-approver`, another
|
|
3402
|
-
* approver, because the current user started the work and four-eyes applies
|
|
3736
|
+
* approver, because the current user started the work and four-eyes applies; `asker`, the person
|
|
3737
|
+
* who consulted the thread's agent, in their own chat.
|
|
3403
3738
|
*/
|
|
3404
|
-
type NhAssistantApprovalWaitingFor = 'turn' | 'approver' | 'other-approver';
|
|
3739
|
+
type NhAssistantApprovalWaitingFor = 'turn' | 'approver' | 'other-approver' | 'asker';
|
|
3405
3740
|
/** The current user's right to decide, or to give feedback on, one approval of the open conversation. */
|
|
3406
3741
|
interface NhAssistantApprovalRight {
|
|
3407
3742
|
canDecide: boolean;
|
|
@@ -3523,6 +3858,12 @@ declare class NhAssistantStore {
|
|
|
3523
3858
|
/** Non-blocking remark about the latest completed turn; shown only while no error is shown. */
|
|
3524
3859
|
readonly notice: _angular_core.Signal<NhAssistantError | null>;
|
|
3525
3860
|
readonly lastUsage: _angular_core.Signal<TurnUsage | null>;
|
|
3861
|
+
/**
|
|
3862
|
+
* The answer the running turn of the open conversation writes, while this tab streams the turn or
|
|
3863
|
+
* follows it live; `null` otherwise. Pass it to `nh-assistant-thread` as `writingMessageId`, so
|
|
3864
|
+
* the working indicator stays under that answer when a message arrives after it during the turn.
|
|
3865
|
+
*/
|
|
3866
|
+
readonly writingMessageId: _angular_core.Signal<string | null>;
|
|
3526
3867
|
/** Text of a message the server did not accept, so the composer can offer it again. */
|
|
3527
3868
|
readonly restoredDraft: _angular_core.Signal<string | null>;
|
|
3528
3869
|
/** Page context that the next message would send, for the transparency chip. */
|
|
@@ -3631,8 +3972,11 @@ declare class NhAssistantStore {
|
|
|
3631
3972
|
/**
|
|
3632
3973
|
* Approves or rejects an approval of the open conversation: `approvalId`, or the pending approval
|
|
3633
3974
|
* when it is left out. A proposal of an agent's run is decided with its proposal hash through the
|
|
3634
|
-
* agent-run endpoint; other approvals resume their turn as a stream.
|
|
3635
|
-
*
|
|
3975
|
+
* agent-run endpoint; other approvals resume their turn as a stream. `leave` leaves a consulted
|
|
3976
|
+
* agent's proposal that has a `consultation.leaveRoute` for the subject's approvers; it resumes the
|
|
3977
|
+
* turn like a decision and reads the conversation again, which then names the proposal that waits
|
|
3978
|
+
* at the subject. Ignores calls the current user may not make, `leave` for other approvals and
|
|
3979
|
+
* repeated calls while a decision is in flight.
|
|
3636
3980
|
*/
|
|
3637
3981
|
decide(decision: ApprovalDecision, reason?: string, approvalId?: string): void;
|
|
3638
3982
|
/**
|
|
@@ -3713,6 +4057,11 @@ declare class NhAssistantStore {
|
|
|
3713
4057
|
private onLiveChanged;
|
|
3714
4058
|
private onLiveRead;
|
|
3715
4059
|
private onLiveRemoved;
|
|
4060
|
+
/**
|
|
4061
|
+
* Applies a live turn event or message to a conversation this tab shows. While the tab streams a
|
|
4062
|
+
* turn of the conversation, its stream brings the turn's events and its own message, so it applies
|
|
4063
|
+
* only messages that others stored meanwhile: the application's and other people's.
|
|
4064
|
+
*/
|
|
3716
4065
|
private onLiveEvent;
|
|
3717
4066
|
/**
|
|
3718
4067
|
* A run or proposal of an agent thread changed, for example a colleague decided a proposal in the
|
|
@@ -4098,9 +4447,12 @@ declare const NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD = 200;
|
|
|
4098
4447
|
* The messages of a conversation as a live log. Assistant text renders as sanitized
|
|
4099
4448
|
* Markdown, consecutive tool calls as one collapsible group that counts along, and
|
|
4100
4449
|
* approvals as cards. The files a person attached show by name, type and size. Messages a
|
|
4101
|
-
* trigger wrote into an agent thread read as events, not as a person
|
|
4102
|
-
*
|
|
4103
|
-
*
|
|
4450
|
+
* trigger wrote into an agent thread read as events, not as a person, and a message the application
|
|
4451
|
+
* posted reads as the application's, with its sender, title, Markdown text and link, and a label when
|
|
4452
|
+
* the assistant follows it as an instruction. While a turn runs without visible progress, a working
|
|
4453
|
+
* indicator shows the elapsed time: under the answer `writingMessageId` names, also when the
|
|
4454
|
+
* application's or another person's message arrived after it, and at the end without it. The thread
|
|
4455
|
+
* follows new content while the user is at the bottom.
|
|
4104
4456
|
*/
|
|
4105
4457
|
declare class NhAssistantThreadComponent {
|
|
4106
4458
|
private readonly injector;
|
|
@@ -4129,6 +4481,13 @@ declare class NhAssistantThreadComponent {
|
|
|
4129
4481
|
* card of a rejected proposal ask what was wrong.
|
|
4130
4482
|
*/
|
|
4131
4483
|
readonly approvalRights: _angular_core.InputSignal<ReadonlyMap<string, NhAssistantApprovalRight> | null>;
|
|
4484
|
+
/**
|
|
4485
|
+
* The answer the running turn writes, for example `NhAssistantStore.writingMessageId`. The working
|
|
4486
|
+
* indicator stays under that answer, also when the application's or a colleague's message arrives
|
|
4487
|
+
* after it during the turn. Without it, or when it names no message of `messages`, the indicator
|
|
4488
|
+
* shows at the end of the thread.
|
|
4489
|
+
*/
|
|
4490
|
+
readonly writingMessageId: _angular_core.InputSignal<string | null>;
|
|
4132
4491
|
/** The decision about an approval card, without the approval it belongs to. */
|
|
4133
4492
|
readonly approvalDecision: _angular_core.OutputEmitterRef<ApprovalDecision>;
|
|
4134
4493
|
/** The decision about an approval card together with its approval id. */
|
|
@@ -4146,9 +4505,17 @@ declare class NhAssistantThreadComponent {
|
|
|
4146
4505
|
/**
|
|
4147
4506
|
* True while the turn runs and nothing else shows progress: before the first part and
|
|
4148
4507
|
* between tool calls while the model decides what to do next. Streaming text and a
|
|
4149
|
-
* running tool group show their own progress; an approval waits for the user.
|
|
4508
|
+
* running tool group show their own progress; an approval waits for the user. With
|
|
4509
|
+
* `writingMessageId`, the answer it names decides, as if the messages after it were not there.
|
|
4150
4510
|
*/
|
|
4151
4511
|
readonly working: _angular_core.Signal<boolean>;
|
|
4512
|
+
/**
|
|
4513
|
+
* The message in whose row the working indicator shows: the answer `writingMessageId` names.
|
|
4514
|
+
* `null` puts the indicator at the end of the thread.
|
|
4515
|
+
*/
|
|
4516
|
+
readonly workingAfterId: _angular_core.Signal<string | null>;
|
|
4517
|
+
/** While a turn runs: the answer `writingMessageId` names, when `messages` holds it. */
|
|
4518
|
+
private readonly answerBeingWritten;
|
|
4152
4519
|
/** Whole seconds since the running turn started. */
|
|
4153
4520
|
readonly elapsedSeconds: _angular_core.Signal<number>;
|
|
4154
4521
|
private readonly turnStartedAt;
|
|
@@ -4159,6 +4526,8 @@ declare class NhAssistantThreadComponent {
|
|
|
4159
4526
|
trackMessage(_index: number, message: Message): string;
|
|
4160
4527
|
/** True for a user message a trigger wrote into an agent thread. */
|
|
4161
4528
|
isTrigger(message: Message): boolean;
|
|
4529
|
+
/** True for a message the application posted into the conversation. */
|
|
4530
|
+
isApplication(message: Message): boolean;
|
|
4162
4531
|
/** True for an assistant message the agent's rules wrote without a model. */
|
|
4163
4532
|
isRule(message: Message): boolean;
|
|
4164
4533
|
/** True for a user message written by another person in a shared conversation. */
|
|
@@ -4171,7 +4540,7 @@ declare class NhAssistantThreadComponent {
|
|
|
4171
4540
|
private scrollElement;
|
|
4172
4541
|
private scrollToEnd;
|
|
4173
4542
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantThreadComponent, never>;
|
|
4174
|
-
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>;
|
|
4543
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NhAssistantThreadComponent, "nh-assistant-thread", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "streaming": { "alias": "streaming"; "required": false; "isSignal": true; }; "deciding": { "alias": "deciding"; "required": false; "isSignal": true; }; "markdown": { "alias": "markdown"; "required": false; "isSignal": true; }; "members": { "alias": "members"; "required": false; "isSignal": true; }; "currentActorId": { "alias": "currentActorId"; "required": false; "isSignal": true; }; "canDecide": { "alias": "canDecide"; "required": false; "isSignal": true; }; "decisionOwner": { "alias": "decisionOwner"; "required": false; "isSignal": true; }; "approvalRights": { "alias": "approvalRights"; "required": false; "isSignal": true; }; "writingMessageId": { "alias": "writingMessageId"; "required": false; "isSignal": true; }; }, { "approvalDecision": "approvalDecision"; "approvalChoice": "approvalChoice"; "retryMessage": "retryMessage"; }, never, never, true, never>;
|
|
4175
4544
|
}
|
|
4176
4545
|
|
|
4177
4546
|
/**
|
|
@@ -4334,7 +4703,7 @@ declare class NhAssistantComposerComponent {
|
|
|
4334
4703
|
/** True while a file of the next message still uploads. */
|
|
4335
4704
|
readonly uploading: _angular_core.Signal<boolean>;
|
|
4336
4705
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
4337
|
-
/** The `accept` attribute of the file input. */
|
|
4706
|
+
/** The `accept` attribute of the file input, with the extensions the application mapped. */
|
|
4338
4707
|
readonly accept: _angular_core.Signal<string>;
|
|
4339
4708
|
/** The values the attachment texts name: the accepted types, the largest size and the most files. */
|
|
4340
4709
|
readonly uploadParams: _angular_core.Signal<{
|
|
@@ -4411,9 +4780,15 @@ declare function formatNhAssistantCountdown(milliseconds: number): string;
|
|
|
4411
4780
|
* proposed arguments and a countdown to expiry. A decision is emitted at most once until
|
|
4412
4781
|
* the host reports that it is no longer deciding. After the user rejected an agent's proposal
|
|
4413
4782
|
* (`canGiveFeedback`), a low-key action asks what was wrong. A proposal that closed because it no
|
|
4414
|
-
* longer fits shows why, such as "Already done", with the application's explanation.
|
|
4783
|
+
* longer fits shows why, such as "Already done", with the application's explanation. A proposal of
|
|
4784
|
+
* another agent the assistant consulted (`consultation`) names that agent and the subject, offers the
|
|
4785
|
+
* agent's answer and says that approving runs it with the user's own rights; with a
|
|
4786
|
+
* `consultation.leaveRoute` a third action leaves it for the subject's approvers (`leave`), after which
|
|
4787
|
+
* the card says that it waits for them.
|
|
4415
4788
|
*/
|
|
4416
4789
|
declare class NhAssistantApprovalCardComponent {
|
|
4790
|
+
/** Names the consulted agent as the status does; the card also works outside `provideNhAssistant`. */
|
|
4791
|
+
private readonly store;
|
|
4417
4792
|
readonly approval: _angular_core.InputSignal<ApprovalPart>;
|
|
4418
4793
|
/** True while the host submits a decision; disables both buttons. */
|
|
4419
4794
|
readonly deciding: _angular_core.InputSignal<boolean>;
|
|
@@ -4438,6 +4813,8 @@ declare class NhAssistantApprovalCardComponent {
|
|
|
4438
4813
|
readonly decide: _angular_core.OutputEmitterRef<ApprovalDecision>;
|
|
4439
4814
|
private readonly now;
|
|
4440
4815
|
private readonly submitted;
|
|
4816
|
+
/** The decision this card sent last, so a proposal left for the approvers reads as such at once. */
|
|
4817
|
+
private readonly chosen;
|
|
4441
4818
|
/** The feedback question is expanded. */
|
|
4442
4819
|
readonly feedbackOpen: _angular_core.WritableSignal<boolean>;
|
|
4443
4820
|
/** The feedback was stored; the question thanks the person and the action disappears. */
|
|
@@ -4446,9 +4823,25 @@ declare class NhAssistantApprovalCardComponent {
|
|
|
4446
4823
|
readonly remainingMs: _angular_core.Signal<number>;
|
|
4447
4824
|
readonly expired: _angular_core.Signal<boolean>;
|
|
4448
4825
|
readonly effectiveStatus: _angular_core.Signal<ApprovalStatus>;
|
|
4826
|
+
/** Where a consulted agent's proposal comes from; `null` for the conversation's own proposals. */
|
|
4827
|
+
readonly consultation: _angular_core.Signal<ApprovalConsultation | null>;
|
|
4828
|
+
/**
|
|
4829
|
+
* The translation keys of the consulted agent's name: the name the assistant's status gives it,
|
|
4830
|
+
* then the convention `nh-assistant.agents.{id}.name`; the id when neither translates.
|
|
4831
|
+
*/
|
|
4832
|
+
readonly consultedAgentKeys: _angular_core.Signal<string[]>;
|
|
4833
|
+
/** The subject the consulted agent was asked about, by name or else by id. */
|
|
4834
|
+
readonly consultedSubject: _angular_core.Signal<string | null>;
|
|
4835
|
+
/**
|
|
4836
|
+
* The user left the consulted agent's proposal for the subject's approvers: the server names the
|
|
4837
|
+
* proposal that waits there, or this card just sent the decision and it was accepted.
|
|
4838
|
+
*/
|
|
4839
|
+
readonly leftForApprovers: _angular_core.Signal<boolean>;
|
|
4840
|
+
/** The status the card shows: `moved` for a proposal left for the subject's approvers. */
|
|
4841
|
+
readonly shownStatus: _angular_core.Signal<ApprovalStatus | "moved">;
|
|
4449
4842
|
/**
|
|
4450
4843
|
* Translation key of the status: the kind of a stale proposal, "replaced" for a superseded one,
|
|
4451
|
-
* otherwise the status itself.
|
|
4844
|
+
* "left for approvers" for a consulted agent's proposal the user left, otherwise the status itself.
|
|
4452
4845
|
*/
|
|
4453
4846
|
readonly statusKey: _angular_core.Signal<string>;
|
|
4454
4847
|
/** Why the agent's rules proposed it; model proposals have none. */
|
|
@@ -4458,14 +4851,18 @@ declare class NhAssistantApprovalCardComponent {
|
|
|
4458
4851
|
readonly actionable: _angular_core.Signal<boolean>;
|
|
4459
4852
|
readonly succeeded: _angular_core.Signal<boolean>;
|
|
4460
4853
|
readonly disabled: _angular_core.Signal<boolean>;
|
|
4854
|
+
/** The route at the subject the pending proposal may be left for; `null` when it can only be approved or rejected. */
|
|
4855
|
+
readonly leaveRoute: _angular_core.Signal<NhAssistantConsultationLeaveRoute | null>;
|
|
4856
|
+
readonly leaveHintId: string;
|
|
4461
4857
|
readonly countdown: _angular_core.Signal<string>;
|
|
4462
4858
|
readonly presentedSummary: _angular_core.Signal<string | null>;
|
|
4463
4859
|
readonly feedbackAvailable: _angular_core.Signal<boolean>;
|
|
4464
4860
|
readonly feedbackIds: _angular_core.Signal<string[]>;
|
|
4465
4861
|
readonly feedbackPanelId: string;
|
|
4466
4862
|
/** Translation key of the text shown instead of the buttons when the current user cannot decide. */
|
|
4467
|
-
readonly waitingKey: _angular_core.Signal<"nh-assistant.approval.waiting-for-approver" | "nh-assistant.approval.waiting-for-other-approver" | "nh-assistant.approval.waiting-for" | "nh-assistant.approval.waiting-for-participant">;
|
|
4863
|
+
readonly waitingKey: _angular_core.Signal<"nh-assistant.approval.waiting-for-approver" | "nh-assistant.approval.waiting-for-other-approver" | "nh-assistant.approval.waiting-for-asker" | "nh-assistant.approval.waiting-for" | "nh-assistant.approval.waiting-for-participant">;
|
|
4468
4864
|
constructor();
|
|
4865
|
+
/** Emits a decision; `leave` only for a consulted agent's proposal with a route at the subject. */
|
|
4469
4866
|
choose(decision: ApprovalDecision): void;
|
|
4470
4867
|
toggleFeedback(): void;
|
|
4471
4868
|
onFeedbackSaved(): void;
|
|
@@ -4910,5 +5307,16 @@ declare class NhAssistantMarkdownPipe implements PipeTransform {
|
|
|
4910
5307
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantMarkdownPipe, "nhAssistantMarkdown", true>;
|
|
4911
5308
|
}
|
|
4912
5309
|
|
|
4913
|
-
|
|
4914
|
-
|
|
5310
|
+
/**
|
|
5311
|
+
* The media type a chosen file uploads as, lowercase and without parameters, by the same rule as the
|
|
5312
|
+
* server. A browser gives no type, or a generic one, for a file its system does not know, and some
|
|
5313
|
+
* systems name an extension after the program that opens it, such as `application/vnd.ms-excel` for
|
|
5314
|
+
* a `.csv` file; the file name's extension then names the type, but only a type of
|
|
5315
|
+
* `acceptedMediaTypes`: the type the application mapped the extension to (`mappedExtensions`),
|
|
5316
|
+
* otherwise the platform's. A specific type stays as it is, so a type that is not accepted is refused
|
|
5317
|
+
* whatever the extension. Without a type and an accepted extension, `application/octet-stream`.
|
|
5318
|
+
*/
|
|
5319
|
+
declare function nhAssistantMediaTypeOf(file: Pick<File, 'name' | 'type'>, acceptedMediaTypes: readonly string[], mappedExtensions?: readonly AgentUploadExtension[] | null): string;
|
|
5320
|
+
|
|
5321
|
+
export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, NH_ASSISTANT_ERROR_CODES, NH_ASSISTANT_FEEDBACK_CATEGORIES, NH_ASSISTANT_FEEDBACK_GROUPS, NH_ASSISTANT_FETCH, NH_ASSISTANT_ICONS, NH_ASSISTANT_JOIN_FRAGMENT, NH_ASSISTANT_MAX_BULK_FEEDBACK, NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS, NH_ASSISTANT_MAX_FEEDBACK_TEXT, NH_ASSISTANT_MAX_PROPOSAL_LOOKUP, NH_ASSISTANT_MAX_SUBJECT_SUMMARY, NH_ASSISTANT_MCP_AUTHORIZATION_MESSAGE, NH_ASSISTANT_MCP_AUTHORIZATION_WINDOW, NH_ASSISTANT_MESSAGE_QUEUED_NOTICE_CODE, NH_ASSISTANT_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_RESULT_PREVIEW_LENGTH, NH_ASSISTANT_RUN_HISTORY_MAX_PAGE, NH_ASSISTANT_RUN_RESULT_MAX_LENGTH, NH_ASSISTANT_SERVER_ERROR_CODES, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_SUBJECT_SEARCH, NH_ASSISTANT_SYSTEM_GLOBAL_ID, NH_ASSISTANT_SYSTEM_SUBJECT_TYPE, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_UPLOAD, NH_ASSISTANT_UPLOAD_HEADER, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConnectionRequiredComponent, NhAssistantConversationListComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantMcpConnectService, NhAssistantMcpConnectionsComponent, NhAssistantMcpPopupAuthorizationWindow, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantConnectMcp, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantMcpAuthorizationFromFragment, nhAssistantShareLink, nhAssistantXhrUpload, normalizeNhAssistantClientContext, provideNhAssistant, toNhAssistantError, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantMarkdownPipe as ɵNhAssistantMarkdownPipe, NhAssistantPickerComponent as ɵNhAssistantPickerComponent, NhAssistantSubjectLinkComponent as ɵNhAssistantSubjectLinkComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantCodeKeys as ɵnhAssistantCodeKeys, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantErrorOf as ɵnhAssistantErrorOf, nhAssistantMediaTypeOf as ɵnhAssistantMediaTypeOf, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, nhAssistantWatchAgentWork as ɵnhAssistantWatchAgentWork, toNhAssistantError as ɵtoNhAssistantError };
|
|
5322
|
+
export type { AdminAgent, AdminAgentGroups, AdminAgentInput, AgentAccountability, AgentArtifact, AgentBoard, AgentBoardAgent, AgentBoardList, AgentBoardSubjectType, AgentBoardSummary, AgentBoardVisit, AgentBoardWorksOn, AgentConsultation, AgentConsultationList, AgentConsultationRouteState, AgentConsultationRouteSwitch, AgentConsultationRoutesState, AgentConsultationStatus, AgentDecisionOutcome, AgentElevatedReads, AgentEvaluation, AgentEvaluationCost, AgentEvaluationDecisions, AgentEvaluationDifference, AgentEvaluationFilter, AgentEvaluationRouting, AgentEvaluationRuns, AgentEvaluationTool, AgentExecutionResolution, AgentFeedbackCategoryCount, AgentFeedbackExportFilter, AgentFeedbackFilter, AgentFeedbackItem, AgentFeedbackList, AgentFeedbackListFilter, AgentFeedbackOutcome, AgentFeedbackSummary, AgentFeedbackSummaryRow, AgentGrantSource, AgentGroup, AgentInbox, AgentInboxFilter, AgentInboxGroup, AgentInboxSubjectGroup, AgentInboxVisit, AgentInvalidationCount, AgentLatestRun, AgentObjectAgent, AgentObjectAgents, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalOrigin, AgentProposalParent, AgentProposalStatus, AgentReplay, AgentReplayList, AgentReplayRequest, AgentRun, AgentRunConfiguration, AgentRunFilter, AgentRunHistory, AgentRunHistoryItem, AgentRunKind, AgentRunList, AgentRunMcpSkip, AgentRunResult, AgentRunRetryMode, AgentRunSettings, AgentRunSettingsRequest, AgentRunState, AgentRunStatus, AgentServiceAccountState, AgentShadowMode, AgentShadowState, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSearch, AgentSubjectSearchResult, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectType, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerOutcome, AgentTriggerReceipt, AgentUploadExtension, AgentUploads, ApplicationContext, ApplicationContextVersion, ApplicationMessageDetails, ApplicationMessageLink, ApprovalConsultation, ApprovalDecision, ApprovalPart, ApprovalPolicySummary, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, ApproverSummary, AssistantAccount, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantConfigurationWarning, AssistantDataClassification, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, CodeConsultation, CodeRunSettings, CodeSkill, CodeTrigger, ConnectionRequiredEvent, ConnectionRequiredPart, ConnectionRequiredReason, ConsultationCeiling, ConsultationExposure, ConsultationSubjectRole, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DataConsultation, DataConsultationRequest, DataSkill, DataSkillRequest, DataSkillVersion, DataSkillVersionStatus, DataTrigger, DataTriggerRequest, DataTriggerShadowRequest, DecideApprovalRequest, DirectoryEntry, FileLimits, FilePart, FileReference, LiveAgentWorkChanged, LiveAgentWorkReason, LiveAgentWorkWatch, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, LowerFileLimits, McpAuthMode, McpAuthorization, McpAuthorizationStart, McpAuthorizeRequest, McpBuiltInAuthMode, McpCompleteRequest, McpCompletion, McpConnection, McpConnectionScope, McpConnectionStatus, McpConnectionsSummary, McpCustomAuthMode, McpDiscoverRequest, McpDiscovery, McpHeadlessUse, McpOAuthInput, McpOAuthSettings, McpOrganizationConnection, McpReader, McpReaderInput, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, McpTransport, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, MessageQueuedEvent, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantAttachment, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantConsultationLeaveRoute, NhAssistantConsultationRoute, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantMcpAuthorizationHandle, NhAssistantMcpAuthorizationOutcome, NhAssistantMcpAuthorizationWindow, NhAssistantMcpReturnOutcome, NhAssistantMessageEvent, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantSubjectLinkBuilder, NhAssistantSubjectRef, NhAssistantToolCallGroupState, NhAssistantUpload, NhAssistantUploadEvent, NhAssistantUploadRequest, NotificationSettings, PushSubscriptionRequest, RunBlock, RunCatalog, RunConfigurationProblem, RunConfigurationProblemKind, RunConfigurationRemoval, SendMessageRequest, SetAgentConsultationRoutesRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShareLink, SkillApplyMode, SkillCandidateRequest, SkillComparison, SkillComparisonFilter, SkillComparisonTool, SkillVersionStats, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TriggerConflict, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpConnectionRequest, UpdateMcpToolRequest, NhAssistantPickerOption as ɵNhAssistantPickerOption };
|