@newheap/platform-ai-chat 0.17.0 → 0.19.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 +396 -12
- package/agent-runs/index.d.ts +48 -7
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +5772 -2918
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs +127 -35
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +4153 -837
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +2168 -202
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +640 -13
- package/i18n/nl.json +640 -13
- package/index.d.ts +1334 -41
- package/package.json +1 -1
- package/push/nh-assistant-push-worker.js +13 -6
- package/testing/index.d.ts +285 -5
package/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { TemplatePortal } from '@angular/cdk/portal';
|
|
|
11
11
|
/** The caller's role on the subject of a thread. */
|
|
12
12
|
type AgentSubjectRole = 'none' | 'reader' | 'participant' | 'approver';
|
|
13
13
|
type AgentRunStatus = 'queued' | 'running' | 'waiting-for-approval' | 'completed' | 'failed' | 'cancelled';
|
|
14
|
-
type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
|
|
14
|
+
type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
|
|
15
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
|
|
@@ -53,6 +53,10 @@ interface AgentRun {
|
|
|
53
53
|
skillVersion?: number | null;
|
|
54
54
|
/** The run evaluated a candidate version of its skill in the shadow thread. */
|
|
55
55
|
skillCandidate?: boolean;
|
|
56
|
+
/** The version of the trigger defined as data that started the run; absent for a trigger in code. */
|
|
57
|
+
triggerVersion?: number | null;
|
|
58
|
+
/** The run evaluated a candidate version of its data trigger in the shadow thread. */
|
|
59
|
+
triggerCandidate?: boolean;
|
|
56
60
|
/** The agent that handed the run's work off; missing or null for a run no agent asked for. */
|
|
57
61
|
requestedByAgentId?: string | null;
|
|
58
62
|
/**
|
|
@@ -103,8 +107,9 @@ interface AgentThreadLookup {
|
|
|
103
107
|
interface AgentProposalDecisionRight {
|
|
104
108
|
canDecide: boolean;
|
|
105
109
|
/**
|
|
106
|
-
* Why the caller may not decide, for example `assistant-four-eyes-required
|
|
107
|
-
* `assistant-approval-policy-denied
|
|
110
|
+
* Why the caller may not decide, for example `assistant-four-eyes-required`,
|
|
111
|
+
* `assistant-approval-policy-denied` or `assistant-consult-asker-decides` for a consultation's
|
|
112
|
+
* proposal that the person who asked decides in their own chat; `null` when they may.
|
|
108
113
|
*/
|
|
109
114
|
reasonCode: string | null;
|
|
110
115
|
}
|
|
@@ -439,11 +444,27 @@ interface AgentProposal {
|
|
|
439
444
|
decidedAt: string | null;
|
|
440
445
|
executionResultCode: string | null;
|
|
441
446
|
executedAt: string | null;
|
|
447
|
+
/**
|
|
448
|
+
* For a proposal the application executes (`ExecuteInApplication`), until when its report of the
|
|
449
|
+
* latest hand-off is due: while it is `awaiting-application` the moment it becomes
|
|
450
|
+
* `execution-unknown`, afterwards the sign that an approver resolves it with `hand-to-application`
|
|
451
|
+
* instead of `re-execute`. `null` for a proposal never handed to the application; missing on older
|
|
452
|
+
* servers.
|
|
453
|
+
*/
|
|
454
|
+
executionReportDueAt?: string | null;
|
|
442
455
|
/**
|
|
443
456
|
* The consultation that proposed it, when another assistant consulted the agent for
|
|
444
|
-
* `initiatorActorId`;
|
|
457
|
+
* `initiatorActorId`; `consultationRoute` says who decides it and whose rights execute it.
|
|
445
458
|
*/
|
|
446
459
|
consultationId?: string | null;
|
|
460
|
+
/**
|
|
461
|
+
* How a consultation's proposal is decided and whose rights execute it: `asker-decides`, the person
|
|
462
|
+
* who asked (`initiatorActorId`) decides it in their own chat, nobody decides it here;
|
|
463
|
+
* `subject-asker-rights`, the subject's approvers decide it and it runs with the asker's rights;
|
|
464
|
+
* `subject-agent-rights`, the subject's approvers other than the asker decide it and it runs with the
|
|
465
|
+
* agent's own rights (`grantSource`). `null` for a run's proposal; missing on older servers.
|
|
466
|
+
*/
|
|
467
|
+
consultationRoute?: NhAssistantConsultationRoute | null;
|
|
447
468
|
/** The caller's own feedback on the proposal; `null` when they gave none. Missing on older servers. */
|
|
448
469
|
feedback?: AgentProposalFeedback | null;
|
|
449
470
|
/**
|
|
@@ -588,6 +609,11 @@ interface AgentConsultation {
|
|
|
588
609
|
proposalCount: number;
|
|
589
610
|
createdAt: string;
|
|
590
611
|
endedAt: string | null;
|
|
612
|
+
/**
|
|
613
|
+
* The proposals the consultation left per route, such as `{ 'asker-decides': 1 }`; routes without
|
|
614
|
+
* proposals are left out. Missing on older servers.
|
|
615
|
+
*/
|
|
616
|
+
proposalsByRoute?: Partial<Record<NhAssistantConsultationRoute, number>>;
|
|
591
617
|
}
|
|
592
618
|
interface AgentConsultationList {
|
|
593
619
|
items: AgentConsultation[];
|
|
@@ -693,8 +719,12 @@ interface AgentArtifact {
|
|
|
693
719
|
}
|
|
694
720
|
/** `resume` continues the run from its last checkpoint; `restart` starts a new run in the thread. */
|
|
695
721
|
type AgentRunRetryMode = 'resume' | 'restart';
|
|
696
|
-
/**
|
|
697
|
-
|
|
722
|
+
/**
|
|
723
|
+
* `re-execute` runs the proposal again; `hand-to-application` hands a proposal the application
|
|
724
|
+
* executes (one with `executionReportDueAt`) to the application again; `mark-resolved` confirms its
|
|
725
|
+
* outcome without running it.
|
|
726
|
+
*/
|
|
727
|
+
type AgentExecutionResolution = 're-execute' | 'hand-to-application' | 'mark-resolved';
|
|
698
728
|
/** A board of a group of agents the caller may open (`getBoards`). */
|
|
699
729
|
interface AgentBoardSummary {
|
|
700
730
|
/** The group id, such as `project-management`. */
|
|
@@ -824,6 +854,20 @@ interface AgentUploads {
|
|
|
824
854
|
maxFileBytes: number;
|
|
825
855
|
/** The most files of one message. */
|
|
826
856
|
maxFiles: number;
|
|
857
|
+
/**
|
|
858
|
+
* The file name extensions the application mapped to one of `acceptedMediaTypes`
|
|
859
|
+
* (`NhAssistantUploadOptions.MapExtension` on the server). A file without a usable type takes the
|
|
860
|
+
* type of its extension from them before the platform's table, as on the server, and the file picker
|
|
861
|
+
* offers them. Empty, or missing from an older server, when the application maps none.
|
|
862
|
+
*/
|
|
863
|
+
mappedExtensions?: AgentUploadExtension[] | null;
|
|
864
|
+
}
|
|
865
|
+
/** A file name extension the application mapped to an accepted media type for uploads. */
|
|
866
|
+
interface AgentUploadExtension {
|
|
867
|
+
/** The extension in lowercase with its dot, for example `.dwg`. */
|
|
868
|
+
extension: string;
|
|
869
|
+
/** The accepted media type it names, for example `application/acad`. */
|
|
870
|
+
mediaType: string;
|
|
827
871
|
}
|
|
828
872
|
/**
|
|
829
873
|
* A file the application keeps, as the upload endpoint returns it and a message names it in
|
|
@@ -918,7 +962,8 @@ interface ConversationMember {
|
|
|
918
962
|
}
|
|
919
963
|
interface Message {
|
|
920
964
|
id: string;
|
|
921
|
-
|
|
965
|
+
/** `application` for a message the application posted into the conversation. */
|
|
966
|
+
role: 'user' | 'assistant' | 'tool' | 'application';
|
|
922
967
|
createdAt: string;
|
|
923
968
|
parts: MessagePart[];
|
|
924
969
|
/** Position in the conversation; missing on optimistic messages and old servers. */
|
|
@@ -927,15 +972,40 @@ interface Message {
|
|
|
927
972
|
authorActorId?: string | null;
|
|
928
973
|
/**
|
|
929
974
|
* 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
|
|
975
|
+
* summary an agent's rules wrote instead of the model, `application` for a message the
|
|
976
|
+
* application posted; missing on old servers.
|
|
931
977
|
*/
|
|
932
978
|
authorKind?: MessageAuthorKind | null;
|
|
979
|
+
/** The title, sender, link and trusted flag of a message the application posted; missing for other messages. */
|
|
980
|
+
application?: ApplicationMessageDetails | null;
|
|
933
981
|
}
|
|
934
982
|
/**
|
|
935
983
|
* `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
|
|
984
|
+
* `rule` for an assistant message the agent's rules wrote without a model; `application` for a
|
|
985
|
+
* message the application posted into the conversation.
|
|
937
986
|
*/
|
|
938
|
-
type MessageAuthorKind = 'person' | 'trigger' | 'rule';
|
|
987
|
+
type MessageAuthorKind = 'person' | 'trigger' | 'rule' | 'application';
|
|
988
|
+
/**
|
|
989
|
+
* What the application said about a message it posted, besides its text: an optional heading, who in
|
|
990
|
+
* the application posted it, where people continue and whether the assistant follows it. The text is
|
|
991
|
+
* the message's `text` part.
|
|
992
|
+
*/
|
|
993
|
+
interface ApplicationMessageDetails {
|
|
994
|
+
title: string | null;
|
|
995
|
+
senderName: string | null;
|
|
996
|
+
link: ApplicationMessageLink | null;
|
|
997
|
+
/**
|
|
998
|
+
* The assistant follows the message as the application's instruction (`Trusted` on the server);
|
|
999
|
+
* `false` for a message the assistant reads as information. The thread labels a trusted message.
|
|
1000
|
+
*/
|
|
1001
|
+
trusted: boolean;
|
|
1002
|
+
}
|
|
1003
|
+
/** A path within the application, which the chat opens through the router, or an `https` address. */
|
|
1004
|
+
interface ApplicationMessageLink {
|
|
1005
|
+
url: string;
|
|
1006
|
+
/** The text of the link; the chat shows its own text without one. */
|
|
1007
|
+
label: string | null;
|
|
1008
|
+
}
|
|
939
1009
|
type MessagePart = TextPart | ToolCallPart | ApprovalPart | ConnectionRequiredPart | FilePart;
|
|
940
1010
|
/**
|
|
941
1011
|
* A file a person attached to a message: its name, media type and size in bytes, never its content.
|
|
@@ -995,9 +1065,10 @@ interface ToolCallPart {
|
|
|
995
1065
|
/**
|
|
996
1066
|
* Chat approvals are `pending`, `approved`, `rejected` or `expired`; proposals of agents that run on
|
|
997
1067
|
* their own continue through execution (`executing`, `executed`, `execution-failed`,
|
|
998
|
-
* `execution-unknown`, `resolved
|
|
1068
|
+
* `execution-unknown`, `resolved`, and `awaiting-application` while the application executes the
|
|
1069
|
+
* proposal of a tool it declared with `ExecuteInApplication`) or end as `withdrawn`, `stale` or `shadow`.
|
|
999
1070
|
*/
|
|
1000
|
-
type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
|
|
1071
|
+
type ApprovalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'awaiting-application' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
|
|
1001
1072
|
interface ApprovalPresentationField {
|
|
1002
1073
|
label: string;
|
|
1003
1074
|
value: string;
|
|
@@ -1034,6 +1105,41 @@ interface ApprovalPart {
|
|
|
1034
1105
|
rationale?: string;
|
|
1035
1106
|
/** The newer proposal for the same objects that replaced this withdrawn one. Only sent then. */
|
|
1036
1107
|
supersededByApprovalId?: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* The consultation that proposed it, when the conversation's assistant consulted another agent and
|
|
1110
|
+
* the person who asked decides that agent's proposal here (`asker-decides`). Approving executes it
|
|
1111
|
+
* in the person's own request with their own rights. Missing for the conversation's own proposals.
|
|
1112
|
+
*/
|
|
1113
|
+
consultation?: ApprovalConsultation | null;
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* How a consulted agent's proposal is decided and whose rights execute it: `asker-decides`, the person
|
|
1117
|
+
* who asked decides it in their own chat and it runs with their own rights; `subject-agent-rights`, the
|
|
1118
|
+
* subject's approvers other than the asker decide it and it runs with the agent's own rights;
|
|
1119
|
+
* `subject-asker-rights`, the subject's approvers decide it and it runs with the asker's rights.
|
|
1120
|
+
*/
|
|
1121
|
+
type NhAssistantConsultationRoute = 'asker-decides' | 'subject-agent-rights' | 'subject-asker-rights';
|
|
1122
|
+
/** The routes at the subject a person may leave a consulted agent's proposal for (`decision: 'leave'`). */
|
|
1123
|
+
type NhAssistantConsultationLeaveRoute = Exclude<NhAssistantConsultationRoute, 'asker-decides'>;
|
|
1124
|
+
/** Where a proposal the person who asked decides in their own conversation comes from. */
|
|
1125
|
+
interface ApprovalConsultation {
|
|
1126
|
+
/** The consultation record in the consulted agent's thread. */
|
|
1127
|
+
consultationId: string;
|
|
1128
|
+
/** The consulted agent that proposed it. */
|
|
1129
|
+
agentId: string;
|
|
1130
|
+
subjectType: string;
|
|
1131
|
+
subjectId: string;
|
|
1132
|
+
/** The subject's name as the consulted agent's thread knows it; `null` when unknown. */
|
|
1133
|
+
subjectDisplayName: string | null;
|
|
1134
|
+
/**
|
|
1135
|
+
* The route at the subject the person may leave the pending proposal for with the decision `leave`;
|
|
1136
|
+
* `null` when they can only approve or reject it.
|
|
1137
|
+
*/
|
|
1138
|
+
leaveRoute: NhAssistantConsultationLeaveRoute | null;
|
|
1139
|
+
/** The consulted agent's answer, bounded, when the consultation's classification allows a preview. */
|
|
1140
|
+
answer: string | null;
|
|
1141
|
+
/** The proposal that waits at the subject since the person left this one for its approvers. */
|
|
1142
|
+
movedToApprovalId: string | null;
|
|
1037
1143
|
}
|
|
1038
1144
|
/** Response of `GET conversations?page=&itemsPerPage=`. */
|
|
1039
1145
|
interface ConversationPage {
|
|
@@ -1077,7 +1183,11 @@ interface SendMessageRequest {
|
|
|
1077
1183
|
/** Files the person attaches, as `POST conversations/{id}/files` returned them. */
|
|
1078
1184
|
files?: FileReference[];
|
|
1079
1185
|
}
|
|
1080
|
-
|
|
1186
|
+
/**
|
|
1187
|
+
* `approve` or `reject`; for a consulted agent's proposal with a `consultation.leaveRoute` also
|
|
1188
|
+
* `leave`, which leaves it for the subject's approvers instead of deciding it.
|
|
1189
|
+
*/
|
|
1190
|
+
type ApprovalDecision = 'approve' | 'reject' | 'leave';
|
|
1081
1191
|
/** Body of `POST conversations/{id}/approvals/{approvalId}/decide`. */
|
|
1082
1192
|
interface DecideApprovalRequest {
|
|
1083
1193
|
decision: ApprovalDecision;
|
|
@@ -1272,6 +1382,346 @@ interface LiveConversationEvent {
|
|
|
1272
1382
|
data: unknown;
|
|
1273
1383
|
}
|
|
1274
1384
|
|
|
1385
|
+
/**
|
|
1386
|
+
* Agent packages (S7-2): several agents with their configuration as data in one versioned package,
|
|
1387
|
+
* exported with `POST admin/agent-packages/export`, previewed and imported on another host with
|
|
1388
|
+
* `POST admin/agent-packages/preview` and `.../import` through the same validators as saving, and
|
|
1389
|
+
* parts the package locks against local changes until an administrator unlinks them with
|
|
1390
|
+
* `POST admin/agents/{id}/package/unlink`. The names are those of the server's JSON (camelCase).
|
|
1391
|
+
*/
|
|
1392
|
+
|
|
1393
|
+
/** The `format` of every agent package. */
|
|
1394
|
+
declare const NH_ASSISTANT_AGENT_PACKAGE_FORMAT = "newheap.assistant.agent-package";
|
|
1395
|
+
/** The format version this library reads and writes; a newer one is refused. */
|
|
1396
|
+
declare const NH_ASSISTANT_AGENT_PACKAGE_FORMAT_VERSION = 1;
|
|
1397
|
+
/** The largest package in bytes of its UTF-8 JSON: 1 MB (`assistant-package-too-large` above). */
|
|
1398
|
+
declare const NH_ASSISTANT_AGENT_PACKAGE_MAX_BYTES = 1048576;
|
|
1399
|
+
/** The most agents of one package. */
|
|
1400
|
+
declare const NH_ASSISTANT_AGENT_PACKAGE_MAX_AGENTS = 20;
|
|
1401
|
+
/**
|
|
1402
|
+
* The kinds of part of an agent in a package. A part key is `agent`, `runSettings`, or
|
|
1403
|
+
* `{kind}:{id}` for a skill or trigger id, the subject type of a consultation or hand-off and the
|
|
1404
|
+
* name of an entry of agent metadata, such as `skill:triage`.
|
|
1405
|
+
*/
|
|
1406
|
+
type AgentPackagePartKind = 'agent' | 'runSettings' | 'skill' | 'trigger' | 'consultation' | 'handOff' | 'metadata';
|
|
1407
|
+
/** The lock of a whole part, instead of a list of its fields. */
|
|
1408
|
+
declare const NH_ASSISTANT_PACKAGE_LOCK_ALL = "*";
|
|
1409
|
+
/**
|
|
1410
|
+
* The fields a package may lock per part kind (`NhAssistantPackageLockFields`). A save that changes a
|
|
1411
|
+
* locked field is refused with the field error `{field}: locked`, named as here; `worksOn`,
|
|
1412
|
+
* `dailyBudget`, `files` and `limits` each stand for the fields the forms show together. An agent in
|
|
1413
|
+
* code carries only the first six fields of `agent`.
|
|
1414
|
+
*/
|
|
1415
|
+
declare const NH_ASSISTANT_PACKAGE_LOCK_FIELDS: Readonly<Record<AgentPackagePartKind, readonly string[]>>;
|
|
1416
|
+
/**
|
|
1417
|
+
* A versioned agent package: several agents with what belongs to each of them as data. It never holds
|
|
1418
|
+
* history, candidates, runs, feedback, run state, shadow overrides, MCP server definitions, the
|
|
1419
|
+
* technical account or secrets; references travel as names. The server reads it strictly: an unknown
|
|
1420
|
+
* property, a missing required one, another `format` or a newer `formatVersion` is refused with
|
|
1421
|
+
* `assistant-package-format-unsupported`.
|
|
1422
|
+
*/
|
|
1423
|
+
interface AgentPackage {
|
|
1424
|
+
/** Always `newheap.assistant.agent-package`. */
|
|
1425
|
+
format: string;
|
|
1426
|
+
formatVersion: number;
|
|
1427
|
+
package: AgentPackageInfo;
|
|
1428
|
+
/** 1 to 20 agents, each id once. */
|
|
1429
|
+
agents: PackageAgent[];
|
|
1430
|
+
}
|
|
1431
|
+
/** The identity of an agent package. */
|
|
1432
|
+
interface AgentPackageInfo {
|
|
1433
|
+
/** A dash-case id, at most 128 characters; by default the first agent's id. */
|
|
1434
|
+
id: string;
|
|
1435
|
+
/** 1 or higher; an upgrade of a linked package has a higher version. */
|
|
1436
|
+
version: number;
|
|
1437
|
+
/** What the package is for, at most 500 characters. */
|
|
1438
|
+
description?: string | null;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* One agent in a package: an agent created in the administration travels whole, an agent in code as
|
|
1442
|
+
* an overlay of what data may change on it, which the import applies to the same agent in code.
|
|
1443
|
+
*/
|
|
1444
|
+
interface PackageAgent {
|
|
1445
|
+
/** The agent's id, kept on import. */
|
|
1446
|
+
id: string;
|
|
1447
|
+
/** `admin` for an agent created in the administration, `code` for an overlay of an agent in code. */
|
|
1448
|
+
source: 'admin' | 'code';
|
|
1449
|
+
/** The definition of an agent created here, or the overrides of an agent in code (part `agent`). */
|
|
1450
|
+
definition?: PackageAgentDefinition | null;
|
|
1451
|
+
/** The run settings of an agent created here, without the technical account (part `runSettings`). */
|
|
1452
|
+
runSettings?: PackageRunSettings | null;
|
|
1453
|
+
skills?: PackageSkill[] | null;
|
|
1454
|
+
triggers?: PackageTrigger[] | null;
|
|
1455
|
+
consultations?: PackageConsultation[] | null;
|
|
1456
|
+
/** The hand-offs defined as data that the agent accepts. */
|
|
1457
|
+
handOffs?: PackageHandOff[] | null;
|
|
1458
|
+
/** Its values of entries of agent metadata by name; for an agent in code only overrides of editable entries. */
|
|
1459
|
+
metadata?: Record<string, unknown> | null;
|
|
1460
|
+
/** The groups of agents it is in, by id. */
|
|
1461
|
+
groups?: string[] | null;
|
|
1462
|
+
/** The locked fields per part key, each `['*']` or fields of `NH_ASSISTANT_PACKAGE_LOCK_FIELDS`. */
|
|
1463
|
+
locks?: Record<string, string[]> | null;
|
|
1464
|
+
/** The SHA-256 of each part's canonical JSON by part key, lowercase hex; optional for a package a tool writes. */
|
|
1465
|
+
hashes?: Record<string, string> | null;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* The definition of an agent. For an agent in code only `displayName`, `description`, `instructions`,
|
|
1469
|
+
* `toolSelectors`, `requiredPolicy` and `autonomy` apply; a missing value keeps the code's.
|
|
1470
|
+
*/
|
|
1471
|
+
interface PackageAgentDefinition {
|
|
1472
|
+
displayName?: string | null;
|
|
1473
|
+
description?: string | null;
|
|
1474
|
+
instructions?: string | null;
|
|
1475
|
+
instructionsAsset?: InstructionAssetReference | null;
|
|
1476
|
+
toolSelectors?: string[] | null;
|
|
1477
|
+
requiredPolicy?: string | null;
|
|
1478
|
+
autonomy?: AssistantAutonomy | null;
|
|
1479
|
+
offeredInChat?: boolean | null;
|
|
1480
|
+
worksOnSubjectTypes?: string[] | null;
|
|
1481
|
+
worksOnAllSubjects?: boolean | null;
|
|
1482
|
+
worksOnApplication?: boolean | null;
|
|
1483
|
+
perDivision?: boolean | null;
|
|
1484
|
+
runPolicy?: string | null;
|
|
1485
|
+
viewPolicy?: string | null;
|
|
1486
|
+
profile?: string | null;
|
|
1487
|
+
dataClassification?: AssistantDataClassification | null;
|
|
1488
|
+
/** For a new agent: it starts off. */
|
|
1489
|
+
startsOff?: boolean | null;
|
|
1490
|
+
/** For a new agent: it starts in shadow. */
|
|
1491
|
+
startsInShadow?: boolean | null;
|
|
1492
|
+
/** The live agent a data shadow variant belongs to: another agent of the package or one the host has. */
|
|
1493
|
+
shadowOf?: string | null;
|
|
1494
|
+
}
|
|
1495
|
+
/** The run settings of an agent created in the administration; the technical account never travels. */
|
|
1496
|
+
interface PackageRunSettings {
|
|
1497
|
+
accountability: AgentAccountability;
|
|
1498
|
+
delegateFromInitiator?: boolean;
|
|
1499
|
+
allowGatewayReads?: boolean;
|
|
1500
|
+
elevatedReads?: AgentElevatedReads | null;
|
|
1501
|
+
approvalPolicy?: string | null;
|
|
1502
|
+
retryCount?: number | null;
|
|
1503
|
+
dailyToolCalls?: number | null;
|
|
1504
|
+
dailyTokens?: number | null;
|
|
1505
|
+
maxConcurrentRuns?: number | null;
|
|
1506
|
+
maxRunsPerSubjectPerDay?: number | null;
|
|
1507
|
+
maxTokensPerRun?: number | null;
|
|
1508
|
+
triageProfile?: string | null;
|
|
1509
|
+
ruleHandler?: string | null;
|
|
1510
|
+
acceptsFiles?: boolean;
|
|
1511
|
+
maxFileBytes?: number | null;
|
|
1512
|
+
maxFilePages?: number | null;
|
|
1513
|
+
maxFilesPerTurn?: number | null;
|
|
1514
|
+
maxFileTokensPerTurn?: number | null;
|
|
1515
|
+
}
|
|
1516
|
+
/** The live version of a data skill. */
|
|
1517
|
+
interface PackageSkill {
|
|
1518
|
+
id: string;
|
|
1519
|
+
description: string;
|
|
1520
|
+
instructions?: string | null;
|
|
1521
|
+
instructionsAsset?: InstructionAssetReference | null;
|
|
1522
|
+
tools?: string[] | null;
|
|
1523
|
+
profile?: string | null;
|
|
1524
|
+
ruleHandler?: string | null;
|
|
1525
|
+
maxTokensPerRun?: number | null;
|
|
1526
|
+
dailyToolCalls?: number | null;
|
|
1527
|
+
dailyTokens?: number | null;
|
|
1528
|
+
approvalPolicy?: string | null;
|
|
1529
|
+
dataClassification?: AssistantDataClassification | null;
|
|
1530
|
+
acceptsFiles?: boolean;
|
|
1531
|
+
maxFileBytes?: number | null;
|
|
1532
|
+
maxFilePages?: number | null;
|
|
1533
|
+
maxFilesPerTurn?: number | null;
|
|
1534
|
+
maxFileTokensPerTurn?: number | null;
|
|
1535
|
+
/** For a new skill: it starts off. */
|
|
1536
|
+
startsOff?: boolean | null;
|
|
1537
|
+
}
|
|
1538
|
+
/** The live version of a data trigger; its id stays on import. */
|
|
1539
|
+
interface PackageTrigger {
|
|
1540
|
+
id: string;
|
|
1541
|
+
source: 'event' | 'schedule';
|
|
1542
|
+
skill?: string | null;
|
|
1543
|
+
event?: string | null;
|
|
1544
|
+
filters?: string[] | null;
|
|
1545
|
+
cron?: string | null;
|
|
1546
|
+
timeZone?: string | null;
|
|
1547
|
+
subjectSet?: string | null;
|
|
1548
|
+
message?: string | null;
|
|
1549
|
+
conflict?: TriggerConflict | null;
|
|
1550
|
+
debounceSeconds?: number | null;
|
|
1551
|
+
}
|
|
1552
|
+
/** A consultation defined as data. */
|
|
1553
|
+
interface PackageConsultation {
|
|
1554
|
+
subjectType: string;
|
|
1555
|
+
description: string;
|
|
1556
|
+
instructions?: string | null;
|
|
1557
|
+
minimumRole?: ConsultationSubjectRole | null;
|
|
1558
|
+
askerPolicy?: string | null;
|
|
1559
|
+
routes?: NhAssistantConsultationRoute[] | null;
|
|
1560
|
+
proposalRole?: ConsultationSubjectRole | null;
|
|
1561
|
+
proposalPolicy?: string | null;
|
|
1562
|
+
toolSelectors?: string[] | null;
|
|
1563
|
+
maxToolCalls?: number | null;
|
|
1564
|
+
timeoutSeconds?: number | null;
|
|
1565
|
+
maxAnswerChars?: number | null;
|
|
1566
|
+
maxHistoryMessages?: number | null;
|
|
1567
|
+
allowRequests?: boolean;
|
|
1568
|
+
exposeToMcp?: boolean;
|
|
1569
|
+
dataClassification?: AssistantDataClassification | null;
|
|
1570
|
+
/** For a new consultation: it starts off. */
|
|
1571
|
+
startsOff?: boolean | null;
|
|
1572
|
+
}
|
|
1573
|
+
/** A hand-off defined as data that the agent accepts; a source may be another agent of the package. */
|
|
1574
|
+
interface PackageHandOff {
|
|
1575
|
+
subjectType: string;
|
|
1576
|
+
sources: string[];
|
|
1577
|
+
description?: string | null;
|
|
1578
|
+
notifySource?: boolean;
|
|
1579
|
+
maxPerSubjectPerDay?: number | null;
|
|
1580
|
+
}
|
|
1581
|
+
/** How an export builds its package. */
|
|
1582
|
+
interface AgentPackageExportOptions {
|
|
1583
|
+
/** By default the id of the package the first agent is linked to, otherwise the first agent's id. */
|
|
1584
|
+
packageId?: string | null;
|
|
1585
|
+
/** By default the next version after the linked package's, otherwise 1. */
|
|
1586
|
+
version?: number | null;
|
|
1587
|
+
/** At most 500 characters. */
|
|
1588
|
+
description?: string | null;
|
|
1589
|
+
/** Per agent id, the locked fields per part key, each `['*']` or lockable fields of the part's kind. */
|
|
1590
|
+
locks?: Record<string, Record<string, string[]>> | null;
|
|
1591
|
+
}
|
|
1592
|
+
/** Body of `POST admin/agent-packages/export`. */
|
|
1593
|
+
interface AgentPackageExportRequest {
|
|
1594
|
+
/** The agents to export, 1 to 20; exactly these. */
|
|
1595
|
+
agentIds: string[];
|
|
1596
|
+
options?: AgentPackageExportOptions | null;
|
|
1597
|
+
}
|
|
1598
|
+
/** What a reference to an agent outside the exported selection is. */
|
|
1599
|
+
type AgentPackageWarningCode = 'hand-off-source' | 'shadow-of' | 'consultation-asker' | 'shadow-variant' | (string & {});
|
|
1600
|
+
/** A reference of an exported agent to an agent outside the selection, which must exist where the package is imported. */
|
|
1601
|
+
interface AgentPackageWarning {
|
|
1602
|
+
/** The exported agent. */
|
|
1603
|
+
agentId: string;
|
|
1604
|
+
/** The part that makes the reference, such as `handOff:project`. */
|
|
1605
|
+
part: string;
|
|
1606
|
+
code: AgentPackageWarningCode;
|
|
1607
|
+
/** The agent outside the selection. */
|
|
1608
|
+
referencedAgentId: string;
|
|
1609
|
+
}
|
|
1610
|
+
/**
|
|
1611
|
+
* An exported package as `exportAgentPackage` answers it: the package, its JSON exactly as the server
|
|
1612
|
+
* wrote it for the download, and the references to agents outside the selection.
|
|
1613
|
+
*/
|
|
1614
|
+
interface AgentPackageExport {
|
|
1615
|
+
package: AgentPackage;
|
|
1616
|
+
/** The JSON of the download, `agent-package-{packageId}.json`. */
|
|
1617
|
+
json: string;
|
|
1618
|
+
/** Every reference to an agent outside the selection (header `X-NewHeap-Package-Warnings`). */
|
|
1619
|
+
warnings: AgentPackageWarning[];
|
|
1620
|
+
}
|
|
1621
|
+
/** A part of an agent; without `part` every part of the agent. */
|
|
1622
|
+
interface PackagePartReference {
|
|
1623
|
+
agentId: string;
|
|
1624
|
+
part?: string | null;
|
|
1625
|
+
}
|
|
1626
|
+
/** How an import applies a package. */
|
|
1627
|
+
interface AgentPackageImportOptions {
|
|
1628
|
+
/**
|
|
1629
|
+
* Per agent id, the technical account on this host for run settings that answer to one; without it
|
|
1630
|
+
* such run settings are refused with `serviceAccountActorId: required`.
|
|
1631
|
+
*/
|
|
1632
|
+
serviceAccounts?: Record<string, string> | null;
|
|
1633
|
+
/**
|
|
1634
|
+
* `live` (default): a changed skill or trigger becomes its new live version; `shadow`: its candidate
|
|
1635
|
+
* next to the live version. New skills and triggers start in shadow either way.
|
|
1636
|
+
*/
|
|
1637
|
+
apply?: SkillApplyMode | null;
|
|
1638
|
+
/** Unlinked parts that take the package's version again instead of staying `kept-local`. */
|
|
1639
|
+
relink?: PackagePartReference[] | null;
|
|
1640
|
+
}
|
|
1641
|
+
/** Body of `POST admin/agent-packages/preview` and `POST admin/agent-packages/import`. */
|
|
1642
|
+
interface AgentPackageImportRequest {
|
|
1643
|
+
/** The package as JSON; the server reads it strictly. */
|
|
1644
|
+
package: AgentPackage;
|
|
1645
|
+
options?: AgentPackageImportOptions | null;
|
|
1646
|
+
}
|
|
1647
|
+
/** What an import does or did with one part. */
|
|
1648
|
+
type AgentPackagePartOutcome = 'created' | 'changed' | 'unchanged' | 'kept-local' | 'left-behind' | 'refused';
|
|
1649
|
+
/** The outcome of one part in a preview or an import. */
|
|
1650
|
+
interface AgentPackagePart {
|
|
1651
|
+
agentId: string;
|
|
1652
|
+
/** The part key, such as `agent` or `skill:triage`. */
|
|
1653
|
+
part: string;
|
|
1654
|
+
outcome: AgentPackagePartOutcome;
|
|
1655
|
+
/** The host's part changed after the last import: the import overwrites its unlocked fields. */
|
|
1656
|
+
changedLocally: boolean;
|
|
1657
|
+
/** For a refused part without field errors: its failure code, such as `assistant-agent-exists`. */
|
|
1658
|
+
code: string | null;
|
|
1659
|
+
/** For a refused part: the field errors of the save validators, by field. */
|
|
1660
|
+
errors: Record<string, string[]> | null;
|
|
1661
|
+
/** The fields the package locks on the part, `['*']` for all. */
|
|
1662
|
+
lockedFields: string[];
|
|
1663
|
+
/** For a skill or trigger an import makes a candidate of (`apply: shadow`): the candidate's version. */
|
|
1664
|
+
candidateVersion?: number | null;
|
|
1665
|
+
}
|
|
1666
|
+
/** What an import would do: the parts per agent in dependency order, left-behind agents and parts last. */
|
|
1667
|
+
interface AgentPackagePreview {
|
|
1668
|
+
packageId: string;
|
|
1669
|
+
packageVersion: number;
|
|
1670
|
+
/** The version of the package the host has; `null` for a package it does not have. */
|
|
1671
|
+
installedVersion: number | null;
|
|
1672
|
+
/** No part is refused. */
|
|
1673
|
+
importable: boolean;
|
|
1674
|
+
parts: AgentPackagePart[];
|
|
1675
|
+
}
|
|
1676
|
+
/** What an import did: every part's outcome, as the preview showed it. */
|
|
1677
|
+
interface AgentPackageImport {
|
|
1678
|
+
packageId: string;
|
|
1679
|
+
packageVersion: number;
|
|
1680
|
+
/** The SHA-256 of the package's canonical JSON, lowercase hex, as audited. */
|
|
1681
|
+
hash: string;
|
|
1682
|
+
parts: AgentPackagePart[];
|
|
1683
|
+
}
|
|
1684
|
+
/** Body of `POST admin/agents/{id}/package/unlink`. */
|
|
1685
|
+
interface AgentPackageUnlinkRequest {
|
|
1686
|
+
/** The part key to unlink; `null` or missing unlinks the whole agent. */
|
|
1687
|
+
part?: string | null;
|
|
1688
|
+
/** At most 500 characters. */
|
|
1689
|
+
reason?: string | null;
|
|
1690
|
+
}
|
|
1691
|
+
/** The parts an unlink took out of their package. */
|
|
1692
|
+
interface AgentPackageUnlink {
|
|
1693
|
+
agentId: string;
|
|
1694
|
+
packageId: string;
|
|
1695
|
+
/** The part keys that are now local. */
|
|
1696
|
+
parts: string[];
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* The package link of one part, as the administration shows it next to the part: the package it came
|
|
1700
|
+
* from and the fields that stay read-only.
|
|
1701
|
+
*/
|
|
1702
|
+
interface PackagePartLink {
|
|
1703
|
+
part: string;
|
|
1704
|
+
packageId: string;
|
|
1705
|
+
/** The version of the package the part was imported from. */
|
|
1706
|
+
packageVersion: number;
|
|
1707
|
+
/** The locked fields, `['*']` for all; empty when the package locks none. */
|
|
1708
|
+
lockedFields: string[];
|
|
1709
|
+
/** The SHA-256 of the part's canonical JSON at import. */
|
|
1710
|
+
hash: string;
|
|
1711
|
+
/** The part changed after its import; the next upgrade overwrites its unlocked fields. */
|
|
1712
|
+
changedLocally: boolean;
|
|
1713
|
+
linkedAt: string;
|
|
1714
|
+
linkedBy: string;
|
|
1715
|
+
}
|
|
1716
|
+
/** The package an agent belongs to, with the link of every part that is still linked. */
|
|
1717
|
+
interface AgentPackageLink {
|
|
1718
|
+
packageId: string;
|
|
1719
|
+
/** The version of the package the host has. */
|
|
1720
|
+
packageVersion: number;
|
|
1721
|
+
/** The linked parts, ordered by part key. */
|
|
1722
|
+
parts: PackagePartLink[];
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1275
1725
|
type AssistantStyle = 'default' | 'direct' | 'personal' | 'detailed';
|
|
1276
1726
|
type AssistantAddressForm = 'informal' | 'formal';
|
|
1277
1727
|
type AssistantResponseLength = 'short' | 'normal' | 'long';
|
|
@@ -1393,6 +1843,20 @@ interface AdminAgentInput {
|
|
|
1393
1843
|
* update.
|
|
1394
1844
|
*/
|
|
1395
1845
|
startsOff?: boolean;
|
|
1846
|
+
/**
|
|
1847
|
+
* On create only: the new agent starts in shadow, so once it has run settings, also when they are
|
|
1848
|
+
* saved right after, its runs work in its shadow threads, where nobody is notified and nothing
|
|
1849
|
+
* executes, until someone puts it live with `setAgentShadow`. Omitted starts it live; ignored on
|
|
1850
|
+
* update.
|
|
1851
|
+
*/
|
|
1852
|
+
startsInShadow?: boolean;
|
|
1853
|
+
/**
|
|
1854
|
+
* For an agent created in the administration: values of the run catalog's `agentMetadata` entries
|
|
1855
|
+
* by name, saved with the definition's version; `null` removes one, entries left out keep theirs.
|
|
1856
|
+
* Field errors are `metadata.<name>`. An agent in code changes its editable entries one by one with
|
|
1857
|
+
* `saveAgentMetadata`.
|
|
1858
|
+
*/
|
|
1859
|
+
metadata?: Record<string, unknown>;
|
|
1396
1860
|
/**
|
|
1397
1861
|
* For an agent created in the administration: the model profile of its model calls, one of the run
|
|
1398
1862
|
* catalog's `profiles` (`profile: not-found` otherwise). Omitted keeps it on update; a new agent uses
|
|
@@ -1406,6 +1870,66 @@ interface AdminAgentInput {
|
|
|
1406
1870
|
* Agents in code take it from their code.
|
|
1407
1871
|
*/
|
|
1408
1872
|
dataClassification?: AssistantDataClassification | null;
|
|
1873
|
+
/**
|
|
1874
|
+
* On create only: the live agent the new agent is a data shadow variant of, within the ceiling in
|
|
1875
|
+
* code (`UseShadowVariantsAsData`). The variant receives every trigger of the live agent once it has
|
|
1876
|
+
* run settings, always works in shadow, is never offered in the chat and never changes its live
|
|
1877
|
+
* agent. Outside the ceiling it fails with `assistant-shadow-variants-not-allowed`, beyond its number
|
|
1878
|
+
* of variants with `assistant-configuration-limit`, and with the field errors `shadowOf: not-found`
|
|
1879
|
+
* and `shadowOf: invalid` for a live agent without a run configuration or one that is no live agent.
|
|
1880
|
+
* Ignored on update.
|
|
1881
|
+
*/
|
|
1882
|
+
shadowOf?: string | null;
|
|
1883
|
+
/**
|
|
1884
|
+
* For an agent created in the administration, when the run catalog reports `instructionAssets`:
|
|
1885
|
+
* the application's asset its instructions come from instead of `instructions`, which is then
|
|
1886
|
+
* empty. The save checks it with the application (`instructionsAsset: not-found`,
|
|
1887
|
+
* `instructionsAsset.hash: invalid`). Omitted or `null` keeps or makes the instructions text.
|
|
1888
|
+
*/
|
|
1889
|
+
instructionsAsset?: InstructionAssetReference | null;
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* The asset of the application a skill version or an agent created in the administration takes its
|
|
1893
|
+
* instructions from: its id, exact version and the SHA-256 of its content. A new version of the asset
|
|
1894
|
+
* takes effect only when an administrator saves it as the next version.
|
|
1895
|
+
*/
|
|
1896
|
+
interface InstructionAssetReference {
|
|
1897
|
+
assetId: string;
|
|
1898
|
+
version: number;
|
|
1899
|
+
/** The SHA-256 of the asset's content, lowercase hex. */
|
|
1900
|
+
hash: string;
|
|
1901
|
+
}
|
|
1902
|
+
/**
|
|
1903
|
+
* Why instructions from an asset are not available: the application no longer has a source, the asset
|
|
1904
|
+
* is missing, its text changed since it was saved, it cannot be instructions, or the source failed.
|
|
1905
|
+
*/
|
|
1906
|
+
type InstructionAssetProblem = 'no-asset-source' | 'asset-missing' | 'asset-changed' | 'asset-invalid' | 'asset-unavailable';
|
|
1907
|
+
/** One of the application's assets, without its content (`GET admin/instruction-assets`). */
|
|
1908
|
+
interface InstructionAssetSummary {
|
|
1909
|
+
assetId: string;
|
|
1910
|
+
version: number;
|
|
1911
|
+
/** The hash its manifest states; a save checks it against the content. */
|
|
1912
|
+
hash: string;
|
|
1913
|
+
/** The asset that replaces it, when the application deprecated it. */
|
|
1914
|
+
replacedByAssetId?: string | null;
|
|
1915
|
+
deprecatedAt?: string | null;
|
|
1916
|
+
}
|
|
1917
|
+
/** The application's assets an administrator may choose as instructions. */
|
|
1918
|
+
interface InstructionAssetList {
|
|
1919
|
+
/** Whether the application registered a text asset source. */
|
|
1920
|
+
supported: boolean;
|
|
1921
|
+
/** The assets it lists, in its order; empty when it lists none, so the id and version are typed. */
|
|
1922
|
+
assets: InstructionAssetSummary[];
|
|
1923
|
+
}
|
|
1924
|
+
/** The text of one asset, read-only (`GET admin/instruction-assets/{id}/versions/{version}`). */
|
|
1925
|
+
interface InstructionAssetText {
|
|
1926
|
+
assetId: string;
|
|
1927
|
+
version: number;
|
|
1928
|
+
/** The SHA-256 of `content`: the hash a reference stores. */
|
|
1929
|
+
hash: string;
|
|
1930
|
+
content: string;
|
|
1931
|
+
/** `asset-invalid` when the asset cannot be instructions, so a save refuses it. */
|
|
1932
|
+
problem?: InstructionAssetProblem | null;
|
|
1409
1933
|
}
|
|
1410
1934
|
/** Body of `PUT admin/agents/{id}`. */
|
|
1411
1935
|
type UpdateAdminAgentRequest = AdminAgentInput & {
|
|
@@ -1434,6 +1958,11 @@ interface AdminAgent extends AdminAgentInput {
|
|
|
1434
1958
|
stateReason: string | null;
|
|
1435
1959
|
/** Events that wait while the agent is paused. */
|
|
1436
1960
|
waitingInputs: number;
|
|
1961
|
+
/**
|
|
1962
|
+
* `true` while the agent is stopped and was off when it stopped: releasing the kill switch switches
|
|
1963
|
+
* it back off, while resuming switches it on. `false` otherwise; missing on older servers.
|
|
1964
|
+
*/
|
|
1965
|
+
offBeforeStop?: boolean;
|
|
1437
1966
|
/** The agent's skills with their states and today's usage; missing or empty without skills. */
|
|
1438
1967
|
skills?: AgentSkillState[];
|
|
1439
1968
|
/** The live agent this agent is a shadow variant of; missing or null for an agent that is no variant. */
|
|
@@ -1482,6 +2011,18 @@ interface AdminAgent extends AdminAgentInput {
|
|
|
1482
2011
|
* its classification. A warning never refuses a save; missing on older servers.
|
|
1483
2012
|
*/
|
|
1484
2013
|
warnings?: AssistantConfigurationWarning[];
|
|
2014
|
+
/**
|
|
2015
|
+
* Why the instructions of `instructionsAsset` are not available: the agent then starts no model
|
|
2016
|
+
* turn and `instructions` is empty. `null` when they resolve; missing on older servers. With an
|
|
2017
|
+
* asset that resolves, `instructions` is its text, read-only.
|
|
2018
|
+
*/
|
|
2019
|
+
instructionsProblem?: InstructionAssetProblem | null;
|
|
2020
|
+
/**
|
|
2021
|
+
* The agent package the agent belongs to, with every linked part and its locked fields, which the
|
|
2022
|
+
* administration shows read-only; missing for an agent that belongs to none. Its part `agent` locks
|
|
2023
|
+
* fields of the definition.
|
|
2024
|
+
*/
|
|
2025
|
+
package?: AgentPackageLink | null;
|
|
1485
2026
|
}
|
|
1486
2027
|
/** The groups one agent is in, as `setAgentGroups` answers. */
|
|
1487
2028
|
interface AdminAgentGroups {
|
|
@@ -1556,11 +2097,58 @@ interface AgentState {
|
|
|
1556
2097
|
cancelledRuns: number;
|
|
1557
2098
|
/** The runs this change started for waiting events by resuming the agent. */
|
|
1558
2099
|
startedRuns: number;
|
|
2100
|
+
/**
|
|
2101
|
+
* `true` while the agent is stopped and was off when it stopped: releasing the kill switch switches
|
|
2102
|
+
* it back off, while resuming switches it on. `false` otherwise; missing on older servers.
|
|
2103
|
+
*/
|
|
2104
|
+
offBeforeStop?: boolean;
|
|
1559
2105
|
skills?: AgentSkillState[];
|
|
1560
2106
|
shadowOf?: string | null;
|
|
1561
2107
|
/** `null` for an agent without runs, which only chats. */
|
|
1562
2108
|
shadow?: AgentShadowState | null;
|
|
1563
2109
|
serviceAccount?: AgentServiceAccountState | null;
|
|
2110
|
+
/**
|
|
2111
|
+
* The routes of the agent's consultations, as its consultations in code and as data allow them and
|
|
2112
|
+
* an administrator switched them; `null` when nobody can consult the agent: it has no consultation
|
|
2113
|
+
* in code and none defined as data in effect. Missing on older servers.
|
|
2114
|
+
*/
|
|
2115
|
+
consultationRoutes?: AgentConsultationRoutesState | null;
|
|
2116
|
+
}
|
|
2117
|
+
/**
|
|
2118
|
+
* The routes of an agent's consultations: one entry per route, and the last change at runtime. The
|
|
2119
|
+
* consultations are the ceiling: a route none of them allows can never be switched on.
|
|
2120
|
+
*/
|
|
2121
|
+
interface AgentConsultationRoutesState {
|
|
2122
|
+
routes: AgentConsultationRouteState[];
|
|
2123
|
+
/** When the routes last changed at runtime; `null` while they follow the code. */
|
|
2124
|
+
changedAt: string | null;
|
|
2125
|
+
changedBy: string | null;
|
|
2126
|
+
reason: string | null;
|
|
2127
|
+
}
|
|
2128
|
+
/** One route of an agent's consultations. */
|
|
2129
|
+
interface AgentConsultationRouteState {
|
|
2130
|
+
route: NhAssistantConsultationRoute;
|
|
2131
|
+
/** Whether a consultation of the agent, in code or as data in effect, allows the route: the ceiling. */
|
|
2132
|
+
allowed: boolean;
|
|
2133
|
+
/** The switch an administrator set: `true` on, `false` off, `null` following the code. */
|
|
2134
|
+
override: boolean | null;
|
|
2135
|
+
/** Whether consultations use the route now: allowed and not switched off. */
|
|
2136
|
+
on: boolean;
|
|
2137
|
+
/** The subject types whose consultation allows the route. */
|
|
2138
|
+
subjectTypes: string[];
|
|
2139
|
+
}
|
|
2140
|
+
/** A switch of a consultation route: on, off, or back to the setting in code. */
|
|
2141
|
+
type AgentConsultationRouteSwitch = 'on' | 'off' | 'code';
|
|
2142
|
+
/**
|
|
2143
|
+
* Body of `POST admin/agents/{id}/consultation-routes`. A route left out keeps its switch; switching
|
|
2144
|
+
* on a route that code does not allow fails with `409 assistant-consult-route-not-allowed`.
|
|
2145
|
+
*/
|
|
2146
|
+
interface SetAgentConsultationRoutesRequest {
|
|
2147
|
+
askerDecides?: AgentConsultationRouteSwitch;
|
|
2148
|
+
subjectAgentRights?: AgentConsultationRouteSwitch;
|
|
2149
|
+
subjectAskerRights?: AgentConsultationRouteSwitch;
|
|
2150
|
+
/** Optional, at most 500 characters. */
|
|
2151
|
+
reason?: string | null;
|
|
1564
2152
|
}
|
|
1565
2153
|
/** Body of `POST admin/agents/{id}/shadow` and `POST admin/agents/{id}/skills/{skillId}/shadow`. */
|
|
1566
2154
|
interface SetAgentShadowRequest {
|
|
@@ -2111,6 +2699,105 @@ interface RunCatalog {
|
|
|
2111
2699
|
* can only lower them; missing on older servers.
|
|
2112
2700
|
*/
|
|
2113
2701
|
fileLimits?: FileLimits | null;
|
|
2702
|
+
/**
|
|
2703
|
+
* The application's ceiling of consultations defined as data (`UseConsultationsAsData`): what agents
|
|
2704
|
+
* created here may be consulted with. `null` while consultations exist in code only; missing on
|
|
2705
|
+
* older servers.
|
|
2706
|
+
*/
|
|
2707
|
+
consultationCeiling?: ConsultationCeiling | null;
|
|
2708
|
+
/**
|
|
2709
|
+
* The entries of agent metadata the application registers with `AddAgentMetadata`, ordered by name:
|
|
2710
|
+
* the slots of the agent editor; missing on older servers.
|
|
2711
|
+
*/
|
|
2712
|
+
agentMetadata?: AgentMetadataEntry[];
|
|
2713
|
+
/**
|
|
2714
|
+
* Whether the application registered a text asset source, so skills and agents created here may take
|
|
2715
|
+
* their instructions from its assets; missing on older servers.
|
|
2716
|
+
*/
|
|
2717
|
+
instructionAssets?: boolean;
|
|
2718
|
+
}
|
|
2719
|
+
/** An entry of agent metadata registered in code with `AddAgentMetadata`. */
|
|
2720
|
+
interface AgentMetadataEntry {
|
|
2721
|
+
/** The entry's dash-case name. */
|
|
2722
|
+
name: string;
|
|
2723
|
+
/** Administrators may change it on agents in code, as an override. */
|
|
2724
|
+
editable: boolean;
|
|
2725
|
+
/** The largest value in bytes of its JSON. */
|
|
2726
|
+
maxBytes: number;
|
|
2727
|
+
/** It declares a searchable value with `IndexBy`. */
|
|
2728
|
+
indexed: boolean;
|
|
2729
|
+
}
|
|
2730
|
+
/** Where the value of an agent's metadata entry comes from. */
|
|
2731
|
+
type AgentMetadataSource = 'code' | 'override' | 'data';
|
|
2732
|
+
/**
|
|
2733
|
+
* One entry of agent metadata of one agent (`GET admin/agents/{id}/metadata`): the application's own
|
|
2734
|
+
* data about the agent, which NewHeap stores and checks but never interprets.
|
|
2735
|
+
*/
|
|
2736
|
+
interface AgentMetadata {
|
|
2737
|
+
name: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* Whether it changes here: always for an agent created here, for an agent in code only when the
|
|
2740
|
+
* entry is editable.
|
|
2741
|
+
*/
|
|
2742
|
+
editable: boolean;
|
|
2743
|
+
maxBytes: number;
|
|
2744
|
+
/** Where the value in effect comes from; `null` without a value. */
|
|
2745
|
+
source: AgentMetadataSource | null;
|
|
2746
|
+
/** The value in effect, in the shape of the entry's type; `null` without one. */
|
|
2747
|
+
value: unknown;
|
|
2748
|
+
/**
|
|
2749
|
+
* The version a change sends as `expectedVersion`: the agent's version for an agent created here,
|
|
2750
|
+
* the override's version for an agent in code, `null` while it has no override.
|
|
2751
|
+
*/
|
|
2752
|
+
version: number | null;
|
|
2753
|
+
/** The agent's version: a change of an agent created here makes its next version. */
|
|
2754
|
+
agentVersion: number;
|
|
2755
|
+
/** The value in code of an agent in code, next to an override. */
|
|
2756
|
+
codeValue?: unknown;
|
|
2757
|
+
indexed?: boolean;
|
|
2758
|
+
/** The searchable value of the value in effect, trimmed and in lowercase. */
|
|
2759
|
+
indexValue?: string | null;
|
|
2760
|
+
changedAt?: string | null;
|
|
2761
|
+
changedBy?: string | null;
|
|
2762
|
+
/**
|
|
2763
|
+
* The link of the entry (part `metadata:{name}`) to the agent package it was imported from, with its locked
|
|
2764
|
+
* fields, which the administration shows read-only; missing when it is not linked.
|
|
2765
|
+
*/
|
|
2766
|
+
package?: PackagePartLink | null;
|
|
2767
|
+
}
|
|
2768
|
+
/** Body of `PUT admin/agents/{id}/metadata/{name}`. */
|
|
2769
|
+
interface AgentMetadataRequest {
|
|
2770
|
+
/** The value in the shape of the entry's type (camelCase); required. */
|
|
2771
|
+
value: unknown;
|
|
2772
|
+
/** The entry's `version` the change was made on; `null` for a new override of an agent in code. */
|
|
2773
|
+
expectedVersion: number | null;
|
|
2774
|
+
}
|
|
2775
|
+
/**
|
|
2776
|
+
* A ceiling in code of consultations defined as data: the routes their proposals may use (empty allows
|
|
2777
|
+
* answers only), whether they may generate the request tool and be seen by MCP clients, and their
|
|
2778
|
+
* highest limits.
|
|
2779
|
+
*/
|
|
2780
|
+
interface ConsultationCeiling {
|
|
2781
|
+
routes: NhAssistantConsultationRoute[];
|
|
2782
|
+
allowRequests: boolean;
|
|
2783
|
+
allowMcp: boolean;
|
|
2784
|
+
/** The most tool calls of one consultation. */
|
|
2785
|
+
maxToolCalls: number;
|
|
2786
|
+
/** The longest consultation, in seconds. */
|
|
2787
|
+
maxTimeoutSeconds: number;
|
|
2788
|
+
/** The longest answer, in characters. */
|
|
2789
|
+
maxAnswerChars: number;
|
|
2790
|
+
/** The most thread messages a consulted agent reads. */
|
|
2791
|
+
maxHistoryMessages: number;
|
|
2792
|
+
/** The most consultations defined as data of one agent. */
|
|
2793
|
+
maxConsultations: number;
|
|
2794
|
+
/** The longest instructions of a consultation defined as data. */
|
|
2795
|
+
maxInstructionsLength: number;
|
|
2796
|
+
/**
|
|
2797
|
+
* Every new consultation defined as data starts off until an administrator switches it on
|
|
2798
|
+
* (`StartOff()` in code); missing on older servers.
|
|
2799
|
+
*/
|
|
2800
|
+
startsOff?: boolean;
|
|
2114
2801
|
}
|
|
2115
2802
|
/**
|
|
2116
2803
|
* File limits: the largest file in bytes, the most pages of one file, the most files of one turn and
|
|
@@ -2193,15 +2880,16 @@ interface AssistantAccount {
|
|
|
2193
2880
|
detail: string | null;
|
|
2194
2881
|
}
|
|
2195
2882
|
/** Which part of the run configuration a problem concerns. */
|
|
2196
|
-
type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger';
|
|
2883
|
+
type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger' | 'trigger-candidate' | 'consultation' | 'hand-off';
|
|
2197
2884
|
/**
|
|
2198
2885
|
* 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.
|
|
2886
|
+
* a profile, policy, rule handler, event or subject set it names. A consultation defined as data may
|
|
2887
|
+
* also stay in effect without the parts that no longer fit, each with a problem.
|
|
2200
2888
|
*/
|
|
2201
2889
|
interface RunConfigurationProblem {
|
|
2202
2890
|
agentId: string;
|
|
2203
2891
|
kind: RunConfigurationProblemKind;
|
|
2204
|
-
/** The agent, skill or trigger id. */
|
|
2892
|
+
/** The agent, skill or trigger id; the subject type of a consultation. */
|
|
2205
2893
|
id: string;
|
|
2206
2894
|
/** Such as `unknown-event` or `tool-not-covered`. */
|
|
2207
2895
|
code: string;
|
|
@@ -2240,6 +2928,11 @@ interface AgentRunSettings extends LowerFileLimits {
|
|
|
2240
2928
|
* agent.
|
|
2241
2929
|
*/
|
|
2242
2930
|
acceptsFiles?: boolean;
|
|
2931
|
+
/**
|
|
2932
|
+
* The link of the run settings (part `runSettings`) to the agent package it was imported from, with its locked
|
|
2933
|
+
* fields, which the administration shows read-only; missing when it is not linked.
|
|
2934
|
+
*/
|
|
2935
|
+
package?: PackagePartLink | null;
|
|
2243
2936
|
}
|
|
2244
2937
|
/** Body of `PUT admin/agents/{id}/run-settings`. */
|
|
2245
2938
|
interface AgentRunSettingsRequest extends LowerFileLimits {
|
|
@@ -2365,6 +3058,17 @@ interface DataSkill extends LowerFileLimits {
|
|
|
2365
3058
|
* classification, or else its agent's. A warning never refuses a save; missing on older servers.
|
|
2366
3059
|
*/
|
|
2367
3060
|
warnings?: AssistantConfigurationWarning[];
|
|
3061
|
+
/**
|
|
3062
|
+
* The application's asset the version takes its instructions from; `null` for inline instructions
|
|
3063
|
+
* or none, missing on older servers. `problem` says when it no longer resolves to
|
|
3064
|
+
* `instructionsHash`; read its text with `getInstructionAsset`.
|
|
3065
|
+
*/
|
|
3066
|
+
instructionsAsset?: InstructionAssetReference | null;
|
|
3067
|
+
/**
|
|
3068
|
+
* The link of the skill (part `skill:{id}`) to the agent package it was imported from, with its locked
|
|
3069
|
+
* fields, which the administration shows read-only; missing when it is not linked, and on a candidate.
|
|
3070
|
+
*/
|
|
3071
|
+
package?: PackagePartLink | null;
|
|
2368
3072
|
}
|
|
2369
3073
|
/** How a change of a skill takes effect: at once, or as a candidate in shadow next to the live version. */
|
|
2370
3074
|
type SkillApplyMode = 'live' | 'shadow';
|
|
@@ -2399,6 +3103,13 @@ interface DataSkillRequest extends LowerFileLimits {
|
|
|
2399
3103
|
dataClassification?: AssistantDataClassification | null;
|
|
2400
3104
|
/** A run in the skill reads files when its agent accepts them too; `false` by default. */
|
|
2401
3105
|
acceptsFiles?: boolean;
|
|
3106
|
+
/**
|
|
3107
|
+
* The application's asset the version takes its instructions from, instead of `instructions`
|
|
3108
|
+
* (`instructions: not-allowed` next to it), when the run catalog reports `instructionAssets`. The
|
|
3109
|
+
* save checks it with the application: `instructionsAsset: not-found`, `instructionsAsset.hash:
|
|
3110
|
+
* invalid` and `instructionsAsset: invalid`.
|
|
3111
|
+
*/
|
|
3112
|
+
instructionsAsset?: InstructionAssetReference | null;
|
|
2402
3113
|
}
|
|
2403
3114
|
type DataSkillVersionStatus = 'live' | 'candidate' | 'superseded' | 'discarded';
|
|
2404
3115
|
/** One version in the history of a skill defined as data. */
|
|
@@ -2410,6 +3121,8 @@ interface DataSkillVersion {
|
|
|
2410
3121
|
createdAt: string;
|
|
2411
3122
|
createdBy: string;
|
|
2412
3123
|
reason: string | null;
|
|
3124
|
+
/** The application's asset the version takes its instructions from; missing on older servers. */
|
|
3125
|
+
instructionsAsset?: InstructionAssetReference | null;
|
|
2413
3126
|
}
|
|
2414
3127
|
/** Body of `POST admin/agents/{id}/skills/{skillId}/candidate/promote` and `.../discard`. */
|
|
2415
3128
|
interface SkillCandidateRequest {
|
|
@@ -2484,6 +3197,20 @@ interface DataTrigger {
|
|
|
2484
3197
|
* Missing on older servers.
|
|
2485
3198
|
*/
|
|
2486
3199
|
filters?: string[];
|
|
3200
|
+
/**
|
|
3201
|
+
* The candidate version that fires in shadow next to this live version, for the trigger's own agent
|
|
3202
|
+
* and into its shadow threads; missing or null without one. Its `inEffect` and `problem` are its own
|
|
3203
|
+
* (kind `trigger-candidate`), and its `shadow` is always `true`.
|
|
3204
|
+
*/
|
|
3205
|
+
candidate?: DataTrigger | null;
|
|
3206
|
+
/** When the version was stored and by whom; missing on older servers. */
|
|
3207
|
+
createdAt?: string;
|
|
3208
|
+
createdBy?: string;
|
|
3209
|
+
/**
|
|
3210
|
+
* The link of the trigger (part `trigger:{id}`) to the agent package it was imported from, with its locked
|
|
3211
|
+
* fields, which the administration shows read-only; missing when it is not linked, and on a candidate.
|
|
3212
|
+
*/
|
|
3213
|
+
package?: PackagePartLink | null;
|
|
2487
3214
|
}
|
|
2488
3215
|
/** Body of `PUT admin/agents/{id}/triggers/{triggerId}`. */
|
|
2489
3216
|
interface DataTriggerRequest {
|
|
@@ -2515,13 +3242,59 @@ interface DataTriggerRequest {
|
|
|
2515
3242
|
* `assistant-trigger-filter-not-found`; a schedule takes none.
|
|
2516
3243
|
*/
|
|
2517
3244
|
filters?: string[] | null;
|
|
3245
|
+
/**
|
|
3246
|
+
* For a change of a trigger, `live` by default: the version takes effect at once in the trigger's
|
|
3247
|
+
* mode; `shadow` makes it the candidate that fires in shadow next to the live version, which keeps
|
|
3248
|
+
* working, until it is promoted or discarded. A new trigger fails with `apply: invalid`.
|
|
3249
|
+
*/
|
|
3250
|
+
apply?: SkillApplyMode;
|
|
3251
|
+
}
|
|
3252
|
+
/** One version in the history of a trigger defined as data, with its definition. */
|
|
3253
|
+
interface DataTriggerVersion {
|
|
3254
|
+
version: number;
|
|
3255
|
+
status: DataSkillVersionStatus;
|
|
3256
|
+
skillId: string | null;
|
|
3257
|
+
source: 'event' | 'schedule';
|
|
3258
|
+
event: string | null;
|
|
3259
|
+
filters: string[];
|
|
3260
|
+
cron: string | null;
|
|
3261
|
+
timeZone: string | null;
|
|
3262
|
+
subjectSet: string | null;
|
|
3263
|
+
message: string | null;
|
|
3264
|
+
conflict: TriggerConflict;
|
|
3265
|
+
debounceSeconds: number;
|
|
3266
|
+
createdAt: string;
|
|
3267
|
+
createdBy: string;
|
|
3268
|
+
reason: string | null;
|
|
3269
|
+
}
|
|
3270
|
+
/** Body of `POST admin/agents/{id}/triggers/{triggerId}/candidate/promote` and `.../discard`. */
|
|
3271
|
+
type TriggerCandidateRequest = SkillCandidateRequest;
|
|
3272
|
+
/**
|
|
3273
|
+
* Response of `GET admin/agents/{id}/triggers/{triggerId}/candidate/comparison`: the live version and
|
|
3274
|
+
* the candidate on the runs they started, with the version statistics of the skill comparison. Counts
|
|
3275
|
+
* only.
|
|
3276
|
+
*/
|
|
3277
|
+
interface TriggerComparison {
|
|
3278
|
+
agentId: string;
|
|
3279
|
+
triggerId: string;
|
|
3280
|
+
from: string;
|
|
3281
|
+
to: string;
|
|
3282
|
+
live: SkillVersionStats;
|
|
3283
|
+
candidate: SkillVersionStats;
|
|
3284
|
+
/** The events both versions started a run for. */
|
|
3285
|
+
pairedEvents: number;
|
|
3286
|
+
/** The events only the live version started a run for, such as those a filter of the candidate refuses. */
|
|
3287
|
+
liveOnlyEvents: number;
|
|
3288
|
+
/** The events only the candidate started a run for. */
|
|
3289
|
+
candidateOnlyEvents: number;
|
|
3290
|
+
tools: SkillComparisonTool[];
|
|
2518
3291
|
}
|
|
2519
3292
|
/** Body of `POST admin/agents/{id}/triggers/{triggerId}/shadow`. */
|
|
2520
3293
|
interface DataTriggerShadowRequest {
|
|
2521
3294
|
mode: 'shadow' | 'live';
|
|
2522
3295
|
reason?: string | null;
|
|
2523
3296
|
}
|
|
2524
|
-
/** Query of the removals of run settings, data skills and data
|
|
3297
|
+
/** Query of the removals of run settings, data skills, data triggers and data consultations. */
|
|
2525
3298
|
interface RunConfigurationRemoval {
|
|
2526
3299
|
expectedVersion?: number | null;
|
|
2527
3300
|
reason?: string | null;
|
|
@@ -2544,6 +3317,286 @@ interface AgentRunConfiguration {
|
|
|
2544
3317
|
runSettings: AgentRunSettings | null;
|
|
2545
3318
|
/** How an agent in code runs, as its code says; `null` for an agent created here, missing on older servers. */
|
|
2546
3319
|
codeRunSettings?: CodeRunSettings | null;
|
|
3320
|
+
/** The consultations the agent allows in code, read-only, by subject type; missing on older servers. */
|
|
3321
|
+
codeConsultations?: CodeConsultation[];
|
|
3322
|
+
/** The consultations of the agent defined as data, by subject type; missing on older servers. */
|
|
3323
|
+
dataConsultations?: DataConsultation[];
|
|
3324
|
+
/**
|
|
3325
|
+
* The ceiling within which the agent may get consultations as data: the application's for an agent
|
|
3326
|
+
* created here, the application's and its own together for an agent in code that is consultable as
|
|
3327
|
+
* data. `null` when it may get none; missing on older servers.
|
|
3328
|
+
*/
|
|
3329
|
+
consultationCeiling?: ConsultationCeiling | null;
|
|
3330
|
+
}
|
|
3331
|
+
/** The role a person needs on the subject: to ask a consulted agent, or before it may propose. */
|
|
3332
|
+
type ConsultationSubjectRole = Exclude<AgentSubjectRole, 'none'>;
|
|
3333
|
+
/** Where the generated tools of a consultation are offered. */
|
|
3334
|
+
type ConsultationExposure = 'local' | 'agent' | 'mcp';
|
|
3335
|
+
/**
|
|
3336
|
+
* A consultation the agent allows in code with `AllowConsultation`; it cannot change here, apart from
|
|
3337
|
+
* the agent's route switches.
|
|
3338
|
+
*/
|
|
3339
|
+
interface CodeConsultation {
|
|
3340
|
+
subjectType: string;
|
|
3341
|
+
description: string | null;
|
|
3342
|
+
/** The routes its registration allows, before the agent's route switches. */
|
|
3343
|
+
allowedRoutes: NhAssistantConsultationRoute[];
|
|
3344
|
+
allowRequests: boolean;
|
|
3345
|
+
exposure: ConsultationExposure[];
|
|
3346
|
+
/** The id of the generated consult tool, which asking agents select. */
|
|
3347
|
+
consultToolId: string;
|
|
3348
|
+
/** The id of the generated request tool; `null` without requests. */
|
|
3349
|
+
requestToolId: string | null;
|
|
3350
|
+
/** The agents whose tool selectors select the consult tool now, by id. */
|
|
3351
|
+
askingAgents: string[];
|
|
3352
|
+
/**
|
|
3353
|
+
* The tools the consulted agent is offered, from `Tools(...)` in code; `null` offers every tool of the
|
|
3354
|
+
* agent. Missing on older servers.
|
|
3355
|
+
*/
|
|
3356
|
+
toolSelectors?: string[] | null;
|
|
3357
|
+
}
|
|
3358
|
+
/**
|
|
3359
|
+
* A consultation defined as data: other assistants may consult the agent about subjects of one type.
|
|
3360
|
+
* It is in effect once saved and answers only when an asking agent selects its consult tool.
|
|
3361
|
+
*/
|
|
3362
|
+
interface DataConsultation {
|
|
3363
|
+
subjectType: string;
|
|
3364
|
+
version: number;
|
|
3365
|
+
/** What the asking model reads about when to consult the agent. */
|
|
3366
|
+
description: string;
|
|
3367
|
+
/** Extra instructions of the consulted agent. */
|
|
3368
|
+
instructions: string | null;
|
|
3369
|
+
instructionsHash: string | null;
|
|
3370
|
+
/** The role the asking person needs on the subject. */
|
|
3371
|
+
minimumRole: ConsultationSubjectRole;
|
|
3372
|
+
/**
|
|
3373
|
+
* The policy the asking person must pass, one the application lists with `AddAgentPolicy`; `null`
|
|
3374
|
+
* uses the agent's required policy, else the assistant's access policy.
|
|
3375
|
+
*/
|
|
3376
|
+
askerPolicy: string | null;
|
|
3377
|
+
/** The routes as saved; empty for a consultation that only answers. */
|
|
3378
|
+
routes: NhAssistantConsultationRoute[];
|
|
3379
|
+
/** The role the asking person needs before the agent may propose. */
|
|
3380
|
+
proposalRole: ConsultationSubjectRole;
|
|
3381
|
+
/** The approval policy of its proposals; `null` uses the agent's. */
|
|
3382
|
+
proposalPolicy: string | null;
|
|
3383
|
+
maxToolCalls: number;
|
|
3384
|
+
timeoutSeconds: number;
|
|
3385
|
+
maxAnswerChars: number;
|
|
3386
|
+
maxHistoryMessages: number;
|
|
3387
|
+
allowRequests: boolean;
|
|
3388
|
+
/** MCP clients may see its tools, while the ceiling allows MCP. */
|
|
3389
|
+
exposeToMcp: boolean;
|
|
3390
|
+
/** The classification of its answers; `null` uses the agent's. */
|
|
3391
|
+
dataClassification: AssistantDataClassification | null;
|
|
3392
|
+
changedAt: string;
|
|
3393
|
+
changedBy: string;
|
|
3394
|
+
reason: string | null;
|
|
3395
|
+
/** `false` with `problem` when the consultation no longer fits the code. */
|
|
3396
|
+
inEffect: boolean;
|
|
3397
|
+
/** The first problem: the reason it is out of effect when it is. */
|
|
3398
|
+
problem: string | null;
|
|
3399
|
+
/**
|
|
3400
|
+
* Every problem: the reason it is out of effect, or each part that no longer fits and was dropped or
|
|
3401
|
+
* capped, such as `route-not-allowed` or `limit-above-ceiling`.
|
|
3402
|
+
*/
|
|
3403
|
+
problems: string[];
|
|
3404
|
+
/** The routes in effect: those saved that still fit the ceiling and the agent, before its route switches. */
|
|
3405
|
+
routesInEffect: NhAssistantConsultationRoute[];
|
|
3406
|
+
/** The tool selection as saved; `null` offers every tool of the agent. Missing on older servers. */
|
|
3407
|
+
toolSelectors?: string[] | null;
|
|
3408
|
+
/**
|
|
3409
|
+
* The tool selection in effect: the saved selectors the agent's own selectors still cover. `null`
|
|
3410
|
+
* offers every tool of the agent; empty offers none, when every selector dropped with the problem
|
|
3411
|
+
* `tools-not-allowed`, or while the consultation is out of effect. Missing on older servers.
|
|
3412
|
+
*/
|
|
3413
|
+
toolSelectorsInEffect?: string[] | null;
|
|
3414
|
+
/** The id of the generated consult tool, which asking agents select. */
|
|
3415
|
+
consultToolId: string;
|
|
3416
|
+
/** The id of the generated request tool while requests are in effect. */
|
|
3417
|
+
requestToolId: string | null;
|
|
3418
|
+
/** The agents whose tool selectors select the consult tool now, by id: the consultation's second key. */
|
|
3419
|
+
askingAgents: string[];
|
|
3420
|
+
createdAt: string;
|
|
3421
|
+
createdBy: string;
|
|
3422
|
+
/**
|
|
3423
|
+
* The consultation is switched off: it is not offered until an administrator switches it on with
|
|
3424
|
+
* `setDataConsultationState`; `inEffect` is then `false` without a problem. Missing on older servers.
|
|
3425
|
+
*/
|
|
3426
|
+
off?: boolean;
|
|
3427
|
+
/**
|
|
3428
|
+
* The link of the consultation (part `consultation:{subjectType}`) to the agent package it was imported from, with its locked
|
|
3429
|
+
* fields, which the administration shows read-only; missing when it is not linked.
|
|
3430
|
+
*/
|
|
3431
|
+
package?: PackagePartLink | null;
|
|
3432
|
+
}
|
|
3433
|
+
/** The state of a consultation defined as data an administrator switches. */
|
|
3434
|
+
type DataConsultationState = 'on' | 'off';
|
|
3435
|
+
/** Body of `POST admin/agents/{id}/consultations/{subjectType}/state`. */
|
|
3436
|
+
interface DataConsultationStateRequest {
|
|
3437
|
+
state: DataConsultationState;
|
|
3438
|
+
/** Optional, at most 500 characters. */
|
|
3439
|
+
reason?: string | null;
|
|
3440
|
+
}
|
|
3441
|
+
/**
|
|
3442
|
+
* Body of `PUT admin/agents/{id}/consultations/{subjectType}`. Limits left out start at the code's
|
|
3443
|
+
* defaults within the ceiling.
|
|
3444
|
+
*/
|
|
3445
|
+
interface DataConsultationRequest {
|
|
3446
|
+
/** Required, at most 1,000 characters. */
|
|
3447
|
+
description: string;
|
|
3448
|
+
/** At most the ceiling's `maxInstructionsLength`, 4,000 characters. */
|
|
3449
|
+
instructions?: string | null;
|
|
3450
|
+
/** `reader` by default. */
|
|
3451
|
+
minimumRole?: ConsultationSubjectRole | null;
|
|
3452
|
+
/** A policy of the run catalog's `agentPolicies`; `null` uses the agent's required policy. */
|
|
3453
|
+
askerPolicy?: string | null;
|
|
3454
|
+
/**
|
|
3455
|
+
* `asker-decides` and at most one of `subject-asker-rights` and `subject-agent-rights`, within the
|
|
3456
|
+
* ceiling; empty keeps the consultation read-only. A route outside the ceiling fails with
|
|
3457
|
+
* `routes: not-allowed`.
|
|
3458
|
+
*/
|
|
3459
|
+
routes?: NhAssistantConsultationRoute[];
|
|
3460
|
+
/** `participant` by default. */
|
|
3461
|
+
proposalRole?: ConsultationSubjectRole | null;
|
|
3462
|
+
/** A registered approval policy; `null` uses the agent's. */
|
|
3463
|
+
proposalPolicy?: string | null;
|
|
3464
|
+
/**
|
|
3465
|
+
* The tools the consulted agent is offered, by id or `prefix.*` selector, each covered by the
|
|
3466
|
+
* agent's own selectors; one outside them fails with `toolSelectors: not-allowed`. `null` or empty
|
|
3467
|
+
* offers every tool of the agent.
|
|
3468
|
+
*/
|
|
3469
|
+
toolSelectors?: string[] | null;
|
|
3470
|
+
/** 0 to 32, at most the ceiling's. */
|
|
3471
|
+
maxToolCalls?: number | null;
|
|
3472
|
+
/** 1 to 600, at most the ceiling's. */
|
|
3473
|
+
timeoutSeconds?: number | null;
|
|
3474
|
+
/** 200 to 32,000, at most the ceiling's. */
|
|
3475
|
+
maxAnswerChars?: number | null;
|
|
3476
|
+
/** 0 to 200, at most the ceiling's. */
|
|
3477
|
+
maxHistoryMessages?: number | null;
|
|
3478
|
+
/** Also generates the request tool; only when the ceiling allows requests. */
|
|
3479
|
+
allowRequests?: boolean;
|
|
3480
|
+
/** MCP clients may see its tools; only when the ceiling allows MCP. */
|
|
3481
|
+
exposeToMcp?: boolean;
|
|
3482
|
+
/** `null` uses the agent's. */
|
|
3483
|
+
dataClassification?: AssistantDataClassification | null;
|
|
3484
|
+
/** The consultation's current version; `null` for a new consultation. */
|
|
3485
|
+
expectedVersion?: number | null;
|
|
3486
|
+
/** Optional, at most 500 characters. */
|
|
3487
|
+
reason?: string | null;
|
|
3488
|
+
/**
|
|
3489
|
+
* For a new consultation only: it starts off, so it is not offered until an administrator switches it
|
|
3490
|
+
* on, also when the ceiling does not make every new one start off. A change fails with
|
|
3491
|
+
* `startsOff: invalid`; it keeps whether the consultation is on.
|
|
3492
|
+
*/
|
|
3493
|
+
startsOff?: boolean;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
/**
|
|
3497
|
+
* Hand-offs defined as data and the shadow variants of an agent, as the administration reads and
|
|
3498
|
+
* changes them (`admin/agents/{id}/hand-offs` and `admin/agents/{id}/shadow-variants`).
|
|
3499
|
+
*/
|
|
3500
|
+
|
|
3501
|
+
/** A hand-off the agent accepts in code (`AcceptHandOffs`), read only. */
|
|
3502
|
+
interface CodeHandOff {
|
|
3503
|
+
subjectType: string;
|
|
3504
|
+
/** The agents that may hand work off, by id. */
|
|
3505
|
+
sources: string[];
|
|
3506
|
+
description: string | null;
|
|
3507
|
+
/** The source gets a follow-up when the agent's run for the hand-off ends. */
|
|
3508
|
+
notifySource: boolean;
|
|
3509
|
+
/** Hand-offs one source may make about one subject per 24 hours. */
|
|
3510
|
+
maxPerSubjectPerDay: number;
|
|
3511
|
+
/** The generated tool the sources' tool selectors select. */
|
|
3512
|
+
toolId: string;
|
|
3513
|
+
}
|
|
3514
|
+
/**
|
|
3515
|
+
* A hand-off defined as data within the ceiling in code (`UseHandOffsAsData`). It works as one in
|
|
3516
|
+
* code; one that no longer fits the ceiling or the code is out of effect as a whole.
|
|
3517
|
+
*/
|
|
3518
|
+
interface DataHandOff extends CodeHandOff {
|
|
3519
|
+
version: number;
|
|
3520
|
+
changedAt: string;
|
|
3521
|
+
changedBy: string;
|
|
3522
|
+
reason: string | null;
|
|
3523
|
+
/** `false` with `problem` when it no longer fits the ceiling or the code. */
|
|
3524
|
+
inEffect: boolean;
|
|
3525
|
+
/** Such as `outside-ceiling`, `unknown-source` or `limit-above-ceiling`. */
|
|
3526
|
+
problem: string | null;
|
|
3527
|
+
createdAt: string;
|
|
3528
|
+
createdBy: string;
|
|
3529
|
+
/**
|
|
3530
|
+
* The link of the hand-off (part `handOff:{subjectType}`) to the agent package it was imported from, with its locked
|
|
3531
|
+
* fields, which the administration shows read-only; missing when it is not linked.
|
|
3532
|
+
*/
|
|
3533
|
+
package?: PackagePartLink | null;
|
|
3534
|
+
}
|
|
3535
|
+
/** The agents the ceiling lets hand work about one subject type to the agent. */
|
|
3536
|
+
interface HandOffAllowance {
|
|
3537
|
+
subjectType: string;
|
|
3538
|
+
/** The agents with a run configuration that may hand off now, by id; never the agent itself. */
|
|
3539
|
+
sources: string[];
|
|
3540
|
+
/** Every agent created in the administration with run settings may hand off, also those created later. */
|
|
3541
|
+
sourcesCreatedInAdministration: boolean;
|
|
3542
|
+
}
|
|
3543
|
+
/** What the ceiling in code lets the agent accept as data. */
|
|
3544
|
+
interface HandOffCeiling {
|
|
3545
|
+
subjectTypes: HandOffAllowance[];
|
|
3546
|
+
/** The highest daily limit per source and subject. */
|
|
3547
|
+
maxPerSubjectPerDay: number;
|
|
3548
|
+
/** The most hand-offs defined as data of one agent. */
|
|
3549
|
+
maxHandOffs: number;
|
|
3550
|
+
/** The most sources of one hand-off. */
|
|
3551
|
+
maxSources: number;
|
|
3552
|
+
maxDescriptionLength: number;
|
|
3553
|
+
}
|
|
3554
|
+
/** `GET admin/agents/{id}/hand-offs`. */
|
|
3555
|
+
interface AgentHandOffs {
|
|
3556
|
+
agentId: string;
|
|
3557
|
+
codeHandOffs: CodeHandOff[];
|
|
3558
|
+
dataHandOffs: DataHandOff[];
|
|
3559
|
+
/** `null` when the agent may accept no hand-offs as data. */
|
|
3560
|
+
ceiling: HandOffCeiling | null;
|
|
3561
|
+
/** Whether the agent has the run configuration a hand-off needs. */
|
|
3562
|
+
configured: boolean;
|
|
3563
|
+
}
|
|
3564
|
+
/** Body of `PUT admin/agents/{id}/hand-offs/{subjectType}`. */
|
|
3565
|
+
interface DataHandOffRequest {
|
|
3566
|
+
/** 1 to the ceiling's `maxSources` agents within the ceiling. */
|
|
3567
|
+
sources: string[];
|
|
3568
|
+
/** At most the ceiling's `maxDescriptionLength` characters. */
|
|
3569
|
+
description?: string | null;
|
|
3570
|
+
notifySource?: boolean;
|
|
3571
|
+
/** 1 to the ceiling's `maxPerSubjectPerDay`; 5 by default. */
|
|
3572
|
+
maxPerSubjectPerDay?: number | null;
|
|
3573
|
+
/** The hand-off's current version; `null` for a new one. */
|
|
3574
|
+
expectedVersion?: number | null;
|
|
3575
|
+
/** Optional, at most 500 characters. */
|
|
3576
|
+
reason?: string | null;
|
|
3577
|
+
}
|
|
3578
|
+
/** One shadow variant of a live agent. */
|
|
3579
|
+
interface ShadowVariant {
|
|
3580
|
+
agentId: string;
|
|
3581
|
+
displayName: string;
|
|
3582
|
+
/** `code` for `ShadowOf`, `data` for a variant created in the administration. */
|
|
3583
|
+
source: 'code' | 'data';
|
|
3584
|
+
/** A data variant receives the live agent's triggers only with run settings. */
|
|
3585
|
+
hasRunSettings: boolean;
|
|
3586
|
+
/** Whether the variant receives the live agent's triggers now. */
|
|
3587
|
+
inEffect: boolean;
|
|
3588
|
+
/** Why a data variant with run settings is out of effect, such as `outside-ceiling`. */
|
|
3589
|
+
problem: string | null;
|
|
3590
|
+
}
|
|
3591
|
+
/** `GET admin/agents/{id}/shadow-variants`. */
|
|
3592
|
+
interface AgentShadowVariants {
|
|
3593
|
+
agentId: string;
|
|
3594
|
+
/** Whether administrators may create variants of the agent as data (`UseShadowVariantsAsData`). */
|
|
3595
|
+
allowsDataVariants: boolean;
|
|
3596
|
+
/** The most data variants the agent may have; 0 when it may have none. */
|
|
3597
|
+
maxDataVariants: number;
|
|
3598
|
+
/** The variants in code first, then the data variants. */
|
|
3599
|
+
variants: ShadowVariant[];
|
|
2547
3600
|
}
|
|
2548
3601
|
|
|
2549
3602
|
/** Decides whether the current user may see and use the assistant. */
|
|
@@ -2936,12 +3989,36 @@ declare class NhAssistantAdminApiService {
|
|
|
2936
3989
|
* account that does not exist or may not sign in.
|
|
2937
3990
|
*/
|
|
2938
3991
|
setServiceAccount(agentId: string, request: SetAgentServiceAccountRequest): Observable<AgentState>;
|
|
3992
|
+
/**
|
|
3993
|
+
* Switches the routes of the agent's consultations on, off or back to the setting in code; a route
|
|
3994
|
+
* left out keeps its switch. Code is the ceiling: switching on a route that no consultation in code
|
|
3995
|
+
* allows fails with `assistant-consult-route-not-allowed`. Returns the agent's state with its
|
|
3996
|
+
* `consultationRoutes`.
|
|
3997
|
+
*/
|
|
3998
|
+
setConsultationRoutes(agentId: string, request: SetAgentConsultationRoutesRequest): Observable<AgentState>;
|
|
2939
3999
|
/**
|
|
2940
4000
|
* Puts an agent, in code or created here, in exactly `groups` of the run catalog's `agentGroups`
|
|
2941
4001
|
* and out of the others. The choice wins over the agent's `InGroup` in code. Fails with a field error
|
|
2942
4002
|
* on `groups` for an unknown group and with `assistant-shadow-variant` for a shadow variant.
|
|
2943
4003
|
*/
|
|
2944
4004
|
setAgentGroups(agentId: string, groups: readonly string[]): Observable<AdminAgentGroups>;
|
|
4005
|
+
/**
|
|
4006
|
+
* Every entry of agent metadata the application registers, with the agent's value in effect, where
|
|
4007
|
+
* it comes from and whether it changes here (`GET admin/agents/{id}/metadata`).
|
|
4008
|
+
*/
|
|
4009
|
+
getAgentMetadata(agentId: string): Observable<AgentMetadata[]>;
|
|
4010
|
+
/**
|
|
4011
|
+
* Saves the agent's value of one metadata entry after the checks in code: field errors `value` or
|
|
4012
|
+
* `value.<field>`. For an agent created here it makes the agent's next version (`expectedVersion` is
|
|
4013
|
+
* the agent's version); for an agent in code only an editable entry changes, as an override with a
|
|
4014
|
+
* version of its own (`assistant-metadata-read-only` otherwise).
|
|
4015
|
+
*/
|
|
4016
|
+
saveAgentMetadata(agentId: string, name: string, request: AgentMetadataRequest): Observable<AgentMetadata>;
|
|
4017
|
+
/**
|
|
4018
|
+
* Removes the agent's stored value of one metadata entry, so an agent in code uses its value in code
|
|
4019
|
+
* again; answers the entry as it is now.
|
|
4020
|
+
*/
|
|
4021
|
+
removeAgentMetadata(agentId: string, name: string, expectedVersion: number | null): Observable<AgentMetadata>;
|
|
2945
4022
|
/** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
|
|
2946
4023
|
deleteAgent(agentId: string): Observable<void>;
|
|
2947
4024
|
getMcpServers(): Observable<McpServer[]>;
|
|
@@ -3014,6 +4091,17 @@ declare class NhAssistantAdminApiService {
|
|
|
3014
4091
|
getAgentReplays(variantId: string): Observable<AgentReplayList>;
|
|
3015
4092
|
/** The building blocks in code that run settings, skills and triggers defined as data can name. */
|
|
3016
4093
|
getRunCatalog(): Observable<RunCatalog>;
|
|
4094
|
+
/**
|
|
4095
|
+
* The application's assets an administrator may choose as instructions, without their content
|
|
4096
|
+
* (`GET admin/instruction-assets`). Fails with `assistant-instructions-asset-unavailable` when the
|
|
4097
|
+
* application's source fails.
|
|
4098
|
+
*/
|
|
4099
|
+
listInstructionAssets(): Observable<InstructionAssetList>;
|
|
4100
|
+
/**
|
|
4101
|
+
* The text of one asset, read-only, with the hash a reference stores. Fails with
|
|
4102
|
+
* `assistant-instructions-asset-not-found` for an asset or version the application does not have.
|
|
4103
|
+
*/
|
|
4104
|
+
getInstructionAsset(assetId: string, version: number): Observable<InstructionAssetText>;
|
|
3017
4105
|
/**
|
|
3018
4106
|
* Accounts whose name or e-mail address contains `query` (2 to 100 characters), at most `limit`.
|
|
3019
4107
|
* Fails with `assistant-account-search-unavailable` when the application offers no search; the
|
|
@@ -3044,7 +4132,10 @@ declare class NhAssistantAdminApiService {
|
|
|
3044
4132
|
* `assistant-agent-not-found` for an unknown agent.
|
|
3045
4133
|
*/
|
|
3046
4134
|
getAgentRuns(agentId: string, filter?: Omit<AgentRunFilter, 'agentId'>): Observable<AgentRunHistory>;
|
|
3047
|
-
/**
|
|
4135
|
+
/**
|
|
4136
|
+
* Removes the run settings; while data skills, triggers, consultations or hand-offs defined as data
|
|
4137
|
+
* belong to the agent, `assistant-run-settings-in-use`.
|
|
4138
|
+
*/
|
|
3048
4139
|
removeRunSettings(agentId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
3049
4140
|
/**
|
|
3050
4141
|
* Adds a skill defined as data, which starts in shadow, or stores its next version: with `apply`
|
|
@@ -3061,11 +4152,106 @@ declare class NhAssistantAdminApiService {
|
|
|
3061
4152
|
discardSkillCandidate(agentId: string, skillId: string, request: SkillCandidateRequest): Observable<void>;
|
|
3062
4153
|
/** Compares the candidate with the live version on the runs they made in the period. */
|
|
3063
4154
|
compareSkillCandidate(agentId: string, skillId: string, filter?: SkillComparisonFilter): Observable<SkillComparison>;
|
|
3064
|
-
/**
|
|
4155
|
+
/**
|
|
4156
|
+
* Adds a trigger defined as data, which starts in shadow, or stores its next version: with `apply`
|
|
4157
|
+
* `live` (default) it takes effect at once in the trigger's mode; with `shadow` it becomes the
|
|
4158
|
+
* candidate that fires next to the live version until it is promoted or discarded.
|
|
4159
|
+
*/
|
|
3065
4160
|
saveDataTrigger(agentId: string, triggerId: string, request: DataTriggerRequest): Observable<DataTrigger>;
|
|
4161
|
+
/** Every version of a trigger defined as data, newest first, with its definition. */
|
|
4162
|
+
getDataTriggerVersions(agentId: string, triggerId: string): Observable<DataTriggerVersion[]>;
|
|
4163
|
+
/** Makes the candidate the live version of its trigger, in the trigger's mode. */
|
|
4164
|
+
promoteTriggerCandidate(agentId: string, triggerId: string, request: TriggerCandidateRequest): Observable<DataTrigger>;
|
|
4165
|
+
/** Discards the candidate of a trigger; it stays as history and fires no more. */
|
|
4166
|
+
discardTriggerCandidate(agentId: string, triggerId: string, request: TriggerCandidateRequest): Observable<void>;
|
|
4167
|
+
/** Compares the trigger's candidate with its live version on the runs they started in the period. */
|
|
4168
|
+
compareTriggerCandidate(agentId: string, triggerId: string, filter?: SkillComparisonFilter): Observable<TriggerComparison>;
|
|
3066
4169
|
removeDataTrigger(agentId: string, triggerId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
3067
4170
|
/** Puts a trigger defined as data in shadow or live. */
|
|
3068
4171
|
setDataTriggerShadow(agentId: string, triggerId: string, request: DataTriggerShadowRequest): Observable<DataTrigger>;
|
|
4172
|
+
/**
|
|
4173
|
+
* Adds or changes the consultation defined as data of an agent about one subject type, within the
|
|
4174
|
+
* agent's `consultationCeiling`. It is in effect once saved and answers when an asking agent selects
|
|
4175
|
+
* its consult tool. An agent that may get none fails with `assistant-consultations-not-allowed`, an
|
|
4176
|
+
* agent created here without run settings with `assistant-agent-not-configured`, a type the agent
|
|
4177
|
+
* allows consultation about in code with `assistant-consultation-in-code`, more than the ceiling's
|
|
4178
|
+
* `maxConsultations` with `assistant-configuration-limit`, a stale `expectedVersion` with
|
|
4179
|
+
* `assistant-version-conflict` and invalid input with field errors, such as `routes: not-allowed` for
|
|
4180
|
+
* a route outside the ceiling.
|
|
4181
|
+
*/
|
|
4182
|
+
saveDataConsultation(agentId: string, subjectType: string, request: DataConsultationRequest): Observable<DataConsultation>;
|
|
4183
|
+
/**
|
|
4184
|
+
* Switches a consultation defined as data on or off, without a new version. Off, it is not offered,
|
|
4185
|
+
* while its recorded proposals can still be decided. Fails with `assistant-consultation-not-found`
|
|
4186
|
+
* without one and with `assistant-consultation-in-code` for a consultation in code.
|
|
4187
|
+
*/
|
|
4188
|
+
setDataConsultationState(agentId: string, subjectType: string, request: DataConsultationStateRequest): Observable<DataConsultation>;
|
|
4189
|
+
/**
|
|
4190
|
+
* Removes a consultation defined as data: its tools disappear, while its recorded proposals can still
|
|
4191
|
+
* be decided. Fails with `assistant-consultation-not-found` without one and with
|
|
4192
|
+
* `assistant-consultation-in-code` for a consultation in code.
|
|
4193
|
+
*/
|
|
4194
|
+
removeDataConsultation(agentId: string, subjectType: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
4195
|
+
/**
|
|
4196
|
+
* The hand-offs the agent accepts, in code and as data with their problems, and what the ceiling in
|
|
4197
|
+
* code (`UseHandOffsAsData`) lets administrators add; `ceiling` is `null` when it may accept none.
|
|
4198
|
+
*/
|
|
4199
|
+
getAgentHandOffs(agentId: string): Observable<AgentHandOffs>;
|
|
4200
|
+
/**
|
|
4201
|
+
* Adds or changes the hand-off defined as data that the agent accepts about one subject type, within
|
|
4202
|
+
* the ceiling: in effect once saved, as one in code. An agent the ceiling connects to no agent fails
|
|
4203
|
+
* with `assistant-handoffs-not-allowed`, a type it accepts in code with `assistant-handoff-in-code`,
|
|
4204
|
+
* an agent without run configuration with `assistant-agent-not-configured`, more than the ceiling's
|
|
4205
|
+
* `maxHandOffs` with `assistant-configuration-limit`, a stale `expectedVersion` with
|
|
4206
|
+
* `assistant-version-conflict` and invalid input with field errors, such as `sources: not-allowed`
|
|
4207
|
+
* for a source outside the ceiling.
|
|
4208
|
+
*/
|
|
4209
|
+
saveDataHandOff(agentId: string, subjectType: string, request: DataHandOffRequest): Observable<DataHandOff>;
|
|
4210
|
+
/**
|
|
4211
|
+
* Removes a hand-off defined as data; its tool disappears from the sources' next turns. Fails with
|
|
4212
|
+
* `assistant-handoff-not-found` without one and with `assistant-handoff-in-code` for one in code.
|
|
4213
|
+
*/
|
|
4214
|
+
removeDataHandOff(agentId: string, subjectType: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
4215
|
+
/**
|
|
4216
|
+
* The agent's shadow variants, in code and created as data, and whether administrators may create
|
|
4217
|
+
* more (`UseShadowVariantsAsData`). Create a data variant with `createAgent` and `shadowOf`.
|
|
4218
|
+
*/
|
|
4219
|
+
getShadowVariants(agentId: string): Observable<AgentShadowVariants>;
|
|
4220
|
+
/**
|
|
4221
|
+
* Exports exactly `agentIds` (1 to 20) as one agent package (`POST admin/agent-packages/export`):
|
|
4222
|
+
* agents created here whole, agents in code as an overlay of what data changes on them; never
|
|
4223
|
+
* history, candidates, runs, run state, shadow overrides, MCP servers, the technical account or
|
|
4224
|
+
* secrets. The options set the package id, version and locks; left out, the id of the package the
|
|
4225
|
+
* first agent is linked to and its next version, otherwise the first agent's id and 1. Answers the
|
|
4226
|
+
* package, its JSON exactly as the server wrote it for the download, and every reference to an agent
|
|
4227
|
+
* outside the selection, which must exist where the package is imported. Fails with
|
|
4228
|
+
* `assistant-agent-not-found` for an unknown agent and with field errors for invalid options; the
|
|
4229
|
+
* server audits the export.
|
|
4230
|
+
*/
|
|
4231
|
+
exportAgentPackage(agentIds: readonly string[], options?: AgentPackageExportOptions): Observable<AgentPackageExport>;
|
|
4232
|
+
/**
|
|
4233
|
+
* What importing the package would do, per agent and part (`POST admin/agent-packages/preview`):
|
|
4234
|
+
* `created`, `changed`, `unchanged`, `kept-local`, `left-behind` or `refused` with the field
|
|
4235
|
+
* errors of the save validators, after one check of the whole package against this host as it would
|
|
4236
|
+
* be after the import. Changes nothing. The server reads the package strictly: a package it does not
|
|
4237
|
+
* read fails with `assistant-package-format-unsupported`, one above 1 MB or 20 agents with
|
|
4238
|
+
* `assistant-package-too-large`.
|
|
4239
|
+
*/
|
|
4240
|
+
previewAgentPackageImport(agentPackage: AgentPackage, options?: AgentPackageImportOptions): Observable<AgentPackagePreview>;
|
|
4241
|
+
/**
|
|
4242
|
+
* Imports the package in one transaction (`POST admin/agent-packages/import`): every agent and part
|
|
4243
|
+
* of it, or nothing. Fails as `previewAgentPackageImport` does, and with `assistant-package-refused`
|
|
4244
|
+
* and the field error `parts: invalid` when the check refuses a part; preview again to see which part
|
|
4245
|
+
* and why. Every part is audited as its save.
|
|
4246
|
+
*/
|
|
4247
|
+
importAgentPackage(agentPackage: AgentPackage, options?: AgentPackageImportOptions): Observable<AgentPackageImport>;
|
|
4248
|
+
/**
|
|
4249
|
+
* Unlinks one part of the agent, or without `part` the whole agent, from its package
|
|
4250
|
+
* (`POST admin/agents/{id}/package/unlink`): its locks no longer hold and the next upgrade keeps it as
|
|
4251
|
+
* `kept-local` unless the import relinks it. Fails with `assistant-package-not-linked` for an agent
|
|
4252
|
+
* or part without a link and with the field error `part: invalid` for an unknown part key.
|
|
4253
|
+
*/
|
|
4254
|
+
unlinkAgentPackage(agentId: string, request?: AgentPackageUnlinkRequest): Observable<AgentPackageUnlink>;
|
|
3069
4255
|
private download;
|
|
3070
4256
|
private request;
|
|
3071
4257
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminApiService, never>;
|
|
@@ -3235,11 +4421,16 @@ declare class NhAssistantAgentRunApiService {
|
|
|
3235
4421
|
* replaced by the server's `userMessageId` when `turn.started` arrives.
|
|
3236
4422
|
*/
|
|
3237
4423
|
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
4424
|
/**
|
|
3241
|
-
*
|
|
3242
|
-
*
|
|
4425
|
+
* Records the user's approval decision locally until the server state is reloaded. A consulted
|
|
4426
|
+
* agent's proposal that the user left for the subject's approvers (`leave`) closes here as the server
|
|
4427
|
+
* closes it, rejected in this conversation, and can no longer be left; the waiting tool call goes on.
|
|
4428
|
+
*/
|
|
4429
|
+
declare function applyNhAssistantApprovalDecision(conversation: Conversation, approvalId: string, decision: ApprovalDecision): Conversation;
|
|
4430
|
+
/**
|
|
4431
|
+
* Applies a live update of another session: `message.created` adds a participant's or the
|
|
4432
|
+
* application's message once, where its sequence number puts it; the turn events behave exactly
|
|
4433
|
+
* like the starting request's stream. Unknown types are ignored.
|
|
3243
4434
|
*/
|
|
3244
4435
|
declare function applyNhAssistantLiveEvent(conversation: Conversation, event: LiveConversationEvent): Conversation;
|
|
3245
4436
|
/** Applies the shared state of a conversation that a live update announced. */
|
|
@@ -3399,9 +4590,10 @@ declare const NH_ASSISTANT_MESSAGE_QUEUED_NOTICE_CODE = "assistant-message-queue
|
|
|
3399
4590
|
/**
|
|
3400
4591
|
* Who decides an approval the current user cannot decide: `turn`, the person whose turn created
|
|
3401
4592
|
* 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
|
|
4593
|
+
* approver, because the current user started the work and four-eyes applies; `asker`, the person
|
|
4594
|
+
* who consulted the thread's agent, in their own chat.
|
|
3403
4595
|
*/
|
|
3404
|
-
type NhAssistantApprovalWaitingFor = 'turn' | 'approver' | 'other-approver';
|
|
4596
|
+
type NhAssistantApprovalWaitingFor = 'turn' | 'approver' | 'other-approver' | 'asker';
|
|
3405
4597
|
/** The current user's right to decide, or to give feedback on, one approval of the open conversation. */
|
|
3406
4598
|
interface NhAssistantApprovalRight {
|
|
3407
4599
|
canDecide: boolean;
|
|
@@ -3523,6 +4715,12 @@ declare class NhAssistantStore {
|
|
|
3523
4715
|
/** Non-blocking remark about the latest completed turn; shown only while no error is shown. */
|
|
3524
4716
|
readonly notice: _angular_core.Signal<NhAssistantError | null>;
|
|
3525
4717
|
readonly lastUsage: _angular_core.Signal<TurnUsage | null>;
|
|
4718
|
+
/**
|
|
4719
|
+
* The answer the running turn of the open conversation writes, while this tab streams the turn or
|
|
4720
|
+
* follows it live; `null` otherwise. Pass it to `nh-assistant-thread` as `writingMessageId`, so
|
|
4721
|
+
* the working indicator stays under that answer when a message arrives after it during the turn.
|
|
4722
|
+
*/
|
|
4723
|
+
readonly writingMessageId: _angular_core.Signal<string | null>;
|
|
3526
4724
|
/** Text of a message the server did not accept, so the composer can offer it again. */
|
|
3527
4725
|
readonly restoredDraft: _angular_core.Signal<string | null>;
|
|
3528
4726
|
/** Page context that the next message would send, for the transparency chip. */
|
|
@@ -3631,8 +4829,11 @@ declare class NhAssistantStore {
|
|
|
3631
4829
|
/**
|
|
3632
4830
|
* Approves or rejects an approval of the open conversation: `approvalId`, or the pending approval
|
|
3633
4831
|
* 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
|
-
*
|
|
4832
|
+
* agent-run endpoint; other approvals resume their turn as a stream. `leave` leaves a consulted
|
|
4833
|
+
* agent's proposal that has a `consultation.leaveRoute` for the subject's approvers; it resumes the
|
|
4834
|
+
* turn like a decision and reads the conversation again, which then names the proposal that waits
|
|
4835
|
+
* at the subject. Ignores calls the current user may not make, `leave` for other approvals and
|
|
4836
|
+
* repeated calls while a decision is in flight.
|
|
3636
4837
|
*/
|
|
3637
4838
|
decide(decision: ApprovalDecision, reason?: string, approvalId?: string): void;
|
|
3638
4839
|
/**
|
|
@@ -3713,6 +4914,11 @@ declare class NhAssistantStore {
|
|
|
3713
4914
|
private onLiveChanged;
|
|
3714
4915
|
private onLiveRead;
|
|
3715
4916
|
private onLiveRemoved;
|
|
4917
|
+
/**
|
|
4918
|
+
* Applies a live turn event or message to a conversation this tab shows. While the tab streams a
|
|
4919
|
+
* turn of the conversation, its stream brings the turn's events and its own message, so it applies
|
|
4920
|
+
* only messages that others stored meanwhile: the application's and other people's.
|
|
4921
|
+
*/
|
|
3716
4922
|
private onLiveEvent;
|
|
3717
4923
|
/**
|
|
3718
4924
|
* A run or proposal of an agent thread changed, for example a colleague decided a proposal in the
|
|
@@ -3768,16 +4974,36 @@ declare class NhAssistantPushService {
|
|
|
3768
4974
|
private readonly subscribedState;
|
|
3769
4975
|
private readonly busyState;
|
|
3770
4976
|
private readonly openSubject;
|
|
4977
|
+
private readonly openRunSubject;
|
|
3771
4978
|
private registration?;
|
|
3772
4979
|
private revision;
|
|
3773
4980
|
private readonly onWorkerMessage;
|
|
3774
4981
|
/** The caller's server-side choice, or `null` before it was loaded. */
|
|
3775
4982
|
readonly settings: _angular_core.Signal<NotificationSettings | null>;
|
|
3776
4983
|
readonly busy: _angular_core.Signal<boolean>;
|
|
3777
|
-
/**
|
|
4984
|
+
/**
|
|
4985
|
+
* Conversations a clicked notification asks to open; the assistant panel opens them. A
|
|
4986
|
+
* notification about the proposals of a run goes to `openRun$` instead while the application
|
|
4987
|
+
* subscribes to it.
|
|
4988
|
+
*/
|
|
3778
4989
|
readonly openConversation$: Observable<string>;
|
|
4990
|
+
/**
|
|
4991
|
+
* Runs whose proposals a clicked notification is about, for the application to open its inbox of
|
|
4992
|
+
* the run, for example `nh-assistant-agent-inbox` with `[runId]`, which lists every proposal of the
|
|
4993
|
+
* run the person may decide. While the application subscribes, such a click emits the run here
|
|
4994
|
+
* instead of opening the conversation in the panel; without a subscriber it opens the conversation
|
|
4995
|
+
* as before. Subscribe in the application shell, so a notification that opens a new window finds
|
|
4996
|
+
* the subscription.
|
|
4997
|
+
*/
|
|
4998
|
+
readonly openRun$: Observable<string>;
|
|
3779
4999
|
readonly state: _angular_core.Signal<NhAssistantPushState>;
|
|
3780
5000
|
constructor();
|
|
5001
|
+
/**
|
|
5002
|
+
* Opens what a clicked notification is about: the run through `openRun$` when the notification
|
|
5003
|
+
* names one and the application subscribes, otherwise the conversation through
|
|
5004
|
+
* `openConversation$`. The bundled worker and the panel's notification fragments call it.
|
|
5005
|
+
*/
|
|
5006
|
+
openNotification(conversationId: string, runId?: string): void;
|
|
3781
5007
|
/**
|
|
3782
5008
|
* Loads the user's choice and, when permission was granted before, renews this browser's
|
|
3783
5009
|
* subscription, which also moves it to the current user and to a rotated server key.
|
|
@@ -3913,6 +5139,12 @@ declare class NhAssistantSubjectSummaryService {
|
|
|
3913
5139
|
declare const NH_ASSISTANT_JOIN_FRAGMENT = "nh-assistant-join";
|
|
3914
5140
|
/** Fragment a clicked notification opens: `#nh-assistant-conversation=<id>`. */
|
|
3915
5141
|
declare const NH_ASSISTANT_CONVERSATION_FRAGMENT = "nh-assistant-conversation";
|
|
5142
|
+
/**
|
|
5143
|
+
* Fragment a clicked notification about the proposals of a run opens:
|
|
5144
|
+
* `#nh-assistant-run=<runId>.<conversationId>`. The run goes to `NhAssistantPushService.openRun$`
|
|
5145
|
+
* while the application subscribes; otherwise the panel opens the conversation.
|
|
5146
|
+
*/
|
|
5147
|
+
declare const NH_ASSISTANT_RUN_FRAGMENT = "nh-assistant-run";
|
|
3916
5148
|
/** Builds the default invitation link: the current page with the join fragment. */
|
|
3917
5149
|
declare function nhAssistantShareLink(conversationId: string, token: string): string;
|
|
3918
5150
|
|
|
@@ -4053,7 +5285,7 @@ declare function nhAssistantCodeKeys(code: string | null | undefined): string[];
|
|
|
4053
5285
|
/** Dash-case identifiers as the contract requires for agent and MCP server ids. */
|
|
4054
5286
|
declare const NH_ASSISTANT_DASH_CASE: RegExp;
|
|
4055
5287
|
|
|
4056
|
-
type NhAssistantIconName = 'assistant' | 'close' | 'send' | 'stop' | 'plus' | 'list' | 'trash' | 'tool' | 'check' | 'x' | 'warning' | 'chevron-down' | 'clock' | 'settings' | 'admin' | 'edit' | 'refresh' | 'link' | 'page' | 'users' | 'copy' | 'bell' | 'leave' | 'attach' | 'file';
|
|
5288
|
+
type NhAssistantIconName = 'assistant' | 'close' | 'send' | 'stop' | 'plus' | 'list' | 'trash' | 'tool' | 'check' | 'x' | 'warning' | 'chevron-down' | 'clock' | 'settings' | 'admin' | 'edit' | 'refresh' | 'link' | 'page' | 'users' | 'copy' | 'bell' | 'leave' | 'attach' | 'file' | 'lock';
|
|
4057
5289
|
/**
|
|
4058
5290
|
* Optional icon classes of the host's icon library, for example `{ close: 'ph ph-x' }`.
|
|
4059
5291
|
* Icons without a class use the library's small built-in outline glyphs.
|
|
@@ -4098,9 +5330,12 @@ declare const NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD = 200;
|
|
|
4098
5330
|
* The messages of a conversation as a live log. Assistant text renders as sanitized
|
|
4099
5331
|
* Markdown, consecutive tool calls as one collapsible group that counts along, and
|
|
4100
5332
|
* 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
|
-
*
|
|
5333
|
+
* trigger wrote into an agent thread read as events, not as a person, and a message the application
|
|
5334
|
+
* posted reads as the application's, with its sender, title, Markdown text and link, and a label when
|
|
5335
|
+
* the assistant follows it as an instruction. While a turn runs without visible progress, a working
|
|
5336
|
+
* indicator shows the elapsed time: under the answer `writingMessageId` names, also when the
|
|
5337
|
+
* application's or another person's message arrived after it, and at the end without it. The thread
|
|
5338
|
+
* follows new content while the user is at the bottom.
|
|
4104
5339
|
*/
|
|
4105
5340
|
declare class NhAssistantThreadComponent {
|
|
4106
5341
|
private readonly injector;
|
|
@@ -4129,6 +5364,13 @@ declare class NhAssistantThreadComponent {
|
|
|
4129
5364
|
* card of a rejected proposal ask what was wrong.
|
|
4130
5365
|
*/
|
|
4131
5366
|
readonly approvalRights: _angular_core.InputSignal<ReadonlyMap<string, NhAssistantApprovalRight> | null>;
|
|
5367
|
+
/**
|
|
5368
|
+
* The answer the running turn writes, for example `NhAssistantStore.writingMessageId`. The working
|
|
5369
|
+
* indicator stays under that answer, also when the application's or a colleague's message arrives
|
|
5370
|
+
* after it during the turn. Without it, or when it names no message of `messages`, the indicator
|
|
5371
|
+
* shows at the end of the thread.
|
|
5372
|
+
*/
|
|
5373
|
+
readonly writingMessageId: _angular_core.InputSignal<string | null>;
|
|
4132
5374
|
/** The decision about an approval card, without the approval it belongs to. */
|
|
4133
5375
|
readonly approvalDecision: _angular_core.OutputEmitterRef<ApprovalDecision>;
|
|
4134
5376
|
/** The decision about an approval card together with its approval id. */
|
|
@@ -4146,9 +5388,17 @@ declare class NhAssistantThreadComponent {
|
|
|
4146
5388
|
/**
|
|
4147
5389
|
* True while the turn runs and nothing else shows progress: before the first part and
|
|
4148
5390
|
* 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.
|
|
5391
|
+
* running tool group show their own progress; an approval waits for the user. With
|
|
5392
|
+
* `writingMessageId`, the answer it names decides, as if the messages after it were not there.
|
|
4150
5393
|
*/
|
|
4151
5394
|
readonly working: _angular_core.Signal<boolean>;
|
|
5395
|
+
/**
|
|
5396
|
+
* The message in whose row the working indicator shows: the answer `writingMessageId` names.
|
|
5397
|
+
* `null` puts the indicator at the end of the thread.
|
|
5398
|
+
*/
|
|
5399
|
+
readonly workingAfterId: _angular_core.Signal<string | null>;
|
|
5400
|
+
/** While a turn runs: the answer `writingMessageId` names, when `messages` holds it. */
|
|
5401
|
+
private readonly answerBeingWritten;
|
|
4152
5402
|
/** Whole seconds since the running turn started. */
|
|
4153
5403
|
readonly elapsedSeconds: _angular_core.Signal<number>;
|
|
4154
5404
|
private readonly turnStartedAt;
|
|
@@ -4159,6 +5409,8 @@ declare class NhAssistantThreadComponent {
|
|
|
4159
5409
|
trackMessage(_index: number, message: Message): string;
|
|
4160
5410
|
/** True for a user message a trigger wrote into an agent thread. */
|
|
4161
5411
|
isTrigger(message: Message): boolean;
|
|
5412
|
+
/** True for a message the application posted into the conversation. */
|
|
5413
|
+
isApplication(message: Message): boolean;
|
|
4162
5414
|
/** True for an assistant message the agent's rules wrote without a model. */
|
|
4163
5415
|
isRule(message: Message): boolean;
|
|
4164
5416
|
/** True for a user message written by another person in a shared conversation. */
|
|
@@ -4171,7 +5423,7 @@ declare class NhAssistantThreadComponent {
|
|
|
4171
5423
|
private scrollElement;
|
|
4172
5424
|
private scrollToEnd;
|
|
4173
5425
|
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>;
|
|
5426
|
+
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
5427
|
}
|
|
4176
5428
|
|
|
4177
5429
|
/**
|
|
@@ -4246,7 +5498,9 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
|
|
|
4246
5498
|
cancelQueueEdit(): void;
|
|
4247
5499
|
/**
|
|
4248
5500
|
* Opens the panel for an invitation link or a clicked notification in the URL fragment and
|
|
4249
|
-
* removes the fragment, so a reload or a shared screenshot does not reuse the token.
|
|
5501
|
+
* removes the fragment, so a reload or a shared screenshot does not reuse the token. A clicked
|
|
5502
|
+
* notification about the proposals of a run goes to `NhAssistantPushService.openRun$` while the
|
|
5503
|
+
* application subscribes, and otherwise opens its conversation.
|
|
4250
5504
|
*/
|
|
4251
5505
|
private openFromLocation;
|
|
4252
5506
|
decide(decision: ApprovalDecision): void;
|
|
@@ -4334,7 +5588,7 @@ declare class NhAssistantComposerComponent {
|
|
|
4334
5588
|
/** True while a file of the next message still uploads. */
|
|
4335
5589
|
readonly uploading: _angular_core.Signal<boolean>;
|
|
4336
5590
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
4337
|
-
/** The `accept` attribute of the file input. */
|
|
5591
|
+
/** The `accept` attribute of the file input, with the extensions the application mapped. */
|
|
4338
5592
|
readonly accept: _angular_core.Signal<string>;
|
|
4339
5593
|
/** The values the attachment texts name: the accepted types, the largest size and the most files. */
|
|
4340
5594
|
readonly uploadParams: _angular_core.Signal<{
|
|
@@ -4411,9 +5665,15 @@ declare function formatNhAssistantCountdown(milliseconds: number): string;
|
|
|
4411
5665
|
* proposed arguments and a countdown to expiry. A decision is emitted at most once until
|
|
4412
5666
|
* the host reports that it is no longer deciding. After the user rejected an agent's proposal
|
|
4413
5667
|
* (`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.
|
|
5668
|
+
* longer fits shows why, such as "Already done", with the application's explanation. A proposal of
|
|
5669
|
+
* another agent the assistant consulted (`consultation`) names that agent and the subject, offers the
|
|
5670
|
+
* agent's answer and says that approving runs it with the user's own rights; with a
|
|
5671
|
+
* `consultation.leaveRoute` a third action leaves it for the subject's approvers (`leave`), after which
|
|
5672
|
+
* the card says that it waits for them.
|
|
4415
5673
|
*/
|
|
4416
5674
|
declare class NhAssistantApprovalCardComponent {
|
|
5675
|
+
/** Names the consulted agent as the status does; the card also works outside `provideNhAssistant`. */
|
|
5676
|
+
private readonly store;
|
|
4417
5677
|
readonly approval: _angular_core.InputSignal<ApprovalPart>;
|
|
4418
5678
|
/** True while the host submits a decision; disables both buttons. */
|
|
4419
5679
|
readonly deciding: _angular_core.InputSignal<boolean>;
|
|
@@ -4438,6 +5698,8 @@ declare class NhAssistantApprovalCardComponent {
|
|
|
4438
5698
|
readonly decide: _angular_core.OutputEmitterRef<ApprovalDecision>;
|
|
4439
5699
|
private readonly now;
|
|
4440
5700
|
private readonly submitted;
|
|
5701
|
+
/** The decision this card sent last, so a proposal left for the approvers reads as such at once. */
|
|
5702
|
+
private readonly chosen;
|
|
4441
5703
|
/** The feedback question is expanded. */
|
|
4442
5704
|
readonly feedbackOpen: _angular_core.WritableSignal<boolean>;
|
|
4443
5705
|
/** The feedback was stored; the question thanks the person and the action disappears. */
|
|
@@ -4446,9 +5708,25 @@ declare class NhAssistantApprovalCardComponent {
|
|
|
4446
5708
|
readonly remainingMs: _angular_core.Signal<number>;
|
|
4447
5709
|
readonly expired: _angular_core.Signal<boolean>;
|
|
4448
5710
|
readonly effectiveStatus: _angular_core.Signal<ApprovalStatus>;
|
|
5711
|
+
/** Where a consulted agent's proposal comes from; `null` for the conversation's own proposals. */
|
|
5712
|
+
readonly consultation: _angular_core.Signal<ApprovalConsultation | null>;
|
|
5713
|
+
/**
|
|
5714
|
+
* The translation keys of the consulted agent's name: the name the assistant's status gives it,
|
|
5715
|
+
* then the convention `nh-assistant.agents.{id}.name`; the id when neither translates.
|
|
5716
|
+
*/
|
|
5717
|
+
readonly consultedAgentKeys: _angular_core.Signal<string[]>;
|
|
5718
|
+
/** The subject the consulted agent was asked about, by name or else by id. */
|
|
5719
|
+
readonly consultedSubject: _angular_core.Signal<string | null>;
|
|
5720
|
+
/**
|
|
5721
|
+
* The user left the consulted agent's proposal for the subject's approvers: the server names the
|
|
5722
|
+
* proposal that waits there, or this card just sent the decision and it was accepted.
|
|
5723
|
+
*/
|
|
5724
|
+
readonly leftForApprovers: _angular_core.Signal<boolean>;
|
|
5725
|
+
/** The status the card shows: `moved` for a proposal left for the subject's approvers. */
|
|
5726
|
+
readonly shownStatus: _angular_core.Signal<ApprovalStatus | "moved">;
|
|
4449
5727
|
/**
|
|
4450
5728
|
* Translation key of the status: the kind of a stale proposal, "replaced" for a superseded one,
|
|
4451
|
-
* otherwise the status itself.
|
|
5729
|
+
* "left for approvers" for a consulted agent's proposal the user left, otherwise the status itself.
|
|
4452
5730
|
*/
|
|
4453
5731
|
readonly statusKey: _angular_core.Signal<string>;
|
|
4454
5732
|
/** Why the agent's rules proposed it; model proposals have none. */
|
|
@@ -4458,14 +5736,18 @@ declare class NhAssistantApprovalCardComponent {
|
|
|
4458
5736
|
readonly actionable: _angular_core.Signal<boolean>;
|
|
4459
5737
|
readonly succeeded: _angular_core.Signal<boolean>;
|
|
4460
5738
|
readonly disabled: _angular_core.Signal<boolean>;
|
|
5739
|
+
/** The route at the subject the pending proposal may be left for; `null` when it can only be approved or rejected. */
|
|
5740
|
+
readonly leaveRoute: _angular_core.Signal<NhAssistantConsultationLeaveRoute | null>;
|
|
5741
|
+
readonly leaveHintId: string;
|
|
4461
5742
|
readonly countdown: _angular_core.Signal<string>;
|
|
4462
5743
|
readonly presentedSummary: _angular_core.Signal<string | null>;
|
|
4463
5744
|
readonly feedbackAvailable: _angular_core.Signal<boolean>;
|
|
4464
5745
|
readonly feedbackIds: _angular_core.Signal<string[]>;
|
|
4465
5746
|
readonly feedbackPanelId: string;
|
|
4466
5747
|
/** 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">;
|
|
5748
|
+
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
5749
|
constructor();
|
|
5750
|
+
/** Emits a decision; `leave` only for a consulted agent's proposal with a route at the subject. */
|
|
4469
5751
|
choose(decision: ApprovalDecision): void;
|
|
4470
5752
|
toggleFeedback(): void;
|
|
4471
5753
|
onFeedbackSaved(): void;
|
|
@@ -4910,5 +6192,16 @@ declare class NhAssistantMarkdownPipe implements PipeTransform {
|
|
|
4910
6192
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<NhAssistantMarkdownPipe, "nhAssistantMarkdown", true>;
|
|
4911
6193
|
}
|
|
4912
6194
|
|
|
4913
|
-
|
|
4914
|
-
|
|
6195
|
+
/**
|
|
6196
|
+
* The media type a chosen file uploads as, lowercase and without parameters, by the same rule as the
|
|
6197
|
+
* server. A browser gives no type, or a generic one, for a file its system does not know, and some
|
|
6198
|
+
* systems name an extension after the program that opens it, such as `application/vnd.ms-excel` for
|
|
6199
|
+
* a `.csv` file; the file name's extension then names the type, but only a type of
|
|
6200
|
+
* `acceptedMediaTypes`: the type the application mapped the extension to (`mappedExtensions`),
|
|
6201
|
+
* otherwise the platform's. A specific type stays as it is, so a type that is not accepted is refused
|
|
6202
|
+
* whatever the extension. Without a type and an accepted extension, `application/octet-stream`.
|
|
6203
|
+
*/
|
|
6204
|
+
declare function nhAssistantMediaTypeOf(file: Pick<File, 'name' | 'type'>, acceptedMediaTypes: readonly string[], mappedExtensions?: readonly AgentUploadExtension[] | null): string;
|
|
6205
|
+
|
|
6206
|
+
export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_AGENT_PACKAGE_FORMAT, NH_ASSISTANT_AGENT_PACKAGE_FORMAT_VERSION, NH_ASSISTANT_AGENT_PACKAGE_MAX_AGENTS, NH_ASSISTANT_AGENT_PACKAGE_MAX_BYTES, 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_PACKAGE_LOCK_ALL, NH_ASSISTANT_PACKAGE_LOCK_FIELDS, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_RESULT_PREVIEW_LENGTH, NH_ASSISTANT_RUN_FRAGMENT, 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 };
|
|
6207
|
+
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, AgentHandOffs, AgentInbox, AgentInboxFilter, AgentInboxGroup, AgentInboxSubjectGroup, AgentInboxVisit, AgentInvalidationCount, AgentLatestRun, AgentMetadata, AgentMetadataEntry, AgentMetadataRequest, AgentMetadataSource, AgentObjectAgent, AgentObjectAgents, AgentPackage, AgentPackageExport, AgentPackageExportOptions, AgentPackageExportRequest, AgentPackageImport, AgentPackageImportOptions, AgentPackageImportRequest, AgentPackageInfo, AgentPackageLink, AgentPackagePart, AgentPackagePartKind, AgentPackagePartOutcome, AgentPackagePreview, AgentPackageUnlink, AgentPackageUnlinkRequest, AgentPackageWarning, AgentPackageWarningCode, 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, AgentShadowVariants, 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, CodeHandOff, CodeRunSettings, CodeSkill, CodeTrigger, ConnectionRequiredEvent, ConnectionRequiredPart, ConnectionRequiredReason, ConsultationCeiling, ConsultationExposure, ConsultationSubjectRole, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DataConsultation, DataConsultationRequest, DataConsultationState, DataConsultationStateRequest, DataHandOff, DataHandOffRequest, DataSkill, DataSkillRequest, DataSkillVersion, DataSkillVersionStatus, DataTrigger, DataTriggerRequest, DataTriggerShadowRequest, DataTriggerVersion, DecideApprovalRequest, DirectoryEntry, FileLimits, FilePart, FileReference, HandOffAllowance, HandOffCeiling, InstructionAssetList, InstructionAssetProblem, InstructionAssetReference, InstructionAssetSummary, InstructionAssetText, 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, PackageAgent, PackageAgentDefinition, PackageConsultation, PackageHandOff, PackagePartLink, PackagePartReference, PackageRunSettings, PackageSkill, PackageTrigger, PushSubscriptionRequest, RunBlock, RunCatalog, RunConfigurationProblem, RunConfigurationProblemKind, RunConfigurationRemoval, SendMessageRequest, SetAgentConsultationRoutesRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShadowVariant, ShareLink, SkillApplyMode, SkillCandidateRequest, SkillComparison, SkillComparisonFilter, SkillComparisonTool, SkillVersionStats, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TriggerCandidateRequest, TriggerComparison, TriggerConflict, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpConnectionRequest, UpdateMcpToolRequest, NhAssistantPickerOption as ɵNhAssistantPickerOption };
|