@newheap/platform-ai-chat 0.13.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 +164 -4
- package/fesm2022/newheap-platform-ai-chat-admin.mjs +468 -15
- package/fesm2022/newheap-platform-ai-chat-admin.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat-testing.mjs +564 -2
- package/fesm2022/newheap-platform-ai-chat-testing.mjs.map +1 -1
- package/fesm2022/newheap-platform-ai-chat.mjs +514 -28
- package/fesm2022/newheap-platform-ai-chat.mjs.map +1 -1
- package/i18n/en.json +189 -3
- package/i18n/nl.json +189 -3
- package/index.d.ts +336 -6
- package/package.json +1 -1
- package/testing/index.d.ts +13 -1
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
|
/**
|
|
@@ -504,7 +508,7 @@ interface ToolCallPart {
|
|
|
504
508
|
* `delegated`, `agent` or `delegated-read` when an agent used rights beyond the caller's own:
|
|
505
509
|
* the initiator's, its own grant, or a person's through a gateway read.
|
|
506
510
|
*/
|
|
507
|
-
grantSource?: 'delegated' | 'agent' | 'delegated-read' | null;
|
|
511
|
+
grantSource?: 'delegated' | 'agent' | 'delegated-read' | 'accountable' | null;
|
|
508
512
|
/** The result came from rights this viewer does not have and is shielded from them. */
|
|
509
513
|
restricted?: boolean;
|
|
510
514
|
}
|
|
@@ -1213,6 +1217,271 @@ interface AgentFeedbackList {
|
|
|
1213
1217
|
items: AgentFeedbackItem[];
|
|
1214
1218
|
total: number;
|
|
1215
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
|
+
}
|
|
1216
1485
|
|
|
1217
1486
|
/** Decides whether the current user may see and use the assistant. */
|
|
1218
1487
|
interface NhAssistantAccessPolicy {
|
|
@@ -1386,7 +1655,17 @@ declare class NhAssistantApiError extends Error {
|
|
|
1386
1655
|
readonly status: number;
|
|
1387
1656
|
readonly code: string;
|
|
1388
1657
|
readonly messageKey: string;
|
|
1389
|
-
|
|
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[]>>);
|
|
1390
1669
|
}
|
|
1391
1670
|
/** Translation key that belongs to a failure code. */
|
|
1392
1671
|
declare function nhAssistantErrorMessageKey(code: string): string;
|
|
@@ -1529,6 +1808,41 @@ declare class NhAssistantAdminApiService {
|
|
|
1529
1808
|
startAgentReplay(variantId: string, request: AgentReplayRequest): Observable<AgentReplay>;
|
|
1530
1809
|
/** The latest replays into a shadow variant, newest first. */
|
|
1531
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>;
|
|
1532
1846
|
private download;
|
|
1533
1847
|
private request;
|
|
1534
1848
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NhAssistantAdminApiService, never>;
|
|
@@ -1722,6 +2036,8 @@ declare class NhAssistantLiveService {
|
|
|
1722
2036
|
interface NhAssistantError {
|
|
1723
2037
|
code: string;
|
|
1724
2038
|
messageKey: string;
|
|
2039
|
+
/** The field errors of an `assistant-validation` failure, by camelCase field name. */
|
|
2040
|
+
fieldErrors?: Readonly<Record<string, readonly string[]>>;
|
|
1725
2041
|
}
|
|
1726
2042
|
/**
|
|
1727
2043
|
* A non-blocking remark about a turn that completed normally, for example a limit that cut the
|
|
@@ -1867,7 +2183,10 @@ declare class NhAssistantStore {
|
|
|
1867
2183
|
readonly pageContextExcluded: _angular_core.Signal<boolean>;
|
|
1868
2184
|
/** Whether the drawer was open when this account last left the application. */
|
|
1869
2185
|
readonly restorePanelOpen: _angular_core.Signal<boolean>;
|
|
1870
|
-
/**
|
|
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
|
+
*/
|
|
1871
2190
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
1872
2191
|
/** Messages not yet accepted by the server, for the open conversation. Never persisted. */
|
|
1873
2192
|
readonly queuedMessages: _angular_core.Signal<readonly NhAssistantQueuedMessage[]>;
|
|
@@ -1928,7 +2247,12 @@ declare class NhAssistantStore {
|
|
|
1928
2247
|
* their own turns. Resolves `false` when the message was not accepted.
|
|
1929
2248
|
*/
|
|
1930
2249
|
send(text: string): Promise<boolean>;
|
|
1931
|
-
/**
|
|
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
|
+
*/
|
|
1932
2256
|
submit(text: string): Promise<boolean>;
|
|
1933
2257
|
/** Edits an unsent queued message without replacing the composer's current draft. */
|
|
1934
2258
|
updateQueuedMessage(id: string, text: string): boolean;
|
|
@@ -2341,8 +2665,14 @@ declare class NhAssistantPanelComponent implements AfterViewInit, OnDestroy {
|
|
|
2341
2665
|
readonly conversation: _angular_core.Signal<Conversation | null>;
|
|
2342
2666
|
private readonly conversationId;
|
|
2343
2667
|
readonly messages: _angular_core.Signal<Message[]>;
|
|
2668
|
+
/** An archived conversation takes no new messages. A failed one does: the person asks again. */
|
|
2344
2669
|
readonly closed: _angular_core.Signal<boolean>;
|
|
2345
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>;
|
|
2346
2676
|
readonly composerDisabled: _angular_core.Signal<boolean>;
|
|
2347
2677
|
readonly editingQueuedId: _angular_core.WritableSignal<string | null>;
|
|
2348
2678
|
readonly queuedDraft: _angular_core.WritableSignal<string>;
|
|
@@ -2812,4 +3142,4 @@ declare function nhAssistantErrorKeys(error: NhAssistantError | null): string[];
|
|
|
2812
3142
|
declare const NH_ASSISTANT_DASH_CASE: RegExp;
|
|
2813
3143
|
|
|
2814
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 };
|
|
2815
|
-
export type { AdminAgent, AdminAgentInput, AgentArtifact, AgentConsultation, AgentConsultationList, AgentConsultationStatus, AgentDecisionOutcome, AgentEvaluation, AgentEvaluationCost, AgentEvaluationDecisions, AgentEvaluationDifference, AgentEvaluationFilter, AgentEvaluationRouting, AgentEvaluationRuns, AgentEvaluationTool, AgentExecutionResolution, AgentFeedbackCategoryCount, AgentFeedbackExportFilter, AgentFeedbackFilter, AgentFeedbackItem, AgentFeedbackList, AgentFeedbackListFilter, AgentFeedbackOutcome, AgentFeedbackSummary, AgentFeedbackSummaryRow, AgentGrantSource, AgentInbox, AgentInboxFilter, AgentInvalidationCount, AgentProposal, AgentProposalDecision, AgentProposalDecisionRight, AgentProposalFeedback, AgentProposalFeedbackCategory, AgentProposalFeedbackGroup, AgentProposalLookup, AgentProposalObject, AgentProposalStatus, AgentReplay, AgentReplayList, AgentReplayRequest, AgentRun, AgentRunKind, AgentRunList, AgentRunRetryMode, AgentRunState, AgentRunStatus, AgentServiceAccountState, AgentShadowMode, AgentShadowState, AgentSkillChooser, AgentSkillState, AgentState, AgentSubjectRole, AgentSubjectSummary, AgentSubjectSummaryList, AgentSubjectWork, AgentSubjectWorkAgent, AgentSubjectWorkProposal, AgentSummary, AgentThread, AgentThreadLookup, AgentThreadMemory, AgentTriggerReceipt, ApplicationContext, ApplicationContextVersion, ApprovalDecision, ApprovalPart, ApprovalPresentation, ApprovalPresentationField, ApprovalRequiredEvent, ApprovalStatus, AssistantAddressForm, AssistantAutonomy, AssistantCollaboration, AssistantErrorEvent, AssistantPreferences, AssistantResponseLength, AssistantStatus, AssistantStyle, ClientContext, ClientContextEntity, Conversation, ConversationKind, ConversationMember, ConversationPage, ConversationRole, ConversationStatus, ConversationSummary, ConversationThread, ConversationThreadDecision, CreateConversationRequest, DecideApprovalRequest, DirectoryEntry, LiveAgentWorkChanged, LiveAgentWorkReason, LiveConversationChanged, LiveConversationEvent, LiveConversationRead, LiveConversationRemoved, McpAuthMode, McpServer, McpServerInput, McpServerTestResult, McpTool, McpToolEffect, McpToolStatus, Message, MessageAuthorKind, MessageDeltaEvent, MessagePart, NhAssistantAccessPolicy, NhAssistantActivity, NhAssistantApprovalChoice, NhAssistantApprovalRight, NhAssistantApprovalWaitingFor, NhAssistantClientContext, NhAssistantClientErrorCode, NhAssistantConfig, NhAssistantError, NhAssistantFetch, NhAssistantIconName, NhAssistantLiveState, NhAssistantNotice, NhAssistantProposalFeedbackSaved, NhAssistantPushConfig, NhAssistantPushState, NhAssistantQueuedMessage, NhAssistantRawSseMessage, NhAssistantSseEvent, NhAssistantSseEventMap, NhAssistantSseEventType, NhAssistantStatusCodes, NhAssistantToolCallGroupState, NotificationSettings, PushSubscriptionRequest, SendMessageRequest, SetAgentServiceAccountRequest, SetAgentShadowRequest, SetAgentStateRequest, ShareLink, StaleKind, StartAgentRequest, TextPart, ToolCallPart, ToolCallStatus, ToolCatalogEffect, ToolCatalogEntry, ToolCompletedEvent, ToolStartedEvent, TurnCompletedEvent, TurnCompletionStatus, TurnStartedEvent, TurnUsage, UpdateAdminAgentRequest, UpdateApplicationContextRequest, UpdateMcpToolRequest };
|
|
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';
|
|
@@ -124,6 +124,18 @@ interface NhAssistantMockAdminScenario {
|
|
|
124
124
|
policies?: string[];
|
|
125
125
|
/** Hosts that may receive the user's token (`forward-user-token`). Default: none. */
|
|
126
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
|
+
}[];
|
|
127
139
|
}
|
|
128
140
|
/** A person in the simulated organization. */
|
|
129
141
|
interface NhAssistantMockPerson {
|