@newheap/platform-ai-chat 0.12.0 → 0.14.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 +5 -0
- package/admin/index.d.ts +194 -5
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +551 -20
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs +2 -2
- package/fesm2022/newheap-platform-ai-chat-agent-runs.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +703 -6
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +631 -30
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +238 -4
- package/i18n/nl.json +238 -4
- package/index.d.ts +411 -6
- package/package.json +1 -1
- package/testing/index.d.ts +19 -2
package/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { TemplatePortal } from '@angular/cdk/portal';
|
|
|
12
12
|
type AgentSubjectRole = 'none' | 'reader' | 'participant' | 'approver';
|
|
13
13
|
type AgentRunStatus = 'queued' | 'running' | 'waiting-for-approval' | 'completed' | 'failed' | 'cancelled';
|
|
14
14
|
type AgentProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'withdrawn' | 'stale' | 'executing' | 'executed' | 'execution-failed' | 'execution-unknown' | 'resolved' | 'shadow';
|
|
15
|
-
type AgentGrantSource = 'none' | 'delegated' | 'agent' | 'delegated-read';
|
|
15
|
+
type AgentGrantSource = 'none' | 'delegated' | 'agent' | 'delegated-read' | 'accountable';
|
|
16
16
|
/**
|
|
17
17
|
* How a run worked: `model` through the language model, `rule` through the agent's rules without a
|
|
18
18
|
* model, `rule-then-model` when the rules handed the run over to the model.
|
|
@@ -49,6 +49,10 @@ interface AgentRun {
|
|
|
49
49
|
/** The skill of the agent the run worked in; missing or null for the agent's own tools. */
|
|
50
50
|
skill?: string | null;
|
|
51
51
|
skillChosenBy?: AgentSkillChooser | null;
|
|
52
|
+
/** The version of a skill defined as data the run worked in; absent for a skill in code. */
|
|
53
|
+
skillVersion?: number | null;
|
|
54
|
+
/** The run evaluated a candidate version of its skill in the shadow thread. */
|
|
55
|
+
skillCandidate?: boolean;
|
|
52
56
|
/** The agent that handed the run's work off; missing or null for a run no agent asked for. */
|
|
53
57
|
requestedByAgentId?: string | null;
|
|
54
58
|
/**
|
|
@@ -74,6 +78,11 @@ interface AgentThread {
|
|
|
74
78
|
role: AgentSubjectRole;
|
|
75
79
|
activeRun: AgentRun | null;
|
|
76
80
|
waitingInputs: number;
|
|
81
|
+
/**
|
|
82
|
+
* The thread holds the agent's shadow work about the subject: only administrators see it,
|
|
83
|
+
* nobody is notified and nothing proposed in it executes.
|
|
84
|
+
*/
|
|
85
|
+
shadow?: boolean;
|
|
77
86
|
}
|
|
78
87
|
interface AgentThreadLookup {
|
|
79
88
|
thread: AgentThread | null;
|
|
@@ -94,6 +103,11 @@ interface AgentSubjectWorkAgent {
|
|
|
94
103
|
agentId: string;
|
|
95
104
|
thread: AgentThread | null;
|
|
96
105
|
canStart: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* For administrators, the agent's shadow thread about the subject while the agent or one of its
|
|
108
|
+
* skills works in shadow; missing or `null` otherwise.
|
|
109
|
+
*/
|
|
110
|
+
shadowThread?: AgentThread | null;
|
|
97
111
|
}
|
|
98
112
|
/**
|
|
99
113
|
* A proposal on a subject with the caller's live decision right. Only a pending proposal can be
|
|
@@ -494,7 +508,7 @@ interface ToolCallPart {
|
|
|
494
508
|
* `delegated`, `agent` or `delegated-read` when an agent used rights beyond the caller's own:
|
|
495
509
|
* the initiator's, its own grant, or a person's through a gateway read.
|
|
496
510
|
*/
|
|
497
|
-
grantSource?: 'delegated' | 'agent' | 'delegated-read' | null;
|
|
511
|
+
grantSource?: 'delegated' | 'agent' | 'delegated-read' | 'accountable' | null;
|
|
498
512
|
/** The result came from rights this viewer does not have and is shielded from them. */
|
|
499
513
|
restricted?: boolean;
|
|
500
514
|
}
|
|
@@ -823,6 +837,41 @@ interface AdminAgent extends AdminAgentInput {
|
|
|
823
837
|
skills?: AgentSkillState[];
|
|
824
838
|
/** The live agent this agent is a shadow variant of; missing or null for an agent that is no variant. */
|
|
825
839
|
shadowOf?: string | null;
|
|
840
|
+
/** Whether the agent works in shadow, and how the code and an administrator decided it. */
|
|
841
|
+
shadow?: AgentShadowState | null;
|
|
842
|
+
/** The technical account that answers for the agent's new runs; null when it answers to none. */
|
|
843
|
+
serviceAccount?: AgentServiceAccountState | null;
|
|
844
|
+
}
|
|
845
|
+
/** The shadow modes an administrator chooses; `code` lets the mode in code decide again. */
|
|
846
|
+
type AgentShadowMode = 'shadow' | 'live' | 'code';
|
|
847
|
+
/**
|
|
848
|
+
* The shadow mode of an agent or a skill. In shadow the work goes to the agent's shadow threads,
|
|
849
|
+
* which only administrators see; nobody is notified and nothing proposed there executes.
|
|
850
|
+
*/
|
|
851
|
+
interface AgentShadowState {
|
|
852
|
+
/** Whether the work goes to shadow threads now; for a skill this includes the agent's mode. */
|
|
853
|
+
shadow: boolean;
|
|
854
|
+
/** The mode in code: `Shadow()` on the agent or the skill. */
|
|
855
|
+
configured: boolean;
|
|
856
|
+
/** The mode an administrator set at runtime; `null` follows the code. */
|
|
857
|
+
override: boolean | null;
|
|
858
|
+
/** A shadow variant always works in shadow; its mode cannot change. */
|
|
859
|
+
locked: boolean;
|
|
860
|
+
changedAt: string | null;
|
|
861
|
+
changedBy: string | null;
|
|
862
|
+
reason: string | null;
|
|
863
|
+
}
|
|
864
|
+
/** The technical account of an agent that answers to one. */
|
|
865
|
+
interface AgentServiceAccountState {
|
|
866
|
+
/** The account that answers for the agent's new runs. */
|
|
867
|
+
actorId: string;
|
|
868
|
+
/** The account in code. */
|
|
869
|
+
configuredActorId: string;
|
|
870
|
+
/** Whether an administrator set `actorId` at runtime. */
|
|
871
|
+
overridden: boolean;
|
|
872
|
+
changedAt: string | null;
|
|
873
|
+
changedBy: string | null;
|
|
874
|
+
reason: string | null;
|
|
826
875
|
}
|
|
827
876
|
/** One skill of an agent with its own state and today's usage across scopes. */
|
|
828
877
|
interface AgentSkillState {
|
|
@@ -841,6 +890,8 @@ interface AgentSkillState {
|
|
|
841
890
|
dailyTokens: number | null;
|
|
842
891
|
cancelledRuns: number;
|
|
843
892
|
startedRuns: number;
|
|
893
|
+
/** Whether the skill's work goes to the agent's shadow threads. */
|
|
894
|
+
shadow?: AgentShadowState;
|
|
844
895
|
}
|
|
845
896
|
/** Response of `GET` and `POST admin/agents/{id}/state`. */
|
|
846
897
|
interface AgentState {
|
|
@@ -858,6 +909,21 @@ interface AgentState {
|
|
|
858
909
|
startedRuns: number;
|
|
859
910
|
skills?: AgentSkillState[];
|
|
860
911
|
shadowOf?: string | null;
|
|
912
|
+
/** `null` for an agent without runs, which only chats. */
|
|
913
|
+
shadow?: AgentShadowState | null;
|
|
914
|
+
serviceAccount?: AgentServiceAccountState | null;
|
|
915
|
+
}
|
|
916
|
+
/** Body of `POST admin/agents/{id}/shadow` and `POST admin/agents/{id}/skills/{skillId}/shadow`. */
|
|
917
|
+
interface SetAgentShadowRequest {
|
|
918
|
+
mode: AgentShadowMode;
|
|
919
|
+
/** Optional, at most 500 characters. */
|
|
920
|
+
reason?: string | null;
|
|
921
|
+
}
|
|
922
|
+
/** Body of `POST admin/agents/{id}/service-account`. `null` uses the account in code again. */
|
|
923
|
+
interface SetAgentServiceAccountRequest {
|
|
924
|
+
actorId: string | null;
|
|
925
|
+
/** Optional, at most 500 characters. */
|
|
926
|
+
reason?: string | null;
|
|
861
927
|
}
|
|
862
928
|
/** Body of `POST admin/agents/{id}/state`. `active` resumes the agent. */
|
|
863
929
|
interface SetAgentStateRequest {
|
|
@@ -1151,6 +1217,271 @@ interface AgentFeedbackList {
|
|
|
1151
1217
|
items: AgentFeedbackItem[];
|
|
1152
1218
|
total: number;
|
|
1153
1219
|
}
|
|
1220
|
+
/** A building block registered in code that run configuration as data names. */
|
|
1221
|
+
interface RunBlock {
|
|
1222
|
+
name: string;
|
|
1223
|
+
description: string;
|
|
1224
|
+
}
|
|
1225
|
+
/** Response of `GET admin/run-catalog`: what skills, triggers and run settings defined as data can name. */
|
|
1226
|
+
interface RunCatalog {
|
|
1227
|
+
triggerEvents: RunBlock[];
|
|
1228
|
+
subjectSets: RunBlock[];
|
|
1229
|
+
ruleHandlers: RunBlock[];
|
|
1230
|
+
approvalPolicies: string[];
|
|
1231
|
+
/** Chat profiles with function calling and streaming. */
|
|
1232
|
+
profiles: string[];
|
|
1233
|
+
}
|
|
1234
|
+
/** Which part of the run configuration a problem concerns. */
|
|
1235
|
+
type RunConfigurationProblemKind = 'agent' | 'skill' | 'candidate' | 'trigger';
|
|
1236
|
+
/**
|
|
1237
|
+
* Data that is out of effect because it no longer fits the code, for example after a deploy removed
|
|
1238
|
+
* a profile, policy, rule handler, event or subject set it names.
|
|
1239
|
+
*/
|
|
1240
|
+
interface RunConfigurationProblem {
|
|
1241
|
+
agentId: string;
|
|
1242
|
+
kind: RunConfigurationProblemKind;
|
|
1243
|
+
/** The agent, skill or trigger id. */
|
|
1244
|
+
id: string;
|
|
1245
|
+
/** Such as `unknown-event` or `tool-not-covered`. */
|
|
1246
|
+
code: string;
|
|
1247
|
+
}
|
|
1248
|
+
/** Whom an agent answers to. */
|
|
1249
|
+
type AgentAccountability = 'agent' | 'subject-responsible' | 'service-account';
|
|
1250
|
+
/** Reads with rights beyond the thread's readers: shielded from them, or refused. */
|
|
1251
|
+
type AgentElevatedReads = 'restricted' | 'deny';
|
|
1252
|
+
/**
|
|
1253
|
+
* The run settings of an agent created in the administration. Grants are never data: in headless
|
|
1254
|
+
* runs the agent acts with the rights of the account it answers to, within its tool selectors.
|
|
1255
|
+
*/
|
|
1256
|
+
interface AgentRunSettings {
|
|
1257
|
+
version: number;
|
|
1258
|
+
accountability: AgentAccountability;
|
|
1259
|
+
serviceAccountActorId: string | null;
|
|
1260
|
+
delegateFromInitiator: boolean;
|
|
1261
|
+
allowGatewayReads: boolean;
|
|
1262
|
+
elevatedReads: AgentElevatedReads;
|
|
1263
|
+
approvalPolicy: string | null;
|
|
1264
|
+
retryCount: number;
|
|
1265
|
+
dailyToolCalls: number | null;
|
|
1266
|
+
dailyTokens: number | null;
|
|
1267
|
+
maxConcurrentRuns: number;
|
|
1268
|
+
maxRunsPerSubjectPerDay: number;
|
|
1269
|
+
maxTokensPerRun: number | null;
|
|
1270
|
+
triageProfile: string | null;
|
|
1271
|
+
ruleHandler: string | null;
|
|
1272
|
+
changedAt: string;
|
|
1273
|
+
changedBy: string;
|
|
1274
|
+
reason: string | null;
|
|
1275
|
+
inEffect: boolean;
|
|
1276
|
+
problem: string | null;
|
|
1277
|
+
}
|
|
1278
|
+
/** Body of `PUT admin/agents/{id}/run-settings`. */
|
|
1279
|
+
interface AgentRunSettingsRequest {
|
|
1280
|
+
accountability: AgentAccountability;
|
|
1281
|
+
/** For `service-account` only: an account that exists and may sign in. */
|
|
1282
|
+
serviceAccountActorId?: string | null;
|
|
1283
|
+
delegateFromInitiator?: boolean;
|
|
1284
|
+
/** Not for an agent that answers to itself. */
|
|
1285
|
+
allowGatewayReads?: boolean;
|
|
1286
|
+
elevatedReads?: AgentElevatedReads;
|
|
1287
|
+
approvalPolicy?: string | null;
|
|
1288
|
+
/** 0 to 10; 3 by default. */
|
|
1289
|
+
retryCount?: number | null;
|
|
1290
|
+
/** With `dailyTokens`, the daily budget per scope. */
|
|
1291
|
+
dailyToolCalls?: number | null;
|
|
1292
|
+
dailyTokens?: number | null;
|
|
1293
|
+
/** 1 to 100; 4 by default. */
|
|
1294
|
+
maxConcurrentRuns?: number | null;
|
|
1295
|
+
/** 1 to 1,000; 10 by default. */
|
|
1296
|
+
maxRunsPerSubjectPerDay?: number | null;
|
|
1297
|
+
maxTokensPerRun?: number | null;
|
|
1298
|
+
triageProfile?: string | null;
|
|
1299
|
+
ruleHandler?: string | null;
|
|
1300
|
+
/** The settings' current version; `null` for new settings. */
|
|
1301
|
+
expectedVersion?: number | null;
|
|
1302
|
+
/** Optional, at most 500 characters. */
|
|
1303
|
+
reason?: string | null;
|
|
1304
|
+
}
|
|
1305
|
+
/** A skill the agent declares in code; it cannot change here. */
|
|
1306
|
+
interface CodeSkill {
|
|
1307
|
+
skillId: string;
|
|
1308
|
+
description: string;
|
|
1309
|
+
}
|
|
1310
|
+
/** A trigger registered in code; it cannot change here. */
|
|
1311
|
+
interface CodeTrigger {
|
|
1312
|
+
triggerId: string;
|
|
1313
|
+
source: 'event' | 'schedule' | 'webhook';
|
|
1314
|
+
skillId: string | null;
|
|
1315
|
+
}
|
|
1316
|
+
/** One version of a skill defined as data. */
|
|
1317
|
+
interface DataSkill {
|
|
1318
|
+
skillId: string;
|
|
1319
|
+
version: number;
|
|
1320
|
+
description: string;
|
|
1321
|
+
instructions: string | null;
|
|
1322
|
+
instructionsHash: string | null;
|
|
1323
|
+
tools: string[];
|
|
1324
|
+
profile: string | null;
|
|
1325
|
+
ruleHandler: string | null;
|
|
1326
|
+
maxTokensPerRun: number | null;
|
|
1327
|
+
dailyToolCalls: number | null;
|
|
1328
|
+
dailyTokens: number | null;
|
|
1329
|
+
approvalPolicy: string | null;
|
|
1330
|
+
changedAt: string;
|
|
1331
|
+
changedBy: string;
|
|
1332
|
+
reason: string | null;
|
|
1333
|
+
/** `false` with `problem` when the version no longer fits the code. */
|
|
1334
|
+
inEffect: boolean;
|
|
1335
|
+
problem: string | null;
|
|
1336
|
+
/** The candidate that runs in shadow next to this live version; missing or null without one. */
|
|
1337
|
+
candidate?: DataSkill | null;
|
|
1338
|
+
}
|
|
1339
|
+
/** How a change of a skill takes effect: at once, or as a candidate in shadow next to the live version. */
|
|
1340
|
+
type SkillApplyMode = 'live' | 'shadow';
|
|
1341
|
+
/** Body of `PUT admin/agents/{id}/skills/{skillId}`. */
|
|
1342
|
+
interface DataSkillRequest {
|
|
1343
|
+
/** At most 300 characters; triage and `use_skill` choose by it. */
|
|
1344
|
+
description: string;
|
|
1345
|
+
/** At most 20,000 characters. */
|
|
1346
|
+
instructions?: string | null;
|
|
1347
|
+
/** Within the agent's own tool selectors; empty uses the agent's. */
|
|
1348
|
+
tools?: string[];
|
|
1349
|
+
profile?: string | null;
|
|
1350
|
+
ruleHandler?: string | null;
|
|
1351
|
+
maxTokensPerRun?: number | null;
|
|
1352
|
+
dailyToolCalls?: number | null;
|
|
1353
|
+
dailyTokens?: number | null;
|
|
1354
|
+
approvalPolicy?: string | null;
|
|
1355
|
+
/** The live version the change was made on; `null` for a new skill. */
|
|
1356
|
+
expectedVersion?: number | null;
|
|
1357
|
+
reason?: string | null;
|
|
1358
|
+
/** For a change of a skill; `live` by default. */
|
|
1359
|
+
apply?: SkillApplyMode;
|
|
1360
|
+
}
|
|
1361
|
+
type DataSkillVersionStatus = 'live' | 'candidate' | 'superseded' | 'discarded';
|
|
1362
|
+
/** One version in the history of a skill defined as data. */
|
|
1363
|
+
interface DataSkillVersion {
|
|
1364
|
+
version: number;
|
|
1365
|
+
status: DataSkillVersionStatus;
|
|
1366
|
+
description: string;
|
|
1367
|
+
instructionsHash: string | null;
|
|
1368
|
+
createdAt: string;
|
|
1369
|
+
createdBy: string;
|
|
1370
|
+
reason: string | null;
|
|
1371
|
+
}
|
|
1372
|
+
/** Body of `POST admin/agents/{id}/skills/{skillId}/candidate/promote` and `.../discard`. */
|
|
1373
|
+
interface SkillCandidateRequest {
|
|
1374
|
+
/** The candidate version the change is for. */
|
|
1375
|
+
version: number;
|
|
1376
|
+
reason?: string | null;
|
|
1377
|
+
}
|
|
1378
|
+
/** The runs of one version in a comparison. */
|
|
1379
|
+
interface SkillVersionStats {
|
|
1380
|
+
version: number;
|
|
1381
|
+
runs: number;
|
|
1382
|
+
completed: number;
|
|
1383
|
+
failed: number;
|
|
1384
|
+
proposals: number;
|
|
1385
|
+
toolCalls: number;
|
|
1386
|
+
tokens: number;
|
|
1387
|
+
}
|
|
1388
|
+
/** The proposals of both versions for one tool. */
|
|
1389
|
+
interface SkillComparisonTool {
|
|
1390
|
+
toolId: string;
|
|
1391
|
+
liveProposals: number;
|
|
1392
|
+
candidateProposals: number;
|
|
1393
|
+
liveApproved: number;
|
|
1394
|
+
liveRejected: number;
|
|
1395
|
+
}
|
|
1396
|
+
/** Response of `GET admin/agents/{id}/skills/{skillId}/candidate/comparison`. Counts only. */
|
|
1397
|
+
interface SkillComparison {
|
|
1398
|
+
agentId: string;
|
|
1399
|
+
skillId: string;
|
|
1400
|
+
from: string;
|
|
1401
|
+
to: string;
|
|
1402
|
+
live: SkillVersionStats;
|
|
1403
|
+
candidate: SkillVersionStats;
|
|
1404
|
+
/** The events both versions handled. */
|
|
1405
|
+
pairedEvents: number;
|
|
1406
|
+
tools: SkillComparisonTool[];
|
|
1407
|
+
}
|
|
1408
|
+
/** Optional period of a comparison; it starts when the candidate was saved by default. */
|
|
1409
|
+
interface SkillComparisonFilter {
|
|
1410
|
+
from?: string;
|
|
1411
|
+
to?: string;
|
|
1412
|
+
}
|
|
1413
|
+
/** What happens to an event while a run on the subject is active. */
|
|
1414
|
+
type TriggerConflict = 'coalesce' | 'queue' | 'supersede' | 'ignore';
|
|
1415
|
+
/** A trigger defined as data: a named event or a schedule that starts the agent. */
|
|
1416
|
+
interface DataTrigger {
|
|
1417
|
+
triggerId: string;
|
|
1418
|
+
skillId: string | null;
|
|
1419
|
+
source: 'event' | 'schedule';
|
|
1420
|
+
event: string | null;
|
|
1421
|
+
cron: string | null;
|
|
1422
|
+
timeZone: string | null;
|
|
1423
|
+
subjectSet: string | null;
|
|
1424
|
+
message: string | null;
|
|
1425
|
+
conflict: TriggerConflict;
|
|
1426
|
+
debounceSeconds: number;
|
|
1427
|
+
/** In shadow its runs work in the agent's shadow threads. A new trigger starts in shadow. */
|
|
1428
|
+
shadow: boolean;
|
|
1429
|
+
version: number;
|
|
1430
|
+
changedAt: string;
|
|
1431
|
+
changedBy: string;
|
|
1432
|
+
reason: string | null;
|
|
1433
|
+
inEffect: boolean;
|
|
1434
|
+
problem: string | null;
|
|
1435
|
+
}
|
|
1436
|
+
/** Body of `PUT admin/agents/{id}/triggers/{triggerId}`. */
|
|
1437
|
+
interface DataTriggerRequest {
|
|
1438
|
+
source: 'event' | 'schedule';
|
|
1439
|
+
/** The skill the runs work in; empty lets the agent's rules or triage choose. */
|
|
1440
|
+
skill?: string | null;
|
|
1441
|
+
/** For an event trigger: a registered trigger event. */
|
|
1442
|
+
event?: string | null;
|
|
1443
|
+
/** For a schedule: a five- or six-field cron expression. */
|
|
1444
|
+
cron?: string | null;
|
|
1445
|
+
/** For a schedule: an IANA or Windows time zone; UTC by default. */
|
|
1446
|
+
timeZone?: string | null;
|
|
1447
|
+
/** For a schedule: a registered subject set. */
|
|
1448
|
+
subjectSet?: string | null;
|
|
1449
|
+
/** For a schedule: what every run receives, at most 2,000 characters. */
|
|
1450
|
+
message?: string | null;
|
|
1451
|
+
conflict?: TriggerConflict | null;
|
|
1452
|
+
/** For an event trigger: at most 3,600; 120 by default. */
|
|
1453
|
+
debounceSeconds?: number | null;
|
|
1454
|
+
/** The trigger's current version; `null` for a new trigger. */
|
|
1455
|
+
expectedVersion?: number | null;
|
|
1456
|
+
reason?: string | null;
|
|
1457
|
+
}
|
|
1458
|
+
/** Body of `POST admin/agents/{id}/triggers/{triggerId}/shadow`. */
|
|
1459
|
+
interface DataTriggerShadowRequest {
|
|
1460
|
+
mode: 'shadow' | 'live';
|
|
1461
|
+
reason?: string | null;
|
|
1462
|
+
}
|
|
1463
|
+
/** Query of the removals of run settings, data skills and data triggers. */
|
|
1464
|
+
interface RunConfigurationRemoval {
|
|
1465
|
+
expectedVersion?: number | null;
|
|
1466
|
+
reason?: string | null;
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Response of `GET admin/agents/{id}/configuration`: the agent's run settings, skills and triggers,
|
|
1470
|
+
* in code and as data, and the data that no longer fits the code.
|
|
1471
|
+
*/
|
|
1472
|
+
interface AgentRunConfiguration {
|
|
1473
|
+
agentId: string;
|
|
1474
|
+
/** The agent's own tool selectors; a data skill's tools stay within them. */
|
|
1475
|
+
toolSelectors: string[];
|
|
1476
|
+
codeSkills: CodeSkill[];
|
|
1477
|
+
dataSkills: DataSkill[];
|
|
1478
|
+
codeTriggers: CodeTrigger[];
|
|
1479
|
+
dataTriggers: DataTrigger[];
|
|
1480
|
+
problems: RunConfigurationProblem[];
|
|
1481
|
+
source: 'code' | 'admin';
|
|
1482
|
+
/** The run settings of an agent created in the administration; `null` for an agent in code and one that only chats. */
|
|
1483
|
+
runSettings: AgentRunSettings | null;
|
|
1484
|
+
}
|
|
1154
1485
|
|
|
1155
1486
|
/** Decides whether the current user may see and use the assistant. */
|
|
1156
1487
|
interface NhAssistantAccessPolicy {
|
|
@@ -1324,7 +1655,17 @@ declare class NhAssistantApiError extends Error {
|
|
|
1324
1655
|
readonly status: number;
|
|
1325
1656
|
readonly code: string;
|
|
1326
1657
|
readonly messageKey: string;
|
|
1327
|
-
|
|
1658
|
+
/**
|
|
1659
|
+
* The field errors of an `assistant-validation` response: camelCase field names with stable
|
|
1660
|
+
* values such as `required`, `invalid`, `too-long` or `not-found`. Empty otherwise.
|
|
1661
|
+
*/
|
|
1662
|
+
readonly fieldErrors: Readonly<Record<string, readonly string[]>>;
|
|
1663
|
+
constructor(status: number, code: string, messageKey: string,
|
|
1664
|
+
/**
|
|
1665
|
+
* The field errors of an `assistant-validation` response: camelCase field names with stable
|
|
1666
|
+
* values such as `required`, `invalid`, `too-long` or `not-found`. Empty otherwise.
|
|
1667
|
+
*/
|
|
1668
|
+
fieldErrors?: Readonly<Record<string, readonly string[]>>);
|
|
1328
1669
|
}
|
|
1329
1670
|
/** Translation key that belongs to a failure code. */
|
|
1330
1671
|
declare function nhAssistantErrorMessageKey(code: string): string;
|
|
@@ -1413,6 +1754,19 @@ declare class NhAssistantAdminApiService {
|
|
|
1413
1754
|
* Pauses, stops or resumes one skill of an agent; its other skills keep working.
|
|
1414
1755
|
*/
|
|
1415
1756
|
setSkillState(agentId: string, skillId: string, request: SetAgentStateRequest): Observable<AgentSkillState>;
|
|
1757
|
+
/**
|
|
1758
|
+
* Puts an agent in shadow, live, or back to the mode in code. A shadow variant cannot change
|
|
1759
|
+
* (`assistant-shadow-variant`).
|
|
1760
|
+
*/
|
|
1761
|
+
setAgentShadow(agentId: string, request: SetAgentShadowRequest): Observable<AgentState>;
|
|
1762
|
+
/** Puts one skill of an agent in shadow, live, or back to the mode in code. */
|
|
1763
|
+
setSkillShadow(agentId: string, skillId: string, request: SetAgentShadowRequest): Observable<AgentSkillState>;
|
|
1764
|
+
/**
|
|
1765
|
+
* Changes the technical account that answers for the agent's new runs, or with `actorId: null`
|
|
1766
|
+
* uses the account in code again. Fails with `assistant-service-account-not-found` for an
|
|
1767
|
+
* account that does not exist or may not sign in.
|
|
1768
|
+
*/
|
|
1769
|
+
setServiceAccount(agentId: string, request: SetAgentServiceAccountRequest): Observable<AgentState>;
|
|
1416
1770
|
/** Deletes an admin agent. Code agents cannot be deleted; stop them instead. */
|
|
1417
1771
|
deleteAgent(agentId: string): Observable<void>;
|
|
1418
1772
|
getMcpServers(): Observable<McpServer[]>;
|
|
@@ -1454,6 +1808,41 @@ declare class NhAssistantAdminApiService {
|
|
|
1454
1808
|
startAgentReplay(variantId: string, request: AgentReplayRequest): Observable<AgentReplay>;
|
|
1455
1809
|
/** The latest replays into a shadow variant, newest first. */
|
|
1456
1810
|
getAgentReplays(variantId: string): Observable<AgentReplayList>;
|
|
1811
|
+
/** The building blocks in code that run settings, skills and triggers defined as data can name. */
|
|
1812
|
+
getRunCatalog(): Observable<RunCatalog>;
|
|
1813
|
+
/**
|
|
1814
|
+
* The agent's run settings, skills and triggers, in code and as data, and the data that no longer
|
|
1815
|
+
* fits the code. An agent in code without a run configuration answers `assistant-agent-not-found`.
|
|
1816
|
+
*/
|
|
1817
|
+
getAgentConfiguration(agentId: string): Observable<AgentRunConfiguration>;
|
|
1818
|
+
/**
|
|
1819
|
+
* Adds or changes the run settings of an agent created in the administration. An agent in code
|
|
1820
|
+
* fails with `assistant-run-settings-in-code`; an unknown technical account with
|
|
1821
|
+
* `assistant-service-account-not-found`.
|
|
1822
|
+
*/
|
|
1823
|
+
saveRunSettings(agentId: string, request: AgentRunSettingsRequest): Observable<AgentRunSettings>;
|
|
1824
|
+
/** Removes the run settings; while data skills or triggers belong to the agent, `assistant-run-settings-in-use`. */
|
|
1825
|
+
removeRunSettings(agentId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
1826
|
+
/**
|
|
1827
|
+
* Adds a skill defined as data, which starts in shadow, or stores its next version: with `apply`
|
|
1828
|
+
* `live` at once, with `shadow` as the candidate that runs in shadow next to the live version.
|
|
1829
|
+
*/
|
|
1830
|
+
saveDataSkill(agentId: string, skillId: string, request: DataSkillRequest): Observable<DataSkill>;
|
|
1831
|
+
/** Takes a skill defined as data out of effect; while a data trigger names it, `assistant-skill-in-use`. */
|
|
1832
|
+
removeDataSkill(agentId: string, skillId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
1833
|
+
/** Every version of a skill defined as data, newest first. */
|
|
1834
|
+
getDataSkillVersions(agentId: string, skillId: string): Observable<DataSkillVersion[]>;
|
|
1835
|
+
/** Makes the candidate the live version of its skill. */
|
|
1836
|
+
promoteSkillCandidate(agentId: string, skillId: string, request: SkillCandidateRequest): Observable<DataSkill>;
|
|
1837
|
+
/** Discards the candidate; it stays as history. */
|
|
1838
|
+
discardSkillCandidate(agentId: string, skillId: string, request: SkillCandidateRequest): Observable<void>;
|
|
1839
|
+
/** Compares the candidate with the live version on the runs they made in the period. */
|
|
1840
|
+
compareSkillCandidate(agentId: string, skillId: string, filter?: SkillComparisonFilter): Observable<SkillComparison>;
|
|
1841
|
+
/** Adds a trigger defined as data, which starts in shadow, or changes one in the mode it has. */
|
|
1842
|
+
saveDataTrigger(agentId: string, triggerId: string, request: DataTriggerRequest): Observable<DataTrigger>;
|
|
1843
|
+
removeDataTrigger(agentId: string, triggerId: string, removal?: RunConfigurationRemoval): Observable<void>;
|
|
1844
|
+
/** Puts a trigger defined as data in shadow or live. */
|
|
1845
|
+
setDataTriggerShadow(agentId: string, triggerId: string, request: DataTriggerShadowRequest): Observable<DataTrigger>;
|
|
1457
1846
|
private download;
|
|
1458
1847
|
private request;
|
|
1459
1848
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminApiService, never>;
|
|
@@ -1647,6 +2036,8 @@ declare class NhAssistantLiveService {
|
|
|
1647
2036
|
interface NhAssistantError {
|
|
1648
2037
|
code: string;
|
|
1649
2038
|
messageKey: string;
|
|
2039
|
+
/** The field errors of an `assistant-validation` failure, by camelCase field name. */
|
|
2040
|
+
fieldErrors?: Readonly<Record<string, readonly string[]>>;
|
|
1650
2041
|
}
|
|
1651
2042
|
/**
|
|
1652
2043
|
* A non-blocking remark about a turn that completed normally, for example a limit that cut the
|
|
@@ -1792,7 +2183,10 @@ declare class NhAssistantStore {
|
|
|
1792
2183
|
readonly pageContextExcluded: _angular_core.Signal<boolean>;
|
|
1793
2184
|
/** Whether the drawer was open when this account last left the application. */
|
|
1794
2185
|
readonly restorePanelOpen: _angular_core.Signal<boolean>;
|
|
1795
|
-
/**
|
|
2186
|
+
/**
|
|
2187
|
+
* True while the user can send: enabled, an agent is chosen and no turn runs or waits. A
|
|
2188
|
+
* conversation whose last turn failed accepts a new message; an archived one does not.
|
|
2189
|
+
*/
|
|
1796
2190
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
1797
2191
|
/** Messages not yet accepted by the server, for the open conversation. Never persisted. */
|
|
1798
2192
|
readonly queuedMessages: _angular_core.Signal<readonly NhAssistantQueuedMessage[]>;
|
|
@@ -1853,7 +2247,12 @@ declare class NhAssistantStore {
|
|
|
1853
2247
|
* their own turns. Resolves `false` when the message was not accepted.
|
|
1854
2248
|
*/
|
|
1855
2249
|
send(text: string): Promise<boolean>;
|
|
1856
|
-
/**
|
|
2250
|
+
/**
|
|
2251
|
+
* Sends immediately when the conversation accepts a message, otherwise appends to the
|
|
2252
|
+
* conversation's FIFO queue. A shown error alone does not hold a message back while nothing is
|
|
2253
|
+
* queued: the person asks again, for example after a failed turn. Queued messages still wait
|
|
2254
|
+
* for an explicit `resumeQueue` after Stop or a failure.
|
|
2255
|
+
*/
|
|
1857
2256
|
submit(text: string): Promise<boolean>;
|
|
1858
2257
|
/** Edits an unsent queued message without replacing the composer's current draft. */
|
|
1859
2258
|
updateQueuedMessage(id: string, text: string): boolean;
|
|
@@ -2266,8 +2665,14 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
|
|
|
2266
2665
|
readonly conversation: _angular_core.Signal<Conversation | null>;
|
|
2267
2666
|
private readonly conversationId;
|
|
2268
2667
|
readonly messages: _angular_core.Signal<Message[]>;
|
|
2668
|
+
/** An archived conversation takes no new messages. A failed one does: the person asks again. */
|
|
2269
2669
|
readonly closed: _angular_core.Signal<boolean>;
|
|
2270
2670
|
readonly busy: _angular_core.Signal<boolean>;
|
|
2671
|
+
/**
|
|
2672
|
+
* The last turn failed and no error bar explains it, for example after the conversation was
|
|
2673
|
+
* reopened. The panel then says so, while the composer stays available.
|
|
2674
|
+
*/
|
|
2675
|
+
readonly lastTurnFailed: _angular_core.Signal<boolean>;
|
|
2271
2676
|
readonly composerDisabled: _angular_core.Signal<boolean>;
|
|
2272
2677
|
readonly editingQueuedId: _angular_core.WritableSignal<string | null>;
|
|
2273
2678
|
readonly queuedDraft: _angular_core.WritableSignal<string>;
|
|
@@ -2737,4 +3142,4 @@ declare function nhAssistantErrorKeys(error: NhAssistantError | null): string[];
|
|
|
2737
3142
|
declare const NH_ASSISTANT_DASH_CASE: RegExp;
|
|
2738
3143
|
|
|
2739
3144
|
export { NH_ASSISTANT_ACCESS_POLICY, NH_ASSISTANT_CONFIG, NH_ASSISTANT_CONVERSATION_FRAGMENT, NH_ASSISTANT_FEEDBACK_CATEGORIES, NH_ASSISTANT_FEEDBACK_GROUPS, NH_ASSISTANT_FETCH, NH_ASSISTANT_ICONS, NH_ASSISTANT_JOIN_FRAGMENT, NH_ASSISTANT_MAX_BULK_FEEDBACK, NH_ASSISTANT_MAX_CUSTOM_INSTRUCTIONS, NH_ASSISTANT_MAX_FEEDBACK_TEXT, NH_ASSISTANT_MAX_PROPOSAL_LOOKUP, NH_ASSISTANT_MAX_SUBJECT_SUMMARY, NH_ASSISTANT_NO_ANSWER_NOTICE_CODE, NH_ASSISTANT_PAGE_CONTEXT_LIMITS, NH_ASSISTANT_PANEL_MOBILE_QUERY, NH_ASSISTANT_PANEL_WIDTH, NH_ASSISTANT_SSE_EVENT_TYPES, NH_ASSISTANT_TRANSLATIONS, NH_ASSISTANT_VIRTUAL_SCROLL_THRESHOLD, NhAssistantActivityComponent, NhAssistantAdminApiService, NhAssistantAgentPickerComponent, NhAssistantAgentRunApiService, NhAssistantAllowAllAccessPolicy, NhAssistantApiError, NhAssistantApiService, NhAssistantApprovalCardComponent, NhAssistantClientErrorCodes, NhAssistantComposerComponent, NhAssistantConversationListComponent, NhAssistantLauncherComponent, NhAssistantLiveService, NhAssistantPanelComponent, NhAssistantPanelService, NhAssistantPreferencesComponent, NhAssistantProposalFeedbackComponent, NhAssistantPushService, NhAssistantShareComponent, NhAssistantSseParser, NhAssistantStore, NhAssistantSubjectBadgeComponent, NhAssistantSubjectSummaryService, NhAssistantThreadComponent, NhAssistantToolCallCardComponent, NhAssistantToolCallGroupComponent, NhAssistantTranslationMerger, applyNhAssistantApprovalDecision, applyNhAssistantConversationChange, applyNhAssistantEvent, applyNhAssistantLiveEvent, describeNhAssistantClientContext, formatNhAssistantCountdown, nhAssistantCodeForStatus, nhAssistantErrorMessageKey, nhAssistantIsUnread, nhAssistantLatestTurnHasText, nhAssistantShareLink, normalizeNhAssistantClientContext, provideNhAssistant, NH_ASSISTANT_DASH_CASE as ɵNH_ASSISTANT_DASH_CASE, NhAssistantIconComponent as ɵNhAssistantIconComponent, NhAssistantTranslatePipe as ɵNhAssistantTranslatePipe, nhAssistantErrorKeys as ɵnhAssistantErrorKeys, nhAssistantReloadOnAgentWork as ɵnhAssistantReloadOnAgentWork, toNhAssistantError as ɵtoNhAssistantError };
|
|
2740
|
-
export type { AdminAgent, AdminAgentInput, AgentArtifact, AgentConsultation, AgentConsultationList, AgentConsultationStatus, AgentDecisionOutcome, AgentEvaluation, AgentEvaluationCost, AgentEvaluationDecisions, AgentEvaluationDifference, AgentEvaluationFilter, AgentEvaluationRouting, AgentEvaluationRuns, AgentEvaluationTool, AgentExecutionResolution, AgentFeedbackCategoryCount, AgentFeedbackExportFilter, AgentFeedbackFilter, AgentFeedbackItem, AgentFeedbackList, AgentFeedbackListFilter, AgentFeedbackOutcome, AgentFeedbackSummary, AgentFeedbackSummaryRow, AgentGrantSource, AgentInbox, AgentInboxFilter, AgentInvalidationCount, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalStatus, AgentReplay, AgentReplayList, AgentReplayRequest, AgentRun, AgentRunKind, AgentRunList, AgentRunRetryMode, AgentRunState, AgentRunStatus, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerReceipt, ApplicationContext, ApplicationContextVersion, ApprovalDecision, ApprovalPart, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DecideApprovalRequest, DirectoryEntry, LiveAgentWorkChanged, LiveAgentWorkReason, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, McpAuthMode, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantToolCallGroupState, NotificationSettings, PushSubscriptionRequest, SendMessageRequest, SetAgentStateRequest, ShareLink, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpToolRequest };
|
|
3145
|
+
export type { AdminAgent, AdminAgentInput, AgentAccountability, AgentArtifact, AgentConsultation, AgentConsultationList, AgentConsultationStatus, AgentDecisionOutcome, AgentElevatedReads, AgentEvaluation, AgentEvaluationCost, AgentEvaluationDecisions, AgentEvaluationDifference, AgentEvaluationFilter, AgentEvaluationRouting, AgentEvaluationRuns, AgentEvaluationTool, AgentExecutionResolution, AgentFeedbackCategoryCount, AgentFeedbackExportFilter, AgentFeedbackFilter, AgentFeedbackItem, AgentFeedbackList, AgentFeedbackListFilter, AgentFeedbackOutcome, AgentFeedbackSummary, AgentFeedbackSummaryRow, AgentGrantSource, AgentInbox, AgentInboxFilter, AgentInvalidationCount, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalStatus, AgentReplay, AgentReplayList, AgentReplayRequest, AgentRun, AgentRunConfiguration, AgentRunKind, AgentRunList, AgentRunRetryMode, AgentRunSettings, AgentRunSettingsRequest, AgentRunState, AgentRunStatus, AgentServiceAccountState, AgentShadowMode, AgentShadowState, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerReceipt, ApplicationContext, ApplicationContextVersion, ApprovalDecision, ApprovalPart, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, CodeSkill, CodeTrigger, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DataSkill, DataSkillRequest, DataSkillVersion, DataSkillVersionStatus, DataTrigger, DataTriggerRequest, DataTriggerShadowRequest, DecideApprovalRequest, DirectoryEntry, LiveAgentWorkChanged, LiveAgentWorkReason, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, McpAuthMode, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantToolCallGroupState, NotificationSettings, PushSubscriptionRequest, RunBlock, RunCatalog, RunConfigurationProblem, RunConfigurationProblemKind, RunConfigurationRemoval, SendMessageRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShareLink, SkillApplyMode, SkillCandidateRequest, SkillComparison, SkillComparisonFilter, SkillComparisonTool, SkillVersionStats, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TriggerConflict, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpToolRequest };
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssistantStatus, AgentSummary, Conversation, ClientContext, AssistantPreferences, ToolCatalogEntry, AdminAgentInput, McpServerInput, LiveConversationChanged, LiveConversationRead, LiveConversationRemoved, LiveConversationEvent, NhAssistantLiveService, LiveAgentWorkChanged, NhAssistantLiveState } from '@newheap/platform-ai-chat';
|
|
1
|
+
import { AssistantStatus, AgentSummary, Conversation, ClientContext, AssistantPreferences, ToolCatalogEntry, AdminAgentInput, McpServerInput, RunCatalog, LiveConversationChanged, LiveConversationRead, LiveConversationRemoved, LiveConversationEvent, NhAssistantLiveService, LiveAgentWorkChanged, NhAssistantLiveState } from '@newheap/platform-ai-chat';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
@@ -95,13 +95,18 @@ interface NhAssistantMockMcpServer extends McpServerInput {
|
|
|
95
95
|
/** A preconfigured agent. Code agents default to the scenario's chat agents. */
|
|
96
96
|
interface NhAssistantMockAdminAgent extends AdminAgentInput {
|
|
97
97
|
source: 'code' | 'admin';
|
|
98
|
-
/** The skills of a code agent, by id and description; they start active
|
|
98
|
+
/** The skills of a code agent, by id and description; they start active, and in shadow with `shadow`. */
|
|
99
99
|
skills?: {
|
|
100
100
|
skillId: string;
|
|
101
101
|
description: string;
|
|
102
|
+
shadow?: boolean;
|
|
102
103
|
}[];
|
|
103
104
|
/** The live agent this code agent is a shadow variant of. */
|
|
104
105
|
shadowOf?: string;
|
|
106
|
+
/** The agent starts in shadow, as with `Shadow()` in code. */
|
|
107
|
+
shadow?: boolean;
|
|
108
|
+
/** The technical account in code, as with `ServiceAccount(actorId)`. */
|
|
109
|
+
serviceAccount?: string;
|
|
105
110
|
}
|
|
106
111
|
/**
|
|
107
112
|
* Administration data of the mock. Hosts without an admin scenario still get working
|
|
@@ -119,6 +124,18 @@ interface NhAssistantMockAdminScenario {
|
|
|
119
124
|
policies?: string[];
|
|
120
125
|
/** Hosts that may receive the user's token (`forward-user-token`). Default: none. */
|
|
121
126
|
forwardUserTokenHosts?: string[];
|
|
127
|
+
/**
|
|
128
|
+
* The building blocks in code that run configuration as data names. Default: none, with
|
|
129
|
+
* `policies` as the approval policies.
|
|
130
|
+
*/
|
|
131
|
+
runCatalog?: Partial<RunCatalog>;
|
|
132
|
+
/** Triggers in code, per agent; they cannot change in the administration. */
|
|
133
|
+
codeTriggers?: {
|
|
134
|
+
agentId: string;
|
|
135
|
+
triggerId: string;
|
|
136
|
+
source: 'event' | 'schedule' | 'webhook';
|
|
137
|
+
skillId?: string | null;
|
|
138
|
+
}[];
|
|
122
139
|
}
|
|
123
140
|
/** A person in the simulated organization. */
|
|
124
141
|
interface NhAssistantMockPerson {
|